@mui/material 5.14.7 → 5.14.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +2 -2
- package/AccordionSummary/AccordionSummary.d.ts +22 -20
- package/AlertTitle/AlertTitle.d.ts +1 -0
- package/AppBar/AppBar.d.ts +33 -31
- package/Avatar/Avatar.d.ts +49 -50
- package/Backdrop/Backdrop.d.ts +87 -85
- package/Badge/Badge.d.ts +2 -2
- package/BottomNavigation/BottomNavigation.d.ts +35 -33
- package/BottomNavigationAction/BottomNavigationAction.d.ts +39 -37
- package/Breadcrumbs/Breadcrumbs.d.ts +70 -67
- package/Button/Button.d.ts +72 -73
- package/Button/Button.js +4 -1
- package/ButtonBase/ButtonBase.d.ts +83 -81
- package/ButtonGroup/ButtonGroup.d.ts +72 -70
- package/ButtonGroup/ButtonGroup.js +86 -54
- package/ButtonGroup/ButtonGroupButtonContext.d.ts +6 -0
- package/ButtonGroup/ButtonGroupButtonContext.js +9 -0
- package/ButtonGroup/buttonGroupClasses.d.ts +6 -0
- package/ButtonGroup/buttonGroupClasses.js +1 -1
- package/CHANGELOG.md +235 -38
- package/Card/Card.d.ts +19 -18
- package/CardActionArea/CardActionArea.d.ts +15 -13
- package/CardContent/CardContent.d.ts +18 -16
- package/CardHeader/CardHeader.d.ts +77 -67
- package/CardMedia/CardMedia.d.ts +30 -28
- package/Chip/Chip.d.ts +84 -82
- package/CircularProgress/CircularProgress.d.ts +1 -1
- package/CircularProgress/CircularProgress.js +1 -1
- package/Container/Container.d.ts +35 -33
- package/DialogContentText/DialogContentText.d.ts +14 -12
- package/DialogTitle/DialogTitle.d.ts +19 -16
- package/Divider/Divider.d.ts +49 -50
- package/Fab/Fab.d.ts +59 -56
- package/FormControl/FormControl.d.ts +74 -72
- package/FormHelperText/FormHelperText.d.ts +52 -50
- package/FormLabel/FormLabel.d.ts +7 -4
- package/Grid/Grid.d.ts +69 -68
- package/Hidden/Hidden.d.ts +10 -10
- package/Icon/Icon.d.ts +50 -48
- package/IconButton/IconButton.d.ts +52 -50
- package/ImageList/ImageList.d.ts +41 -39
- package/ImageListItem/ImageListItem.d.ts +28 -26
- package/ImageListItem/ImageListItem.js +2 -1
- package/InputAdornment/InputAdornment.d.ts +39 -37
- package/InputBase/InputBase.js +1 -1
- package/InputLabel/InputLabel.d.ts +58 -56
- package/InputLabel/InputLabel.js +2 -1
- package/Link/Link.d.ts +37 -39
- package/List/List.d.ts +34 -35
- package/ListItem/ListItem.d.ts +53 -49
- package/ListItemButton/ListItemButton.d.ts +9 -3
- package/ListSubheader/ListSubheader.d.ts +38 -36
- package/MenuItem/MenuItem.d.ts +47 -44
- package/MenuList/MenuList.d.ts +37 -35
- package/Modal/Modal.d.ts +172 -178
- package/Modal/Modal.js +1 -1
- package/PaginationItem/PaginationItem.d.ts +85 -83
- package/Paper/Paper.d.ts +2 -2
- package/README.md +9 -198
- package/Radio/Radio.js +3 -2
- package/Radio/radioClasses.d.ts +2 -0
- package/Radio/radioClasses.js +1 -1
- package/ScopedCssBaseline/ScopedCssBaseline.d.ts +25 -23
- package/Select/SelectInput.js +9 -5
- package/Skeleton/Skeleton.d.ts +42 -40
- package/Slider/Slider.d.ts +249 -247
- package/Slider/Slider.js +9 -86
- package/Stack/Stack.d.ts +39 -38
- package/Step/Step.d.ts +46 -44
- package/StepButton/StepButton.d.ts +27 -25
- package/Stepper/Stepper.d.ts +45 -44
- package/SvgIcon/SvgIcon.d.ts +77 -75
- package/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/Tab/Tab.d.ts +52 -50
- package/TabScrollButton/TabScrollButton.d.ts +3 -2
- package/Table/Table.d.ts +35 -33
- package/TableBody/TableBody.d.ts +18 -16
- package/TableContainer/TableContainer.d.ts +18 -16
- package/TableFooter/TableFooter.d.ts +18 -16
- package/TableHead/TableHead.d.ts +18 -16
- package/TablePagination/TablePagination.d.ts +113 -112
- package/TableRow/TableRow.d.ts +28 -26
- package/TableSortLabel/TableSortLabel.d.ts +40 -36
- package/Tabs/Tabs.d.ts +153 -150
- package/Tabs/Tabs.js +1 -4
- package/ToggleButton/ToggleButton.d.ts +72 -70
- package/Toolbar/Toolbar.d.ts +29 -27
- package/Typography/Typography.d.ts +2 -2
- package/index.js +1 -1
- package/legacy/Button/Button.js +4 -1
- package/legacy/ButtonGroup/ButtonGroup.js +81 -56
- package/legacy/ButtonGroup/ButtonGroupButtonContext.js +9 -0
- package/legacy/ButtonGroup/buttonGroupClasses.js +1 -1
- package/legacy/CircularProgress/CircularProgress.js +1 -1
- package/legacy/ImageListItem/ImageListItem.js +2 -1
- package/legacy/InputBase/InputBase.js +1 -1
- package/legacy/InputLabel/InputLabel.js +2 -1
- package/legacy/Modal/Modal.js +3 -1
- package/legacy/Radio/Radio.js +3 -2
- package/legacy/Radio/radioClasses.js +1 -1
- package/legacy/Select/SelectInput.js +9 -5
- package/legacy/Slider/Slider.js +9 -86
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/legacy/Tabs/Tabs.js +1 -4
- package/legacy/index.js +1 -1
- package/legacy/useTouchRipple/useTouchRipple.js +4 -4
- package/modern/Button/Button.js +4 -1
- package/modern/ButtonGroup/ButtonGroup.js +86 -54
- package/modern/ButtonGroup/ButtonGroupButtonContext.js +9 -0
- package/modern/ButtonGroup/buttonGroupClasses.js +1 -1
- package/modern/CircularProgress/CircularProgress.js +1 -1
- package/modern/ImageListItem/ImageListItem.js +2 -1
- package/modern/InputBase/InputBase.js +1 -1
- package/modern/InputLabel/InputLabel.js +2 -1
- package/modern/Modal/Modal.js +1 -1
- package/modern/Radio/Radio.js +3 -2
- package/modern/Radio/radioClasses.js +1 -1
- package/modern/Select/SelectInput.js +8 -5
- package/modern/Slider/Slider.js +9 -86
- package/modern/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/modern/Tabs/Tabs.js +1 -4
- package/modern/index.js +1 -1
- package/node/Button/Button.js +4 -1
- package/node/ButtonGroup/ButtonGroup.js +86 -54
- package/node/ButtonGroup/ButtonGroupButtonContext.js +18 -0
- package/node/ButtonGroup/buttonGroupClasses.js +1 -1
- package/node/CircularProgress/CircularProgress.js +1 -1
- package/node/ImageListItem/ImageListItem.js +2 -1
- package/node/InputBase/InputBase.js +1 -1
- package/node/InputLabel/InputLabel.js +2 -1
- package/node/Modal/Modal.js +1 -1
- package/node/Radio/Radio.js +3 -2
- package/node/Radio/radioClasses.js +1 -1
- package/node/Select/SelectInput.js +9 -5
- package/node/Slider/Slider.js +3 -73
- package/node/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/node/Tabs/Tabs.js +1 -4
- package/node/index.js +1 -1
- package/node/useTouchRipple/useTouchRipple.js +4 -4
- package/package.json +16 -16
- package/umd/material-ui.development.js +258 -254
- package/umd/material-ui.production.min.js +18 -18
- package/useTouchRipple/useTouchRipple.js +4 -4
|
@@ -13,6 +13,7 @@ import styled from '../styles/styled';
|
|
|
13
13
|
import useThemeProps from '../styles/useThemeProps';
|
|
14
14
|
import buttonGroupClasses, { getButtonGroupUtilityClass } from './buttonGroupClasses';
|
|
15
15
|
import ButtonGroupContext from './ButtonGroupContext';
|
|
16
|
+
import ButtonGroupButtonContext from './ButtonGroupButtonContext';
|
|
16
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
18
|
const overridesResolver = (props, styles) => {
|
|
18
19
|
const {
|
|
@@ -28,6 +29,12 @@ const overridesResolver = (props, styles) => {
|
|
|
28
29
|
[`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.variant)}${capitalize(ownerState.orientation)}`]
|
|
29
30
|
}, {
|
|
30
31
|
[`& .${buttonGroupClasses.grouped}`]: styles[`grouped${capitalize(ownerState.variant)}${capitalize(ownerState.color)}`]
|
|
32
|
+
}, {
|
|
33
|
+
[`& .${buttonGroupClasses.firstButton}`]: styles.firstButton
|
|
34
|
+
}, {
|
|
35
|
+
[`& .${buttonGroupClasses.lastButton}`]: styles.lastButton
|
|
36
|
+
}, {
|
|
37
|
+
[`& .${buttonGroupClasses.middleButton}`]: styles.middleButton
|
|
31
38
|
}, styles.root, styles[ownerState.variant], ownerState.disableElevation === true && styles.disableElevation, ownerState.fullWidth && styles.fullWidth, ownerState.orientation === 'vertical' && styles.vertical];
|
|
32
39
|
};
|
|
33
40
|
const useUtilityClasses = ownerState => {
|
|
@@ -42,7 +49,10 @@ const useUtilityClasses = ownerState => {
|
|
|
42
49
|
} = ownerState;
|
|
43
50
|
const slots = {
|
|
44
51
|
root: ['root', variant, orientation === 'vertical' && 'vertical', fullWidth && 'fullWidth', disableElevation && 'disableElevation'],
|
|
45
|
-
grouped: ['grouped', `grouped${capitalize(orientation)}`, `grouped${capitalize(variant)}`, `grouped${capitalize(variant)}${capitalize(orientation)}`, `grouped${capitalize(variant)}${capitalize(color)}`, disabled && 'disabled']
|
|
52
|
+
grouped: ['grouped', `grouped${capitalize(orientation)}`, `grouped${capitalize(variant)}`, `grouped${capitalize(variant)}${capitalize(orientation)}`, `grouped${capitalize(variant)}${capitalize(color)}`, disabled && 'disabled'],
|
|
53
|
+
firstButton: ['firstButton'],
|
|
54
|
+
lastButton: ['lastButton'],
|
|
55
|
+
middleButton: ['middleButton']
|
|
46
56
|
};
|
|
47
57
|
return composeClasses(slots, getButtonGroupUtilityClass, classes);
|
|
48
58
|
};
|
|
@@ -67,63 +77,63 @@ const ButtonGroupRoot = styled('div', {
|
|
|
67
77
|
}, {
|
|
68
78
|
[`& .${buttonGroupClasses.grouped}`]: _extends({
|
|
69
79
|
minWidth: 40,
|
|
70
|
-
'&:not(:first-of-type)': _extends({}, ownerState.orientation === 'horizontal' && {
|
|
71
|
-
borderTopLeftRadius: 0,
|
|
72
|
-
borderBottomLeftRadius: 0
|
|
73
|
-
}, ownerState.orientation === 'vertical' && {
|
|
74
|
-
borderTopRightRadius: 0,
|
|
75
|
-
borderTopLeftRadius: 0
|
|
76
|
-
}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
77
|
-
marginLeft: -1
|
|
78
|
-
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
79
|
-
marginTop: -1
|
|
80
|
-
}),
|
|
81
|
-
'&:not(:last-of-type)': _extends({}, ownerState.orientation === 'horizontal' && {
|
|
82
|
-
borderTopRightRadius: 0,
|
|
83
|
-
borderBottomRightRadius: 0
|
|
84
|
-
}, ownerState.orientation === 'vertical' && {
|
|
85
|
-
borderBottomRightRadius: 0,
|
|
86
|
-
borderBottomLeftRadius: 0
|
|
87
|
-
}, ownerState.variant === 'text' && ownerState.orientation === 'horizontal' && {
|
|
88
|
-
borderRight: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
|
|
89
|
-
[`&.${buttonGroupClasses.disabled}`]: {
|
|
90
|
-
borderRight: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
91
|
-
}
|
|
92
|
-
}, ownerState.variant === 'text' && ownerState.orientation === 'vertical' && {
|
|
93
|
-
borderBottom: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
|
|
94
|
-
[`&.${buttonGroupClasses.disabled}`]: {
|
|
95
|
-
borderBottom: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
96
|
-
}
|
|
97
|
-
}, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
|
|
98
|
-
borderColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : alpha(theme.palette[ownerState.color].main, 0.5)
|
|
99
|
-
}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
100
|
-
borderRightColor: 'transparent'
|
|
101
|
-
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
102
|
-
borderBottomColor: 'transparent'
|
|
103
|
-
}, ownerState.variant === 'contained' && ownerState.orientation === 'horizontal' && {
|
|
104
|
-
borderRight: `1px solid ${(theme.vars || theme).palette.grey[400]}`,
|
|
105
|
-
[`&.${buttonGroupClasses.disabled}`]: {
|
|
106
|
-
borderRight: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
107
|
-
}
|
|
108
|
-
}, ownerState.variant === 'contained' && ownerState.orientation === 'vertical' && {
|
|
109
|
-
borderBottom: `1px solid ${(theme.vars || theme).palette.grey[400]}`,
|
|
110
|
-
[`&.${buttonGroupClasses.disabled}`]: {
|
|
111
|
-
borderBottom: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
112
|
-
}
|
|
113
|
-
}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
|
|
114
|
-
borderColor: (theme.vars || theme).palette[ownerState.color].dark
|
|
115
|
-
}, {
|
|
116
|
-
'&:hover': _extends({}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
117
|
-
borderRightColor: 'currentColor'
|
|
118
|
-
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
119
|
-
borderBottomColor: 'currentColor'
|
|
120
|
-
})
|
|
121
|
-
}),
|
|
122
80
|
'&:hover': _extends({}, ownerState.variant === 'contained' && {
|
|
123
81
|
boxShadow: 'none'
|
|
124
82
|
})
|
|
125
83
|
}, ownerState.variant === 'contained' && {
|
|
126
84
|
boxShadow: 'none'
|
|
85
|
+
}),
|
|
86
|
+
[`& .${buttonGroupClasses.firstButton},& .${buttonGroupClasses.middleButton}`]: _extends({}, ownerState.orientation === 'horizontal' && {
|
|
87
|
+
borderTopRightRadius: 0,
|
|
88
|
+
borderBottomRightRadius: 0
|
|
89
|
+
}, ownerState.orientation === 'vertical' && {
|
|
90
|
+
borderBottomRightRadius: 0,
|
|
91
|
+
borderBottomLeftRadius: 0
|
|
92
|
+
}, ownerState.variant === 'text' && ownerState.orientation === 'horizontal' && {
|
|
93
|
+
borderRight: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
|
|
94
|
+
[`&.${buttonGroupClasses.disabled}`]: {
|
|
95
|
+
borderRight: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
96
|
+
}
|
|
97
|
+
}, ownerState.variant === 'text' && ownerState.orientation === 'vertical' && {
|
|
98
|
+
borderBottom: theme.vars ? `1px solid rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`,
|
|
99
|
+
[`&.${buttonGroupClasses.disabled}`]: {
|
|
100
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
101
|
+
}
|
|
102
|
+
}, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
|
|
103
|
+
borderColor: theme.vars ? `rgba(${theme.vars.palette[ownerState.color].mainChannel} / 0.5)` : alpha(theme.palette[ownerState.color].main, 0.5)
|
|
104
|
+
}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
105
|
+
borderRightColor: 'transparent'
|
|
106
|
+
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
107
|
+
borderBottomColor: 'transparent'
|
|
108
|
+
}, ownerState.variant === 'contained' && ownerState.orientation === 'horizontal' && {
|
|
109
|
+
borderRight: `1px solid ${(theme.vars || theme).palette.grey[400]}`,
|
|
110
|
+
[`&.${buttonGroupClasses.disabled}`]: {
|
|
111
|
+
borderRight: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
112
|
+
}
|
|
113
|
+
}, ownerState.variant === 'contained' && ownerState.orientation === 'vertical' && {
|
|
114
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.grey[400]}`,
|
|
115
|
+
[`&.${buttonGroupClasses.disabled}`]: {
|
|
116
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
117
|
+
}
|
|
118
|
+
}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
|
|
119
|
+
borderColor: (theme.vars || theme).palette[ownerState.color].dark
|
|
120
|
+
}, {
|
|
121
|
+
'&:hover': _extends({}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
122
|
+
borderRightColor: 'currentColor'
|
|
123
|
+
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
124
|
+
borderBottomColor: 'currentColor'
|
|
125
|
+
})
|
|
126
|
+
}),
|
|
127
|
+
[`& .${buttonGroupClasses.lastButton},& .${buttonGroupClasses.middleButton}`]: _extends({}, ownerState.orientation === 'horizontal' && {
|
|
128
|
+
borderTopLeftRadius: 0,
|
|
129
|
+
borderBottomLeftRadius: 0
|
|
130
|
+
}, ownerState.orientation === 'vertical' && {
|
|
131
|
+
borderTopRightRadius: 0,
|
|
132
|
+
borderTopLeftRadius: 0
|
|
133
|
+
}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
134
|
+
marginLeft: -1
|
|
135
|
+
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
136
|
+
marginTop: -1
|
|
127
137
|
})
|
|
128
138
|
}));
|
|
129
139
|
const ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps, ref) {
|
|
@@ -170,6 +180,20 @@ const ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps,
|
|
|
170
180
|
size,
|
|
171
181
|
variant
|
|
172
182
|
}), [color, disabled, disableElevation, disableFocusRipple, disableRipple, fullWidth, size, variant, classes.grouped]);
|
|
183
|
+
const getButtonPositionClassName = (index, childrenParam) => {
|
|
184
|
+
const isFirstButton = index === 0;
|
|
185
|
+
const isLastButton = index === React.Children.count(childrenParam) - 1;
|
|
186
|
+
if (isFirstButton && isLastButton) {
|
|
187
|
+
return '';
|
|
188
|
+
}
|
|
189
|
+
if (isFirstButton) {
|
|
190
|
+
return classes.firstButton;
|
|
191
|
+
}
|
|
192
|
+
if (isLastButton) {
|
|
193
|
+
return classes.lastButton;
|
|
194
|
+
}
|
|
195
|
+
return classes.middleButton;
|
|
196
|
+
};
|
|
173
197
|
return /*#__PURE__*/_jsx(ButtonGroupRoot, _extends({
|
|
174
198
|
as: component,
|
|
175
199
|
role: "group",
|
|
@@ -179,7 +203,15 @@ const ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps,
|
|
|
179
203
|
}, other, {
|
|
180
204
|
children: /*#__PURE__*/_jsx(ButtonGroupContext.Provider, {
|
|
181
205
|
value: context,
|
|
182
|
-
children: children
|
|
206
|
+
children: React.Children.map(children, (child, index) => {
|
|
207
|
+
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
208
|
+
return child;
|
|
209
|
+
}
|
|
210
|
+
return /*#__PURE__*/_jsx(ButtonGroupButtonContext.Provider, {
|
|
211
|
+
value: getButtonPositionClassName(index, children),
|
|
212
|
+
children: child
|
|
213
|
+
});
|
|
214
|
+
})
|
|
183
215
|
})
|
|
184
216
|
}));
|
|
185
217
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @ignore - internal component.
|
|
4
|
+
*/
|
|
5
|
+
const ButtonGroupButtonContext = /*#__PURE__*/React.createContext(undefined);
|
|
6
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
7
|
+
ButtonGroupButtonContext.displayName = 'ButtonGroupButtonContext';
|
|
8
|
+
}
|
|
9
|
+
export default ButtonGroupButtonContext;
|
|
@@ -11,6 +11,8 @@ export interface ButtonGroupClasses {
|
|
|
11
11
|
disableElevation: string;
|
|
12
12
|
/** State class applied to the child elements if `disabled={true}`. */
|
|
13
13
|
disabled: string;
|
|
14
|
+
/** Styles applied to the first button in the button group. */
|
|
15
|
+
firstButton: string;
|
|
14
16
|
/** Styles applied to the root element if `fullWidth={true}`. */
|
|
15
17
|
fullWidth: string;
|
|
16
18
|
/** Styles applied to the root element if `orientation="vertical"`. */
|
|
@@ -51,6 +53,10 @@ export interface ButtonGroupClasses {
|
|
|
51
53
|
groupedContainedPrimary: string;
|
|
52
54
|
/** Styles applied to the children if `variant="contained"` and `color="secondary"`. */
|
|
53
55
|
groupedContainedSecondary: string;
|
|
56
|
+
/** Styles applied to the last button in the button group. */
|
|
57
|
+
lastButton: string;
|
|
58
|
+
/** Styles applied to buttons in the middle of the button group. */
|
|
59
|
+
middleButton: string;
|
|
54
60
|
}
|
|
55
61
|
export type ButtonGroupClassKey = keyof ButtonGroupClasses;
|
|
56
62
|
export declare function getButtonGroupUtilityClass(slot: string): string;
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getButtonGroupUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiButtonGroup', slot);
|
|
5
5
|
}
|
|
6
|
-
const buttonGroupClasses = generateUtilityClasses('MuiButtonGroup', ['root', 'contained', 'outlined', 'text', 'disableElevation', 'disabled', 'fullWidth', 'vertical', 'grouped', 'groupedHorizontal', 'groupedVertical', 'groupedText', 'groupedTextHorizontal', 'groupedTextVertical', 'groupedTextPrimary', 'groupedTextSecondary', 'groupedOutlined', 'groupedOutlinedHorizontal', 'groupedOutlinedVertical', 'groupedOutlinedPrimary', 'groupedOutlinedSecondary', 'groupedContained', 'groupedContainedHorizontal', 'groupedContainedVertical', 'groupedContainedPrimary', 'groupedContainedSecondary']);
|
|
6
|
+
const buttonGroupClasses = generateUtilityClasses('MuiButtonGroup', ['root', 'contained', 'outlined', 'text', 'disableElevation', 'disabled', 'firstButton', 'fullWidth', 'vertical', 'grouped', 'groupedHorizontal', 'groupedVertical', 'groupedText', 'groupedTextHorizontal', 'groupedTextVertical', 'groupedTextPrimary', 'groupedTextSecondary', 'groupedOutlined', 'groupedOutlinedHorizontal', 'groupedOutlinedVertical', 'groupedOutlinedPrimary', 'groupedOutlinedSecondary', 'groupedContained', 'groupedContainedHorizontal', 'groupedContainedVertical', 'groupedContainedPrimary', 'groupedContainedSecondary', 'lastButton', 'middleButton']);
|
|
7
7
|
export default buttonGroupClasses;
|