@mui/material 5.8.7 โ†’ 5.9.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 (56) hide show
  1. package/Autocomplete/Autocomplete.js +2 -2
  2. package/CHANGELOG.md +74 -0
  3. package/Modal/Modal.js +6 -6
  4. package/Popper/Popper.d.ts +1 -6
  5. package/README.md +60 -23
  6. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +6 -0
  7. package/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  8. package/Tooltip/Tooltip.js +6 -5
  9. package/Unstable_Grid2/Grid2.d.ts +4 -0
  10. package/Unstable_Grid2/Grid2.js +34 -0
  11. package/Unstable_Grid2/Grid2Props.d.ts +15 -0
  12. package/Unstable_Grid2/Grid2Props.js +1 -0
  13. package/Unstable_Grid2/grid2Classes.d.ts +5 -0
  14. package/Unstable_Grid2/grid2Classes.js +14 -0
  15. package/Unstable_Grid2/index.d.ts +4 -0
  16. package/Unstable_Grid2/index.js +4 -0
  17. package/Unstable_Grid2/package.json +6 -0
  18. package/index.d.ts +3 -0
  19. package/index.js +3 -1
  20. package/legacy/Autocomplete/Autocomplete.js +2 -2
  21. package/legacy/Modal/Modal.js +13 -9
  22. package/legacy/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  23. package/legacy/Tooltip/Tooltip.js +6 -5
  24. package/legacy/Unstable_Grid2/Grid2.js +38 -0
  25. package/legacy/Unstable_Grid2/Grid2Props.js +1 -0
  26. package/legacy/Unstable_Grid2/grid2Classes.js +27 -0
  27. package/legacy/Unstable_Grid2/index.js +4 -0
  28. package/legacy/index.js +3 -1
  29. package/modern/Autocomplete/Autocomplete.js +2 -2
  30. package/modern/Modal/Modal.js +6 -6
  31. package/modern/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  32. package/modern/Tooltip/Tooltip.js +6 -5
  33. package/modern/Unstable_Grid2/Grid2.js +34 -0
  34. package/modern/Unstable_Grid2/Grid2Props.js +1 -0
  35. package/modern/Unstable_Grid2/grid2Classes.js +14 -0
  36. package/modern/Unstable_Grid2/index.js +4 -0
  37. package/modern/index.js +3 -1
  38. package/node/Autocomplete/Autocomplete.js +2 -2
  39. package/node/Modal/Modal.js +9 -9
  40. package/node/ScopedCssBaseline/ScopedCssBaseline.js +6 -1
  41. package/node/Tooltip/Tooltip.js +6 -5
  42. package/node/Unstable_Grid2/Grid2.js +47 -0
  43. package/node/Unstable_Grid2/Grid2Props.js +5 -0
  44. package/node/Unstable_Grid2/grid2Classes.js +25 -0
  45. package/node/Unstable_Grid2/index.js +56 -0
  46. package/node/index.js +22 -1
  47. package/package.json +6 -6
  48. package/styles/components.d.ts +5 -0
  49. package/styles/createTheme.d.ts +1 -1
  50. package/styles/experimental_extendTheme.d.ts +84 -7
  51. package/styles/index.d.ts +11 -0
  52. package/styles/overrides.d.ts +3 -1
  53. package/styles/props.d.ts +2 -0
  54. package/themeCssVarsAugmentation/index.d.ts +4 -8
  55. package/umd/material-ui.development.js +749 -272
  56. package/umd/material-ui.production.min.js +20 -25
@@ -457,7 +457,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
457
457
 
458
458
  if (multiple && value.length > 0) {
459
459
  const getCustomizedTagProps = params => _extends({
460
- className: clsx(classes.tag),
460
+ className: classes.tag,
461
461
  disabled
462
462
  }, getTagProps(params));
463
463
 
@@ -558,7 +558,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
558
558
  })
559
559
  }),
560
560
  inputProps: _extends({
561
- className: clsx(classes.input),
561
+ className: classes.input,
562
562
  disabled,
563
563
  readOnly
564
564
  }, getInputProps())
package/CHANGELOG.md CHANGED
@@ -1,5 +1,79 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.9.0
4
+
5
+ <!-- generated comparing v5.8.7..master -->
6
+
7
+ _Jul 12, 2022_
8
+
9
+ A big thanks to the 19 contributors who made this release possible. Here are some highlights โœจ:
10
+
11
+ - ๐Ÿงช Exported Grid v2 as `Unstable_Grid2` (#33479) @siriwatknp
12
+ - ๐Ÿ“– Added a guide for using Joy UI and Material UI together (#33396) @siriwatknp
13
+ - ๐Ÿ› Fixed a few bugs in Material UI components. Thanks to @ZeeshanTamboli, @ivan-ngchakming, and @joebingham-wk.
14
+ - many other ๐Ÿ› bug fixes and ๐Ÿ“š documentation improvements
15
+ - our documentation site is now running with React 18! (#33196) @mnajdova
16
+
17
+ ### `@mui/material@5.9.0`
18
+
19
+ - [CssBaseline] Fixes in overriding style (#33338) @ZeeshanTamboli
20
+ - [Autocomplete] Remove unnecessary `clsx` wrapper for single className (#33398) @ZeeshanTamboli
21
+ - [Grid] Export new grid as unstable (#33479) @siriwatknp
22
+ - [Tooltip] Fix children mouse over detection (#32321) @ivan-ngchakming
23
+ - [TypeScript] getCssVar autocomplete for Material UI (#33464) @siriwatknp
24
+ - [TypeScript] Fix theme options components types to use `Theme` (#33434) @siriwatknp
25
+ - [TypeScript] Reexports necessary types for module augmentation (#33397) @siriwatknp
26
+ - [ScopedCssBaseline] Add sx typings (#33474) @joebingham-wk
27
+
28
+ ### `@mui/system@5.9.0`
29
+
30
+ - [System] Add offset feature to Grid (#33415) @siriwatknp
31
+ - [system] Add new `Grid` implementation (#32746) @siriwatknp
32
+
33
+ ### `@mui/lab@5.0.0-alpha.90`
34
+
35
+ - [lab] Remove the pickers (#33386) @flaviendelangle
36
+ - [Masonry] Support `rem`/`em` values for `spacing` prop (#33384) @hbjORbj
37
+
38
+ ### `@mui/base@5.0.0-alpha.89`
39
+
40
+ - Base] Change the order of class names merged in useSlotProps (#33383) @michaldudak
41
+ - [ModalUnstyled] Accept callbacks in componentsProps (#33181) @michaldudak
42
+ - [SelectUnstyled] Accept callbacks in componentsProps (#33197) @michaldudak
43
+ - [TabsUnstyled] Accept callbacks in componentsProps (#33284) @michaldudak
44
+
45
+ ### `@mui/joy@5.0.0-alpha.36`
46
+
47
+ - [Joy] Add guide about using Joy and Material UI together (#33396) @siriwatknp
48
+ - [Joy] Fix variants color palette regressions (#33394) @danilo-leal
49
+
50
+ ### Docs
51
+
52
+ - [docs] Correcting small grammatical error (#33393) @robyyo
53
+ - [docs] Link to the correct package on Joy component pages (#33439) @cherniavskii
54
+ - [docs] Fix e2e tests (#33477) @siriwatknp
55
+ - [docs] Fix dead links (#33462) @oliviertassinari
56
+ - [docs] Cleanup the migration (#33463) @siriwatknp
57
+ - [docs] Fix broken Sponsoring services links @samuelsycamore
58
+ - [docs] Improve repo README with light/dark logos, relative links and more (#33356) @samuelsycamore
59
+ - [docs] Update links to MUI X Overview and Introduction pages (#33201) @samuelsycamore
60
+ - [docs] Update to React 18 (#33196) @mnajdova
61
+ - [docs] Simplify "Upload button" demo (#33326) @baharalidurrani
62
+ - [docs] Add "refine" demo to showcase (#33240) @omeraplak
63
+ - [docs] Add webpack alias for legacy utils package (#33376) @jgbae
64
+ - [docs] Improve external link icons synonyms (#33257) @davidgarciab
65
+ - [examples] Update MUI Base with Tailwind CSS to use the latest versions of the dependencies (#33401) @mnajdova
66
+ - [examples] Add MUI base example (#33154) @siriwatknp
67
+
68
+ ### Core
69
+
70
+ - [core] Fix @mui/monorepo regression for the import of the docs infra (#33390) @Janpot
71
+ - [core] Remove old babel resolve rule (#33432) @oliviertassinari
72
+ - [website] Shorten the plan descriptions on the pricing page (#32984) @joserodolfofreitas
73
+ - [website] Link EULA in the license quantity section (#33292) @oliviertassinari
74
+
75
+ All contributors of this release in alphabetical order: @baharalidurrani, @cherniavskii, @danilo-leal, @davidgarciab, @flaviendelangle, @hbjORbj, @ivan-ngchakming, @Janpot, @jgbae, @joebingham-wk, @joserodolfofreitas, @michaldudak, @mnajdova, @oliviertassinari, @omeraplak, @robyyo, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
76
+
3
77
  ## 5.8.7
4
78
 
5
79
  <!-- generated comparing v5.8.6..master -->
package/Modal/Modal.js CHANGED
@@ -3,9 +3,9 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  const _excluded = ["BackdropComponent", "BackdropProps", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "theme"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import { isHostComponent } from '@mui/base';
7
- import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
8
6
  import ModalUnstyled, { modalUnstyledClasses } from '@mui/base/ModalUnstyled';
7
+ import { isHostComponent, resolveComponentProps } from '@mui/base/utils';
8
+ import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
9
9
  import styled from '../styles/styled';
10
10
  import useThemeProps from '../styles/useThemeProps';
11
11
  import Backdrop from '../Backdrop';
@@ -115,11 +115,11 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
115
115
  Backdrop: BackdropComponent
116
116
  }, components),
117
117
  componentsProps: {
118
- root: _extends({}, componentsProps.root, !isHostComponent(Root) && {
118
+ root: () => _extends({}, resolveComponentProps(componentsProps.root, ownerState), !isHostComponent(Root) && {
119
119
  as: component,
120
120
  theme
121
121
  }),
122
- backdrop: _extends({}, BackdropProps, componentsProps.backdrop)
122
+ backdrop: () => _extends({}, BackdropProps, resolveComponentProps(componentsProps.backdrop, ownerState))
123
123
  },
124
124
  onTransitionEnter: () => setExited(false),
125
125
  onTransitionExited: () => setExited(true),
@@ -196,8 +196,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
196
196
  * @default {}
197
197
  */
198
198
  componentsProps: PropTypes.shape({
199
- backdrop: PropTypes.object,
200
- root: PropTypes.object
199
+ backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
200
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
201
201
  }),
202
202
 
203
203
  /**
@@ -20,10 +20,5 @@ export declare type PopperProps = Omit<PopperUnstyledProps, 'direction'> & {
20
20
  *
21
21
  * - [Popper API](https://mui.com/material-ui/api/popper/)
22
22
  */
23
- declare const Popper: React.ForwardRefExoticComponent<Pick<Omit<PopperUnstyledProps, "direction"> & {
24
- /**
25
- * The system prop that allows defining system overrides as well as additional CSS styles.
26
- */
27
- sx?: SxProps<Theme> | undefined;
28
- }, "hidden" | "color" | "style" | "open" | "translate" | "transition" | "slot" | "title" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "placement" | "anchorEl" | "container" | "disablePortal" | "keepMounted" | "modifiers" | "popperOptions" | "popperRef"> & React.RefAttributes<HTMLDivElement>>;
23
+ declare const Popper: React.ForwardRefExoticComponent<Pick<PopperProps, "hidden" | "color" | "style" | "open" | "translate" | "transition" | "slot" | "title" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "sx" | "container" | "placement" | "anchorEl" | "disablePortal" | "keepMounted" | "modifiers" | "popperOptions" | "popperRef"> & React.RefAttributes<HTMLDivElement>>;
29
24
  export default Popper;
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <!-- markdownlint-disable-next-line -->
2
2
  <p align="center">
3
- <a href="https://mui.com/" rel="noopener" target="_blank"><img width="150" src="https://mui.com/static/logo.svg" alt="MUI logo"></a>
3
+ <a href="https://mui.com/" rel="noopener" target="_blank"><img width="150" src="/docs/public/static/logo.svg" alt="MUI logo"></a>
4
4
  </p>
5
5
 
6
6
  <h1 align="center">MUI Core</h1>
@@ -39,11 +39,15 @@
39
39
 
40
40
  Material UI is available as an [npm package](https://www.npmjs.com/package/@mui/material).
41
41
 
42
+ **npm:**
43
+
42
44
  ```sh
43
- // with npm
44
45
  npm install @mui/material @emotion/react @emotion/styled
46
+ ```
47
+
48
+ **yarn:**
45
49
 
46
- // with yarn
50
+ ```sh
47
51
  yarn add @mui/material @emotion/react @emotion/styled
48
52
  ```
49
53
 
@@ -63,11 +67,15 @@ Use `@latest` for the latest stable release.
63
67
 
64
68
  MUI Base is available as an [npm package](https://www.npmjs.com/package/@mui/base).
65
69
 
70
+ **npm:**
71
+
66
72
  ```sh
67
- // with npm
68
73
  npm install @mui/base
74
+ ```
75
+
76
+ **yarn:**
69
77
 
70
- // with yarn
78
+ ```sh
71
79
  yarn add @mui/base
72
80
  ```
73
81
 
@@ -78,22 +86,30 @@ We are adding new components regularly and you're welcome to contribute!
78
86
 
79
87
  MUI System is available as an [npm package](https://www.npmjs.com/package/@mui/system).
80
88
 
89
+ **npm:**
90
+
81
91
  ```sh
82
- // with npm
83
92
  npm install @mui/system @emotion/react @emotion/styled
93
+ ```
84
94
 
85
- // with yarn
95
+ **yarn:**
96
+
97
+ ```sh
86
98
  yarn add @mui/system @emotion/react @emotion/styled
87
99
  ```
88
100
 
89
101
  Or if you want to use `styled-components` as a styling engine:
90
102
 
103
+ **npm:**
104
+
91
105
  ```sh
92
- // with npm
93
- npm install @mui/system @mui/styled-engine-sc styled-components
106
+ npm install @mui/material @mui/styled-engine-sc styled-components
107
+ ```
108
+
109
+ **yarn:**
94
110
 
95
- // with yarn
96
- yarn add @mui/system @mui/styled-engine-sc styled-components
111
+ ```sh
112
+ yarn add @mui/material @mui/styled-engine-sc styled-components
97
113
  ```
98
114
 
99
115
  Visit our [`styled-engine` guide](https://mui.com/material-ui/guides/styled-engine/) for more information about how to configure `styled-components` as the style engine.
@@ -160,8 +176,9 @@ Our documentation features [a collection of example projects using Material UI](
160
176
 
161
177
  ## Documentation
162
178
 
163
- - [Material UI](https://mui.com/material-ui/getting-started/installation/)
164
- - [MUI Base](https://mui.com/base/getting-started/installation/)
179
+ - [Material UI](https://mui.com/material-ui/getting-started/overview/)
180
+ - [Joy UI](https://mui.com/joy-ui/getting-started/overview/)
181
+ - [MUI Base](https://mui.com/base/getting-started/overview/)
165
182
  - [MUI System](https://mui.com/system/basics/)
166
183
 
167
184
  ## Premium themes
@@ -196,22 +213,42 @@ For details of supported versions and contact details for reporting security iss
196
213
 
197
214
  These great services sponsor MUI's core infrastructure:
198
215
 
199
- [<img loading="lazy" alt="GitHub" src="https://github.githubassets.com/images/modules/logos_page/GitHub-Logo.png" height="25">](https://github.com/)
216
+ <picture>
217
+
218
+ <source media="(prefers-color-scheme: dark)" srcset="/docs/public/static/readme/github-darkmode.svg">
219
+ <source media="(prefers-color-scheme: light)" srcset="/docs/public/static/readme/github-lightmode.svg">
220
+ <img alt="GitHub logo" src="/docs/public/static/readme/github-darkmode.svg">
221
+ </picture>
222
+
223
+ [GitHub](https://github.com/) lets us host the Git repository and coordinate contributions.
224
+
225
+ <picture>
226
+
227
+ <source media="(prefers-color-scheme: dark)" srcset="/docs/public/static/readme/netlify-darkmode.svg">
228
+ <source media="(prefers-color-scheme: light)" srcset="/docs/public/static/readme/netlify-lightmode.svg">
229
+ <img alt="Netlify logo" src="/docs/public/static/readme/netlify-darkmode.svg">
230
+ </picture>
200
231
 
201
- GitHub lets us host the Git repository and coordinate contributions.
232
+ [Netlify](https://www.netlify.com/) lets us distribute the documentation.
202
233
 
203
- [<img loading="lazy" alt="Netlify" src="https://cdn.netlify.com/15ecf59b59c9d04b88097c6b5d2c7e8a7d1302d0/1b6d6/img/press/logos/full-logo-light.svg" height="30">](https://www.netlify.com/)
234
+ <picture>
204
235
 
205
- Netlify lets us distribute the documentation.
236
+ <source media="(prefers-color-scheme: dark)" srcset="/docs/public/static/readme/crowdin-darkmode.svg">
237
+ <source media="(prefers-color-scheme: light)" srcset="/docs/public/static/readme/crowdin-lightmode.svg">
238
+ <img alt="Crowdin logo" src="/docs/public/static/readme/crowdin-darkmode.svg">
239
+ </picture>
206
240
 
207
- [<img loading="lazy" alt="Crowdin" src="https://support.crowdin.com/assets/logos/crowdin-logo-small-black.svg" height="30">](https://crowdin.com/)
241
+ [Crowdin](https://crowdin.com/) lets us translate the documentation.
208
242
 
209
- Crowdin lets us translate the documentation.
243
+ <picture>
210
244
 
211
- [<img loading="lazy" alt="BrowserStack" src="https://www.browserstack.com/images/mail/browserstack-logo-footer.png" height="30">](https://www.browserstack.com/)
245
+ <source media="(prefers-color-scheme: dark)" srcset="/docs/public/static/readme/browserstack-darkmode.svg">
246
+ <source media="(prefers-color-scheme: light)" srcset="/docs/public/static/readme/browserstack-lightmode.svg">
247
+ <img alt="GitHub logo" src="/docs/public/static/readme/browserstack-darkmode.svg">
248
+ </picture>
212
249
 
213
- BrowserStack lets us test in real browsers.
250
+ [BrowserStack](https://www.browserstack.com/) lets us test in real browsers.
214
251
 
215
- [<img loading="lazy" alt="CodeCov" src="https://github.com/codecov.png?size=70" width="35" height="35">](https://codecov.io/)
252
+ <img loading="lazy" alt="CodeCov logo" src="https://github.com/codecov.png?size=70" width="35" height="35">
216
253
 
217
- CodeCov lets us monitor test coverage.
254
+ [CodeCov](https://codecov.io/) lets us monitor test coverage.
@@ -1,4 +1,6 @@
1
+ import { SxProps } from '@mui/system';
1
2
  import * as React from 'react';
3
+ import { Theme } from '../styles';
2
4
  import { OverridableComponent, OverrideProps } from '../OverridableComponent';
3
5
  import { ScopedCssBaselineClasses } from './scopedCssBaselineClasses';
4
6
 
@@ -18,6 +20,10 @@ export interface ScopedCssBaselineTypeMap<P = {}, D extends React.ElementType =
18
20
  * For browser support, check out https://caniuse.com/?search=color-scheme
19
21
  */
20
22
  enableColorScheme?: boolean;
23
+ /**
24
+ * The system prop that allows defining system overrides as well as additional CSS styles.
25
+ */
26
+ sx?: SxProps<Theme>;
21
27
  };
22
28
  defaultComponent: D;
23
29
  }
@@ -96,6 +96,11 @@ process.env.NODE_ENV !== "production" ? ScopedCssBaseline.propTypes
96
96
  * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
97
97
  * For browser support, check out https://caniuse.com/?search=color-scheme
98
98
  */
99
- enableColorScheme: PropTypes.bool
99
+ enableColorScheme: PropTypes.bool,
100
+
101
+ /**
102
+ * The system prop that allows defining system overrides as well as additional CSS styles.
103
+ */
104
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
100
105
  } : void 0;
101
106
  export default ScopedCssBaseline;
@@ -338,12 +338,15 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
338
338
  const handleEnter = event => {
339
339
  if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
340
340
  return;
341
+ } // Workaround for https://github.com/facebook/react/issues/7769
342
+
343
+
344
+ if (!childNode) {
345
+ setChildNode(event.currentTarget);
341
346
  } // Remove the title ahead of time.
342
347
  // We don't want to wait for the next render commit.
343
348
  // We would risk displaying two tooltips at the same time (native + this one).
344
-
345
-
346
- if (childNode) {
349
+ else {
347
350
  childNode.removeAttribute('title');
348
351
  }
349
352
 
@@ -388,8 +391,6 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
388
391
 
389
392
  const handleFocus = event => {
390
393
  // Workaround for https://github.com/facebook/react/issues/7769
391
- // The autoFocus of React might trigger the event before the componentDidMount.
392
- // We need to account for this eventuality.
393
394
  if (!childNode) {
394
395
  setChildNode(event.currentTarget);
395
396
  }
@@ -0,0 +1,4 @@
1
+ import { OverridableComponent } from '@mui/types';
2
+ import { Grid2TypeMap } from './Grid2Props';
3
+ declare const Grid2: OverridableComponent<Grid2TypeMap<{}, "div">>;
4
+ export default Grid2;
@@ -0,0 +1,34 @@
1
+ import PropTypes from 'prop-types';
2
+ import { createGrid } from '@mui/system/Unstable_Grid';
3
+ import { styled, useThemeProps } from '../styles';
4
+ const Grid2 = createGrid({
5
+ createStyledComponent: styled('div', {
6
+ name: 'MuiGrid2',
7
+ overridesResolver: (props, styles) => styles.root
8
+ }),
9
+ componentName: 'MuiGrid2',
10
+ // eslint-disable-next-line material-ui/mui-name-matches-component-name
11
+ useThemeProps: inProps => useThemeProps({
12
+ props: inProps,
13
+ name: 'MuiGrid2'
14
+ })
15
+ });
16
+ process.env.NODE_ENV !== "production" ? Grid2.propTypes
17
+ /* remove-proptypes */
18
+ = {
19
+ // ----------------------------- Warning --------------------------------
20
+ // | These PropTypes are generated from the TypeScript type definitions |
21
+ // | To update them edit TypeScript types and run "yarn proptypes" |
22
+ // ----------------------------------------------------------------------
23
+
24
+ /**
25
+ * The content of the component.
26
+ */
27
+ children: PropTypes.node,
28
+
29
+ /**
30
+ * @ignore
31
+ */
32
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
33
+ } : void 0;
34
+ export default Grid2;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { OverrideProps } from '@mui/types';
3
+ import { SxProps, SystemProps } from '@mui/system';
4
+ import { GridBaseProps } from '@mui/system/Unstable_Grid';
5
+ import { Theme } from '../styles';
6
+ export declare type Grid2Slot = 'root';
7
+ export interface Grid2TypeMap<P = {}, D extends React.ElementType = 'div'> {
8
+ props: P & GridBaseProps & {
9
+ sx?: SxProps<Theme>;
10
+ } & SystemProps<Theme>;
11
+ defaultComponent: D;
12
+ }
13
+ export declare type Grid2Props<D extends React.ElementType = Grid2TypeMap['defaultComponent'], P = {
14
+ component?: React.ElementType;
15
+ }> = OverrideProps<Grid2TypeMap<P, D>, D>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import { GridClasses } from '@mui/system/Unstable_Grid';
2
+ export declare type Grid2ClassKey = keyof GridClasses;
3
+ export declare function getGrid2UtilityClass(slot: string): string;
4
+ declare const grid2Classes: GridClasses;
5
+ export default grid2Classes;
@@ -0,0 +1,14 @@
1
+ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
2
+ export function getGrid2UtilityClass(slot) {
3
+ return generateUtilityClass('MuiGrid2', slot);
4
+ }
5
+ const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
6
+ const DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];
7
+ const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
8
+ const GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
9
+ const grid2Classes = generateUtilityClasses('MuiGrid2', ['root', 'container', 'item', 'zeroMinWidth', // spacings
10
+ ...SPACINGS.map(spacing => `spacing-xs-${spacing}`), // direction values
11
+ ...DIRECTIONS.map(direction => `direction-xs-${direction}`), // wrap values
12
+ ...WRAPS.map(wrap => `wrap-xs-${wrap}`), // grid sizes for all breakpoints
13
+ ...GRID_SIZES.map(size => `grid-xs-${size}`), ...GRID_SIZES.map(size => `grid-sm-${size}`), ...GRID_SIZES.map(size => `grid-md-${size}`), ...GRID_SIZES.map(size => `grid-lg-${size}`), ...GRID_SIZES.map(size => `grid-xl-${size}`)]);
14
+ export default grid2Classes;
@@ -0,0 +1,4 @@
1
+ export { default } from './Grid2';
2
+ export * from './Grid2Props';
3
+ export { default as grid2Classes } from './grid2Classes';
4
+ export * from './grid2Classes';
@@ -0,0 +1,4 @@
1
+ export { default } from './Grid2';
2
+ export * from './Grid2Props';
3
+ export { default as grid2Classes } from './grid2Classes';
4
+ export * from './grid2Classes';
@@ -0,0 +1,6 @@
1
+ {
2
+ "sideEffects": false,
3
+ "module": "./index.js",
4
+ "main": "../node/Unstable_Grid2/index.js",
5
+ "types": "./index.d.ts"
6
+ }
package/index.d.ts CHANGED
@@ -224,6 +224,9 @@ export * from './FormLabel';
224
224
  export { default as Grid } from './Grid';
225
225
  export * from './Grid';
226
226
 
227
+ export { default as Unstable_Grid2 } from './Unstable_Grid2';
228
+ export * from './Unstable_Grid2';
229
+
227
230
  export { default as Grow } from './Grow';
228
231
  export * from './Grow';
229
232
 
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.8.7
1
+ /** @license MUI v5.9.0
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -106,6 +106,8 @@ export { default as FormLabel } from './FormLabel';
106
106
  export * from './FormLabel';
107
107
  export { default as Grid } from './Grid';
108
108
  export * from './Grid';
109
+ export { default as Unstable_Grid2 } from './Unstable_Grid2';
110
+ export * from './Unstable_Grid2';
109
111
  export { default as Grow } from './Grow';
110
112
  export * from './Grow';
111
113
  export { default as Hidden } from './Hidden';
@@ -477,7 +477,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
477
477
  if (multiple && value.length > 0) {
478
478
  var getCustomizedTagProps = function getCustomizedTagProps(params) {
479
479
  return _extends({
480
- className: clsx(classes.tag),
480
+ className: classes.tag,
481
481
  disabled: disabled
482
482
  }, getTagProps(params));
483
483
  };
@@ -585,7 +585,7 @@ var Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps,
585
585
  })
586
586
  }),
587
587
  inputProps: _extends({
588
- className: clsx(classes.input),
588
+ className: classes.input,
589
589
  disabled: disabled,
590
590
  readOnly: readOnly
591
591
  }, getInputProps())
@@ -2,9 +2,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import * as React from 'react';
4
4
  import PropTypes from 'prop-types';
5
- import { isHostComponent } from '@mui/base';
6
- import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
7
5
  import ModalUnstyled, { modalUnstyledClasses } from '@mui/base/ModalUnstyled';
6
+ import { isHostComponent, resolveComponentProps } from '@mui/base/utils';
7
+ import { elementAcceptingRef, HTMLElementType } from '@mui/utils';
8
8
  import styled from '../styles/styled';
9
9
  import useThemeProps from '../styles/useThemeProps';
10
10
  import Backdrop from '../Backdrop';
@@ -125,11 +125,15 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
125
125
  Backdrop: BackdropComponent
126
126
  }, components),
127
127
  componentsProps: {
128
- root: _extends({}, componentsProps.root, !isHostComponent(Root) && {
129
- as: component,
130
- theme: theme
131
- }),
132
- backdrop: _extends({}, BackdropProps, componentsProps.backdrop)
128
+ root: function root() {
129
+ return _extends({}, resolveComponentProps(componentsProps.root, ownerState), !isHostComponent(Root) && {
130
+ as: component,
131
+ theme: theme
132
+ });
133
+ },
134
+ backdrop: function backdrop() {
135
+ return _extends({}, BackdropProps, resolveComponentProps(componentsProps.backdrop, ownerState));
136
+ }
133
137
  },
134
138
  onTransitionEnter: function onTransitionEnter() {
135
139
  return setExited(false);
@@ -210,8 +214,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
210
214
  * @default {}
211
215
  */
212
216
  componentsProps: PropTypes.shape({
213
- backdrop: PropTypes.object,
214
- root: PropTypes.object
217
+ backdrop: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
218
+ root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
215
219
  }),
216
220
 
217
221
  /**
@@ -94,6 +94,11 @@ process.env.NODE_ENV !== "production" ? ScopedCssBaseline.propTypes
94
94
  * For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
95
95
  * For browser support, check out https://caniuse.com/?search=color-scheme
96
96
  */
97
- enableColorScheme: PropTypes.bool
97
+ enableColorScheme: PropTypes.bool,
98
+
99
+ /**
100
+ * The system prop that allows defining system overrides as well as additional CSS styles.
101
+ */
102
+ sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
98
103
  } : void 0;
99
104
  export default ScopedCssBaseline;
@@ -360,12 +360,15 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
360
360
  var handleEnter = function handleEnter(event) {
361
361
  if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
362
362
  return;
363
+ } // Workaround for https://github.com/facebook/react/issues/7769
364
+
365
+
366
+ if (!childNode) {
367
+ setChildNode(event.currentTarget);
363
368
  } // Remove the title ahead of time.
364
369
  // We don't want to wait for the next render commit.
365
370
  // We would risk displaying two tooltips at the same time (native + this one).
366
-
367
-
368
- if (childNode) {
371
+ else {
369
372
  childNode.removeAttribute('title');
370
373
  }
371
374
 
@@ -411,8 +414,6 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
411
414
 
412
415
  var handleFocus = function handleFocus(event) {
413
416
  // Workaround for https://github.com/facebook/react/issues/7769
414
- // The autoFocus of React might trigger the event before the componentDidMount.
415
- // We need to account for this eventuality.
416
417
  if (!childNode) {
417
418
  setChildNode(event.currentTarget);
418
419
  }