@mui/material 5.8.4 → 5.8.5
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/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/AppBar.js +22 -5
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/Avatar.js +7 -4
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/Badge.js +2 -2
- package/Badge/badgeClasses.d.ts +56 -56
- 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/buttonClasses.d.ts +100 -100
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +69 -4
- 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/checkboxClasses.d.ts +18 -18
- package/Chip/Chip.js +31 -30
- package/Chip/chipClasses.d.ts +80 -80
- 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 +6 -6
- package/Dialog/Dialog.js +11 -6
- 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/fabClasses.d.ts +26 -26
- package/FilledInput/FilledInput.js +28 -13
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- 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/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/InputBase.js +2 -2
- package/InputBase/inputBaseClasses.d.ts +44 -44
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/LinearProgress.js +6 -2
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/getTextDecoration.d.ts +15 -15
- 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/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/Modal/Modal.d.ts +2 -0
- package/Modal/Modal.js +25 -8
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/OutlinedInput.js +25 -10
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/Pagination/paginationClasses.d.ts +14 -14
- 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 -29
- 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/Skeleton.js +8 -3
- package/Skeleton/skeletonClasses.d.ts +24 -24
- package/Slider/Slider.js +12 -12
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/SnackbarContent.js +3 -3
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/SpeedDialAction.js +7 -7
- 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/StepConnector.js +14 -11
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/StepContent.js +1 -1
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +24 -24
- package/Switch/Switch.js +11 -11
- 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/TableCell.js +5 -5
- 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/Tabs.js +6 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/Tooltip.js +1 -1
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/AppBar/AppBar.js +23 -4
- package/legacy/Avatar/Avatar.js +7 -4
- package/legacy/Badge/Badge.js +2 -2
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/Chip/Chip.js +31 -30
- package/legacy/Dialog/Dialog.js +11 -6
- package/legacy/FilledInput/FilledInput.js +28 -14
- package/legacy/InputBase/InputBase.js +2 -2
- package/legacy/LinearProgress/LinearProgress.js +6 -2
- package/legacy/Modal/Modal.js +23 -7
- package/legacy/OutlinedInput/OutlinedInput.js +21 -9
- package/legacy/Skeleton/Skeleton.js +2 -2
- package/legacy/Slider/Slider.js +12 -12
- package/legacy/SnackbarContent/SnackbarContent.js +3 -3
- package/legacy/SpeedDialAction/SpeedDialAction.js +7 -7
- package/legacy/StepConnector/StepConnector.js +2 -1
- package/legacy/StepContent/StepContent.js +1 -1
- package/legacy/Switch/Switch.js +11 -11
- package/legacy/TableCell/TableCell.js +5 -5
- package/legacy/Tabs/Tabs.js +6 -16
- package/legacy/Tooltip/Tooltip.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/CssVarsProvider.js +1 -1
- package/legacy/styles/experimental_extendTheme.js +113 -18
- package/locale/index.d.ts +71 -71
- package/modern/AppBar/AppBar.js +22 -5
- package/modern/Avatar/Avatar.js +7 -4
- package/modern/Badge/Badge.js +2 -2
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Chip/Chip.js +31 -30
- package/modern/Dialog/Dialog.js +11 -6
- package/modern/FilledInput/FilledInput.js +27 -12
- package/modern/InputBase/InputBase.js +2 -2
- package/modern/LinearProgress/LinearProgress.js +6 -2
- package/modern/Modal/Modal.js +24 -7
- package/modern/OutlinedInput/OutlinedInput.js +25 -10
- package/modern/Skeleton/Skeleton.js +7 -2
- package/modern/Slider/Slider.js +12 -12
- package/modern/SnackbarContent/SnackbarContent.js +3 -3
- package/modern/SpeedDialAction/SpeedDialAction.js +7 -7
- package/modern/StepConnector/StepConnector.js +14 -11
- package/modern/StepContent/StepContent.js +1 -1
- package/modern/Switch/Switch.js +11 -11
- package/modern/TableCell/TableCell.js +5 -5
- package/modern/Tabs/Tabs.js +6 -16
- package/modern/Tooltip/Tooltip.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/CssVarsProvider.js +1 -1
- package/modern/styles/experimental_extendTheme.js +114 -18
- package/node/AppBar/AppBar.js +22 -5
- package/node/Avatar/Avatar.js +7 -4
- package/node/Badge/Badge.js +2 -2
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Chip/Chip.js +31 -30
- package/node/Dialog/Dialog.js +11 -6
- package/node/FilledInput/FilledInput.js +28 -13
- package/node/InputBase/InputBase.js +2 -2
- package/node/LinearProgress/LinearProgress.js +6 -2
- package/node/Modal/Modal.js +25 -8
- package/node/OutlinedInput/OutlinedInput.js +25 -10
- package/node/Skeleton/Skeleton.js +7 -2
- package/node/Slider/Slider.js +12 -12
- package/node/SnackbarContent/SnackbarContent.js +3 -3
- package/node/SpeedDialAction/SpeedDialAction.js +7 -7
- package/node/StepConnector/StepConnector.js +14 -11
- package/node/StepContent/StepContent.js +1 -1
- package/node/Switch/Switch.js +11 -11
- package/node/TableCell/TableCell.js +5 -5
- package/node/Tabs/Tabs.js +6 -16
- package/node/Tooltip/Tooltip.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/CssVarsProvider.js +1 -1
- package/node/styles/experimental_extendTheme.js +112 -17
- package/package.json +4 -4
- package/styles/CssVarsProvider.js +1 -1
- package/styles/createPalette.d.ts +65 -2
- package/styles/experimental_extendTheme.js +114 -18
- 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 +548 -240
- package/umd/material-ui.production.min.js +27 -22
- 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/legacy/AppBar/AppBar.js
CHANGED
|
@@ -19,6 +19,12 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
19
19
|
root: ['root', "color".concat(capitalize(color)), "position".concat(capitalize(position))]
|
|
20
20
|
};
|
|
21
21
|
return composeClasses(slots, getAppBarUtilityClass, classes);
|
|
22
|
+
}; // var2 is the fallback.
|
|
23
|
+
// Ex. var1: 'var(--a)', var2: 'var(--b)'; return: 'var(--a, var(--b))'
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
var joinVars = function joinVars(var1, var2) {
|
|
27
|
+
return "".concat(var1 == null ? void 0 : var1.replace(')', ''), ", ").concat(var2, ")");
|
|
22
28
|
};
|
|
23
29
|
|
|
24
30
|
var AppBarRoot = styled(Paper, {
|
|
@@ -41,7 +47,7 @@ var AppBarRoot = styled(Paper, {
|
|
|
41
47
|
flexShrink: 0
|
|
42
48
|
}, ownerState.position === 'fixed' && {
|
|
43
49
|
position: 'fixed',
|
|
44
|
-
zIndex: theme.zIndex.appBar,
|
|
50
|
+
zIndex: (theme.vars || theme).zIndex.appBar,
|
|
45
51
|
top: 0,
|
|
46
52
|
left: 'auto',
|
|
47
53
|
right: 0,
|
|
@@ -51,14 +57,14 @@ var AppBarRoot = styled(Paper, {
|
|
|
51
57
|
}
|
|
52
58
|
}, ownerState.position === 'absolute' && {
|
|
53
59
|
position: 'absolute',
|
|
54
|
-
zIndex: theme.zIndex.appBar,
|
|
60
|
+
zIndex: (theme.vars || theme).zIndex.appBar,
|
|
55
61
|
top: 0,
|
|
56
62
|
left: 'auto',
|
|
57
63
|
right: 0
|
|
58
64
|
}, ownerState.position === 'sticky' && {
|
|
59
65
|
// ⚠️ sticky is not supported by IE11.
|
|
60
66
|
position: 'sticky',
|
|
61
|
-
zIndex: theme.zIndex.appBar,
|
|
67
|
+
zIndex: (theme.vars || theme).zIndex.appBar,
|
|
62
68
|
top: 0,
|
|
63
69
|
left: 'auto',
|
|
64
70
|
right: 0
|
|
@@ -66,7 +72,7 @@ var AppBarRoot = styled(Paper, {
|
|
|
66
72
|
position: 'static'
|
|
67
73
|
}, ownerState.position === 'relative' && {
|
|
68
74
|
position: 'relative'
|
|
69
|
-
}, ownerState.color === 'default' && {
|
|
75
|
+
}, !theme.vars && _extends({}, ownerState.color === 'default' && {
|
|
70
76
|
backgroundColor: backgroundColorDefault,
|
|
71
77
|
color: theme.palette.getContrastText(backgroundColorDefault)
|
|
72
78
|
}, ownerState.color && ownerState.color !== 'default' && ownerState.color !== 'inherit' && ownerState.color !== 'transparent' && {
|
|
@@ -82,6 +88,19 @@ var AppBarRoot = styled(Paper, {
|
|
|
82
88
|
color: 'inherit'
|
|
83
89
|
}, theme.palette.mode === 'dark' && {
|
|
84
90
|
backgroundImage: 'none'
|
|
91
|
+
})), theme.vars && _extends({}, ownerState.color === 'default' && {
|
|
92
|
+
'--AppBar-background': ownerState.enableColorOnDark ? theme.vars.palette.AppBar.defaultBg : joinVars(theme.vars.palette.AppBar.darkBg, theme.vars.palette.AppBar.defaultBg),
|
|
93
|
+
'--AppBar-color': ownerState.enableColorOnDark ? theme.vars.palette.text.primary : joinVars(theme.vars.palette.AppBar.darkColor, theme.vars.palette.text.primary)
|
|
94
|
+
}, ownerState.color && !ownerState.color.match(/^(default|inherit|transparent)$/) && {
|
|
95
|
+
'--AppBar-background': ownerState.enableColorOnDark ? theme.vars.palette[ownerState.color].main : joinVars(theme.vars.palette.AppBar.darkBg, theme.vars.palette[ownerState.color].main),
|
|
96
|
+
'--AppBar-color': ownerState.enableColorOnDark ? theme.vars.palette[ownerState.color].contrastText : joinVars(theme.vars.palette.AppBar.darkColor, theme.vars.palette[ownerState.color].contrastText)
|
|
97
|
+
}, {
|
|
98
|
+
backgroundColor: 'var(--AppBar-background)',
|
|
99
|
+
color: ownerState.color === 'inherit' ? 'inherit' : 'var(--AppBar-color)'
|
|
100
|
+
}, ownerState.color === 'transparent' && {
|
|
101
|
+
backgroundImage: 'none',
|
|
102
|
+
backgroundColor: 'transparent',
|
|
103
|
+
color: 'inherit'
|
|
85
104
|
}));
|
|
86
105
|
});
|
|
87
106
|
var AppBar = /*#__PURE__*/React.forwardRef(function AppBar(inProps, ref) {
|
package/legacy/Avatar/Avatar.js
CHANGED
|
@@ -47,13 +47,16 @@ var AvatarRoot = styled('div', {
|
|
|
47
47
|
overflow: 'hidden',
|
|
48
48
|
userSelect: 'none'
|
|
49
49
|
}, ownerState.variant === 'rounded' && {
|
|
50
|
-
borderRadius: theme.shape.borderRadius
|
|
50
|
+
borderRadius: (theme.vars || theme).shape.borderRadius
|
|
51
51
|
}, ownerState.variant === 'square' && {
|
|
52
52
|
borderRadius: 0
|
|
53
|
-
}, ownerState.colorDefault && {
|
|
54
|
-
color: theme.palette.background.default
|
|
53
|
+
}, ownerState.colorDefault && _extends({
|
|
54
|
+
color: (theme.vars || theme).palette.background.default
|
|
55
|
+
}, theme.vars ? {
|
|
56
|
+
backgroundColor: theme.vars.palette.Avatar.defaultBg
|
|
57
|
+
} : {
|
|
55
58
|
backgroundColor: theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]
|
|
56
|
-
});
|
|
59
|
+
}));
|
|
57
60
|
});
|
|
58
61
|
var AvatarImg = styled('img', {
|
|
59
62
|
name: 'MuiAvatar',
|
package/legacy/Badge/Badge.js
CHANGED
|
@@ -325,8 +325,8 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
|
|
|
325
325
|
* @default {}
|
|
326
326
|
*/
|
|
327
327
|
componentsProps: PropTypes.shape({
|
|
328
|
-
badge: PropTypes.object,
|
|
329
|
-
root: PropTypes.object
|
|
328
|
+
badge: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
329
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
330
330
|
}),
|
|
331
331
|
|
|
332
332
|
/**
|
|
File without changes
|
package/legacy/Chip/Chip.js
CHANGED
|
@@ -53,6 +53,7 @@ var ChipRoot = styled('div', {
|
|
|
53
53
|
var theme = _ref11.theme,
|
|
54
54
|
ownerState = _ref11.ownerState;
|
|
55
55
|
var deleteIconColor = alpha(theme.palette.text.primary, 0.26);
|
|
56
|
+
var textColor = theme.palette.mode === 'light' ? theme.palette.grey[700] : theme.palette.grey[300];
|
|
56
57
|
return _extends((_extends2 = {
|
|
57
58
|
maxWidth: '100%',
|
|
58
59
|
fontFamily: theme.typography.fontFamily,
|
|
@@ -61,8 +62,8 @@ var ChipRoot = styled('div', {
|
|
|
61
62
|
alignItems: 'center',
|
|
62
63
|
justifyContent: 'center',
|
|
63
64
|
height: 32,
|
|
64
|
-
color: theme.palette.text.primary,
|
|
65
|
-
backgroundColor: theme.palette.action.selected,
|
|
65
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
66
|
+
backgroundColor: (theme.vars || theme).palette.action.selected,
|
|
66
67
|
borderRadius: 32 / 2,
|
|
67
68
|
whiteSpace: 'nowrap',
|
|
68
69
|
transition: theme.transitions.create(['background-color', 'box-shadow']),
|
|
@@ -78,21 +79,21 @@ var ChipRoot = styled('div', {
|
|
|
78
79
|
verticalAlign: 'middle',
|
|
79
80
|
boxSizing: 'border-box'
|
|
80
81
|
}, _defineProperty(_extends2, "&.".concat(chipClasses.disabled), {
|
|
81
|
-
opacity: theme.palette.action.disabledOpacity,
|
|
82
|
+
opacity: (theme.vars || theme).palette.action.disabledOpacity,
|
|
82
83
|
pointerEvents: 'none'
|
|
83
84
|
}), _defineProperty(_extends2, "& .".concat(chipClasses.avatar), {
|
|
84
85
|
marginLeft: 5,
|
|
85
86
|
marginRight: -6,
|
|
86
87
|
width: 24,
|
|
87
88
|
height: 24,
|
|
88
|
-
color: theme.
|
|
89
|
+
color: theme.vars ? theme.vars.palette.Chip.defaultAvatarColor : textColor,
|
|
89
90
|
fontSize: theme.typography.pxToRem(12)
|
|
90
91
|
}), _defineProperty(_extends2, "& .".concat(chipClasses.avatarColorPrimary), {
|
|
91
|
-
color: theme.palette.primary.contrastText,
|
|
92
|
-
backgroundColor: theme.palette.primary.dark
|
|
92
|
+
color: (theme.vars || theme).palette.primary.contrastText,
|
|
93
|
+
backgroundColor: (theme.vars || theme).palette.primary.dark
|
|
93
94
|
}), _defineProperty(_extends2, "& .".concat(chipClasses.avatarColorSecondary), {
|
|
94
|
-
color: theme.palette.secondary.contrastText,
|
|
95
|
-
backgroundColor: theme.palette.secondary.dark
|
|
95
|
+
color: (theme.vars || theme).palette.secondary.contrastText,
|
|
96
|
+
backgroundColor: (theme.vars || theme).palette.secondary.dark
|
|
96
97
|
}), _defineProperty(_extends2, "& .".concat(chipClasses.avatarSmall), {
|
|
97
98
|
marginLeft: 4,
|
|
98
99
|
marginRight: -4,
|
|
@@ -100,7 +101,7 @@ var ChipRoot = styled('div', {
|
|
|
100
101
|
height: 18,
|
|
101
102
|
fontSize: theme.typography.pxToRem(10)
|
|
102
103
|
}), _defineProperty(_extends2, "& .".concat(chipClasses.icon), _extends({
|
|
103
|
-
color: theme.
|
|
104
|
+
color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor,
|
|
104
105
|
marginLeft: 5,
|
|
105
106
|
marginRight: -6
|
|
106
107
|
}, ownerState.size === 'small' && {
|
|
@@ -111,31 +112,31 @@ var ChipRoot = styled('div', {
|
|
|
111
112
|
color: 'inherit'
|
|
112
113
|
})), _defineProperty(_extends2, "& .".concat(chipClasses.deleteIcon), _extends({
|
|
113
114
|
WebkitTapHighlightColor: 'transparent',
|
|
114
|
-
color: deleteIconColor,
|
|
115
|
+
color: theme.vars ? "rgba(".concat(theme.vars.palette.text.primaryChannel, " / 0.26)") : deleteIconColor,
|
|
115
116
|
fontSize: 22,
|
|
116
117
|
cursor: 'pointer',
|
|
117
118
|
margin: '0 5px 0 -6px',
|
|
118
119
|
'&:hover': {
|
|
119
|
-
color: alpha(deleteIconColor, 0.4)
|
|
120
|
+
color: theme.vars ? "rgba(".concat(theme.vars.palette.text.primaryChannel, " / 0.4)") : alpha(deleteIconColor, 0.4)
|
|
120
121
|
}
|
|
121
122
|
}, ownerState.size === 'small' && {
|
|
122
123
|
fontSize: 16,
|
|
123
124
|
marginRight: 4,
|
|
124
125
|
marginLeft: -4
|
|
125
126
|
}, ownerState.color !== 'default' && {
|
|
126
|
-
color: alpha(theme.palette[ownerState.color].contrastText, 0.7),
|
|
127
|
+
color: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].contrastTextChannel, " / 0.7)") : alpha(theme.palette[ownerState.color].contrastText, 0.7),
|
|
127
128
|
'&:hover, &:active': {
|
|
128
|
-
color: theme.palette[ownerState.color].contrastText
|
|
129
|
+
color: (theme.vars || theme).palette[ownerState.color].contrastText
|
|
129
130
|
}
|
|
130
131
|
})), _extends2), ownerState.size === 'small' && {
|
|
131
132
|
height: 24
|
|
132
133
|
}, ownerState.color !== 'default' && {
|
|
133
|
-
backgroundColor: theme.palette[ownerState.color].main,
|
|
134
|
-
color: theme.palette[ownerState.color].contrastText
|
|
134
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
|
|
135
|
+
color: (theme.vars || theme).palette[ownerState.color].contrastText
|
|
135
136
|
}, ownerState.onDelete && _defineProperty({}, "&.".concat(chipClasses.focusVisible), {
|
|
136
|
-
backgroundColor: alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
137
|
+
backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.action.selectedChannel, " / calc(").concat(theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.focusOpacity, "))") : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
137
138
|
}), ownerState.onDelete && ownerState.color !== 'default' && _defineProperty({}, "&.".concat(chipClasses.focusVisible), {
|
|
138
|
-
backgroundColor: theme.palette[ownerState.color].dark
|
|
139
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
|
|
139
140
|
}));
|
|
140
141
|
}, function (_ref14) {
|
|
141
142
|
var _ref15;
|
|
@@ -147,14 +148,14 @@ var ChipRoot = styled('div', {
|
|
|
147
148
|
WebkitTapHighlightColor: 'transparent',
|
|
148
149
|
cursor: 'pointer',
|
|
149
150
|
'&:hover': {
|
|
150
|
-
backgroundColor: alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
|
|
151
|
+
backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.action.selectedChannel, " / calc(").concat(theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.hoverOpacity, "))") : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)
|
|
151
152
|
}
|
|
152
153
|
}, _defineProperty(_ref15, "&.".concat(chipClasses.focusVisible), {
|
|
153
|
-
backgroundColor: alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
154
|
+
backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.action.selectedChannel, " / calc(").concat(theme.vars.palette.action.selectedOpacity + theme.vars.palette.action.focusOpacity, "))") : alpha(theme.palette.action.selected, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)
|
|
154
155
|
}), _defineProperty(_ref15, '&:active', {
|
|
155
|
-
boxShadow: theme.shadows[1]
|
|
156
|
+
boxShadow: (theme.vars || theme).shadows[1]
|
|
156
157
|
}), _ref15), ownerState.clickable && ownerState.color !== 'default' && _defineProperty({}, "&:hover, &.".concat(chipClasses.focusVisible), {
|
|
157
|
-
backgroundColor: theme.palette[ownerState.color].dark
|
|
158
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].dark
|
|
158
159
|
}));
|
|
159
160
|
}, function (_ref17) {
|
|
160
161
|
var _ref18, _ref19;
|
|
@@ -163,11 +164,11 @@ var ChipRoot = styled('div', {
|
|
|
163
164
|
ownerState = _ref17.ownerState;
|
|
164
165
|
return _extends({}, ownerState.variant === 'outlined' && (_ref18 = {
|
|
165
166
|
backgroundColor: 'transparent',
|
|
166
|
-
border: "1px solid ".concat(theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[700])
|
|
167
|
+
border: theme.vars ? "1px solid ".concat(theme.vars.palette.Chip.defaultBorder) : "1px solid ".concat(theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[700])
|
|
167
168
|
}, _defineProperty(_ref18, "&.".concat(chipClasses.clickable, ":hover"), {
|
|
168
|
-
backgroundColor: theme.palette.action.hover
|
|
169
|
+
backgroundColor: (theme.vars || theme).palette.action.hover
|
|
169
170
|
}), _defineProperty(_ref18, "&.".concat(chipClasses.focusVisible), {
|
|
170
|
-
backgroundColor: theme.palette.action.focus
|
|
171
|
+
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
171
172
|
}), _defineProperty(_ref18, "& .".concat(chipClasses.avatar), {
|
|
172
173
|
marginLeft: 4
|
|
173
174
|
}), _defineProperty(_ref18, "& .".concat(chipClasses.avatarSmall), {
|
|
@@ -181,16 +182,16 @@ var ChipRoot = styled('div', {
|
|
|
181
182
|
}), _defineProperty(_ref18, "& .".concat(chipClasses.deleteIconSmall), {
|
|
182
183
|
marginRight: 3
|
|
183
184
|
}), _ref18), ownerState.variant === 'outlined' && ownerState.color !== 'default' && (_ref19 = {
|
|
184
|
-
color: theme.palette[ownerState.color].main,
|
|
185
|
-
border: "1px solid ".concat(alpha(theme.palette[ownerState.color].main, 0.7))
|
|
185
|
+
color: (theme.vars || theme).palette[ownerState.color].main,
|
|
186
|
+
border: "1px solid ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.7)") : alpha(theme.palette[ownerState.color].main, 0.7))
|
|
186
187
|
}, _defineProperty(_ref19, "&.".concat(chipClasses.clickable, ":hover"), {
|
|
187
|
-
backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity)
|
|
188
|
+
backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity)
|
|
188
189
|
}), _defineProperty(_ref19, "&.".concat(chipClasses.focusVisible), {
|
|
189
|
-
backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.focusOpacity)
|
|
190
|
+
backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / ").concat(theme.vars.palette.action.focusOpacity, ")") : alpha(theme.palette[ownerState.color].main, theme.palette.action.focusOpacity)
|
|
190
191
|
}), _defineProperty(_ref19, "& .".concat(chipClasses.deleteIcon), {
|
|
191
|
-
color: alpha(theme.palette[ownerState.color].main, 0.7),
|
|
192
|
+
color: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.7)") : alpha(theme.palette[ownerState.color].main, 0.7),
|
|
192
193
|
'&:hover, &:active': {
|
|
193
|
-
color: theme.palette[ownerState.color].main
|
|
194
|
+
color: (theme.vars || theme).palette[ownerState.color].main
|
|
194
195
|
}
|
|
195
196
|
}), _ref19));
|
|
196
197
|
});
|
package/legacy/Dialog/Dialog.js
CHANGED
|
@@ -121,7 +121,7 @@ var DialogPaper = styled(Paper, {
|
|
|
121
121
|
maxWidth: theme.breakpoints.unit === 'px' ? Math.max(theme.breakpoints.values.xs, 444) : "".concat(theme.breakpoints.values.xs).concat(theme.breakpoints.unit)
|
|
122
122
|
}, "&.".concat(dialogClasses.paperScrollBody), _defineProperty({}, theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2), {
|
|
123
123
|
maxWidth: 'calc(100% - 64px)'
|
|
124
|
-
})), ownerState.maxWidth !== 'xs' && _defineProperty({
|
|
124
|
+
})), ownerState.maxWidth && ownerState.maxWidth !== 'xs' && _defineProperty({
|
|
125
125
|
maxWidth: "".concat(theme.breakpoints.values[ownerState.maxWidth]).concat(theme.breakpoints.unit)
|
|
126
126
|
}, "&.".concat(dialogClasses.paperScrollBody), _defineProperty({}, theme.breakpoints.down(theme.breakpoints.values[ownerState.maxWidth] + 32 * 2), {
|
|
127
127
|
maxWidth: 'calc(100% - 64px)'
|
|
@@ -226,12 +226,16 @@ var Dialog = /*#__PURE__*/React.forwardRef(function Dialog(inProps, ref) {
|
|
|
226
226
|
}, [ariaLabelledby]);
|
|
227
227
|
return /*#__PURE__*/_jsx(DialogRoot, _extends({
|
|
228
228
|
className: clsx(classes.root, className),
|
|
229
|
-
BackdropProps: _extends({
|
|
230
|
-
transitionDuration: transitionDuration,
|
|
231
|
-
as: BackdropComponent
|
|
232
|
-
}, BackdropProps),
|
|
233
229
|
closeAfterTransition: true,
|
|
234
|
-
|
|
230
|
+
components: {
|
|
231
|
+
Backdrop: DialogBackdrop
|
|
232
|
+
},
|
|
233
|
+
componentsProps: {
|
|
234
|
+
backdrop: _extends({
|
|
235
|
+
transitionDuration: transitionDuration,
|
|
236
|
+
as: BackdropComponent
|
|
237
|
+
}, BackdropProps)
|
|
238
|
+
},
|
|
235
239
|
disableEscapeKeyDown: disableEscapeKeyDown,
|
|
236
240
|
onClose: onClose,
|
|
237
241
|
open: open,
|
|
@@ -287,6 +291,7 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
|
|
|
287
291
|
|
|
288
292
|
/**
|
|
289
293
|
* A backdrop component. This prop enables custom backdrop rendering.
|
|
294
|
+
* @deprecated Use `components.Backdrop` instead.
|
|
290
295
|
* @default styled(Backdrop, {
|
|
291
296
|
* name: 'MuiModal',
|
|
292
297
|
* slot: 'Backdrop',
|
|
@@ -35,36 +35,38 @@ var FilledInputRoot = styled(InputBaseRoot, {
|
|
|
35
35
|
return [].concat(_toConsumableArray(inputBaseRootOverridesResolver(props, styles)), [!ownerState.disableUnderline && styles.underline]);
|
|
36
36
|
}
|
|
37
37
|
})(function (_ref) {
|
|
38
|
-
var _extends2,
|
|
38
|
+
var _extends2, _palette, _ref2;
|
|
39
39
|
|
|
40
40
|
var theme = _ref.theme,
|
|
41
41
|
ownerState = _ref.ownerState;
|
|
42
42
|
var light = theme.palette.mode === 'light';
|
|
43
43
|
var bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
|
|
44
44
|
var backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';
|
|
45
|
+
var hoverBackground = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)';
|
|
46
|
+
var disabledBackground = light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)';
|
|
45
47
|
return _extends((_extends2 = {
|
|
46
48
|
position: 'relative',
|
|
47
|
-
backgroundColor: backgroundColor,
|
|
48
|
-
borderTopLeftRadius: theme.shape.borderRadius,
|
|
49
|
-
borderTopRightRadius: theme.shape.borderRadius,
|
|
49
|
+
backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor,
|
|
50
|
+
borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
|
|
51
|
+
borderTopRightRadius: (theme.vars || theme).shape.borderRadius,
|
|
50
52
|
transition: theme.transitions.create('background-color', {
|
|
51
53
|
duration: theme.transitions.duration.shorter,
|
|
52
54
|
easing: theme.transitions.easing.easeOut
|
|
53
55
|
}),
|
|
54
56
|
'&:hover': {
|
|
55
|
-
backgroundColor:
|
|
57
|
+
backgroundColor: theme.vars ? theme.vars.palette.FilledInput.hoverBg : hoverBackground,
|
|
56
58
|
// Reset on touch devices, it doesn't add specificity
|
|
57
59
|
'@media (hover: none)': {
|
|
58
|
-
backgroundColor: backgroundColor
|
|
60
|
+
backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor
|
|
59
61
|
}
|
|
60
62
|
}
|
|
61
63
|
}, _defineProperty(_extends2, "&.".concat(filledInputClasses.focused), {
|
|
62
|
-
backgroundColor: backgroundColor
|
|
64
|
+
backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor
|
|
63
65
|
}), _defineProperty(_extends2, "&.".concat(filledInputClasses.disabled), {
|
|
64
|
-
backgroundColor:
|
|
66
|
+
backgroundColor: theme.vars ? theme.vars.palette.FilledInput.disabledBg : disabledBackground
|
|
65
67
|
}), _extends2), !ownerState.disableUnderline && (_ref2 = {
|
|
66
68
|
'&:after': {
|
|
67
|
-
borderBottom: "2px solid ".concat((
|
|
69
|
+
borderBottom: "2px solid ".concat((_palette = (theme.vars || theme).palette[ownerState.color || 'primary']) == null ? void 0 : _palette.main),
|
|
68
70
|
left: 0,
|
|
69
71
|
bottom: 0,
|
|
70
72
|
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
@@ -84,11 +86,11 @@ var FilledInputRoot = styled(InputBaseRoot, {
|
|
|
84
86
|
// See https://github.com/mui/material-ui/issues/31766
|
|
85
87
|
transform: 'scaleX(1) translateX(0)'
|
|
86
88
|
}), _defineProperty(_ref2, "&.".concat(filledInputClasses.error, ":after"), {
|
|
87
|
-
borderBottomColor: theme.palette.error.main,
|
|
89
|
+
borderBottomColor: (theme.vars || theme).palette.error.main,
|
|
88
90
|
transform: 'scaleX(1)' // error is always underlined in red
|
|
89
91
|
|
|
90
92
|
}), _defineProperty(_ref2, '&:before', {
|
|
91
|
-
borderBottom: "1px solid ".concat(bottomLineColor),
|
|
93
|
+
borderBottom: "1px solid ".concat(theme.vars ? "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / ").concat(theme.vars.opacity.inputTouchBottomLine, ")") : bottomLineColor),
|
|
92
94
|
left: 0,
|
|
93
95
|
bottom: 0,
|
|
94
96
|
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
@@ -101,7 +103,7 @@ var FilledInputRoot = styled(InputBaseRoot, {
|
|
|
101
103
|
pointerEvents: 'none' // Transparent to the hover style.
|
|
102
104
|
|
|
103
105
|
}), _defineProperty(_ref2, "&:hover:not(.".concat(filledInputClasses.disabled, "):before"), {
|
|
104
|
-
borderBottom: "1px solid ".concat(theme.palette.text.primary)
|
|
106
|
+
borderBottom: "1px solid ".concat((theme.vars || theme).palette.text.primary)
|
|
105
107
|
}), _defineProperty(_ref2, "&.".concat(filledInputClasses.disabled, ":before"), {
|
|
106
108
|
borderBottomStyle: 'dotted'
|
|
107
109
|
}), _ref2), ownerState.startAdornment && {
|
|
@@ -129,7 +131,8 @@ var FilledInputInput = styled(InputBaseInput, {
|
|
|
129
131
|
paddingTop: 25,
|
|
130
132
|
paddingRight: 12,
|
|
131
133
|
paddingBottom: 8,
|
|
132
|
-
paddingLeft: 12
|
|
134
|
+
paddingLeft: 12
|
|
135
|
+
}, !theme.vars && {
|
|
133
136
|
'&:-webkit-autofill': {
|
|
134
137
|
WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
|
|
135
138
|
WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
|
|
@@ -137,7 +140,18 @@ var FilledInputInput = styled(InputBaseInput, {
|
|
|
137
140
|
borderTopLeftRadius: 'inherit',
|
|
138
141
|
borderTopRightRadius: 'inherit'
|
|
139
142
|
}
|
|
140
|
-
},
|
|
143
|
+
}, theme.vars && _defineProperty({
|
|
144
|
+
'&:-webkit-autofill': {
|
|
145
|
+
borderTopLeftRadius: 'inherit',
|
|
146
|
+
borderTopRightRadius: 'inherit'
|
|
147
|
+
}
|
|
148
|
+
}, theme.getColorSchemeSelector('dark'), {
|
|
149
|
+
'&:-webkit-autofill': {
|
|
150
|
+
WebkitBoxShadow: '0 0 0 100px #266798 inset',
|
|
151
|
+
WebkitTextFillColor: '#fff',
|
|
152
|
+
caretColor: '#fff'
|
|
153
|
+
}
|
|
154
|
+
}), ownerState.size === 'small' && {
|
|
141
155
|
paddingTop: 21,
|
|
142
156
|
paddingBottom: 4
|
|
143
157
|
}, ownerState.hiddenLabel && {
|
|
@@ -92,7 +92,7 @@ export var InputBaseComponent = styled('input', {
|
|
|
92
92
|
var placeholder = _extends({
|
|
93
93
|
color: 'currentColor'
|
|
94
94
|
}, theme.vars ? {
|
|
95
|
-
opacity: theme.vars.opacity.
|
|
95
|
+
opacity: theme.vars.opacity.inputPlaceholder
|
|
96
96
|
} : {
|
|
97
97
|
opacity: light ? 0.42 : 0.5
|
|
98
98
|
}, {
|
|
@@ -105,7 +105,7 @@ export var InputBaseComponent = styled('input', {
|
|
|
105
105
|
opacity: '0 !important'
|
|
106
106
|
};
|
|
107
107
|
var placeholderVisible = theme.vars ? {
|
|
108
|
-
opacity: theme.vars.opacity.
|
|
108
|
+
opacity: theme.vars.opacity.inputPlaceholder
|
|
109
109
|
} : {
|
|
110
110
|
opacity: light ? 0.42 : 0.5
|
|
111
111
|
};
|
|
@@ -40,6 +40,10 @@ var getColorShade = function getColorShade(theme, color) {
|
|
|
40
40
|
return 'currentColor';
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
+
if (theme.vars) {
|
|
44
|
+
return theme.vars.palette.LinearProgress["".concat(color, "Bg")];
|
|
45
|
+
}
|
|
46
|
+
|
|
43
47
|
return theme.palette.mode === 'light' ? lighten(theme.palette[color].main, 0.62) : darken(theme.palette[color].main, 0.5);
|
|
44
48
|
};
|
|
45
49
|
|
|
@@ -124,7 +128,7 @@ var LinearProgressBar1 = styled('span', {
|
|
|
124
128
|
top: 0,
|
|
125
129
|
transition: 'transform 0.2s linear',
|
|
126
130
|
transformOrigin: 'left',
|
|
127
|
-
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : theme.palette[ownerState.color].main
|
|
131
|
+
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : (theme.vars || theme).palette[ownerState.color].main
|
|
128
132
|
}, ownerState.variant === 'determinate' && {
|
|
129
133
|
transition: "transform .".concat(TRANSITION_DURATION, "s linear")
|
|
130
134
|
}, ownerState.variant === 'buffer' && {
|
|
@@ -154,7 +158,7 @@ var LinearProgressBar2 = styled('span', {
|
|
|
154
158
|
transition: 'transform 0.2s linear',
|
|
155
159
|
transformOrigin: 'left'
|
|
156
160
|
}, ownerState.variant !== 'buffer' && {
|
|
157
|
-
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : theme.palette[ownerState.color].main
|
|
161
|
+
backgroundColor: ownerState.color === 'inherit' ? 'currentColor' : (theme.vars || theme).palette[ownerState.color].main
|
|
158
162
|
}, ownerState.color === 'inherit' && {
|
|
159
163
|
opacity: 0.3
|
|
160
164
|
}, ownerState.variant === 'buffer' && {
|
package/legacy/Modal/Modal.js
CHANGED
|
@@ -60,7 +60,7 @@ var ModalBackdrop = styled(Backdrop, {
|
|
|
60
60
|
*/
|
|
61
61
|
|
|
62
62
|
var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
63
|
-
var
|
|
63
|
+
var _ref2, _components$Root;
|
|
64
64
|
|
|
65
65
|
var props = useThemeProps({
|
|
66
66
|
name: 'MuiModal',
|
|
@@ -69,9 +69,11 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
69
69
|
|
|
70
70
|
var _props$BackdropCompon = props.BackdropComponent,
|
|
71
71
|
BackdropComponent = _props$BackdropCompon === void 0 ? ModalBackdrop : _props$BackdropCompon,
|
|
72
|
+
BackdropProps = props.BackdropProps,
|
|
72
73
|
_props$closeAfterTran = props.closeAfterTransition,
|
|
73
74
|
closeAfterTransition = _props$closeAfterTran === void 0 ? false : _props$closeAfterTran,
|
|
74
75
|
children = props.children,
|
|
76
|
+
component = props.component,
|
|
75
77
|
_props$components = props.components,
|
|
76
78
|
components = _props$components === void 0 ? {} : _props$components,
|
|
77
79
|
_props$componentsProp = props.componentsProps,
|
|
@@ -92,7 +94,8 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
92
94
|
hideBackdrop = _props$hideBackdrop === void 0 ? false : _props$hideBackdrop,
|
|
93
95
|
_props$keepMounted = props.keepMounted,
|
|
94
96
|
keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,
|
|
95
|
-
|
|
97
|
+
theme = props.theme,
|
|
98
|
+
other = _objectWithoutProperties(props, ["BackdropComponent", "BackdropProps", "closeAfterTransition", "children", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "theme"]);
|
|
96
99
|
|
|
97
100
|
var _React$useState = React.useState(true),
|
|
98
101
|
exited = _React$useState[0],
|
|
@@ -115,16 +118,19 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
115
118
|
});
|
|
116
119
|
|
|
117
120
|
var classes = extendUtilityClasses(ownerState);
|
|
121
|
+
var Root = (_ref2 = (_components$Root = components.Root) != null ? _components$Root : component) != null ? _ref2 : ModalRoot;
|
|
118
122
|
return /*#__PURE__*/_jsx(ModalUnstyled, _extends({
|
|
119
123
|
components: _extends({
|
|
120
|
-
Root:
|
|
124
|
+
Root: Root,
|
|
125
|
+
Backdrop: BackdropComponent
|
|
121
126
|
}, components),
|
|
122
127
|
componentsProps: {
|
|
123
|
-
root: _extends({}, componentsProps.root,
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
root: _extends({}, componentsProps.root, !isHostComponent(Root) && {
|
|
129
|
+
as: component,
|
|
130
|
+
theme: theme
|
|
131
|
+
}),
|
|
132
|
+
backdrop: _extends({}, BackdropProps, componentsProps.backdrop)
|
|
126
133
|
},
|
|
127
|
-
BackdropComponent: BackdropComponent,
|
|
128
134
|
onTransitionEnter: function onTransitionEnter() {
|
|
129
135
|
return setExited(false);
|
|
130
136
|
},
|
|
@@ -148,6 +154,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
148
154
|
|
|
149
155
|
/**
|
|
150
156
|
* A backdrop component. This prop enables custom backdrop rendering.
|
|
157
|
+
* @deprecated Use `components.Backdrop` instead.
|
|
151
158
|
* @default styled(Backdrop, {
|
|
152
159
|
* name: 'MuiModal',
|
|
153
160
|
* slot: 'Backdrop',
|
|
@@ -162,6 +169,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
162
169
|
|
|
163
170
|
/**
|
|
164
171
|
* Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
|
|
172
|
+
* @deprecated Use `componentsProps.backdrop` instead.
|
|
165
173
|
*/
|
|
166
174
|
BackdropProps: PropTypes.object,
|
|
167
175
|
|
|
@@ -181,12 +189,19 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
181
189
|
*/
|
|
182
190
|
closeAfterTransition: PropTypes.bool,
|
|
183
191
|
|
|
192
|
+
/**
|
|
193
|
+
* The component used for the root node.
|
|
194
|
+
* Either a string to use a HTML element or a component.
|
|
195
|
+
*/
|
|
196
|
+
component: PropTypes.elementType,
|
|
197
|
+
|
|
184
198
|
/**
|
|
185
199
|
* The components used for each slot inside the Modal.
|
|
186
200
|
* Either a string to use a HTML element or a component.
|
|
187
201
|
* @default {}
|
|
188
202
|
*/
|
|
189
203
|
components: PropTypes.shape({
|
|
204
|
+
Backdrop: PropTypes.elementType,
|
|
190
205
|
Root: PropTypes.elementType
|
|
191
206
|
}),
|
|
192
207
|
|
|
@@ -195,6 +210,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
195
210
|
* @default {}
|
|
196
211
|
*/
|
|
197
212
|
componentsProps: PropTypes.shape({
|
|
213
|
+
backdrop: PropTypes.object,
|
|
198
214
|
root: PropTypes.object
|
|
199
215
|
}),
|
|
200
216
|
|
|
@@ -41,18 +41,18 @@ var OutlinedInputRoot = styled(InputBaseRoot, {
|
|
|
41
41
|
var borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
|
|
42
42
|
return _extends((_extends2 = {
|
|
43
43
|
position: 'relative',
|
|
44
|
-
borderRadius: theme.shape.borderRadius
|
|
44
|
+
borderRadius: (theme.vars || theme).shape.borderRadius
|
|
45
45
|
}, _defineProperty(_extends2, "&:hover .".concat(outlinedInputClasses.notchedOutline), {
|
|
46
|
-
borderColor: theme.palette.text.primary
|
|
46
|
+
borderColor: (theme.vars || theme).palette.text.primary
|
|
47
47
|
}), _defineProperty(_extends2, '@media (hover: none)', _defineProperty({}, "&:hover .".concat(outlinedInputClasses.notchedOutline), {
|
|
48
|
-
borderColor: borderColor
|
|
48
|
+
borderColor: theme.vars ? "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.23)") : borderColor
|
|
49
49
|
})), _defineProperty(_extends2, "&.".concat(outlinedInputClasses.focused, " .").concat(outlinedInputClasses.notchedOutline), {
|
|
50
|
-
borderColor: theme.palette[ownerState.color].main,
|
|
50
|
+
borderColor: (theme.vars || theme).palette[ownerState.color].main,
|
|
51
51
|
borderWidth: 2
|
|
52
52
|
}), _defineProperty(_extends2, "&.".concat(outlinedInputClasses.error, " .").concat(outlinedInputClasses.notchedOutline), {
|
|
53
|
-
borderColor: theme.palette.error.main
|
|
53
|
+
borderColor: (theme.vars || theme).palette.error.main
|
|
54
54
|
}), _defineProperty(_extends2, "&.".concat(outlinedInputClasses.disabled, " .").concat(outlinedInputClasses.notchedOutline), {
|
|
55
|
-
borderColor: theme.palette.action.disabled
|
|
55
|
+
borderColor: (theme.vars || theme).palette.action.disabled
|
|
56
56
|
}), _extends2), ownerState.startAdornment && {
|
|
57
57
|
paddingLeft: 14
|
|
58
58
|
}, ownerState.endAdornment && {
|
|
@@ -71,8 +71,9 @@ var NotchedOutlineRoot = styled(NotchedOutline, {
|
|
|
71
71
|
}
|
|
72
72
|
})(function (_ref2) {
|
|
73
73
|
var theme = _ref2.theme;
|
|
74
|
+
var borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';
|
|
74
75
|
return {
|
|
75
|
-
borderColor: theme.
|
|
76
|
+
borderColor: theme.vars ? "rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.23)") : borderColor
|
|
76
77
|
};
|
|
77
78
|
});
|
|
78
79
|
var OutlinedInputInput = styled(InputBaseInput, {
|
|
@@ -83,14 +84,25 @@ var OutlinedInputInput = styled(InputBaseInput, {
|
|
|
83
84
|
var theme = _ref3.theme,
|
|
84
85
|
ownerState = _ref3.ownerState;
|
|
85
86
|
return _extends({
|
|
86
|
-
padding: '16.5px 14px'
|
|
87
|
+
padding: '16.5px 14px'
|
|
88
|
+
}, !theme.vars && {
|
|
87
89
|
'&:-webkit-autofill': {
|
|
88
90
|
WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
|
|
89
91
|
WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
|
|
90
92
|
caretColor: theme.palette.mode === 'light' ? null : '#fff',
|
|
91
93
|
borderRadius: 'inherit'
|
|
92
94
|
}
|
|
93
|
-
},
|
|
95
|
+
}, theme.vars && _defineProperty({
|
|
96
|
+
'&:-webkit-autofill': {
|
|
97
|
+
borderRadius: 'inherit'
|
|
98
|
+
}
|
|
99
|
+
}, theme.getColorSchemeSelector('dark'), {
|
|
100
|
+
'&:-webkit-autofill': {
|
|
101
|
+
WebkitBoxShadow: '0 0 0 100px #266798 inset',
|
|
102
|
+
WebkitTextFillColor: '#fff',
|
|
103
|
+
caretColor: '#fff'
|
|
104
|
+
}
|
|
105
|
+
}), ownerState.size === 'small' && {
|
|
94
106
|
padding: '8.5px 14px'
|
|
95
107
|
}, ownerState.multiline && {
|
|
96
108
|
padding: 0
|
|
@@ -45,7 +45,7 @@ var SkeletonRoot = styled('span', {
|
|
|
45
45
|
return _extends({
|
|
46
46
|
display: 'block',
|
|
47
47
|
// Create a "on paper" color with sufficient contrast retaining the color
|
|
48
|
-
backgroundColor: alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
|
|
48
|
+
backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
|
|
49
49
|
height: '1.2em'
|
|
50
50
|
}, ownerState.variant === 'text' && {
|
|
51
51
|
marginTop: 0,
|
|
@@ -74,7 +74,7 @@ var SkeletonRoot = styled('span', {
|
|
|
74
74
|
}, function (_ref3) {
|
|
75
75
|
var ownerState = _ref3.ownerState,
|
|
76
76
|
theme = _ref3.theme;
|
|
77
|
-
return ownerState.animation === 'wave' && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: ", " 1.6s linear 0.5s infinite;\n background: linear-gradient(90deg
|
|
77
|
+
return ownerState.animation === 'wave' && css(_templateObject4 || (_templateObject4 = _taggedTemplateLiteral(["\n position: relative;\n overflow: hidden;\n\n /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n\n &::after {\n animation: ", " 1.6s linear 0.5s infinite;\n background: linear-gradient(\n 90deg,\n transparent,\n ", ",\n transparent\n );\n content: '';\n position: absolute;\n transform: translateX(-100%); /* Avoid flash during server-side hydration */\n bottom: 0;\n left: 0;\n right: 0;\n top: 0;\n }\n "])), waveKeyframe, (theme.vars || theme).palette.action.hover);
|
|
78
78
|
});
|
|
79
79
|
var Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {
|
|
80
80
|
var props = useThemeProps({
|