@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.
Files changed (240) hide show
  1. package/Accordion/accordionClasses.d.ts +18 -18
  2. package/AccordionActions/accordionActionsClasses.d.ts +10 -10
  3. package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
  4. package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
  5. package/Alert/Alert.d.ts +34 -3
  6. package/Alert/Alert.js +46 -9
  7. package/Alert/alertClasses.d.ts +44 -44
  8. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  9. package/AppBar/appBarClasses.d.ts +28 -28
  10. package/Autocomplete/Autocomplete.d.ts +10 -0
  11. package/Autocomplete/Autocomplete.js +27 -11
  12. package/Autocomplete/autocompleteClasses.d.ts +54 -54
  13. package/Avatar/avatarClasses.d.ts +20 -20
  14. package/AvatarGroup/AvatarGroup.d.ts +18 -1
  15. package/AvatarGroup/AvatarGroup.js +25 -6
  16. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  17. package/Backdrop/Backdrop.d.ts +33 -3
  18. package/Backdrop/Backdrop.js +46 -11
  19. package/Backdrop/backdropClasses.d.ts +10 -10
  20. package/Badge/Badge.d.ts +11 -3
  21. package/Badge/Badge.js +11 -3
  22. package/Badge/badgeClasses.d.ts +56 -56
  23. package/BottomNavigation/BottomNavigation.js +0 -0
  24. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  25. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  26. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  27. package/Button/buttonClasses.d.ts +100 -100
  28. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  29. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  30. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  31. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  32. package/CHANGELOG.md +58 -0
  33. package/Card/cardClasses.d.ts +8 -8
  34. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  35. package/CardActions/cardActionsClasses.d.ts +10 -10
  36. package/CardContent/cardContentClasses.d.ts +8 -8
  37. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  38. package/CardMedia/cardMediaClasses.d.ts +12 -12
  39. package/Checkbox/checkboxClasses.d.ts +18 -18
  40. package/Chip/chipClasses.d.ts +96 -96
  41. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  42. package/ClickAwayListener/index.d.ts +2 -2
  43. package/Collapse/collapseClasses.d.ts +18 -18
  44. package/Container/containerClasses.d.ts +6 -6
  45. package/Dialog/DialogContext.d.ts +6 -6
  46. package/Dialog/dialogClasses.d.ts +36 -36
  47. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  48. package/DialogContent/dialogContentClasses.d.ts +10 -10
  49. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  50. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  51. package/Divider/dividerClasses.d.ts +34 -34
  52. package/Drawer/drawerClasses.d.ts +30 -30
  53. package/Fab/fabClasses.d.ts +26 -26
  54. package/FilledInput/FilledInput.js +48 -9
  55. package/FilledInput/filledInputClasses.d.ts +40 -40
  56. package/FormControl/formControlClasses.d.ts +14 -14
  57. package/FormControlLabel/FormControlLabel.d.ts +12 -0
  58. package/FormControlLabel/FormControlLabel.js +17 -5
  59. package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
  60. package/FormGroup/formGroupClasses.d.ts +12 -12
  61. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  62. package/FormLabel/formLabelClasses.d.ts +22 -22
  63. package/Grid/gridClasses.d.ts +48 -48
  64. package/Icon/iconClasses.d.ts +24 -24
  65. package/IconButton/iconButtonClasses.d.ts +26 -26
  66. package/ImageList/imageListClasses.d.ts +16 -16
  67. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  68. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  69. package/Input/Input.js +49 -10
  70. package/Input/inputClasses.d.ts +34 -34
  71. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  72. package/InputBase/InputBase.d.ts +34 -3
  73. package/InputBase/InputBase.js +45 -8
  74. package/InputBase/inputBaseClasses.d.ts +46 -46
  75. package/InputLabel/inputLabelClasses.d.ts +32 -32
  76. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  77. package/Link/getTextDecoration.d.ts +15 -15
  78. package/Link/linkClasses.d.ts +18 -18
  79. package/List/listClasses.d.ts +14 -14
  80. package/ListItem/ListItem.d.ts +32 -3
  81. package/ListItem/ListItem.js +41 -9
  82. package/ListItem/listItemClasses.d.ts +30 -30
  83. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  84. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  85. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  86. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  87. package/ListItemText/listItemTextClasses.d.ts +18 -18
  88. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  89. package/Menu/menuClasses.d.ts +12 -12
  90. package/MenuItem/menuItemClasses.d.ts +20 -20
  91. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  92. package/Modal/Modal.d.ts +11 -3
  93. package/Modal/Modal.js +11 -3
  94. package/NativeSelect/NativeSelectInput.js +11 -9
  95. package/NativeSelect/nativeSelectClasses.d.ts +32 -32
  96. package/OutlinedInput/OutlinedInput.js +26 -8
  97. package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
  98. package/OverridableComponentAugmentation.d.ts +31 -31
  99. package/Pagination/paginationClasses.d.ts +14 -14
  100. package/PaginationItem/PaginationItem.d.ts +19 -7
  101. package/PaginationItem/PaginationItem.js +31 -22
  102. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  103. package/Paper/paperClasses.d.ts +39 -39
  104. package/Popover/popoverClasses.d.ts +10 -10
  105. package/Popper/Popper.d.ts +37 -37
  106. package/README.md +1 -0
  107. package/Radio/radioClasses.d.ts +16 -16
  108. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  109. package/RadioGroup/useRadioGroup.d.ts +4 -4
  110. package/Rating/ratingClasses.d.ts +40 -40
  111. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  112. package/Select/Select.d.ts +3 -3
  113. package/Select/Select.js +3 -3
  114. package/Select/selectClasses.d.ts +30 -30
  115. package/Skeleton/skeletonClasses.d.ts +26 -26
  116. package/Slider/Slider.d.ts +14 -2
  117. package/Slider/Slider.js +12 -3
  118. package/Snackbar/snackbarClasses.d.ts +20 -20
  119. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  120. package/SpeedDial/speedDialClasses.d.ts +22 -22
  121. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  122. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  123. package/Step/StepContext.d.ts +20 -20
  124. package/Step/stepClasses.d.ts +16 -16
  125. package/StepButton/stepButtonClasses.d.ts +14 -14
  126. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  127. package/StepContent/stepContentClasses.d.ts +12 -12
  128. package/StepIcon/stepIconClasses.d.ts +16 -16
  129. package/StepLabel/StepLabel.d.ts +11 -0
  130. package/StepLabel/StepLabel.js +15 -3
  131. package/StepLabel/stepLabelClasses.d.ts +28 -28
  132. package/Stepper/StepperContext.d.ts +18 -18
  133. package/Stepper/stepperClasses.d.ts +14 -14
  134. package/SvgIcon/svgIconClasses.d.ts +26 -26
  135. package/Switch/switchClasses.d.ts +32 -32
  136. package/Tab/tabClasses.d.ts +26 -26
  137. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  138. package/Table/tableClasses.d.ts +10 -10
  139. package/TableBody/tableBodyClasses.d.ts +8 -8
  140. package/TableCell/tableCellClasses.d.ts +32 -32
  141. package/TableContainer/tableContainerClasses.d.ts +8 -8
  142. package/TableFooter/tableFooterClasses.d.ts +8 -8
  143. package/TableHead/tableHeadClasses.d.ts +8 -8
  144. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  145. package/TableRow/tableRowClasses.d.ts +16 -16
  146. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  147. package/Tabs/tabsClasses.d.ts +32 -32
  148. package/TextField/textFieldClasses.d.ts +8 -8
  149. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  150. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  151. package/Toolbar/toolbarClasses.d.ts +14 -14
  152. package/Tooltip/Tooltip.d.ts +43 -6
  153. package/Tooltip/Tooltip.js +68 -31
  154. package/Tooltip/tooltipClasses.d.ts +30 -30
  155. package/Typography/typographyClasses.d.ts +50 -50
  156. package/Unstable_Grid2/Grid2.d.ts +4 -4
  157. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  158. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  159. package/Unstable_Grid2/index.d.ts +4 -4
  160. package/className/index.d.ts +1 -1
  161. package/darkScrollbar/index.d.ts +28 -28
  162. package/esm/Alert/Alert.js +46 -9
  163. package/esm/Autocomplete/Autocomplete.js +27 -11
  164. package/esm/AvatarGroup/AvatarGroup.js +25 -6
  165. package/esm/Backdrop/Backdrop.js +46 -11
  166. package/esm/Badge/Badge.js +11 -3
  167. package/esm/BottomNavigation/BottomNavigation.js +0 -0
  168. package/esm/FilledInput/FilledInput.js +48 -9
  169. package/esm/FormControlLabel/FormControlLabel.js +17 -5
  170. package/esm/Input/Input.js +49 -10
  171. package/esm/InputBase/InputBase.js +45 -8
  172. package/esm/ListItem/ListItem.js +41 -9
  173. package/esm/Modal/Modal.js +11 -3
  174. package/esm/NativeSelect/NativeSelectInput.js +11 -9
  175. package/esm/OutlinedInput/OutlinedInput.js +26 -8
  176. package/esm/PaginationItem/PaginationItem.js +31 -22
  177. package/esm/Select/Select.js +3 -3
  178. package/esm/Slider/Slider.js +12 -3
  179. package/esm/StepLabel/StepLabel.js +15 -3
  180. package/esm/Tooltip/Tooltip.js +68 -31
  181. package/generateUtilityClass/index.d.ts +2 -2
  182. package/generateUtilityClasses/index.d.ts +1 -1
  183. package/index.js +1 -1
  184. package/internal/switchBaseClasses.d.ts +12 -12
  185. package/legacy/Alert/Alert.js +48 -9
  186. package/legacy/Autocomplete/Autocomplete.js +27 -10
  187. package/legacy/AvatarGroup/AvatarGroup.js +26 -6
  188. package/legacy/Backdrop/Backdrop.js +48 -11
  189. package/legacy/Badge/Badge.js +11 -3
  190. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  191. package/legacy/FilledInput/FilledInput.js +49 -9
  192. package/legacy/FormControlLabel/FormControlLabel.js +17 -4
  193. package/legacy/Input/Input.js +50 -10
  194. package/legacy/InputBase/InputBase.js +47 -8
  195. package/legacy/ListItem/ListItem.js +42 -8
  196. package/legacy/Modal/Modal.js +11 -3
  197. package/legacy/NativeSelect/NativeSelectInput.js +11 -9
  198. package/legacy/OutlinedInput/OutlinedInput.js +27 -8
  199. package/legacy/PaginationItem/PaginationItem.js +32 -22
  200. package/legacy/Select/Select.js +3 -3
  201. package/legacy/Slider/Slider.js +12 -3
  202. package/legacy/StepLabel/StepLabel.js +16 -3
  203. package/legacy/Tooltip/Tooltip.js +63 -22
  204. package/legacy/index.js +1 -1
  205. package/locale/index.d.ts +72 -72
  206. package/modern/Alert/Alert.js +45 -8
  207. package/modern/Autocomplete/Autocomplete.js +26 -10
  208. package/modern/AvatarGroup/AvatarGroup.js +24 -5
  209. package/modern/Backdrop/Backdrop.js +45 -10
  210. package/modern/Badge/Badge.js +11 -3
  211. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  212. package/modern/FilledInput/FilledInput.js +46 -9
  213. package/modern/FormControlLabel/FormControlLabel.js +15 -5
  214. package/modern/Input/Input.js +47 -10
  215. package/modern/InputBase/InputBase.js +43 -8
  216. package/modern/ListItem/ListItem.js +41 -9
  217. package/modern/Modal/Modal.js +11 -3
  218. package/modern/NativeSelect/NativeSelectInput.js +11 -9
  219. package/modern/OutlinedInput/OutlinedInput.js +25 -7
  220. package/modern/PaginationItem/PaginationItem.js +31 -22
  221. package/modern/Select/Select.js +3 -3
  222. package/modern/Slider/Slider.js +12 -3
  223. package/modern/StepLabel/StepLabel.js +13 -3
  224. package/modern/Tooltip/Tooltip.js +58 -17
  225. package/modern/index.js +1 -1
  226. package/package.json +4 -4
  227. package/styles/CssVarsProvider.d.ts +14 -14
  228. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  229. package/transitions/index.d.ts +1 -1
  230. package/transitions/transition.d.ts +13 -13
  231. package/transitions/utils.d.ts +23 -23
  232. package/umd/material-ui.development.js +534 -165
  233. package/umd/material-ui.production.min.js +14 -14
  234. package/useMediaQuery/useMediaQuery.d.ts +31 -31
  235. package/useTouchRipple/index.d.ts +1 -1
  236. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  237. package/utils/getScrollbarSize.d.ts +2 -2
  238. package/utils/ownerDocument.d.ts +2 -2
  239. package/utils/ownerWindow.d.ts +2 -2
  240. package/utils/setRef.d.ts +2 -2
@@ -45,7 +45,7 @@ var _inputBaseClasses = _interopRequireWildcard(require("./inputBaseClasses"));
45
45
 
46
46
  var _jsxRuntime = require("react/jsx-runtime");
47
47
 
48
- const _excluded = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "startAdornment", "type", "value"];
48
+ const _excluded = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"];
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
 
@@ -249,6 +249,8 @@ const inputGlobalStyles = /*#__PURE__*/(0, _jsxRuntime.jsx)(_GlobalStyles.defaul
249
249
  */
250
250
 
251
251
  const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref) {
252
+ var _slotProps$input;
253
+
252
254
  const props = (0, _useThemeProps.default)({
253
255
  props: inProps,
254
256
  name: 'MuiInputBase'
@@ -283,6 +285,8 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
283
285
  readOnly,
284
286
  renderSuffix,
285
287
  rows,
288
+ slotProps = {},
289
+ slots = {},
286
290
  startAdornment,
287
291
  type = 'text',
288
292
  value: valueProp
@@ -483,10 +487,10 @@ const InputBase = /*#__PURE__*/React.forwardRef(function InputBase(inProps, ref)
483
487
  type
484
488
  });
485
489
  const classes = useUtilityClasses(ownerState);
486
- const Root = components.Root || InputBaseRoot;
487
- const rootProps = componentsProps.root || {};
488
- const Input = components.Input || InputBaseComponent;
489
- inputProps = (0, _extends2.default)({}, inputProps, componentsProps.input);
490
+ const Root = slots.root || components.Root || InputBaseRoot;
491
+ const rootProps = slotProps.root || componentsProps.root || {};
492
+ const Input = slots.input || components.Input || InputBaseComponent;
493
+ inputProps = (0, _extends2.default)({}, inputProps, (_slotProps$input = slotProps.input) != null ? _slotProps$input : componentsProps.input);
490
494
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
491
495
  children: [!disableInjectingGlobalStyles && inputGlobalStyles, /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, (0, _extends2.default)({}, rootProps, !(0, _base.isHostComponent)(Root) && {
492
496
  ownerState: (0, _extends2.default)({}, ownerState, rootProps.ownerState)
@@ -578,8 +582,11 @@ process.env.NODE_ENV !== "production" ? InputBase.propTypes
578
582
  .oneOfType([_propTypes.default.oneOf(['primary', 'secondary', 'error', 'info', 'success', 'warning']), _propTypes.default.string]),
579
583
 
580
584
  /**
581
- * The components used for each slot inside the InputBase.
582
- * Either a string to use a HTML element or a component.
585
+ * The components used for each slot inside.
586
+ *
587
+ * This prop is an alias for the `slots` prop.
588
+ * It's recommended to use the `slots` prop instead.
589
+ *
583
590
  * @default {}
584
591
  */
585
592
  components: _propTypes.default.shape({
@@ -588,7 +595,12 @@ process.env.NODE_ENV !== "production" ? InputBase.propTypes
588
595
  }),
589
596
 
590
597
  /**
591
- * The props used for each slot inside the Input.
598
+ * The extra props for the slot components.
599
+ * You can override the existing props or add new ones.
600
+ *
601
+ * This prop is an alias for the `slotProps` prop.
602
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
603
+ *
592
604
  * @default {}
593
605
  */
594
606
  componentsProps: _propTypes.default.shape({
@@ -756,6 +768,31 @@ process.env.NODE_ENV !== "production" ? InputBase.propTypes
756
768
  /* @typescript-to-proptypes-ignore */
757
769
  .oneOfType([_propTypes.default.oneOf(['medium', 'small']), _propTypes.default.string]),
758
770
 
771
+ /**
772
+ * The extra props for the slot components.
773
+ * You can override the existing props or add new ones.
774
+ *
775
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
776
+ *
777
+ * @default {}
778
+ */
779
+ slotProps: _propTypes.default.shape({
780
+ input: _propTypes.default.object,
781
+ root: _propTypes.default.object
782
+ }),
783
+
784
+ /**
785
+ * The components used for each slot inside.
786
+ *
787
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
788
+ *
789
+ * @default {}
790
+ */
791
+ slots: _propTypes.default.shape({
792
+ input: _propTypes.default.elementType,
793
+ root: _propTypes.default.elementType
794
+ }),
795
+
759
796
  /**
760
797
  * Start `InputAdornment` for this component.
761
798
  */
@@ -1,46 +1,46 @@
1
- export interface InputBaseClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if the component is a descendant of `FormControl`. */
5
- formControl: string;
6
- /** Styles applied to the root element if the component is focused. */
7
- focused: string;
8
- /** Styles applied to the root element if `disabled={true}`. */
9
- disabled: string;
10
- /** Styles applied to the root element if `startAdornment` is provided. */
11
- adornedStart: string;
12
- /** Styles applied to the root element if `endAdornment` is provided. */
13
- adornedEnd: string;
14
- /** State class applied to the root element if `error={true}`. */
15
- error: string;
16
- /** Styles applied to the input element if `size="small"`. */
17
- sizeSmall: string;
18
- /** Styles applied to the root element if `multiline={true}`. */
19
- multiline: string;
20
- /** Styles applied to the root element if the color is secondary. */
21
- colorSecondary: string;
22
- /** Styles applied to the root element if `fullWidth={true}`. */
23
- fullWidth: string;
24
- /** Styles applied to the root element if `hiddenLabel={true}`. */
25
- hiddenLabel: string;
26
- /** State class applied to the root element if `readOnly={true}`. */
27
- readOnly: string;
28
- /** Styles applied to the input element. */
29
- input: string;
30
- /** Styles applied to the input element if `size="small"`. */
31
- inputSizeSmall: string;
32
- /** Styles applied to the input element if `multiline={true}`. */
33
- inputMultiline: string;
34
- /** Styles applied to the input element if `type="search"`. */
35
- inputTypeSearch: string;
36
- /** Styles applied to the input element if `startAdornment` is provided. */
37
- inputAdornedStart: string;
38
- /** Styles applied to the input element if `endAdornment` is provided. */
39
- inputAdornedEnd: string;
40
- /** Styles applied to the input element if `hiddenLabel={true}`. */
41
- inputHiddenLabel: string;
42
- }
43
- export declare type InputBaseClassKey = keyof InputBaseClasses;
44
- export declare function getInputBaseUtilityClass(slot: string): string;
45
- declare const inputBaseClasses: InputBaseClasses;
46
- export default inputBaseClasses;
1
+ export interface InputBaseClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if the component is a descendant of `FormControl`. */
5
+ formControl: string;
6
+ /** Styles applied to the root element if the component is focused. */
7
+ focused: string;
8
+ /** Styles applied to the root element if `disabled={true}`. */
9
+ disabled: string;
10
+ /** Styles applied to the root element if `startAdornment` is provided. */
11
+ adornedStart: string;
12
+ /** Styles applied to the root element if `endAdornment` is provided. */
13
+ adornedEnd: string;
14
+ /** State class applied to the root element if `error={true}`. */
15
+ error: string;
16
+ /** Styles applied to the input element if `size="small"`. */
17
+ sizeSmall: string;
18
+ /** Styles applied to the root element if `multiline={true}`. */
19
+ multiline: string;
20
+ /** Styles applied to the root element if the color is secondary. */
21
+ colorSecondary: string;
22
+ /** Styles applied to the root element if `fullWidth={true}`. */
23
+ fullWidth: string;
24
+ /** Styles applied to the root element if `hiddenLabel={true}`. */
25
+ hiddenLabel: string;
26
+ /** State class applied to the root element if `readOnly={true}`. */
27
+ readOnly: string;
28
+ /** Styles applied to the input element. */
29
+ input: string;
30
+ /** Styles applied to the input element if `size="small"`. */
31
+ inputSizeSmall: string;
32
+ /** Styles applied to the input element if `multiline={true}`. */
33
+ inputMultiline: string;
34
+ /** Styles applied to the input element if `type="search"`. */
35
+ inputTypeSearch: string;
36
+ /** Styles applied to the input element if `startAdornment` is provided. */
37
+ inputAdornedStart: string;
38
+ /** Styles applied to the input element if `endAdornment` is provided. */
39
+ inputAdornedEnd: string;
40
+ /** Styles applied to the input element if `hiddenLabel={true}`. */
41
+ inputHiddenLabel: string;
42
+ }
43
+ export declare type InputBaseClassKey = keyof InputBaseClasses;
44
+ export declare function getInputBaseUtilityClass(slot: string): string;
45
+ declare const inputBaseClasses: InputBaseClasses;
46
+ export default inputBaseClasses;
@@ -1,32 +1,32 @@
1
- export interface InputLabelClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** State class applied to the root element if `focused={true}`. */
5
- focused: string;
6
- /** State class applied to the root element if `disabled={true}`. */
7
- disabled: string;
8
- /** State class applied to the root element if `error={true}`. */
9
- error: string;
10
- /** State class applied to the root element if `required={true}`. */
11
- required: string;
12
- /** State class applied to the asterisk element. */
13
- asterisk: string;
14
- /** Styles applied to the root element if the component is a descendant of `FormControl`. */
15
- formControl: string;
16
- /** Styles applied to the root element if `size="small"`. */
17
- sizeSmall: string;
18
- /** Styles applied to the input element if `shrink={true}`. */
19
- shrink: string;
20
- /** Styles applied to the input element unless `disableAnimation={true}`. */
21
- animated: string;
22
- /** Styles applied to the root element if `variant="filled"`. */
23
- filled: string;
24
- /** Styles applied to the root element if `variant="outlined"`. */
25
- outlined: string;
26
- /** Styles applied to the root element if `variant="standard"`. */
27
- standard: string;
28
- }
29
- export declare type InputLabelClassKey = keyof InputLabelClasses;
30
- export declare function getInputLabelUtilityClasses(slot: string): string;
31
- declare const inputLabelClasses: InputLabelClasses;
32
- export default inputLabelClasses;
1
+ export interface InputLabelClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** State class applied to the root element if `focused={true}`. */
5
+ focused: string;
6
+ /** State class applied to the root element if `disabled={true}`. */
7
+ disabled: string;
8
+ /** State class applied to the root element if `error={true}`. */
9
+ error: string;
10
+ /** State class applied to the root element if `required={true}`. */
11
+ required: string;
12
+ /** State class applied to the asterisk element. */
13
+ asterisk: string;
14
+ /** Styles applied to the root element if the component is a descendant of `FormControl`. */
15
+ formControl: string;
16
+ /** Styles applied to the root element if `size="small"`. */
17
+ sizeSmall: string;
18
+ /** Styles applied to the input element if `shrink={true}`. */
19
+ shrink: string;
20
+ /** Styles applied to the input element unless `disableAnimation={true}`. */
21
+ animated: string;
22
+ /** Styles applied to the root element if `variant="filled"`. */
23
+ filled: string;
24
+ /** Styles applied to the root element if `variant="outlined"`. */
25
+ outlined: string;
26
+ /** Styles applied to the root element if `variant="standard"`. */
27
+ standard: string;
28
+ }
29
+ export declare type InputLabelClassKey = keyof InputLabelClasses;
30
+ export declare function getInputLabelUtilityClasses(slot: string): string;
31
+ declare const inputLabelClasses: InputLabelClasses;
32
+ export default inputLabelClasses;
@@ -1,42 +1,42 @@
1
- export interface LinearProgressClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root and bar2 element if `color="primary"`; bar2 if `variant="buffer"`. */
5
- colorPrimary: string;
6
- /** Styles applied to the root and bar2 elements if `color="secondary"`; bar2 if `variant="buffer"`. */
7
- colorSecondary: string;
8
- /** Styles applied to the root element if `variant="determinate"`. */
9
- determinate: string;
10
- /** Styles applied to the root element if `variant="indeterminate"`. */
11
- indeterminate: string;
12
- /** Styles applied to the root element if `variant="buffer"`. */
13
- buffer: string;
14
- /** Styles applied to the root element if `variant="query"`. */
15
- query: string;
16
- /** Styles applied to the additional bar element if `variant="buffer"`. */
17
- dashed: string;
18
- /** Styles applied to the additional bar element if `variant="buffer"` and `color="primary"`. */
19
- dashedColorPrimary: string;
20
- /** Styles applied to the additional bar element if `variant="buffer"` and `color="secondary"`. */
21
- dashedColorSecondary: string;
22
- /** Styles applied to the layered bar1 and bar2 elements. */
23
- bar: string;
24
- /** Styles applied to the bar elements if `color="primary"`; bar2 if `variant` not "buffer". */
25
- barColorPrimary: string;
26
- /** Styles applied to the bar elements if `color="secondary"`; bar2 if `variant` not "buffer". */
27
- barColorSecondary: string;
28
- /** Styles applied to the bar1 element if `variant="indeterminate or query"`. */
29
- bar1Indeterminate: string;
30
- /** Styles applied to the bar1 element if `variant="determinate"`. */
31
- bar1Determinate: string;
32
- /** Styles applied to the bar1 element if `variant="buffer"`. */
33
- bar1Buffer: string;
34
- /** Styles applied to the bar2 element if `variant="indeterminate or query"`. */
35
- bar2Indeterminate: string;
36
- /** Styles applied to the bar2 element if `variant="buffer"`. */
37
- bar2Buffer: string;
38
- }
39
- export declare type LinearProgressClassKey = keyof LinearProgressClasses;
40
- export declare function getLinearProgressUtilityClass(slot: string): string;
41
- declare const linearProgressClasses: LinearProgressClasses;
42
- export default linearProgressClasses;
1
+ export interface LinearProgressClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root and bar2 element if `color="primary"`; bar2 if `variant="buffer"`. */
5
+ colorPrimary: string;
6
+ /** Styles applied to the root and bar2 elements if `color="secondary"`; bar2 if `variant="buffer"`. */
7
+ colorSecondary: string;
8
+ /** Styles applied to the root element if `variant="determinate"`. */
9
+ determinate: string;
10
+ /** Styles applied to the root element if `variant="indeterminate"`. */
11
+ indeterminate: string;
12
+ /** Styles applied to the root element if `variant="buffer"`. */
13
+ buffer: string;
14
+ /** Styles applied to the root element if `variant="query"`. */
15
+ query: string;
16
+ /** Styles applied to the additional bar element if `variant="buffer"`. */
17
+ dashed: string;
18
+ /** Styles applied to the additional bar element if `variant="buffer"` and `color="primary"`. */
19
+ dashedColorPrimary: string;
20
+ /** Styles applied to the additional bar element if `variant="buffer"` and `color="secondary"`. */
21
+ dashedColorSecondary: string;
22
+ /** Styles applied to the layered bar1 and bar2 elements. */
23
+ bar: string;
24
+ /** Styles applied to the bar elements if `color="primary"`; bar2 if `variant` not "buffer". */
25
+ barColorPrimary: string;
26
+ /** Styles applied to the bar elements if `color="secondary"`; bar2 if `variant` not "buffer". */
27
+ barColorSecondary: string;
28
+ /** Styles applied to the bar1 element if `variant="indeterminate or query"`. */
29
+ bar1Indeterminate: string;
30
+ /** Styles applied to the bar1 element if `variant="determinate"`. */
31
+ bar1Determinate: string;
32
+ /** Styles applied to the bar1 element if `variant="buffer"`. */
33
+ bar1Buffer: string;
34
+ /** Styles applied to the bar2 element if `variant="indeterminate or query"`. */
35
+ bar2Indeterminate: string;
36
+ /** Styles applied to the bar2 element if `variant="buffer"`. */
37
+ bar2Buffer: string;
38
+ }
39
+ export declare type LinearProgressClassKey = keyof LinearProgressClasses;
40
+ export declare function getLinearProgressUtilityClass(slot: string): string;
41
+ declare const linearProgressClasses: LinearProgressClasses;
42
+ export default linearProgressClasses;
@@ -1,15 +1,15 @@
1
- import type { Theme } from '../styles';
2
- export declare const colorTransformations: {
3
- primary: string;
4
- textPrimary: string;
5
- secondary: string;
6
- textSecondary: string;
7
- error: string;
8
- };
9
- declare const getTextDecoration: <T extends Theme>({ theme, ownerState, }: {
10
- theme: T;
11
- ownerState: {
12
- color: string;
13
- };
14
- }) => string;
15
- export default getTextDecoration;
1
+ import type { Theme } from '../styles';
2
+ export declare const colorTransformations: {
3
+ primary: string;
4
+ textPrimary: string;
5
+ secondary: string;
6
+ textSecondary: string;
7
+ error: string;
8
+ };
9
+ declare const getTextDecoration: <T extends Theme>({ theme, ownerState, }: {
10
+ theme: T;
11
+ ownerState: {
12
+ color: string;
13
+ };
14
+ }) => string;
15
+ export default getTextDecoration;
@@ -1,18 +1,18 @@
1
- export interface LinkClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `underline="none"`. */
5
- underlineNone: string;
6
- /** Styles applied to the root element if `underline="hover"`. */
7
- underlineHover: string;
8
- /** Styles applied to the root element if `underline="always"`. */
9
- underlineAlways: string;
10
- /** Styles applied to the root element if `component="button"`. */
11
- button: string;
12
- /** State class applied to the root element if the link is keyboard focused. */
13
- focusVisible: string;
14
- }
15
- export declare type LinkClassKey = keyof LinkClasses;
16
- export declare function getLinkUtilityClass(slot: string): string;
17
- declare const linkClasses: LinkClasses;
18
- export default linkClasses;
1
+ export interface LinkClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `underline="none"`. */
5
+ underlineNone: string;
6
+ /** Styles applied to the root element if `underline="hover"`. */
7
+ underlineHover: string;
8
+ /** Styles applied to the root element if `underline="always"`. */
9
+ underlineAlways: string;
10
+ /** Styles applied to the root element if `component="button"`. */
11
+ button: string;
12
+ /** State class applied to the root element if the link is keyboard focused. */
13
+ focusVisible: string;
14
+ }
15
+ export declare type LinkClassKey = keyof LinkClasses;
16
+ export declare function getLinkUtilityClass(slot: string): string;
17
+ declare const linkClasses: LinkClasses;
18
+ export default linkClasses;
@@ -1,14 +1,14 @@
1
- export interface ListClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element unless `disablePadding={true}`. */
5
- padding: string;
6
- /** Styles applied to the root element if dense. */
7
- dense: string;
8
- /** Styles applied to the root element if a `subheader` is provided. */
9
- subheader: string;
10
- }
11
- export declare type ListClassKey = keyof ListClasses;
12
- export declare function getListUtilityClass(slot: string): string;
13
- declare const listClasses: ListClasses;
14
- export default listClasses;
1
+ export interface ListClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element unless `disablePadding={true}`. */
5
+ padding: string;
6
+ /** Styles applied to the root element if dense. */
7
+ dense: string;
8
+ /** Styles applied to the root element if a `subheader` is provided. */
9
+ subheader: string;
10
+ }
11
+ export declare type ListClassKey = keyof ListClasses;
12
+ export declare function getListUtilityClass(slot: string): string;
13
+ declare const listClasses: ListClasses;
14
+ export default listClasses;
@@ -88,20 +88,49 @@ export interface ListItemTypeMap<P, D extends React.ElementType> {
88
88
  props: P &
89
89
  ListItemBaseProps & {
90
90
  /**
91
- * The components used for each slot inside the InputBase.
92
- * Either a string to use a HTML element or a component.
91
+ * The components used for each slot inside.
92
+ *
93
+ * This prop is an alias for the `slots` prop.
94
+ * It's recommended to use the `slots` prop instead.
95
+ *
93
96
  * @default {}
94
97
  */
95
98
  components?: {
96
99
  Root?: React.ElementType;
97
100
  };
98
101
  /**
99
- * The props used for each slot inside the Input.
102
+ * The extra props for the slot components.
103
+ * You can override the existing props or add new ones.
104
+ *
105
+ * This prop is an alias for the `slotProps` prop.
106
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
107
+ *
100
108
  * @default {}
101
109
  */
102
110
  componentsProps?: {
103
111
  root?: React.HTMLAttributes<HTMLDivElement> & ListItemComponentsPropsOverrides;
104
112
  };
113
+ /**
114
+ * The extra props for the slot components.
115
+ * You can override the existing props or add new ones.
116
+ *
117
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
118
+ *
119
+ * @default {}
120
+ */
121
+ slotProps?: {
122
+ root?: React.HTMLAttributes<HTMLDivElement> & ListItemComponentsPropsOverrides;
123
+ };
124
+ /**
125
+ * The components used for each slot inside.
126
+ *
127
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
128
+ *
129
+ * @default {}
130
+ */
131
+ slots?: {
132
+ root?: React.ElementType;
133
+ };
105
134
  };
106
135
  defaultComponent: D;
107
136
  }
@@ -46,7 +46,7 @@ var _ListItemSecondaryAction = _interopRequireDefault(require("../ListItemSecond
46
46
  var _jsxRuntime = require("react/jsx-runtime");
47
47
 
48
48
  const _excluded = ["className"],
49
- _excluded2 = ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected"];
49
+ _excluded2 = ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected", "slotProps", "slots"];
50
50
 
51
51
  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); }
52
52
 
@@ -193,7 +193,9 @@ const ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
193
193
  divider = false,
194
194
  focusVisibleClassName,
195
195
  secondaryAction,
196
- selected = false
196
+ selected = false,
197
+ slotProps = {},
198
+ slots = {}
197
199
  } = props,
198
200
  ContainerProps = (0, _objectWithoutPropertiesLoose2.default)(props.ContainerProps, _excluded),
199
201
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
@@ -230,8 +232,8 @@ const ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
230
232
  });
231
233
  const classes = useUtilityClasses(ownerState);
232
234
  const handleRef = (0, _useForkRef.default)(listItemRef, ref);
233
- const Root = components.Root || ListItemRoot;
234
- const rootProps = componentsProps.root || {};
235
+ const Root = slots.root || components.Root || ListItemRoot;
236
+ const rootProps = slotProps.root || componentsProps.root || {};
235
237
  const componentProps = (0, _extends2.default)({
236
238
  className: (0, _clsx.default)(classes.root, rootProps.className, className),
237
239
  disabled
@@ -279,8 +281,7 @@ const ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {
279
281
  value: childContext,
280
282
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(Root, (0, _extends2.default)({}, rootProps, {
281
283
  as: Component,
282
- ref: handleRef,
283
- ownerState: ownerState
284
+ ref: handleRef
284
285
  }, !(0, _base.isHostComponent)(Root) && {
285
286
  ownerState: (0, _extends2.default)({}, ownerState, rootProps.ownerState)
286
287
  }, componentProps, {
@@ -363,8 +364,11 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes
363
364
  component: _propTypes.default.elementType,
364
365
 
365
366
  /**
366
- * The components used for each slot inside the InputBase.
367
- * Either a string to use a HTML element or a component.
367
+ * The components used for each slot inside.
368
+ *
369
+ * This prop is an alias for the `slots` prop.
370
+ * It's recommended to use the `slots` prop instead.
371
+ *
368
372
  * @default {}
369
373
  */
370
374
  components: _propTypes.default.shape({
@@ -372,7 +376,12 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes
372
376
  }),
373
377
 
374
378
  /**
375
- * The props used for each slot inside the Input.
379
+ * The extra props for the slot components.
380
+ * You can override the existing props or add new ones.
381
+ *
382
+ * This prop is an alias for the `slotProps` prop.
383
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
384
+ *
376
385
  * @default {}
377
386
  */
378
387
  componentsProps: _propTypes.default.shape({
@@ -442,6 +451,29 @@ process.env.NODE_ENV !== "production" ? ListItem.propTypes
442
451
  */
443
452
  selected: _propTypes.default.bool,
444
453
 
454
+ /**
455
+ * The extra props for the slot components.
456
+ * You can override the existing props or add new ones.
457
+ *
458
+ * This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
459
+ *
460
+ * @default {}
461
+ */
462
+ slotProps: _propTypes.default.shape({
463
+ root: _propTypes.default.object
464
+ }),
465
+
466
+ /**
467
+ * The components used for each slot inside.
468
+ *
469
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
470
+ *
471
+ * @default {}
472
+ */
473
+ slots: _propTypes.default.shape({
474
+ root: _propTypes.default.elementType
475
+ }),
476
+
445
477
  /**
446
478
  * The system prop that allows defining system overrides as well as additional CSS styles.
447
479
  */