@mui/material 5.10.12 → 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/Accordion/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/Alert.d.ts +34 -3
- package/Alert/Alert.js +46 -9
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/Autocomplete.d.ts +10 -0
- package/Autocomplete/Autocomplete.js +27 -11
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/AvatarGroup.d.ts +18 -1
- package/AvatarGroup/AvatarGroup.js +25 -6
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/Backdrop.d.ts +33 -3
- package/Backdrop/Backdrop.js +46 -11
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/Badge.d.ts +11 -3
- package/Badge/Badge.js +11 -3
- package/Badge/badgeClasses.d.ts +56 -56
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/buttonClasses.d.ts +100 -100
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +58 -0
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/chipClasses.d.ts +96 -96
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +6 -6
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/FilledInput.js +48 -9
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/FormControlLabel.d.ts +12 -0
- package/FormControlLabel/FormControlLabel.js +17 -5
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +26 -26
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/Input.js +49 -10
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/InputBase.d.ts +34 -3
- package/InputBase/InputBase.js +45 -8
- package/InputBase/inputBaseClasses.d.ts +46 -46
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/getTextDecoration.d.ts +15 -15
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/ListItem.d.ts +32 -3
- package/ListItem/ListItem.js +41 -9
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/Modal/Modal.d.ts +11 -3
- package/Modal/Modal.js +11 -3
- package/NativeSelect/NativeSelectInput.js +11 -9
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/OutlinedInput.js +26 -8
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/OverridableComponentAugmentation.d.ts +31 -31
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/PaginationItem.d.ts +19 -7
- package/PaginationItem/PaginationItem.js +31 -22
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +37 -37
- package/README.md +1 -0
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/Select.d.ts +3 -3
- package/Select/Select.js +3 -3
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +26 -26
- package/Slider/Slider.d.ts +14 -2
- package/Slider/Slider.js +12 -3
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/StepLabel.d.ts +11 -0
- package/StepLabel/StepLabel.js +15 -3
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +26 -26
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/Tooltip.d.ts +43 -6
- package/Tooltip/Tooltip.js +68 -31
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/Unstable_Grid2/Grid2.d.ts +4 -4
- package/Unstable_Grid2/Grid2Props.d.ts +15 -15
- package/Unstable_Grid2/grid2Classes.d.ts +5 -5
- package/Unstable_Grid2/index.d.ts +4 -4
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- 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/BottomNavigation/BottomNavigation.js +0 -0
- package/esm/FilledInput/FilledInput.js +48 -9
- 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 +41 -9
- 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/Select/Select.js +3 -3
- package/esm/Slider/Slider.js +12 -3
- package/esm/StepLabel/StepLabel.js +15 -3
- package/esm/Tooltip/Tooltip.js +68 -31
- package/generateUtilityClass/index.d.ts +2 -2
- package/generateUtilityClasses/index.d.ts +1 -1
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- 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/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/FilledInput/FilledInput.js +49 -9
- 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 +42 -8
- 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/Select/Select.js +3 -3
- package/legacy/Slider/Slider.js +12 -3
- package/legacy/StepLabel/StepLabel.js +16 -3
- package/legacy/Tooltip/Tooltip.js +63 -22
- package/legacy/index.js +1 -1
- package/locale/index.d.ts +72 -72
- 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/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/FilledInput/FilledInput.js +46 -9
- 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 +41 -9
- 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/Select/Select.js +3 -3
- package/modern/Slider/Slider.js +12 -3
- package/modern/StepLabel/StepLabel.js +13 -3
- package/modern/Tooltip/Tooltip.js +58 -17
- package/modern/index.js +1 -1
- package/package.json +4 -4
- package/styles/CssVarsProvider.d.ts +14 -14
- package/styles/excludeVariablesFromRoot.d.ts +5 -5
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/umd/material-ui.development.js +534 -165
- package/umd/material-ui.production.min.js +14 -14
- package/useMediaQuery/useMediaQuery.d.ts +31 -31
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
|
@@ -204,12 +204,7 @@ var PaginationItem = /*#__PURE__*/React.forwardRef(function PaginationItem(inPro
|
|
|
204
204
|
color = _props$color === void 0 ? 'standard' : _props$color,
|
|
205
205
|
component = props.component,
|
|
206
206
|
_props$components = props.components,
|
|
207
|
-
components = _props$components === void 0 ? {
|
|
208
|
-
first: FirstPageIcon,
|
|
209
|
-
last: LastPageIcon,
|
|
210
|
-
next: NavigateNextIcon,
|
|
211
|
-
previous: NavigateBeforeIcon
|
|
212
|
-
} : _props$components,
|
|
207
|
+
components = _props$components === void 0 ? {} : _props$components,
|
|
213
208
|
_props$disabled = props.disabled,
|
|
214
209
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
215
210
|
page = props.page,
|
|
@@ -219,11 +214,13 @@ var PaginationItem = /*#__PURE__*/React.forwardRef(function PaginationItem(inPro
|
|
|
219
214
|
shape = _props$shape === void 0 ? 'circular' : _props$shape,
|
|
220
215
|
_props$size = props.size,
|
|
221
216
|
size = _props$size === void 0 ? 'medium' : _props$size,
|
|
217
|
+
_props$slots = props.slots,
|
|
218
|
+
slots = _props$slots === void 0 ? {} : _props$slots,
|
|
222
219
|
_props$type = props.type,
|
|
223
220
|
type = _props$type === void 0 ? 'page' : _props$type,
|
|
224
221
|
_props$variant = props.variant,
|
|
225
222
|
variant = _props$variant === void 0 ? 'text' : _props$variant,
|
|
226
|
-
other = _objectWithoutProperties(props, ["className", "color", "component", "components", "disabled", "page", "selected", "shape", "size", "type", "variant"]);
|
|
223
|
+
other = _objectWithoutProperties(props, ["className", "color", "component", "components", "disabled", "page", "selected", "shape", "size", "slots", "type", "variant"]);
|
|
227
224
|
|
|
228
225
|
var ownerState = _extends({}, props, {
|
|
229
226
|
color: color,
|
|
@@ -238,15 +235,15 @@ var PaginationItem = /*#__PURE__*/React.forwardRef(function PaginationItem(inPro
|
|
|
238
235
|
var theme = useTheme();
|
|
239
236
|
var classes = useUtilityClasses(ownerState);
|
|
240
237
|
var normalizedIcons = theme.direction === 'rtl' ? {
|
|
241
|
-
previous: components.next || NavigateNextIcon,
|
|
242
|
-
next: components.previous || NavigateBeforeIcon,
|
|
243
|
-
last: components.first || FirstPageIcon,
|
|
244
|
-
first: components.last || LastPageIcon
|
|
238
|
+
previous: slots.next || components.next || NavigateNextIcon,
|
|
239
|
+
next: slots.previous || components.previous || NavigateBeforeIcon,
|
|
240
|
+
last: slots.first || components.first || FirstPageIcon,
|
|
241
|
+
first: slots.last || components.last || LastPageIcon
|
|
245
242
|
} : {
|
|
246
|
-
previous: components.previous || NavigateBeforeIcon,
|
|
247
|
-
next: components.next || NavigateNextIcon,
|
|
248
|
-
first: components.first || FirstPageIcon,
|
|
249
|
-
last: components.last || LastPageIcon
|
|
243
|
+
previous: slots.previous || components.previous || NavigateBeforeIcon,
|
|
244
|
+
next: slots.next || components.next || NavigateNextIcon,
|
|
245
|
+
first: slots.first || components.first || FirstPageIcon,
|
|
246
|
+
last: slots.last || components.last || LastPageIcon
|
|
250
247
|
};
|
|
251
248
|
var Icon = normalizedIcons[type];
|
|
252
249
|
return type === 'start-ellipsis' || type === 'end-ellipsis' ? /*#__PURE__*/_jsx(PaginationItemEllipsis, {
|
|
@@ -308,13 +305,12 @@ process.env.NODE_ENV !== "production" ? PaginationItem.propTypes
|
|
|
308
305
|
component: PropTypes.elementType,
|
|
309
306
|
|
|
310
307
|
/**
|
|
311
|
-
* The components used for
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
*
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
* }
|
|
308
|
+
* The components used for each slot inside.
|
|
309
|
+
*
|
|
310
|
+
* This prop is an alias for the `slots` prop.
|
|
311
|
+
* It's recommended to use the `slots` prop instead.
|
|
312
|
+
*
|
|
313
|
+
* @default {}
|
|
318
314
|
*/
|
|
319
315
|
components: PropTypes.shape({
|
|
320
316
|
first: PropTypes.elementType,
|
|
@@ -354,6 +350,20 @@ process.env.NODE_ENV !== "production" ? PaginationItem.propTypes
|
|
|
354
350
|
/* @typescript-to-proptypes-ignore */
|
|
355
351
|
.oneOfType([PropTypes.oneOf(['small', 'medium', 'large']), PropTypes.string]),
|
|
356
352
|
|
|
353
|
+
/**
|
|
354
|
+
* The components used for each slot inside.
|
|
355
|
+
*
|
|
356
|
+
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
357
|
+
*
|
|
358
|
+
* @default {}
|
|
359
|
+
*/
|
|
360
|
+
slots: PropTypes.shape({
|
|
361
|
+
first: PropTypes.elementType,
|
|
362
|
+
last: PropTypes.elementType,
|
|
363
|
+
next: PropTypes.elementType,
|
|
364
|
+
previous: PropTypes.elementType
|
|
365
|
+
}),
|
|
366
|
+
|
|
357
367
|
/**
|
|
358
368
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
359
369
|
*/
|
package/legacy/Select/Select.js
CHANGED
|
@@ -251,14 +251,14 @@ process.env.NODE_ENV !== "production" ? Select.propTypes
|
|
|
251
251
|
*
|
|
252
252
|
* @param {SelectChangeEvent<T>} event The event source of the callback.
|
|
253
253
|
* You can pull out the new value by accessing `event.target.value` (any).
|
|
254
|
-
* **Warning**: This is a generic event not a change event unless the change event is caused by browser autofill.
|
|
254
|
+
* **Warning**: This is a generic event, not a change event, unless the change event is caused by browser autofill.
|
|
255
255
|
* @param {object} [child] The react element that was selected when `native` is `false` (default).
|
|
256
256
|
*/
|
|
257
257
|
onChange: PropTypes.func,
|
|
258
258
|
|
|
259
259
|
/**
|
|
260
260
|
* Callback fired when the component requests to be closed.
|
|
261
|
-
* Use in controlled
|
|
261
|
+
* Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select collapes).
|
|
262
262
|
*
|
|
263
263
|
* @param {object} event The event source of the callback.
|
|
264
264
|
*/
|
|
@@ -266,7 +266,7 @@ process.env.NODE_ENV !== "production" ? Select.propTypes
|
|
|
266
266
|
|
|
267
267
|
/**
|
|
268
268
|
* Callback fired when the component requests to be opened.
|
|
269
|
-
* Use in controlled
|
|
269
|
+
* Use it in either controlled (see the `open` prop), or uncontrolled mode (to detect when the Select expands).
|
|
270
270
|
*
|
|
271
271
|
* @param {object} event The event source of the callback.
|
|
272
272
|
*/
|
package/legacy/Slider/Slider.js
CHANGED
|
@@ -594,8 +594,11 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
|
|
|
594
594
|
.oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
|
|
595
595
|
|
|
596
596
|
/**
|
|
597
|
-
* The components used for each slot inside
|
|
598
|
-
*
|
|
597
|
+
* The components used for each slot inside.
|
|
598
|
+
*
|
|
599
|
+
* This prop is an alias for the `slots` prop.
|
|
600
|
+
* It's recommended to use the `slots` prop instead.
|
|
601
|
+
*
|
|
599
602
|
* @default {}
|
|
600
603
|
*/
|
|
601
604
|
components: PropTypes.shape({
|
|
@@ -610,7 +613,13 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
|
|
|
610
613
|
}),
|
|
611
614
|
|
|
612
615
|
/**
|
|
613
|
-
*
|
|
616
|
+
* The extra props for the slot components.
|
|
617
|
+
* You can override the existing props or add new ones.
|
|
618
|
+
*
|
|
619
|
+
* This prop is an alias for the `slotProps` prop.
|
|
620
|
+
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
621
|
+
*
|
|
622
|
+
* @default {}
|
|
614
623
|
*/
|
|
615
624
|
componentsProps: PropTypes.shape({
|
|
616
625
|
input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
@@ -113,6 +113,8 @@ var StepLabelLabelContainer = styled('span', {
|
|
|
113
113
|
});
|
|
114
114
|
});
|
|
115
115
|
var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
|
|
116
|
+
var _slotProps$label;
|
|
117
|
+
|
|
116
118
|
var props = useThemeProps({
|
|
117
119
|
props: inProps,
|
|
118
120
|
name: 'MuiStepLabel'
|
|
@@ -126,9 +128,11 @@ var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
|
|
|
126
128
|
error = _props$error === void 0 ? false : _props$error,
|
|
127
129
|
iconProp = props.icon,
|
|
128
130
|
optional = props.optional,
|
|
131
|
+
_props$slotProps = props.slotProps,
|
|
132
|
+
slotProps = _props$slotProps === void 0 ? {} : _props$slotProps,
|
|
129
133
|
StepIconComponentProp = props.StepIconComponent,
|
|
130
134
|
StepIconProps = props.StepIconProps,
|
|
131
|
-
other = _objectWithoutProperties(props, ["children", "className", "componentsProps", "error", "icon", "optional", "StepIconComponent", "StepIconProps"]);
|
|
135
|
+
other = _objectWithoutProperties(props, ["children", "className", "componentsProps", "error", "icon", "optional", "slotProps", "StepIconComponent", "StepIconProps"]);
|
|
132
136
|
|
|
133
137
|
var _React$useContext = React.useContext(StepperContext),
|
|
134
138
|
alternativeLabel = _React$useContext.alternativeLabel,
|
|
@@ -157,6 +161,7 @@ var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
|
|
|
157
161
|
});
|
|
158
162
|
|
|
159
163
|
var classes = useUtilityClasses(ownerState);
|
|
164
|
+
var labelSlotProps = (_slotProps$label = slotProps.label) != null ? _slotProps$label : componentsProps.label;
|
|
160
165
|
return /*#__PURE__*/_jsxs(StepLabelRoot, _extends({
|
|
161
166
|
className: clsx(classes.root, className),
|
|
162
167
|
ref: ref,
|
|
@@ -175,9 +180,9 @@ var StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
|
|
|
175
180
|
className: classes.labelContainer,
|
|
176
181
|
ownerState: ownerState,
|
|
177
182
|
children: [children ? /*#__PURE__*/_jsx(StepLabelLabel, _extends({
|
|
178
|
-
className: classes.label,
|
|
179
183
|
ownerState: ownerState
|
|
180
|
-
},
|
|
184
|
+
}, labelSlotProps, {
|
|
185
|
+
className: clsx(classes.label, labelSlotProps == null ? void 0 : labelSlotProps.className),
|
|
181
186
|
children: children
|
|
182
187
|
})) : null, optional]
|
|
183
188
|
})]
|
|
@@ -230,6 +235,14 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes
|
|
|
230
235
|
*/
|
|
231
236
|
optional: PropTypes.node,
|
|
232
237
|
|
|
238
|
+
/**
|
|
239
|
+
* The props used for each slot inside.
|
|
240
|
+
* @default {}
|
|
241
|
+
*/
|
|
242
|
+
slotProps: PropTypes.shape({
|
|
243
|
+
label: PropTypes.object
|
|
244
|
+
}),
|
|
245
|
+
|
|
233
246
|
/**
|
|
234
247
|
* The component to render in place of the [`StepIcon`](/material-ui/api/step-icon/).
|
|
235
248
|
*/
|
|
@@ -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';
|
|
@@ -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/locale/index.d.ts
CHANGED
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
import { ComponentsPropsList } from '../styles/props';
|
|
2
|
-
export interface Localization {
|
|
3
|
-
components?: {
|
|
4
|
-
MuiAlert?: {
|
|
5
|
-
defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
|
|
6
|
-
};
|
|
7
|
-
MuiBreadcrumbs?: {
|
|
8
|
-
defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
|
|
9
|
-
};
|
|
10
|
-
MuiTablePagination?: {
|
|
11
|
-
defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
|
|
12
|
-
};
|
|
13
|
-
MuiRating?: {
|
|
14
|
-
defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
|
|
15
|
-
};
|
|
16
|
-
MuiAutocomplete?: {
|
|
17
|
-
defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
|
|
18
|
-
};
|
|
19
|
-
MuiPagination?: {
|
|
20
|
-
defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export declare const amET: Localization;
|
|
25
|
-
export declare const arEG: Localization;
|
|
26
|
-
export declare const arSA: Localization;
|
|
27
|
-
export declare const arSD: Localization;
|
|
28
|
-
export declare const azAZ: Localization;
|
|
29
|
-
export declare const bnBD: Localization;
|
|
30
|
-
export declare const bgBG: Localization;
|
|
31
|
-
export declare const caES: Localization;
|
|
32
|
-
export declare const csCZ: Localization;
|
|
33
|
-
export declare const daDK: Localization;
|
|
34
|
-
export declare const deDE: Localization;
|
|
35
|
-
export declare const elGR: Localization;
|
|
36
|
-
export declare const enUS: Localization;
|
|
37
|
-
export declare const esES: Localization;
|
|
38
|
-
export declare const etEE: Localization;
|
|
39
|
-
export declare const faIR: Localization;
|
|
40
|
-
export declare const fiFI: Localization;
|
|
41
|
-
export declare const frFR: Localization;
|
|
42
|
-
export declare const heIL: Localization;
|
|
43
|
-
export declare const hiIN: Localization;
|
|
44
|
-
export declare const hrHR: Localization;
|
|
45
|
-
export declare const huHU: Localization;
|
|
46
|
-
export declare const hyAM: Localization;
|
|
47
|
-
export declare const idID: Localization;
|
|
48
|
-
export declare const isIS: Localization;
|
|
49
|
-
export declare const itIT: Localization;
|
|
50
|
-
export declare const jaJP: Localization;
|
|
51
|
-
export declare const khKH: Localization;
|
|
52
|
-
export declare const koKR: Localization;
|
|
53
|
-
export declare const kzKZ: Localization;
|
|
54
|
-
export declare const mkMK: Localization;
|
|
55
|
-
export declare const nbNO: Localization;
|
|
56
|
-
export declare const nlNL: Localization;
|
|
57
|
-
export declare const plPL: Localization;
|
|
58
|
-
export declare const ptBR: Localization;
|
|
59
|
-
export declare const ptPT: Localization;
|
|
60
|
-
export declare const roRO: Localization;
|
|
61
|
-
export declare const srRS: Localization;
|
|
62
|
-
export declare const ruRU: Localization;
|
|
63
|
-
export declare const siLK: Localization;
|
|
64
|
-
export declare const skSK: Localization;
|
|
65
|
-
export declare const svSE: Localization;
|
|
66
|
-
export declare const thTH: Localization;
|
|
67
|
-
export declare const trTR: Localization;
|
|
68
|
-
export declare const ukUA: Localization;
|
|
69
|
-
export declare const viVN: Localization;
|
|
70
|
-
export declare const zhCN: Localization;
|
|
71
|
-
export declare const zhHK: Localization;
|
|
72
|
-
export declare const zhTW: Localization;
|
|
1
|
+
import { ComponentsPropsList } from '../styles/props';
|
|
2
|
+
export interface Localization {
|
|
3
|
+
components?: {
|
|
4
|
+
MuiAlert?: {
|
|
5
|
+
defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
|
|
6
|
+
};
|
|
7
|
+
MuiBreadcrumbs?: {
|
|
8
|
+
defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
|
|
9
|
+
};
|
|
10
|
+
MuiTablePagination?: {
|
|
11
|
+
defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
|
|
12
|
+
};
|
|
13
|
+
MuiRating?: {
|
|
14
|
+
defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
|
|
15
|
+
};
|
|
16
|
+
MuiAutocomplete?: {
|
|
17
|
+
defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
|
|
18
|
+
};
|
|
19
|
+
MuiPagination?: {
|
|
20
|
+
defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare const amET: Localization;
|
|
25
|
+
export declare const arEG: Localization;
|
|
26
|
+
export declare const arSA: Localization;
|
|
27
|
+
export declare const arSD: Localization;
|
|
28
|
+
export declare const azAZ: Localization;
|
|
29
|
+
export declare const bnBD: Localization;
|
|
30
|
+
export declare const bgBG: Localization;
|
|
31
|
+
export declare const caES: Localization;
|
|
32
|
+
export declare const csCZ: Localization;
|
|
33
|
+
export declare const daDK: Localization;
|
|
34
|
+
export declare const deDE: Localization;
|
|
35
|
+
export declare const elGR: Localization;
|
|
36
|
+
export declare const enUS: Localization;
|
|
37
|
+
export declare const esES: Localization;
|
|
38
|
+
export declare const etEE: Localization;
|
|
39
|
+
export declare const faIR: Localization;
|
|
40
|
+
export declare const fiFI: Localization;
|
|
41
|
+
export declare const frFR: Localization;
|
|
42
|
+
export declare const heIL: Localization;
|
|
43
|
+
export declare const hiIN: Localization;
|
|
44
|
+
export declare const hrHR: Localization;
|
|
45
|
+
export declare const huHU: Localization;
|
|
46
|
+
export declare const hyAM: Localization;
|
|
47
|
+
export declare const idID: Localization;
|
|
48
|
+
export declare const isIS: Localization;
|
|
49
|
+
export declare const itIT: Localization;
|
|
50
|
+
export declare const jaJP: Localization;
|
|
51
|
+
export declare const khKH: Localization;
|
|
52
|
+
export declare const koKR: Localization;
|
|
53
|
+
export declare const kzKZ: Localization;
|
|
54
|
+
export declare const mkMK: Localization;
|
|
55
|
+
export declare const nbNO: Localization;
|
|
56
|
+
export declare const nlNL: Localization;
|
|
57
|
+
export declare const plPL: Localization;
|
|
58
|
+
export declare const ptBR: Localization;
|
|
59
|
+
export declare const ptPT: Localization;
|
|
60
|
+
export declare const roRO: Localization;
|
|
61
|
+
export declare const srRS: Localization;
|
|
62
|
+
export declare const ruRU: Localization;
|
|
63
|
+
export declare const siLK: Localization;
|
|
64
|
+
export declare const skSK: Localization;
|
|
65
|
+
export declare const svSE: Localization;
|
|
66
|
+
export declare const thTH: Localization;
|
|
67
|
+
export declare const trTR: Localization;
|
|
68
|
+
export declare const ukUA: Localization;
|
|
69
|
+
export declare const viVN: Localization;
|
|
70
|
+
export declare const zhCN: Localization;
|
|
71
|
+
export declare const zhHK: Localization;
|
|
72
|
+
export declare const zhTW: Localization;
|
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
|
*/
|