@mui/material 5.11.1 → 5.11.3

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,113 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.11.3
4
+
5
+ <!-- generated comparing v5.11.2..master -->
6
+
7
+ _Jan 2, 2023_
8
+
9
+ A big thanks to the 6 contributors who made this release possible.
10
+ This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
11
+
12
+ ### `@mui/material@5.11.3`
13
+
14
+ - &#8203;<!-- 02 -->[Select] Update `renderValue` prop's TypeScript type (#34177) @ZeeshanTamboli
15
+
16
+ ### `@mui/joy@5.0.0-alpha.61`
17
+
18
+ - &#8203;<!-- 14 -->[Autocomplete][joy] Export component (#35647) @mbranch
19
+
20
+ ### Docs
21
+
22
+ - &#8203;<!-- 13 -->[blog] Fix handling of markdown links (#35628) @oliviertassinari
23
+ - &#8203;<!-- 09 -->[docs] Fix demo code selection through copy shortcut key on Firefox browser (#35670) @ZeeshanTamboli
24
+ - &#8203;<!-- 08 -->[docs] Fix layout shift when streaming the page (#35627) @oliviertassinari
25
+ - &#8203;<!-- 07 -->[docs] Fix switch name to reflect the color (#35052) @rjhcnf
26
+ - &#8203;<!-- 06 -->[docs] Fix anchor link in the card's docs and fix a typo (#35634) @ZeeshanTamboli
27
+ - &#8203;<!-- 05 -->[docs] Fix layout shift with modal (#35591) @oliviertassinari
28
+ - &#8203;<!-- 04 -->[Joy][docs] Add documentation for `Input` component (#35482) @hbjORbj
29
+ - &#8203;<!-- 03 -->[docs][joy] Improved readability on theme tokens page (#35639) @badalsaibo
30
+
31
+ ### Core
32
+
33
+ - &#8203;<!-- 12 -->[core] Disable prefetch of footer links @oliviertassinari
34
+ - &#8203;<!-- 11 -->[core] A few SEO fixes (#35672) @oliviertassinari
35
+ - &#8203;<!-- 10 -->[core] Remove need for scopePathnames (#35584) @oliviertassinari
36
+ - &#8203;<!-- 01 -->[test] Fix Algolia noisy lvl1 anchor (#35686) @oliviertassinari
37
+
38
+ All contributors of this release in alphabetical order: @badalsaibo, @hbjORbj, @mbranch, @oliviertassinari, @rjhcnf, @ZeeshanTamboli
39
+
40
+ ## 5.11.2
41
+
42
+ <!-- generated comparing v5.11.1..master -->
43
+
44
+ _Dec 26, 2022_
45
+
46
+ A big thanks to the 20 contributors who made this release possible. Here are some highlights ✨:
47
+
48
+ - ⚙️ Several MUI Base components were converted to TypeScript by @trizotti, @leventdeniz and @danhuynhdev (#35005, #34793, #34771)
49
+ - Many other 🐛 bug fixes abd 📚 documentation improvements.
50
+
51
+ ### `@mui/material@5.11.2`
52
+
53
+ - &#8203;<!-- 10 -->[l10n] Add displayed rows label to `faIR` locale (#35587) @hootan-rocky
54
+ - &#8203;<!-- 09 -->[l10n] Add Kurdish (Kurmanji) locale (#32508) @JagarYousef
55
+ - &#8203;<!-- 06 -->[Select] Accept non-component children (#33530) @boutahlilsoufiane
56
+ - &#8203;<!-- 05 -->[SelectInput] Update menu to use select wrapper as anchor (#34229) @EduardoSCosta
57
+ - &#8203;<!-- 03 -->[TableCell] Fix `scope` prop to be not set when a data cell is rendered within a table head (#35559) @sai6855
58
+
59
+ ### `@mui/utils@5.11.2`
60
+
61
+ - &#8203;<!-- 02 -->[utils] `mergedeep` deeply clones source key if it's an object (#35364) @sldk-yuri
62
+
63
+ ### `@mui/base@5.0.0-alpha.112`
64
+
65
+ - &#8203;<!-- 16 -->[FocusTrap][base] Convert code to TypeScript (#35005) @trizotti
66
+ - &#8203;<!-- 08 -->[Modal][base] Convert code to TypeScript (#34793) @leventdeniz
67
+ - &#8203;<!-- 07 -->[Popper][base] Convert code to TypeScript (#34771) @danhuynhdev
68
+ - &#8203;<!-- 04 -->[Slider] Exclude `isRtl` from Material UI's Slider props (#35564) @michaldudak
69
+
70
+ ### `@mui/joy@5.0.0-alpha.60`
71
+
72
+ - &#8203;<!-- 15 -->[Joy] Fix radius adjustment (#35629) @siriwatknp
73
+ - &#8203;<!-- 14 -->[Joy] Apply color inversion to components (#34602) @siriwatknp
74
+ - &#8203;<!-- 13 -->[Joy] Improve cursor pointer and add fallback for outlined variant (#35573) @siriwatknp
75
+ - &#8203;<!-- 12 -->[Joy] Miscellaneous fixes (#35552) @siriwatknp
76
+ - &#8203;<!-- 11 -->[Radio][joy] Use precise dimensions for radio icon (#35548) @hbjORbj
77
+
78
+ ### `@mui/material-next@6.0.0-alpha.68`
79
+
80
+ - &#8203;<!-- 36 -->[Material You] Update Button test & add active class name (#35497) @mnajdova
81
+
82
+ ### Docs
83
+
84
+ - &#8203;<!-- 35 -->[docs] Fix GoogleMaps demo (#35545) @hbjORbj
85
+ - &#8203;<!-- 25 -->[docs] Remove flow, its legacy (#35624) @oliviertassinari
86
+ - &#8203;<!-- 24 -->[docs] Add a guide on using icon libraries with Joy UI (#35377) @siriwatknp
87
+ - &#8203;<!-- 23 -->[docs] Clarify comment about `sortStability()` use case (#35570) @frontendlane
88
+ - &#8203;<!-- 22 -->[docs] Improve the experimental API demos on the button page (#35560) @mnajdova
89
+ - &#8203;<!-- 21 -->[docs] Force `light` theme mode when `activePage` is null (#35575) @LukasTy
90
+ - &#8203;<!-- 20 -->[docs] Fix ListItem button deprecated use (#33970) @MickaelAustoni
91
+ - &#8203;<!-- 19 -->[docs] Fix typo in `Progress` docs (#35553) @jasonsturges
92
+ - &#8203;<!-- 18 -->[docs] Remove empty tags on the TransferList demos (#33127) @ekusiadadus
93
+ - &#8203;<!-- 17 -->[docs][joy] Add documentation for `Stack` component (#35373) @hbjORbj
94
+ - &#8203;<!-- 35 -->[docs][joy] Add documentation for `Grid` component (#35374) @hbjORbj
95
+ - &#8203;<!-- 01 -->[website] Update sponsor grid (#35452) @danilo-leal
96
+
97
+ ### Core
98
+
99
+ - &#8203;<!-- 34 -->[core] Shorthand notation to remove outline (#35623) @oliviertassinari
100
+ - &#8203;<!-- 33 -->[core] Fix header link layout shift and clash (#35626) @oliviertassinari
101
+ - &#8203;<!-- 32 -->[core] Hide keyboard shortcut if no hover feature (#35625) @oliviertassinari
102
+ - &#8203;<!-- 31 -->[core] Fix confusing duplicated name in the log @oliviertassinari
103
+ - &#8203;<!-- 30 -->[core] Fix API demos callout spacing (#35579) @oliviertassinari
104
+ - &#8203;<!-- 29 -->[core] Fix a few title case (#35547) @oliviertassinari
105
+ - &#8203;<!-- 28 -->[core] Cleanup mention of test-utils (#35577) @oliviertassinari
106
+ - &#8203;<!-- 27 -->[core] Remove oudated pickers prop-type logic (#35571) @oliviertassinari
107
+ - &#8203;<!-- 26 -->[core] Exclude documentation of Base props not used in styled libraries (#35562) @michaldudak
108
+
109
+ All contributors of this release in alphabetical order: @boutahlilsoufiane, @danhuynhdev, @danilo-leal, @EduardoSCosta, @ekusiadadus, @frontendlane, @hbjORbj, @hootan-rocky, @JagarYousef, @jasonsturges, @leventdeniz, @LukasTy, @michaldudak, @MickaelAustoni, @mnajdova, @oliviertassinari, @sai6855, @siriwatknp, @sldk-yuri, @trizotti
110
+
3
111
  ## 5.11.1
4
112
 
5
113
  <!-- generated comparing v5.11.0..master -->
@@ -33,5 +33,5 @@ export type PopperProps = Omit<PopperUnstyledProps, 'direction'> & {
33
33
  *
34
34
  * - [Popper API](https://mui.com/material-ui/api/popper/)
35
35
  */
36
- declare const Popper: React.ForwardRefExoticComponent<Pick<PopperProps, "hidden" | "color" | "style" | "open" | "translate" | "transition" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "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" | "onResize" | "onResizeCapture" | "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" | "component" | "sx" | "components" | "container" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef" | "slotProps" | "slots" | "componentsProps"> & React.RefAttributes<HTMLDivElement>>;
36
+ declare const Popper: React.ForwardRefExoticComponent<Pick<PopperProps, "hidden" | "color" | "style" | "open" | "translate" | "transition" | "slot" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "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" | "onResize" | "onResizeCapture" | "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" | "component" | "sx" | "ownerState" | "components" | "container" | "placement" | "disablePortal" | "modifiers" | "anchorEl" | "keepMounted" | "popperOptions" | "popperRef" | "slotProps" | "slots" | "componentsProps"> & React.RefAttributes<HTMLDivElement>>;
37
37
  export default Popper;
package/Popper/Popper.js CHANGED
@@ -29,17 +29,17 @@ const PopperRoot = styled(PopperUnstyled, {
29
29
  const Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
30
30
  var _slots$root;
31
31
  const theme = useTheme();
32
- const _useThemeProps = useThemeProps({
33
- props: inProps,
34
- name: 'MuiPopper'
35
- }),
36
- {
32
+ const props = useThemeProps({
33
+ props: inProps,
34
+ name: 'MuiPopper'
35
+ });
36
+ const {
37
37
  components,
38
38
  componentsProps,
39
39
  slots,
40
40
  slotProps
41
- } = _useThemeProps,
42
- other = _objectWithoutPropertiesLoose(_useThemeProps, _excluded);
41
+ } = props,
42
+ other = _objectWithoutPropertiesLoose(props, _excluded);
43
43
  const RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root;
44
44
  return /*#__PURE__*/_jsx(PopperRoot, _extends({
45
45
  direction: theme == null ? void 0 : theme.direction,
@@ -130,6 +130,10 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
130
130
  * If `true`, the component is shown.
131
131
  */
132
132
  open: PropTypes.bool.isRequired,
133
+ /**
134
+ * @ignore
135
+ */
136
+ ownerState: PropTypes.any,
133
137
  /**
134
138
  * Popper placement.
135
139
  * @default 'bottom'
@@ -9,7 +9,7 @@ import { OutlinedInputProps } from '../OutlinedInput';
9
9
 
10
10
  export { SelectChangeEvent };
11
11
 
12
- export interface SelectProps<T = unknown>
12
+ interface CommonProps<T>
13
13
  extends StandardProps<InputProps, 'value' | 'onChange'>,
14
14
  Omit<OutlinedInputProps, 'value' | 'onChange'>,
15
15
  Pick<SelectInputProps<T>, 'onChange'> {
@@ -41,17 +41,6 @@ export interface SelectProps<T = unknown>
41
41
  * The default value. Use when the component is not controlled.
42
42
  */
43
43
  defaultValue?: T;
44
- /**
45
- * If `true`, a value is displayed even if no items are selected.
46
- *
47
- * In order to display a meaningful value, a function can be passed to the `renderValue` prop which
48
- * returns the value to be displayed when no items are selected.
49
- *
50
- * ⚠️ When using this prop, make sure the label doesn't overlap with the empty displayed value.
51
- * The label should either be hidden or forced to a shrunk state.
52
- * @default false
53
- */
54
- displayEmpty?: boolean;
55
44
  /**
56
45
  * The icon that displays the arrow.
57
46
  * @default ArrowDropDownIcon
@@ -83,11 +72,6 @@ export interface SelectProps<T = unknown>
83
72
  * Props applied to the [`Menu`](/material-ui/api/menu/) element.
84
73
  */
85
74
  MenuProps?: Partial<MenuProps>;
86
- /**
87
- * If `true`, `value` must be an array and the menu will support multiple selections.
88
- * @default false
89
- */
90
- multiple?: boolean;
91
75
  /**
92
76
  * If `true`, the component uses a native `select` element.
93
77
  * @default false
@@ -121,14 +105,6 @@ export interface SelectProps<T = unknown>
121
105
  * You can only use it when the `native` prop is `false` (default).
122
106
  */
123
107
  open?: boolean;
124
- /**
125
- * Render the selected value.
126
- * You can only use it when the `native` prop is `false` (default).
127
- *
128
- * @param {any} value The `value` provided to the component.
129
- * @returns {ReactNode}
130
- */
131
- renderValue?: (value: T) => React.ReactNode;
132
108
  /**
133
109
  * Props applied to the clickable div element.
134
110
  */
@@ -152,6 +128,88 @@ export interface SelectProps<T = unknown>
152
128
  variant?: 'standard' | 'outlined' | 'filled';
153
129
  }
154
130
 
131
+ type ConditionalRenderValueType<T> =
132
+ | {
133
+ /**
134
+ * If `true`, a value is displayed even if no items are selected.
135
+ *
136
+ * In order to display a meaningful value, a function can be passed to the `renderValue` prop which
137
+ * returns the value to be displayed when no items are selected.
138
+ *
139
+ * ⚠️ When using this prop, make sure the label doesn't overlap with the empty displayed value.
140
+ * The label should either be hidden or forced to a shrunk state.
141
+ * @default false
142
+ */
143
+ displayEmpty?: false;
144
+ /**
145
+ * If `true`, `value` must be an array and the menu will support multiple selections.
146
+ * @default false
147
+ */
148
+ multiple?: boolean;
149
+ /**
150
+ * Render the selected value.
151
+ * You can only use it when the `native` prop is `false` (default).
152
+ *
153
+ * @param {any} value The `value` provided to the component.
154
+ * @returns {ReactNode}
155
+ */
156
+ renderValue?: (value: T) => React.ReactNode;
157
+ }
158
+ | {
159
+ /**
160
+ * If `true`, a value is displayed even if no items are selected.
161
+ *
162
+ * In order to display a meaningful value, a function can be passed to the `renderValue` prop which
163
+ * returns the value to be displayed when no items are selected.
164
+ *
165
+ * ⚠️ When using this prop, make sure the label doesn't overlap with the empty displayed value.
166
+ * The label should either be hidden or forced to a shrunk state.
167
+ * @default false
168
+ */
169
+ displayEmpty: true;
170
+ /**
171
+ * If `true`, `value` must be an array and the menu will support multiple selections.
172
+ * @default false
173
+ */
174
+ multiple?: false;
175
+ /**
176
+ * Render the selected value.
177
+ * You can only use it when the `native` prop is `false` (default).
178
+ *
179
+ * @param {any} value The `value` provided to the component.
180
+ * @returns {ReactNode}
181
+ */
182
+ renderValue?: (value: T | '') => React.ReactNode;
183
+ }
184
+ | {
185
+ /**
186
+ * If `true`, a value is displayed even if no items are selected.
187
+ *
188
+ * In order to display a meaningful value, a function can be passed to the `renderValue` prop which
189
+ * returns the value to be displayed when no items are selected.
190
+ *
191
+ * ⚠️ When using this prop, make sure the label doesn't overlap with the empty displayed value.
192
+ * The label should either be hidden or forced to a shrunk state.
193
+ * @default false
194
+ */
195
+ displayEmpty: true;
196
+ /**
197
+ * If `true`, `value` must be an array and the menu will support multiple selections.
198
+ * @default false
199
+ */
200
+ multiple: true;
201
+ /**
202
+ * Render the selected value.
203
+ * You can only use it when the `native` prop is `false` (default).
204
+ *
205
+ * @param {any} value The `value` provided to the component.
206
+ * @returns {ReactNode}
207
+ */
208
+ renderValue?: (value: T) => React.ReactNode;
209
+ };
210
+
211
+ export type SelectProps<T = unknown> = CommonProps<T> & ConditionalRenderValueType<T>;
212
+
155
213
  /**
156
214
  *
157
215
  * Demos:
@@ -159,6 +159,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
159
159
  setDisplayNode(node);
160
160
  }
161
161
  }, []);
162
+ const anchorElement = displayNode == null ? void 0 : displayNode.parentNode;
162
163
  React.useImperativeHandle(handleRef, () => ({
163
164
  focus: () => {
164
165
  displayRef.current.focus();
@@ -170,7 +171,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
170
171
  // Resize menu on `defaultOpen` automatic toggle.
171
172
  React.useEffect(() => {
172
173
  if (defaultOpen && openState && displayNode && !isOpenControlled) {
173
- setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);
174
+ setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
174
175
  displayRef.current.focus();
175
176
  }
176
177
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -209,7 +210,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
209
210
  onClose(event);
210
211
  }
211
212
  if (!isOpenControlled) {
212
- setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);
213
+ setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
213
214
  setOpenState(open);
214
215
  }
215
216
  };
@@ -329,6 +330,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
329
330
  }
330
331
  }
331
332
  const items = childrenArray.map((child, index, arr) => {
333
+ var _arr$, _arr$$props, _arr$2, _arr$2$props;
332
334
  if (! /*#__PURE__*/React.isValidElement(child)) {
333
335
  return null;
334
336
  }
@@ -365,7 +367,10 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
365
367
  if (value) {
366
368
  return selected;
367
369
  }
368
- const firstSelectableElement = arr.find(item => item.props.value !== undefined && item.props.disabled !== true);
370
+ const firstSelectableElement = arr.find(item => {
371
+ var _item$props;
372
+ return (item == null ? void 0 : (_item$props = item.props) == null ? void 0 : _item$props.value) !== undefined && item.props.disabled !== true;
373
+ });
369
374
  if (child === firstSelectableElement) {
370
375
  return true;
371
376
  }
@@ -386,7 +391,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
386
391
  }
387
392
  },
388
393
  role: 'option',
389
- selected: arr[0].props.value === undefined || arr[0].props.disabled === true ? isFirstSelectableElement() : selected,
394
+ selected: ((_arr$ = arr[0]) == null ? void 0 : (_arr$$props = _arr$.props) == null ? void 0 : _arr$$props.value) === undefined || ((_arr$2 = arr[0]) == null ? void 0 : (_arr$2$props = _arr$2.props) == null ? void 0 : _arr$2$props.disabled) === true ? isFirstSelectableElement() : selected,
390
395
  value: undefined,
391
396
  // The value is most likely not a valid HTML attribute.
392
397
  'data-value': child.props.value // Instead, we provide it as a data attribute.
@@ -423,7 +428,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
423
428
  // Avoid performing a layout computation in the render method.
424
429
  let menuMinWidth = menuMinWidthState;
425
430
  if (!autoWidth && isOpenControlled && displayNode) {
426
- menuMinWidth = displayNode.clientWidth;
431
+ menuMinWidth = anchorElement.clientWidth;
427
432
  }
428
433
  let tabIndex;
429
434
  if (typeof tabIndexProp !== 'undefined') {
@@ -481,7 +486,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
481
486
  ownerState: ownerState
482
487
  }), /*#__PURE__*/_jsx(Menu, _extends({
483
488
  id: `menu-${name || ''}`,
484
- anchorEl: displayNode,
489
+ anchorEl: anchorElement,
485
490
  open: open,
486
491
  onClose: handleClose,
487
492
  anchorOrigin: {
package/Slider/Slider.js CHANGED
@@ -620,11 +620,6 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
620
620
  * @returns {string}
621
621
  */
622
622
  getAriaValueText: PropTypes.func,
623
- /**
624
- * Indicates whether the theme context has rtl direction. It is set automatically.
625
- * @default false
626
- */
627
- isRtl: PropTypes.bool,
628
623
  /**
629
624
  * Marks indicate predetermined values to which the user can move the slider.
630
625
  * If `true` the marks are spaced according the value of the `step` prop.
@@ -120,7 +120,11 @@ const TableCell = /*#__PURE__*/React.forwardRef(function TableCell(inProps, ref)
120
120
  component = isHeadCell ? 'th' : 'td';
121
121
  }
122
122
  let scope = scopeProp;
123
- if (!scope && isHeadCell) {
123
+ // scope is not a valid attribute for <td/> elements.
124
+ // source: https://html.spec.whatwg.org/multipage/tables.html#the-td-element
125
+ if (component === 'td') {
126
+ scope = undefined;
127
+ } else if (!scope && isHeadCell) {
124
128
  scope = 'col';
125
129
  }
126
130
  const variant = variantProp || tablelvl2 && tablelvl2.variant;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.11.1
1
+ /** @license MUI v5.11.3
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.
@@ -30,15 +30,15 @@ var PopperRoot = styled(PopperUnstyled, {
30
30
  var Popper = /*#__PURE__*/React.forwardRef(function Popper(inProps, ref) {
31
31
  var _slots$root;
32
32
  var theme = useTheme();
33
- var _useThemeProps = useThemeProps({
34
- props: inProps,
35
- name: 'MuiPopper'
36
- }),
37
- components = _useThemeProps.components,
38
- componentsProps = _useThemeProps.componentsProps,
39
- slots = _useThemeProps.slots,
40
- slotProps = _useThemeProps.slotProps,
41
- other = _objectWithoutProperties(_useThemeProps, ["components", "componentsProps", "slots", "slotProps"]);
33
+ var props = useThemeProps({
34
+ props: inProps,
35
+ name: 'MuiPopper'
36
+ });
37
+ var components = props.components,
38
+ componentsProps = props.componentsProps,
39
+ slots = props.slots,
40
+ slotProps = props.slotProps,
41
+ other = _objectWithoutProperties(props, ["components", "componentsProps", "slots", "slotProps"]);
42
42
  var RootComponent = (_slots$root = slots == null ? void 0 : slots.root) != null ? _slots$root : components == null ? void 0 : components.Root;
43
43
  return /*#__PURE__*/_jsx(PopperRoot, _extends({
44
44
  direction: theme == null ? void 0 : theme.direction,
@@ -129,6 +129,10 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes /* remove-proptypes */
129
129
  * If `true`, the component is shown.
130
130
  */
131
131
  open: PropTypes.bool.isRequired,
132
+ /**
133
+ * @ignore
134
+ */
135
+ ownerState: PropTypes.any,
132
136
  /**
133
137
  * Popper placement.
134
138
  * @default 'bottom'
@@ -160,6 +160,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
160
160
  setDisplayNode(node);
161
161
  }
162
162
  }, []);
163
+ var anchorElement = displayNode == null ? void 0 : displayNode.parentNode;
163
164
  React.useImperativeHandle(handleRef, function () {
164
165
  return {
165
166
  focus: function focus() {
@@ -173,7 +174,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
173
174
  // Resize menu on `defaultOpen` automatic toggle.
174
175
  React.useEffect(function () {
175
176
  if (defaultOpen && openState && displayNode && !isOpenControlled) {
176
- setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);
177
+ setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
177
178
  displayRef.current.focus();
178
179
  }
179
180
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -212,7 +213,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
212
213
  onClose(event);
213
214
  }
214
215
  if (!isOpenControlled) {
215
- setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);
216
+ setMenuMinWidthState(autoWidth ? null : anchorElement.clientWidth);
216
217
  setOpenState(open);
217
218
  }
218
219
  };
@@ -336,6 +337,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
336
337
  }
337
338
  }
338
339
  var items = childrenArray.map(function (child, index, arr) {
340
+ var _arr$, _arr$$props, _arr$2, _arr$2$props;
339
341
  if (! /*#__PURE__*/React.isValidElement(child)) {
340
342
  return null;
341
343
  }
@@ -375,7 +377,8 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
375
377
  return selected;
376
378
  }
377
379
  var firstSelectableElement = arr.find(function (item) {
378
- return item.props.value !== undefined && item.props.disabled !== true;
380
+ var _item$props;
381
+ return (item == null ? void 0 : (_item$props = item.props) == null ? void 0 : _item$props.value) !== undefined && item.props.disabled !== true;
379
382
  });
380
383
  if (child === firstSelectableElement) {
381
384
  return true;
@@ -397,7 +400,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
397
400
  }
398
401
  },
399
402
  role: 'option',
400
- selected: arr[0].props.value === undefined || arr[0].props.disabled === true ? isFirstSelectableElement() : selected,
403
+ selected: ((_arr$ = arr[0]) == null ? void 0 : (_arr$$props = _arr$.props) == null ? void 0 : _arr$$props.value) === undefined || ((_arr$2 = arr[0]) == null ? void 0 : (_arr$2$props = _arr$2.props) == null ? void 0 : _arr$2$props.disabled) === true ? isFirstSelectableElement() : selected,
401
404
  value: undefined,
402
405
  // The value is most likely not a valid HTML attribute.
403
406
  'data-value': child.props.value // Instead, we provide it as a data attribute.
@@ -440,7 +443,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
440
443
  // Avoid performing a layout computation in the render method.
441
444
  var menuMinWidth = menuMinWidthState;
442
445
  if (!autoWidth && isOpenControlled && displayNode) {
443
- menuMinWidth = displayNode.clientWidth;
446
+ menuMinWidth = anchorElement.clientWidth;
444
447
  }
445
448
  var tabIndex;
446
449
  if (typeof tabIndexProp !== 'undefined') {
@@ -498,7 +501,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
498
501
  ownerState: ownerState
499
502
  }), /*#__PURE__*/_jsx(Menu, _extends({
500
503
  id: "menu-".concat(name || ''),
501
- anchorEl: displayNode,
504
+ anchorEl: anchorElement,
502
505
  open: open,
503
506
  onClose: handleClose,
504
507
  anchorOrigin: {
@@ -624,11 +624,6 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
624
624
  * @returns {string}
625
625
  */
626
626
  getAriaValueText: PropTypes.func,
627
- /**
628
- * Indicates whether the theme context has rtl direction. It is set automatically.
629
- * @default false
630
- */
631
- isRtl: PropTypes.bool,
632
627
  /**
633
628
  * Marks indicate predetermined values to which the user can move the slider.
634
629
  * If `true` the marks are spaced according the value of the `step` prop.
@@ -114,7 +114,11 @@ var TableCell = /*#__PURE__*/React.forwardRef(function TableCell(inProps, ref) {
114
114
  component = isHeadCell ? 'th' : 'td';
115
115
  }
116
116
  var scope = scopeProp;
117
- if (!scope && isHeadCell) {
117
+ // scope is not a valid attribute for <td/> elements.
118
+ // source: https://html.spec.whatwg.org/multipage/tables.html#the-td-element
119
+ if (component === 'td') {
120
+ scope = undefined;
121
+ } else if (!scope && isHeadCell) {
118
122
  scope = 'col';
119
123
  }
120
124
  var variant = variantProp || tablelvl2 && tablelvl2.variant;
package/legacy/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.11.1
1
+ /** @license MUI v5.11.3
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.