@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
package/Alert/Alert.d.ts
CHANGED
|
@@ -34,8 +34,11 @@ export interface AlertProps extends StandardProps<PaperProps, 'variant'> {
|
|
|
34
34
|
*/
|
|
35
35
|
color?: OverridableStringUnion<AlertColor, AlertPropsColorOverrides>;
|
|
36
36
|
/**
|
|
37
|
-
* The components used for each slot inside
|
|
38
|
-
*
|
|
37
|
+
* The components used for each slot inside.
|
|
38
|
+
*
|
|
39
|
+
* This prop is an alias for the `slots` prop.
|
|
40
|
+
* It's recommended to use the `slots` prop instead.
|
|
41
|
+
*
|
|
39
42
|
* @default {}
|
|
40
43
|
*/
|
|
41
44
|
components?: {
|
|
@@ -43,7 +46,12 @@ export interface AlertProps extends StandardProps<PaperProps, 'variant'> {
|
|
|
43
46
|
CloseIcon?: React.ElementType;
|
|
44
47
|
};
|
|
45
48
|
/**
|
|
46
|
-
* The props
|
|
49
|
+
* The extra props for the slot components.
|
|
50
|
+
* You can override the existing props or add new ones.
|
|
51
|
+
*
|
|
52
|
+
* This prop is an alias for the `slotProps` prop.
|
|
53
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
54
|
+
*
|
|
47
55
|
* @default {}
|
|
48
56
|
*/
|
|
49
57
|
componentsProps?: {
|
|
@@ -84,6 +92,29 @@ export interface AlertProps extends StandardProps<PaperProps, 'variant'> {
|
|
|
84
92
|
* @default 'standard'
|
|
85
93
|
*/
|
|
86
94
|
variant?: OverridableStringUnion<'standard' | 'filled' | 'outlined', AlertPropsVariantOverrides>;
|
|
95
|
+
/**
|
|
96
|
+
* The extra props for the slot components.
|
|
97
|
+
* You can override the existing props or add new ones.
|
|
98
|
+
*
|
|
99
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
100
|
+
*
|
|
101
|
+
* @default {}
|
|
102
|
+
*/
|
|
103
|
+
slotProps?: {
|
|
104
|
+
closeButton?: IconButtonProps;
|
|
105
|
+
closeIcon?: SvgIconProps;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* The components used for each slot inside.
|
|
109
|
+
*
|
|
110
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
111
|
+
*
|
|
112
|
+
* @default {}
|
|
113
|
+
*/
|
|
114
|
+
slots?: {
|
|
115
|
+
closeButton?: React.ElementType;
|
|
116
|
+
closeIcon?: React.ElementType;
|
|
117
|
+
};
|
|
87
118
|
/**
|
|
88
119
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
89
120
|
*/
|
package/Alert/Alert.js
CHANGED
|
@@ -45,7 +45,7 @@ var _Close = _interopRequireDefault(require("../internal/svg-icons/Close"));
|
|
|
45
45
|
|
|
46
46
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
47
47
|
|
|
48
|
-
const _excluded = ["action", "children", "className", "closeText", "color", "components", "componentsProps", "icon", "iconMapping", "onClose", "role", "severity", "variant"];
|
|
48
|
+
const _excluded = ["action", "children", "className", "closeText", "color", "components", "componentsProps", "icon", "iconMapping", "onClose", "role", "severity", "slotProps", "slots", "variant"];
|
|
49
49
|
|
|
50
50
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
51
51
|
|
|
@@ -159,7 +159,7 @@ const defaultIconMapping = {
|
|
|
159
159
|
})
|
|
160
160
|
};
|
|
161
161
|
const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
162
|
-
var
|
|
162
|
+
var _ref, _slots$closeButton, _ref2, _slots$closeIcon, _slotProps$closeButto, _slotProps$closeIcon;
|
|
163
163
|
|
|
164
164
|
const props = (0, _useThemeProps.default)({
|
|
165
165
|
props: inProps,
|
|
@@ -178,6 +178,8 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
178
178
|
onClose,
|
|
179
179
|
role = 'alert',
|
|
180
180
|
severity = 'success',
|
|
181
|
+
slotProps = {},
|
|
182
|
+
slots = {},
|
|
181
183
|
variant = 'standard'
|
|
182
184
|
} = props,
|
|
183
185
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
@@ -187,8 +189,10 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
187
189
|
variant
|
|
188
190
|
});
|
|
189
191
|
const classes = useUtilityClasses(ownerState);
|
|
190
|
-
const AlertCloseButton = (
|
|
191
|
-
const AlertCloseIcon = (
|
|
192
|
+
const AlertCloseButton = (_ref = (_slots$closeButton = slots.closeButton) != null ? _slots$closeButton : components.CloseButton) != null ? _ref : _IconButton.default;
|
|
193
|
+
const AlertCloseIcon = (_ref2 = (_slots$closeIcon = slots.closeIcon) != null ? _slots$closeIcon : components.CloseIcon) != null ? _ref2 : _Close.default;
|
|
194
|
+
const closeButtonProps = (_slotProps$closeButto = slotProps.closeButton) != null ? _slotProps$closeButto : componentsProps.closeButton;
|
|
195
|
+
const closeIconProps = (_slotProps$closeIcon = slotProps.closeIcon) != null ? _slotProps$closeIcon : componentsProps.closeIcon;
|
|
192
196
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(AlertRoot, (0, _extends2.default)({
|
|
193
197
|
role: role,
|
|
194
198
|
elevation: 0,
|
|
@@ -217,10 +221,10 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
217
221
|
title: closeText,
|
|
218
222
|
color: "inherit",
|
|
219
223
|
onClick: onClose
|
|
220
|
-
},
|
|
224
|
+
}, closeButtonProps, {
|
|
221
225
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AlertCloseIcon, (0, _extends2.default)({
|
|
222
226
|
fontSize: "small"
|
|
223
|
-
},
|
|
227
|
+
}, closeIconProps))
|
|
224
228
|
}))
|
|
225
229
|
}) : null]
|
|
226
230
|
}));
|
|
@@ -271,8 +275,11 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
|
|
|
271
275
|
.oneOfType([_propTypes.default.oneOf(['error', 'info', 'success', 'warning']), _propTypes.default.string]),
|
|
272
276
|
|
|
273
277
|
/**
|
|
274
|
-
* The components used for each slot inside
|
|
275
|
-
*
|
|
278
|
+
* The components used for each slot inside.
|
|
279
|
+
*
|
|
280
|
+
* This prop is an alias for the `slots` prop.
|
|
281
|
+
* It's recommended to use the `slots` prop instead.
|
|
282
|
+
*
|
|
276
283
|
* @default {}
|
|
277
284
|
*/
|
|
278
285
|
components: _propTypes.default.shape({
|
|
@@ -281,7 +288,12 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
|
|
|
281
288
|
}),
|
|
282
289
|
|
|
283
290
|
/**
|
|
284
|
-
* The props
|
|
291
|
+
* The extra props for the slot components.
|
|
292
|
+
* You can override the existing props or add new ones.
|
|
293
|
+
*
|
|
294
|
+
* This prop is an alias for the `slotProps` prop.
|
|
295
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
296
|
+
*
|
|
285
297
|
* @default {}
|
|
286
298
|
*/
|
|
287
299
|
componentsProps: _propTypes.default.shape({
|
|
@@ -328,6 +340,31 @@ process.env.NODE_ENV !== "production" ? Alert.propTypes
|
|
|
328
340
|
*/
|
|
329
341
|
severity: _propTypes.default.oneOf(['error', 'info', 'success', 'warning']),
|
|
330
342
|
|
|
343
|
+
/**
|
|
344
|
+
* The extra props for the slot components.
|
|
345
|
+
* You can override the existing props or add new ones.
|
|
346
|
+
*
|
|
347
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
348
|
+
*
|
|
349
|
+
* @default {}
|
|
350
|
+
*/
|
|
351
|
+
slotProps: _propTypes.default.shape({
|
|
352
|
+
closeButton: _propTypes.default.object,
|
|
353
|
+
closeIcon: _propTypes.default.object
|
|
354
|
+
}),
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* The components used for each slot inside.
|
|
358
|
+
*
|
|
359
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
360
|
+
*
|
|
361
|
+
* @default {}
|
|
362
|
+
*/
|
|
363
|
+
slots: _propTypes.default.shape({
|
|
364
|
+
closeButton: _propTypes.default.elementType,
|
|
365
|
+
closeIcon: _propTypes.default.elementType
|
|
366
|
+
}),
|
|
367
|
+
|
|
331
368
|
/**
|
|
332
369
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
333
370
|
*/
|
|
@@ -258,6 +258,16 @@ export interface AutocompleteProps<
|
|
|
258
258
|
* @default 'medium'
|
|
259
259
|
*/
|
|
260
260
|
size?: OverridableStringUnion<'small' | 'medium', AutocompletePropsSizeOverrides>;
|
|
261
|
+
/**
|
|
262
|
+
* The props used for each slot inside.
|
|
263
|
+
* @default {}
|
|
264
|
+
*/
|
|
265
|
+
slotProps?: {
|
|
266
|
+
clearIndicator?: Partial<IconButtonProps>;
|
|
267
|
+
paper?: PaperProps;
|
|
268
|
+
popper?: Partial<PopperProps>;
|
|
269
|
+
popupIndicator?: Partial<IconButtonProps>;
|
|
270
|
+
};
|
|
261
271
|
/**
|
|
262
272
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
263
273
|
*/
|
|
@@ -63,7 +63,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
63
63
|
|
|
64
64
|
var _ClearIcon, _ArrowDropDownIcon;
|
|
65
65
|
|
|
66
|
-
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"];
|
|
66
|
+
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"];
|
|
67
67
|
|
|
68
68
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
69
69
|
|
|
@@ -393,7 +393,7 @@ const AutocompleteGroupUl = (0, _styled.default)('ul', {
|
|
|
393
393
|
}
|
|
394
394
|
});
|
|
395
395
|
const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps, ref) {
|
|
396
|
-
var
|
|
396
|
+
var _slotProps$clearIndic, _slotProps$paper, _slotProps$popper, _slotProps$popupIndic;
|
|
397
397
|
|
|
398
398
|
const props = (0, _useThemeProps.default)({
|
|
399
399
|
props: inProps,
|
|
@@ -454,7 +454,8 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
454
454
|
renderOption: renderOptionProp,
|
|
455
455
|
renderTags,
|
|
456
456
|
selectOnFocus = !props.freeSolo,
|
|
457
|
-
size = 'medium'
|
|
457
|
+
size = 'medium',
|
|
458
|
+
slotProps = {}
|
|
458
459
|
} = props,
|
|
459
460
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
460
461
|
/* eslint-enable @typescript-eslint/no-unused-vars */
|
|
@@ -561,6 +562,10 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
561
562
|
});
|
|
562
563
|
};
|
|
563
564
|
|
|
565
|
+
const clearIndicatorSlotProps = (_slotProps$clearIndic = slotProps.clearIndicator) != null ? _slotProps$clearIndic : componentsProps.clearIndicator;
|
|
566
|
+
const paperSlotProps = (_slotProps$paper = slotProps.paper) != null ? _slotProps$paper : componentsProps.paper;
|
|
567
|
+
const popperSlotProps = (_slotProps$popper = slotProps.popper) != null ? _slotProps$popper : componentsProps.popper;
|
|
568
|
+
const popupIndicatorSlotProps = (_slotProps$popupIndic = slotProps.popupIndicator) != null ? _slotProps$popupIndic : componentsProps.popupIndicator;
|
|
564
569
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
565
570
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteRoot, (0, _extends2.default)({
|
|
566
571
|
ref: ref,
|
|
@@ -585,16 +590,16 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
585
590
|
"aria-label": clearText,
|
|
586
591
|
title: clearText,
|
|
587
592
|
ownerState: ownerState
|
|
588
|
-
},
|
|
589
|
-
className: (0, _clsx.default)(classes.clearIndicator,
|
|
593
|
+
}, clearIndicatorSlotProps, {
|
|
594
|
+
className: (0, _clsx.default)(classes.clearIndicator, clearIndicatorSlotProps == null ? void 0 : clearIndicatorSlotProps.className),
|
|
590
595
|
children: clearIcon
|
|
591
596
|
})) : null, hasPopupIcon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompletePopupIndicator, (0, _extends2.default)({}, getPopupIndicatorProps(), {
|
|
592
597
|
disabled: disabled,
|
|
593
598
|
"aria-label": popupOpen ? closeText : openText,
|
|
594
599
|
title: popupOpen ? closeText : openText,
|
|
595
600
|
ownerState: ownerState
|
|
596
|
-
},
|
|
597
|
-
className: (0, _clsx.default)(classes.popupIndicator,
|
|
601
|
+
}, popupIndicatorSlotProps, {
|
|
602
|
+
className: (0, _clsx.default)(classes.popupIndicator, popupIndicatorSlotProps == null ? void 0 : popupIndicatorSlotProps.className),
|
|
598
603
|
children: popupIcon
|
|
599
604
|
})) : null]
|
|
600
605
|
})
|
|
@@ -615,13 +620,13 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
615
620
|
role: "presentation",
|
|
616
621
|
anchorEl: anchorEl,
|
|
617
622
|
open: popupOpen
|
|
618
|
-
},
|
|
619
|
-
className: (0, _clsx.default)(classes.popper,
|
|
623
|
+
}, popperSlotProps, {
|
|
624
|
+
className: (0, _clsx.default)(classes.popper, popperSlotProps == null ? void 0 : popperSlotProps.className),
|
|
620
625
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(AutocompletePaper, (0, _extends2.default)({
|
|
621
626
|
ownerState: ownerState,
|
|
622
627
|
as: PaperComponent
|
|
623
|
-
},
|
|
624
|
-
className: (0, _clsx.default)(classes.paper,
|
|
628
|
+
}, paperSlotProps, {
|
|
629
|
+
className: (0, _clsx.default)(classes.paper, paperSlotProps == null ? void 0 : paperSlotProps.className),
|
|
625
630
|
children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(AutocompleteLoading, {
|
|
626
631
|
className: classes.loading,
|
|
627
632
|
ownerState: ownerState,
|
|
@@ -1105,6 +1110,17 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
|
|
|
1105
1110
|
/* @typescript-to-proptypes-ignore */
|
|
1106
1111
|
.oneOfType([_propTypes.default.oneOf(['small', 'medium']), _propTypes.default.string]),
|
|
1107
1112
|
|
|
1113
|
+
/**
|
|
1114
|
+
* The props used for each slot inside.
|
|
1115
|
+
* @default {}
|
|
1116
|
+
*/
|
|
1117
|
+
slotProps: _propTypes.default.shape({
|
|
1118
|
+
clearIndicator: _propTypes.default.object,
|
|
1119
|
+
paper: _propTypes.default.object,
|
|
1120
|
+
popper: _propTypes.default.object,
|
|
1121
|
+
popupIndicator: _propTypes.default.object
|
|
1122
|
+
}),
|
|
1123
|
+
|
|
1108
1124
|
/**
|
|
1109
1125
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
1110
1126
|
*/
|
|
@@ -23,7 +23,12 @@ export interface AvatarGroupProps extends StandardProps<React.HTMLAttributes<HTM
|
|
|
23
23
|
*/
|
|
24
24
|
component?: React.ElementType;
|
|
25
25
|
/**
|
|
26
|
-
* The props
|
|
26
|
+
* The extra props for the slot components.
|
|
27
|
+
* You can override the existing props or add new ones.
|
|
28
|
+
*
|
|
29
|
+
* This prop is an alias for the `slotProps` prop.
|
|
30
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
31
|
+
*
|
|
27
32
|
* @default {}
|
|
28
33
|
*/
|
|
29
34
|
componentsProps?: {
|
|
@@ -35,6 +40,18 @@ export interface AvatarGroupProps extends StandardProps<React.HTMLAttributes<HTM
|
|
|
35
40
|
* @default 5
|
|
36
41
|
*/
|
|
37
42
|
max?: number;
|
|
43
|
+
/**
|
|
44
|
+
* The extra props for the slot components.
|
|
45
|
+
* You can override the existing props or add new ones.
|
|
46
|
+
*
|
|
47
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
48
|
+
*
|
|
49
|
+
* @default {}
|
|
50
|
+
*/
|
|
51
|
+
slotProps?: {
|
|
52
|
+
additionalAvatar?: React.ComponentPropsWithRef<typeof Avatar> &
|
|
53
|
+
AvatarGroupComponentsPropsOverrides;
|
|
54
|
+
};
|
|
38
55
|
/**
|
|
39
56
|
* Spacing between avatars.
|
|
40
57
|
* @default 'medium'
|
|
@@ -33,7 +33,7 @@ var _avatarGroupClasses = _interopRequireWildcard(require("./avatarGroupClasses"
|
|
|
33
33
|
|
|
34
34
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
35
35
|
|
|
36
|
-
const _excluded = ["children", "className", "component", "componentsProps", "max", "spacing", "total", "variant"];
|
|
36
|
+
const _excluded = ["children", "className", "component", "componentsProps", "max", "slotProps", "spacing", "total", "variant"];
|
|
37
37
|
|
|
38
38
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
39
39
|
|
|
@@ -90,7 +90,7 @@ const AvatarGroupAvatar = (0, _styled.default)(_Avatar.default, {
|
|
|
90
90
|
}
|
|
91
91
|
}));
|
|
92
92
|
const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps, ref) {
|
|
93
|
-
var
|
|
93
|
+
var _slotProps$additional;
|
|
94
94
|
|
|
95
95
|
const props = (0, _useThemeProps.default)({
|
|
96
96
|
props: inProps,
|
|
@@ -102,6 +102,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
102
102
|
component = 'div',
|
|
103
103
|
componentsProps = {},
|
|
104
104
|
max = 5,
|
|
105
|
+
slotProps = {},
|
|
105
106
|
spacing = 'medium',
|
|
106
107
|
total,
|
|
107
108
|
variant = 'circular'
|
|
@@ -134,6 +135,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
134
135
|
const maxAvatars = Math.min(children.length, clampedMax - 1);
|
|
135
136
|
const extraAvatars = Math.max(totalAvatars - clampedMax, totalAvatars - maxAvatars, 0);
|
|
136
137
|
const marginLeft = spacing && SPACINGS[spacing] !== undefined ? SPACINGS[spacing] : -spacing;
|
|
138
|
+
const additionalAvatarSlotProps = (_slotProps$additional = slotProps.additionalAvatar) != null ? _slotProps$additional : componentsProps.additionalAvatar;
|
|
137
139
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(AvatarGroupRoot, (0, _extends2.default)({
|
|
138
140
|
as: component,
|
|
139
141
|
ownerState: ownerState,
|
|
@@ -143,11 +145,11 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
143
145
|
children: [extraAvatars ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(AvatarGroupAvatar, (0, _extends2.default)({
|
|
144
146
|
ownerState: ownerState,
|
|
145
147
|
variant: variant
|
|
146
|
-
},
|
|
147
|
-
className: (0, _clsx.default)(classes.avatar,
|
|
148
|
+
}, additionalAvatarSlotProps, {
|
|
149
|
+
className: (0, _clsx.default)(classes.avatar, additionalAvatarSlotProps == null ? void 0 : additionalAvatarSlotProps.className),
|
|
148
150
|
style: (0, _extends2.default)({
|
|
149
151
|
marginLeft
|
|
150
|
-
},
|
|
152
|
+
}, additionalAvatarSlotProps == null ? void 0 : additionalAvatarSlotProps.style),
|
|
151
153
|
children: ["+", extraAvatars]
|
|
152
154
|
})) : null, children.slice(0, maxAvatars).reverse().map((child, index) => {
|
|
153
155
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
@@ -192,7 +194,12 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
|
|
|
192
194
|
component: _propTypes.default.elementType,
|
|
193
195
|
|
|
194
196
|
/**
|
|
195
|
-
* The props
|
|
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 `slotProps` prop.
|
|
201
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
202
|
+
*
|
|
196
203
|
* @default {}
|
|
197
204
|
*/
|
|
198
205
|
componentsProps: _propTypes.default.shape({
|
|
@@ -211,6 +218,18 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
|
|
|
211
218
|
return null;
|
|
212
219
|
}),
|
|
213
220
|
|
|
221
|
+
/**
|
|
222
|
+
* The extra props for the slot components.
|
|
223
|
+
* You can override the existing props or add new ones.
|
|
224
|
+
*
|
|
225
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
226
|
+
*
|
|
227
|
+
* @default {}
|
|
228
|
+
*/
|
|
229
|
+
slotProps: _propTypes.default.shape({
|
|
230
|
+
additionalAvatar: _propTypes.default.object
|
|
231
|
+
}),
|
|
232
|
+
|
|
214
233
|
/**
|
|
215
234
|
* Spacing between avatars.
|
|
216
235
|
* @default 'medium'
|
package/Backdrop/Backdrop.d.ts
CHANGED
|
@@ -16,15 +16,23 @@ export interface BackdropTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
|
16
16
|
*/
|
|
17
17
|
children?: React.ReactNode;
|
|
18
18
|
/**
|
|
19
|
-
* The components used for each slot inside
|
|
20
|
-
*
|
|
19
|
+
* The components used for each slot inside.
|
|
20
|
+
*
|
|
21
|
+
* This prop is an alias for the `slots` prop.
|
|
22
|
+
* It's recommended to use the `slots` prop instead.
|
|
23
|
+
*
|
|
21
24
|
* @default {}
|
|
22
25
|
*/
|
|
23
26
|
components?: {
|
|
24
27
|
Root?: React.ElementType;
|
|
25
28
|
};
|
|
26
29
|
/**
|
|
27
|
-
* The props
|
|
30
|
+
* The extra props for the slot components.
|
|
31
|
+
* You can override the existing props or add new ones.
|
|
32
|
+
*
|
|
33
|
+
* This prop is an alias for the `slotProps` prop.
|
|
34
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
35
|
+
*
|
|
28
36
|
* @default {}
|
|
29
37
|
*/
|
|
30
38
|
componentsProps?: {
|
|
@@ -44,6 +52,28 @@ export interface BackdropTypeMap<P = {}, D extends React.ElementType = 'div'> {
|
|
|
44
52
|
* If `true`, the component is shown.
|
|
45
53
|
*/
|
|
46
54
|
open: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* The extra props for the slot components.
|
|
57
|
+
* You can override the existing props or add new ones.
|
|
58
|
+
*
|
|
59
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
60
|
+
*
|
|
61
|
+
* @default {}
|
|
62
|
+
*/
|
|
63
|
+
slotProps?: {
|
|
64
|
+
root?: React.HTMLAttributes<HTMLDivElement> & BackdropComponentsPropsOverrides;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* The components used for each slot inside.
|
|
68
|
+
*
|
|
69
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
70
|
+
*
|
|
71
|
+
* @default {}
|
|
72
|
+
*/
|
|
73
|
+
slots?: {
|
|
74
|
+
root?: React.ElementType;
|
|
75
|
+
};
|
|
76
|
+
|
|
47
77
|
/**
|
|
48
78
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
49
79
|
*/
|
package/Backdrop/Backdrop.js
CHANGED
|
@@ -29,7 +29,7 @@ var _backdropClasses = require("./backdropClasses");
|
|
|
29
29
|
|
|
30
30
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
31
31
|
|
|
32
|
-
const _excluded = ["children", "component", "components", "componentsProps", "className", "invisible", "open", "transitionDuration", "TransitionComponent"];
|
|
32
|
+
const _excluded = ["children", "component", "components", "componentsProps", "className", "invisible", "open", "slotProps", "slots", "transitionDuration", "TransitionComponent"];
|
|
33
33
|
|
|
34
34
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
35
|
|
|
@@ -72,7 +72,7 @@ const BackdropRoot = (0, _styled.default)('div', {
|
|
|
72
72
|
backgroundColor: 'transparent'
|
|
73
73
|
}));
|
|
74
74
|
const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
|
|
75
|
-
var
|
|
75
|
+
var _slotProps$root, _ref, _slots$root;
|
|
76
76
|
|
|
77
77
|
const props = (0, _useThemeProps.default)({
|
|
78
78
|
props: inProps,
|
|
@@ -86,6 +86,8 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
|
|
|
86
86
|
className,
|
|
87
87
|
invisible = false,
|
|
88
88
|
open,
|
|
89
|
+
slotProps = {},
|
|
90
|
+
slots = {},
|
|
89
91
|
transitionDuration,
|
|
90
92
|
// eslint-disable-next-line react/prop-types
|
|
91
93
|
TransitionComponent = _Fade.default
|
|
@@ -96,19 +98,21 @@ const Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(inProps, ref) {
|
|
|
96
98
|
invisible
|
|
97
99
|
});
|
|
98
100
|
const classes = useUtilityClasses(ownerState);
|
|
101
|
+
const rootSlotProps = (_slotProps$root = slotProps.root) != null ? _slotProps$root : componentsProps.root;
|
|
99
102
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TransitionComponent, (0, _extends2.default)({
|
|
100
103
|
in: open,
|
|
101
104
|
timeout: transitionDuration
|
|
102
105
|
}, other, {
|
|
103
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(BackdropRoot, {
|
|
104
|
-
"aria-hidden": true
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(BackdropRoot, (0, _extends2.default)({
|
|
107
|
+
"aria-hidden": true
|
|
108
|
+
}, rootSlotProps, {
|
|
109
|
+
as: (_ref = (_slots$root = slots.root) != null ? _slots$root : components.Root) != null ? _ref : component,
|
|
110
|
+
className: (0, _clsx.default)(classes.root, className, rootSlotProps == null ? void 0 : rootSlotProps.className),
|
|
111
|
+
ownerState: (0, _extends2.default)({}, ownerState, rootSlotProps == null ? void 0 : rootSlotProps.ownerState),
|
|
108
112
|
classes: classes,
|
|
109
113
|
ref: ref,
|
|
110
114
|
children: children
|
|
111
|
-
})
|
|
115
|
+
}))
|
|
112
116
|
}));
|
|
113
117
|
});
|
|
114
118
|
process.env.NODE_ENV !== "production" ? Backdrop.propTypes
|
|
@@ -141,8 +145,11 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
|
|
|
141
145
|
component: _propTypes.default.elementType,
|
|
142
146
|
|
|
143
147
|
/**
|
|
144
|
-
* The components used for each slot inside
|
|
145
|
-
*
|
|
148
|
+
* The components used for each slot inside.
|
|
149
|
+
*
|
|
150
|
+
* This prop is an alias for the `slots` prop.
|
|
151
|
+
* It's recommended to use the `slots` prop instead.
|
|
152
|
+
*
|
|
146
153
|
* @default {}
|
|
147
154
|
*/
|
|
148
155
|
components: _propTypes.default.shape({
|
|
@@ -150,7 +157,12 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
|
|
|
150
157
|
}),
|
|
151
158
|
|
|
152
159
|
/**
|
|
153
|
-
* The props
|
|
160
|
+
* The extra props for the slot components.
|
|
161
|
+
* You can override the existing props or add new ones.
|
|
162
|
+
*
|
|
163
|
+
* This prop is an alias for the `slotProps` prop.
|
|
164
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
165
|
+
*
|
|
154
166
|
* @default {}
|
|
155
167
|
*/
|
|
156
168
|
componentsProps: _propTypes.default.shape({
|
|
@@ -169,6 +181,29 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes
|
|
|
169
181
|
*/
|
|
170
182
|
open: _propTypes.default.bool.isRequired,
|
|
171
183
|
|
|
184
|
+
/**
|
|
185
|
+
* The extra props for the slot components.
|
|
186
|
+
* You can override the existing props or add new ones.
|
|
187
|
+
*
|
|
188
|
+
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
189
|
+
*
|
|
190
|
+
* @default {}
|
|
191
|
+
*/
|
|
192
|
+
slotProps: _propTypes.default.shape({
|
|
193
|
+
root: _propTypes.default.object
|
|
194
|
+
}),
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* The components used for each slot inside.
|
|
198
|
+
*
|
|
199
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
200
|
+
*
|
|
201
|
+
* @default {}
|
|
202
|
+
*/
|
|
203
|
+
slots: _propTypes.default.shape({
|
|
204
|
+
root: _propTypes.default.elementType
|
|
205
|
+
}),
|
|
206
|
+
|
|
172
207
|
/**
|
|
173
208
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
174
209
|
*/
|
package/Badge/Badge.d.ts
CHANGED
|
@@ -47,13 +47,21 @@ export type BadgeTypeMap<
|
|
|
47
47
|
BadgePropsColorOverrides
|
|
48
48
|
>;
|
|
49
49
|
/**
|
|
50
|
-
* The props
|
|
50
|
+
* The extra props for the slot components.
|
|
51
|
+
* You can override the existing props or add new ones.
|
|
52
|
+
*
|
|
53
|
+
* This prop is an alias for the `slotProps` prop.
|
|
54
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
55
|
+
*
|
|
51
56
|
* @default {}
|
|
52
57
|
*/
|
|
53
58
|
componentsProps?: BadgeUnstyledTypeMap['props']['slotProps'];
|
|
54
59
|
/**
|
|
55
|
-
* The components used for each slot inside
|
|
56
|
-
*
|
|
60
|
+
* The components used for each slot inside.
|
|
61
|
+
*
|
|
62
|
+
* This prop is an alias for the `slots` prop.
|
|
63
|
+
* It's recommended to use the `slots` prop instead.
|
|
64
|
+
*
|
|
57
65
|
* @default {}
|
|
58
66
|
*/
|
|
59
67
|
components?: {
|
package/Badge/Badge.js
CHANGED
|
@@ -340,8 +340,11 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
|
|
|
340
340
|
component: _propTypes.default.elementType,
|
|
341
341
|
|
|
342
342
|
/**
|
|
343
|
-
* The components used for each slot inside
|
|
344
|
-
*
|
|
343
|
+
* The components used for each slot inside.
|
|
344
|
+
*
|
|
345
|
+
* This prop is an alias for the `slots` prop.
|
|
346
|
+
* It's recommended to use the `slots` prop instead.
|
|
347
|
+
*
|
|
345
348
|
* @default {}
|
|
346
349
|
*/
|
|
347
350
|
components: _propTypes.default.shape({
|
|
@@ -350,7 +353,12 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
|
|
|
350
353
|
}),
|
|
351
354
|
|
|
352
355
|
/**
|
|
353
|
-
* The props
|
|
356
|
+
* The extra props for the slot components.
|
|
357
|
+
* You can override the existing props or add new ones.
|
|
358
|
+
*
|
|
359
|
+
* This prop is an alias for the `slotProps` prop.
|
|
360
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
361
|
+
*
|
|
354
362
|
* @default {}
|
|
355
363
|
*/
|
|
356
364
|
componentsProps: _propTypes.default.shape({
|
|
@@ -211,7 +211,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
211
211
|
nextKey.current += 1;
|
|
212
212
|
rippleCallback.current = cb;
|
|
213
213
|
}, [classes]);
|
|
214
|
-
const start = React.useCallback((event = {}, options = {}, cb) => {
|
|
214
|
+
const start = React.useCallback((event = {}, options = {}, cb = () => {}) => {
|
|
215
215
|
const {
|
|
216
216
|
pulsate = false,
|
|
217
217
|
center = centerProp || options.pulsate,
|