@mui/material 5.2.7 → 5.4.0

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 (152) hide show
  1. package/Autocomplete/Autocomplete.d.ts +7 -0
  2. package/Autocomplete/Autocomplete.js +22 -10
  3. package/Backdrop/Backdrop.js +3 -1
  4. package/Badge/Badge.js +6 -7
  5. package/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  6. package/Button/buttonClasses.d.ts +1 -1
  7. package/ButtonBase/TouchRipple.js +1 -2
  8. package/CHANGELOG.md +284 -33
  9. package/FilledInput/FilledInput.js +4 -1
  10. package/FormControlLabel/FormControlLabel.js +14 -4
  11. package/FormControlLabel/formControlLabelClasses.d.ts +2 -0
  12. package/FormControlLabel/formControlLabelClasses.js +1 -1
  13. package/FormGroup/FormGroup.js +14 -3
  14. package/FormGroup/formGroupClasses.d.ts +2 -0
  15. package/FormGroup/formGroupClasses.js +1 -1
  16. package/FormHelperText/FormHelperText.js +7 -9
  17. package/Grid/Grid.js +2 -4
  18. package/Input/Input.js +4 -1
  19. package/InputAdornment/InputAdornment.js +6 -9
  20. package/InputBase/InputBase.js +4 -1
  21. package/InputLabel/InputLabel.js +4 -0
  22. package/ListItem/ListItem.js +3 -1
  23. package/Modal/Modal.js +3 -1
  24. package/OutlinedInput/NotchedOutline.js +14 -16
  25. package/OutlinedInput/OutlinedInput.js +1 -1
  26. package/README.md +5 -4
  27. package/Radio/RadioButtonIcon.js +2 -6
  28. package/Select/Select.d.ts +9 -1
  29. package/Select/Select.js +10 -1
  30. package/Select/SelectInput.d.ts +1 -0
  31. package/Select/SelectInput.js +32 -13
  32. package/Slider/Slider.d.ts +2 -0
  33. package/Slider/Slider.js +126 -53
  34. package/StepLabel/StepLabel.js +3 -1
  35. package/SvgIcon/SvgIcon.js +9 -9
  36. package/SwipeableDrawer/SwipeArea.js +1 -3
  37. package/TextField/TextField.d.ts +1 -0
  38. package/TextField/TextField.js +2 -1
  39. package/Tooltip/Tooltip.js +6 -1
  40. package/index.d.ts +7 -2
  41. package/index.js +6 -3
  42. package/internal/SwitchBase.js +2 -6
  43. package/legacy/Autocomplete/Autocomplete.js +23 -10
  44. package/legacy/Backdrop/Backdrop.js +3 -1
  45. package/legacy/Badge/Badge.js +6 -7
  46. package/legacy/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  47. package/legacy/ButtonBase/TouchRipple.js +1 -2
  48. package/legacy/FilledInput/FilledInput.js +4 -1
  49. package/legacy/FormControlLabel/FormControlLabel.js +14 -4
  50. package/legacy/FormControlLabel/formControlLabelClasses.js +1 -1
  51. package/legacy/FormGroup/FormGroup.js +14 -3
  52. package/legacy/FormGroup/formGroupClasses.js +1 -1
  53. package/legacy/FormHelperText/FormHelperText.js +7 -9
  54. package/legacy/Grid/Grid.js +2 -4
  55. package/legacy/Input/Input.js +4 -1
  56. package/legacy/InputAdornment/InputAdornment.js +6 -9
  57. package/legacy/InputBase/InputBase.js +4 -1
  58. package/legacy/InputLabel/InputLabel.js +4 -0
  59. package/legacy/ListItem/ListItem.js +3 -1
  60. package/legacy/Modal/Modal.js +3 -1
  61. package/legacy/OutlinedInput/NotchedOutline.js +14 -16
  62. package/legacy/OutlinedInput/OutlinedInput.js +1 -1
  63. package/legacy/Radio/RadioButtonIcon.js +2 -6
  64. package/legacy/Select/Select.js +11 -1
  65. package/legacy/Select/SelectInput.js +36 -16
  66. package/legacy/Slider/Slider.js +127 -54
  67. package/legacy/StepLabel/StepLabel.js +3 -1
  68. package/legacy/SvgIcon/SvgIcon.js +9 -9
  69. package/legacy/SwipeableDrawer/SwipeArea.js +1 -3
  70. package/legacy/TextField/TextField.js +2 -1
  71. package/legacy/Tooltip/Tooltip.js +6 -1
  72. package/legacy/index.js +6 -3
  73. package/legacy/internal/SwitchBase.js +2 -6
  74. package/legacy/useMediaQuery/useMediaQuery.js +86 -31
  75. package/legacy/utils/shouldSpreadAdditionalProps.js +7 -0
  76. package/modern/Autocomplete/Autocomplete.js +21 -9
  77. package/modern/Backdrop/Backdrop.js +3 -1
  78. package/modern/Badge/Badge.js +6 -7
  79. package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  80. package/modern/ButtonBase/TouchRipple.js +1 -2
  81. package/modern/FilledInput/FilledInput.js +4 -1
  82. package/modern/FormControlLabel/FormControlLabel.js +14 -4
  83. package/modern/FormControlLabel/formControlLabelClasses.js +1 -1
  84. package/modern/FormGroup/FormGroup.js +14 -3
  85. package/modern/FormGroup/formGroupClasses.js +1 -1
  86. package/modern/FormHelperText/FormHelperText.js +7 -9
  87. package/modern/Grid/Grid.js +2 -4
  88. package/modern/Input/Input.js +4 -1
  89. package/modern/InputAdornment/InputAdornment.js +6 -9
  90. package/modern/InputBase/InputBase.js +4 -1
  91. package/modern/InputLabel/InputLabel.js +4 -0
  92. package/modern/ListItem/ListItem.js +3 -1
  93. package/modern/Modal/Modal.js +3 -1
  94. package/modern/OutlinedInput/NotchedOutline.js +14 -16
  95. package/modern/OutlinedInput/OutlinedInput.js +1 -1
  96. package/modern/Radio/RadioButtonIcon.js +2 -6
  97. package/modern/Select/Select.js +10 -1
  98. package/modern/Select/SelectInput.js +32 -13
  99. package/modern/Slider/Slider.js +126 -53
  100. package/modern/StepLabel/StepLabel.js +3 -1
  101. package/modern/SvgIcon/SvgIcon.js +8 -8
  102. package/modern/SwipeableDrawer/SwipeArea.js +1 -3
  103. package/modern/TextField/TextField.js +2 -1
  104. package/modern/Tooltip/Tooltip.js +6 -1
  105. package/modern/index.js +6 -3
  106. package/modern/internal/SwitchBase.js +2 -6
  107. package/modern/useMediaQuery/useMediaQuery.js +68 -26
  108. package/modern/utils/shouldSpreadAdditionalProps.js +7 -0
  109. package/node/Autocomplete/Autocomplete.js +22 -10
  110. package/node/Backdrop/Backdrop.js +3 -1
  111. package/node/Badge/Badge.js +8 -8
  112. package/node/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
  113. package/node/ButtonBase/TouchRipple.js +1 -2
  114. package/node/FilledInput/FilledInput.js +4 -1
  115. package/node/FormControlLabel/FormControlLabel.js +15 -4
  116. package/node/FormControlLabel/formControlLabelClasses.js +1 -1
  117. package/node/FormGroup/FormGroup.js +15 -3
  118. package/node/FormGroup/formGroupClasses.js +1 -1
  119. package/node/FormHelperText/FormHelperText.js +6 -9
  120. package/node/Grid/Grid.js +2 -4
  121. package/node/Input/Input.js +4 -1
  122. package/node/InputAdornment/InputAdornment.js +5 -9
  123. package/node/InputBase/InputBase.js +4 -1
  124. package/node/InputLabel/InputLabel.js +4 -0
  125. package/node/ListItem/ListItem.js +3 -1
  126. package/node/Modal/Modal.js +3 -1
  127. package/node/OutlinedInput/NotchedOutline.js +12 -16
  128. package/node/OutlinedInput/OutlinedInput.js +1 -1
  129. package/node/Radio/RadioButtonIcon.js +2 -6
  130. package/node/Select/Select.js +10 -1
  131. package/node/Select/SelectInput.js +31 -13
  132. package/node/Slider/Slider.js +112 -45
  133. package/node/StepLabel/StepLabel.js +3 -1
  134. package/node/SvgIcon/SvgIcon.js +9 -9
  135. package/node/SwipeableDrawer/SwipeArea.js +1 -3
  136. package/node/TextField/TextField.js +2 -1
  137. package/node/Tooltip/Tooltip.js +6 -1
  138. package/node/index.js +41 -16
  139. package/node/internal/SwitchBase.js +2 -6
  140. package/node/useMediaQuery/useMediaQuery.js +68 -26
  141. package/node/utils/shouldSpreadAdditionalProps.js +15 -0
  142. package/package.json +7 -7
  143. package/styles/ThemeProvider.d.ts +1 -1
  144. package/styles/components.d.ts +452 -113
  145. package/styles/createTheme.d.ts +12 -6
  146. package/styles/overrides.d.ts +16 -4
  147. package/styles/useThemeProps.d.ts +2 -1
  148. package/umd/material-ui.development.js +2988 -4926
  149. package/umd/material-ui.production.min.js +21 -21
  150. package/useMediaQuery/useMediaQuery.d.ts +4 -0
  151. package/useMediaQuery/useMediaQuery.js +68 -26
  152. package/utils/shouldSpreadAdditionalProps.js +7 -0
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
 
4
4
  var _ClearIcon, _ArrowDropDownIcon;
5
5
 
6
- const _excluded = ["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"];
6
+ const _excluded = ["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"];
7
7
  import * as React from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import clsx from 'clsx';
@@ -398,6 +398,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
398
398
  PaperComponent = Paper,
399
399
  PopperComponent = Popper,
400
400
  popupIcon = _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/_jsx(ArrowDropDownIcon, {})),
401
+ readOnly = false,
401
402
  renderGroup: renderGroupProp,
402
403
  renderInput,
403
404
  renderOption: renderOptionProp,
@@ -431,7 +432,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
431
432
  } = useAutocomplete(_extends({}, props, {
432
433
  componentName: 'Autocomplete'
433
434
  }));
434
- const hasClearIcon = !disableClearable && !disabled && dirty;
435
+ const hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
435
436
  const hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
436
437
 
437
438
  const ownerState = _extends({}, props, {
@@ -550,7 +551,8 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
550
551
  },
551
552
  inputProps: _extends({
552
553
  className: clsx(classes.input),
553
- disabled
554
+ disabled,
555
+ readOnly
554
556
  }, getInputProps())
555
557
  })
556
558
  })), popupOpen && anchorEl ? /*#__PURE__*/_jsx(AutocompletePopper, {
@@ -564,10 +566,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
564
566
  role: "presentation",
565
567
  anchorEl: anchorEl,
566
568
  open: true,
567
- children: /*#__PURE__*/_jsxs(AutocompletePaper, {
568
- as: PaperComponent,
569
- className: classes.paper,
569
+ children: /*#__PURE__*/_jsxs(AutocompletePaper, _extends({
570
570
  ownerState: ownerState,
571
+ as: PaperComponent
572
+ }, componentsProps.paper, {
573
+ className: clsx(classes.paper, componentsProps.paper?.className),
571
574
  children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
572
575
  className: classes.loading,
573
576
  ownerState: ownerState,
@@ -598,7 +601,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
598
601
  return renderListOption(option, index);
599
602
  })
600
603
  })) : null]
601
- })
604
+ }))
602
605
  }) : null]
603
606
  });
604
607
  });
@@ -668,7 +671,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
668
671
  * If `true`, the input's text is cleared on blur if no value is selected.
669
672
  *
670
673
  * Set to `true` if you want to help the user enter a new value.
671
- * Set to `false` if you want to help the user resume his search.
674
+ * Set to `false` if you want to help the user resume their search.
672
675
  * @default !props.freeSolo
673
676
  */
674
677
  clearOnBlur: PropTypes.bool,
@@ -699,7 +702,10 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
699
702
  * The props used for each slot inside.
700
703
  * @default {}
701
704
  */
702
- componentsProps: PropTypes.object,
705
+ componentsProps: PropTypes.shape({
706
+ clearIndicator: PropTypes.object,
707
+ paper: PropTypes.object
708
+ }),
703
709
 
704
710
  /**
705
711
  * The default value. Use when the component is not controlled.
@@ -987,6 +993,12 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
987
993
  */
988
994
  popupIcon: PropTypes.node,
989
995
 
996
+ /**
997
+ * If `true`, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.
998
+ * @default false
999
+ */
1000
+ readOnly: PropTypes.bool,
1001
+
990
1002
  /**
991
1003
  * Render the group.
992
1004
  *
@@ -124,7 +124,9 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
124
124
  * The props used for each slot inside the Backdrop.
125
125
  * @default {}
126
126
  */
127
- componentsProps: PropTypes.object,
127
+ componentsProps: PropTypes.shape({
128
+ root: PropTypes.object
129
+ }),
128
130
 
129
131
  /**
130
132
  * If `true`, the backdrop is invisible.
@@ -5,10 +5,11 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
7
  import { usePreviousProps } from '@mui/utils';
8
- import { generateUtilityClasses, isHostComponent } from '@mui/base';
8
+ import { generateUtilityClasses } from '@mui/base';
9
9
  import BadgeUnstyled, { badgeUnstyledClasses, getBadgeUtilityClass } from '@mui/base/BadgeUnstyled';
10
10
  import styled from '../styles/styled';
11
11
  import useThemeProps from '../styles/useThemeProps';
12
+ import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
12
13
  import capitalize from '../utils/capitalize';
13
14
  import { jsx as _jsx } from "react/jsx-runtime";
14
15
  export const badgeClasses = _extends({}, badgeUnstyledClasses, generateUtilityClasses('MuiBadge', ['colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'overlapRectangular', 'overlapCircular', // TODO: v6 remove the overlap value from these class keys
@@ -152,11 +153,6 @@ const BadgeBadge = styled('span', {
152
153
  duration: theme.transitions.duration.leavingScreen
153
154
  })
154
155
  }));
155
-
156
- const shouldSpreadAdditionalProps = Slot => {
157
- return !Slot || !isHostComponent(Slot);
158
- };
159
-
160
156
  const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
161
157
  const props = useThemeProps({
162
158
  props: inProps,
@@ -298,7 +294,10 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
298
294
  * The props used for each slot inside the Badge.
299
295
  * @default {}
300
296
  */
301
- componentsProps: PropTypes.object,
297
+ componentsProps: PropTypes.shape({
298
+ badge: PropTypes.object,
299
+ root: PropTypes.object
300
+ }),
302
301
 
303
302
  /**
304
303
  * If `true`, the badge is invisible.
@@ -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
- const BreadcrumbCollapsedButton = styled(ButtonBase, {
10
- skipSx: true
11
- })(({
9
+ const BreadcrumbCollapsedButton = styled(ButtonBase)(({
12
10
  theme
13
11
  }) => _extends({
14
12
  display: 'flex',
@@ -48,8 +48,7 @@ const pulsateKeyframe = keyframes`
48
48
  `;
49
49
  export const TouchRippleRoot = styled('span', {
50
50
  name: 'MuiTouchRipple',
51
- slot: 'Root',
52
- skipSx: true
51
+ slot: 'Root'
53
52
  })({
54
53
  overflow: 'hidden',
55
54
  pointerEvents: 'none',
@@ -257,7 +257,10 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes
257
257
  * The props used for each slot inside the Input.
258
258
  * @default {}
259
259
  */
260
- componentsProps: PropTypes.object,
260
+ componentsProps: PropTypes.shape({
261
+ input: PropTypes.object,
262
+ root: PropTypes.object
263
+ }),
261
264
 
262
265
  /**
263
266
  * The default value. Use when the component is not controlled.
@@ -12,6 +12,7 @@ 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
 
@@ -19,10 +20,11 @@ const useUtilityClasses = ownerState => {
19
20
  const {
20
21
  classes,
21
22
  disabled,
22
- labelPlacement
23
+ labelPlacement,
24
+ error
23
25
  } = ownerState;
24
26
  const slots = {
25
- root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}`],
27
+ root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}`, error && 'error'],
26
28
  label: ['label', disabled && 'disabled']
27
29
  };
28
30
  return composeClasses(slots, getFormControlLabelUtilityClasses, classes);
@@ -114,11 +116,17 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
114
116
  controlProps[key] = props[key];
115
117
  }
116
118
  });
119
+ const fcs = formControlState({
120
+ props,
121
+ muiFormControl,
122
+ states: ['error']
123
+ });
117
124
 
118
125
  const ownerState = _extends({}, props, {
119
126
  disabled,
120
127
  label,
121
- labelPlacement
128
+ labelPlacement,
129
+ error: fcs.error
122
130
  });
123
131
 
124
132
  const classes = useUtilityClasses(ownerState);
@@ -162,7 +170,9 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes
162
170
  * The props used for each slot inside.
163
171
  * @default {}
164
172
  */
165
- componentsProps: PropTypes.object,
173
+ componentsProps: PropTypes.shape({
174
+ typography: PropTypes.object
175
+ }),
166
176
 
167
177
  /**
168
178
  * A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.
@@ -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
- const formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label']);
5
+ const formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error']);
6
6
  export default formControlLabelClasses;
@@ -8,15 +8,18 @@ import { unstable_composeClasses as composeClasses } from '@mui/base';
8
8
  import styled from '../styles/styled';
9
9
  import useThemeProps from '../styles/useThemeProps';
10
10
  import { getFormGroupUtilityClass } from './formGroupClasses';
11
+ import useFormControl from '../FormControl/useFormControl';
12
+ import formControlState from '../FormControl/formControlState';
11
13
  import { jsx as _jsx } from "react/jsx-runtime";
12
14
 
13
15
  const useUtilityClasses = ownerState => {
14
16
  const {
15
17
  classes,
16
- row
18
+ row,
19
+ error
17
20
  } = ownerState;
18
21
  const slots = {
19
- root: ['root', row && 'row']
22
+ root: ['root', row && 'row', error && 'error']
20
23
  };
21
24
  return composeClasses(slots, getFormGroupUtilityClass, classes);
22
25
  };
@@ -57,8 +60,16 @@ const FormGroup = /*#__PURE__*/React.forwardRef(function FormGroup(inProps, ref)
57
60
  } = props,
58
61
  other = _objectWithoutPropertiesLoose(props, _excluded);
59
62
 
63
+ const muiFormControl = useFormControl();
64
+ const fcs = formControlState({
65
+ props,
66
+ muiFormControl,
67
+ states: ['error']
68
+ });
69
+
60
70
  const ownerState = _extends({}, props, {
61
- row
71
+ row,
72
+ error: fcs.error
62
73
  });
63
74
 
64
75
  const 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
- const formGroupClasses = generateUtilityClasses('MuiFormGroup', ['root', 'row']);
5
+ const formGroupClasses = generateUtilityClasses('MuiFormGroup', ['root', 'row', 'error']);
6
6
  export default formGroupClasses;
@@ -1,5 +1,8 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
+
4
+ var _span;
5
+
3
6
  const _excluded = ["children", "className", "component", "disabled", "error", "filled", "focused", "margin", "required", "variant"];
4
7
  import * as React from 'react';
5
8
  import PropTypes from 'prop-types';
@@ -101,16 +104,11 @@ const FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inP
101
104
  className: clsx(classes.root, className),
102
105
  ref: ref
103
106
  }, other, {
104
- children: children === ' ' ?
105
- /*#__PURE__*/
106
- // notranslate needed while Google Translate will not fix zero-width space issue
107
- // eslint-disable-next-line react/no-danger
108
- _jsx("span", {
107
+ children: children === ' ' ? // notranslate needed while Google Translate will not fix zero-width space issue
108
+ _span || (_span = /*#__PURE__*/_jsx("span", {
109
109
  className: "notranslate",
110
- dangerouslySetInnerHTML: {
111
- __html: '​'
112
- }
113
- }) : children
110
+ children: "\u200B"
111
+ })) : children
114
112
  }));
115
113
  });
116
114
  process.env.NODE_ENV !== "production" ? FormHelperText.propTypes
@@ -260,10 +260,8 @@ const GridRoot = styled('div', {
260
260
 
261
261
  }, ownerState.zeroMinWidth && {
262
262
  minWidth: 0
263
- }, ownerState.wrap === 'nowrap' && {
264
- flexWrap: 'nowrap'
265
- }, ownerState.wrap === 'reverse' && {
266
- flexWrap: 'wrap-reverse'
263
+ }, ownerState.wrap !== 'wrap' && {
264
+ flexWrap: ownerState.wrap
267
265
  }), generateDirection, generateRowGap, generateColumnGap, generateGrid);
268
266
 
269
267
  const useUtilityClasses = ownerState => {
@@ -192,7 +192,10 @@ process.env.NODE_ENV !== "production" ? Input.propTypes
192
192
  * The props used for each slot inside the Input.
193
193
  * @default {}
194
194
  */
195
- componentsProps: PropTypes.object,
195
+ componentsProps: PropTypes.shape({
196
+ input: PropTypes.object,
197
+ root: PropTypes.object
198
+ }),
196
199
 
197
200
  /**
198
201
  * The default value. Use when the component is not controlled.
@@ -1,5 +1,8 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
+
4
+ var _span;
5
+
3
6
  const _excluded = ["children", "className", "component", "disablePointerEvents", "disableTypography", "position", "variant"];
4
7
  import * as React from 'react';
5
8
  import PropTypes from 'prop-types';
@@ -121,17 +124,11 @@ const InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inP
121
124
  children: children
122
125
  }) : /*#__PURE__*/_jsxs(React.Fragment, {
123
126
  children: [position === 'start' ?
124
- /*#__PURE__*/
125
-
126
127
  /* notranslate needed while Google Translate will not fix zero-width space issue */
127
-
128
- /* eslint-disable-next-line react/no-danger */
129
- _jsx("span", {
128
+ _span || (_span = /*#__PURE__*/_jsx("span", {
130
129
  className: "notranslate",
131
- dangerouslySetInnerHTML: {
132
- __html: '​'
133
- }
134
- }) : null, children]
130
+ children: "\u200B"
131
+ })) : null, children]
135
132
  })
136
133
  }))
137
134
  });
@@ -552,7 +552,10 @@ process.env.NODE_ENV !== "production" ? InputBase.propTypes
552
552
  * The props used for each slot inside the Input.
553
553
  * @default {}
554
554
  */
555
- componentsProps: PropTypes.object,
555
+ componentsProps: PropTypes.shape({
556
+ input: PropTypes.object,
557
+ root: PropTypes.object
558
+ }),
556
559
 
557
560
  /**
558
561
  * The default value. Use when the component is not controlled.
@@ -82,6 +82,8 @@ const InputLabelRoot = styled(FormLabel, {
82
82
  }, ownerState.size === 'small' && {
83
83
  transform: 'translate(12px, 13px) scale(1)'
84
84
  }, ownerState.shrink && _extends({
85
+ userSelect: 'none',
86
+ pointerEvents: 'auto',
85
87
  transform: 'translate(12px, 7px) scale(0.75)',
86
88
  maxWidth: 'calc(133% - 24px)'
87
89
  }, ownerState.size === 'small' && {
@@ -95,6 +97,8 @@ const InputLabelRoot = styled(FormLabel, {
95
97
  }, ownerState.size === 'small' && {
96
98
  transform: 'translate(14px, 9px) scale(1)'
97
99
  }, ownerState.shrink && {
100
+ userSelect: 'none',
101
+ pointerEvents: 'auto',
98
102
  maxWidth: 'calc(133% - 24px)',
99
103
  transform: 'translate(14px, -9px) scale(0.75)'
100
104
  })));
@@ -346,7 +346,9 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes
346
346
  * The props used for each slot inside the Input.
347
347
  * @default {}
348
348
  */
349
- componentsProps: PropTypes.object,
349
+ componentsProps: PropTypes.shape({
350
+ root: PropTypes.object
351
+ }),
350
352
 
351
353
  /**
352
354
  * The container component used when a `ListItemSecondaryAction` is the last child.
@@ -177,7 +177,9 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
177
177
  * The props used for each slot inside the Modal.
178
178
  * @default {}
179
179
  */
180
- componentsProps: PropTypes.object,
180
+ componentsProps: PropTypes.shape({
181
+ root: PropTypes.object
182
+ }),
181
183
 
182
184
  /**
183
185
  * An HTML element or function that returns one.
@@ -1,5 +1,8 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
+
4
+ var _span;
5
+
3
6
  const _excluded = ["children", "classes", "className", "label", "notched"];
4
7
  import * as React from 'react';
5
8
  import PropTypes from 'prop-types';
@@ -21,14 +24,12 @@ const NotchedOutlineRoot = styled('fieldset')({
21
24
  overflow: 'hidden',
22
25
  minWidth: '0%'
23
26
  });
24
- const NotchedOutlineLegend = styled('legend', {
25
- skipSx: true
26
- })(({
27
+ const NotchedOutlineLegend = styled('legend')(({
27
28
  ownerState,
28
29
  theme
29
30
  }) => _extends({
30
31
  float: 'unset'
31
- }, ownerState.label === undefined && {
32
+ }, !ownerState.withLabel && {
32
33
  padding: 0,
33
34
  lineHeight: '11px',
34
35
  // sync with `height` in `legend` styles
@@ -36,7 +37,7 @@ const NotchedOutlineLegend = styled('legend', {
36
37
  duration: 150,
37
38
  easing: theme.transitions.easing.easeOut
38
39
  })
39
- }, ownerState.label !== undefined && _extends({
40
+ }, ownerState.withLabel && _extends({
40
41
  display: 'block',
41
42
  // Fix conflict with normalize.css and sanitize.css
42
43
  width: 'auto',
@@ -77,9 +78,11 @@ export default function NotchedOutline(props) {
77
78
  } = props,
78
79
  other = _objectWithoutPropertiesLoose(props, _excluded);
79
80
 
81
+ const withLabel = label != null && label !== '';
82
+
80
83
  const ownerState = _extends({}, props, {
81
84
  notched,
82
- label
85
+ 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: '​'
102
- }
103
- })
100
+ children: "\u200B"
101
+ }))
104
102
  })
105
103
  }));
106
104
  }
@@ -136,7 +136,7 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
136
136
  }, components),
137
137
  renderSuffix: state => /*#__PURE__*/_jsx(NotchedOutlineRoot, {
138
138
  className: classes.notchedOutline,
139
- label: label && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
139
+ label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
140
140
  children: [label, "\xA0", '*']
141
141
  })) : label,
142
142
  notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)
@@ -10,15 +10,11 @@ const RadioButtonIconRoot = styled('span')({
10
10
  position: 'relative',
11
11
  display: 'flex'
12
12
  });
13
- const RadioButtonIconBackground = styled(RadioButtonUncheckedIcon, {
14
- skipSx: true
15
- })({
13
+ const RadioButtonIconBackground = styled(RadioButtonUncheckedIcon)({
16
14
  // Scale applied to prevent dot misalignment in Safari
17
15
  transform: 'scale(1)'
18
16
  });
19
- const RadioButtonIconDot = styled(RadioButtonCheckedIcon, {
20
- skipSx: true
21
- })(({
17
+ const RadioButtonIconDot = styled(RadioButtonCheckedIcon)(({
22
18
  theme,
23
19
  ownerState
24
20
  }) => _extends({
@@ -3,7 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
 
4
4
  var _Input, _FilledInput;
5
5
 
6
- const _excluded = ["autoWidth", "children", "classes", "className", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"];
6
+ const _excluded = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"];
7
7
  import * as React from 'react';
8
8
  import PropTypes from 'prop-types';
9
9
  import clsx from 'clsx';
@@ -38,6 +38,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
38
38
  children,
39
39
  classes: classesProp = {},
40
40
  className,
41
+ defaultOpen = false,
41
42
  displayEmpty = false,
42
43
  IconComponent = ArrowDropDownIcon,
43
44
  id,
@@ -94,6 +95,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
94
95
  id
95
96
  } : {
96
97
  autoWidth,
98
+ defaultOpen,
97
99
  displayEmpty,
98
100
  labelId,
99
101
  MenuProps,
@@ -148,6 +150,13 @@ process.env.NODE_ENV !== "production" ? Select.propTypes
148
150
  */
149
151
  className: PropTypes.string,
150
152
 
153
+ /**
154
+ * If `true`, the component is initially open. Use when the component open state is not controlled (i.e. the `open` prop is not defined).
155
+ * You can only use it when the `native` prop is `false` (default).
156
+ * @default false
157
+ */
158
+ defaultOpen: PropTypes.bool,
159
+
151
160
  /**
152
161
  * The default value. Use when the component is not controlled.
153
162
  */