@mui/material 5.6.1 → 5.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.js +6 -6
- package/Accordion/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/AccordionSummary.js +3 -3
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/AppBar.d.ts +1 -1
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/Autocomplete.js +2 -0
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/AvatarGroup.js +2 -2
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/Badge.js +9 -7
- package/Badge/badgeClasses.d.ts +24 -24
- package/BottomNavigation/BottomNavigation.d.ts +1 -1
- package/BottomNavigation/BottomNavigation.js +1 -1
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/BottomNavigationAction.d.ts +1 -1
- package/BottomNavigationAction/BottomNavigationAction.js +6 -5
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Box/Box.d.ts +9 -28
- package/Box/Box.js +25 -4
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/Button.d.ts +1 -1
- package/Button/buttonClasses.d.ts +76 -76
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +185 -2
- 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 +1 -1
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/chipClasses.d.ts +80 -80
- package/CircularProgress/CircularProgress.js +1 -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/CssBaseline/CssBaseline.d.ts +1 -1
- package/Dialog/Dialog.d.ts +1 -0
- package/Dialog/Dialog.js +1 -0
- 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/DialogTitle.d.ts +30 -15
- 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 +1 -1
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/FilledInput.d.ts +1 -1
- package/FilledInput/FilledInput.js +6 -2
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/FormControl.d.ts +2 -2
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/FormControlLabel.d.ts +1 -1
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/FormHelperText.d.ts +1 -1
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/FormLabel.d.ts +1 -1
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/GlobalStyles/GlobalStyles.d.ts +1 -1
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/Icon.d.ts +1 -1
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +26 -26
- package/ImageList/ImageList.d.ts +1 -1
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/ImageListItem.d.ts +1 -1
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/ImageListItemBar.d.ts +1 -1
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/Input.d.ts +1 -1
- package/Input/Input.js +3 -1
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/InputAdornment.d.ts +1 -1
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/InputBase.d.ts +1 -1
- package/InputBase/inputBaseClasses.d.ts +44 -44
- package/InputLabel/InputLabel.d.ts +1 -1
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/linkClasses.d.ts +18 -18
- package/List/List.d.ts +1 -1
- package/List/listClasses.d.ts +14 -14
- package/ListItem/ListItem.d.ts +1 -1
- 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/Menu.d.ts +1 -1
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/Modal/Modal.js +1 -0
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/OutlinedInput.d.ts +1 -1
- 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/README.md +79 -33
- package/Radio/Radio.d.ts +1 -1
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroup.d.ts +1 -1
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/ScopedCssBaseline.d.ts +1 -1
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +24 -24
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/SpeedDialAction.d.ts +1 -1
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/SpeedDialIcon.d.ts +1 -1
- 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/StepContent.d.ts +3 -1
- 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 +1 -1
- package/SvgIcon/svgIconClasses.d.ts +24 -24
- package/Switch/Switch.d.ts +1 -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/Tabs.d.ts +1 -1
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/TextField.d.ts +1 -1
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/ToggleButton.d.ts +1 -1
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/ToggleButtonGroup.d.ts +1 -1
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/Toolbar.d.ts +1 -1
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- 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/Accordion/Accordion.js +6 -6
- package/legacy/AccordionSummary/AccordionSummary.js +3 -3
- package/legacy/Autocomplete/Autocomplete.js +2 -0
- package/legacy/AvatarGroup/AvatarGroup.js +2 -2
- package/legacy/Badge/Badge.js +9 -7
- package/legacy/BottomNavigation/BottomNavigation.js +1 -1
- package/legacy/BottomNavigationAction/BottomNavigationAction.js +6 -5
- package/legacy/Box/Box.js +25 -4
- package/legacy/CircularProgress/CircularProgress.js +1 -1
- package/legacy/Dialog/Dialog.js +1 -0
- package/legacy/FilledInput/FilledInput.js +5 -3
- package/legacy/Input/Input.js +3 -1
- package/legacy/Modal/Modal.js +1 -0
- package/legacy/index.js +1 -1
- package/legacy/locale/index.js +1 -1
- package/locale/index.d.ts +71 -71
- package/locale/index.js +1 -1
- package/modern/Accordion/Accordion.js +6 -6
- package/modern/AccordionSummary/AccordionSummary.js +3 -3
- package/modern/Autocomplete/Autocomplete.js +2 -0
- package/modern/AvatarGroup/AvatarGroup.js +2 -2
- package/modern/Badge/Badge.js +9 -7
- package/modern/BottomNavigation/BottomNavigation.js +1 -1
- package/modern/BottomNavigationAction/BottomNavigationAction.js +6 -5
- package/modern/Box/Box.js +25 -4
- package/modern/CircularProgress/CircularProgress.js +1 -1
- package/modern/Dialog/Dialog.js +1 -0
- package/modern/FilledInput/FilledInput.js +4 -2
- package/modern/Input/Input.js +3 -1
- package/modern/Modal/Modal.js +1 -0
- package/modern/index.js +1 -1
- package/modern/locale/index.js +1 -1
- package/node/Accordion/Accordion.js +6 -6
- package/node/AccordionSummary/AccordionSummary.js +3 -3
- package/node/Autocomplete/Autocomplete.js +2 -0
- package/node/AvatarGroup/AvatarGroup.js +2 -2
- package/node/Badge/Badge.js +10 -7
- package/node/BottomNavigation/BottomNavigation.js +1 -1
- package/node/BottomNavigationAction/BottomNavigationAction.js +6 -5
- package/node/Box/Box.js +28 -4
- package/node/CircularProgress/CircularProgress.js +1 -1
- package/node/Dialog/Dialog.js +1 -0
- package/node/FilledInput/FilledInput.js +6 -2
- package/node/Input/Input.js +3 -1
- package/node/Modal/Modal.js +1 -0
- package/node/index.js +1 -1
- package/node/locale/index.js +1 -1
- package/package.json +4 -4
- 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 +181 -156
- package/umd/material-ui.production.min.js +20 -20
- 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
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export interface SwitchBaseClasses {
|
|
2
|
-
root: string;
|
|
3
|
-
checked: string;
|
|
4
|
-
disabled: string;
|
|
5
|
-
input: string;
|
|
6
|
-
edgeStart: string;
|
|
7
|
-
edgeEnd: string;
|
|
8
|
-
}
|
|
9
|
-
export declare type SwitchBaseClassKey = keyof SwitchBaseClasses;
|
|
10
|
-
export declare function getSwitchBaseUtilityClass(slot: string): string;
|
|
11
|
-
declare const switchBaseClasses: SwitchBaseClasses;
|
|
12
|
-
export default switchBaseClasses;
|
|
1
|
+
export interface SwitchBaseClasses {
|
|
2
|
+
root: string;
|
|
3
|
+
checked: string;
|
|
4
|
+
disabled: string;
|
|
5
|
+
input: string;
|
|
6
|
+
edgeStart: string;
|
|
7
|
+
edgeEnd: string;
|
|
8
|
+
}
|
|
9
|
+
export declare type SwitchBaseClassKey = keyof SwitchBaseClasses;
|
|
10
|
+
export declare function getSwitchBaseUtilityClass(slot: string): string;
|
|
11
|
+
declare const switchBaseClasses: SwitchBaseClasses;
|
|
12
|
+
export default switchBaseClasses;
|
|
@@ -59,7 +59,7 @@ var AccordionRoot = styled(Paper, {
|
|
|
59
59
|
height: 1,
|
|
60
60
|
content: '""',
|
|
61
61
|
opacity: 1,
|
|
62
|
-
backgroundColor: theme.palette.divider,
|
|
62
|
+
backgroundColor: (theme.vars || theme).palette.divider,
|
|
63
63
|
transition: theme.transitions.create(['opacity', 'background-color'], transition)
|
|
64
64
|
},
|
|
65
65
|
'&:first-of-type': {
|
|
@@ -83,7 +83,7 @@ var AccordionRoot = styled(Paper, {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
}), _defineProperty(_ref3, "&.".concat(accordionClasses.disabled), {
|
|
86
|
-
backgroundColor: theme.palette.action.disabledBackground
|
|
86
|
+
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
|
87
87
|
}), _ref3;
|
|
88
88
|
}, function (_ref4) {
|
|
89
89
|
var theme = _ref4.theme,
|
|
@@ -91,12 +91,12 @@ var AccordionRoot = styled(Paper, {
|
|
|
91
91
|
return _extends({}, !ownerState.square && {
|
|
92
92
|
borderRadius: 0,
|
|
93
93
|
'&:first-of-type': {
|
|
94
|
-
borderTopLeftRadius: theme.shape.borderRadius,
|
|
95
|
-
borderTopRightRadius: theme.shape.borderRadius
|
|
94
|
+
borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
|
|
95
|
+
borderTopRightRadius: (theme.vars || theme).shape.borderRadius
|
|
96
96
|
},
|
|
97
97
|
'&:last-of-type': {
|
|
98
|
-
borderBottomLeftRadius: theme.shape.borderRadius,
|
|
99
|
-
borderBottomRightRadius: theme.shape.borderRadius,
|
|
98
|
+
borderBottomLeftRadius: (theme.vars || theme).shape.borderRadius,
|
|
99
|
+
borderBottomRightRadius: (theme.vars || theme).shape.borderRadius,
|
|
100
100
|
// Fix a rendering issue on Edge
|
|
101
101
|
'@supports (-ms-ime-align: auto)': {
|
|
102
102
|
borderBottomLeftRadius: 0,
|
|
@@ -47,9 +47,9 @@ var AccordionSummaryRoot = styled(ButtonBase, {
|
|
|
47
47
|
padding: theme.spacing(0, 2),
|
|
48
48
|
transition: theme.transitions.create(['min-height', 'background-color'], transition)
|
|
49
49
|
}, _defineProperty(_extends2, "&.".concat(accordionSummaryClasses.focusVisible), {
|
|
50
|
-
backgroundColor: theme.palette.action.focus
|
|
50
|
+
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
51
51
|
}), _defineProperty(_extends2, "&.".concat(accordionSummaryClasses.disabled), {
|
|
52
|
-
opacity: theme.palette.action.disabledOpacity
|
|
52
|
+
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
53
53
|
}), _defineProperty(_extends2, "&:hover:not(.".concat(accordionSummaryClasses.disabled, ")"), {
|
|
54
54
|
cursor: 'pointer'
|
|
55
55
|
}), _extends2), !ownerState.disableGutters && _defineProperty({}, "&.".concat(accordionSummaryClasses.expanded), {
|
|
@@ -87,7 +87,7 @@ var AccordionSummaryExpandIconWrapper = styled('div', {
|
|
|
87
87
|
var theme = _ref5.theme;
|
|
88
88
|
return _defineProperty({
|
|
89
89
|
display: 'flex',
|
|
90
|
-
color: theme.palette.action.active,
|
|
90
|
+
color: (theme.vars || theme).palette.action.active,
|
|
91
91
|
transform: 'rotate(0deg)',
|
|
92
92
|
transition: theme.transitions.create('transform', {
|
|
93
93
|
duration: theme.transitions.duration.shortest
|
|
@@ -844,6 +844,8 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
|
|
|
844
844
|
* Used to determine the string value for a given option.
|
|
845
845
|
* It's used to fill the input (and the list box options if `renderOption` is not provided).
|
|
846
846
|
*
|
|
847
|
+
* If used in free solo mode, it must accept both the type of the options and a string.
|
|
848
|
+
*
|
|
847
849
|
* @param {T} option
|
|
848
850
|
* @returns {string}
|
|
849
851
|
* @default (option) => option.label ?? option
|
|
@@ -37,7 +37,7 @@ var AvatarGroupRoot = styled('div', {
|
|
|
37
37
|
|
|
38
38
|
var theme = _ref.theme;
|
|
39
39
|
return _ref2 = {}, _defineProperty(_ref2, "& .".concat(avatarClasses.root), {
|
|
40
|
-
border: "2px solid ".concat(theme.palette.background.default),
|
|
40
|
+
border: "2px solid ".concat((theme.vars || theme).palette.background.default),
|
|
41
41
|
boxSizing: 'content-box',
|
|
42
42
|
marginLeft: -8,
|
|
43
43
|
'&:last-child': {
|
|
@@ -54,7 +54,7 @@ var AvatarGroupAvatar = styled(Avatar, {
|
|
|
54
54
|
})(function (_ref3) {
|
|
55
55
|
var theme = _ref3.theme;
|
|
56
56
|
return {
|
|
57
|
-
border: "2px solid ".concat(theme.palette.background.default),
|
|
57
|
+
border: "2px solid ".concat((theme.vars || theme).palette.background.default),
|
|
58
58
|
boxSizing: 'content-box',
|
|
59
59
|
marginLeft: -8,
|
|
60
60
|
'&:last-child': {
|
package/legacy/Badge/Badge.js
CHANGED
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { usePreviousProps } from '@mui/utils';
|
|
8
|
+
import composeClasses from '@mui/base/composeClasses';
|
|
8
9
|
import BadgeUnstyled from '@mui/base/BadgeUnstyled';
|
|
9
10
|
import styled from '../styles/styled';
|
|
10
11
|
import useThemeProps from '../styles/useThemeProps';
|
|
@@ -15,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
15
16
|
var RADIUS_STANDARD = 10;
|
|
16
17
|
var RADIUS_DOT = 4;
|
|
17
18
|
|
|
18
|
-
var
|
|
19
|
+
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
19
20
|
var color = ownerState.color,
|
|
20
21
|
anchorOrigin = ownerState.anchorOrigin,
|
|
21
22
|
invisible = ownerState.invisible,
|
|
@@ -23,10 +24,11 @@ var extendUtilityClasses = function extendUtilityClasses(ownerState) {
|
|
|
23
24
|
variant = ownerState.variant,
|
|
24
25
|
_ownerState$classes = ownerState.classes,
|
|
25
26
|
classes = _ownerState$classes === void 0 ? {} : _ownerState$classes;
|
|
26
|
-
|
|
27
|
-
root:
|
|
28
|
-
badge:
|
|
27
|
+
var slots = {
|
|
28
|
+
root: ['root'],
|
|
29
|
+
badge: ['badge', variant, invisible && 'invisible', "anchorOrigin".concat(capitalize(anchorOrigin.vertical)).concat(capitalize(anchorOrigin.horizontal)), "anchorOrigin".concat(capitalize(anchorOrigin.vertical)).concat(capitalize(anchorOrigin.horizontal)).concat(capitalize(overlap)), "overlap".concat(capitalize(overlap)), color !== 'default' && "color".concat(capitalize(color))]
|
|
29
30
|
};
|
|
31
|
+
return composeClasses(slots, getBadgeUtilityClass, classes);
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
var BadgeRoot = styled('span', {
|
|
@@ -76,8 +78,8 @@ var BadgeBadge = styled('span', {
|
|
|
76
78
|
duration: theme.transitions.duration.enteringScreen
|
|
77
79
|
})
|
|
78
80
|
}, ownerState.color !== 'default' && {
|
|
79
|
-
backgroundColor: theme.palette[ownerState.color].main,
|
|
80
|
-
color: theme.palette[ownerState.color].contrastText
|
|
81
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
|
|
82
|
+
color: (theme.vars || theme).palette[ownerState.color].contrastText
|
|
81
83
|
}, ownerState.variant === 'dot' && {
|
|
82
84
|
borderRadius: RADIUS_DOT,
|
|
83
85
|
height: RADIUS_DOT * 2,
|
|
@@ -210,7 +212,7 @@ var Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
|
210
212
|
variant: variant
|
|
211
213
|
});
|
|
212
214
|
|
|
213
|
-
var classes =
|
|
215
|
+
var classes = useUtilityClasses(ownerState);
|
|
214
216
|
var displayValue;
|
|
215
217
|
|
|
216
218
|
if (variant !== 'dot') {
|
|
@@ -30,7 +30,7 @@ var BottomNavigationRoot = styled('div', {
|
|
|
30
30
|
display: 'flex',
|
|
31
31
|
justifyContent: 'center',
|
|
32
32
|
height: 56,
|
|
33
|
-
backgroundColor: theme.palette.background.paper
|
|
33
|
+
backgroundColor: (theme.vars || theme).palette.background.paper
|
|
34
34
|
};
|
|
35
35
|
});
|
|
36
36
|
var BottomNavigation = /*#__PURE__*/React.forwardRef(function BottomNavigation(inProps, ref) {
|
|
@@ -38,17 +38,18 @@ var BottomNavigationActionRoot = styled(ButtonBase, {
|
|
|
38
38
|
transition: theme.transitions.create(['color', 'padding-top'], {
|
|
39
39
|
duration: theme.transitions.duration.short
|
|
40
40
|
}),
|
|
41
|
-
padding: '
|
|
41
|
+
padding: '0px 12px',
|
|
42
42
|
minWidth: 80,
|
|
43
43
|
maxWidth: 168,
|
|
44
|
-
color: theme.palette.text.secondary,
|
|
44
|
+
color: (theme.vars || theme).palette.text.secondary,
|
|
45
45
|
flexDirection: 'column',
|
|
46
46
|
flex: '1'
|
|
47
47
|
}, !ownerState.showLabel && !ownerState.selected && {
|
|
48
|
-
paddingTop:
|
|
48
|
+
paddingTop: 14
|
|
49
|
+
}, !ownerState.showLabel && !ownerState.selected && !ownerState.label && {
|
|
50
|
+
paddingTop: 0
|
|
49
51
|
}, _defineProperty({}, "&.".concat(bottomNavigationActionClasses.selected), {
|
|
50
|
-
|
|
51
|
-
color: theme.palette.primary.main
|
|
52
|
+
color: (theme.vars || theme).palette.primary.main
|
|
52
53
|
}));
|
|
53
54
|
});
|
|
54
55
|
var BottomNavigationActionLabel = styled('span', {
|
package/legacy/Box/Box.js
CHANGED
|
@@ -1,14 +1,35 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
1
2
|
import { createBox } from '@mui/system';
|
|
2
3
|
import { unstable_ClassNameGenerator as ClassNameGenerator } from '../className';
|
|
3
4
|
import { createTheme } from '../styles';
|
|
4
5
|
var defaultTheme = createTheme();
|
|
5
|
-
/**
|
|
6
|
-
* @ignore - do not document.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
6
|
var Box = createBox({
|
|
10
7
|
defaultTheme: defaultTheme,
|
|
11
8
|
defaultClassName: 'MuiBox-root',
|
|
12
9
|
generateClassName: ClassNameGenerator.generate
|
|
13
10
|
});
|
|
11
|
+
process.env.NODE_ENV !== "production" ? Box.propTypes
|
|
12
|
+
/* remove-proptypes */
|
|
13
|
+
= {
|
|
14
|
+
// ----------------------------- Warning --------------------------------
|
|
15
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
16
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
17
|
+
// ----------------------------------------------------------------------
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @ignore
|
|
21
|
+
*/
|
|
22
|
+
children: PropTypes.node,
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* The component used for the root node.
|
|
26
|
+
* Either a string to use a HTML element or a component.
|
|
27
|
+
*/
|
|
28
|
+
component: PropTypes.elementType,
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
32
|
+
*/
|
|
33
|
+
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
|
|
34
|
+
} : void 0;
|
|
14
35
|
export default Box;
|
|
@@ -47,7 +47,7 @@ var CircularProgressRoot = styled('span', {
|
|
|
47
47
|
}, ownerState.variant === 'determinate' && {
|
|
48
48
|
transition: theme.transitions.create('transform')
|
|
49
49
|
}, ownerState.color !== 'inherit' && {
|
|
50
|
-
color: theme.palette[ownerState.color].main
|
|
50
|
+
color: (theme.vars || theme).palette[ownerState.color].main
|
|
51
51
|
});
|
|
52
52
|
}, function (_ref2) {
|
|
53
53
|
var ownerState = _ref2.ownerState;
|
package/legacy/Dialog/Dialog.js
CHANGED
|
@@ -351,6 +351,7 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
|
|
|
351
351
|
|
|
352
352
|
/**
|
|
353
353
|
* Callback fired when the backdrop is clicked.
|
|
354
|
+
* @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
|
|
354
355
|
*/
|
|
355
356
|
onBackdropClick: PropTypes.func,
|
|
356
357
|
|
|
@@ -35,7 +35,7 @@ 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, _ref2;
|
|
38
|
+
var _extends2, _theme$palette, _ref2;
|
|
39
39
|
|
|
40
40
|
var theme = _ref.theme,
|
|
41
41
|
ownerState = _ref.ownerState;
|
|
@@ -64,7 +64,7 @@ var FilledInputRoot = styled(InputBaseRoot, {
|
|
|
64
64
|
backgroundColor: light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)'
|
|
65
65
|
}), _extends2), !ownerState.disableUnderline && (_ref2 = {
|
|
66
66
|
'&:after': {
|
|
67
|
-
borderBottom: "2px solid ".concat(theme.palette[ownerState.color].main),
|
|
67
|
+
borderBottom: "2px solid ".concat((_theme$palette = theme.palette[ownerState.color || 'primary']) == null ? void 0 : _theme$palette.main),
|
|
68
68
|
left: 0,
|
|
69
69
|
bottom: 0,
|
|
70
70
|
// Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
|
|
@@ -80,7 +80,9 @@ var FilledInputRoot = styled(InputBaseRoot, {
|
|
|
80
80
|
|
|
81
81
|
}
|
|
82
82
|
}, _defineProperty(_ref2, "&.".concat(filledInputClasses.focused, ":after"), {
|
|
83
|
-
|
|
83
|
+
// translateX(0) is a workaround for Safari transform scale bug
|
|
84
|
+
// See https://github.com/mui/material-ui/issues/31766
|
|
85
|
+
transform: 'scaleX(1) translateX(0)'
|
|
84
86
|
}), _defineProperty(_ref2, "&.".concat(filledInputClasses.error, ":after"), {
|
|
85
87
|
borderBottomColor: theme.palette.error.main,
|
|
86
88
|
transform: 'scaleX(1)' // error is always underlined in red
|
package/legacy/Input/Input.js
CHANGED
|
@@ -65,7 +65,9 @@ var InputRoot = styled(InputBaseRoot, {
|
|
|
65
65
|
|
|
66
66
|
}
|
|
67
67
|
}, _defineProperty(_ref2, "&.".concat(inputClasses.focused, ":after"), {
|
|
68
|
-
|
|
68
|
+
// translateX(0) is a workaround for Safari transform scale bug
|
|
69
|
+
// See https://github.com/mui/material-ui/issues/31766
|
|
70
|
+
transform: 'scaleX(1) translateX(0)'
|
|
69
71
|
}), _defineProperty(_ref2, "&.".concat(inputClasses.error, ":after"), {
|
|
70
72
|
borderBottomColor: theme.palette.error.main,
|
|
71
73
|
transform: 'scaleX(1)' // error is always underlined in red
|
package/legacy/Modal/Modal.js
CHANGED
|
@@ -270,6 +270,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
270
270
|
|
|
271
271
|
/**
|
|
272
272
|
* Callback fired when the backdrop is clicked.
|
|
273
|
+
* @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
|
|
273
274
|
*/
|
|
274
275
|
onBackdropClick: PropTypes.func,
|
|
275
276
|
|
package/legacy/index.js
CHANGED
package/legacy/locale/index.js
CHANGED
|
@@ -636,7 +636,7 @@ export var csCZ = {
|
|
|
636
636
|
'aria-label': 'Navigace stránkováním',
|
|
637
637
|
getItemAriaLabel: function getItemAriaLabel(type, page, selected) {
|
|
638
638
|
if (type === 'page') {
|
|
639
|
-
return "".concat(selected ? '' : 'Jít na ').concat(page, " str\xE1nku");
|
|
639
|
+
return "".concat(selected ? '' : 'Jít na ').concat(page, ". str\xE1nku");
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
if (type === 'first') {
|
package/locale/index.d.ts
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
import { ComponentsPropsList } from '../styles/props';
|
|
2
|
-
export interface Localization {
|
|
3
|
-
components?: {
|
|
4
|
-
MuiAlert?: {
|
|
5
|
-
defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
|
|
6
|
-
};
|
|
7
|
-
MuiBreadcrumbs?: {
|
|
8
|
-
defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
|
|
9
|
-
};
|
|
10
|
-
MuiTablePagination?: {
|
|
11
|
-
defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
|
|
12
|
-
};
|
|
13
|
-
MuiRating?: {
|
|
14
|
-
defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
|
|
15
|
-
};
|
|
16
|
-
MuiAutocomplete?: {
|
|
17
|
-
defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
|
|
18
|
-
};
|
|
19
|
-
MuiPagination?: {
|
|
20
|
-
defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export declare const amET: Localization;
|
|
25
|
-
export declare const arEG: Localization;
|
|
26
|
-
export declare const arSD: Localization;
|
|
27
|
-
export declare const azAZ: Localization;
|
|
28
|
-
export declare const bnBD: Localization;
|
|
29
|
-
export declare const bgBG: Localization;
|
|
30
|
-
export declare const caES: Localization;
|
|
31
|
-
export declare const csCZ: Localization;
|
|
32
|
-
export declare const daDK: Localization;
|
|
33
|
-
export declare const deDE: Localization;
|
|
34
|
-
export declare const elGR: Localization;
|
|
35
|
-
export declare const enUS: Localization;
|
|
36
|
-
export declare const esES: Localization;
|
|
37
|
-
export declare const etEE: Localization;
|
|
38
|
-
export declare const faIR: Localization;
|
|
39
|
-
export declare const fiFI: Localization;
|
|
40
|
-
export declare const frFR: Localization;
|
|
41
|
-
export declare const heIL: Localization;
|
|
42
|
-
export declare const hiIN: Localization;
|
|
43
|
-
export declare const hrHR: Localization;
|
|
44
|
-
export declare const huHU: Localization;
|
|
45
|
-
export declare const hyAM: Localization;
|
|
46
|
-
export declare const idID: Localization;
|
|
47
|
-
export declare const isIS: Localization;
|
|
48
|
-
export declare const itIT: Localization;
|
|
49
|
-
export declare const jaJP: Localization;
|
|
50
|
-
export declare const khKH: Localization;
|
|
51
|
-
export declare const koKR: Localization;
|
|
52
|
-
export declare const kzKZ: Localization;
|
|
53
|
-
export declare const mkMK: Localization;
|
|
54
|
-
export declare const nbNO: Localization;
|
|
55
|
-
export declare const nlNL: Localization;
|
|
56
|
-
export declare const plPL: Localization;
|
|
57
|
-
export declare const ptBR: Localization;
|
|
58
|
-
export declare const ptPT: Localization;
|
|
59
|
-
export declare const roRO: Localization;
|
|
60
|
-
export declare const srRS: Localization;
|
|
61
|
-
export declare const ruRU: Localization;
|
|
62
|
-
export declare const siLK: Localization;
|
|
63
|
-
export declare const skSK: Localization;
|
|
64
|
-
export declare const svSE: Localization;
|
|
65
|
-
export declare const thTH: Localization;
|
|
66
|
-
export declare const trTR: Localization;
|
|
67
|
-
export declare const ukUA: Localization;
|
|
68
|
-
export declare const viVN: Localization;
|
|
69
|
-
export declare const zhCN: Localization;
|
|
70
|
-
export declare const zhHK: Localization;
|
|
71
|
-
export declare const zhTW: Localization;
|
|
1
|
+
import { ComponentsPropsList } from '../styles/props';
|
|
2
|
+
export interface Localization {
|
|
3
|
+
components?: {
|
|
4
|
+
MuiAlert?: {
|
|
5
|
+
defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
|
|
6
|
+
};
|
|
7
|
+
MuiBreadcrumbs?: {
|
|
8
|
+
defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
|
|
9
|
+
};
|
|
10
|
+
MuiTablePagination?: {
|
|
11
|
+
defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
|
|
12
|
+
};
|
|
13
|
+
MuiRating?: {
|
|
14
|
+
defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
|
|
15
|
+
};
|
|
16
|
+
MuiAutocomplete?: {
|
|
17
|
+
defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
|
|
18
|
+
};
|
|
19
|
+
MuiPagination?: {
|
|
20
|
+
defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare const amET: Localization;
|
|
25
|
+
export declare const arEG: Localization;
|
|
26
|
+
export declare const arSD: Localization;
|
|
27
|
+
export declare const azAZ: Localization;
|
|
28
|
+
export declare const bnBD: Localization;
|
|
29
|
+
export declare const bgBG: Localization;
|
|
30
|
+
export declare const caES: Localization;
|
|
31
|
+
export declare const csCZ: Localization;
|
|
32
|
+
export declare const daDK: Localization;
|
|
33
|
+
export declare const deDE: Localization;
|
|
34
|
+
export declare const elGR: Localization;
|
|
35
|
+
export declare const enUS: Localization;
|
|
36
|
+
export declare const esES: Localization;
|
|
37
|
+
export declare const etEE: Localization;
|
|
38
|
+
export declare const faIR: Localization;
|
|
39
|
+
export declare const fiFI: Localization;
|
|
40
|
+
export declare const frFR: Localization;
|
|
41
|
+
export declare const heIL: Localization;
|
|
42
|
+
export declare const hiIN: Localization;
|
|
43
|
+
export declare const hrHR: Localization;
|
|
44
|
+
export declare const huHU: Localization;
|
|
45
|
+
export declare const hyAM: Localization;
|
|
46
|
+
export declare const idID: Localization;
|
|
47
|
+
export declare const isIS: Localization;
|
|
48
|
+
export declare const itIT: Localization;
|
|
49
|
+
export declare const jaJP: Localization;
|
|
50
|
+
export declare const khKH: Localization;
|
|
51
|
+
export declare const koKR: Localization;
|
|
52
|
+
export declare const kzKZ: Localization;
|
|
53
|
+
export declare const mkMK: Localization;
|
|
54
|
+
export declare const nbNO: Localization;
|
|
55
|
+
export declare const nlNL: Localization;
|
|
56
|
+
export declare const plPL: Localization;
|
|
57
|
+
export declare const ptBR: Localization;
|
|
58
|
+
export declare const ptPT: Localization;
|
|
59
|
+
export declare const roRO: Localization;
|
|
60
|
+
export declare const srRS: Localization;
|
|
61
|
+
export declare const ruRU: Localization;
|
|
62
|
+
export declare const siLK: Localization;
|
|
63
|
+
export declare const skSK: Localization;
|
|
64
|
+
export declare const svSE: Localization;
|
|
65
|
+
export declare const thTH: Localization;
|
|
66
|
+
export declare const trTR: Localization;
|
|
67
|
+
export declare const ukUA: Localization;
|
|
68
|
+
export declare const viVN: Localization;
|
|
69
|
+
export declare const zhCN: Localization;
|
|
70
|
+
export declare const zhHK: Localization;
|
|
71
|
+
export declare const zhTW: Localization;
|
package/locale/index.js
CHANGED
|
@@ -619,7 +619,7 @@ export const csCZ = {
|
|
|
619
619
|
'aria-label': 'Navigace stránkováním',
|
|
620
620
|
getItemAriaLabel: (type, page, selected) => {
|
|
621
621
|
if (type === 'page') {
|
|
622
|
-
return `${selected ? '' : 'Jít na '}${page} stránku`;
|
|
622
|
+
return `${selected ? '' : 'Jít na '}${page}. stránku`;
|
|
623
623
|
}
|
|
624
624
|
|
|
625
625
|
if (type === 'first') {
|
|
@@ -62,7 +62,7 @@ const AccordionRoot = styled(Paper, {
|
|
|
62
62
|
height: 1,
|
|
63
63
|
content: '""',
|
|
64
64
|
opacity: 1,
|
|
65
|
-
backgroundColor: theme.palette.divider,
|
|
65
|
+
backgroundColor: (theme.vars || theme).palette.divider,
|
|
66
66
|
transition: theme.transitions.create(['opacity', 'background-color'], transition)
|
|
67
67
|
},
|
|
68
68
|
'&:first-of-type': {
|
|
@@ -87,7 +87,7 @@ const AccordionRoot = styled(Paper, {
|
|
|
87
87
|
}
|
|
88
88
|
},
|
|
89
89
|
[`&.${accordionClasses.disabled}`]: {
|
|
90
|
-
backgroundColor: theme.palette.action.disabledBackground
|
|
90
|
+
backgroundColor: (theme.vars || theme).palette.action.disabledBackground
|
|
91
91
|
}
|
|
92
92
|
};
|
|
93
93
|
}, ({
|
|
@@ -96,12 +96,12 @@ const AccordionRoot = styled(Paper, {
|
|
|
96
96
|
}) => _extends({}, !ownerState.square && {
|
|
97
97
|
borderRadius: 0,
|
|
98
98
|
'&:first-of-type': {
|
|
99
|
-
borderTopLeftRadius: theme.shape.borderRadius,
|
|
100
|
-
borderTopRightRadius: theme.shape.borderRadius
|
|
99
|
+
borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
|
|
100
|
+
borderTopRightRadius: (theme.vars || theme).shape.borderRadius
|
|
101
101
|
},
|
|
102
102
|
'&:last-of-type': {
|
|
103
|
-
borderBottomLeftRadius: theme.shape.borderRadius,
|
|
104
|
-
borderBottomRightRadius: theme.shape.borderRadius,
|
|
103
|
+
borderBottomLeftRadius: (theme.vars || theme).shape.borderRadius,
|
|
104
|
+
borderBottomRightRadius: (theme.vars || theme).shape.borderRadius,
|
|
105
105
|
// Fix a rendering issue on Edge
|
|
106
106
|
'@supports (-ms-ime-align: auto)': {
|
|
107
107
|
borderBottomLeftRadius: 0,
|
|
@@ -46,10 +46,10 @@ const AccordionSummaryRoot = styled(ButtonBase, {
|
|
|
46
46
|
padding: theme.spacing(0, 2),
|
|
47
47
|
transition: theme.transitions.create(['min-height', 'background-color'], transition),
|
|
48
48
|
[`&.${accordionSummaryClasses.focusVisible}`]: {
|
|
49
|
-
backgroundColor: theme.palette.action.focus
|
|
49
|
+
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
50
50
|
},
|
|
51
51
|
[`&.${accordionSummaryClasses.disabled}`]: {
|
|
52
|
-
opacity: theme.palette.action.disabledOpacity
|
|
52
|
+
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
53
53
|
},
|
|
54
54
|
[`&:hover:not(.${accordionSummaryClasses.disabled})`]: {
|
|
55
55
|
cursor: 'pointer'
|
|
@@ -87,7 +87,7 @@ const AccordionSummaryExpandIconWrapper = styled('div', {
|
|
|
87
87
|
theme
|
|
88
88
|
}) => ({
|
|
89
89
|
display: 'flex',
|
|
90
|
-
color: theme.palette.action.active,
|
|
90
|
+
color: (theme.vars || theme).palette.action.active,
|
|
91
91
|
transform: 'rotate(0deg)',
|
|
92
92
|
transition: theme.transitions.create('transform', {
|
|
93
93
|
duration: theme.transitions.duration.shortest
|
|
@@ -809,6 +809,8 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
|
|
|
809
809
|
* Used to determine the string value for a given option.
|
|
810
810
|
* It's used to fill the input (and the list box options if `renderOption` is not provided).
|
|
811
811
|
*
|
|
812
|
+
* If used in free solo mode, it must accept both the type of the options and a string.
|
|
813
|
+
*
|
|
812
814
|
* @param {T} option
|
|
813
815
|
* @returns {string}
|
|
814
816
|
* @default (option) => option.label ?? option
|
|
@@ -38,7 +38,7 @@ const AvatarGroupRoot = styled('div', {
|
|
|
38
38
|
theme
|
|
39
39
|
}) => ({
|
|
40
40
|
[`& .${avatarClasses.root}`]: {
|
|
41
|
-
border: `2px solid ${theme.palette.background.default}`,
|
|
41
|
+
border: `2px solid ${(theme.vars || theme).palette.background.default}`,
|
|
42
42
|
boxSizing: 'content-box',
|
|
43
43
|
marginLeft: -8,
|
|
44
44
|
'&:last-child': {
|
|
@@ -55,7 +55,7 @@ const AvatarGroupAvatar = styled(Avatar, {
|
|
|
55
55
|
})(({
|
|
56
56
|
theme
|
|
57
57
|
}) => ({
|
|
58
|
-
border: `2px solid ${theme.palette.background.default}`,
|
|
58
|
+
border: `2px solid ${(theme.vars || theme).palette.background.default}`,
|
|
59
59
|
boxSizing: 'content-box',
|
|
60
60
|
marginLeft: -8,
|
|
61
61
|
'&:last-child': {
|
package/modern/Badge/Badge.js
CHANGED
|
@@ -5,6 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { usePreviousProps } from '@mui/utils';
|
|
8
|
+
import composeClasses from '@mui/base/composeClasses';
|
|
8
9
|
import BadgeUnstyled from '@mui/base/BadgeUnstyled';
|
|
9
10
|
import styled from '../styles/styled';
|
|
10
11
|
import useThemeProps from '../styles/useThemeProps';
|
|
@@ -15,7 +16,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
15
16
|
const RADIUS_STANDARD = 10;
|
|
16
17
|
const RADIUS_DOT = 4;
|
|
17
18
|
|
|
18
|
-
const
|
|
19
|
+
const useUtilityClasses = ownerState => {
|
|
19
20
|
const {
|
|
20
21
|
color,
|
|
21
22
|
anchorOrigin,
|
|
@@ -24,10 +25,11 @@ const extendUtilityClasses = ownerState => {
|
|
|
24
25
|
variant,
|
|
25
26
|
classes = {}
|
|
26
27
|
} = ownerState;
|
|
27
|
-
|
|
28
|
-
root:
|
|
29
|
-
badge:
|
|
28
|
+
const slots = {
|
|
29
|
+
root: ['root'],
|
|
30
|
+
badge: ['badge', variant, invisible && 'invisible', `anchorOrigin${capitalize(anchorOrigin.vertical)}${capitalize(anchorOrigin.horizontal)}`, `anchorOrigin${capitalize(anchorOrigin.vertical)}${capitalize(anchorOrigin.horizontal)}${capitalize(overlap)}`, `overlap${capitalize(overlap)}`, color !== 'default' && `color${capitalize(color)}`]
|
|
30
31
|
};
|
|
32
|
+
return composeClasses(slots, getBadgeUtilityClass, classes);
|
|
31
33
|
};
|
|
32
34
|
|
|
33
35
|
const BadgeRoot = styled('span', {
|
|
@@ -77,8 +79,8 @@ const BadgeBadge = styled('span', {
|
|
|
77
79
|
duration: theme.transitions.duration.enteringScreen
|
|
78
80
|
})
|
|
79
81
|
}, ownerState.color !== 'default' && {
|
|
80
|
-
backgroundColor: theme.palette[ownerState.color].main,
|
|
81
|
-
color: theme.palette[ownerState.color].contrastText
|
|
82
|
+
backgroundColor: (theme.vars || theme).palette[ownerState.color].main,
|
|
83
|
+
color: (theme.vars || theme).palette[ownerState.color].contrastText
|
|
82
84
|
}, ownerState.variant === 'dot' && {
|
|
83
85
|
borderRadius: RADIUS_DOT,
|
|
84
86
|
height: RADIUS_DOT * 2,
|
|
@@ -206,7 +208,7 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
|
206
208
|
variant
|
|
207
209
|
});
|
|
208
210
|
|
|
209
|
-
const classes =
|
|
211
|
+
const classes = useUtilityClasses(ownerState);
|
|
210
212
|
let displayValue;
|
|
211
213
|
|
|
212
214
|
if (variant !== 'dot') {
|
|
@@ -31,7 +31,7 @@ const BottomNavigationRoot = styled('div', {
|
|
|
31
31
|
display: 'flex',
|
|
32
32
|
justifyContent: 'center',
|
|
33
33
|
height: 56,
|
|
34
|
-
backgroundColor: theme.palette.background.paper
|
|
34
|
+
backgroundColor: (theme.vars || theme).palette.background.paper
|
|
35
35
|
}));
|
|
36
36
|
const BottomNavigation = /*#__PURE__*/React.forwardRef(function BottomNavigation(inProps, ref) {
|
|
37
37
|
const props = useThemeProps({
|