@mui/material 5.10.11 → 5.10.13
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/Alert/Alert.d.ts +34 -3
- package/Alert/Alert.js +46 -9
- package/Autocomplete/Autocomplete.d.ts +10 -0
- package/Autocomplete/Autocomplete.js +27 -11
- package/AvatarGroup/AvatarGroup.d.ts +18 -1
- package/AvatarGroup/AvatarGroup.js +25 -6
- package/Backdrop/Backdrop.d.ts +33 -3
- package/Backdrop/Backdrop.js +46 -11
- package/Badge/Badge.d.ts +11 -3
- package/Badge/Badge.js +11 -3
- package/ButtonBase/TouchRipple.js +1 -1
- package/CHANGELOG.md +134 -0
- package/Chip/Chip.js +8 -4
- package/FilledInput/FilledInput.js +48 -9
- package/FormControl/FormControl.js +29 -29
- package/FormControlLabel/FormControlLabel.d.ts +12 -0
- package/FormControlLabel/FormControlLabel.js +17 -5
- package/Input/Input.js +49 -10
- package/InputBase/InputBase.d.ts +34 -3
- package/InputBase/InputBase.js +45 -8
- package/ListItem/ListItem.d.ts +32 -3
- package/ListItem/ListItem.js +43 -11
- package/ListItemButton/ListItemButton.js +2 -2
- package/MenuItem/MenuItem.js +2 -2
- package/Modal/Modal.d.ts +11 -3
- package/Modal/Modal.js +11 -3
- package/NativeSelect/NativeSelectInput.js +11 -9
- package/OutlinedInput/OutlinedInput.js +26 -8
- package/PaginationItem/PaginationItem.d.ts +19 -7
- package/PaginationItem/PaginationItem.js +31 -22
- package/README.md +1 -0
- package/Radio/Radio.js +2 -1
- package/RadioGroup/RadioGroup.js +12 -12
- package/Select/Select.d.ts +3 -3
- package/Select/Select.js +3 -3
- package/Slider/Slider.d.ts +14 -2
- package/Slider/Slider.js +12 -3
- package/StepLabel/StepLabel.d.ts +11 -0
- package/StepLabel/StepLabel.js +15 -3
- package/SwipeableDrawer/SwipeableDrawer.js +10 -2
- package/Tooltip/Tooltip.d.ts +43 -6
- package/Tooltip/Tooltip.js +69 -32
- package/Unstable_Grid2/Grid2Props.d.ts +1 -1
- package/esm/Alert/Alert.js +46 -9
- package/esm/Autocomplete/Autocomplete.js +27 -11
- package/esm/AvatarGroup/AvatarGroup.js +25 -6
- package/esm/Backdrop/Backdrop.js +46 -11
- package/esm/Badge/Badge.js +11 -3
- package/esm/ButtonBase/TouchRipple.js +1 -1
- package/esm/Chip/Chip.js +8 -4
- package/esm/FilledInput/FilledInput.js +48 -9
- package/esm/FormControl/FormControl.js +29 -29
- package/esm/FormControlLabel/FormControlLabel.js +17 -5
- package/esm/Input/Input.js +49 -10
- package/esm/InputBase/InputBase.js +45 -8
- package/esm/ListItem/ListItem.js +43 -11
- package/esm/ListItemButton/ListItemButton.js +2 -2
- package/esm/MenuItem/MenuItem.js +2 -2
- package/esm/Modal/Modal.js +11 -3
- package/esm/NativeSelect/NativeSelectInput.js +11 -9
- package/esm/OutlinedInput/OutlinedInput.js +26 -8
- package/esm/PaginationItem/PaginationItem.js +31 -22
- package/esm/Radio/Radio.js +2 -1
- package/esm/RadioGroup/RadioGroup.js +12 -12
- package/esm/Select/Select.js +3 -3
- package/esm/Slider/Slider.js +12 -3
- package/esm/StepLabel/StepLabel.js +15 -3
- package/esm/SwipeableDrawer/SwipeableDrawer.js +9 -2
- package/esm/Tooltip/Tooltip.js +69 -32
- package/index.js +1 -1
- package/legacy/Alert/Alert.js +48 -9
- package/legacy/Autocomplete/Autocomplete.js +27 -10
- package/legacy/AvatarGroup/AvatarGroup.js +26 -6
- package/legacy/Backdrop/Backdrop.js +48 -11
- package/legacy/Badge/Badge.js +11 -3
- package/legacy/ButtonBase/TouchRipple.js +1 -1
- package/legacy/Chip/Chip.js +8 -4
- package/legacy/FilledInput/FilledInput.js +49 -9
- package/legacy/FormControl/FormControl.js +29 -29
- package/legacy/FormControlLabel/FormControlLabel.js +17 -4
- package/legacy/Input/Input.js +50 -10
- package/legacy/InputBase/InputBase.js +47 -8
- package/legacy/ListItem/ListItem.js +49 -13
- package/legacy/ListItemButton/ListItemButton.js +7 -5
- package/legacy/MenuItem/MenuItem.js +6 -4
- package/legacy/Modal/Modal.js +11 -3
- package/legacy/NativeSelect/NativeSelectInput.js +11 -9
- package/legacy/OutlinedInput/OutlinedInput.js +27 -8
- package/legacy/PaginationItem/PaginationItem.js +32 -22
- package/legacy/Radio/Radio.js +2 -1
- package/legacy/RadioGroup/RadioGroup.js +14 -14
- package/legacy/Select/Select.js +3 -3
- package/legacy/Slider/Slider.js +12 -3
- package/legacy/StepLabel/StepLabel.js +16 -3
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +9 -2
- package/legacy/Tooltip/Tooltip.js +64 -23
- package/legacy/index.js +1 -1
- package/modern/Alert/Alert.js +45 -8
- package/modern/Autocomplete/Autocomplete.js +26 -10
- package/modern/AvatarGroup/AvatarGroup.js +24 -5
- package/modern/Backdrop/Backdrop.js +45 -10
- package/modern/Badge/Badge.js +11 -3
- package/modern/ButtonBase/TouchRipple.js +1 -1
- package/modern/Chip/Chip.js +8 -4
- package/modern/FilledInput/FilledInput.js +46 -9
- package/modern/FormControl/FormControl.js +29 -29
- package/modern/FormControlLabel/FormControlLabel.js +15 -5
- package/modern/Input/Input.js +47 -10
- package/modern/InputBase/InputBase.js +43 -8
- package/modern/ListItem/ListItem.js +43 -11
- package/modern/ListItemButton/ListItemButton.js +2 -2
- package/modern/MenuItem/MenuItem.js +2 -2
- package/modern/Modal/Modal.js +11 -3
- package/modern/NativeSelect/NativeSelectInput.js +11 -9
- package/modern/OutlinedInput/OutlinedInput.js +25 -7
- package/modern/PaginationItem/PaginationItem.js +31 -22
- package/modern/Radio/Radio.js +2 -1
- package/modern/RadioGroup/RadioGroup.js +12 -12
- package/modern/Select/Select.js +3 -3
- package/modern/Slider/Slider.js +12 -3
- package/modern/StepLabel/StepLabel.js +13 -3
- package/modern/SwipeableDrawer/SwipeableDrawer.js +9 -2
- package/modern/Tooltip/Tooltip.js +59 -18
- package/modern/index.js +1 -1
- package/package.json +4 -4
- package/umd/material-ui.development.js +617 -234
- package/umd/material-ui.production.min.js +20 -20
|
@@ -209,7 +209,7 @@ function composeEventHandler(handler, eventHandler) {
|
|
|
209
209
|
|
|
210
210
|
|
|
211
211
|
var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
212
|
-
var
|
|
212
|
+
var _ref5, _slots$popper, _ref6, _ref7, _slots$transition, _ref8, _slots$tooltip, _ref9, _slots$arrow, _slotProps$popper, _ref10, _slotProps$popper2, _slotProps$transition, _slotProps$tooltip, _ref11, _slotProps$tooltip2, _slotProps$arrow, _ref12, _slotProps$arrow2;
|
|
213
213
|
|
|
214
214
|
var props = useThemeProps({
|
|
215
215
|
props: inProps,
|
|
@@ -255,11 +255,15 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
255
255
|
PopperComponentProp = props.PopperComponent,
|
|
256
256
|
_props$PopperProps = props.PopperProps,
|
|
257
257
|
PopperProps = _props$PopperProps === void 0 ? {} : _props$PopperProps,
|
|
258
|
+
_props$slotProps = props.slotProps,
|
|
259
|
+
slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
|
|
260
|
+
_props$slots = props.slots,
|
|
261
|
+
slots = _props$slots === void 0 ? {} : _props$slots,
|
|
258
262
|
title = props.title,
|
|
259
263
|
_props$TransitionComp = props.TransitionComponent,
|
|
260
264
|
TransitionComponentProp = _props$TransitionComp === void 0 ? Grow : _props$TransitionComp,
|
|
261
265
|
TransitionProps = props.TransitionProps,
|
|
262
|
-
other = _objectWithoutProperties(props, ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "title", "TransitionComponent", "TransitionProps"]);
|
|
266
|
+
other = _objectWithoutProperties(props, ["arrow", "children", "classes", "components", "componentsProps", "describeChild", "disableFocusListener", "disableHoverListener", "disableInteractive", "disableTouchListener", "enterDelay", "enterNextDelay", "enterTouchDelay", "followCursor", "id", "leaveDelay", "leaveTouchDelay", "onClose", "onOpen", "open", "placement", "PopperComponent", "PopperProps", "slotProps", "slots", "title", "TransitionComponent", "TransitionProps"]);
|
|
263
267
|
|
|
264
268
|
var theme = useTheme();
|
|
265
269
|
var isRtl = theme.direction === 'rtl';
|
|
@@ -486,7 +490,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
486
490
|
}, [handleClose, open]);
|
|
487
491
|
var handleRef = useForkRef(children.ref, focusVisibleRef, setChildNode, ref); // There is no point in displaying an empty tooltip.
|
|
488
492
|
|
|
489
|
-
if (
|
|
493
|
+
if (!title && title !== 0) {
|
|
490
494
|
open = false;
|
|
491
495
|
}
|
|
492
496
|
|
|
@@ -606,14 +610,20 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
606
610
|
});
|
|
607
611
|
|
|
608
612
|
var classes = useUtilityClasses(ownerState);
|
|
609
|
-
var PopperComponent = (
|
|
610
|
-
var TransitionComponent = (
|
|
611
|
-
var TooltipComponent = (
|
|
612
|
-
var ArrowComponent = (
|
|
613
|
-
var popperProps = appendOwnerState(PopperComponent, _extends({}, PopperProps, componentsProps.popper
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
var
|
|
613
|
+
var PopperComponent = (_ref5 = (_slots$popper = slots.popper) != null ? _slots$popper : components.Popper) != null ? _ref5 : TooltipPopper;
|
|
614
|
+
var TransitionComponent = (_ref6 = (_ref7 = (_slots$transition = slots.transition) != null ? _slots$transition : components.Transition) != null ? _ref7 : TransitionComponentProp) != null ? _ref6 : Grow;
|
|
615
|
+
var TooltipComponent = (_ref8 = (_slots$tooltip = slots.tooltip) != null ? _slots$tooltip : components.Tooltip) != null ? _ref8 : TooltipTooltip;
|
|
616
|
+
var ArrowComponent = (_ref9 = (_slots$arrow = slots.arrow) != null ? _slots$arrow : components.Arrow) != null ? _ref9 : TooltipArrow;
|
|
617
|
+
var popperProps = appendOwnerState(PopperComponent, _extends({}, PopperProps, (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper, {
|
|
618
|
+
className: clsx(classes.popper, PopperProps == null ? void 0 : PopperProps.className, (_ref10 = (_slotProps$popper2 = slotProps.popper) != null ? _slotProps$popper2 : componentsProps.popper) == null ? void 0 : _ref10.className)
|
|
619
|
+
}), ownerState);
|
|
620
|
+
var transitionProps = appendOwnerState(TransitionComponent, _extends({}, TransitionProps, (_slotProps$transition = slotProps.transition) != null ? _slotProps$transition : componentsProps.transition), ownerState);
|
|
621
|
+
var tooltipProps = appendOwnerState(TooltipComponent, _extends({}, (_slotProps$tooltip = slotProps.tooltip) != null ? _slotProps$tooltip : componentsProps.tooltip, {
|
|
622
|
+
className: clsx(classes.tooltip, (_ref11 = (_slotProps$tooltip2 = slotProps.tooltip) != null ? _slotProps$tooltip2 : componentsProps.tooltip) == null ? void 0 : _ref11.className)
|
|
623
|
+
}), ownerState);
|
|
624
|
+
var tooltipArrowProps = appendOwnerState(ArrowComponent, _extends({}, (_slotProps$arrow = slotProps.arrow) != null ? _slotProps$arrow : componentsProps.arrow, {
|
|
625
|
+
className: clsx(classes.arrow, (_ref12 = (_slotProps$arrow2 = slotProps.arrow) != null ? _slotProps$arrow2 : componentsProps.arrow) == null ? void 0 : _ref12.className)
|
|
626
|
+
}), ownerState);
|
|
617
627
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
618
628
|
children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperComponent, _extends({
|
|
619
629
|
as: PopperComponentProp != null ? PopperComponentProp : Popper,
|
|
@@ -635,19 +645,15 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
635
645
|
id: id,
|
|
636
646
|
transition: true
|
|
637
647
|
}, interactiveWrapperListeners, popperProps, {
|
|
638
|
-
className: clsx(classes.popper, PopperProps == null ? void 0 : PopperProps.className, (_componentsProps$popp = componentsProps.popper) == null ? void 0 : _componentsProps$popp.className),
|
|
639
648
|
popperOptions: popperOptions,
|
|
640
|
-
children: function children(
|
|
641
|
-
var
|
|
642
|
-
|
|
643
|
-
var TransitionPropsInner = _ref6.TransitionProps;
|
|
649
|
+
children: function children(_ref13) {
|
|
650
|
+
var TransitionPropsInner = _ref13.TransitionProps;
|
|
644
651
|
return /*#__PURE__*/_jsx(TransitionComponent, _extends({
|
|
645
652
|
timeout: theme.transitions.duration.shorter
|
|
646
653
|
}, TransitionPropsInner, transitionProps, {
|
|
654
|
+
"data-foo": "bar",
|
|
647
655
|
children: /*#__PURE__*/_jsxs(TooltipComponent, _extends({}, tooltipProps, {
|
|
648
|
-
className: clsx(classes.tooltip, (_componentsProps$tool = componentsProps.tooltip) == null ? void 0 : _componentsProps$tool.className),
|
|
649
656
|
children: [title, arrow ? /*#__PURE__*/_jsx(ArrowComponent, _extends({}, tooltipArrowProps, {
|
|
650
|
-
className: clsx(classes.arrow, (_componentsProps$arro = componentsProps.arrow) == null ? void 0 : _componentsProps$arro.className),
|
|
651
657
|
ref: setArrowRef
|
|
652
658
|
})) : null]
|
|
653
659
|
}))
|
|
@@ -686,8 +692,11 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
|
|
|
686
692
|
className: PropTypes.string,
|
|
687
693
|
|
|
688
694
|
/**
|
|
689
|
-
* The components used for each slot inside
|
|
690
|
-
*
|
|
695
|
+
* The components used for each slot inside.
|
|
696
|
+
*
|
|
697
|
+
* This prop is an alias for the `slots` prop.
|
|
698
|
+
* It's recommended to use the `slots` prop instead.
|
|
699
|
+
*
|
|
691
700
|
* @default {}
|
|
692
701
|
*/
|
|
693
702
|
components: PropTypes.shape({
|
|
@@ -698,9 +707,12 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
|
|
|
698
707
|
}),
|
|
699
708
|
|
|
700
709
|
/**
|
|
701
|
-
* The props
|
|
702
|
-
*
|
|
703
|
-
*
|
|
710
|
+
* The extra props for the slot components.
|
|
711
|
+
* You can override the existing props or add new ones.
|
|
712
|
+
*
|
|
713
|
+
* This prop is an alias for the `slotProps` prop.
|
|
714
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
715
|
+
*
|
|
704
716
|
* @default {}
|
|
705
717
|
*/
|
|
706
718
|
componentsProps: PropTypes.shape({
|
|
@@ -823,6 +835,35 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
|
|
|
823
835
|
*/
|
|
824
836
|
PopperProps: PropTypes.object,
|
|
825
837
|
|
|
838
|
+
/**
|
|
839
|
+
* The extra props for the slot components.
|
|
840
|
+
* You can override the existing props or add new ones.
|
|
841
|
+
*
|
|
842
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
843
|
+
*
|
|
844
|
+
* @default {}
|
|
845
|
+
*/
|
|
846
|
+
slotProps: PropTypes.shape({
|
|
847
|
+
arrow: PropTypes.object,
|
|
848
|
+
popper: PropTypes.object,
|
|
849
|
+
tooltip: PropTypes.object,
|
|
850
|
+
transition: PropTypes.object
|
|
851
|
+
}),
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* The components used for each slot inside.
|
|
855
|
+
*
|
|
856
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
857
|
+
*
|
|
858
|
+
* @default {}
|
|
859
|
+
*/
|
|
860
|
+
slots: PropTypes.shape({
|
|
861
|
+
arrow: PropTypes.elementType,
|
|
862
|
+
popper: PropTypes.elementType,
|
|
863
|
+
tooltip: PropTypes.elementType,
|
|
864
|
+
transition: PropTypes.elementType
|
|
865
|
+
}),
|
|
866
|
+
|
|
826
867
|
/**
|
|
827
868
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
828
869
|
*/
|
package/legacy/index.js
CHANGED
package/modern/Alert/Alert.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["action", "children", "className", "closeText", "color", "components", "componentsProps", "icon", "iconMapping", "onClose", "role", "severity", "variant"];
|
|
3
|
+
const _excluded = ["action", "children", "className", "closeText", "color", "components", "componentsProps", "icon", "iconMapping", "onClose", "role", "severity", "slotProps", "slots", "variant"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -146,6 +146,8 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
146
146
|
onClose,
|
|
147
147
|
role = 'alert',
|
|
148
148
|
severity = 'success',
|
|
149
|
+
slotProps = {},
|
|
150
|
+
slots = {},
|
|
149
151
|
variant = 'standard'
|
|
150
152
|
} = props,
|
|
151
153
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
@@ -157,8 +159,10 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
157
159
|
});
|
|
158
160
|
|
|
159
161
|
const classes = useUtilityClasses(ownerState);
|
|
160
|
-
const AlertCloseButton = components.CloseButton ?? IconButton;
|
|
161
|
-
const AlertCloseIcon = components.CloseIcon ?? CloseIcon;
|
|
162
|
+
const AlertCloseButton = slots.closeButton ?? components.CloseButton ?? IconButton;
|
|
163
|
+
const AlertCloseIcon = slots.closeIcon ?? components.CloseIcon ?? CloseIcon;
|
|
164
|
+
const closeButtonProps = slotProps.closeButton ?? componentsProps.closeButton;
|
|
165
|
+
const closeIconProps = slotProps.closeIcon ?? componentsProps.closeIcon;
|
|
162
166
|
return /*#__PURE__*/_jsxs(AlertRoot, _extends({
|
|
163
167
|
role: role,
|
|
164
168
|
elevation: 0,
|
|
@@ -187,10 +191,10 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
187
191
|
title: closeText,
|
|
188
192
|
color: "inherit",
|
|
189
193
|
onClick: onClose
|
|
190
|
-
},
|
|
194
|
+
}, closeButtonProps, {
|
|
191
195
|
children: /*#__PURE__*/_jsx(AlertCloseIcon, _extends({
|
|
192
196
|
fontSize: "small"
|
|
193
|
-
},
|
|
197
|
+
}, closeIconProps))
|
|
194
198
|
}))
|
|
195
199
|
}) : null]
|
|
196
200
|
}));
|
|
@@ -241,8 +245,11 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
|
|
|
241
245
|
.oneOfType([PropTypes.oneOf(['error', 'info', 'success', 'warning']), PropTypes.string]),
|
|
242
246
|
|
|
243
247
|
/**
|
|
244
|
-
* The components used for each slot inside
|
|
245
|
-
*
|
|
248
|
+
* The components used for each slot inside.
|
|
249
|
+
*
|
|
250
|
+
* This prop is an alias for the `slots` prop.
|
|
251
|
+
* It's recommended to use the `slots` prop instead.
|
|
252
|
+
*
|
|
246
253
|
* @default {}
|
|
247
254
|
*/
|
|
248
255
|
components: PropTypes.shape({
|
|
@@ -251,7 +258,12 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
|
|
|
251
258
|
}),
|
|
252
259
|
|
|
253
260
|
/**
|
|
254
|
-
* The props
|
|
261
|
+
* The extra props for the slot components.
|
|
262
|
+
* You can override the existing props or add new ones.
|
|
263
|
+
*
|
|
264
|
+
* This prop is an alias for the `slotProps` prop.
|
|
265
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
266
|
+
*
|
|
255
267
|
* @default {}
|
|
256
268
|
*/
|
|
257
269
|
componentsProps: PropTypes.shape({
|
|
@@ -298,6 +310,31 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
|
|
|
298
310
|
*/
|
|
299
311
|
severity: PropTypes.oneOf(['error', 'info', 'success', 'warning']),
|
|
300
312
|
|
|
313
|
+
/**
|
|
314
|
+
* The extra props for the slot components.
|
|
315
|
+
* You can override the existing props or add new ones.
|
|
316
|
+
*
|
|
317
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
318
|
+
*
|
|
319
|
+
* @default {}
|
|
320
|
+
*/
|
|
321
|
+
slotProps: PropTypes.shape({
|
|
322
|
+
closeButton: PropTypes.object,
|
|
323
|
+
closeIcon: PropTypes.object
|
|
324
|
+
}),
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* The components used for each slot inside.
|
|
328
|
+
*
|
|
329
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
330
|
+
*
|
|
331
|
+
* @default {}
|
|
332
|
+
*/
|
|
333
|
+
slots: PropTypes.shape({
|
|
334
|
+
closeButton: PropTypes.elementType,
|
|
335
|
+
closeIcon: PropTypes.elementType
|
|
336
|
+
}),
|
|
337
|
+
|
|
301
338
|
/**
|
|
302
339
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
303
340
|
*/
|
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
|
|
4
4
|
var _ClearIcon, _ArrowDropDownIcon;
|
|
5
5
|
|
|
6
|
-
const _excluded = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "value"];
|
|
6
|
+
const _excluded = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "slotProps", "value"];
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import clsx from 'clsx';
|
|
@@ -408,7 +408,8 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
408
408
|
renderOption: renderOptionProp,
|
|
409
409
|
renderTags,
|
|
410
410
|
selectOnFocus = !props.freeSolo,
|
|
411
|
-
size = 'medium'
|
|
411
|
+
size = 'medium',
|
|
412
|
+
slotProps = {}
|
|
412
413
|
} = props,
|
|
413
414
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
414
415
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
@@ -517,6 +518,10 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
517
518
|
});
|
|
518
519
|
};
|
|
519
520
|
|
|
521
|
+
const clearIndicatorSlotProps = slotProps.clearIndicator ?? componentsProps.clearIndicator;
|
|
522
|
+
const paperSlotProps = slotProps.paper ?? componentsProps.paper;
|
|
523
|
+
const popperSlotProps = slotProps.popper ?? componentsProps.popper;
|
|
524
|
+
const popupIndicatorSlotProps = slotProps.popupIndicator ?? componentsProps.popupIndicator;
|
|
520
525
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
521
526
|
children: [/*#__PURE__*/_jsx(AutocompleteRoot, _extends({
|
|
522
527
|
ref: ref,
|
|
@@ -541,16 +546,16 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
541
546
|
"aria-label": clearText,
|
|
542
547
|
title: clearText,
|
|
543
548
|
ownerState: ownerState
|
|
544
|
-
},
|
|
545
|
-
className: clsx(classes.clearIndicator,
|
|
549
|
+
}, clearIndicatorSlotProps, {
|
|
550
|
+
className: clsx(classes.clearIndicator, clearIndicatorSlotProps?.className),
|
|
546
551
|
children: clearIcon
|
|
547
552
|
})) : null, hasPopupIcon ? /*#__PURE__*/_jsx(AutocompletePopupIndicator, _extends({}, getPopupIndicatorProps(), {
|
|
548
553
|
disabled: disabled,
|
|
549
554
|
"aria-label": popupOpen ? closeText : openText,
|
|
550
555
|
title: popupOpen ? closeText : openText,
|
|
551
556
|
ownerState: ownerState
|
|
552
|
-
},
|
|
553
|
-
className: clsx(classes.popupIndicator,
|
|
557
|
+
}, popupIndicatorSlotProps, {
|
|
558
|
+
className: clsx(classes.popupIndicator, popupIndicatorSlotProps?.className),
|
|
554
559
|
children: popupIcon
|
|
555
560
|
})) : null]
|
|
556
561
|
})
|
|
@@ -571,13 +576,13 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
571
576
|
role: "presentation",
|
|
572
577
|
anchorEl: anchorEl,
|
|
573
578
|
open: popupOpen
|
|
574
|
-
},
|
|
575
|
-
className: clsx(classes.popper,
|
|
579
|
+
}, popperSlotProps, {
|
|
580
|
+
className: clsx(classes.popper, popperSlotProps?.className),
|
|
576
581
|
children: /*#__PURE__*/_jsxs(AutocompletePaper, _extends({
|
|
577
582
|
ownerState: ownerState,
|
|
578
583
|
as: PaperComponent
|
|
579
|
-
},
|
|
580
|
-
className: clsx(classes.paper,
|
|
584
|
+
}, paperSlotProps, {
|
|
585
|
+
className: clsx(classes.paper, paperSlotProps?.className),
|
|
581
586
|
children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
|
|
582
587
|
className: classes.loading,
|
|
583
588
|
ownerState: ownerState,
|
|
@@ -1061,6 +1066,17 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
|
|
|
1061
1066
|
/* @typescript-to-proptypes-ignore */
|
|
1062
1067
|
.oneOfType([PropTypes.oneOf(['small', 'medium']), PropTypes.string]),
|
|
1063
1068
|
|
|
1069
|
+
/**
|
|
1070
|
+
* The props used for each slot inside.
|
|
1071
|
+
* @default {}
|
|
1072
|
+
*/
|
|
1073
|
+
slotProps: PropTypes.shape({
|
|
1074
|
+
clearIndicator: PropTypes.object,
|
|
1075
|
+
paper: PropTypes.object,
|
|
1076
|
+
popper: PropTypes.object,
|
|
1077
|
+
popupIndicator: PropTypes.object
|
|
1078
|
+
}),
|
|
1079
|
+
|
|
1064
1080
|
/**
|
|
1065
1081
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1066
1082
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "className", "component", "componentsProps", "max", "spacing", "total", "variant"];
|
|
3
|
+
const _excluded = ["children", "className", "component", "componentsProps", "max", "slotProps", "spacing", "total", "variant"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { isFragment } from 'react-is';
|
|
@@ -74,6 +74,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
74
74
|
component = 'div',
|
|
75
75
|
componentsProps = {},
|
|
76
76
|
max = 5,
|
|
77
|
+
slotProps = {},
|
|
77
78
|
spacing = 'medium',
|
|
78
79
|
total,
|
|
79
80
|
variant = 'circular'
|
|
@@ -109,6 +110,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
109
110
|
const maxAvatars = Math.min(children.length, clampedMax - 1);
|
|
110
111
|
const extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
|
|
111
112
|
const marginLeft = spacing && SPACINGS[spacing] !== undefined ? SPACINGS[spacing] : -spacing;
|
|
113
|
+
const additionalAvatarSlotProps = slotProps.additionalAvatar ?? componentsProps.additionalAvatar;
|
|
112
114
|
return /*#__PURE__*/_jsxs(AvatarGroupRoot, _extends({
|
|
113
115
|
as: component,
|
|
114
116
|
ownerState: ownerState,
|
|
@@ -118,11 +120,11 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
118
120
|
children: [extraAvatars ? /*#__PURE__*/_jsxs(AvatarGroupAvatar, _extends({
|
|
119
121
|
ownerState: ownerState,
|
|
120
122
|
variant: variant
|
|
121
|
-
},
|
|
122
|
-
className: clsx(classes.avatar,
|
|
123
|
+
}, additionalAvatarSlotProps, {
|
|
124
|
+
className: clsx(classes.avatar, additionalAvatarSlotProps?.className),
|
|
123
125
|
style: _extends({
|
|
124
126
|
marginLeft
|
|
125
|
-
},
|
|
127
|
+
}, additionalAvatarSlotProps?.style),
|
|
126
128
|
children: ["+", extraAvatars]
|
|
127
129
|
})) : null, children.slice(0, maxAvatars).reverse().map((child, index) => {
|
|
128
130
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
@@ -167,7 +169,12 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
|
|
|
167
169
|
component: PropTypes.elementType,
|
|
168
170
|
|
|
169
171
|
/**
|
|
170
|
-
* The props
|
|
172
|
+
* The extra props for the slot components.
|
|
173
|
+
* You can override the existing props or add new ones.
|
|
174
|
+
*
|
|
175
|
+
* This prop is an alias for the `slotProps` prop.
|
|
176
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
177
|
+
*
|
|
171
178
|
* @default {}
|
|
172
179
|
*/
|
|
173
180
|
componentsProps: PropTypes.shape({
|
|
@@ -186,6 +193,18 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
|
|
|
186
193
|
return null;
|
|
187
194
|
}),
|
|
188
195
|
|
|
196
|
+
/**
|
|
197
|
+
* The extra props for the slot components.
|
|
198
|
+
* You can override the existing props or add new ones.
|
|
199
|
+
*
|
|
200
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
201
|
+
*
|
|
202
|
+
* @default {}
|
|
203
|
+
*/
|
|
204
|
+
slotProps: PropTypes.shape({
|
|
205
|
+
additionalAvatar: PropTypes.object
|
|
206
|
+
}),
|
|
207
|
+
|
|
189
208
|
/**
|
|
190
209
|
* Spacing between avatars.
|
|
191
210
|
* @default 'medium'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "component", "components", "componentsProps", "className", "invisible", "open", "transitionDuration", "TransitionComponent"];
|
|
3
|
+
const _excluded = ["children", "component", "components", "componentsProps", "className", "invisible", "open", "slotProps", "slots", "transitionDuration", "TransitionComponent"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -61,6 +61,8 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
|
|
|
61
61
|
className,
|
|
62
62
|
invisible = false,
|
|
63
63
|
open,
|
|
64
|
+
slotProps = {},
|
|
65
|
+
slots = {},
|
|
64
66
|
transitionDuration,
|
|
65
67
|
// eslint-disable-next-line react/prop-types
|
|
66
68
|
TransitionComponent = Fade
|
|
@@ -73,19 +75,21 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
|
|
|
73
75
|
});
|
|
74
76
|
|
|
75
77
|
const classes = useUtilityClasses(ownerState);
|
|
78
|
+
const rootSlotProps = slotProps.root ?? componentsProps.root;
|
|
76
79
|
return /*#__PURE__*/_jsx(TransitionComponent, _extends({
|
|
77
80
|
in: open,
|
|
78
81
|
timeout: transitionDuration
|
|
79
82
|
}, other, {
|
|
80
|
-
children: /*#__PURE__*/_jsx(BackdropRoot, {
|
|
81
|
-
"aria-hidden": true
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
children: /*#__PURE__*/_jsx(BackdropRoot, _extends({
|
|
84
|
+
"aria-hidden": true
|
|
85
|
+
}, rootSlotProps, {
|
|
86
|
+
as: slots.root ?? components.Root ?? component,
|
|
87
|
+
className: clsx(classes.root, className, rootSlotProps?.className),
|
|
88
|
+
ownerState: _extends({}, ownerState, rootSlotProps?.ownerState),
|
|
85
89
|
classes: classes,
|
|
86
90
|
ref: ref,
|
|
87
91
|
children: children
|
|
88
|
-
})
|
|
92
|
+
}))
|
|
89
93
|
}));
|
|
90
94
|
});
|
|
91
95
|
process.env.NODE_ENV !== "production" ? Backdrop.propTypes
|
|
@@ -118,8 +122,11 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
|
|
|
118
122
|
component: PropTypes.elementType,
|
|
119
123
|
|
|
120
124
|
/**
|
|
121
|
-
* The components used for each slot inside
|
|
122
|
-
*
|
|
125
|
+
* The components used for each slot inside.
|
|
126
|
+
*
|
|
127
|
+
* This prop is an alias for the `slots` prop.
|
|
128
|
+
* It's recommended to use the `slots` prop instead.
|
|
129
|
+
*
|
|
123
130
|
* @default {}
|
|
124
131
|
*/
|
|
125
132
|
components: PropTypes.shape({
|
|
@@ -127,7 +134,12 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
|
|
|
127
134
|
}),
|
|
128
135
|
|
|
129
136
|
/**
|
|
130
|
-
* The props
|
|
137
|
+
* The extra props for the slot components.
|
|
138
|
+
* You can override the existing props or add new ones.
|
|
139
|
+
*
|
|
140
|
+
* This prop is an alias for the `slotProps` prop.
|
|
141
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
142
|
+
*
|
|
131
143
|
* @default {}
|
|
132
144
|
*/
|
|
133
145
|
componentsProps: PropTypes.shape({
|
|
@@ -146,6 +158,29 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
|
|
|
146
158
|
*/
|
|
147
159
|
open: PropTypes.bool.isRequired,
|
|
148
160
|
|
|
161
|
+
/**
|
|
162
|
+
* The extra props for the slot components.
|
|
163
|
+
* You can override the existing props or add new ones.
|
|
164
|
+
*
|
|
165
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
166
|
+
*
|
|
167
|
+
* @default {}
|
|
168
|
+
*/
|
|
169
|
+
slotProps: PropTypes.shape({
|
|
170
|
+
root: PropTypes.object
|
|
171
|
+
}),
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* The components used for each slot inside.
|
|
175
|
+
*
|
|
176
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
177
|
+
*
|
|
178
|
+
* @default {}
|
|
179
|
+
*/
|
|
180
|
+
slots: PropTypes.shape({
|
|
181
|
+
root: PropTypes.elementType
|
|
182
|
+
}),
|
|
183
|
+
|
|
149
184
|
/**
|
|
150
185
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
151
186
|
*/
|
package/modern/Badge/Badge.js
CHANGED
|
@@ -314,8 +314,11 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
|
|
|
314
314
|
component: PropTypes.elementType,
|
|
315
315
|
|
|
316
316
|
/**
|
|
317
|
-
* The components used for each slot inside
|
|
318
|
-
*
|
|
317
|
+
* The components used for each slot inside.
|
|
318
|
+
*
|
|
319
|
+
* This prop is an alias for the `slots` prop.
|
|
320
|
+
* It's recommended to use the `slots` prop instead.
|
|
321
|
+
*
|
|
319
322
|
* @default {}
|
|
320
323
|
*/
|
|
321
324
|
components: PropTypes.shape({
|
|
@@ -324,7 +327,12 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
|
|
|
324
327
|
}),
|
|
325
328
|
|
|
326
329
|
/**
|
|
327
|
-
* The props
|
|
330
|
+
* The extra props for the slot components.
|
|
331
|
+
* You can override the existing props or add new ones.
|
|
332
|
+
*
|
|
333
|
+
* This prop is an alias for the `slotProps` prop.
|
|
334
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
335
|
+
*
|
|
328
336
|
* @default {}
|
|
329
337
|
*/
|
|
330
338
|
componentsProps: PropTypes.shape({
|
|
@@ -184,7 +184,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
184
184
|
nextKey.current += 1;
|
|
185
185
|
rippleCallback.current = cb;
|
|
186
186
|
}, [classes]);
|
|
187
|
-
const start = React.useCallback((event = {}, options = {}, cb) => {
|
|
187
|
+
const start = React.useCallback((event = {}, options = {}, cb = () => {}) => {
|
|
188
188
|
const {
|
|
189
189
|
pulsate = false,
|
|
190
190
|
center = centerProp || options.pulsate,
|
package/modern/Chip/Chip.js
CHANGED
|
@@ -23,6 +23,7 @@ const useUtilityClasses = ownerState => {
|
|
|
23
23
|
disabled,
|
|
24
24
|
size,
|
|
25
25
|
color,
|
|
26
|
+
iconColor,
|
|
26
27
|
onDelete,
|
|
27
28
|
clickable,
|
|
28
29
|
variant
|
|
@@ -31,7 +32,7 @@ const useUtilityClasses = ownerState => {
|
|
|
31
32
|
root: ['root', variant, disabled && 'disabled', `size${capitalize(size)}`, `color${capitalize(color)}`, clickable && 'clickable', clickable && `clickableColor${capitalize(color)}`, onDelete && 'deletable', onDelete && `deletableColor${capitalize(color)}`, `${variant}${capitalize(color)}`],
|
|
32
33
|
label: ['label', `label${capitalize(size)}`],
|
|
33
34
|
avatar: ['avatar', `avatar${capitalize(size)}`, `avatarColor${capitalize(color)}`],
|
|
34
|
-
icon: ['icon', `icon${capitalize(size)}`, `iconColor${capitalize(
|
|
35
|
+
icon: ['icon', `icon${capitalize(size)}`, `iconColor${capitalize(iconColor)}`],
|
|
35
36
|
deleteIcon: ['deleteIcon', `deleteIcon${capitalize(size)}`, `deleteIconColor${capitalize(color)}`, `deleteIcon${capitalize(variant)}Color${capitalize(color)}`]
|
|
36
37
|
};
|
|
37
38
|
return composeClasses(slots, getChipUtilityClass, classes);
|
|
@@ -46,6 +47,7 @@ const ChipRoot = styled('div', {
|
|
|
46
47
|
} = props;
|
|
47
48
|
const {
|
|
48
49
|
color,
|
|
50
|
+
iconColor,
|
|
49
51
|
clickable,
|
|
50
52
|
onDelete,
|
|
51
53
|
size,
|
|
@@ -62,7 +64,7 @@ const ChipRoot = styled('div', {
|
|
|
62
64
|
}, {
|
|
63
65
|
[`& .${chipClasses.icon}`]: styles[`icon${capitalize(size)}`]
|
|
64
66
|
}, {
|
|
65
|
-
[`& .${chipClasses.icon}`]: styles[`iconColor${capitalize(
|
|
67
|
+
[`& .${chipClasses.icon}`]: styles[`iconColor${capitalize(iconColor)}`]
|
|
66
68
|
}, {
|
|
67
69
|
[`& .${chipClasses.deleteIcon}`]: styles.deleteIcon
|
|
68
70
|
}, {
|
|
@@ -131,16 +133,17 @@ const ChipRoot = styled('div', {
|
|
|
131
133
|
fontSize: theme.typography.pxToRem(10)
|
|
132
134
|
},
|
|
133
135
|
[`& .${chipClasses.icon}`]: _extends({
|
|
134
|
-
color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor,
|
|
135
136
|
marginLeft: 5,
|
|
136
137
|
marginRight: -6
|
|
137
138
|
}, ownerState.size === 'small' && {
|
|
138
139
|
fontSize: 18,
|
|
139
140
|
marginLeft: 4,
|
|
140
141
|
marginRight: -4
|
|
142
|
+
}, ownerState.iconColor === ownerState.color && _extends({
|
|
143
|
+
color: theme.vars ? theme.vars.palette.Chip.defaultIconColor : textColor
|
|
141
144
|
}, ownerState.color !== 'default' && {
|
|
142
145
|
color: 'inherit'
|
|
143
|
-
}),
|
|
146
|
+
})),
|
|
144
147
|
[`& .${chipClasses.deleteIcon}`]: _extends({
|
|
145
148
|
WebkitTapHighlightColor: 'transparent',
|
|
146
149
|
color: theme.vars ? `rgba(${theme.vars.palette.text.primaryChannel} / 0.26)` : deleteIconColor,
|
|
@@ -346,6 +349,7 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
346
349
|
disabled,
|
|
347
350
|
size,
|
|
348
351
|
color,
|
|
352
|
+
iconColor: /*#__PURE__*/React.isValidElement(iconProp) ? iconProp.props.color || color : color,
|
|
349
353
|
onDelete: !!onDelete,
|
|
350
354
|
clickable,
|
|
351
355
|
variant
|