@mui/material 6.4.9 → 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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 6.4.10
4
+
5
+ <!-- generated comparing v6.4.9..v6.x -->
6
+
7
+ _Mar 31, 2025_
8
+
9
+ A big thanks to the 4 contributors who made this release possible.
10
+
11
+ ### `@mui/material@6.4.10`
12
+
13
+ - [Autocomplete] Prevent shrink animation in controlled Autocomplete when initial `value` is provided (#45735) @imadx
14
+ - [Popover] Allow `null` in `anchorEl` function return type (#45723) @eduter
15
+
16
+ ### Docs
17
+
18
+ - Fix new React project link, CRA deprecated (#45669) @oliviertassinari
19
+
20
+ ### Core
21
+
22
+ - [utils] Support cleanup callbacks in useForkRef (#45733) @DiegoAndai
23
+
24
+ All contributors of this release in alphabetical order: @DiegoAndai, @eduter, @imadx, @oliviertassinari
25
+
3
26
  ## 6.4.9
4
27
 
5
28
  <!-- generated comparing v6.4.8..v6.x -->
@@ -108,9 +108,8 @@ export interface PopoverProps
108
108
  anchorEl?:
109
109
  | null
110
110
  | Element
111
- | (() => Element)
112
111
  | PopoverVirtualElement
113
- | (() => PopoverVirtualElement);
112
+ | (() => Element | PopoverVirtualElement | null);
114
113
  /**
115
114
  * This is the point on the anchor where the popover's
116
115
  * `anchorEl` will attach to. This is not used when the
@@ -276,7 +276,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
276
276
  const handleResize = debounce(() => {
277
277
  setPositioningStyles();
278
278
  });
279
- const containerWindow = ownerWindow(anchorEl);
279
+ const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));
280
280
  containerWindow.addEventListener('resize', handleResize);
281
281
  return () => {
282
282
  handleResize.clear();
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.9
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
@@ -276,7 +276,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
276
276
  const handleResize = debounce(() => {
277
277
  setPositioningStyles();
278
278
  });
279
- const containerWindow = ownerWindow(anchorEl);
279
+ const containerWindow = ownerWindow(resolveAnchorEl(anchorEl));
280
280
  containerWindow.addEventListener('resize', handleResize);
281
281
  return () => {
282
282
  handleResize.clear();
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.9
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
@@ -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,
@@ -1,6 +1,6 @@
1
- export const version = "6.4.9";
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("9");
4
+ export const patch = Number("10");
5
5
  export const prerelease = undefined;
6
6
  export default version;
@@ -285,7 +285,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
285
285
  const handleResize = (0, _debounce.default)(() => {
286
286
  setPositioningStyles();
287
287
  });
288
- const containerWindow = (0, _ownerWindow.default)(anchorEl);
288
+ const containerWindow = (0, _ownerWindow.default)(resolveAnchorEl(anchorEl));
289
289
  containerWindow.addEventListener('resize', handleResize);
290
290
  return () => {
291
291
  handleResize.clear();
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.4.9
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
@@ -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,
@@ -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.9";
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("9");
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.9",
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/types": "~7.2.24",
39
- "@mui/system": "^6.4.9",
40
- "@mui/utils": "^6.4.8",
41
- "@mui/core-downloads-tracker": "^6.4.9"
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.9"
49
+ "@mui/material-pigment-css": "^6.4.10"
50
50
  },
51
51
  "peerDependenciesMeta": {
52
52
  "@types/react": {
@@ -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,
package/version/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export const version = "6.4.9";
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("9");
4
+ export const patch = Number("10");
5
5
  export const prerelease = undefined;
6
6
  export default version;