@mui/material 6.0.1 → 6.1.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.
- package/Accordion/Accordion.d.ts +2 -2
- package/Alert/Alert.d.ts +2 -2
- package/Alert/Alert.js +4 -3
- package/AppBar/AppBar.js +2 -1
- package/Autocomplete/Autocomplete.d.ts +8 -6
- package/Autocomplete/Autocomplete.js +4 -4
- package/Avatar/Avatar.d.ts +1 -1
- package/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/Backdrop/Backdrop.d.ts +2 -2
- package/Badge/Badge.js +2 -1
- package/Button/Button.js +2 -1
- package/ButtonGroup/ButtonGroup.js +3 -2
- package/CHANGELOG.md +127 -15130
- package/Checkbox/Checkbox.js +3 -2
- package/Chip/Chip.js +6 -5
- package/CircularProgress/CircularProgress.js +2 -1
- package/Dialog/Dialog.js +1 -0
- package/Fab/Fab.js +2 -1
- package/FilledInput/FilledInput.js +2 -1
- package/FormControl/FormControl.d.ts +4 -4
- package/FormControlLabel/FormControlLabel.d.ts +1 -1
- package/FormLabel/FormLabel.js +2 -1
- package/Grid/Grid.d.ts +0 -1
- package/Grid/Grid.js +0 -1
- package/Icon/Icon.js +2 -1
- package/IconButton/IconButton.js +3 -2
- package/Input/Input.js +2 -1
- package/InputAdornment/InputAdornment.js +1 -1
- package/InputBase/InputBase.js +1 -1
- package/LinearProgress/LinearProgress.js +6 -5
- package/Link/Link.js +2 -1
- package/MenuList/MenuList.js +8 -0
- package/Modal/Modal.d.ts +4 -4
- package/NoSsr/NoSsr.d.ts +4 -4
- package/NoSsr/NoSsr.js +4 -4
- package/OutlinedInput/OutlinedInput.js +2 -1
- package/PaginationItem/PaginationItem.d.ts +4 -4
- package/PaginationItem/PaginationItem.js +3 -2
- package/Popover/Popover.d.ts +27 -4
- package/Popover/Popover.js +20 -0
- package/Portal/Portal.js +1 -1
- package/Radio/Radio.js +19 -3
- package/Slider/Slider.js +4 -3
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/StepButton/StepButton.js +1 -1
- package/StepLabel/StepLabel.d.ts +2 -2
- package/Switch/Switch.js +2 -1
- package/TextField/TextField.d.ts +13 -13
- package/ToggleButton/ToggleButton.js +2 -1
- package/Typography/Typography.js +2 -1
- package/index.js +1 -1
- package/internal/svg-icons/Add.js +1 -1
- package/internal/svg-icons/ArrowDownward.js +1 -1
- package/internal/svg-icons/ArrowDropDown.js +1 -1
- package/internal/svg-icons/Cancel.js +1 -1
- package/internal/svg-icons/CheckBox.js +1 -1
- package/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
- package/internal/svg-icons/CheckCircle.js +1 -1
- package/internal/svg-icons/Close.js +1 -1
- package/internal/svg-icons/ErrorOutline.js +1 -1
- package/internal/svg-icons/FirstPage.js +1 -1
- package/internal/svg-icons/IndeterminateCheckBox.js +1 -1
- package/internal/svg-icons/InfoOutlined.js +1 -1
- package/internal/svg-icons/KeyboardArrowLeft.js +1 -1
- package/internal/svg-icons/KeyboardArrowRight.js +1 -1
- package/internal/svg-icons/LastPage.js +1 -1
- package/internal/svg-icons/MoreHoriz.js +1 -1
- package/internal/svg-icons/NavigateBefore.js +1 -1
- package/internal/svg-icons/NavigateNext.js +1 -1
- package/internal/svg-icons/Person.js +1 -1
- package/internal/svg-icons/RadioButtonChecked.js +1 -1
- package/internal/svg-icons/RadioButtonUnchecked.js +1 -1
- package/internal/svg-icons/ReportProblemOutlined.js +1 -1
- package/internal/svg-icons/Star.js +1 -1
- package/internal/svg-icons/StarBorder.js +1 -1
- package/internal/svg-icons/SuccessOutlined.js +1 -1
- package/internal/svg-icons/Warning.js +1 -1
- package/modern/Alert/Alert.js +4 -3
- package/modern/AppBar/AppBar.js +2 -1
- package/modern/Autocomplete/Autocomplete.js +4 -4
- package/modern/Badge/Badge.js +2 -1
- package/modern/Button/Button.js +2 -1
- package/modern/ButtonGroup/ButtonGroup.js +3 -2
- package/modern/Checkbox/Checkbox.js +3 -2
- package/modern/Chip/Chip.js +6 -5
- package/modern/CircularProgress/CircularProgress.js +2 -1
- package/modern/Dialog/Dialog.js +1 -0
- package/modern/Fab/Fab.js +2 -1
- package/modern/FilledInput/FilledInput.js +2 -1
- package/modern/FormLabel/FormLabel.js +2 -1
- package/modern/Grid/Grid.js +0 -1
- package/modern/Icon/Icon.js +2 -1
- package/modern/IconButton/IconButton.js +3 -2
- package/modern/Input/Input.js +2 -1
- package/modern/InputAdornment/InputAdornment.js +1 -1
- package/modern/InputBase/InputBase.js +1 -1
- package/modern/LinearProgress/LinearProgress.js +6 -5
- package/modern/Link/Link.js +2 -1
- package/modern/MenuList/MenuList.js +8 -0
- package/modern/NoSsr/NoSsr.js +4 -4
- package/modern/OutlinedInput/OutlinedInput.js +2 -1
- package/modern/PaginationItem/PaginationItem.js +3 -2
- package/modern/Popover/Popover.js +20 -0
- package/modern/Portal/Portal.js +1 -1
- package/modern/Radio/Radio.js +19 -3
- package/modern/Slider/Slider.js +4 -3
- package/modern/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/modern/StepButton/StepButton.js +1 -1
- package/modern/Switch/Switch.js +2 -1
- package/modern/ToggleButton/ToggleButton.js +2 -1
- package/modern/Typography/Typography.js +2 -1
- package/modern/index.js +1 -1
- package/modern/internal/svg-icons/Add.js +1 -1
- package/modern/internal/svg-icons/ArrowDownward.js +1 -1
- package/modern/internal/svg-icons/ArrowDropDown.js +1 -1
- package/modern/internal/svg-icons/Cancel.js +1 -1
- package/modern/internal/svg-icons/CheckBox.js +1 -1
- package/modern/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
- package/modern/internal/svg-icons/CheckCircle.js +1 -1
- package/modern/internal/svg-icons/Close.js +1 -1
- package/modern/internal/svg-icons/ErrorOutline.js +1 -1
- package/modern/internal/svg-icons/FirstPage.js +1 -1
- package/modern/internal/svg-icons/IndeterminateCheckBox.js +1 -1
- package/modern/internal/svg-icons/InfoOutlined.js +1 -1
- package/modern/internal/svg-icons/KeyboardArrowLeft.js +1 -1
- package/modern/internal/svg-icons/KeyboardArrowRight.js +1 -1
- package/modern/internal/svg-icons/LastPage.js +1 -1
- package/modern/internal/svg-icons/MoreHoriz.js +1 -1
- package/modern/internal/svg-icons/NavigateBefore.js +1 -1
- package/modern/internal/svg-icons/NavigateNext.js +1 -1
- package/modern/internal/svg-icons/Person.js +1 -1
- package/modern/internal/svg-icons/RadioButtonChecked.js +1 -1
- package/modern/internal/svg-icons/RadioButtonUnchecked.js +1 -1
- package/modern/internal/svg-icons/ReportProblemOutlined.js +1 -1
- package/modern/internal/svg-icons/Star.js +1 -1
- package/modern/internal/svg-icons/StarBorder.js +1 -1
- package/modern/internal/svg-icons/SuccessOutlined.js +1 -1
- package/modern/internal/svg-icons/Warning.js +1 -1
- package/modern/styles/ThemeProviderWithVars.js +5 -3
- package/modern/styles/createGetSelector.js +2 -2
- package/modern/styles/createTheme.js +22 -3
- package/modern/utils/createSimplePaletteValueFilter.js +41 -0
- package/modern/utils/createSvgIcon.js +1 -1
- package/modern/version/index.js +4 -5
- package/node/Alert/Alert.js +4 -3
- package/node/AppBar/AppBar.js +2 -1
- package/node/Autocomplete/Autocomplete.js +4 -4
- package/node/Badge/Badge.js +2 -1
- package/node/Button/Button.js +2 -1
- package/node/ButtonGroup/ButtonGroup.js +3 -2
- package/node/Checkbox/Checkbox.js +3 -2
- package/node/Chip/Chip.js +6 -5
- package/node/CircularProgress/CircularProgress.js +2 -1
- package/node/Dialog/Dialog.js +1 -0
- package/node/Fab/Fab.js +2 -1
- package/node/FilledInput/FilledInput.js +2 -1
- package/node/FormLabel/FormLabel.js +2 -1
- package/node/Grid/Grid.js +0 -1
- package/node/Icon/Icon.js +2 -1
- package/node/IconButton/IconButton.js +3 -2
- package/node/Input/Input.js +2 -1
- package/node/InputAdornment/InputAdornment.js +1 -1
- package/node/InputBase/InputBase.js +1 -1
- package/node/LinearProgress/LinearProgress.js +6 -5
- package/node/Link/Link.js +2 -1
- package/node/MenuList/MenuList.js +8 -0
- package/node/NoSsr/NoSsr.js +4 -4
- package/node/OutlinedInput/OutlinedInput.js +2 -1
- package/node/PaginationItem/PaginationItem.js +3 -2
- package/node/Popover/Popover.js +20 -0
- package/node/Portal/Portal.js +1 -1
- package/node/Radio/Radio.js +19 -3
- package/node/Slider/Slider.js +4 -3
- package/node/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/node/StepButton/StepButton.js +1 -1
- package/node/Switch/Switch.js +2 -1
- package/node/ToggleButton/ToggleButton.js +2 -1
- package/node/Typography/Typography.js +2 -1
- package/node/index.js +1 -1
- package/node/internal/svg-icons/Add.js +1 -1
- package/node/internal/svg-icons/ArrowDownward.js +1 -1
- package/node/internal/svg-icons/ArrowDropDown.js +1 -1
- package/node/internal/svg-icons/Cancel.js +1 -1
- package/node/internal/svg-icons/CheckBox.js +1 -1
- package/node/internal/svg-icons/CheckBoxOutlineBlank.js +1 -1
- package/node/internal/svg-icons/CheckCircle.js +1 -1
- package/node/internal/svg-icons/Close.js +1 -1
- package/node/internal/svg-icons/ErrorOutline.js +1 -1
- package/node/internal/svg-icons/FirstPage.js +1 -1
- package/node/internal/svg-icons/IndeterminateCheckBox.js +1 -1
- package/node/internal/svg-icons/InfoOutlined.js +1 -1
- package/node/internal/svg-icons/KeyboardArrowLeft.js +1 -1
- package/node/internal/svg-icons/KeyboardArrowRight.js +1 -1
- package/node/internal/svg-icons/LastPage.js +1 -1
- package/node/internal/svg-icons/MoreHoriz.js +1 -1
- package/node/internal/svg-icons/NavigateBefore.js +1 -1
- package/node/internal/svg-icons/NavigateNext.js +1 -1
- package/node/internal/svg-icons/Person.js +1 -1
- package/node/internal/svg-icons/RadioButtonChecked.js +1 -1
- package/node/internal/svg-icons/RadioButtonUnchecked.js +1 -1
- package/node/internal/svg-icons/ReportProblemOutlined.js +1 -1
- package/node/internal/svg-icons/Star.js +1 -1
- package/node/internal/svg-icons/StarBorder.js +1 -1
- package/node/internal/svg-icons/SuccessOutlined.js +1 -1
- package/node/internal/svg-icons/Warning.js +1 -1
- package/node/styles/ThemeProviderWithVars.js +5 -3
- package/node/styles/createTheme.js +22 -3
- package/node/utils/createSimplePaletteValueFilter.js +47 -0
- package/node/utils/createSvgIcon.js +1 -1
- package/node/version/index.js +5 -6
- package/package.json +7 -7
- package/styles/ThemeProviderWithVars.js +5 -3
- package/styles/createGetSelector.js +2 -2
- package/styles/createTheme.js +22 -3
- package/utils/createSimplePaletteValueFilter.d.ts +12 -0
- package/utils/createSimplePaletteValueFilter.js +41 -0
- package/utils/createSvgIcon.js +1 -1
- package/utils/memoTheme.d.ts +1 -1
- package/utils/types.d.ts +3 -2
- package/version/index.d.ts +1 -2
- package/version/index.js +4 -5
package/Checkbox/Checkbox.js
CHANGED
|
@@ -15,6 +15,7 @@ import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
|
|
|
15
15
|
import checkboxClasses, { getCheckboxUtilityClass } from "./checkboxClasses.js";
|
|
16
16
|
import { styled } from "../zero-styled/index.js";
|
|
17
17
|
import memoTheme from "../utils/memoTheme.js";
|
|
18
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
18
19
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
19
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
21
|
const useUtilityClasses = ownerState => {
|
|
@@ -58,7 +59,7 @@ const CheckboxRoot = styled(SwitchBase, {
|
|
|
58
59
|
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)
|
|
59
60
|
}
|
|
60
61
|
}
|
|
61
|
-
}, ...Object.entries(theme.palette).filter((
|
|
62
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
62
63
|
props: {
|
|
63
64
|
color,
|
|
64
65
|
disableRipple: false
|
|
@@ -68,7 +69,7 @@ const CheckboxRoot = styled(SwitchBase, {
|
|
|
68
69
|
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette[color].main, theme.palette.action.hoverOpacity)
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
|
-
})), ...Object.entries(theme.palette).filter((
|
|
72
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
72
73
|
props: {
|
|
73
74
|
color
|
|
74
75
|
},
|
package/Chip/Chip.js
CHANGED
|
@@ -12,6 +12,7 @@ import capitalize from "../utils/capitalize.js";
|
|
|
12
12
|
import ButtonBase from "../ButtonBase/index.js";
|
|
13
13
|
import { styled } from "../zero-styled/index.js";
|
|
14
14
|
import memoTheme from "../utils/memoTheme.js";
|
|
15
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
15
16
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
16
17
|
import chipClasses, { getChipUtilityClass } from "./chipClasses.js";
|
|
17
18
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -158,7 +159,7 @@ const ChipRoot = styled('div', {
|
|
|
158
159
|
marginLeft: -4
|
|
159
160
|
}
|
|
160
161
|
}
|
|
161
|
-
}, ...Object.entries(theme.palette).filter(([
|
|
162
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => {
|
|
162
163
|
return {
|
|
163
164
|
props: {
|
|
164
165
|
color
|
|
@@ -197,7 +198,7 @@ const ChipRoot = styled('div', {
|
|
|
197
198
|
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.selectedChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.focusOpacity}))` : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
198
199
|
}
|
|
199
200
|
}
|
|
200
|
-
}, ...Object.entries(theme.palette).filter(([
|
|
201
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark'])).map(([color]) => {
|
|
201
202
|
return {
|
|
202
203
|
props: {
|
|
203
204
|
color,
|
|
@@ -227,7 +228,7 @@ const ChipRoot = styled('div', {
|
|
|
227
228
|
boxShadow: (theme.vars || theme).shadows[1]
|
|
228
229
|
}
|
|
229
230
|
}
|
|
230
|
-
}, ...Object.entries(theme.palette).filter(([
|
|
231
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark'])).map(([color]) => ({
|
|
231
232
|
props: {
|
|
232
233
|
color,
|
|
233
234
|
clickable: true
|
|
@@ -269,7 +270,7 @@ const ChipRoot = styled('div', {
|
|
|
269
270
|
marginRight: 3
|
|
270
271
|
}
|
|
271
272
|
}
|
|
272
|
-
}, ...Object.entries(theme.palette).filter((
|
|
273
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // no need to check for mainChannel as it's calculated from main
|
|
273
274
|
.map(([color]) => ({
|
|
274
275
|
props: {
|
|
275
276
|
variant: 'outlined',
|
|
@@ -426,7 +427,7 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
426
427
|
} : {};
|
|
427
428
|
let deleteIcon = null;
|
|
428
429
|
if (onDelete) {
|
|
429
|
-
deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? (
|
|
430
|
+
deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? (/*#__PURE__*/React.cloneElement(deleteIconProp, {
|
|
430
431
|
className: clsx(deleteIconProp.props.className, classes.deleteIcon),
|
|
431
432
|
onClick: handleDeleteIconClick
|
|
432
433
|
})) : /*#__PURE__*/_jsx(CancelIcon, {
|
|
@@ -9,6 +9,7 @@ import { keyframes, css, styled } from "../zero-styled/index.js";
|
|
|
9
9
|
import memoTheme from "../utils/memoTheme.js";
|
|
10
10
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
11
11
|
import capitalize from "../utils/capitalize.js";
|
|
12
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
12
13
|
import { getCircularProgressUtilityClass } from "./circularProgressClasses.js";
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
15
|
const SIZE = 44;
|
|
@@ -88,7 +89,7 @@ const CircularProgressRoot = styled('span', {
|
|
|
88
89
|
style: rotateAnimation || {
|
|
89
90
|
animation: `${circularRotateKeyframe} 1.4s linear infinite`
|
|
90
91
|
}
|
|
91
|
-
}, ...Object.entries(theme.palette).filter((
|
|
92
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
92
93
|
props: {
|
|
93
94
|
color
|
|
94
95
|
},
|
package/Dialog/Dialog.js
CHANGED
package/Fab/Fab.js
CHANGED
|
@@ -10,6 +10,7 @@ import fabClasses, { getFabUtilityClass } from "./fabClasses.js";
|
|
|
10
10
|
import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
|
|
11
11
|
import { styled } from "../zero-styled/index.js";
|
|
12
12
|
import memoTheme from "../utils/memoTheme.js";
|
|
13
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
13
14
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
const useUtilityClasses = ownerState => {
|
|
@@ -133,7 +134,7 @@ const FabRoot = styled(ButtonBase, {
|
|
|
133
134
|
})), memoTheme(({
|
|
134
135
|
theme
|
|
135
136
|
}) => ({
|
|
136
|
-
variants: [...Object.entries(theme.palette).filter(([,
|
|
137
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark', 'contrastText'])) // check all the used fields in the style below
|
|
137
138
|
.map(([color]) => ({
|
|
138
139
|
props: {
|
|
139
140
|
color
|
|
@@ -9,6 +9,7 @@ import InputBase from "../InputBase/index.js";
|
|
|
9
9
|
import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
|
|
10
10
|
import { styled } from "../zero-styled/index.js";
|
|
11
11
|
import memoTheme from "../utils/memoTheme.js";
|
|
12
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
12
13
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
13
14
|
import filledInputClasses, { getFilledInputUtilityClass } from "./filledInputClasses.js";
|
|
14
15
|
import { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from "../InputBase/InputBase.js";
|
|
@@ -122,7 +123,7 @@ const FilledInputRoot = styled(InputBaseRoot, {
|
|
|
122
123
|
borderBottomStyle: 'dotted'
|
|
123
124
|
}
|
|
124
125
|
}
|
|
125
|
-
}, ...Object.entries(theme.palette).filter((
|
|
126
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
|
|
126
127
|
.map(([color]) => ({
|
|
127
128
|
props: {
|
|
128
129
|
disableUnderline: false,
|
|
@@ -93,10 +93,10 @@ export interface FormControlTypeMap<
|
|
|
93
93
|
* consistent across the children of the `FormControl`.
|
|
94
94
|
* This context is used by the following components:
|
|
95
95
|
*
|
|
96
|
-
* *
|
|
97
|
-
* *
|
|
98
|
-
* *
|
|
99
|
-
* *
|
|
96
|
+
* * FormLabel
|
|
97
|
+
* * FormHelperText
|
|
98
|
+
* * Input
|
|
99
|
+
* * InputLabel
|
|
100
100
|
*
|
|
101
101
|
* You can find one composition example below and more going to [the demos](https://mui.com/material-ui/react-text-field/#components).
|
|
102
102
|
*
|
|
@@ -11,7 +11,7 @@ export interface FormControlLabelSlots {
|
|
|
11
11
|
* This is unused if `disableTypography` is true.
|
|
12
12
|
* @default Typography
|
|
13
13
|
*/
|
|
14
|
-
typography
|
|
14
|
+
typography: React.ElementType;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export type FormControlLabelSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
package/FormLabel/FormLabel.js
CHANGED
|
@@ -9,6 +9,7 @@ import useFormControl from "../FormControl/useFormControl.js";
|
|
|
9
9
|
import capitalize from "../utils/capitalize.js";
|
|
10
10
|
import { styled } from "../zero-styled/index.js";
|
|
11
11
|
import memoTheme from "../utils/memoTheme.js";
|
|
12
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
12
13
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
13
14
|
import formLabelClasses, { getFormLabelUtilityClasses } from "./formLabelClasses.js";
|
|
14
15
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -48,7 +49,7 @@ export const FormLabelRoot = styled('label', {
|
|
|
48
49
|
lineHeight: '1.4375em',
|
|
49
50
|
padding: 0,
|
|
50
51
|
position: 'relative',
|
|
51
|
-
variants: [...Object.entries(theme.palette).filter((
|
|
52
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
52
53
|
props: {
|
|
53
54
|
color
|
|
54
55
|
},
|
package/Grid/Grid.d.ts
CHANGED
|
@@ -139,7 +139,6 @@ export interface GridOwnProps extends SystemProps<Theme>, Breakpoints {
|
|
|
139
139
|
* Defines the `flex-wrap` style property.
|
|
140
140
|
* It's applied for all screen sizes.
|
|
141
141
|
* @default 'wrap'
|
|
142
|
-
* @deprecated Use `flexWrap` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
143
142
|
*/
|
|
144
143
|
wrap?: GridWrap;
|
|
145
144
|
/**
|
package/Grid/Grid.js
CHANGED
|
@@ -530,7 +530,6 @@ process.env.NODE_ENV !== "production" ? Grid.propTypes /* remove-proptypes */ =
|
|
|
530
530
|
* Defines the `flex-wrap` style property.
|
|
531
531
|
* It's applied for all screen sizes.
|
|
532
532
|
* @default 'wrap'
|
|
533
|
-
* @deprecated Use `flexWrap` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
534
533
|
*/
|
|
535
534
|
wrap: PropTypes.oneOf(['nowrap', 'wrap-reverse', 'wrap']),
|
|
536
535
|
/**
|
package/Icon/Icon.js
CHANGED
|
@@ -7,6 +7,7 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
7
7
|
import capitalize from "../utils/capitalize.js";
|
|
8
8
|
import { styled } from "../zero-styled/index.js";
|
|
9
9
|
import memoTheme from "../utils/memoTheme.js";
|
|
10
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
10
11
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
11
12
|
import { getIconUtilityClass } from "./iconClasses.js";
|
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -93,7 +94,7 @@ const IconRoot = styled('span', {
|
|
|
93
94
|
style: {
|
|
94
95
|
color: undefined
|
|
95
96
|
}
|
|
96
|
-
}, ...Object.entries(theme.palette).filter((
|
|
97
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
97
98
|
props: {
|
|
98
99
|
color
|
|
99
100
|
},
|
package/IconButton/IconButton.js
CHANGED
|
@@ -8,6 +8,7 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
8
8
|
import { alpha } from '@mui/system/colorManipulator';
|
|
9
9
|
import { styled } from "../zero-styled/index.js";
|
|
10
10
|
import memoTheme from "../utils/memoTheme.js";
|
|
11
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
11
12
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
12
13
|
import ButtonBase from "../ButtonBase/index.js";
|
|
13
14
|
import capitalize from "../utils/capitalize.js";
|
|
@@ -101,7 +102,7 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
|
101
102
|
style: {
|
|
102
103
|
color: 'inherit'
|
|
103
104
|
}
|
|
104
|
-
}, ...Object.entries(theme.palette).filter((
|
|
105
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
|
|
105
106
|
.map(([color]) => ({
|
|
106
107
|
props: {
|
|
107
108
|
color
|
|
@@ -109,7 +110,7 @@ const IconButtonRoot = styled(ButtonBase, {
|
|
|
109
110
|
style: {
|
|
110
111
|
color: (theme.vars || theme).palette[color].main
|
|
111
112
|
}
|
|
112
|
-
})), ...Object.entries(theme.palette).filter((
|
|
113
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()) // check all the used fields in the style below
|
|
113
114
|
.map(([color]) => ({
|
|
114
115
|
props: {
|
|
115
116
|
color,
|
package/Input/Input.js
CHANGED
|
@@ -9,6 +9,7 @@ import InputBase from "../InputBase/index.js";
|
|
|
9
9
|
import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
|
|
10
10
|
import { styled } from "../zero-styled/index.js";
|
|
11
11
|
import memoTheme from "../utils/memoTheme.js";
|
|
12
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
12
13
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
13
14
|
import inputClasses, { getInputUtilityClass } from "./inputClasses.js";
|
|
14
15
|
import { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from "../InputBase/InputBase.js";
|
|
@@ -109,7 +110,7 @@ const InputRoot = styled(InputBaseRoot, {
|
|
|
109
110
|
borderBottomStyle: 'dotted'
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
|
-
}, ...Object.entries(theme.palette).filter((
|
|
113
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
113
114
|
props: {
|
|
114
115
|
color,
|
|
115
116
|
disableUnderline: false
|
|
@@ -126,7 +126,7 @@ const InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inP
|
|
|
126
126
|
color: "textSecondary",
|
|
127
127
|
children: children
|
|
128
128
|
}) : /*#__PURE__*/_jsxs(React.Fragment, {
|
|
129
|
-
children: [position === 'start' ? (
|
|
129
|
+
children: [position === 'start' ? (/* notranslate needed while Google Translate will not fix zero-width space issue */_span || (_span = /*#__PURE__*/_jsx("span", {
|
|
130
130
|
className: "notranslate",
|
|
131
131
|
children: "\u200B"
|
|
132
132
|
}))) : null, children]
|
package/InputBase/InputBase.js
CHANGED
|
@@ -461,7 +461,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
|
|
|
461
461
|
...(slotProps.input ?? componentsProps.input)
|
|
462
462
|
};
|
|
463
463
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
464
|
-
children: [!disableInjectingGlobalStyles && typeof InputGlobalStyles === 'function' && (
|
|
464
|
+
children: [!disableInjectingGlobalStyles && typeof InputGlobalStyles === 'function' && (// For Emotion/Styled-components, InputGlobalStyles will be a function
|
|
465
465
|
// For Pigment CSS, this has no effect because the InputGlobalStyles will be null.
|
|
466
466
|
_InputGlobalStyles || (_InputGlobalStyles = /*#__PURE__*/_jsx(InputGlobalStyles, {}))), /*#__PURE__*/_jsxs(Root, {
|
|
467
467
|
...rootProps,
|
|
@@ -8,6 +8,7 @@ import { darken, lighten } from '@mui/system/colorManipulator';
|
|
|
8
8
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
9
9
|
import { keyframes, css, styled } from "../zero-styled/index.js";
|
|
10
10
|
import memoTheme from "../utils/memoTheme.js";
|
|
11
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
11
12
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
12
13
|
import capitalize from "../utils/capitalize.js";
|
|
13
14
|
import { getLinearProgressUtilityClass } from "./linearProgressClasses.js";
|
|
@@ -115,7 +116,7 @@ const LinearProgressRoot = styled('span', {
|
|
|
115
116
|
'@media print': {
|
|
116
117
|
colorAdjust: 'exact'
|
|
117
118
|
},
|
|
118
|
-
variants: [...Object.entries(theme.palette).filter((
|
|
119
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
119
120
|
props: {
|
|
120
121
|
color
|
|
121
122
|
},
|
|
@@ -180,7 +181,7 @@ const LinearProgressDashed = styled('span', {
|
|
|
180
181
|
opacity: 0.3,
|
|
181
182
|
backgroundImage: `radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)`
|
|
182
183
|
}
|
|
183
|
-
}, ...Object.entries(theme.palette).filter((
|
|
184
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => {
|
|
184
185
|
const backgroundColor = getColorShade(theme, color);
|
|
185
186
|
return {
|
|
186
187
|
props: {
|
|
@@ -221,7 +222,7 @@ const LinearProgressBar1 = styled('span', {
|
|
|
221
222
|
style: {
|
|
222
223
|
backgroundColor: 'currentColor'
|
|
223
224
|
}
|
|
224
|
-
}, ...Object.entries(theme.palette).filter((
|
|
225
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
225
226
|
props: {
|
|
226
227
|
color
|
|
227
228
|
},
|
|
@@ -278,7 +279,7 @@ const LinearProgressBar2 = styled('span', {
|
|
|
278
279
|
top: 0,
|
|
279
280
|
transition: 'transform 0.2s linear',
|
|
280
281
|
transformOrigin: 'left',
|
|
281
|
-
variants: [...Object.entries(theme.palette).filter((
|
|
282
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
282
283
|
props: {
|
|
283
284
|
color
|
|
284
285
|
},
|
|
@@ -299,7 +300,7 @@ const LinearProgressBar2 = styled('span', {
|
|
|
299
300
|
style: {
|
|
300
301
|
opacity: 0.3
|
|
301
302
|
}
|
|
302
|
-
}, ...Object.entries(theme.palette).filter((
|
|
303
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
303
304
|
props: {
|
|
304
305
|
color,
|
|
305
306
|
variant: 'buffer'
|
package/Link/Link.js
CHANGED
|
@@ -10,6 +10,7 @@ import isFocusVisible from '@mui/utils/isFocusVisible';
|
|
|
10
10
|
import capitalize from "../utils/capitalize.js";
|
|
11
11
|
import { styled, useTheme } from "../zero-styled/index.js";
|
|
12
12
|
import memoTheme from "../utils/memoTheme.js";
|
|
13
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
13
14
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
14
15
|
import Typography from "../Typography/index.js";
|
|
15
16
|
import linkClasses, { getLinkUtilityClass } from "./linkClasses.js";
|
|
@@ -86,7 +87,7 @@ const LinkRoot = styled(Typography, {
|
|
|
86
87
|
style: {
|
|
87
88
|
textDecorationColor: 'var(--Link-underlineColor)'
|
|
88
89
|
}
|
|
89
|
-
}, ...Object.entries(theme.palette).filter((
|
|
90
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
90
91
|
props: {
|
|
91
92
|
underline: 'always',
|
|
92
93
|
color
|
package/MenuList/MenuList.js
CHANGED
|
@@ -121,6 +121,14 @@ const MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {
|
|
|
121
121
|
const handleKeyDown = event => {
|
|
122
122
|
const list = listRef.current;
|
|
123
123
|
const key = event.key;
|
|
124
|
+
const isModifierKeyPressed = event.ctrlKey || event.metaKey || event.altKey;
|
|
125
|
+
if (isModifierKeyPressed) {
|
|
126
|
+
if (onKeyDown) {
|
|
127
|
+
onKeyDown(event);
|
|
128
|
+
}
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
124
132
|
/**
|
|
125
133
|
* @type {Element} - will always be defined since we are in a keydown handler
|
|
126
134
|
* attached to an element. A keydown event is either dispatched to the activeElement
|
package/Modal/Modal.d.ts
CHANGED
|
@@ -211,10 +211,10 @@ export declare const ModalRoot: React.FC<ModalRootProps>;
|
|
|
211
211
|
/**
|
|
212
212
|
* Modal is a lower-level construct that is leveraged by the following components:
|
|
213
213
|
*
|
|
214
|
-
* *
|
|
215
|
-
* *
|
|
216
|
-
* *
|
|
217
|
-
* *
|
|
214
|
+
* * [Dialog](https://mui.com/material-ui/api/dialog/)
|
|
215
|
+
* * [Drawer](https://mui.com/material-ui/api/drawer/)
|
|
216
|
+
* * [Menu](https://mui.com/material-ui/api/menu/)
|
|
217
|
+
* * [Popover](https://mui.com/material-ui/api/popover/)
|
|
218
218
|
*
|
|
219
219
|
* If you are creating a modal dialog, you probably want to use the [Dialog](https://mui.com/material-ui/api/dialog/) component
|
|
220
220
|
* rather than directly using Modal.
|
package/NoSsr/NoSsr.d.ts
CHANGED
|
@@ -5,10 +5,10 @@ import { NoSsrProps } from './NoSsr.types';
|
|
|
5
5
|
*
|
|
6
6
|
* This component can be useful in a variety of situations:
|
|
7
7
|
*
|
|
8
|
-
* *
|
|
9
|
-
* *
|
|
10
|
-
* *
|
|
11
|
-
* *
|
|
8
|
+
* * Escape hatch for broken dependencies not supporting SSR.
|
|
9
|
+
* * Improve the time-to-first paint on the client by only rendering above the fold.
|
|
10
|
+
* * Reduce the rendering time on the server.
|
|
11
|
+
* * Under too heavy server load, you can turn on service degradation.
|
|
12
12
|
*
|
|
13
13
|
* Demos:
|
|
14
14
|
*
|
package/NoSsr/NoSsr.js
CHANGED
|
@@ -9,10 +9,10 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
9
9
|
*
|
|
10
10
|
* This component can be useful in a variety of situations:
|
|
11
11
|
*
|
|
12
|
-
* *
|
|
13
|
-
* *
|
|
14
|
-
* *
|
|
15
|
-
* *
|
|
12
|
+
* * Escape hatch for broken dependencies not supporting SSR.
|
|
13
|
+
* * Improve the time-to-first paint on the client by only rendering above the fold.
|
|
14
|
+
* * Reduce the rendering time on the server.
|
|
15
|
+
* * Under too heavy server load, you can turn on service degradation.
|
|
16
16
|
*
|
|
17
17
|
* Demos:
|
|
18
18
|
*
|
|
@@ -10,6 +10,7 @@ import formControlState from "../FormControl/formControlState.js";
|
|
|
10
10
|
import rootShouldForwardProp from "../styles/rootShouldForwardProp.js";
|
|
11
11
|
import { styled } from "../zero-styled/index.js";
|
|
12
12
|
import memoTheme from "../utils/memoTheme.js";
|
|
13
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
13
14
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
14
15
|
import outlinedInputClasses, { getOutlinedInputUtilityClass } from "./outlinedInputClasses.js";
|
|
15
16
|
import InputBase, { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from "../InputBase/InputBase.js";
|
|
@@ -48,7 +49,7 @@ const OutlinedInputRoot = styled(InputBaseRoot, {
|
|
|
48
49
|
[`&.${outlinedInputClasses.focused} .${outlinedInputClasses.notchedOutline}`]: {
|
|
49
50
|
borderWidth: 2
|
|
50
51
|
},
|
|
51
|
-
variants: [...Object.entries(theme.palette).filter((
|
|
52
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(([color]) => ({
|
|
52
53
|
props: {
|
|
53
54
|
color
|
|
54
55
|
},
|
|
@@ -14,10 +14,10 @@ export interface PaginationItemPropsSizeOverrides {}
|
|
|
14
14
|
export interface PaginationItemPropsColorOverrides {}
|
|
15
15
|
|
|
16
16
|
export interface PaginationItemSlots {
|
|
17
|
-
first
|
|
18
|
-
last
|
|
19
|
-
next
|
|
20
|
-
previous
|
|
17
|
+
first: React.ElementType;
|
|
18
|
+
last: React.ElementType;
|
|
19
|
+
next: React.ElementType;
|
|
20
|
+
previous: React.ElementType;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
export type PaginationItemSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
|
@@ -9,6 +9,7 @@ import { useRtl } from '@mui/system/RtlProvider';
|
|
|
9
9
|
import paginationItemClasses, { getPaginationItemUtilityClass } from "./paginationItemClasses.js";
|
|
10
10
|
import ButtonBase from "../ButtonBase/index.js";
|
|
11
11
|
import capitalize from "../utils/capitalize.js";
|
|
12
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
12
13
|
import FirstPageIcon from "../internal/svg-icons/FirstPage.js";
|
|
13
14
|
import LastPageIcon from "../internal/svg-icons/LastPage.js";
|
|
14
15
|
import NavigateBeforeIcon from "../internal/svg-icons/NavigateBefore.js";
|
|
@@ -193,7 +194,7 @@ const PaginationItemPage = styled(ButtonBase, {
|
|
|
193
194
|
}
|
|
194
195
|
}
|
|
195
196
|
}
|
|
196
|
-
}, ...Object.entries(theme.palette).filter(([,
|
|
197
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark', 'contrastText'])).map(([color]) => ({
|
|
197
198
|
props: {
|
|
198
199
|
variant: 'text',
|
|
199
200
|
color
|
|
@@ -217,7 +218,7 @@ const PaginationItemPage = styled(ButtonBase, {
|
|
|
217
218
|
}
|
|
218
219
|
}
|
|
219
220
|
}
|
|
220
|
-
})), ...Object.entries(theme.palette).filter(([
|
|
221
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['light'])).map(([color]) => ({
|
|
221
222
|
props: {
|
|
222
223
|
variant: 'outlined',
|
|
223
224
|
color
|
package/Popover/Popover.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { SxProps } from '@mui/system';
|
|
3
|
-
import { InternalStandardProps as StandardProps } from '..';
|
|
3
|
+
import { BackdropProps, InternalStandardProps as StandardProps } from '..';
|
|
4
4
|
import Paper, { PaperProps } from '../Paper';
|
|
5
5
|
import Modal, { ModalOwnerState, ModalProps } from '../Modal';
|
|
6
6
|
import { Theme } from '../styles';
|
|
@@ -9,8 +9,8 @@ import { PopoverClasses } from './popoverClasses';
|
|
|
9
9
|
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
|
10
10
|
|
|
11
11
|
export interface PopoverSlots {
|
|
12
|
-
root
|
|
13
|
-
paper
|
|
12
|
+
root: React.ElementType;
|
|
13
|
+
paper: React.ElementType;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export type PopoverSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
|
@@ -39,7 +39,10 @@ interface PopoverVirtualElement {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
export interface PopoverProps
|
|
42
|
-
extends StandardProps<
|
|
42
|
+
extends StandardProps<
|
|
43
|
+
Omit<ModalProps, 'slots' | 'slotProps' | 'BackdropProps' | 'BackdropComponent'>,
|
|
44
|
+
'children'
|
|
45
|
+
>,
|
|
43
46
|
PopoverSlotsAndSlotProps {
|
|
44
47
|
/**
|
|
45
48
|
* A ref for imperative actions.
|
|
@@ -82,6 +85,26 @@ export interface PopoverProps
|
|
|
82
85
|
* @default 'anchorEl'
|
|
83
86
|
*/
|
|
84
87
|
anchorReference?: PopoverReference;
|
|
88
|
+
/**
|
|
89
|
+
* A backdrop component. This prop enables custom backdrop rendering.
|
|
90
|
+
* @deprecated Use `slotProps.root.slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
|
|
91
|
+
* Use the `slotProps.root.slots.backdrop` prop to make your application ready for the next version of Material UI.
|
|
92
|
+
* @default styled(Backdrop, {
|
|
93
|
+
* name: 'MuiModal',
|
|
94
|
+
* slot: 'Backdrop',
|
|
95
|
+
* overridesResolver: (props, styles) => {
|
|
96
|
+
* return styles.backdrop;
|
|
97
|
+
* },
|
|
98
|
+
* })({
|
|
99
|
+
* zIndex: -1,
|
|
100
|
+
* })
|
|
101
|
+
*/
|
|
102
|
+
BackdropComponent?: React.ElementType<BackdropProps>;
|
|
103
|
+
/**
|
|
104
|
+
* Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
|
|
105
|
+
* @deprecated Use `slotProps.root.slotProps.backdrop` instead.
|
|
106
|
+
*/
|
|
107
|
+
BackdropProps?: Partial<BackdropProps>;
|
|
85
108
|
/**
|
|
86
109
|
* The content of the component.
|
|
87
110
|
*/
|
package/Popover/Popover.js
CHANGED
|
@@ -419,6 +419,26 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
|
|
|
419
419
|
* @default 'anchorEl'
|
|
420
420
|
*/
|
|
421
421
|
anchorReference: PropTypes.oneOf(['anchorEl', 'anchorPosition', 'none']),
|
|
422
|
+
/**
|
|
423
|
+
* A backdrop component. This prop enables custom backdrop rendering.
|
|
424
|
+
* @deprecated Use `slotProps.root.slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
|
|
425
|
+
* Use the `slotProps.root.slots.backdrop` prop to make your application ready for the next version of Material UI.
|
|
426
|
+
* @default styled(Backdrop, {
|
|
427
|
+
* name: 'MuiModal',
|
|
428
|
+
* slot: 'Backdrop',
|
|
429
|
+
* overridesResolver: (props, styles) => {
|
|
430
|
+
* return styles.backdrop;
|
|
431
|
+
* },
|
|
432
|
+
* })({
|
|
433
|
+
* zIndex: -1,
|
|
434
|
+
* })
|
|
435
|
+
*/
|
|
436
|
+
BackdropComponent: PropTypes.elementType,
|
|
437
|
+
/**
|
|
438
|
+
* Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
|
|
439
|
+
* @deprecated Use `slotProps.root.slotProps.backdrop` instead.
|
|
440
|
+
*/
|
|
441
|
+
BackdropProps: PropTypes.object,
|
|
422
442
|
/**
|
|
423
443
|
* The content of the component.
|
|
424
444
|
*/
|
package/Portal/Portal.js
CHANGED
|
@@ -44,7 +44,7 @@ const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef
|
|
|
44
44
|
return undefined;
|
|
45
45
|
}, [forwardedRef, mountNode, disablePortal]);
|
|
46
46
|
if (disablePortal) {
|
|
47
|
-
if (
|
|
47
|
+
if (/*#__PURE__*/React.isValidElement(children)) {
|
|
48
48
|
const newProps = {
|
|
49
49
|
ref: handleRef
|
|
50
50
|
};
|