@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,10 +13,11 @@ 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
|
var overridesResolver = function overridesResolver(props, styles) {
|
|
18
19
|
var ownerState = props.ownerState;
|
|
19
|
-
return [_defineProperty({}, "& .".concat(buttonGroupClasses.grouped), styles.grouped), _defineProperty({}, "& .".concat(buttonGroupClasses.grouped), styles["grouped".concat(capitalize(ownerState.orientation))]), _defineProperty({}, "& .".concat(buttonGroupClasses.grouped), styles["grouped".concat(capitalize(ownerState.variant))]), _defineProperty({}, "& .".concat(buttonGroupClasses.grouped), styles["grouped".concat(capitalize(ownerState.variant)).concat(capitalize(ownerState.orientation))]), _defineProperty({}, "& .".concat(buttonGroupClasses.grouped), styles["grouped".concat(capitalize(ownerState.variant)).concat(capitalize(ownerState.color))]), styles.root, styles[ownerState.variant], ownerState.disableElevation === true && styles.disableElevation, ownerState.fullWidth && styles.fullWidth, ownerState.orientation === 'vertical' && styles.vertical];
|
|
20
|
+
return [_defineProperty({}, "& .".concat(buttonGroupClasses.grouped), styles.grouped), _defineProperty({}, "& .".concat(buttonGroupClasses.grouped), styles["grouped".concat(capitalize(ownerState.orientation))]), _defineProperty({}, "& .".concat(buttonGroupClasses.grouped), styles["grouped".concat(capitalize(ownerState.variant))]), _defineProperty({}, "& .".concat(buttonGroupClasses.grouped), styles["grouped".concat(capitalize(ownerState.variant)).concat(capitalize(ownerState.orientation))]), _defineProperty({}, "& .".concat(buttonGroupClasses.grouped), styles["grouped".concat(capitalize(ownerState.variant)).concat(capitalize(ownerState.color))]), _defineProperty({}, "& .".concat(buttonGroupClasses.firstButton), styles.firstButton), _defineProperty({}, "& .".concat(buttonGroupClasses.lastButton), styles.lastButton), _defineProperty({}, "& .".concat(buttonGroupClasses.middleButton), styles.middleButton), styles.root, styles[ownerState.variant], ownerState.disableElevation === true && styles.disableElevation, ownerState.fullWidth && styles.fullWidth, ownerState.orientation === 'vertical' && styles.vertical];
|
|
20
21
|
};
|
|
21
22
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
22
23
|
var classes = ownerState.classes,
|
|
@@ -28,7 +29,10 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
28
29
|
variant = ownerState.variant;
|
|
29
30
|
var slots = {
|
|
30
31
|
root: ['root', variant, orientation === 'vertical' && 'vertical', fullWidth && 'fullWidth', disableElevation && 'disableElevation'],
|
|
31
|
-
grouped: ['grouped', "grouped".concat(capitalize(orientation)), "grouped".concat(capitalize(variant)), "grouped".concat(capitalize(variant)).concat(capitalize(orientation)), "grouped".concat(capitalize(variant)).concat(capitalize(color)), disabled && 'disabled']
|
|
32
|
+
grouped: ['grouped', "grouped".concat(capitalize(orientation)), "grouped".concat(capitalize(variant)), "grouped".concat(capitalize(variant)).concat(capitalize(orientation)), "grouped".concat(capitalize(variant)).concat(capitalize(color)), disabled && 'disabled'],
|
|
33
|
+
firstButton: ['firstButton'],
|
|
34
|
+
lastButton: ['lastButton'],
|
|
35
|
+
middleButton: ['middleButton']
|
|
32
36
|
};
|
|
33
37
|
return composeClasses(slots, getButtonGroupUtilityClass, classes);
|
|
34
38
|
};
|
|
@@ -36,9 +40,10 @@ var ButtonGroupRoot = styled('div', {
|
|
|
36
40
|
name: 'MuiButtonGroup',
|
|
37
41
|
slot: 'Root',
|
|
38
42
|
overridesResolver: overridesResolver
|
|
39
|
-
})(function (
|
|
40
|
-
var
|
|
41
|
-
|
|
43
|
+
})(function (_ref9) {
|
|
44
|
+
var _extends2;
|
|
45
|
+
var theme = _ref9.theme,
|
|
46
|
+
ownerState = _ref9.ownerState;
|
|
42
47
|
return _extends({
|
|
43
48
|
display: 'inline-flex',
|
|
44
49
|
borderRadius: (theme.vars || theme).shape.borderRadius
|
|
@@ -50,62 +55,60 @@ var ButtonGroupRoot = styled('div', {
|
|
|
50
55
|
width: '100%'
|
|
51
56
|
}, ownerState.orientation === 'vertical' && {
|
|
52
57
|
flexDirection: 'column'
|
|
53
|
-
},
|
|
58
|
+
}, (_extends2 = {}, _defineProperty(_extends2, "& .".concat(buttonGroupClasses.grouped), _extends({
|
|
54
59
|
minWidth: 40,
|
|
55
|
-
'&:not(:first-of-type)': _extends({}, ownerState.orientation === 'horizontal' && {
|
|
56
|
-
borderTopLeftRadius: 0,
|
|
57
|
-
borderBottomLeftRadius: 0
|
|
58
|
-
}, ownerState.orientation === 'vertical' && {
|
|
59
|
-
borderTopRightRadius: 0,
|
|
60
|
-
borderTopLeftRadius: 0
|
|
61
|
-
}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
62
|
-
marginLeft: -1
|
|
63
|
-
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
64
|
-
marginTop: -1
|
|
65
|
-
}),
|
|
66
|
-
'&:not(:last-of-type)': _extends({}, ownerState.orientation === 'horizontal' && {
|
|
67
|
-
borderTopRightRadius: 0,
|
|
68
|
-
borderBottomRightRadius: 0
|
|
69
|
-
}, ownerState.orientation === 'vertical' && {
|
|
70
|
-
borderBottomRightRadius: 0,
|
|
71
|
-
borderBottomLeftRadius: 0
|
|
72
|
-
}, ownerState.variant === 'text' && ownerState.orientation === 'horizontal' && _defineProperty({
|
|
73
|
-
borderRight: theme.vars ? "1px solid rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.23)") : "1px solid ".concat(theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')
|
|
74
|
-
}, "&.".concat(buttonGroupClasses.disabled), {
|
|
75
|
-
borderRight: "1px solid ".concat((theme.vars || theme).palette.action.disabled)
|
|
76
|
-
}), ownerState.variant === 'text' && ownerState.orientation === 'vertical' && _defineProperty({
|
|
77
|
-
borderBottom: theme.vars ? "1px solid rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.23)") : "1px solid ".concat(theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')
|
|
78
|
-
}, "&.".concat(buttonGroupClasses.disabled), {
|
|
79
|
-
borderBottom: "1px solid ".concat((theme.vars || theme).palette.action.disabled)
|
|
80
|
-
}), ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
|
|
81
|
-
borderColor: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.5)") : alpha(theme.palette[ownerState.color].main, 0.5)
|
|
82
|
-
}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
83
|
-
borderRightColor: 'transparent'
|
|
84
|
-
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
85
|
-
borderBottomColor: 'transparent'
|
|
86
|
-
}, ownerState.variant === 'contained' && ownerState.orientation === 'horizontal' && _defineProperty({
|
|
87
|
-
borderRight: "1px solid ".concat((theme.vars || theme).palette.grey[400])
|
|
88
|
-
}, "&.".concat(buttonGroupClasses.disabled), {
|
|
89
|
-
borderRight: "1px solid ".concat((theme.vars || theme).palette.action.disabled)
|
|
90
|
-
}), ownerState.variant === 'contained' && ownerState.orientation === 'vertical' && _defineProperty({
|
|
91
|
-
borderBottom: "1px solid ".concat((theme.vars || theme).palette.grey[400])
|
|
92
|
-
}, "&.".concat(buttonGroupClasses.disabled), {
|
|
93
|
-
borderBottom: "1px solid ".concat((theme.vars || theme).palette.action.disabled)
|
|
94
|
-
}), ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
|
|
95
|
-
borderColor: (theme.vars || theme).palette[ownerState.color].dark
|
|
96
|
-
}, {
|
|
97
|
-
'&:hover': _extends({}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
98
|
-
borderRightColor: 'currentColor'
|
|
99
|
-
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
100
|
-
borderBottomColor: 'currentColor'
|
|
101
|
-
})
|
|
102
|
-
}),
|
|
103
60
|
'&:hover': _extends({}, ownerState.variant === 'contained' && {
|
|
104
61
|
boxShadow: 'none'
|
|
105
62
|
})
|
|
106
63
|
}, ownerState.variant === 'contained' && {
|
|
107
64
|
boxShadow: 'none'
|
|
108
|
-
})))
|
|
65
|
+
})), _defineProperty(_extends2, "& .".concat(buttonGroupClasses.firstButton, ",& .").concat(buttonGroupClasses.middleButton), _extends({}, ownerState.orientation === 'horizontal' && {
|
|
66
|
+
borderTopRightRadius: 0,
|
|
67
|
+
borderBottomRightRadius: 0
|
|
68
|
+
}, ownerState.orientation === 'vertical' && {
|
|
69
|
+
borderBottomRightRadius: 0,
|
|
70
|
+
borderBottomLeftRadius: 0
|
|
71
|
+
}, ownerState.variant === 'text' && ownerState.orientation === 'horizontal' && _defineProperty({
|
|
72
|
+
borderRight: theme.vars ? "1px solid rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.23)") : "1px solid ".concat(theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')
|
|
73
|
+
}, "&.".concat(buttonGroupClasses.disabled), {
|
|
74
|
+
borderRight: "1px solid ".concat((theme.vars || theme).palette.action.disabled)
|
|
75
|
+
}), ownerState.variant === 'text' && ownerState.orientation === 'vertical' && _defineProperty({
|
|
76
|
+
borderBottom: theme.vars ? "1px solid rgba(".concat(theme.vars.palette.common.onBackgroundChannel, " / 0.23)") : "1px solid ".concat(theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)')
|
|
77
|
+
}, "&.".concat(buttonGroupClasses.disabled), {
|
|
78
|
+
borderBottom: "1px solid ".concat((theme.vars || theme).palette.action.disabled)
|
|
79
|
+
}), ownerState.variant === 'text' && ownerState.color !== 'inherit' && {
|
|
80
|
+
borderColor: theme.vars ? "rgba(".concat(theme.vars.palette[ownerState.color].mainChannel, " / 0.5)") : alpha(theme.palette[ownerState.color].main, 0.5)
|
|
81
|
+
}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
82
|
+
borderRightColor: 'transparent'
|
|
83
|
+
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
84
|
+
borderBottomColor: 'transparent'
|
|
85
|
+
}, ownerState.variant === 'contained' && ownerState.orientation === 'horizontal' && _defineProperty({
|
|
86
|
+
borderRight: "1px solid ".concat((theme.vars || theme).palette.grey[400])
|
|
87
|
+
}, "&.".concat(buttonGroupClasses.disabled), {
|
|
88
|
+
borderRight: "1px solid ".concat((theme.vars || theme).palette.action.disabled)
|
|
89
|
+
}), ownerState.variant === 'contained' && ownerState.orientation === 'vertical' && _defineProperty({
|
|
90
|
+
borderBottom: "1px solid ".concat((theme.vars || theme).palette.grey[400])
|
|
91
|
+
}, "&.".concat(buttonGroupClasses.disabled), {
|
|
92
|
+
borderBottom: "1px solid ".concat((theme.vars || theme).palette.action.disabled)
|
|
93
|
+
}), ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {
|
|
94
|
+
borderColor: (theme.vars || theme).palette[ownerState.color].dark
|
|
95
|
+
}, {
|
|
96
|
+
'&:hover': _extends({}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
97
|
+
borderRightColor: 'currentColor'
|
|
98
|
+
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
99
|
+
borderBottomColor: 'currentColor'
|
|
100
|
+
})
|
|
101
|
+
})), _defineProperty(_extends2, "& .".concat(buttonGroupClasses.lastButton, ",& .").concat(buttonGroupClasses.middleButton), _extends({}, ownerState.orientation === 'horizontal' && {
|
|
102
|
+
borderTopLeftRadius: 0,
|
|
103
|
+
borderBottomLeftRadius: 0
|
|
104
|
+
}, ownerState.orientation === 'vertical' && {
|
|
105
|
+
borderTopRightRadius: 0,
|
|
106
|
+
borderTopLeftRadius: 0
|
|
107
|
+
}, ownerState.variant === 'outlined' && ownerState.orientation === 'horizontal' && {
|
|
108
|
+
marginLeft: -1
|
|
109
|
+
}, ownerState.variant === 'outlined' && ownerState.orientation === 'vertical' && {
|
|
110
|
+
marginTop: -1
|
|
111
|
+
})), _extends2));
|
|
109
112
|
});
|
|
110
113
|
var ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps, ref) {
|
|
111
114
|
var props = useThemeProps({
|
|
@@ -161,6 +164,20 @@ var ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps, re
|
|
|
161
164
|
variant: variant
|
|
162
165
|
};
|
|
163
166
|
}, [color, disabled, disableElevation, disableFocusRipple, disableRipple, fullWidth, size, variant, classes.grouped]);
|
|
167
|
+
var getButtonPositionClassName = function getButtonPositionClassName(index, childrenParam) {
|
|
168
|
+
var isFirstButton = index === 0;
|
|
169
|
+
var isLastButton = index === React.Children.count(childrenParam) - 1;
|
|
170
|
+
if (isFirstButton && isLastButton) {
|
|
171
|
+
return '';
|
|
172
|
+
}
|
|
173
|
+
if (isFirstButton) {
|
|
174
|
+
return classes.firstButton;
|
|
175
|
+
}
|
|
176
|
+
if (isLastButton) {
|
|
177
|
+
return classes.lastButton;
|
|
178
|
+
}
|
|
179
|
+
return classes.middleButton;
|
|
180
|
+
};
|
|
164
181
|
return /*#__PURE__*/_jsx(ButtonGroupRoot, _extends({
|
|
165
182
|
as: component,
|
|
166
183
|
role: "group",
|
|
@@ -170,7 +187,15 @@ var ButtonGroup = /*#__PURE__*/React.forwardRef(function ButtonGroup(inProps, re
|
|
|
170
187
|
}, other, {
|
|
171
188
|
children: /*#__PURE__*/_jsx(ButtonGroupContext.Provider, {
|
|
172
189
|
value: context,
|
|
173
|
-
children: children
|
|
190
|
+
children: React.Children.map(children, function (child, index) {
|
|
191
|
+
if (! /*#__PURE__*/React.isValidElement(child)) {
|
|
192
|
+
return child;
|
|
193
|
+
}
|
|
194
|
+
return /*#__PURE__*/_jsx(ButtonGroupButtonContext.Provider, {
|
|
195
|
+
value: getButtonPositionClassName(index, children),
|
|
196
|
+
children: child
|
|
197
|
+
});
|
|
198
|
+
})
|
|
174
199
|
})
|
|
175
200
|
}));
|
|
176
201
|
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* @ignore - internal component.
|
|
4
|
+
*/
|
|
5
|
+
var ButtonGroupButtonContext = /*#__PURE__*/React.createContext(undefined);
|
|
6
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
7
|
+
ButtonGroupButtonContext.displayName = 'ButtonGroupButtonContext';
|
|
8
|
+
}
|
|
9
|
+
export default ButtonGroupButtonContext;
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getButtonGroupUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiButtonGroup', slot);
|
|
5
5
|
}
|
|
6
|
-
var 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
|
+
var 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;
|
|
@@ -192,7 +192,7 @@ process.env.NODE_ENV !== "production" ? CircularProgress.propTypes /* remove-pro
|
|
|
192
192
|
/**
|
|
193
193
|
* The size of the component.
|
|
194
194
|
* If using a number, the pixel unit is assumed.
|
|
195
|
-
* If using a string, you need to provide the CSS unit, e.g '3rem'.
|
|
195
|
+
* If using a string, you need to provide the CSS unit, e.g. '3rem'.
|
|
196
196
|
* @default 40
|
|
197
197
|
*/
|
|
198
198
|
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -101,7 +101,8 @@ var ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(inProps
|
|
|
101
101
|
height: height,
|
|
102
102
|
gridColumnEnd: variant !== 'masonry' ? "span ".concat(cols) : undefined,
|
|
103
103
|
gridRowEnd: variant !== 'masonry' ? "span ".concat(rows) : undefined,
|
|
104
|
-
marginBottom: variant === 'masonry' ? gap : undefined
|
|
104
|
+
marginBottom: variant === 'masonry' ? gap : undefined,
|
|
105
|
+
breakInside: variant === 'masonry' ? 'avoid' : undefined
|
|
105
106
|
}, style),
|
|
106
107
|
ownerState: ownerState
|
|
107
108
|
}, other, {
|
|
@@ -46,7 +46,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
46
46
|
startAdornment = ownerState.startAdornment,
|
|
47
47
|
type = ownerState.type;
|
|
48
48
|
var slots = {
|
|
49
|
-
root: ['root', "color".concat(capitalize(color)), disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size
|
|
49
|
+
root: ['root', "color".concat(capitalize(color)), disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size && size !== 'medium' && "size".concat(capitalize(size)), multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
|
|
50
50
|
input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
|
|
51
51
|
};
|
|
52
52
|
return composeClasses(slots, getInputBaseUtilityClass, classes);
|
|
@@ -11,6 +11,7 @@ import formControlState from '../FormControl/formControlState';
|
|
|
11
11
|
import useFormControl from '../FormControl/useFormControl';
|
|
12
12
|
import FormLabel, { formLabelClasses } from '../FormLabel';
|
|
13
13
|
import useThemeProps from '../styles/useThemeProps';
|
|
14
|
+
import capitalize from '../utils/capitalize';
|
|
14
15
|
import styled, { rootShouldForwardProp } from '../styles/styled';
|
|
15
16
|
import { getInputLabelUtilityClasses } from './inputLabelClasses';
|
|
16
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -23,7 +24,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
23
24
|
variant = ownerState.variant,
|
|
24
25
|
required = ownerState.required;
|
|
25
26
|
var slots = {
|
|
26
|
-
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size
|
|
27
|
+
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && "size".concat(capitalize(size)), variant],
|
|
27
28
|
asterisk: [required && 'asterisk']
|
|
28
29
|
};
|
|
29
30
|
var composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);
|
package/legacy/Modal/Modal.js
CHANGED
|
@@ -109,11 +109,13 @@ var Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
|
|
|
109
109
|
keepMounted = _props$keepMounted === void 0 ? false : _props$keepMounted,
|
|
110
110
|
onBackdropClick = props.onBackdropClick,
|
|
111
111
|
onClose = props.onClose,
|
|
112
|
+
onTransitionEnter = props.onTransitionEnter,
|
|
113
|
+
onTransitionExited = props.onTransitionExited,
|
|
112
114
|
open = props.open,
|
|
113
115
|
slotProps = props.slotProps,
|
|
114
116
|
slots = props.slots,
|
|
115
117
|
theme = props.theme,
|
|
116
|
-
other = _objectWithoutProperties(props, ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "open", "slotProps", "slots", "theme"]);
|
|
118
|
+
other = _objectWithoutProperties(props, ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onTransitionEnter", "onTransitionExited", "open", "slotProps", "slots", "theme"]);
|
|
117
119
|
var propsWithDefaults = _extends({}, props, {
|
|
118
120
|
closeAfterTransition: closeAfterTransition,
|
|
119
121
|
disableAutoFocus: disableAutoFocus,
|
package/legacy/Radio/Radio.js
CHANGED
|
@@ -21,9 +21,10 @@ import styled, { rootShouldForwardProp } from '../styles/styled';
|
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
23
23
|
var classes = ownerState.classes,
|
|
24
|
-
color = ownerState.color
|
|
24
|
+
color = ownerState.color,
|
|
25
|
+
size = ownerState.size;
|
|
25
26
|
var slots = {
|
|
26
|
-
root: ['root', "color".concat(capitalize(color))]
|
|
27
|
+
root: ['root', "color".concat(capitalize(color)), size !== 'medium' && "size".concat(capitalize(size))]
|
|
27
28
|
};
|
|
28
29
|
return _extends({}, classes, composeClasses(slots, getRadioUtilityClass, classes));
|
|
29
30
|
};
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getRadioUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiRadio', slot);
|
|
5
5
|
}
|
|
6
|
-
var radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary']);
|
|
6
|
+
var radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);
|
|
7
7
|
export default radioClasses;
|
|
@@ -97,6 +97,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
97
97
|
* @ignore - internal component.
|
|
98
98
|
*/
|
|
99
99
|
var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref) {
|
|
100
|
+
var _MenuProps$slotProps;
|
|
100
101
|
var ariaDescribedby = props['aria-describedby'],
|
|
101
102
|
ariaLabel = props['aria-label'],
|
|
102
103
|
autoFocus = props.autoFocus,
|
|
@@ -443,6 +444,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
|
|
|
443
444
|
error: error
|
|
444
445
|
});
|
|
445
446
|
var classes = useUtilityClasses(ownerState);
|
|
447
|
+
var paperProps = _extends({}, MenuProps.PaperProps, (_MenuProps$slotProps = MenuProps.slotProps) == null ? void 0 : _MenuProps$slotProps.paper);
|
|
446
448
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
447
449
|
children: [/*#__PURE__*/_jsx(SelectSelect, _extends({
|
|
448
450
|
ref: handleDisplayRef,
|
|
@@ -504,11 +506,13 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
|
|
|
504
506
|
role: 'listbox',
|
|
505
507
|
disableListWrap: true
|
|
506
508
|
}, MenuProps.MenuListProps),
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
509
|
+
slotProps: {
|
|
510
|
+
paper: _extends({}, paperProps, {
|
|
511
|
+
style: _extends({
|
|
512
|
+
minWidth: menuMinWidth
|
|
513
|
+
}, paperProps != null ? paperProps.style : null)
|
|
514
|
+
})
|
|
515
|
+
},
|
|
512
516
|
children: items
|
|
513
517
|
}))]
|
|
514
518
|
});
|
package/legacy/Slider/Slider.js
CHANGED
|
@@ -15,14 +15,14 @@ import styled, { slotShouldForwardProp } from '../styles/styled';
|
|
|
15
15
|
import useTheme from '../styles/useTheme';
|
|
16
16
|
import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
|
|
17
17
|
import capitalize from '../utils/capitalize';
|
|
18
|
-
import
|
|
18
|
+
import BaseSliderValueLabel from './SliderValueLabel';
|
|
19
19
|
import sliderClasses, { getSliderUtilityClass } from './sliderClasses';
|
|
20
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
22
|
function Identity(x) {
|
|
23
23
|
return x;
|
|
24
24
|
}
|
|
25
|
-
var SliderRoot = styled('span', {
|
|
25
|
+
export var SliderRoot = styled('span', {
|
|
26
26
|
name: 'MuiSlider',
|
|
27
27
|
slot: 'Root',
|
|
28
28
|
overridesResolver: function overridesResolver(props, styles) {
|
|
@@ -80,18 +80,7 @@ var SliderRoot = styled('span', {
|
|
|
80
80
|
transition: 'none'
|
|
81
81
|
})), _extends2));
|
|
82
82
|
});
|
|
83
|
-
|
|
84
|
-
// ----------------------------- Warning --------------------------------
|
|
85
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
86
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
87
|
-
// ----------------------------------------------------------------------
|
|
88
|
-
/**
|
|
89
|
-
* @ignore
|
|
90
|
-
*/
|
|
91
|
-
children: PropTypes.node
|
|
92
|
-
} : void 0;
|
|
93
|
-
export { SliderRoot };
|
|
94
|
-
var SliderRail = styled('span', {
|
|
83
|
+
export var SliderRail = styled('span', {
|
|
95
84
|
name: 'MuiSlider',
|
|
96
85
|
slot: 'Rail',
|
|
97
86
|
overridesResolver: function overridesResolver(props, styles) {
|
|
@@ -119,18 +108,7 @@ var SliderRail = styled('span', {
|
|
|
119
108
|
opacity: 1
|
|
120
109
|
});
|
|
121
110
|
});
|
|
122
|
-
|
|
123
|
-
// ----------------------------- Warning --------------------------------
|
|
124
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
125
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
126
|
-
// ----------------------------------------------------------------------
|
|
127
|
-
/**
|
|
128
|
-
* @ignore
|
|
129
|
-
*/
|
|
130
|
-
children: PropTypes.node
|
|
131
|
-
} : void 0;
|
|
132
|
-
export { SliderRail };
|
|
133
|
-
var SliderTrack = styled('span', {
|
|
111
|
+
export var SliderTrack = styled('span', {
|
|
134
112
|
name: 'MuiSlider',
|
|
135
113
|
slot: 'Track',
|
|
136
114
|
overridesResolver: function overridesResolver(props, styles) {
|
|
@@ -168,18 +146,7 @@ var SliderTrack = styled('span', {
|
|
|
168
146
|
borderColor: theme.vars ? theme.vars.palette.Slider["".concat(ownerState.color, "Track")] : color
|
|
169
147
|
});
|
|
170
148
|
});
|
|
171
|
-
|
|
172
|
-
// ----------------------------- Warning --------------------------------
|
|
173
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
174
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
175
|
-
// ----------------------------------------------------------------------
|
|
176
|
-
/**
|
|
177
|
-
* @ignore
|
|
178
|
-
*/
|
|
179
|
-
children: PropTypes.node
|
|
180
|
-
} : void 0;
|
|
181
|
-
export { SliderTrack };
|
|
182
|
-
var SliderThumb = styled('span', {
|
|
149
|
+
export var SliderThumb = styled('span', {
|
|
183
150
|
name: 'MuiSlider',
|
|
184
151
|
slot: 'Thumb',
|
|
185
152
|
overridesResolver: function overridesResolver(props, styles) {
|
|
@@ -248,18 +215,7 @@ var SliderThumb = styled('span', {
|
|
|
248
215
|
}
|
|
249
216
|
}), _extends3));
|
|
250
217
|
});
|
|
251
|
-
|
|
252
|
-
// ----------------------------- Warning --------------------------------
|
|
253
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
254
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
255
|
-
// ----------------------------------------------------------------------
|
|
256
|
-
/**
|
|
257
|
-
* @ignore
|
|
258
|
-
*/
|
|
259
|
-
children: PropTypes.node
|
|
260
|
-
} : void 0;
|
|
261
|
-
export { SliderThumb };
|
|
262
|
-
var StyledSliderValueLabel = styled(SliderValueLabel, {
|
|
218
|
+
export var SliderValueLabel = styled(BaseSliderValueLabel, {
|
|
263
219
|
name: 'MuiSlider',
|
|
264
220
|
slot: 'ValueLabel',
|
|
265
221
|
overridesResolver: function overridesResolver(props, styles) {
|
|
@@ -317,18 +273,7 @@ var StyledSliderValueLabel = styled(SliderValueLabel, {
|
|
|
317
273
|
padding: '0.25rem 0.5rem'
|
|
318
274
|
});
|
|
319
275
|
});
|
|
320
|
-
|
|
321
|
-
// ----------------------------- Warning --------------------------------
|
|
322
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
323
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
324
|
-
// ----------------------------------------------------------------------
|
|
325
|
-
/**
|
|
326
|
-
* @ignore
|
|
327
|
-
*/
|
|
328
|
-
children: PropTypes.node
|
|
329
|
-
} : void 0;
|
|
330
|
-
export { StyledSliderValueLabel as SliderValueLabel };
|
|
331
|
-
var SliderMark = styled('span', {
|
|
276
|
+
export var SliderMark = styled('span', {
|
|
332
277
|
name: 'MuiSlider',
|
|
333
278
|
slot: 'Mark',
|
|
334
279
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -359,18 +304,7 @@ var SliderMark = styled('span', {
|
|
|
359
304
|
opacity: 0.8
|
|
360
305
|
});
|
|
361
306
|
});
|
|
362
|
-
|
|
363
|
-
// ----------------------------- Warning --------------------------------
|
|
364
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
365
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
366
|
-
// ----------------------------------------------------------------------
|
|
367
|
-
/**
|
|
368
|
-
* @ignore
|
|
369
|
-
*/
|
|
370
|
-
children: PropTypes.node
|
|
371
|
-
} : void 0;
|
|
372
|
-
export { SliderMark };
|
|
373
|
-
var SliderMarkLabel = styled('span', {
|
|
307
|
+
export var SliderMarkLabel = styled('span', {
|
|
374
308
|
name: 'MuiSlider',
|
|
375
309
|
slot: 'MarkLabel',
|
|
376
310
|
shouldForwardProp: function shouldForwardProp(prop) {
|
|
@@ -403,17 +337,6 @@ var SliderMarkLabel = styled('span', {
|
|
|
403
337
|
color: (theme.vars || theme).palette.text.primary
|
|
404
338
|
});
|
|
405
339
|
});
|
|
406
|
-
process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes /* remove-proptypes */ = {
|
|
407
|
-
// ----------------------------- Warning --------------------------------
|
|
408
|
-
// | These PropTypes are generated from the TypeScript type definitions |
|
|
409
|
-
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
410
|
-
// ----------------------------------------------------------------------
|
|
411
|
-
/**
|
|
412
|
-
* @ignore
|
|
413
|
-
*/
|
|
414
|
-
children: PropTypes.node
|
|
415
|
-
} : void 0;
|
|
416
|
-
export { SliderMarkLabel };
|
|
417
340
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
418
341
|
var disabled = ownerState.disabled,
|
|
419
342
|
dragging = ownerState.dragging,
|
|
@@ -545,7 +468,7 @@ var Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
545
468
|
var RailSlot = (_ref10 = (_slots$rail = slots == null ? void 0 : slots.rail) != null ? _slots$rail : components.Rail) != null ? _ref10 : SliderRail;
|
|
546
469
|
var TrackSlot = (_ref11 = (_slots$track = slots == null ? void 0 : slots.track) != null ? _slots$track : components.Track) != null ? _ref11 : SliderTrack;
|
|
547
470
|
var ThumbSlot = (_ref12 = (_slots$thumb = slots == null ? void 0 : slots.thumb) != null ? _slots$thumb : components.Thumb) != null ? _ref12 : SliderThumb;
|
|
548
|
-
var ValueLabelSlot = (_ref13 = (_slots$valueLabel = slots == null ? void 0 : slots.valueLabel) != null ? _slots$valueLabel : components.ValueLabel) != null ? _ref13 :
|
|
471
|
+
var ValueLabelSlot = (_ref13 = (_slots$valueLabel = slots == null ? void 0 : slots.valueLabel) != null ? _slots$valueLabel : components.ValueLabel) != null ? _ref13 : SliderValueLabel;
|
|
549
472
|
var MarkSlot = (_ref14 = (_slots$mark = slots == null ? void 0 : slots.mark) != null ? _slots$mark : components.Mark) != null ? _ref14 : SliderMark;
|
|
550
473
|
var MarkLabelSlot = (_ref15 = (_slots$markLabel = slots == null ? void 0 : slots.markLabel) != null ? _slots$markLabel : components.MarkLabel) != null ? _ref15 : SliderMarkLabel;
|
|
551
474
|
var InputSlot = (_ref16 = (_slots$input = slots == null ? void 0 : slots.input) != null ? _slots$input : components.Input) != null ? _ref16 : 'input';
|
|
@@ -515,7 +515,7 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
515
515
|
*
|
|
516
516
|
* @default false
|
|
517
517
|
*/
|
|
518
|
-
allowSwipeInChildren: PropTypes.oneOfType([PropTypes.
|
|
518
|
+
allowSwipeInChildren: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
|
|
519
519
|
/**
|
|
520
520
|
* @ignore
|
|
521
521
|
*/
|
|
@@ -570,20 +570,20 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
570
570
|
/**
|
|
571
571
|
* Callback fired when the component requests to be closed.
|
|
572
572
|
*
|
|
573
|
-
* @param {
|
|
573
|
+
* @param {React.SyntheticEvent<{}>} event The event source of the callback.
|
|
574
574
|
*/
|
|
575
575
|
onClose: PropTypes.func.isRequired,
|
|
576
576
|
/**
|
|
577
577
|
* Callback fired when the component requests to be opened.
|
|
578
578
|
*
|
|
579
|
-
* @param {
|
|
579
|
+
* @param {React.SyntheticEvent<{}>} event The event source of the callback.
|
|
580
580
|
*/
|
|
581
581
|
onOpen: PropTypes.func.isRequired,
|
|
582
582
|
/**
|
|
583
583
|
* If `true`, the component is shown.
|
|
584
584
|
* @default false
|
|
585
585
|
*/
|
|
586
|
-
open: PropTypes.bool
|
|
586
|
+
open: PropTypes.bool,
|
|
587
587
|
/**
|
|
588
588
|
* @ignore
|
|
589
589
|
*/
|
package/legacy/Tabs/Tabs.js
CHANGED
|
@@ -180,10 +180,7 @@ var TabsIndicator = styled('span', {
|
|
|
180
180
|
right: 0
|
|
181
181
|
});
|
|
182
182
|
});
|
|
183
|
-
var TabsScrollbarSize = styled(ScrollbarSize
|
|
184
|
-
name: 'MuiTabs',
|
|
185
|
-
slot: 'ScrollbarSize'
|
|
186
|
-
})({
|
|
183
|
+
var TabsScrollbarSize = styled(ScrollbarSize)({
|
|
187
184
|
overflowX: 'auto',
|
|
188
185
|
overflowY: 'hidden',
|
|
189
186
|
// Hide dimensionless scrollbar on macOS
|
package/legacy/index.js
CHANGED
|
@@ -12,7 +12,7 @@ var useTouchRipple = function useTouchRipple(props) {
|
|
|
12
12
|
React.useEffect(function () {
|
|
13
13
|
if (focusVisible && !disableFocusRipple && !disableRipple) {
|
|
14
14
|
var _rippleRef$current;
|
|
15
|
-
(_rippleRef$current = rippleRef.current) == null
|
|
15
|
+
(_rippleRef$current = rippleRef.current) == null || _rippleRef$current.pulsate();
|
|
16
16
|
}
|
|
17
17
|
}, [rippleRef, focusVisible, disableFocusRipple, disableRipple]);
|
|
18
18
|
function useRippleHandler(rippleAction) {
|
|
@@ -30,7 +30,7 @@ var useTouchRipple = function useTouchRipple(props) {
|
|
|
30
30
|
keydownRef.current = true;
|
|
31
31
|
rippleRef.current.stop(event, function () {
|
|
32
32
|
var _rippleRef$current2;
|
|
33
|
-
rippleRef == null || (_rippleRef$current2 = rippleRef.current) == null
|
|
33
|
+
rippleRef == null || (_rippleRef$current2 = rippleRef.current) == null || _rippleRef$current2.start(event);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
36
|
});
|
|
@@ -41,7 +41,7 @@ var useTouchRipple = function useTouchRipple(props) {
|
|
|
41
41
|
keydownRef.current = false;
|
|
42
42
|
rippleRef.current.stop(event, function () {
|
|
43
43
|
var _rippleRef$current3;
|
|
44
|
-
rippleRef == null || (_rippleRef$current3 = rippleRef.current) == null
|
|
44
|
+
rippleRef == null || (_rippleRef$current3 = rippleRef.current) == null || _rippleRef$current3.pulsate(event);
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
47
|
});
|
|
@@ -83,7 +83,7 @@ var useTouchRipple = function useTouchRipple(props) {
|
|
|
83
83
|
name: eventName,
|
|
84
84
|
handler: function handler(ev) {
|
|
85
85
|
var _otherEvents$eventNam;
|
|
86
|
-
(_otherEvents$eventNam = otherEvents[eventName]) == null
|
|
86
|
+
(_otherEvents$eventNam = otherEvents[eventName]) == null || _otherEvents$eventNam.call(otherEvents, ev);
|
|
87
87
|
rippleHandlers[eventName](ev);
|
|
88
88
|
}
|
|
89
89
|
};
|
package/modern/Button/Button.js
CHANGED
|
@@ -15,6 +15,7 @@ import ButtonBase from '../ButtonBase';
|
|
|
15
15
|
import capitalize from '../utils/capitalize';
|
|
16
16
|
import buttonClasses, { getButtonUtilityClass } from './buttonClasses';
|
|
17
17
|
import ButtonGroupContext from '../ButtonGroup/ButtonGroupContext';
|
|
18
|
+
import ButtonGroupButtonContext from '../ButtonGroup/ButtonGroupButtonContext';
|
|
18
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
19
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
20
21
|
const useUtilityClasses = ownerState => {
|
|
@@ -220,6 +221,7 @@ const ButtonEndIcon = styled('span', {
|
|
|
220
221
|
const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
221
222
|
// props priority: `inProps` > `contextProps` > `themeDefaultProps`
|
|
222
223
|
const contextProps = React.useContext(ButtonGroupContext);
|
|
224
|
+
const buttonGroupButtonContextPositionClassName = React.useContext(ButtonGroupButtonContext);
|
|
223
225
|
const resolvedProps = resolveProps(contextProps, inProps);
|
|
224
226
|
const props = useThemeProps({
|
|
225
227
|
props: resolvedProps,
|
|
@@ -264,9 +266,10 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
|
264
266
|
ownerState: ownerState,
|
|
265
267
|
children: endIconProp
|
|
266
268
|
});
|
|
269
|
+
const positionClassName = buttonGroupButtonContextPositionClassName || '';
|
|
267
270
|
return /*#__PURE__*/_jsxs(ButtonRoot, _extends({
|
|
268
271
|
ownerState: ownerState,
|
|
269
|
-
className: clsx(contextProps.className, classes.root, className),
|
|
272
|
+
className: clsx(contextProps.className, classes.root, className, positionClassName),
|
|
270
273
|
component: component,
|
|
271
274
|
disabled: disabled,
|
|
272
275
|
focusRipple: !disableFocusRipple,
|