@mui/material 5.14.9 → 5.14.11

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 (40) hide show
  1. package/Autocomplete/Autocomplete.d.ts +2 -0
  2. package/Avatar/Avatar.js +1 -1
  3. package/BottomNavigation/BottomNavigation.js +0 -0
  4. package/CHANGELOG.md +133 -0
  5. package/Chip/Chip.js +2 -0
  6. package/ListSubheader/listSubheaderClasses.js +1 -1
  7. package/Select/SelectInput.js +1 -0
  8. package/TablePagination/TablePagination.d.ts +1 -0
  9. package/Tabs/Tabs.d.ts +1 -1
  10. package/Tabs/Tabs.js +1 -1
  11. package/index.js +1 -1
  12. package/legacy/Avatar/Avatar.js +1 -1
  13. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  14. package/legacy/Chip/Chip.js +2 -0
  15. package/legacy/ListSubheader/listSubheaderClasses.js +1 -1
  16. package/legacy/Select/SelectInput.js +1 -0
  17. package/legacy/Tabs/Tabs.js +1 -1
  18. package/legacy/index.js +1 -1
  19. package/legacy/locale/index.js +35 -32
  20. package/locale/index.js +6 -4
  21. package/modern/Avatar/Avatar.js +1 -1
  22. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  23. package/modern/Chip/Chip.js +2 -0
  24. package/modern/ListSubheader/listSubheaderClasses.js +1 -1
  25. package/modern/Select/SelectInput.js +1 -0
  26. package/modern/Tabs/Tabs.js +1 -1
  27. package/modern/index.js +1 -1
  28. package/modern/locale/index.js +6 -4
  29. package/node/Avatar/Avatar.js +1 -1
  30. package/node/BottomNavigation/BottomNavigation.js +0 -0
  31. package/node/Chip/Chip.js +2 -0
  32. package/node/ListSubheader/listSubheaderClasses.js +2 -2
  33. package/node/Select/SelectInput.js +1 -0
  34. package/node/TablePagination/TablePagination.js +3 -2
  35. package/node/Tabs/Tabs.js +1 -1
  36. package/node/index.js +1 -1
  37. package/node/locale/index.js +6 -4
  38. package/package.json +5 -5
  39. package/umd/material-ui.development.js +51 -49
  40. package/umd/material-ui.production.min.js +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/material",
3
- "version": "5.14.9",
3
+ "version": "5.14.11",
4
4
  "private": false,
5
5
  "author": "MUI Team",
6
6
  "description": "React components that implement Google's Material Design.",
@@ -28,11 +28,11 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@babel/runtime": "^7.22.15",
31
- "@mui/base": "5.0.0-beta.15",
32
- "@mui/core-downloads-tracker": "^5.14.9",
33
- "@mui/system": "^5.14.9",
31
+ "@mui/base": "5.0.0-beta.17",
32
+ "@mui/core-downloads-tracker": "^5.14.11",
33
+ "@mui/system": "^5.14.11",
34
34
  "@mui/types": "^7.2.4",
35
- "@mui/utils": "^5.14.9",
35
+ "@mui/utils": "^5.14.11",
36
36
  "@types/react-transition-group": "^4.4.6",
37
37
  "clsx": "^2.0.0",
38
38
  "csstype": "^3.1.2",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v5.14.9
2
+ * @mui/material v5.14.11
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -1983,7 +1983,11 @@
1983
1983
  }
1984
1984
 
1985
1985
  function isMuiElement(element, muiNames) {
1986
- return /*#__PURE__*/React__namespace.isValidElement(element) && muiNames.indexOf(element.type.muiName) !== -1;
1986
+ var _muiName, _element$type;
1987
+ return /*#__PURE__*/React__namespace.isValidElement(element) && muiNames.indexOf( // For server components `muiName` is avaialble in element.type._payload.value.muiName
1988
+ // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
1989
+ // eslint-disable-next-line no-underscore-dangle
1990
+ (_muiName = element.type.muiName) != null ? _muiName : (_element$type = element.type) == null || (_element$type = _element$type._payload) == null || (_element$type = _element$type.value) == null ? void 0 : _element$type.muiName) !== -1;
1987
1991
  }
1988
1992
 
1989
1993
  function ownerDocument(node) {
@@ -2037,6 +2041,13 @@
2037
2041
  }
2038
2042
  }
2039
2043
 
2044
+ /**
2045
+ * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.
2046
+ * This is useful for effects that are only needed for client-side rendering but not for SSR.
2047
+ *
2048
+ * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85
2049
+ * and confirm it doesn't apply to your use-case.
2050
+ */
2040
2051
  const useEnhancedEffect = typeof window !== 'undefined' ? React__namespace.useLayoutEffect : React__namespace.useEffect;
2041
2052
  var useEnhancedEffect$1 = useEnhancedEffect;
2042
2053
 
@@ -2118,7 +2129,8 @@
2118
2129
  }
2119
2130
 
2120
2131
  /**
2121
- * https://github.com/facebook/react/issues/14099#issuecomment-440013892
2132
+ * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892
2133
+ * See RFC in https://github.com/reactjs/rfcs/pull/220
2122
2134
  */
2123
2135
 
2124
2136
  function useEventCallback(fn) {
@@ -8866,11 +8878,11 @@ try {
8866
8878
  */
8867
8879
  disableStyleSheetGeneration: PropTypes.bool,
8868
8880
  /**
8869
- * Disable CSS transitions when switching between modes or color schemes
8881
+ * Disable CSS transitions when switching between modes or color schemes.
8870
8882
  */
8871
8883
  disableTransitionOnChange: PropTypes.bool,
8872
8884
  /**
8873
- * The document to attach the attribute to
8885
+ * The document to attach the attribute to.
8874
8886
  */
8875
8887
  documentNode: PropTypes.any,
8876
8888
  /**
@@ -8878,7 +8890,7 @@ try {
8878
8890
  */
8879
8891
  modeStorageKey: PropTypes.string,
8880
8892
  /**
8881
- * The window that attaches the 'storage' event listener
8893
+ * The window that attaches the 'storage' event listener.
8882
8894
  * @default window
8883
8895
  */
8884
8896
  storageWindow: PropTypes.any,
@@ -19599,64 +19611,51 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
19599
19611
  if (isEmpty$1(newState)) {
19600
19612
  return;
19601
19613
  }
19602
- setState(prevState => {
19603
- return updateState(prevState, newState);
19604
- });
19614
+ setState(prevState => updateState(prevState, newState));
19605
19615
  }, [getUpdatedState]);
19606
- const syncHeightWithFlushSync = () => {
19607
- const newState = getUpdatedState();
19608
- if (isEmpty$1(newState)) {
19609
- return;
19610
- }
19616
+ useEnhancedEffect$1(() => {
19617
+ const syncHeightWithFlushSync = () => {
19618
+ const newState = getUpdatedState();
19619
+ if (isEmpty$1(newState)) {
19620
+ return;
19621
+ }
19611
19622
 
19612
- // In React 18, state updates in a ResizeObserver's callback are happening after the paint which causes flickering
19613
- // when doing some visual updates in it. Using flushSync ensures that the dom will be painted after the states updates happen
19614
- // Related issue - https://github.com/facebook/react/issues/24331
19615
- ReactDOM__namespace.flushSync(() => {
19616
- setState(prevState => {
19617
- return updateState(prevState, newState);
19623
+ // In React 18, state updates in a ResizeObserver's callback are happening after
19624
+ // the paint, this leads to an infinite rendering.
19625
+ //
19626
+ // Using flushSync ensures that the states is updated before the next pain.
19627
+ // Related issue - https://github.com/facebook/react/issues/24331
19628
+ ReactDOM__namespace.flushSync(() => {
19629
+ setState(prevState => updateState(prevState, newState));
19618
19630
  });
19619
- });
19620
- };
19621
- React__namespace.useEffect(() => {
19631
+ };
19622
19632
  const handleResize = () => {
19623
19633
  renders.current = 0;
19624
-
19625
- // If the TextareaAutosize component is replaced by Suspense with a fallback, the last
19626
- // ResizeObserver's handler that runs because of the change in the layout is trying to
19627
- // access a dom node that is no longer there (as the fallback component is being shown instead).
19628
- // See https://github.com/mui/material-ui/issues/32640
19629
- if (inputRef.current) {
19630
- syncHeightWithFlushSync();
19631
- }
19634
+ syncHeightWithFlushSync();
19632
19635
  };
19633
- const handleResizeWindow = debounce$1(() => {
19634
- renders.current = 0;
19635
-
19636
- // If the TextareaAutosize component is replaced by Suspense with a fallback, the last
19637
- // ResizeObserver's handler that runs because of the change in the layout is trying to
19638
- // access a dom node that is no longer there (as the fallback component is being shown instead).
19639
- // See https://github.com/mui/material-ui/issues/32640
19640
- if (inputRef.current) {
19641
- syncHeightWithFlushSync();
19642
- }
19643
- });
19644
- let resizeObserver;
19636
+ // Workaround a "ResizeObserver loop completed with undelivered notifications" error
19637
+ // in test.
19638
+ // Note that we might need to use this logic in production per https://github.com/WICG/resize-observer/issues/38
19639
+ // Also see https://github.com/mui/mui-x/issues/8733
19640
+ let rAF;
19641
+ const debounceHandleResize = debounce$1(handleResize);
19645
19642
  const input = inputRef.current;
19646
19643
  const containerWindow = ownerWindow(input);
19647
- containerWindow.addEventListener('resize', handleResizeWindow);
19644
+ containerWindow.addEventListener('resize', debounceHandleResize);
19645
+ let resizeObserver;
19648
19646
  if (typeof ResizeObserver !== 'undefined') {
19649
19647
  resizeObserver = new ResizeObserver(handleResize);
19650
19648
  resizeObserver.observe(input);
19651
19649
  }
19652
19650
  return () => {
19653
- handleResizeWindow.clear();
19654
- containerWindow.removeEventListener('resize', handleResizeWindow);
19651
+ debounceHandleResize.clear();
19652
+ cancelAnimationFrame(rAF);
19653
+ containerWindow.removeEventListener('resize', debounceHandleResize);
19655
19654
  if (resizeObserver) {
19656
19655
  resizeObserver.disconnect();
19657
19656
  }
19658
19657
  };
19659
- });
19658
+ }, [getUpdatedState]);
19660
19659
  useEnhancedEffect$1(() => {
19661
19660
  syncHeight();
19662
19661
  });
@@ -21124,6 +21123,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
21124
21123
  borderRadius: 32 / 2,
21125
21124
  whiteSpace: 'nowrap',
21126
21125
  transition: theme.transitions.create(['background-color', 'box-shadow']),
21126
+ // reset cursor explicitly in case ButtonBase is used
21127
+ cursor: 'unset',
21127
21128
  // We disable the focus ring for mouse, touch and keyboard users.
21128
21129
  outline: 0,
21129
21130
  textDecoration: 'none',
@@ -23521,8 +23522,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
23521
23522
  if (hasImgNotFailing) {
23522
23523
  children = /*#__PURE__*/jsxRuntime_1(AvatarImg, _extends({
23523
23524
  alt: alt,
23524
- src: src,
23525
23525
  srcSet: srcSet,
23526
+ src: src,
23526
23527
  sizes: sizes,
23527
23528
  ownerState: ownerState,
23528
23529
  className: classes.img
@@ -40236,6 +40237,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
40236
40237
  MenuListProps: _extends({
40237
40238
  'aria-labelledby': labelId,
40238
40239
  role: 'listbox',
40240
+ 'aria-multiselectable': multiple ? 'true' : undefined,
40239
40241
  disableListWrap: true
40240
40242
  }, MenuProps.MenuListProps),
40241
40243
  slotProps: {
@@ -48912,7 +48914,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
48912
48914
  *
48913
48915
  * - `scrollable` will invoke scrolling properties and allow for horizontally
48914
48916
  * scrolling (or swiping) of the tab bar.
48915
- * -`fullWidth` will make the tabs grow to use all the available space,
48917
+ * - `fullWidth` will make the tabs grow to use all the available space,
48916
48918
  * which should be used for small views, like on mobile.
48917
48919
  * - `standard` will render the default state.
48918
48920
  * @default 'standard'