@mui/material 6.0.2 → 6.1.1-dev.20240919-130050-82a6448768
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/Backdrop/Backdrop.js +9 -2
- package/Badge/Badge.js +2 -1
- package/Button/Button.js +2 -1
- package/ButtonGroup/ButtonGroup.js +3 -2
- package/CHANGELOG.md +141 -15130
- package/Checkbox/Checkbox.js +3 -2
- package/Chip/Chip.js +6 -5
- package/CircularProgress/CircularProgress.js +2 -1
- package/ClickAwayListener/ClickAwayListener.js +1 -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/FormControl/FormControl.js +1 -2
- package/FormControlLabel/FormControlLabel.d.ts +1 -1
- package/FormLabel/FormLabel.js +2 -1
- package/Grid/Grid.d.ts +6 -1
- package/Grid/Grid.js +0 -1
- package/Hidden/withWidth.js +1 -0
- package/Icon/Icon.js +3 -2
- package/IconButton/IconButton.js +3 -2
- package/Input/Input.js +2 -1
- package/InputAdornment/InputAdornment.js +1 -1
- package/InputBase/InputBase.js +3 -1
- package/LinearProgress/LinearProgress.js +6 -5
- package/Link/Link.js +2 -1
- package/Modal/Modal.d.ts +4 -4
- package/Modal/Modal.js +1 -1
- package/Modal/ModalManager.js +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 +2 -2
- package/Popover/Popover.js +1 -1
- package/Portal/Portal.js +1 -1
- package/Radio/Radio.js +19 -3
- package/Select/SelectInput.js +2 -0
- package/Skeleton/Skeleton.js +5 -3
- package/Slider/Slider.js +4 -3
- package/Slider/useSlider.js +2 -2
- 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/SwipeableDrawer/SwipeableDrawer.js +1 -0
- package/Switch/Switch.js +2 -1
- package/TextField/TextField.d.ts +13 -13
- package/ToggleButton/ToggleButton.js +2 -1
- package/ToggleButtonGroup/isValueSelected.js +1 -1
- package/Tooltip/Tooltip.js +6 -3
- package/Typography/Typography.js +2 -1
- package/Unstable_TrapFocus/FocusTrap.js +1 -1
- package/index.d.ts +1 -0
- 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/Backdrop/Backdrop.js +9 -2
- 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/ClickAwayListener/ClickAwayListener.js +1 -1
- package/modern/Dialog/Dialog.js +1 -0
- package/modern/Fab/Fab.js +2 -1
- package/modern/FilledInput/FilledInput.js +2 -1
- package/modern/FormControl/FormControl.js +1 -2
- package/modern/FormLabel/FormLabel.js +2 -1
- package/modern/Grid/Grid.js +0 -1
- package/modern/Hidden/withWidth.js +1 -0
- package/modern/Icon/Icon.js +3 -2
- 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 +3 -1
- package/modern/LinearProgress/LinearProgress.js +6 -5
- package/modern/Link/Link.js +2 -1
- package/modern/Modal/Modal.js +1 -1
- package/modern/Modal/ModalManager.js +4 -4
- 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 +1 -1
- package/modern/Portal/Portal.js +1 -1
- package/modern/Radio/Radio.js +19 -3
- package/modern/Select/SelectInput.js +2 -0
- package/modern/Skeleton/Skeleton.js +5 -3
- package/modern/Slider/Slider.js +4 -3
- package/modern/Slider/useSlider.js +2 -2
- package/modern/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/modern/StepButton/StepButton.js +1 -1
- package/modern/SwipeableDrawer/SwipeableDrawer.js +1 -0
- package/modern/Switch/Switch.js +2 -1
- package/modern/ToggleButton/ToggleButton.js +2 -1
- package/modern/ToggleButtonGroup/isValueSelected.js +1 -1
- package/modern/Tooltip/Tooltip.js +6 -3
- package/modern/Typography/Typography.js +2 -1
- package/modern/Unstable_TrapFocus/FocusTrap.js +1 -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/createColorScheme.js +1 -1
- package/modern/styles/createGetSelector.js +2 -2
- package/modern/styles/excludeVariablesFromRoot.js +1 -1
- package/modern/styles/useTheme.js +1 -0
- package/modern/useAutocomplete/useAutocomplete.js +2 -2
- package/modern/useScrollTrigger/useScrollTrigger.js +1 -0
- 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/Backdrop/Backdrop.js +9 -2
- 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/ClickAwayListener/ClickAwayListener.js +1 -1
- package/node/Dialog/Dialog.js +1 -0
- package/node/Fab/Fab.js +2 -1
- package/node/FilledInput/FilledInput.js +2 -1
- package/node/FormControl/FormControl.js +1 -2
- package/node/FormLabel/FormLabel.js +2 -1
- package/node/Grid/Grid.js +0 -1
- package/node/Hidden/withWidth.js +1 -0
- package/node/Icon/Icon.js +3 -2
- 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 +3 -1
- package/node/LinearProgress/LinearProgress.js +6 -5
- package/node/Link/Link.js +2 -1
- package/node/Modal/Modal.js +1 -1
- package/node/Modal/ModalManager.js +4 -4
- 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 +1 -1
- package/node/Portal/Portal.js +1 -1
- package/node/Radio/Radio.js +19 -3
- package/node/Select/SelectInput.js +2 -0
- package/node/Skeleton/Skeleton.js +5 -3
- package/node/Slider/Slider.js +4 -3
- package/node/Slider/useSlider.js +2 -2
- package/node/SpeedDialIcon/SpeedDialIcon.js +1 -1
- package/node/StepButton/StepButton.js +1 -1
- package/node/SwipeableDrawer/SwipeableDrawer.js +1 -0
- package/node/Switch/Switch.js +2 -1
- package/node/ToggleButton/ToggleButton.js +2 -1
- package/node/ToggleButtonGroup/isValueSelected.js +1 -1
- package/node/Tooltip/Tooltip.js +6 -3
- package/node/Typography/Typography.js +2 -1
- package/node/Unstable_TrapFocus/FocusTrap.js +1 -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/createColorScheme.js +1 -1
- package/node/styles/excludeVariablesFromRoot.js +1 -1
- package/node/styles/useTheme.js +1 -0
- package/node/useAutocomplete/useAutocomplete.js +2 -2
- package/node/useScrollTrigger/useScrollTrigger.js +1 -0
- package/node/utils/createSimplePaletteValueFilter.js +47 -0
- package/node/utils/createSvgIcon.js +1 -1
- package/node/version/index.js +5 -6
- package/package.json +8 -8
- package/styles/ThemeProviderWithVars.js +5 -3
- package/styles/createColorScheme.d.ts +1 -1
- package/styles/createColorScheme.js +1 -1
- package/styles/createGetSelector.js +2 -2
- package/styles/excludeVariablesFromRoot.js +1 -1
- package/styles/useTheme.js +1 -0
- package/useAutocomplete/useAutocomplete.js +2 -2
- package/useScrollTrigger/useScrollTrigger.js +1 -0
- 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 +1 -1
- 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
|
},
|
|
@@ -79,7 +79,7 @@ function ClickAwayListener(props) {
|
|
|
79
79
|
|
|
80
80
|
// If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js
|
|
81
81
|
if (event.composedPath) {
|
|
82
|
-
insideDOM = event.composedPath().
|
|
82
|
+
insideDOM = event.composedPath().includes(nodeRef.current);
|
|
83
83
|
} else {
|
|
84
84
|
insideDOM = !doc.documentElement.contains(
|
|
85
85
|
// @ts-expect-error returns `false` as intended when not dispatched from a Node
|
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
|
*
|
|
@@ -170,9 +170,8 @@ const FormControl = /*#__PURE__*/React.forwardRef(function FormControl(inProps,
|
|
|
170
170
|
}
|
|
171
171
|
const focused = visuallyFocused !== undefined && !disabled ? visuallyFocused : focusedState;
|
|
172
172
|
let registerEffect;
|
|
173
|
+
const registeredInput = React.useRef(false);
|
|
173
174
|
if (process.env.NODE_ENV !== 'production') {
|
|
174
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
175
|
-
const registeredInput = React.useRef(false);
|
|
176
175
|
registerEffect = () => {
|
|
177
176
|
if (registeredInput.current) {
|
|
178
177
|
console.error(['MUI: There are multiple `InputBase` components inside a FormControl.', 'This creates visual inconsistencies, only use one `InputBase`.'].join('\n'));
|
|
@@ -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
|
/**
|
|
@@ -150,6 +149,9 @@ export interface GridOwnProps extends SystemProps<Theme>, Breakpoints {
|
|
|
150
149
|
zeroMinWidth?: boolean;
|
|
151
150
|
}
|
|
152
151
|
|
|
152
|
+
/**
|
|
153
|
+
* @deprecated Use the [`Grid2`](https://mui.com/material-ui/react-grid2/) component instead.
|
|
154
|
+
*/
|
|
153
155
|
export interface GridTypeMap<
|
|
154
156
|
AdditionalProps = {},
|
|
155
157
|
RootComponent extends React.ElementType = 'div',
|
|
@@ -172,6 +174,9 @@ export interface GridTypeMap<
|
|
|
172
174
|
*/
|
|
173
175
|
declare const Grid: OverridableComponent<GridTypeMap>;
|
|
174
176
|
|
|
177
|
+
/**
|
|
178
|
+
* @deprecated Use the [`Grid2`](https://mui.com/material-ui/react-grid2/) component instead.
|
|
179
|
+
*/
|
|
175
180
|
export type GridProps<
|
|
176
181
|
RootComponent extends React.ElementType = GridTypeMap['defaultComponent'],
|
|
177
182
|
AdditionalProps = {},
|
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/Hidden/withWidth.js
CHANGED
|
@@ -53,6 +53,7 @@ const withWidth = (options = {}) => Component => {
|
|
|
53
53
|
*/
|
|
54
54
|
const keys = theme.breakpoints.keys.slice().reverse();
|
|
55
55
|
const widthComputed = keys.reduce((output, key) => {
|
|
56
|
+
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
|
|
56
57
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
57
58
|
const matches = useMediaQuery(theme.breakpoints.up(key));
|
|
58
59
|
return !output && matches ? key : output;
|
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";
|
|
@@ -36,7 +37,7 @@ const IconRoot = styled('span', {
|
|
|
36
37
|
userSelect: 'none',
|
|
37
38
|
width: '1em',
|
|
38
39
|
height: '1em',
|
|
39
|
-
// Chrome fix for https://
|
|
40
|
+
// Chrome fix for https://issues.chromium.org/issues/41375697
|
|
40
41
|
// To remove at some point.
|
|
41
42
|
overflow: 'hidden',
|
|
42
43
|
display: 'inline-block',
|
|
@@ -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
|
@@ -298,6 +298,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
|
|
|
298
298
|
const [focused, setFocused] = React.useState(false);
|
|
299
299
|
const muiFormControl = useFormControl();
|
|
300
300
|
if (process.env.NODE_ENV !== 'production') {
|
|
301
|
+
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
|
|
301
302
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
302
303
|
React.useEffect(() => {
|
|
303
304
|
if (muiFormControl) {
|
|
@@ -391,6 +392,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
|
|
|
391
392
|
// or auto filled by the browser before the hydration (for SSR).
|
|
392
393
|
React.useEffect(() => {
|
|
393
394
|
checkDirty(inputRef.current);
|
|
395
|
+
// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler
|
|
394
396
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
395
397
|
}, []);
|
|
396
398
|
const handleClick = event => {
|
|
@@ -461,7 +463,7 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
|
|
|
461
463
|
...(slotProps.input ?? componentsProps.input)
|
|
462
464
|
};
|
|
463
465
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
464
|
-
children: [!disableInjectingGlobalStyles && typeof InputGlobalStyles === 'function' && (
|
|
466
|
+
children: [!disableInjectingGlobalStyles && typeof InputGlobalStyles === 'function' && (// For Emotion/Styled-components, InputGlobalStyles will be a function
|
|
465
467
|
// For Pigment CSS, this has no effect because the InputGlobalStyles will be null.
|
|
466
468
|
_InputGlobalStyles || (_InputGlobalStyles = /*#__PURE__*/_jsx(InputGlobalStyles, {}))), /*#__PURE__*/_jsxs(Root, {
|
|
467
469
|
...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/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/Modal/Modal.js
CHANGED
|
@@ -158,6 +158,7 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
158
158
|
childProps.onExited = onExited;
|
|
159
159
|
}
|
|
160
160
|
const externalForwardedProps = {
|
|
161
|
+
...other,
|
|
161
162
|
slots: {
|
|
162
163
|
root: components.Root,
|
|
163
164
|
backdrop: components.Backdrop,
|
|
@@ -209,7 +210,6 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
209
210
|
disablePortal: disablePortal,
|
|
210
211
|
children: /*#__PURE__*/_jsxs(RootSlot, {
|
|
211
212
|
...rootProps,
|
|
212
|
-
...other,
|
|
213
213
|
children: [!hideBackdrop && BackdropComponent ? /*#__PURE__*/_jsx(BackdropSlot, {
|
|
214
214
|
...backdropProps,
|
|
215
215
|
ref: backdropRef
|
package/Modal/ModalManager.js
CHANGED
|
@@ -22,14 +22,14 @@ function isAriaHiddenForbiddenOnElement(element) {
|
|
|
22
22
|
// can be children of body and can't have aria-hidden attribute.
|
|
23
23
|
// cf. https://www.w3.org/TR/html-aria/#docconformance
|
|
24
24
|
const forbiddenTagNames = ['TEMPLATE', 'SCRIPT', 'STYLE', 'LINK', 'MAP', 'META', 'NOSCRIPT', 'PICTURE', 'COL', 'COLGROUP', 'PARAM', 'SLOT', 'SOURCE', 'TRACK'];
|
|
25
|
-
const isForbiddenTagName = forbiddenTagNames.
|
|
25
|
+
const isForbiddenTagName = forbiddenTagNames.includes(element.tagName);
|
|
26
26
|
const isInputHidden = element.tagName === 'INPUT' && element.getAttribute('type') === 'hidden';
|
|
27
27
|
return isForbiddenTagName || isInputHidden;
|
|
28
28
|
}
|
|
29
29
|
function ariaHiddenSiblings(container, mountElement, currentElement, elementsToExclude, show) {
|
|
30
30
|
const blacklist = [mountElement, currentElement, ...elementsToExclude];
|
|
31
31
|
[].forEach.call(container.children, element => {
|
|
32
|
-
const isNotExcludedElement = blacklist.
|
|
32
|
+
const isNotExcludedElement = !blacklist.includes(element);
|
|
33
33
|
const isNotForbiddenElement = !isAriaHiddenForbiddenOnElement(element);
|
|
34
34
|
if (isNotExcludedElement && isNotForbiddenElement) {
|
|
35
35
|
ariaHidden(element, show);
|
|
@@ -165,7 +165,7 @@ export class ModalManager {
|
|
|
165
165
|
return modalIndex;
|
|
166
166
|
}
|
|
167
167
|
mount(modal, props) {
|
|
168
|
-
const containerIndex = findIndexOf(this.containers, item => item.modals.
|
|
168
|
+
const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));
|
|
169
169
|
const containerInfo = this.containers[containerIndex];
|
|
170
170
|
if (!containerInfo.restore) {
|
|
171
171
|
containerInfo.restore = handleContainer(containerInfo, props);
|
|
@@ -176,7 +176,7 @@ export class ModalManager {
|
|
|
176
176
|
if (modalIndex === -1) {
|
|
177
177
|
return modalIndex;
|
|
178
178
|
}
|
|
179
|
-
const containerIndex = findIndexOf(this.containers, item => item.modals.
|
|
179
|
+
const containerIndex = findIndexOf(this.containers, item => item.modals.includes(modal));
|
|
180
180
|
const containerInfo = this.containers[containerIndex];
|
|
181
181
|
containerInfo.modals.splice(containerInfo.modals.indexOf(modal), 1);
|
|
182
182
|
this.modals.splice(modalIndex, 1);
|
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
|
@@ -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<
|
package/Popover/Popover.js
CHANGED
|
@@ -241,7 +241,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
241
241
|
}
|
|
242
242
|
const positioning = getPositioningStyle(element);
|
|
243
243
|
if (positioning.top !== null) {
|
|
244
|
-
element.style.top
|
|
244
|
+
element.style.setProperty('top', positioning.top);
|
|
245
245
|
}
|
|
246
246
|
if (positioning.left !== null) {
|
|
247
247
|
element.style.left = positioning.left;
|
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
|
};
|