@mui/material 5.5.1 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/Alert.d.ts +3 -1
- package/Alert/Alert.js +3 -1
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/AppBar.d.ts +3 -1
- package/AppBar/AppBar.js +3 -1
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/Autocomplete.js +1 -1
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/Backdrop.d.ts +32 -15
- package/Backdrop/Backdrop.js +26 -20
- package/Backdrop/backdropClasses.d.ts +10 -0
- package/Backdrop/backdropClasses.js +6 -0
- package/Backdrop/index.d.ts +3 -0
- package/Backdrop/index.js +2 -1
- package/Badge/Badge.d.ts +23 -8
- package/Badge/Badge.js +46 -22
- package/Badge/badgeClasses.d.ts +24 -0
- package/Badge/badgeClasses.js +8 -0
- package/Badge/index.d.ts +3 -0
- package/Badge/index.js +2 -1
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/Button.d.ts +3 -1
- package/Button/Button.js +104 -97
- package/Button/buttonClasses.d.ts +76 -76
- package/ButtonBase/ButtonBase.js +7 -7
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroup.d.ts +3 -1
- package/ButtonGroup/ButtonGroup.js +3 -1
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +215 -0
- package/Card/Card.d.ts +1 -0
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/Checkbox.d.ts +3 -1
- package/Checkbox/Checkbox.js +3 -1
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/Chip.d.ts +3 -1
- package/Chip/Chip.js +3 -1
- package/Chip/chipClasses.d.ts +80 -80
- package/CircularProgress/CircularProgress.d.ts +3 -1
- package/CircularProgress/CircularProgress.js +3 -1
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +22 -22
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/Fab.d.ts +3 -1
- package/Fab/Fab.js +3 -1
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/FilledInput.js +3 -1
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/FormControl.d.ts +3 -1
- package/FormControl/FormControl.js +3 -1
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/FormControlLabel.d.ts +1 -1
- package/FormControlLabel/FormControlLabel.js +14 -9
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/FormLabel.d.ts +3 -1
- package/FormLabel/FormLabel.js +3 -1
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Grow/Grow.js +11 -5
- package/Icon/Icon.d.ts +3 -1
- package/Icon/Icon.js +3 -1
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/IconButton.d.ts +3 -1
- package/IconButton/IconButton.js +3 -1
- package/IconButton/iconButtonClasses.d.ts +26 -26
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/Input.js +3 -1
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/InputBase.d.ts +3 -1
- package/InputBase/InputBase.js +3 -1
- package/InputBase/inputBaseClasses.d.ts +44 -44
- package/InputLabel/InputLabel.js +3 -1
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/LinearProgress.d.ts +3 -1
- package/LinearProgress/LinearProgress.js +3 -1
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/Link.js +12 -5
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/ListItemButton.js +1 -0
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/OutlinedInput.js +3 -1
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/Pagination/Pagination.d.ts +2 -0
- package/Pagination/Pagination.js +2 -0
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/PaginationItem.d.ts +2 -0
- package/PaginationItem/PaginationItem.js +2 -0
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +29 -17
- package/Popper/Popper.js +16 -6
- package/Radio/Radio.d.ts +3 -1
- package/Radio/Radio.js +3 -1
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +24 -24
- package/Slider/Slider.d.ts +3 -1
- package/Slider/Slider.js +3 -1
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/SvgIcon.d.ts +3 -1
- package/SvgIcon/SvgIcon.js +3 -1
- package/SvgIcon/svgIconClasses.d.ts +24 -24
- package/Switch/Switch.d.ts +3 -1
- package/Switch/Switch.js +3 -1
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/TextField.d.ts +3 -2
- package/TextField/TextField.js +3 -1
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/ToggleButton.d.ts +2 -0
- package/ToggleButton/ToggleButton.js +2 -0
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/ToggleButtonGroup.d.ts +3 -1
- package/ToggleButtonGroup/ToggleButtonGroup.js +3 -1
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/Unstable_TrapFocus/index.d.ts +2 -2
- package/Unstable_TrapFocus/index.js +1 -1
- package/className/index.d.ts +8 -8
- package/darkScrollbar/index.d.ts +28 -28
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/Alert/Alert.js +3 -1
- package/legacy/AppBar/AppBar.js +3 -1
- package/legacy/Autocomplete/Autocomplete.js +1 -1
- package/legacy/Backdrop/Backdrop.js +27 -20
- package/legacy/Backdrop/backdropClasses.js +6 -0
- package/legacy/Backdrop/index.js +2 -1
- package/legacy/Badge/Badge.js +47 -22
- package/legacy/Badge/badgeClasses.js +8 -0
- package/legacy/Badge/index.js +2 -1
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/Button/Button.js +33 -30
- package/legacy/ButtonBase/ButtonBase.js +11 -11
- package/legacy/ButtonGroup/ButtonGroup.js +3 -1
- package/legacy/Checkbox/Checkbox.js +3 -1
- package/legacy/Chip/Chip.js +3 -1
- package/legacy/CircularProgress/CircularProgress.js +3 -1
- package/legacy/Fab/Fab.js +3 -1
- package/legacy/FilledInput/FilledInput.js +3 -1
- package/legacy/FormControl/FormControl.js +3 -1
- package/legacy/FormControlLabel/FormControlLabel.js +14 -9
- package/legacy/FormLabel/FormLabel.js +3 -1
- package/legacy/Grow/Grow.js +11 -5
- package/legacy/Icon/Icon.js +3 -1
- package/legacy/IconButton/IconButton.js +3 -1
- package/legacy/Input/Input.js +3 -1
- package/legacy/InputBase/InputBase.js +3 -1
- package/legacy/InputLabel/InputLabel.js +3 -1
- package/legacy/LinearProgress/LinearProgress.js +3 -1
- package/legacy/Link/Link.js +12 -4
- package/legacy/ListItemButton/ListItemButton.js +1 -0
- package/legacy/OutlinedInput/OutlinedInput.js +3 -1
- package/legacy/Pagination/Pagination.js +2 -0
- package/legacy/PaginationItem/PaginationItem.js +2 -0
- package/legacy/Popper/Popper.js +18 -6
- package/legacy/Radio/Radio.js +3 -1
- package/legacy/Slider/Slider.js +3 -1
- package/legacy/SvgIcon/SvgIcon.js +3 -1
- package/legacy/Switch/Switch.js +3 -1
- package/legacy/TextField/TextField.js +3 -1
- package/legacy/ToggleButton/ToggleButton.js +2 -0
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +3 -1
- package/legacy/Unstable_TrapFocus/index.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +115 -111
- package/legacy/styles/CssVarsProvider.js +31 -0
- package/legacy/styles/experimental_extendTheme.js +96 -0
- package/legacy/styles/index.js +3 -1
- package/locale/index.d.ts +71 -71
- package/locale/index.js +6 -3
- package/modern/Alert/Alert.js +3 -1
- package/modern/AppBar/AppBar.js +3 -1
- package/modern/Autocomplete/Autocomplete.js +1 -1
- package/modern/Backdrop/Backdrop.js +25 -19
- package/modern/Backdrop/backdropClasses.js +6 -0
- package/modern/Backdrop/index.js +2 -1
- package/modern/Badge/Badge.js +43 -19
- package/modern/Badge/badgeClasses.js +8 -0
- package/modern/Badge/index.js +2 -1
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Button/Button.js +32 -29
- package/modern/ButtonBase/ButtonBase.js +7 -7
- package/modern/ButtonGroup/ButtonGroup.js +3 -1
- package/modern/Checkbox/Checkbox.js +3 -1
- package/modern/Chip/Chip.js +3 -1
- package/modern/CircularProgress/CircularProgress.js +3 -1
- package/modern/Fab/Fab.js +3 -1
- package/modern/FilledInput/FilledInput.js +3 -1
- package/modern/FormControl/FormControl.js +3 -1
- package/modern/FormControlLabel/FormControlLabel.js +14 -9
- package/modern/FormLabel/FormLabel.js +3 -1
- package/modern/Grow/Grow.js +11 -5
- package/modern/Icon/Icon.js +3 -1
- package/modern/IconButton/IconButton.js +3 -1
- package/modern/Input/Input.js +3 -1
- package/modern/InputBase/InputBase.js +3 -1
- package/modern/InputLabel/InputLabel.js +3 -1
- package/modern/LinearProgress/LinearProgress.js +3 -1
- package/modern/Link/Link.js +12 -5
- package/modern/ListItemButton/ListItemButton.js +1 -0
- package/modern/OutlinedInput/OutlinedInput.js +3 -1
- package/modern/Pagination/Pagination.js +2 -0
- package/modern/PaginationItem/PaginationItem.js +2 -0
- package/modern/Popper/Popper.js +16 -6
- package/modern/Radio/Radio.js +3 -1
- package/modern/Slider/Slider.js +3 -1
- package/modern/SvgIcon/SvgIcon.js +3 -1
- package/modern/Switch/Switch.js +3 -1
- package/modern/TextField/TextField.js +3 -1
- package/modern/ToggleButton/ToggleButton.js +2 -0
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +3 -1
- package/modern/Unstable_TrapFocus/index.js +1 -1
- package/modern/index.js +1 -1
- package/modern/locale/index.js +6 -3
- package/modern/styles/CssVarsProvider.js +28 -0
- package/modern/styles/experimental_extendTheme.js +89 -0
- package/modern/styles/index.js +3 -1
- package/node/Alert/Alert.js +3 -1
- package/node/AppBar/AppBar.js +3 -1
- package/node/Autocomplete/Autocomplete.js +1 -1
- package/node/Backdrop/Backdrop.js +28 -23
- package/node/Backdrop/backdropClasses.js +17 -0
- package/node/Backdrop/index.js +17 -5
- package/node/Badge/Badge.js +56 -33
- package/node/Badge/badgeClasses.js +22 -0
- package/node/Badge/index.js +17 -5
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Button/Button.js +104 -97
- package/node/ButtonBase/ButtonBase.js +7 -7
- package/node/ButtonGroup/ButtonGroup.js +3 -1
- package/node/Checkbox/Checkbox.js +3 -1
- package/node/Chip/Chip.js +3 -1
- package/node/CircularProgress/CircularProgress.js +3 -1
- package/node/Fab/Fab.js +3 -1
- package/node/FilledInput/FilledInput.js +3 -1
- package/node/FormControl/FormControl.js +3 -1
- package/node/FormControlLabel/FormControlLabel.js +14 -9
- package/node/FormLabel/FormLabel.js +3 -1
- package/node/Grow/Grow.js +10 -4
- package/node/Icon/Icon.js +3 -1
- package/node/IconButton/IconButton.js +3 -1
- package/node/Input/Input.js +3 -1
- package/node/InputBase/InputBase.js +3 -1
- package/node/InputLabel/InputLabel.js +3 -1
- package/node/LinearProgress/LinearProgress.js +3 -1
- package/node/Link/Link.js +13 -5
- package/node/ListItemButton/ListItemButton.js +1 -0
- package/node/OutlinedInput/OutlinedInput.js +3 -1
- package/node/Pagination/Pagination.js +2 -0
- package/node/PaginationItem/PaginationItem.js +2 -0
- package/node/Popper/Popper.js +19 -8
- package/node/Radio/Radio.js +3 -1
- package/node/Slider/Slider.js +3 -1
- package/node/SvgIcon/SvgIcon.js +3 -1
- package/node/Switch/Switch.js +3 -1
- package/node/TextField/TextField.js +3 -1
- package/node/ToggleButton/ToggleButton.js +2 -0
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +3 -1
- package/node/Unstable_TrapFocus/index.js +2 -2
- package/node/index.js +1 -1
- package/node/locale/index.js +6 -3
- package/node/styles/CssVarsProvider.js +41 -0
- package/node/styles/experimental_extendTheme.js +105 -0
- package/node/styles/index.js +58 -0
- package/package.json +7 -7
- package/styles/CssVarsProvider.d.ts +28 -0
- package/styles/CssVarsProvider.js +28 -0
- package/styles/createPalette.d.ts +26 -0
- package/styles/experimental_extendTheme.d.ts +90 -0
- package/styles/experimental_extendTheme.js +91 -0
- package/styles/index.d.ts +5 -0
- package/styles/index.js +3 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/umd/material-ui.development.js +1314 -505
- package/umd/material-ui.production.min.js +21 -21
- package/useMediaQuery/useMediaQuery.d.ts +31 -31
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
package/node/Button/Button.js
CHANGED
|
@@ -89,106 +89,111 @@ const ButtonRoot = (0, _styled.default)(_ButtonBase.default, {
|
|
|
89
89
|
})(({
|
|
90
90
|
theme,
|
|
91
91
|
ownerState
|
|
92
|
-
}) =>
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
backgroundColor:
|
|
105
|
-
|
|
92
|
+
}) => {
|
|
93
|
+
var _theme$palette$getCon, _theme$palette;
|
|
94
|
+
|
|
95
|
+
return (0, _extends2.default)({}, theme.typography.button, {
|
|
96
|
+
minWidth: 64,
|
|
97
|
+
padding: '6px 16px',
|
|
98
|
+
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
99
|
+
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {
|
|
100
|
+
duration: theme.transitions.duration.short
|
|
101
|
+
}),
|
|
102
|
+
'&:hover': (0, _extends2.default)({
|
|
103
|
+
textDecoration: 'none',
|
|
104
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _system.alpha)(theme.palette.text.primary, theme.palette.action.hoverOpacity),
|
|
105
|
+
// Reset on touch devices, it doesn't add specificity
|
|
106
|
+
'@media (hover: none)': {
|
|
107
|
+
backgroundColor: 'transparent'
|
|
108
|
+
}
|
|
109
|
+
}, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
|
|
110
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
111
|
+
// Reset on touch devices, it doesn't add specificity
|
|
112
|
+
'@media (hover: none)': {
|
|
113
|
+
backgroundColor: 'transparent'
|
|
114
|
+
}
|
|
115
|
+
}, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
|
|
116
|
+
border: `1px solid ${(theme.vars || theme).palette[ownerState.color].main}`,
|
|
117
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _system.alpha)(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
118
|
+
// Reset on touch devices, it doesn't add specificity
|
|
119
|
+
'@media (hover: none)': {
|
|
120
|
+
backgroundColor: 'transparent'
|
|
121
|
+
}
|
|
122
|
+
}, ownerState.variant === 'contained' && {
|
|
123
|
+
backgroundColor: (theme.vars || theme).palette.grey.A100,
|
|
124
|
+
boxShadow: (theme.vars || theme).shadows[4],
|
|
125
|
+
// Reset on touch devices, it doesn't add specificity
|
|
126
|
+
'@media (hover: none)': {
|
|
127
|
+
boxShadow: (theme.vars || theme).shadows[2],
|
|
128
|
+
backgroundColor: (theme.vars || theme).palette.grey[300]
|
|
129
|
+
}
|
|
130
|
+
}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
|
|
131
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark,
|
|
132
|
+
// Reset on touch devices, it doesn't add specificity
|
|
133
|
+
'@media (hover: none)': {
|
|
134
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
135
|
+
}
|
|
136
|
+
}),
|
|
137
|
+
'&:active': (0, _extends2.default)({}, ownerState.variant === 'contained' && {
|
|
138
|
+
boxShadow: (theme.vars || theme).shadows[8]
|
|
139
|
+
}),
|
|
140
|
+
[`&.${_buttonClasses.default.focusVisible}`]: (0, _extends2.default)({}, ownerState.variant === 'contained' && {
|
|
141
|
+
boxShadow: (theme.vars || theme).shadows[6]
|
|
142
|
+
}),
|
|
143
|
+
[`&.${_buttonClasses.default.disabled}`]: (0, _extends2.default)({
|
|
144
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
145
|
+
}, ownerState.variant === 'outlined' && {
|
|
146
|
+
border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
|
|
147
|
+
}, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
|
|
148
|
+
border: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
149
|
+
}, ownerState.variant === 'contained' && {
|
|
150
|
+
color: (theme.vars || theme).palette.action.disabled,
|
|
151
|
+
boxShadow: (theme.vars || theme).shadows[0],
|
|
152
|
+
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
|
153
|
+
})
|
|
154
|
+
}, ownerState.variant === 'text' && {
|
|
155
|
+
padding: '6px 8px'
|
|
106
156
|
}, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
157
|
+
color: (theme.vars || theme).palette[ownerState.color].main
|
|
158
|
+
}, ownerState.variant === 'outlined' && {
|
|
159
|
+
padding: '5px 15px',
|
|
160
|
+
border: '1px solid currentColor'
|
|
112
161
|
}, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
// Reset on touch devices, it doesn't add specificity
|
|
116
|
-
'@media (hover: none)': {
|
|
117
|
-
backgroundColor: 'transparent'
|
|
118
|
-
}
|
|
162
|
+
color: (theme.vars || theme).palette[ownerState.color].main,
|
|
163
|
+
border: theme.vars ? `1px solid rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : `1px solid ${(0, _system.alpha)(theme.palette[ownerState.color].main, 0.5)}`
|
|
119
164
|
}, ownerState.variant === 'contained' && {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
boxShadow: theme.shadows[2],
|
|
125
|
-
backgroundColor: theme.palette.grey[300]
|
|
126
|
-
}
|
|
165
|
+
color: theme.vars ? // this is safe because grey does not change between default light/dark mode
|
|
166
|
+
theme.vars.palette.text.primary : (_theme$palette$getCon = (_theme$palette = theme.palette).getContrastText) == null ? void 0 : _theme$palette$getCon.call(_theme$palette, theme.palette.grey[300]),
|
|
167
|
+
backgroundColor: (theme.vars || theme).palette.grey[300],
|
|
168
|
+
boxShadow: (theme.vars || theme).shadows[2]
|
|
127
169
|
}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
}, ownerState.variant === 'outlined' && {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}, ownerState.
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
}, ownerState.variant === 'outlined' && {
|
|
156
|
-
padding: '5px 15px',
|
|
157
|
-
border: `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`
|
|
158
|
-
}, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {
|
|
159
|
-
color: theme.palette[ownerState.color].main,
|
|
160
|
-
border: `1px solid ${(0, _system.alpha)(theme.palette[ownerState.color].main, 0.5)}`
|
|
161
|
-
}, ownerState.variant === 'contained' && {
|
|
162
|
-
color: theme.palette.getContrastText(theme.palette.grey[300]),
|
|
163
|
-
backgroundColor: theme.palette.grey[300],
|
|
164
|
-
boxShadow: theme.shadows[2]
|
|
165
|
-
}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
|
|
166
|
-
color: theme.palette[ownerState.color].contrastText,
|
|
167
|
-
backgroundColor: theme.palette[ownerState.color].main
|
|
168
|
-
}, ownerState.color === 'inherit' && {
|
|
169
|
-
color: 'inherit',
|
|
170
|
-
borderColor: 'currentColor'
|
|
171
|
-
}, ownerState.size === 'small' && ownerState.variant === 'text' && {
|
|
172
|
-
padding: '4px 5px',
|
|
173
|
-
fontSize: theme.typography.pxToRem(13)
|
|
174
|
-
}, ownerState.size === 'large' && ownerState.variant === 'text' && {
|
|
175
|
-
padding: '8px 11px',
|
|
176
|
-
fontSize: theme.typography.pxToRem(15)
|
|
177
|
-
}, ownerState.size === 'small' && ownerState.variant === 'outlined' && {
|
|
178
|
-
padding: '3px 9px',
|
|
179
|
-
fontSize: theme.typography.pxToRem(13)
|
|
180
|
-
}, ownerState.size === 'large' && ownerState.variant === 'outlined' && {
|
|
181
|
-
padding: '7px 21px',
|
|
182
|
-
fontSize: theme.typography.pxToRem(15)
|
|
183
|
-
}, ownerState.size === 'small' && ownerState.variant === 'contained' && {
|
|
184
|
-
padding: '4px 10px',
|
|
185
|
-
fontSize: theme.typography.pxToRem(13)
|
|
186
|
-
}, ownerState.size === 'large' && ownerState.variant === 'contained' && {
|
|
187
|
-
padding: '8px 22px',
|
|
188
|
-
fontSize: theme.typography.pxToRem(15)
|
|
189
|
-
}, ownerState.fullWidth && {
|
|
190
|
-
width: '100%'
|
|
191
|
-
}), ({
|
|
170
|
+
color: (theme.vars || theme).palette[ownerState.color].contrastText,
|
|
171
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
172
|
+
}, ownerState.color === 'inherit' && {
|
|
173
|
+
color: 'inherit',
|
|
174
|
+
borderColor: 'currentColor'
|
|
175
|
+
}, ownerState.size === 'small' && ownerState.variant === 'text' && {
|
|
176
|
+
padding: '4px 5px',
|
|
177
|
+
fontSize: theme.typography.pxToRem(13)
|
|
178
|
+
}, ownerState.size === 'large' && ownerState.variant === 'text' && {
|
|
179
|
+
padding: '8px 11px',
|
|
180
|
+
fontSize: theme.typography.pxToRem(15)
|
|
181
|
+
}, ownerState.size === 'small' && ownerState.variant === 'outlined' && {
|
|
182
|
+
padding: '3px 9px',
|
|
183
|
+
fontSize: theme.typography.pxToRem(13)
|
|
184
|
+
}, ownerState.size === 'large' && ownerState.variant === 'outlined' && {
|
|
185
|
+
padding: '7px 21px',
|
|
186
|
+
fontSize: theme.typography.pxToRem(15)
|
|
187
|
+
}, ownerState.size === 'small' && ownerState.variant === 'contained' && {
|
|
188
|
+
padding: '4px 10px',
|
|
189
|
+
fontSize: theme.typography.pxToRem(13)
|
|
190
|
+
}, ownerState.size === 'large' && ownerState.variant === 'contained' && {
|
|
191
|
+
padding: '8px 22px',
|
|
192
|
+
fontSize: theme.typography.pxToRem(15)
|
|
193
|
+
}, ownerState.fullWidth && {
|
|
194
|
+
width: '100%'
|
|
195
|
+
});
|
|
196
|
+
}, ({
|
|
192
197
|
ownerState
|
|
193
198
|
}) => ownerState.disableElevation && {
|
|
194
199
|
boxShadow: 'none',
|
|
@@ -326,7 +331,9 @@ process.env.NODE_ENV !== "production" ? Button.propTypes
|
|
|
326
331
|
className: _propTypes.default.string,
|
|
327
332
|
|
|
328
333
|
/**
|
|
329
|
-
* The color of the component.
|
|
334
|
+
* The color of the component.
|
|
335
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
336
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
330
337
|
* @default 'primary'
|
|
331
338
|
*/
|
|
332
339
|
color: _propTypes.default
|
|
@@ -170,11 +170,16 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
|
|
|
170
170
|
buttonRef.current.focus();
|
|
171
171
|
}
|
|
172
172
|
}), []);
|
|
173
|
+
const [mountedState, setMountedState] = React.useState(false);
|
|
174
|
+
React.useEffect(() => {
|
|
175
|
+
setMountedState(true);
|
|
176
|
+
}, []);
|
|
177
|
+
const enableTouchRipple = mountedState && !disableRipple && !disabled;
|
|
173
178
|
React.useEffect(() => {
|
|
174
|
-
if (focusVisible && focusRipple && !disableRipple) {
|
|
179
|
+
if (focusVisible && focusRipple && !disableRipple && mountedState) {
|
|
175
180
|
rippleRef.current.pulsate();
|
|
176
181
|
}
|
|
177
|
-
}, [disableRipple, focusRipple, focusVisible]);
|
|
182
|
+
}, [disableRipple, focusRipple, focusVisible, mountedState]);
|
|
178
183
|
|
|
179
184
|
function useRippleHandler(rippleAction, eventCallback, skipRippleAction = disableTouchRipple) {
|
|
180
185
|
return (0, _useEventCallback.default)(event => {
|
|
@@ -318,11 +323,6 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
|
|
|
318
323
|
|
|
319
324
|
const handleOwnRef = (0, _useForkRef.default)(focusVisibleRef, buttonRef);
|
|
320
325
|
const handleRef = (0, _useForkRef.default)(ref, handleOwnRef);
|
|
321
|
-
const [mountedState, setMountedState] = React.useState(false);
|
|
322
|
-
React.useEffect(() => {
|
|
323
|
-
setMountedState(true);
|
|
324
|
-
}, []);
|
|
325
|
-
const enableTouchRipple = mountedState && !disableRipple && !disabled;
|
|
326
326
|
|
|
327
327
|
if (process.env.NODE_ENV !== 'production') {
|
|
328
328
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
@@ -228,7 +228,9 @@ process.env.NODE_ENV !== "production" ? ButtonGroup.propTypes
|
|
|
228
228
|
className: _propTypes.default.string,
|
|
229
229
|
|
|
230
230
|
/**
|
|
231
|
-
* The color of the component.
|
|
231
|
+
* The color of the component.
|
|
232
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
233
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
232
234
|
* @default 'primary'
|
|
233
235
|
*/
|
|
234
236
|
color: _propTypes.default
|
|
@@ -159,7 +159,9 @@ process.env.NODE_ENV !== "production" ? Checkbox.propTypes
|
|
|
159
159
|
classes: _propTypes.default.object,
|
|
160
160
|
|
|
161
161
|
/**
|
|
162
|
-
* The color of the component.
|
|
162
|
+
* The color of the component.
|
|
163
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
164
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
163
165
|
* @default 'primary'
|
|
164
166
|
*/
|
|
165
167
|
color: _propTypes.default
|
package/node/Chip/Chip.js
CHANGED
|
@@ -474,7 +474,9 @@ process.env.NODE_ENV !== "production" ? Chip.propTypes
|
|
|
474
474
|
clickable: _propTypes.default.bool,
|
|
475
475
|
|
|
476
476
|
/**
|
|
477
|
-
* The color of the component.
|
|
477
|
+
* The color of the component.
|
|
478
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
479
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
478
480
|
* @default 'default'
|
|
479
481
|
*/
|
|
480
482
|
color: _propTypes.default
|
|
@@ -229,7 +229,9 @@ process.env.NODE_ENV !== "production" ? CircularProgress.propTypes
|
|
|
229
229
|
className: _propTypes.default.string,
|
|
230
230
|
|
|
231
231
|
/**
|
|
232
|
-
* The color of the component.
|
|
232
|
+
* The color of the component.
|
|
233
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
234
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
233
235
|
* @default 'primary'
|
|
234
236
|
*/
|
|
235
237
|
color: _propTypes.default
|
package/node/Fab/Fab.js
CHANGED
|
@@ -198,7 +198,9 @@ process.env.NODE_ENV !== "production" ? Fab.propTypes
|
|
|
198
198
|
className: _propTypes.default.string,
|
|
199
199
|
|
|
200
200
|
/**
|
|
201
|
-
* The color of the component.
|
|
201
|
+
* The color of the component.
|
|
202
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
203
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
202
204
|
* @default 'default'
|
|
203
205
|
*/
|
|
204
206
|
color: _propTypes.default.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
|
|
@@ -258,7 +258,9 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes
|
|
|
258
258
|
classes: _propTypes.default.object,
|
|
259
259
|
|
|
260
260
|
/**
|
|
261
|
-
* The color of the component.
|
|
261
|
+
* The color of the component.
|
|
262
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
263
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
262
264
|
* The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
|
|
263
265
|
*/
|
|
264
266
|
color: _propTypes.default
|
|
@@ -271,7 +271,9 @@ process.env.NODE_ENV !== "production" ? FormControl.propTypes
|
|
|
271
271
|
className: _propTypes.default.string,
|
|
272
272
|
|
|
273
273
|
/**
|
|
274
|
-
* The color of the component.
|
|
274
|
+
* The color of the component.
|
|
275
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
276
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
275
277
|
* @default 'primary'
|
|
276
278
|
*/
|
|
277
279
|
color: _propTypes.default
|
|
@@ -119,7 +119,7 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
|
|
|
119
119
|
control,
|
|
120
120
|
disabled: disabledProp,
|
|
121
121
|
disableTypography,
|
|
122
|
-
label,
|
|
122
|
+
label: labelProp,
|
|
123
123
|
labelPlacement = 'end'
|
|
124
124
|
} = props,
|
|
125
125
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
@@ -149,22 +149,27 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
|
|
|
149
149
|
});
|
|
150
150
|
const ownerState = (0, _extends2.default)({}, props, {
|
|
151
151
|
disabled,
|
|
152
|
-
label,
|
|
153
152
|
labelPlacement,
|
|
154
153
|
error: fcs.error
|
|
155
154
|
});
|
|
156
155
|
const classes = useUtilityClasses(ownerState);
|
|
156
|
+
let label = labelProp;
|
|
157
|
+
|
|
158
|
+
if (label != null && label.type !== _Typography.default && !disableTypography) {
|
|
159
|
+
label = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, (0, _extends2.default)({
|
|
160
|
+
component: "span",
|
|
161
|
+
className: classes.label
|
|
162
|
+
}, componentsProps.typography, {
|
|
163
|
+
children: label
|
|
164
|
+
}));
|
|
165
|
+
}
|
|
166
|
+
|
|
157
167
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(FormControlLabelRoot, (0, _extends2.default)({
|
|
158
168
|
className: (0, _clsx.default)(classes.root, className),
|
|
159
169
|
ownerState: ownerState,
|
|
160
170
|
ref: ref
|
|
161
171
|
}, other, {
|
|
162
|
-
children: [/*#__PURE__*/React.cloneElement(control, controlProps), label
|
|
163
|
-
component: "span",
|
|
164
|
-
className: classes.label
|
|
165
|
-
}, componentsProps.typography, {
|
|
166
|
-
children: label
|
|
167
|
-
}))]
|
|
172
|
+
children: [/*#__PURE__*/React.cloneElement(control, controlProps), label]
|
|
168
173
|
}));
|
|
169
174
|
});
|
|
170
175
|
process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes
|
|
@@ -221,7 +226,7 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes
|
|
|
221
226
|
/**
|
|
222
227
|
* A text or an element to be used in an enclosing label element.
|
|
223
228
|
*/
|
|
224
|
-
label: _propTypes.default.
|
|
229
|
+
label: _propTypes.default.node,
|
|
225
230
|
|
|
226
231
|
/**
|
|
227
232
|
* The position of the label.
|
|
@@ -160,7 +160,9 @@ process.env.NODE_ENV !== "production" ? FormLabel.propTypes
|
|
|
160
160
|
className: _propTypes.default.string,
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
|
-
* The color of the component.
|
|
163
|
+
* The color of the component.
|
|
164
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
165
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
164
166
|
*/
|
|
165
167
|
color: _propTypes.default
|
|
166
168
|
/* @typescript-to-proptypes-ignore */
|
package/node/Grow/Grow.js
CHANGED
|
@@ -47,6 +47,12 @@ const styles = {
|
|
|
47
47
|
transform: 'none'
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
+
/**
|
|
51
|
+
* Conditionally apply a workaround for the CSS transition bug in Safari 15.4.
|
|
52
|
+
* Remove this workaround once the Safari bug is fixed.
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
const isSafari154 = typeof navigator !== 'undefined' && /^((?!chrome|android).)*safari/i.test(navigator.userAgent) && /version\/15\.[4-9]/i.test(navigator.userAgent);
|
|
50
56
|
/**
|
|
51
57
|
* The Grow transition is used by the [Tooltip](/components/tooltips/) and
|
|
52
58
|
* [Popover](/components/popover/) components.
|
|
@@ -119,7 +125,7 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
119
125
|
duration,
|
|
120
126
|
delay
|
|
121
127
|
}), theme.transitions.create('transform', {
|
|
122
|
-
duration: duration * 0.666,
|
|
128
|
+
duration: isSafari154 ? duration : duration * 0.666,
|
|
123
129
|
delay,
|
|
124
130
|
easing: transitionTimingFunction
|
|
125
131
|
})].join(',');
|
|
@@ -155,11 +161,11 @@ const Grow = /*#__PURE__*/React.forwardRef(function Grow(props, ref) {
|
|
|
155
161
|
duration,
|
|
156
162
|
delay
|
|
157
163
|
}), theme.transitions.create('transform', {
|
|
158
|
-
duration: duration * 0.666,
|
|
159
|
-
delay: delay || duration * 0.333,
|
|
164
|
+
duration: isSafari154 ? duration : duration * 0.666,
|
|
165
|
+
delay: isSafari154 ? delay : delay || duration * 0.333,
|
|
160
166
|
easing: transitionTimingFunction
|
|
161
167
|
})].join(',');
|
|
162
|
-
node.style.opacity =
|
|
168
|
+
node.style.opacity = 0;
|
|
163
169
|
node.style.transform = getScale(0.75);
|
|
164
170
|
|
|
165
171
|
if (onExit) {
|
package/node/Icon/Icon.js
CHANGED
|
@@ -151,7 +151,9 @@ process.env.NODE_ENV !== "production" ? Icon.propTypes
|
|
|
151
151
|
className: _propTypes.default.string,
|
|
152
152
|
|
|
153
153
|
/**
|
|
154
|
-
* The color of the component.
|
|
154
|
+
* The color of the component.
|
|
155
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
156
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
155
157
|
* @default 'inherit'
|
|
156
158
|
*/
|
|
157
159
|
color: _propTypes.default
|
|
@@ -189,7 +189,9 @@ process.env.NODE_ENV !== "production" ? IconButton.propTypes
|
|
|
189
189
|
className: _propTypes.default.string,
|
|
190
190
|
|
|
191
191
|
/**
|
|
192
|
-
* The color of the component.
|
|
192
|
+
* The color of the component.
|
|
193
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
194
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
193
195
|
* @default 'default'
|
|
194
196
|
*/
|
|
195
197
|
color: _propTypes.default
|
package/node/Input/Input.js
CHANGED
|
@@ -194,7 +194,9 @@ process.env.NODE_ENV !== "production" ? Input.propTypes
|
|
|
194
194
|
classes: _propTypes.default.object,
|
|
195
195
|
|
|
196
196
|
/**
|
|
197
|
-
* The color of the component.
|
|
197
|
+
* The color of the component.
|
|
198
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
199
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
198
200
|
* The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
|
|
199
201
|
*/
|
|
200
202
|
color: _propTypes.default
|
|
@@ -563,7 +563,9 @@ process.env.NODE_ENV !== "production" ? InputBase.propTypes
|
|
|
563
563
|
className: _propTypes.default.string,
|
|
564
564
|
|
|
565
565
|
/**
|
|
566
|
-
* The color of the component.
|
|
566
|
+
* The color of the component.
|
|
567
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
568
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
567
569
|
* The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
|
|
568
570
|
*/
|
|
569
571
|
color: _propTypes.default
|
|
@@ -185,7 +185,9 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes
|
|
|
185
185
|
classes: _propTypes.default.object,
|
|
186
186
|
|
|
187
187
|
/**
|
|
188
|
-
* The color of the component.
|
|
188
|
+
* The color of the component.
|
|
189
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
190
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
189
191
|
*/
|
|
190
192
|
color: _propTypes.default
|
|
191
193
|
/* @typescript-to-proptypes-ignore */
|
|
@@ -351,7 +351,9 @@ process.env.NODE_ENV !== "production" ? LinearProgress.propTypes
|
|
|
351
351
|
className: _propTypes.default.string,
|
|
352
352
|
|
|
353
353
|
/**
|
|
354
|
-
* The color of the component.
|
|
354
|
+
* The color of the component.
|
|
355
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
356
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
355
357
|
* @default 'primary'
|
|
356
358
|
*/
|
|
357
359
|
color: _propTypes.default
|
package/node/Link/Link.js
CHANGED
|
@@ -27,6 +27,8 @@ var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
|
27
27
|
|
|
28
28
|
var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
29
29
|
|
|
30
|
+
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
31
|
+
|
|
30
32
|
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
31
33
|
|
|
32
34
|
var _useIsFocusVisible = _interopRequireDefault(require("../utils/useIsFocusVisible"));
|
|
@@ -39,7 +41,7 @@ var _linkClasses = _interopRequireWildcard(require("./linkClasses"));
|
|
|
39
41
|
|
|
40
42
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
41
43
|
|
|
42
|
-
const _excluded = ["className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant"];
|
|
44
|
+
const _excluded = ["className", "color", "component", "onBlur", "onFocus", "TypographyClasses", "underline", "variant", "sx"];
|
|
43
45
|
|
|
44
46
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
45
47
|
|
|
@@ -127,6 +129,7 @@ const LinkRoot = (0, _styled.default)(_Typography.default, {
|
|
|
127
129
|
});
|
|
128
130
|
});
|
|
129
131
|
const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
132
|
+
const theme = (0, _useTheme.default)();
|
|
130
133
|
const props = (0, _useThemeProps.default)({
|
|
131
134
|
props: inProps,
|
|
132
135
|
name: 'MuiLink'
|
|
@@ -139,7 +142,8 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
|
139
142
|
onFocus,
|
|
140
143
|
TypographyClasses,
|
|
141
144
|
underline = 'always',
|
|
142
|
-
variant = 'inherit'
|
|
145
|
+
variant = 'inherit',
|
|
146
|
+
sx
|
|
143
147
|
} = props,
|
|
144
148
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
145
149
|
const {
|
|
@@ -176,7 +180,9 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
|
176
180
|
};
|
|
177
181
|
|
|
178
182
|
const ownerState = (0, _extends2.default)({}, props, {
|
|
179
|
-
|
|
183
|
+
// It is too complex to support any types of `sx`.
|
|
184
|
+
// Need to find a better way to get rid of the color manipulation for `textDecorationColor`.
|
|
185
|
+
color: (typeof sx === 'function' ? sx(theme).color : sx == null ? void 0 : sx.color) || color,
|
|
180
186
|
component,
|
|
181
187
|
focusVisible,
|
|
182
188
|
underline,
|
|
@@ -186,13 +192,15 @@ const Link = /*#__PURE__*/React.forwardRef(function Link(inProps, ref) {
|
|
|
186
192
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(LinkRoot, (0, _extends2.default)({
|
|
187
193
|
className: (0, _clsx.default)(classes.root, className),
|
|
188
194
|
classes: TypographyClasses,
|
|
189
|
-
color: color,
|
|
190
195
|
component: component,
|
|
191
196
|
onBlur: handleBlur,
|
|
192
197
|
onFocus: handleFocus,
|
|
193
198
|
ref: handlerRef,
|
|
194
199
|
ownerState: ownerState,
|
|
195
|
-
variant: variant
|
|
200
|
+
variant: variant,
|
|
201
|
+
sx: [{
|
|
202
|
+
color: colorTransformations[color] || color
|
|
203
|
+
}, ...(Array.isArray(sx) ? sx : [sx])]
|
|
196
204
|
}, other));
|
|
197
205
|
});
|
|
198
206
|
process.env.NODE_ENV !== "production" ? Link.propTypes
|
|
@@ -202,7 +202,9 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes
|
|
|
202
202
|
classes: _propTypes.default.object,
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
|
-
* The color of the component.
|
|
205
|
+
* The color of the component.
|
|
206
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
207
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
206
208
|
* The prop defaults to the value (`'primary'`) inherited from the parent FormControl component.
|
|
207
209
|
*/
|
|
208
210
|
color: _propTypes.default
|
|
@@ -177,6 +177,8 @@ process.env.NODE_ENV !== "production" ? Pagination.propTypes
|
|
|
177
177
|
|
|
178
178
|
/**
|
|
179
179
|
* The active color.
|
|
180
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
181
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
180
182
|
* @default 'standard'
|
|
181
183
|
*/
|
|
182
184
|
color: _propTypes.default
|
|
@@ -327,6 +327,8 @@ process.env.NODE_ENV !== "production" ? PaginationItem.propTypes
|
|
|
327
327
|
|
|
328
328
|
/**
|
|
329
329
|
* The active color.
|
|
330
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
331
|
+
* [palette customization guide](https://mui.com/customization/palette/#adding-new-colors).
|
|
330
332
|
* @default 'standard'
|
|
331
333
|
*/
|
|
332
334
|
color: _propTypes.default
|