@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
|
@@ -7,6 +7,6 @@ import createSvgIcon from "../../utils/createSvgIcon.js";
|
|
|
7
7
|
* @ignore - internal component.
|
|
8
8
|
*/
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
export default createSvgIcon(
|
|
10
|
+
export default createSvgIcon(/*#__PURE__*/_jsx("path", {
|
|
11
11
|
d: "M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"
|
|
12
12
|
}), 'SuccessOutlined');
|
|
@@ -7,6 +7,6 @@ import createSvgIcon from "../../utils/createSvgIcon.js";
|
|
|
7
7
|
* @ignore - internal component.
|
|
8
8
|
*/
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
-
export default createSvgIcon(
|
|
10
|
+
export default createSvgIcon(/*#__PURE__*/_jsx("path", {
|
|
11
11
|
d: "M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"
|
|
12
12
|
}), 'Warning');
|
package/modern/Alert/Alert.js
CHANGED
|
@@ -10,6 +10,7 @@ import memoTheme from "../utils/memoTheme.js";
|
|
|
10
10
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
11
11
|
import useSlot from "../utils/useSlot.js";
|
|
12
12
|
import capitalize from "../utils/capitalize.js";
|
|
13
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
13
14
|
import Paper from "../Paper/index.js";
|
|
14
15
|
import alertClasses, { getAlertUtilityClass } from "./alertClasses.js";
|
|
15
16
|
import IconButton from "../IconButton/index.js";
|
|
@@ -53,7 +54,7 @@ const AlertRoot = styled(Paper, {
|
|
|
53
54
|
backgroundColor: 'transparent',
|
|
54
55
|
display: 'flex',
|
|
55
56
|
padding: '6px 16px',
|
|
56
|
-
variants: [...Object.entries(theme.palette).filter(([
|
|
57
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['light'])).map(([color]) => ({
|
|
57
58
|
props: {
|
|
58
59
|
colorSeverity: color,
|
|
59
60
|
variant: 'standard'
|
|
@@ -67,7 +68,7 @@ const AlertRoot = styled(Paper, {
|
|
|
67
68
|
color: theme.palette[color].main
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
|
-
})), ...Object.entries(theme.palette).filter(([
|
|
71
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['light'])).map(([color]) => ({
|
|
71
72
|
props: {
|
|
72
73
|
colorSeverity: color,
|
|
73
74
|
variant: 'outlined'
|
|
@@ -81,7 +82,7 @@ const AlertRoot = styled(Paper, {
|
|
|
81
82
|
color: theme.palette[color].main
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
|
-
})), ...Object.entries(theme.palette).filter(([
|
|
85
|
+
})), ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark'])).map(([color]) => ({
|
|
85
86
|
props: {
|
|
86
87
|
colorSeverity: color,
|
|
87
88
|
variant: 'filled'
|
package/modern/AppBar/AppBar.js
CHANGED
|
@@ -8,6 +8,7 @@ import { styled } from "../zero-styled/index.js";
|
|
|
8
8
|
import memoTheme from "../utils/memoTheme.js";
|
|
9
9
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
10
10
|
import capitalize from "../utils/capitalize.js";
|
|
11
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
11
12
|
import Paper from "../Paper/index.js";
|
|
12
13
|
import { getAppBarUtilityClass } from "./appBarClasses.js";
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -114,7 +115,7 @@ const AppBarRoot = styled(Paper, {
|
|
|
114
115
|
'--AppBar-color': theme.vars ? theme.vars.palette.text.primary : theme.palette.getContrastText(theme.palette.grey[900])
|
|
115
116
|
})
|
|
116
117
|
}
|
|
117
|
-
}, ...Object.entries(theme.palette).filter(([
|
|
118
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => ({
|
|
118
119
|
props: {
|
|
119
120
|
color
|
|
120
121
|
},
|
|
@@ -604,7 +604,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
604
604
|
const more = startAdornment.length - limitTags;
|
|
605
605
|
if (!focused && more > 0) {
|
|
606
606
|
startAdornment = startAdornment.splice(0, limitTags);
|
|
607
|
-
startAdornment.push(
|
|
607
|
+
startAdornment.push(/*#__PURE__*/_jsx("span", {
|
|
608
608
|
className: classes.tag,
|
|
609
609
|
children: getLimitTagsText(more)
|
|
610
610
|
}, startAdornment.length));
|
|
@@ -662,7 +662,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
662
662
|
});
|
|
663
663
|
let autocompletePopper = null;
|
|
664
664
|
if (groupedOptions.length > 0) {
|
|
665
|
-
autocompletePopper = renderAutocompletePopperChildren(
|
|
665
|
+
autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/_jsx(AutocompleteListbox, {
|
|
666
666
|
as: ListboxSlot,
|
|
667
667
|
...listboxProps,
|
|
668
668
|
children: groupedOptions.map((option, index) => {
|
|
@@ -677,13 +677,13 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
677
677
|
})
|
|
678
678
|
}));
|
|
679
679
|
} else if (loading && groupedOptions.length === 0) {
|
|
680
|
-
autocompletePopper = renderAutocompletePopperChildren(
|
|
680
|
+
autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/_jsx(AutocompleteLoading, {
|
|
681
681
|
className: classes.loading,
|
|
682
682
|
ownerState: ownerState,
|
|
683
683
|
children: loadingText
|
|
684
684
|
}));
|
|
685
685
|
} else if (groupedOptions.length === 0 && !freeSolo && !loading) {
|
|
686
|
-
autocompletePopper = renderAutocompletePopperChildren(
|
|
686
|
+
autocompletePopper = renderAutocompletePopperChildren(/*#__PURE__*/_jsx(AutocompleteNoOptions, {
|
|
687
687
|
className: classes.noOptions,
|
|
688
688
|
ownerState: ownerState,
|
|
689
689
|
role: "presentation",
|
|
@@ -10,6 +10,13 @@ import useSlot from "../utils/useSlot.js";
|
|
|
10
10
|
import Fade from "../Fade/index.js";
|
|
11
11
|
import { getBackdropUtilityClass } from "./backdropClasses.js";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
const removeOwnerState = props => {
|
|
14
|
+
const {
|
|
15
|
+
ownerState,
|
|
16
|
+
...rest
|
|
17
|
+
} = props;
|
|
18
|
+
return rest;
|
|
19
|
+
};
|
|
13
20
|
const useUtilityClasses = ownerState => {
|
|
14
21
|
const {
|
|
15
22
|
classes,
|
|
@@ -98,12 +105,12 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
|
|
|
98
105
|
externalForwardedProps,
|
|
99
106
|
ownerState
|
|
100
107
|
});
|
|
101
|
-
|
|
108
|
+
const transitionPropsRemoved = removeOwnerState(transitionProps);
|
|
102
109
|
return /*#__PURE__*/_jsx(TransitionSlot, {
|
|
103
110
|
in: open,
|
|
104
111
|
timeout: transitionDuration,
|
|
105
112
|
...other,
|
|
106
|
-
...
|
|
113
|
+
...transitionPropsRemoved,
|
|
107
114
|
children: /*#__PURE__*/_jsx(RootSlot, {
|
|
108
115
|
"aria-hidden": true,
|
|
109
116
|
...rootProps,
|
package/modern/Badge/Badge.js
CHANGED
|
@@ -9,6 +9,7 @@ import useSlotProps from '@mui/utils/useSlotProps';
|
|
|
9
9
|
import useBadge from "./useBadge.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 capitalize from "../utils/capitalize.js";
|
|
14
15
|
import badgeClasses, { getBadgeUtilityClass } from "./badgeClasses.js";
|
|
@@ -75,7 +76,7 @@ const BadgeBadge = styled('span', {
|
|
|
75
76
|
easing: theme.transitions.easing.easeInOut,
|
|
76
77
|
duration: theme.transitions.duration.enteringScreen
|
|
77
78
|
}),
|
|
78
|
-
variants: [...Object.entries(theme.palette).filter(([
|
|
79
|
+
variants: [...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['contrastText'])).map(([color]) => ({
|
|
79
80
|
props: {
|
|
80
81
|
color
|
|
81
82
|
},
|
package/modern/Button/Button.js
CHANGED
|
@@ -12,6 +12,7 @@ import memoTheme from "../utils/memoTheme.js";
|
|
|
12
12
|
import { useDefaultProps } from "../DefaultPropsProvider/index.js";
|
|
13
13
|
import ButtonBase from "../ButtonBase/index.js";
|
|
14
14
|
import capitalize from "../utils/capitalize.js";
|
|
15
|
+
import createSimplePaletteValueFilter from "../utils/createSimplePaletteValueFilter.js";
|
|
15
16
|
import buttonClasses, { getButtonUtilityClass } from "./buttonClasses.js";
|
|
16
17
|
import ButtonGroupContext from "../ButtonGroup/ButtonGroupContext.js";
|
|
17
18
|
import ButtonGroupButtonContext from "../ButtonGroup/ButtonGroupButtonContext.js";
|
|
@@ -146,7 +147,7 @@ const ButtonRoot = styled(ButtonBase, {
|
|
|
146
147
|
color: `var(--variant-textColor)`,
|
|
147
148
|
backgroundColor: `var(--variant-textBg)`
|
|
148
149
|
}
|
|
149
|
-
}, ...Object.entries(theme.palette).filter(([,
|
|
150
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark', 'contrastText'])).map(([color]) => ({
|
|
150
151
|
props: {
|
|
151
152
|
color
|
|
152
153
|
},
|
|
@@ -9,6 +9,7 @@ import getValidReactChildren from '@mui/utils/getValidReactChildren';
|
|
|
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 buttonGroupClasses, { getButtonGroupUtilityClass } from "./buttonGroupClasses.js";
|
|
14
15
|
import ButtonGroupContext from "./ButtonGroupContext.js";
|
|
@@ -140,7 +141,7 @@ const ButtonGroupRoot = styled('div', {
|
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
|
-
}, ...Object.entries(theme.palette).filter((
|
|
144
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).flatMap(([color]) => [{
|
|
144
145
|
props: {
|
|
145
146
|
variant: 'text',
|
|
146
147
|
color
|
|
@@ -208,7 +209,7 @@ const ButtonGroupRoot = styled('div', {
|
|
|
208
209
|
}
|
|
209
210
|
}
|
|
210
211
|
}
|
|
211
|
-
}, ...Object.entries(theme.palette).filter(([
|
|
212
|
+
}, ...Object.entries(theme.palette).filter(createSimplePaletteValueFilter(['dark'])).map(([color]) => ({
|
|
212
213
|
props: {
|
|
213
214
|
variant: 'contained',
|
|
214
215
|
color
|
|
@@ -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/modern/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/modern/Dialog/Dialog.js
CHANGED
package/modern/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,
|
|
@@ -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'));
|
|
@@ -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/modern/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
|
/**
|
|
@@ -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/modern/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
|
},
|
|
@@ -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/modern/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]
|
|
@@ -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/modern/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/modern/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
|
|
@@ -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);
|