@mui/material 5.2.6 → 5.3.1

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 (98) hide show
  1. package/Autocomplete/Autocomplete.d.ts +2 -0
  2. package/Autocomplete/Autocomplete.js +11 -7
  3. package/Avatar/Avatar.d.ts +3 -1
  4. package/Backdrop/Backdrop.js +3 -1
  5. package/Badge/Badge.d.ts +10 -10
  6. package/Badge/Badge.js +6 -7
  7. package/Button/buttonClasses.d.ts +1 -1
  8. package/CHANGELOG.md +240 -33
  9. package/FilledInput/FilledInput.js +4 -1
  10. package/FormControlLabel/FormControlLabel.js +3 -1
  11. package/Input/Input.js +4 -1
  12. package/InputBase/InputBase.js +4 -1
  13. package/InputLabel/InputLabel.js +4 -0
  14. package/ListItem/ListItem.js +3 -1
  15. package/Modal/Modal.js +3 -1
  16. package/README.md +5 -4
  17. package/Select/Select.d.ts +9 -1
  18. package/Select/Select.js +10 -1
  19. package/Select/SelectInput.d.ts +1 -0
  20. package/Select/SelectInput.js +25 -4
  21. package/Slider/Slider.d.ts +2 -0
  22. package/Slider/Slider.js +126 -53
  23. package/StepLabel/StepLabel.js +3 -1
  24. package/SvgIcon/SvgIcon.d.ts +8 -0
  25. package/SvgIcon/SvgIcon.js +28 -12
  26. package/TextField/TextField.d.ts +1 -0
  27. package/TextField/TextField.js +1 -0
  28. package/Tooltip/Tooltip.js +6 -1
  29. package/index.js +1 -1
  30. package/legacy/Autocomplete/Autocomplete.js +11 -7
  31. package/legacy/Backdrop/Backdrop.js +3 -1
  32. package/legacy/Badge/Badge.js +6 -7
  33. package/legacy/FilledInput/FilledInput.js +4 -1
  34. package/legacy/FormControlLabel/FormControlLabel.js +3 -1
  35. package/legacy/Input/Input.js +4 -1
  36. package/legacy/InputBase/InputBase.js +4 -1
  37. package/legacy/InputLabel/InputLabel.js +4 -0
  38. package/legacy/ListItem/ListItem.js +3 -1
  39. package/legacy/Modal/Modal.js +3 -1
  40. package/legacy/Select/Select.js +11 -1
  41. package/legacy/Select/SelectInput.js +29 -7
  42. package/legacy/Slider/Slider.js +127 -54
  43. package/legacy/StepLabel/StepLabel.js +3 -1
  44. package/legacy/SvgIcon/SvgIcon.js +29 -12
  45. package/legacy/TextField/TextField.js +1 -0
  46. package/legacy/Tooltip/Tooltip.js +6 -1
  47. package/legacy/index.js +1 -1
  48. package/legacy/locale/index.js +139 -128
  49. package/legacy/utils/shouldSpreadAdditionalProps.js +7 -0
  50. package/locale/index.js +54 -44
  51. package/modern/Autocomplete/Autocomplete.js +10 -6
  52. package/modern/Backdrop/Backdrop.js +3 -1
  53. package/modern/Badge/Badge.js +6 -7
  54. package/modern/FilledInput/FilledInput.js +4 -1
  55. package/modern/FormControlLabel/FormControlLabel.js +3 -1
  56. package/modern/Input/Input.js +4 -1
  57. package/modern/InputBase/InputBase.js +4 -1
  58. package/modern/InputLabel/InputLabel.js +4 -0
  59. package/modern/ListItem/ListItem.js +3 -1
  60. package/modern/Modal/Modal.js +3 -1
  61. package/modern/Select/Select.js +10 -1
  62. package/modern/Select/SelectInput.js +25 -4
  63. package/modern/Slider/Slider.js +126 -53
  64. package/modern/StepLabel/StepLabel.js +3 -1
  65. package/modern/SvgIcon/SvgIcon.js +27 -11
  66. package/modern/TextField/TextField.js +1 -0
  67. package/modern/Tooltip/Tooltip.js +6 -1
  68. package/modern/index.js +1 -1
  69. package/modern/locale/index.js +54 -44
  70. package/modern/utils/shouldSpreadAdditionalProps.js +7 -0
  71. package/node/Autocomplete/Autocomplete.js +11 -7
  72. package/node/Backdrop/Backdrop.js +3 -1
  73. package/node/Badge/Badge.js +8 -8
  74. package/node/FilledInput/FilledInput.js +4 -1
  75. package/node/FormControlLabel/FormControlLabel.js +3 -1
  76. package/node/Input/Input.js +4 -1
  77. package/node/InputBase/InputBase.js +4 -1
  78. package/node/InputLabel/InputLabel.js +4 -0
  79. package/node/ListItem/ListItem.js +3 -1
  80. package/node/Modal/Modal.js +3 -1
  81. package/node/Select/Select.js +10 -1
  82. package/node/Select/SelectInput.js +25 -4
  83. package/node/Slider/Slider.js +112 -45
  84. package/node/StepLabel/StepLabel.js +3 -1
  85. package/node/SvgIcon/SvgIcon.js +28 -12
  86. package/node/TextField/TextField.js +1 -0
  87. package/node/Tooltip/Tooltip.js +6 -1
  88. package/node/index.js +1 -1
  89. package/node/locale/index.js +54 -44
  90. package/node/utils/shouldSpreadAdditionalProps.js +15 -0
  91. package/package.json +7 -7
  92. package/styles/components.d.ts +452 -113
  93. package/styles/createTheme.d.ts +12 -6
  94. package/styles/overrides.d.ts +16 -4
  95. package/styles/useThemeProps.d.ts +2 -1
  96. package/umd/material-ui.development.js +619 -289
  97. package/umd/material-ui.production.min.js +21 -21
  98. package/utils/shouldSpreadAdditionalProps.js +7 -0
package/locale/index.js CHANGED
@@ -1206,9 +1206,12 @@ export const fiFI = {
1206
1206
 
1207
1207
  return 'Mene edelliselle sivulle';
1208
1208
  },
1209
- labelRowsPerPage: 'Rivejä per sivu:' // labelDisplayedRows: ({ from, to, count }) =>
1210
- // `${from}–${to} / ${count !== -1 ? count : `more than ${to}`}`,
1211
-
1209
+ labelRowsPerPage: 'Rivejä per sivu:',
1210
+ labelDisplayedRows: ({
1211
+ from,
1212
+ to,
1213
+ count
1214
+ }) => `${from}–${to} / ${count !== -1 ? count : `enemmän kuin ${to}`}`
1212
1215
  }
1213
1216
  },
1214
1217
  MuiRating: {
@@ -3266,26 +3269,29 @@ export const ukUA = {
3266
3269
  };
3267
3270
  export const viVN = {
3268
3271
  components: {
3269
- // MuiBreadcrumbs: {
3270
- // defaultProps: {
3271
- // expandText: 'Show path',
3272
- // },
3273
- // },
3272
+ MuiBreadcrumbs: {
3273
+ defaultProps: {
3274
+ expandText: 'Mở ra'
3275
+ }
3276
+ },
3274
3277
  MuiTablePagination: {
3275
3278
  defaultProps: {
3276
- // getItemAriaLabel: (type) => {
3277
- // if (type === 'first') {
3278
- // return 'Go to first page';
3279
- // }
3280
- // if (type === 'last') {
3281
- // return 'Go to last page';
3282
- // }
3283
- // if (type === 'next') {
3284
- // return 'Go to next page';
3285
- // }
3286
- // // if (type === 'previous') {
3287
- // return 'Go to previous page';
3288
- // },
3279
+ getItemAriaLabel: type => {
3280
+ if (type === 'first') {
3281
+ return 'Tới trang đầu tiên';
3282
+ }
3283
+
3284
+ if (type === 'last') {
3285
+ return 'Tới trang cuối cùng';
3286
+ }
3287
+
3288
+ if (type === 'next') {
3289
+ return 'Tới trang tiếp theo';
3290
+ } // if (type === 'previous') {
3291
+
3292
+
3293
+ return 'Về trang trước đó';
3294
+ },
3289
3295
  labelRowsPerPage: 'Số hàng mỗi trang:',
3290
3296
  labelDisplayedRows: ({
3291
3297
  from,
@@ -3297,7 +3303,7 @@ export const viVN = {
3297
3303
  MuiRating: {
3298
3304
  defaultProps: {
3299
3305
  getLabelText: value => `${value} sao`,
3300
- emptyLabelText: 'Trống'
3306
+ emptyLabelText: 'Không có dữ liệu'
3301
3307
  }
3302
3308
  },
3303
3309
  MuiAutocomplete: {
@@ -3305,7 +3311,7 @@ export const viVN = {
3305
3311
  clearText: 'Xóa',
3306
3312
  closeText: 'Đóng',
3307
3313
  loadingText: 'Đang tải…',
3308
- noOptionsText: 'Không có lựa chọn',
3314
+ noOptionsText: 'Không có lựa chọn nào',
3309
3315
  openText: 'Mở'
3310
3316
  }
3311
3317
  },
@@ -3313,28 +3319,32 @@ export const viVN = {
3313
3319
  defaultProps: {
3314
3320
  closeText: 'Đóng'
3315
3321
  }
3316
- } // MuiPagination: {
3317
- // defaultProps: {
3318
- // 'aria-label': 'Pagination navigation',
3319
- // getItemAriaLabel: (type, page, selected) => {
3320
- // if (type === 'page') {
3321
- // return `${selected ? '' : 'Go to '}page ${page}`;
3322
- // }
3323
- // if (type === 'first') {
3324
- // return 'Go to first page';
3325
- // }
3326
- // if (type === 'last') {
3327
- // return 'Go to last page';
3328
- // }
3329
- // if (type === 'next') {
3330
- // return 'Go to next page';
3331
- // }
3332
- // // if (type === 'previous') {
3333
- // return 'Go to previous page';
3334
- // },
3335
- // },
3336
- // },
3322
+ },
3323
+ MuiPagination: {
3324
+ defaultProps: {
3325
+ 'aria-label': 'Thanh điều khiển trang',
3326
+ getItemAriaLabel: (type, page, selected) => {
3327
+ if (type === 'page') {
3328
+ return `${selected ? '' : 'Tới '}trang ${page}`;
3329
+ }
3330
+
3331
+ if (type === 'first') {
3332
+ return 'Tới trang đầu tiên';
3333
+ }
3337
3334
 
3335
+ if (type === 'last') {
3336
+ return 'Tới trang cuối cùng';
3337
+ }
3338
+
3339
+ if (type === 'next') {
3340
+ return 'Tới trang tiếp theo';
3341
+ } // if (type === 'previous') {
3342
+
3343
+
3344
+ return 'Về trang trước đó';
3345
+ }
3346
+ }
3347
+ }
3338
3348
  }
3339
3349
  };
3340
3350
  export const zhCN = {
@@ -564,10 +564,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
564
564
  role: "presentation",
565
565
  anchorEl: anchorEl,
566
566
  open: true,
567
- children: /*#__PURE__*/_jsxs(AutocompletePaper, {
568
- as: PaperComponent,
569
- className: classes.paper,
567
+ children: /*#__PURE__*/_jsxs(AutocompletePaper, _extends({
570
568
  ownerState: ownerState,
569
+ as: PaperComponent
570
+ }, componentsProps.paper, {
571
+ className: clsx(classes.paper, componentsProps.paper?.className),
571
572
  children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
572
573
  className: classes.loading,
573
574
  ownerState: ownerState,
@@ -598,7 +599,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
598
599
  return renderListOption(option, index);
599
600
  })
600
601
  })) : null]
601
- })
602
+ }))
602
603
  }) : null]
603
604
  });
604
605
  });
@@ -668,7 +669,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
668
669
  * If `true`, the input's text is cleared on blur if no value is selected.
669
670
  *
670
671
  * 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.
672
+ * Set to `false` if you want to help the user resume their search.
672
673
  * @default !props.freeSolo
673
674
  */
674
675
  clearOnBlur: PropTypes.bool,
@@ -699,7 +700,10 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
699
700
  * The props used for each slot inside.
700
701
  * @default {}
701
702
  */
702
- componentsProps: PropTypes.object,
703
+ componentsProps: PropTypes.shape({
704
+ clearIndicator: PropTypes.object,
705
+ paper: PropTypes.object
706
+ }),
703
707
 
704
708
  /**
705
709
  * The default value. Use when the component is not controlled.
@@ -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.
@@ -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.
@@ -162,7 +162,9 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes
162
162
  * The props used for each slot inside.
163
163
  * @default {}
164
164
  */
165
- componentsProps: PropTypes.object,
165
+ componentsProps: PropTypes.shape({
166
+ typography: PropTypes.object
167
+ }),
166
168
 
167
169
  /**
168
170
  * A control element. For instance, it can be a `Radio`, a `Switch` or a `Checkbox`.
@@ -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.
@@ -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.
@@ -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
  */
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
4
- const _excluded = ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultValue", "disabled", "displayEmpty", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"];
4
+ const _excluded = ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultOpen", "defaultValue", "disabled", "displayEmpty", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"];
5
5
  import * as React from 'react';
6
6
  import { isFragment } from 'react-is';
7
7
  import PropTypes from 'prop-types';
@@ -113,6 +113,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
113
113
  autoWidth,
114
114
  children,
115
115
  className,
116
+ defaultOpen,
116
117
  defaultValue,
117
118
  disabled,
118
119
  displayEmpty,
@@ -142,6 +143,11 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
142
143
  default: defaultValue,
143
144
  name: 'Select'
144
145
  });
146
+ const [openState, setOpenState] = useControlled({
147
+ controlled: openProp,
148
+ default: defaultOpen,
149
+ name: 'Select'
150
+ });
145
151
  const inputRef = React.useRef(null);
146
152
  const displayRef = React.useRef(null);
147
153
  const [displayNode, setDisplayNode] = React.useState(null);
@@ -149,7 +155,6 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
149
155
  current: isOpenControlled
150
156
  } = React.useRef(openProp != null);
151
157
  const [menuMinWidthState, setMenuMinWidthState] = React.useState();
152
- const [openState, setOpenState] = React.useState(false);
153
158
  const handleRef = useForkRef(ref, inputRefProp);
154
159
  const handleDisplayRef = React.useCallback(node => {
155
160
  displayRef.current = node;
@@ -164,7 +169,17 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
164
169
  },
165
170
  node: inputRef.current,
166
171
  value
167
- }), [value]);
172
+ }), [value]); // Resize menu on `defaultOpen` automatic toggle.
173
+
174
+ React.useEffect(() => {
175
+ if (defaultOpen && openState && displayNode && !isOpenControlled) {
176
+ setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);
177
+ displayRef.current.focus();
178
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
179
+
180
+ }, [displayNode, autoWidth]); // `isOpenControlled` is ignored because the component should never switch between controlled and uncontrolled modes.
181
+ // `defaultOpen` and `openState` are ignored to avoid unnecessary callbacks.
182
+
168
183
  React.useEffect(() => {
169
184
  if (autoFocus) {
170
185
  displayRef.current.focus();
@@ -300,7 +315,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
300
315
  }
301
316
  };
302
317
 
303
- const open = displayNode !== null && (isOpenControlled ? openProp : openState);
318
+ const open = displayNode !== null && openState;
304
319
 
305
320
  const handleBlur = event => {
306
321
  // if open event.stopImmediatePropagation
@@ -559,6 +574,12 @@ process.env.NODE_ENV !== "production" ? SelectInput.propTypes = {
559
574
  */
560
575
  className: PropTypes.string,
561
576
 
577
+ /**
578
+ * If `true`, the component is toggled on mount. Use when the component open state is not controlled.
579
+ * You can only use it when the `native` prop is `false` (default).
580
+ */
581
+ defaultOpen: PropTypes.bool,
582
+
562
583
  /**
563
584
  * The default value. Use when the component is not controlled.
564
585
  */