@mui/material 6.4.8 → 6.4.10

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 (197) hide show
  1. package/Accordion/Accordion.d.ts +3 -3
  2. package/AccordionActions/AccordionActions.d.ts +2 -2
  3. package/AccordionDetails/AccordionDetails.d.ts +2 -2
  4. package/AccordionSummary/AccordionSummary.d.ts +3 -3
  5. package/Alert/Alert.d.ts +3 -3
  6. package/AlertTitle/AlertTitle.d.ts +3 -3
  7. package/AppBar/AppBar.d.ts +3 -3
  8. package/Autocomplete/Autocomplete.d.ts +2 -2
  9. package/Autocomplete/Autocomplete.js +1 -1
  10. package/Avatar/Avatar.d.ts +2 -2
  11. package/AvatarGroup/AvatarGroup.d.ts +2 -2
  12. package/Backdrop/Backdrop.d.ts +3 -3
  13. package/Badge/Badge.d.ts +3 -3
  14. package/BottomNavigation/BottomNavigation.d.ts +2 -2
  15. package/BottomNavigationAction/BottomNavigationAction.d.ts +3 -3
  16. package/Box/Box.d.ts +2 -2
  17. package/Breadcrumbs/Breadcrumbs.d.ts +3 -3
  18. package/Button/Button.d.ts +4 -4
  19. package/ButtonBase/ButtonBase.d.ts +2 -2
  20. package/ButtonGroup/ButtonGroup.d.ts +2 -2
  21. package/CHANGELOG.md +54 -0
  22. package/Card/Card.d.ts +3 -3
  23. package/CardActionArea/CardActionArea.d.ts +3 -3
  24. package/CardActions/CardActions.d.ts +2 -2
  25. package/CardContent/CardContent.d.ts +2 -2
  26. package/CardHeader/CardHeader.d.ts +2 -2
  27. package/CardMedia/CardMedia.d.ts +2 -2
  28. package/Checkbox/Checkbox.d.ts +4 -4
  29. package/Chip/Chip.d.ts +2 -2
  30. package/CircularProgress/CircularProgress.d.ts +2 -2
  31. package/ClickAwayListener/ClickAwayListener.d.ts +3 -3
  32. package/ClickAwayListener/ClickAwayListener.js +3 -3
  33. package/Collapse/Collapse.d.ts +5 -5
  34. package/Container/Container.d.ts +2 -2
  35. package/CssBaseline/CssBaseline.d.ts +2 -2
  36. package/Dialog/Dialog.d.ts +3 -3
  37. package/DialogActions/DialogActions.d.ts +2 -2
  38. package/DialogContent/DialogContent.d.ts +2 -2
  39. package/DialogContentText/DialogContentText.d.ts +3 -3
  40. package/DialogTitle/DialogTitle.d.ts +3 -3
  41. package/Divider/Divider.d.ts +3 -3
  42. package/Drawer/Drawer.d.ts +3 -3
  43. package/Fab/Fab.d.ts +3 -3
  44. package/Fade/Fade.d.ts +3 -3
  45. package/FilledInput/FilledInput.d.ts +3 -3
  46. package/FormControl/FormControl.d.ts +6 -6
  47. package/FormControlLabel/FormControlLabel.d.ts +4 -4
  48. package/FormGroup/FormGroup.d.ts +3 -3
  49. package/FormHelperText/FormHelperText.d.ts +2 -2
  50. package/FormLabel/FormLabel.d.ts +4 -4
  51. package/GlobalStyles/GlobalStyles.d.ts +2 -2
  52. package/Grid/Grid.d.ts +2 -2
  53. package/Grid2/Grid2.d.ts +2 -2
  54. package/Grid2/Grid2.js +2 -2
  55. package/Grow/Grow.d.ts +5 -5
  56. package/Hidden/Hidden.d.ts +2 -2
  57. package/Icon/Icon.d.ts +3 -3
  58. package/IconButton/IconButton.d.ts +4 -4
  59. package/ImageList/ImageList.d.ts +2 -2
  60. package/ImageListItem/ImageListItem.d.ts +2 -2
  61. package/ImageListItemBar/ImageListItemBar.d.ts +2 -2
  62. package/Input/Input.d.ts +3 -3
  63. package/InputAdornment/InputAdornment.d.ts +2 -2
  64. package/InputBase/InputBase.d.ts +2 -2
  65. package/InputLabel/InputLabel.d.ts +3 -3
  66. package/LinearProgress/LinearProgress.d.ts +2 -2
  67. package/Link/Link.d.ts +4 -4
  68. package/List/List.d.ts +3 -3
  69. package/ListItem/ListItem.d.ts +3 -3
  70. package/ListItemAvatar/ListItemAvatar.d.ts +2 -2
  71. package/ListItemButton/ListItemButton.d.ts +3 -3
  72. package/ListItemIcon/ListItemIcon.d.ts +2 -2
  73. package/ListItemSecondaryAction/ListItemSecondaryAction.d.ts +2 -2
  74. package/ListItemText/ListItemText.d.ts +2 -2
  75. package/ListSubheader/ListSubheader.d.ts +2 -2
  76. package/Menu/Menu.d.ts +4 -4
  77. package/MenuItem/MenuItem.d.ts +3 -3
  78. package/MenuList/MenuList.d.ts +4 -4
  79. package/MobileStepper/MobileStepper.d.ts +3 -3
  80. package/Modal/Modal.d.ts +7 -7
  81. package/NativeSelect/NativeSelect.d.ts +3 -3
  82. package/NoSsr/NoSsr.d.ts +2 -2
  83. package/NoSsr/NoSsr.js +2 -2
  84. package/OutlinedInput/OutlinedInput.d.ts +3 -3
  85. package/Pagination/Pagination.d.ts +2 -2
  86. package/PaginationItem/PaginationItem.d.ts +2 -2
  87. package/Paper/Paper.d.ts +3 -3
  88. package/PigmentContainer/PigmentContainer.d.ts +2 -2
  89. package/PigmentContainer/PigmentContainer.js +2 -2
  90. package/PigmentGrid/PigmentGrid.d.ts +2 -2
  91. package/PigmentGrid/PigmentGrid.js +2 -2
  92. package/PigmentHidden/PigmentHidden.d.ts +2 -2
  93. package/PigmentHidden/PigmentHidden.js +2 -2
  94. package/PigmentStack/PigmentStack.d.ts +2 -2
  95. package/PigmentStack/PigmentStack.js +2 -2
  96. package/Popover/Popover.d.ts +5 -6
  97. package/Popover/Popover.js +1 -1
  98. package/Popper/Popper.d.ts +4 -4
  99. package/Popper/Popper.js +4 -4
  100. package/Portal/Portal.d.ts +2 -2
  101. package/Portal/Portal.js +2 -2
  102. package/README.md +4 -2
  103. package/Radio/Radio.d.ts +3 -3
  104. package/RadioGroup/RadioGroup.d.ts +3 -3
  105. package/Rating/Rating.d.ts +2 -2
  106. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +2 -2
  107. package/Select/Select.d.ts +3 -3
  108. package/Skeleton/Skeleton.d.ts +2 -2
  109. package/Slide/Slide.d.ts +4 -4
  110. package/Slider/Slider.d.ts +2 -2
  111. package/Snackbar/Snackbar.d.ts +2 -2
  112. package/SnackbarContent/SnackbarContent.d.ts +3 -3
  113. package/SpeedDial/SpeedDial.d.ts +2 -2
  114. package/SpeedDialAction/SpeedDialAction.d.ts +3 -3
  115. package/SpeedDialIcon/SpeedDialIcon.d.ts +2 -2
  116. package/Stack/Stack.d.ts +2 -2
  117. package/Step/Step.d.ts +2 -2
  118. package/StepButton/StepButton.d.ts +3 -3
  119. package/StepConnector/StepConnector.d.ts +2 -2
  120. package/StepContent/StepContent.d.ts +2 -2
  121. package/StepIcon/StepIcon.d.ts +3 -3
  122. package/StepLabel/StepLabel.d.ts +21 -3
  123. package/StepLabel/StepLabel.js +14 -5
  124. package/Stepper/Stepper.d.ts +2 -2
  125. package/SvgIcon/SvgIcon.d.ts +3 -3
  126. package/SwipeableDrawer/SwipeableDrawer.d.ts +3 -3
  127. package/Switch/Switch.d.ts +78 -5
  128. package/Switch/Switch.js +71 -9
  129. package/Tab/Tab.d.ts +3 -3
  130. package/TabScrollButton/TabScrollButton.d.ts +2 -2
  131. package/Table/Table.d.ts +2 -2
  132. package/TableBody/TableBody.d.ts +2 -2
  133. package/TableCell/TableCell.d.ts +2 -2
  134. package/TableContainer/TableContainer.d.ts +2 -2
  135. package/TableFooter/TableFooter.d.ts +2 -2
  136. package/TableHead/TableHead.d.ts +2 -2
  137. package/TablePagination/TablePagination.d.ts +4 -4
  138. package/TableRow/TableRow.d.ts +2 -2
  139. package/TableSortLabel/TableSortLabel.d.ts +3 -3
  140. package/Tabs/Tabs.d.ts +2 -2
  141. package/Tabs/Tabs.js +4 -0
  142. package/TextField/TextField.d.ts +40 -10
  143. package/TextField/TextField.js +22 -11
  144. package/TextareaAutosize/TextareaAutosize.d.ts +2 -2
  145. package/TextareaAutosize/TextareaAutosize.js +2 -2
  146. package/ToggleButton/ToggleButton.d.ts +3 -3
  147. package/ToggleButtonGroup/ToggleButtonGroup.d.ts +2 -2
  148. package/Toolbar/Toolbar.d.ts +2 -2
  149. package/Tooltip/Tooltip.d.ts +2 -2
  150. package/Typography/Typography.d.ts +3 -3
  151. package/Zoom/Zoom.d.ts +3 -3
  152. package/index.js +1 -1
  153. package/modern/Autocomplete/Autocomplete.js +1 -1
  154. package/modern/ClickAwayListener/ClickAwayListener.js +3 -3
  155. package/modern/Grid2/Grid2.js +2 -2
  156. package/modern/NoSsr/NoSsr.js +2 -2
  157. package/modern/PigmentContainer/PigmentContainer.js +2 -2
  158. package/modern/PigmentGrid/PigmentGrid.js +2 -2
  159. package/modern/PigmentHidden/PigmentHidden.js +2 -2
  160. package/modern/PigmentStack/PigmentStack.js +2 -2
  161. package/modern/Popover/Popover.js +1 -1
  162. package/modern/Popper/Popper.js +4 -4
  163. package/modern/Portal/Portal.js +2 -2
  164. package/modern/StepLabel/StepLabel.js +14 -5
  165. package/modern/Switch/Switch.js +71 -9
  166. package/modern/Tabs/Tabs.js +4 -0
  167. package/modern/TextField/TextField.js +22 -11
  168. package/modern/TextareaAutosize/TextareaAutosize.js +2 -2
  169. package/modern/index.js +1 -1
  170. package/modern/styles/createThemeNoVars.js +1 -3
  171. package/modern/useAutocomplete/useAutocomplete.js +5 -5
  172. package/modern/version/index.js +2 -2
  173. package/node/Autocomplete/Autocomplete.js +1 -1
  174. package/node/ClickAwayListener/ClickAwayListener.js +3 -3
  175. package/node/Grid2/Grid2.js +2 -2
  176. package/node/NoSsr/NoSsr.js +2 -2
  177. package/node/PigmentContainer/PigmentContainer.js +2 -2
  178. package/node/PigmentGrid/PigmentGrid.js +2 -2
  179. package/node/PigmentHidden/PigmentHidden.js +2 -2
  180. package/node/PigmentStack/PigmentStack.js +2 -2
  181. package/node/Popover/Popover.js +1 -1
  182. package/node/Popper/Popper.js +4 -4
  183. package/node/Portal/Portal.js +2 -2
  184. package/node/StepLabel/StepLabel.js +14 -5
  185. package/node/Switch/Switch.js +71 -9
  186. package/node/Tabs/Tabs.js +4 -0
  187. package/node/TextField/TextField.js +22 -11
  188. package/node/TextareaAutosize/TextareaAutosize.js +2 -2
  189. package/node/index.js +1 -1
  190. package/node/styles/createThemeNoVars.js +1 -3
  191. package/node/useAutocomplete/useAutocomplete.js +5 -5
  192. package/node/version/index.js +2 -2
  193. package/package.json +6 -6
  194. package/styles/createThemeNoVars.js +1 -3
  195. package/useAutocomplete/useAutocomplete.d.ts +2 -2
  196. package/useAutocomplete/useAutocomplete.js +5 -5
  197. package/version/index.js +2 -2
@@ -44,11 +44,11 @@ function isEmpty(obj) {
44
44
  *
45
45
  * Demos:
46
46
  *
47
- * - [Textarea Autosize](https://mui.com/material-ui/react-textarea-autosize/)
47
+ * - [Textarea Autosize](https://v6.mui.com/material-ui/react-textarea-autosize/)
48
48
  *
49
49
  * API:
50
50
  *
51
- * - [TextareaAutosize API](https://mui.com/material-ui/api/textarea-autosize/)
51
+ * - [TextareaAutosize API](https://v6.mui.com/material-ui/api/textarea-autosize/)
52
52
  */
53
53
  const TextareaAutosize = /*#__PURE__*/React.forwardRef(function TextareaAutosize(props, forwardedRef) {
54
54
  const {
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.8
2
+ * @mui/material v6.4.10
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -34,9 +34,7 @@ function createThemeNoVars(options = {}, ...args) {
34
34
  // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
35
35
  // `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
36
36
  options.generateThemeVars === undefined) {
37
- throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' +
38
- // #host-reference
39
- 'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : (0, _formatMuiErrorMessage2.default)(20));
37
+ throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' + 'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : (0, _formatMuiErrorMessage2.default)(20));
40
38
  }
41
39
  const palette = (0, _createPalette.default)(paletteInput);
42
40
  const systemTheme = (0, _createTheme.default)(options);
@@ -127,8 +127,8 @@ function useAutocomplete(props) {
127
127
  const highlightedIndexRef = React.useRef(defaultHighlighted);
128
128
 
129
129
  // Calculate the initial inputValue on mount only.
130
- // Using useRef since defaultValue doesn't need to update inputValue dynamically.
131
- const initialInputValue = React.useRef(getInputValue(defaultValue, multiple, getOptionLabel)).current;
130
+ // useRef ensures it doesn't update dynamically with defaultValue or value props.
131
+ const initialInputValue = React.useRef(getInputValue(defaultValue ?? valueProp, multiple, getOptionLabel)).current;
132
132
  const [value, setValueState] = (0, _utils.unstable_useControlled)({
133
133
  controlled: valueProp,
134
134
  default: defaultValue,
@@ -244,7 +244,7 @@ function useAutocomplete(props) {
244
244
  const setHighlightedIndex = (0, _utils.unstable_useEventCallback)(({
245
245
  event,
246
246
  index,
247
- reason = 'auto'
247
+ reason
248
248
  }) => {
249
249
  highlightedIndexRef.current = index;
250
250
 
@@ -254,7 +254,7 @@ function useAutocomplete(props) {
254
254
  } else {
255
255
  inputRef.current.setAttribute('aria-activedescendant', `${id}-option-${index}`);
256
256
  }
257
- if (onHighlightChange) {
257
+ if (onHighlightChange && ['mouse', 'keyboard', 'touch'].includes(reason)) {
258
258
  onHighlightChange(event, index === -1 ? null : filteredOptions[index], reason);
259
259
  }
260
260
  if (!listboxRef.current) {
@@ -307,7 +307,7 @@ function useAutocomplete(props) {
307
307
  event,
308
308
  diff,
309
309
  direction = 'next',
310
- reason = 'auto'
310
+ reason
311
311
  }) => {
312
312
  if (!popupOpen) {
313
313
  return;
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.version = exports.prerelease = exports.patch = exports.minor = exports.major = exports.default = void 0;
7
- const version = exports.version = "6.4.8";
7
+ const version = exports.version = "6.4.10";
8
8
  const major = exports.major = Number("6");
9
9
  const minor = exports.minor = Number("4");
10
- const patch = exports.patch = Number("8");
10
+ const patch = exports.patch = Number("10");
11
11
  const prerelease = exports.prerelease = undefined;
12
12
  var _default = exports.default = version;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "6.4.8",
3
+ "version": "6.4.10",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
@@ -35,10 +35,10 @@
35
35
  "prop-types": "^15.8.1",
36
36
  "react-is": "^19.0.0",
37
37
  "react-transition-group": "^4.4.5",
38
- "@mui/utils": "^6.4.8",
39
- "@mui/types": "~7.2.24",
40
- "@mui/system": "^6.4.8",
41
- "@mui/core-downloads-tracker": "^6.4.8"
38
+ "@mui/core-downloads-tracker": "^6.4.10",
39
+ "@mui/utils": "^6.4.9",
40
+ "@mui/system": "^6.4.10",
41
+ "@mui/types": "~7.2.24"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@emotion/react": "^11.5.0",
@@ -46,7 +46,7 @@
46
46
  "@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
47
47
  "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
48
48
  "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
49
- "@mui/material-pigment-css": "^6.4.8"
49
+ "@mui/material-pigment-css": "^6.4.10"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@types/react": {
@@ -25,9 +25,7 @@ function createThemeNoVars(options = {}, ...args) {
25
25
  // The error should throw only for the root theme creation because user is not allowed to use a custom node `vars`.
26
26
  // `generateThemeVars` is the closest identifier for checking that the `options` is a result of `createTheme` with CSS variables so that user can create new theme for nested ThemeProvider.
27
27
  options.generateThemeVars === undefined) {
28
- throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' +
29
- // #host-reference
30
- 'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatMuiErrorMessage(20));
28
+ throw new Error(process.env.NODE_ENV !== "production" ? 'MUI: `vars` is a private field used for CSS variables support.\n' + 'Please use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.' : _formatMuiErrorMessage(20));
31
29
  }
32
30
  const palette = createPalette(paletteInput);
33
31
  const systemTheme = systemCreateTheme(options);
@@ -246,7 +246,7 @@ export interface UseAutocompleteProps<
246
246
  *
247
247
  * @param {React.SyntheticEvent} event The event source of the callback.
248
248
  * @param {Value} option The highlighted option.
249
- * @param {string} reason Can be: `"keyboard"`, `"auto"`, `"mouse"`, `"touch"`.
249
+ * @param {string} reason Can be: `"keyboard"`, `"mouse"`, `"touch"`.
250
250
  */
251
251
  onHighlightChange?: (
252
252
  event: React.SyntheticEvent,
@@ -312,7 +312,7 @@ export interface UseAutocompleteParameters<
312
312
  FreeSolo extends boolean | undefined,
313
313
  > extends UseAutocompleteProps<Value, Multiple, DisableClearable, FreeSolo> {}
314
314
 
315
- export type AutocompleteHighlightChangeReason = 'keyboard' | 'mouse' | 'auto' | 'touch';
315
+ export type AutocompleteHighlightChangeReason = 'keyboard' | 'mouse' | 'touch';
316
316
 
317
317
  export type AutocompleteChangeReason =
318
318
  | 'createOption'
@@ -121,8 +121,8 @@ function useAutocomplete(props) {
121
121
  const highlightedIndexRef = React.useRef(defaultHighlighted);
122
122
 
123
123
  // Calculate the initial inputValue on mount only.
124
- // Using useRef since defaultValue doesn't need to update inputValue dynamically.
125
- const initialInputValue = React.useRef(getInputValue(defaultValue, multiple, getOptionLabel)).current;
124
+ // useRef ensures it doesn't update dynamically with defaultValue or value props.
125
+ const initialInputValue = React.useRef(getInputValue(defaultValue ?? valueProp, multiple, getOptionLabel)).current;
126
126
  const [value, setValueState] = useControlled({
127
127
  controlled: valueProp,
128
128
  default: defaultValue,
@@ -238,7 +238,7 @@ function useAutocomplete(props) {
238
238
  const setHighlightedIndex = useEventCallback(({
239
239
  event,
240
240
  index,
241
- reason = 'auto'
241
+ reason
242
242
  }) => {
243
243
  highlightedIndexRef.current = index;
244
244
 
@@ -248,7 +248,7 @@ function useAutocomplete(props) {
248
248
  } else {
249
249
  inputRef.current.setAttribute('aria-activedescendant', `${id}-option-${index}`);
250
250
  }
251
- if (onHighlightChange) {
251
+ if (onHighlightChange && ['mouse', 'keyboard', 'touch'].includes(reason)) {
252
252
  onHighlightChange(event, index === -1 ? null : filteredOptions[index], reason);
253
253
  }
254
254
  if (!listboxRef.current) {
@@ -301,7 +301,7 @@ function useAutocomplete(props) {
301
301
  event,
302
302
  diff,
303
303
  direction = 'next',
304
- reason = 'auto'
304
+ reason
305
305
  }) => {
306
306
  if (!popupOpen) {
307
307
  return;
package/version/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export const version = "6.4.8";
1
+ export const version = "6.4.10";
2
2
  export const major = Number("6");
3
3
  export const minor = Number("4");
4
- export const patch = Number("8");
4
+ export const patch = Number("10");
5
5
  export const prerelease = undefined;
6
6
  export default version;