@mui/material 5.14.8 → 5.14.10
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/AlertTitle/AlertTitle.d.ts +1 -0
- package/Avatar/Avatar.js +1 -1
- package/Breadcrumbs/Breadcrumbs.d.ts +1 -0
- package/Button/Button.js +4 -1
- 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 +179 -19
- package/Chip/Chip.js +2 -0
- package/DialogTitle/DialogTitle.d.ts +1 -0
- package/ListSubheader/listSubheaderClasses.js +1 -1
- package/Modal/Modal.js +1 -1
- package/README.md +9 -198
- package/Slider/Slider.js +9 -86
- package/TablePagination/TablePagination.d.ts +1 -0
- package/Tabs/Tabs.d.ts +1 -1
- package/Tabs/Tabs.js +2 -5
- package/index.js +1 -1
- package/legacy/Avatar/Avatar.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/Chip/Chip.js +2 -0
- package/legacy/ListSubheader/listSubheaderClasses.js +1 -1
- package/legacy/Modal/Modal.js +3 -1
- package/legacy/Slider/Slider.js +9 -86
- package/legacy/Tabs/Tabs.js +2 -5
- package/legacy/index.js +1 -1
- package/legacy/useTouchRipple/useTouchRipple.js +4 -4
- package/modern/Avatar/Avatar.js +1 -1
- 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/Chip/Chip.js +2 -0
- package/modern/ListSubheader/listSubheaderClasses.js +1 -1
- package/modern/Modal/Modal.js +1 -1
- package/modern/Slider/Slider.js +9 -86
- package/modern/Tabs/Tabs.js +2 -5
- package/modern/index.js +1 -1
- package/node/Avatar/Avatar.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/Chip/Chip.js +2 -0
- package/node/ListSubheader/listSubheaderClasses.js +2 -2
- package/node/Modal/Modal.js +1 -1
- package/node/Slider/Slider.js +3 -73
- package/node/Tabs/Tabs.js +2 -5
- package/node/index.js +1 -1
- package/node/useTouchRipple/useTouchRipple.js +4 -4
- package/package.json +16 -16
- package/umd/material-ui.development.js +215 -235
- 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;
|
package/legacy/Chip/Chip.js
CHANGED
|
@@ -67,6 +67,8 @@ var ChipRoot = styled('div', {
|
|
|
67
67
|
borderRadius: 32 / 2,
|
|
68
68
|
whiteSpace: 'nowrap',
|
|
69
69
|
transition: theme.transitions.create(['background-color', 'box-shadow']),
|
|
70
|
+
// reset cursor explicitly in case ButtonBase is used
|
|
71
|
+
cursor: 'unset',
|
|
70
72
|
// We disable the focus ring for mouse, touch and keyboard users.
|
|
71
73
|
outline: 0,
|
|
72
74
|
textDecoration: 'none',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
2
2
|
import generateUtilityClass from '../generateUtilityClass';
|
|
3
3
|
export function getListSubheaderUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiListSubheader', slot);
|
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/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';
|
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
|
|
@@ -812,7 +809,7 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes /* remove-proptypes */ =
|
|
|
812
809
|
*
|
|
813
810
|
* - `scrollable` will invoke scrolling properties and allow for horizontally
|
|
814
811
|
* scrolling (or swiping) of the tab bar.
|
|
815
|
-
*
|
|
812
|
+
* - `fullWidth` will make the tabs grow to use all the available space,
|
|
816
813
|
* which should be used for small views, like on mobile.
|
|
817
814
|
* - `standard` will render the default state.
|
|
818
815
|
* @default 'standard'
|
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/Avatar/Avatar.js
CHANGED
|
@@ -158,8 +158,8 @@ const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
|
158
158
|
if (hasImgNotFailing) {
|
|
159
159
|
children = /*#__PURE__*/_jsx(AvatarImg, _extends({
|
|
160
160
|
alt: alt,
|
|
161
|
-
src: src,
|
|
162
161
|
srcSet: srcSet,
|
|
162
|
+
src: src,
|
|
163
163
|
sizes: sizes,
|
|
164
164
|
ownerState: ownerState,
|
|
165
165
|
className: classes.img
|
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,
|