@mui/material 5.8.4 → 5.8.7
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.js +19 -11
- 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/Autocomplete.d.ts +2 -0
- package/Autocomplete/Autocomplete.js +12 -8
- 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 +185 -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/Input.js +1 -1
- 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 +40 -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/Select.d.ts +1 -1
- package/Select/Select.js +1 -1
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/Skeleton.js +8 -3
- package/Skeleton/skeletonClasses.d.ts +24 -24
- package/Slider/Slider.js +21 -21
- 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 +16 -18
- 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/Alert/Alert.js +19 -11
- package/legacy/AppBar/AppBar.js +23 -4
- package/legacy/Autocomplete/Autocomplete.js +12 -8
- 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/Input/Input.js +1 -1
- 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 +36 -9
- package/legacy/Select/Select.js +1 -1
- package/legacy/Skeleton/Skeleton.js +2 -2
- package/legacy/Slider/Slider.js +21 -21
- 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 +16 -18
- package/legacy/Tooltip/Tooltip.js +1 -1
- package/legacy/index.js +1 -1
- package/legacy/styles/CssVarsProvider.js +10 -8
- package/legacy/styles/experimental_extendTheme.js +170 -19
- package/locale/index.d.ts +71 -71
- package/modern/Alert/Alert.js +19 -11
- package/modern/AppBar/AppBar.js +22 -5
- package/modern/Autocomplete/Autocomplete.js +11 -7
- 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/Input/Input.js +1 -1
- 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 +40 -10
- package/modern/Select/Select.js +1 -1
- package/modern/Skeleton/Skeleton.js +7 -2
- package/modern/Slider/Slider.js +21 -21
- 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 +16 -18
- package/modern/Tooltip/Tooltip.js +1 -1
- package/modern/index.js +1 -1
- package/modern/styles/CssVarsProvider.js +6 -6
- package/modern/styles/experimental_extendTheme.js +166 -20
- package/node/Alert/Alert.js +19 -11
- package/node/AppBar/AppBar.js +22 -5
- package/node/Autocomplete/Autocomplete.js +12 -8
- 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/Input/Input.js +1 -1
- 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 +38 -10
- package/node/Select/Select.js +1 -1
- package/node/Skeleton/Skeleton.js +7 -2
- package/node/Slider/Slider.js +21 -21
- 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 +16 -18
- package/node/Tooltip/Tooltip.js +1 -1
- package/node/index.js +1 -1
- package/node/styles/CssVarsProvider.js +11 -6
- package/node/styles/experimental_extendTheme.js +167 -19
- package/package.json +7 -7
- package/styles/CssVarsProvider.d.ts +14 -28
- package/styles/CssVarsProvider.js +10 -6
- package/styles/createPalette.d.ts +0 -26
- package/styles/experimental_extendTheme.d.ts +238 -35
- package/styles/experimental_extendTheme.js +166 -20
- package/styles/index.d.ts +24 -1
- package/themeCssVarsAugmentation/index.d.ts +30 -0
- 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 +954 -471
- 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/Slider/Slider.js
CHANGED
|
@@ -34,7 +34,7 @@ var SliderRoot = styled('span', {
|
|
|
34
34
|
position: 'relative',
|
|
35
35
|
cursor: 'pointer',
|
|
36
36
|
touchAction: 'none',
|
|
37
|
-
color: theme.palette[ownerState.color].main,
|
|
37
|
+
color: (theme.vars || theme).palette[ownerState.color].main,
|
|
38
38
|
WebkitTapHighlightColor: 'transparent'
|
|
39
39
|
}, ownerState.orientation === 'horizontal' && _extends({
|
|
40
40
|
height: 4,
|
|
@@ -69,7 +69,7 @@ var SliderRoot = styled('span', {
|
|
|
69
69
|
}, _defineProperty(_extends2, "&.".concat(sliderClasses.disabled), {
|
|
70
70
|
pointerEvents: 'none',
|
|
71
71
|
cursor: 'default',
|
|
72
|
-
color: theme.palette.grey[400]
|
|
72
|
+
color: (theme.vars || theme).palette.grey[400]
|
|
73
73
|
}), _defineProperty(_extends2, "&.".concat(sliderClasses.dragging), _defineProperty({}, "& .".concat(sliderClasses.thumb, ", & .").concat(sliderClasses.track), {
|
|
74
74
|
transition: 'none'
|
|
75
75
|
})), _extends2));
|
|
@@ -163,8 +163,8 @@ var SliderTrack = styled('span', {
|
|
|
163
163
|
}, ownerState.track === false && {
|
|
164
164
|
display: 'none'
|
|
165
165
|
}, ownerState.track === 'inverted' && {
|
|
166
|
-
backgroundColor: color,
|
|
167
|
-
borderColor: color
|
|
166
|
+
backgroundColor: theme.vars ? theme.vars.palette.Slider["".concat(ownerState.color, "Track")] : color,
|
|
167
|
+
borderColor: theme.vars ? theme.vars.palette.Slider["".concat(ownerState.color, "Track")] : color
|
|
168
168
|
});
|
|
169
169
|
});
|
|
170
170
|
process.env.NODE_ENV !== "production" ? SliderTrack.propTypes
|
|
@@ -223,7 +223,7 @@ var SliderThumb = styled('span', {
|
|
|
223
223
|
borderRadius: 'inherit',
|
|
224
224
|
width: '100%',
|
|
225
225
|
height: '100%',
|
|
226
|
-
boxShadow: theme.shadows[2]
|
|
226
|
+
boxShadow: (theme.vars || theme).shadows[2]
|
|
227
227
|
}, ownerState.size === 'small' && {
|
|
228
228
|
boxShadow: 'none'
|
|
229
229
|
}),
|
|
@@ -239,12 +239,12 @@ var SliderThumb = styled('span', {
|
|
|
239
239
|
transform: 'translate(-50%, -50%)'
|
|
240
240
|
}
|
|
241
241
|
}, _defineProperty(_extends3, "&:hover, &.".concat(sliderClasses.focusVisible), {
|
|
242
|
-
boxShadow: "0px 0px 0px 8px ".concat(alpha(theme.palette[ownerState.color].main, 0.16)),
|
|
242
|
+
boxShadow: "0px 0px 0px 8px ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.16)") : alpha(theme.palette[ownerState.color].main, 0.16)),
|
|
243
243
|
'@media (hover: none)': {
|
|
244
244
|
boxShadow: 'none'
|
|
245
245
|
}
|
|
246
246
|
}), _defineProperty(_extends3, "&.".concat(sliderClasses.active), {
|
|
247
|
-
boxShadow: "0px 0px 0px 14px ".concat(alpha(theme.palette[ownerState.color].main, 0.16))
|
|
247
|
+
boxShadow: "0px 0px 0px 14px ".concat(theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.16)") : alpha(theme.palette[ownerState.color].main, 0.16))
|
|
248
248
|
}), _defineProperty(_extends3, "&.".concat(sliderClasses.disabled), {
|
|
249
249
|
'&:hover': {
|
|
250
250
|
boxShadow: 'none'
|
|
@@ -286,9 +286,9 @@ var SliderValueLabel = styled(SliderValueLabelUnstyled, {
|
|
|
286
286
|
transformOrigin: 'bottom center',
|
|
287
287
|
transform: 'translateY(-100%) scale(0)',
|
|
288
288
|
position: 'absolute',
|
|
289
|
-
backgroundColor: theme.palette.grey[600],
|
|
289
|
+
backgroundColor: (theme.vars || theme).palette.grey[600],
|
|
290
290
|
borderRadius: 2,
|
|
291
|
-
color: theme.palette.common.white,
|
|
291
|
+
color: (theme.vars || theme).palette.common.white,
|
|
292
292
|
display: 'flex',
|
|
293
293
|
alignItems: 'center',
|
|
294
294
|
justifyContent: 'center',
|
|
@@ -363,7 +363,7 @@ var SliderMark = styled('span', {
|
|
|
363
363
|
left: '50%',
|
|
364
364
|
transform: 'translate(-50%, 1px)'
|
|
365
365
|
}, markActive && {
|
|
366
|
-
backgroundColor: theme.palette.background.paper,
|
|
366
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
367
367
|
opacity: 0.8
|
|
368
368
|
});
|
|
369
369
|
});
|
|
@@ -395,7 +395,7 @@ var SliderMarkLabel = styled('span', {
|
|
|
395
395
|
ownerState = _ref7.ownerState,
|
|
396
396
|
markLabelActive = _ref7.markLabelActive;
|
|
397
397
|
return _extends({}, theme.typography.body2, {
|
|
398
|
-
color: theme.palette.text.secondary,
|
|
398
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
399
399
|
position: 'absolute',
|
|
400
400
|
whiteSpace: 'nowrap'
|
|
401
401
|
}, ownerState.orientation === 'horizontal' && {
|
|
@@ -411,7 +411,7 @@ var SliderMarkLabel = styled('span', {
|
|
|
411
411
|
left: 44
|
|
412
412
|
}
|
|
413
413
|
}, markLabelActive && {
|
|
414
|
-
color: theme.palette.text.primary
|
|
414
|
+
color: (theme.vars || theme).palette.text.primary
|
|
415
415
|
});
|
|
416
416
|
});
|
|
417
417
|
process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes
|
|
@@ -590,14 +590,14 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
|
|
|
590
590
|
* @default {}
|
|
591
591
|
*/
|
|
592
592
|
componentsProps: PropTypes.shape({
|
|
593
|
-
input: PropTypes.object,
|
|
594
|
-
mark: PropTypes.object,
|
|
595
|
-
markLabel: PropTypes.object,
|
|
596
|
-
rail: PropTypes.object,
|
|
597
|
-
root: PropTypes.object,
|
|
598
|
-
thumb: PropTypes.object,
|
|
599
|
-
track: PropTypes.object,
|
|
600
|
-
valueLabel: PropTypes.shape({
|
|
593
|
+
input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
594
|
+
mark: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
595
|
+
markLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
596
|
+
rail: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
597
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
598
|
+
thumb: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
599
|
+
track: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
600
|
+
valueLabel: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
601
601
|
children: PropTypes.element,
|
|
602
602
|
className: PropTypes.string,
|
|
603
603
|
components: PropTypes.shape({
|
|
@@ -607,7 +607,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
|
|
|
607
607
|
style: PropTypes.object,
|
|
608
608
|
value: PropTypes.number,
|
|
609
609
|
valueLabelDisplay: PropTypes.oneOf(['auto', 'off', 'on'])
|
|
610
|
-
})
|
|
610
|
+
})])
|
|
611
611
|
}),
|
|
612
612
|
|
|
613
613
|
/**
|
|
@@ -34,13 +34,13 @@ var SnackbarContentRoot = styled(Paper, {
|
|
|
34
34
|
var emphasis = theme.palette.mode === 'light' ? 0.8 : 0.98;
|
|
35
35
|
var backgroundColor = emphasize(theme.palette.background.default, emphasis);
|
|
36
36
|
return _extends({}, theme.typography.body2, _defineProperty({
|
|
37
|
-
color: theme.palette.getContrastText(backgroundColor),
|
|
38
|
-
backgroundColor: backgroundColor,
|
|
37
|
+
color: theme.vars ? theme.vars.palette.SnackbarContent.color : theme.palette.getContrastText(backgroundColor),
|
|
38
|
+
backgroundColor: theme.vars ? theme.vars.palette.SnackbarContent.bg : backgroundColor,
|
|
39
39
|
display: 'flex',
|
|
40
40
|
alignItems: 'center',
|
|
41
41
|
flexWrap: 'wrap',
|
|
42
42
|
padding: '6px 16px',
|
|
43
|
-
borderRadius: theme.shape.borderRadius,
|
|
43
|
+
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
44
44
|
flexGrow: 1
|
|
45
45
|
}, theme.breakpoints.up('sm'), {
|
|
46
46
|
flexGrow: 'initial',
|
|
@@ -41,10 +41,10 @@ var SpeedDialActionFab = styled(Fab, {
|
|
|
41
41
|
ownerState = _ref.ownerState;
|
|
42
42
|
return _extends({
|
|
43
43
|
margin: 8,
|
|
44
|
-
color: theme.palette.text.secondary,
|
|
45
|
-
backgroundColor: theme.palette.background.paper,
|
|
44
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
45
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
46
46
|
'&:hover': {
|
|
47
|
-
backgroundColor: emphasize(theme.palette.background.paper, 0.15)
|
|
47
|
+
backgroundColor: theme.vars ? theme.vars.palette.SpeedDialAction.fabHoverBg : emphasize(theme.palette.background.paper, 0.15)
|
|
48
48
|
},
|
|
49
49
|
transition: "".concat(theme.transitions.create('transform', {
|
|
50
50
|
duration: theme.transitions.duration.shorter
|
|
@@ -98,10 +98,10 @@ var SpeedDialActionStaticTooltipLabel = styled('span', {
|
|
|
98
98
|
return _extends({
|
|
99
99
|
position: 'absolute'
|
|
100
100
|
}, theme.typography.body1, {
|
|
101
|
-
backgroundColor: theme.palette.background.paper,
|
|
102
|
-
borderRadius: theme.shape.borderRadius,
|
|
103
|
-
boxShadow: theme.shadows[1],
|
|
104
|
-
color: theme.palette.text.secondary,
|
|
101
|
+
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
102
|
+
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
103
|
+
boxShadow: (theme.vars || theme).shadows[1],
|
|
104
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
105
105
|
padding: '4px 16px',
|
|
106
106
|
wordBreak: 'keep-all'
|
|
107
107
|
});
|
|
@@ -57,9 +57,10 @@ var StepConnectorLine = styled('span', {
|
|
|
57
57
|
})(function (_ref2) {
|
|
58
58
|
var ownerState = _ref2.ownerState,
|
|
59
59
|
theme = _ref2.theme;
|
|
60
|
+
var borderColor = theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600];
|
|
60
61
|
return _extends({
|
|
61
62
|
display: 'block',
|
|
62
|
-
borderColor: theme.
|
|
63
|
+
borderColor: theme.vars ? theme.vars.palette.StepConnector.border : borderColor
|
|
63
64
|
}, ownerState.orientation === 'horizontal' && {
|
|
64
65
|
borderTopStyle: 'solid',
|
|
65
66
|
borderTopWidth: 1
|
|
@@ -38,7 +38,7 @@ var StepContentRoot = styled('div', {
|
|
|
38
38
|
paddingLeft: 8 + 12,
|
|
39
39
|
// margin + half icon
|
|
40
40
|
paddingRight: 8,
|
|
41
|
-
borderLeft: "1px solid ".concat(theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])
|
|
41
|
+
borderLeft: theme.vars ? "1px solid ".concat(theme.vars.palette.StepContent.border) : "1px solid ".concat(theme.palette.mode === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])
|
|
42
42
|
}, ownerState.last && {
|
|
43
43
|
borderLeft: 'none'
|
|
44
44
|
});
|
package/legacy/Switch/Switch.js
CHANGED
|
@@ -95,18 +95,18 @@ var SwitchSwitchBase = styled(SwitchBase, {
|
|
|
95
95
|
left: 0,
|
|
96
96
|
zIndex: 1,
|
|
97
97
|
// Render above the focus ripple.
|
|
98
|
-
color: theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300],
|
|
98
|
+
color: theme.vars ? theme.vars.palette.Switch.defaultColor : "".concat(theme.palette.mode === 'light' ? theme.palette.common.white : theme.palette.grey[300]),
|
|
99
99
|
transition: theme.transitions.create(['left', 'transform'], {
|
|
100
100
|
duration: theme.transitions.duration.shortest
|
|
101
101
|
})
|
|
102
102
|
}, _defineProperty(_ref5, "&.".concat(switchClasses.checked), {
|
|
103
103
|
transform: 'translateX(20px)'
|
|
104
104
|
}), _defineProperty(_ref5, "&.".concat(switchClasses.disabled), {
|
|
105
|
-
color: theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600]
|
|
105
|
+
color: theme.vars ? theme.vars.palette.Switch.defaultDisabledColor : "".concat(theme.palette.mode === 'light' ? theme.palette.grey[100] : theme.palette.grey[600])
|
|
106
106
|
}), _defineProperty(_ref5, "&.".concat(switchClasses.checked, " + .").concat(switchClasses.track), {
|
|
107
107
|
opacity: 0.5
|
|
108
108
|
}), _defineProperty(_ref5, "&.".concat(switchClasses.disabled, " + .").concat(switchClasses.track), {
|
|
109
|
-
opacity: theme.palette.mode === 'light' ? 0.12 : 0.2
|
|
109
|
+
opacity: theme.vars ? theme.vars.opacity.switchTrackDisabled : "".concat(theme.palette.mode === 'light' ? 0.12 : 0.2)
|
|
110
110
|
}), _defineProperty(_ref5, "& .".concat(switchClasses.input), {
|
|
111
111
|
left: '-100%',
|
|
112
112
|
width: '300%'
|
|
@@ -118,24 +118,24 @@ var SwitchSwitchBase = styled(SwitchBase, {
|
|
|
118
118
|
ownerState = _ref6.ownerState;
|
|
119
119
|
return _extends({
|
|
120
120
|
'&:hover': {
|
|
121
|
-
backgroundColor: alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
121
|
+
backgroundColor: theme.vars ? "rgba(".concat(theme.vars.palette.action.activeChannel, " / ").concat(theme.vars.palette.action.hoverOpacity, ")") : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity),
|
|
122
122
|
// Reset on touch devices, it doesn't add specificity
|
|
123
123
|
'@media (hover: none)': {
|
|
124
124
|
backgroundColor: 'transparent'
|
|
125
125
|
}
|
|
126
126
|
}
|
|
127
127
|
}, ownerState.color !== 'default' && (_ref7 = {}, _defineProperty(_ref7, "&.".concat(switchClasses.checked), _defineProperty({
|
|
128
|
-
color: theme.palette[ownerState.color].main,
|
|
128
|
+
color: (theme.vars || theme).palette[ownerState.color].main,
|
|
129
129
|
'&:hover': {
|
|
130
|
-
backgroundColor: alpha(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
|
|
130
|
+
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),
|
|
131
131
|
'@media (hover: none)': {
|
|
132
132
|
backgroundColor: 'transparent'
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
}, "&.".concat(switchClasses.disabled), {
|
|
136
|
-
color: theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55)
|
|
136
|
+
color: theme.vars ? theme.vars.palette.Switch["".concat(ownerState.color, "DisabledColor")] : "".concat(theme.palette.mode === 'light' ? lighten(theme.palette[ownerState.color].main, 0.62) : darken(theme.palette[ownerState.color].main, 0.55))
|
|
137
137
|
})), _defineProperty(_ref7, "&.".concat(switchClasses.checked, " + .").concat(switchClasses.track), {
|
|
138
|
-
backgroundColor: theme.palette[ownerState.color].main
|
|
138
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main
|
|
139
139
|
}), _ref7));
|
|
140
140
|
});
|
|
141
141
|
var SwitchTrack = styled('span', {
|
|
@@ -154,8 +154,8 @@ var SwitchTrack = styled('span', {
|
|
|
154
154
|
transition: theme.transitions.create(['opacity', 'background-color'], {
|
|
155
155
|
duration: theme.transitions.duration.shortest
|
|
156
156
|
}),
|
|
157
|
-
backgroundColor: theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white,
|
|
158
|
-
opacity: theme.palette.mode === 'light' ? 0.38 : 0.3
|
|
157
|
+
backgroundColor: theme.vars ? theme.vars.palette.common.onBackground : "".concat(theme.palette.mode === 'light' ? theme.palette.common.black : theme.palette.common.white),
|
|
158
|
+
opacity: theme.vars ? theme.vars.opacity.switchTrack : "".concat(theme.palette.mode === 'light' ? 0.38 : 0.3)
|
|
159
159
|
};
|
|
160
160
|
});
|
|
161
161
|
var SwitchThumb = styled('span', {
|
|
@@ -167,7 +167,7 @@ var SwitchThumb = styled('span', {
|
|
|
167
167
|
})(function (_ref9) {
|
|
168
168
|
var theme = _ref9.theme;
|
|
169
169
|
return {
|
|
170
|
-
boxShadow: theme.shadows[1],
|
|
170
|
+
boxShadow: (theme.vars || theme).shadows[1],
|
|
171
171
|
backgroundColor: 'currentColor',
|
|
172
172
|
width: 20,
|
|
173
173
|
height: 20,
|
|
@@ -42,17 +42,17 @@ var TableCellRoot = styled('td', {
|
|
|
42
42
|
verticalAlign: 'inherit',
|
|
43
43
|
// Workaround for a rendering bug with spanned columns in Chrome 62.0.
|
|
44
44
|
// Removes the alpha (sets it to 1), and lightens or darkens the theme color.
|
|
45
|
-
borderBottom: "1px solid\n ".concat(theme.palette.mode === 'light' ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)),
|
|
45
|
+
borderBottom: theme.vars ? "1px solid ".concat(theme.vars.palette.TableCell.border) : "1px solid\n ".concat(theme.palette.mode === 'light' ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)),
|
|
46
46
|
textAlign: 'left',
|
|
47
47
|
padding: 16
|
|
48
48
|
}, ownerState.variant === 'head' && {
|
|
49
|
-
color: theme.palette.text.primary,
|
|
49
|
+
color: (theme.vars || theme).palette.text.primary,
|
|
50
50
|
lineHeight: theme.typography.pxToRem(24),
|
|
51
51
|
fontWeight: theme.typography.fontWeightMedium
|
|
52
52
|
}, ownerState.variant === 'body' && {
|
|
53
|
-
color: theme.palette.text.primary
|
|
53
|
+
color: (theme.vars || theme).palette.text.primary
|
|
54
54
|
}, ownerState.variant === 'footer' && {
|
|
55
|
-
color: theme.palette.text.secondary,
|
|
55
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
56
56
|
lineHeight: theme.typography.pxToRem(21),
|
|
57
57
|
fontSize: theme.typography.pxToRem(12)
|
|
58
58
|
}, ownerState.size === 'small' && _defineProperty({
|
|
@@ -83,7 +83,7 @@ var TableCellRoot = styled('td', {
|
|
|
83
83
|
position: 'sticky',
|
|
84
84
|
top: 0,
|
|
85
85
|
zIndex: 2,
|
|
86
|
-
backgroundColor: theme.palette.background.default
|
|
86
|
+
backgroundColor: (theme.vars || theme).palette.background.default
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
/**
|
package/legacy/Tabs/Tabs.js
CHANGED
|
@@ -429,31 +429,21 @@ var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
429
429
|
scroll(scrollValue);
|
|
430
430
|
};
|
|
431
431
|
|
|
432
|
-
var getFirstVisibleTab = function getFirstVisibleTab(tabs) {
|
|
433
|
-
var containerSize = tabsRef.current[clientSize];
|
|
434
|
-
var containerStartBound = Math.round(tabsRef.current[scrollStart]);
|
|
435
|
-
var containerEndBound = Math.round(containerStartBound + containerSize);
|
|
436
|
-
var offset = vertical ? 'offsetTop' : 'offsetLeft';
|
|
437
|
-
return tabs.find(function (tab) {
|
|
438
|
-
var centerPoint = tab[offset] + tab[clientSize] / 2;
|
|
439
|
-
return centerPoint >= containerStartBound && centerPoint <= containerEndBound;
|
|
440
|
-
});
|
|
441
|
-
};
|
|
442
|
-
|
|
443
432
|
var getScrollSize = function getScrollSize() {
|
|
444
433
|
var containerSize = tabsRef.current[clientSize];
|
|
445
434
|
var totalSize = 0;
|
|
446
435
|
var children = Array.from(tabListRef.current.children);
|
|
447
|
-
var firstVisibleTab = getFirstVisibleTab(children);
|
|
448
|
-
|
|
449
|
-
if (firstVisibleTab && firstVisibleTab[clientSize] > containerSize) {
|
|
450
|
-
return firstVisibleTab[clientSize];
|
|
451
|
-
}
|
|
452
436
|
|
|
453
437
|
for (var i = 0; i < children.length; i += 1) {
|
|
454
438
|
var tab = children[i];
|
|
455
439
|
|
|
456
440
|
if (totalSize + tab[clientSize] > containerSize) {
|
|
441
|
+
// If the first item is longer than the container size, then only scroll
|
|
442
|
+
// by the container size.
|
|
443
|
+
if (i === 0) {
|
|
444
|
+
totalSize = containerSize;
|
|
445
|
+
}
|
|
446
|
+
|
|
457
447
|
break;
|
|
458
448
|
}
|
|
459
449
|
|
|
@@ -562,8 +552,16 @@ var Tabs = /*#__PURE__*/React.forwardRef(function Tabs(inProps, ref) {
|
|
|
562
552
|
});
|
|
563
553
|
React.useEffect(function () {
|
|
564
554
|
var handleResize = debounce(function () {
|
|
565
|
-
|
|
566
|
-
|
|
555
|
+
// If the Tabs component is replaced by Suspense with a fallback, the last
|
|
556
|
+
// ResizeObserver's handler that runs because of the change in the layout is trying to
|
|
557
|
+
// access a dom node that is no longer there (as the fallback component is being shown instead).
|
|
558
|
+
// See https://github.com/mui/material-ui/issues/33276
|
|
559
|
+
// TODO: Add tests that will ensure the component is not failing when
|
|
560
|
+
// replaced by Suspense with a fallback, once React is updated to version 18
|
|
561
|
+
if (tabsRef.current) {
|
|
562
|
+
updateIndicatorState();
|
|
563
|
+
updateScrollButtonState();
|
|
564
|
+
}
|
|
567
565
|
});
|
|
568
566
|
var win = ownerWindow(tabsRef.current);
|
|
569
567
|
win.addEventListener('resize', handleResize);
|
|
@@ -112,7 +112,7 @@ var TooltipTooltip = styled('div', {
|
|
|
112
112
|
var theme = _ref3.theme,
|
|
113
113
|
ownerState = _ref3.ownerState;
|
|
114
114
|
return _extends({
|
|
115
|
-
backgroundColor: theme.vars ?
|
|
115
|
+
backgroundColor: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.92),
|
|
116
116
|
borderRadius: (theme.vars || theme).shape.borderRadius,
|
|
117
117
|
color: (theme.vars || theme).palette.common.white,
|
|
118
118
|
fontFamily: theme.typography.fontFamily,
|
package/legacy/index.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
|
|
3
|
-
/* eslint-disable @typescript-eslint/naming-convention */
|
|
4
2
|
import { unstable_createCssVarsProvider as createCssVarsProvider } from '@mui/system';
|
|
5
3
|
import experimental_extendTheme from './experimental_extendTheme';
|
|
6
4
|
import createTypography from './createTypography';
|
|
5
|
+
|
|
6
|
+
var shouldSkipGeneratingVar = function shouldSkipGeneratingVar(keys) {
|
|
7
|
+
var _keys$;
|
|
8
|
+
|
|
9
|
+
return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
|
|
10
|
+
};
|
|
11
|
+
|
|
7
12
|
var defaultTheme = experimental_extendTheme();
|
|
8
13
|
|
|
9
14
|
var _createCssVarsProvide = createCssVarsProvider({
|
|
@@ -15,7 +20,6 @@ var _createCssVarsProvide = createCssVarsProvider({
|
|
|
15
20
|
light: 'light',
|
|
16
21
|
dark: 'dark'
|
|
17
22
|
},
|
|
18
|
-
prefix: 'md',
|
|
19
23
|
resolveTheme: function resolveTheme(theme) {
|
|
20
24
|
var newTheme = _extends({}, theme, {
|
|
21
25
|
typography: createTypography(theme.palette, theme.typography)
|
|
@@ -23,12 +27,10 @@ var _createCssVarsProvide = createCssVarsProvider({
|
|
|
23
27
|
|
|
24
28
|
return newTheme;
|
|
25
29
|
},
|
|
26
|
-
shouldSkipGeneratingVar:
|
|
27
|
-
return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/);
|
|
28
|
-
}
|
|
30
|
+
shouldSkipGeneratingVar: shouldSkipGeneratingVar
|
|
29
31
|
}),
|
|
30
|
-
|
|
32
|
+
CssVarsProvider = _createCssVarsProvide.CssVarsProvider,
|
|
31
33
|
useColorScheme = _createCssVarsProvide.useColorScheme,
|
|
32
34
|
getInitColorSchemeScript = _createCssVarsProvide.getInitColorSchemeScript;
|
|
33
35
|
|
|
34
|
-
export { useColorScheme, getInitColorSchemeScript, Experimental_CssVarsProvider };
|
|
36
|
+
export { useColorScheme, getInitColorSchemeScript, shouldSkipGeneratingVar, CssVarsProvider as Experimental_CssVarsProvider };
|