@mui/material 5.13.2 → 5.13.4

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 (198) 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/alertClasses.d.ts +44 -44
  6. package/AlertTitle/alertTitleClasses.d.ts +8 -8
  7. package/AppBar/appBarClasses.d.ts +28 -28
  8. package/Autocomplete/Autocomplete.d.ts +1 -0
  9. package/Autocomplete/Autocomplete.js +14 -2
  10. package/Autocomplete/autocompleteClasses.d.ts +58 -56
  11. package/Avatar/avatarClasses.d.ts +20 -20
  12. package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
  13. package/Backdrop/backdropClasses.d.ts +10 -10
  14. package/Badge/badgeClasses.d.ts +56 -56
  15. package/BottomNavigation/BottomNavigation.js +0 -0
  16. package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
  17. package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
  18. package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
  19. package/Button/buttonClasses.d.ts +100 -100
  20. package/ButtonBase/buttonBaseClasses.d.ts +12 -12
  21. package/ButtonBase/touchRippleClasses.d.ts +20 -20
  22. package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
  23. package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
  24. package/CHANGELOG.md +97 -0
  25. package/Card/cardClasses.d.ts +8 -8
  26. package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
  27. package/CardActions/cardActionsClasses.d.ts +10 -10
  28. package/CardContent/cardContentClasses.d.ts +8 -8
  29. package/CardHeader/cardHeaderClasses.d.ts +18 -18
  30. package/CardMedia/cardMediaClasses.d.ts +12 -12
  31. package/Checkbox/checkboxClasses.d.ts +18 -18
  32. package/Chip/chipClasses.d.ts +96 -96
  33. package/CircularProgress/circularProgressClasses.d.ts +26 -26
  34. package/ClickAwayListener/index.d.ts +2 -2
  35. package/Collapse/collapseClasses.d.ts +18 -18
  36. package/Container/containerClasses.d.ts +6 -6
  37. package/Dialog/DialogContext.d.ts +6 -6
  38. package/Dialog/dialogClasses.d.ts +36 -36
  39. package/DialogActions/dialogActionsClasses.d.ts +10 -10
  40. package/DialogContent/dialogContentClasses.d.ts +10 -10
  41. package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
  42. package/DialogTitle/dialogTitleClasses.d.ts +8 -8
  43. package/Divider/dividerClasses.d.ts +34 -34
  44. package/Drawer/drawerClasses.d.ts +30 -30
  45. package/Fab/fabClasses.d.ts +26 -26
  46. package/FilledInput/filledInputClasses.d.ts +42 -42
  47. package/FormControl/FormControlContext.d.ts +17 -17
  48. package/FormControl/formControlClasses.d.ts +14 -14
  49. package/FormControl/useFormControl.d.ts +2 -2
  50. package/FormControlLabel/formControlLabelClasses.d.ts +24 -24
  51. package/FormGroup/formGroupClasses.d.ts +12 -12
  52. package/FormHelperText/formHelperTextClasses.d.ts +22 -22
  53. package/FormLabel/formLabelClasses.d.ts +22 -22
  54. package/Grid/gridClasses.d.ts +48 -48
  55. package/Hidden/Hidden.js +10 -10
  56. package/Hidden/withWidth.js +1 -1
  57. package/Icon/iconClasses.d.ts +24 -24
  58. package/IconButton/iconButtonClasses.d.ts +34 -34
  59. package/ImageList/imageListClasses.d.ts +16 -16
  60. package/ImageListItem/imageListItemClasses.d.ts +18 -18
  61. package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
  62. package/Input/inputClasses.d.ts +38 -38
  63. package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
  64. package/InputBase/inputBaseClasses.d.ts +46 -46
  65. package/InputLabel/inputLabelClasses.d.ts +32 -32
  66. package/LinearProgress/linearProgressClasses.d.ts +42 -42
  67. package/Link/getTextDecoration.d.ts +15 -15
  68. package/Link/linkClasses.d.ts +18 -18
  69. package/List/listClasses.d.ts +14 -14
  70. package/ListItem/listItemClasses.d.ts +30 -30
  71. package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
  72. package/ListItemButton/listItemButtonClasses.d.ts +22 -22
  73. package/ListItemIcon/listItemIconClasses.d.ts +10 -10
  74. package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
  75. package/ListItemText/listItemTextClasses.d.ts +18 -18
  76. package/ListSubheader/listSubheaderClasses.d.ts +18 -18
  77. package/Menu/Menu.d.ts +3 -0
  78. package/Menu/Menu.js +11 -9
  79. package/Menu/menuClasses.d.ts +12 -12
  80. package/MenuItem/menuItemClasses.d.ts +20 -20
  81. package/MenuList/MenuList.js +7 -0
  82. package/MobileStepper/MobileStepper.js +9 -1
  83. package/MobileStepper/mobileStepperClasses.d.ts +22 -22
  84. package/Modal/Modal.js +1 -1
  85. package/NativeSelect/nativeSelectClasses.d.ts +34 -34
  86. package/OutlinedInput/outlinedInputClasses.d.ts +38 -38
  87. package/Pagination/paginationClasses.d.ts +14 -14
  88. package/PaginationItem/paginationItemClasses.d.ts +42 -42
  89. package/Paper/paperClasses.d.ts +39 -39
  90. package/Popover/Popover.d.ts +34 -3
  91. package/Popover/Popover.js +76 -28
  92. package/Popover/popoverClasses.d.ts +10 -10
  93. package/Popper/Popper.d.ts +65 -65
  94. package/Radio/radioClasses.d.ts +16 -16
  95. package/RadioGroup/RadioGroupContext.d.ts +11 -11
  96. package/RadioGroup/useRadioGroup.d.ts +4 -4
  97. package/Rating/ratingClasses.d.ts +40 -40
  98. package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
  99. package/Select/selectClasses.d.ts +32 -32
  100. package/Skeleton/skeletonClasses.d.ts +26 -26
  101. package/Slider/SliderValueLabel.d.ts +15 -15
  102. package/Slider/SliderValueLabel.types.d.ts +24 -24
  103. package/Slider/sliderClasses.d.ts +58 -58
  104. package/Snackbar/snackbarClasses.d.ts +20 -20
  105. package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
  106. package/SpeedDial/speedDialClasses.d.ts +22 -22
  107. package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
  108. package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
  109. package/Stack/stackClasses.d.ts +6 -6
  110. package/Step/StepContext.d.ts +20 -20
  111. package/Step/stepClasses.d.ts +16 -16
  112. package/StepButton/stepButtonClasses.d.ts +14 -14
  113. package/StepConnector/stepConnectorClasses.d.ts +26 -26
  114. package/StepContent/stepContentClasses.d.ts +12 -12
  115. package/StepIcon/stepIconClasses.d.ts +16 -16
  116. package/StepLabel/stepLabelClasses.d.ts +28 -28
  117. package/Stepper/StepperContext.d.ts +18 -18
  118. package/Stepper/stepperClasses.d.ts +14 -14
  119. package/SvgIcon/svgIconClasses.d.ts +26 -26
  120. package/Switch/switchClasses.d.ts +32 -32
  121. package/Tab/tabClasses.d.ts +26 -26
  122. package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
  123. package/Table/tableClasses.d.ts +10 -10
  124. package/TableBody/tableBodyClasses.d.ts +8 -8
  125. package/TableCell/tableCellClasses.d.ts +32 -32
  126. package/TableContainer/tableContainerClasses.d.ts +8 -8
  127. package/TableFooter/tableFooterClasses.d.ts +8 -8
  128. package/TableHead/tableHeadClasses.d.ts +8 -8
  129. package/TablePagination/tablePaginationClasses.d.ts +28 -28
  130. package/TableRow/tableRowClasses.d.ts +16 -16
  131. package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
  132. package/Tabs/tabsClasses.d.ts +32 -32
  133. package/TextField/textFieldClasses.d.ts +8 -8
  134. package/ToggleButton/toggleButtonClasses.d.ts +24 -24
  135. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
  136. package/Toolbar/toolbarClasses.d.ts +14 -14
  137. package/Tooltip/tooltipClasses.d.ts +30 -30
  138. package/Typography/typographyClasses.d.ts +50 -50
  139. package/Unstable_Grid2/Grid2.d.ts +4 -4
  140. package/Unstable_Grid2/Grid2Props.d.ts +15 -15
  141. package/Unstable_Grid2/grid2Classes.d.ts +5 -5
  142. package/Unstable_Grid2/index.d.ts +4 -4
  143. package/className/index.d.ts +1 -1
  144. package/darkScrollbar/index.d.ts +28 -28
  145. package/generateUtilityClass/index.d.ts +2 -2
  146. package/generateUtilityClasses/index.d.ts +1 -1
  147. package/index.js +1 -1
  148. package/internal/switchBaseClasses.d.ts +12 -12
  149. package/legacy/Autocomplete/Autocomplete.js +12 -2
  150. package/legacy/BottomNavigation/BottomNavigation.js +0 -0
  151. package/legacy/Hidden/Hidden.js +10 -10
  152. package/legacy/Hidden/withWidth.js +1 -1
  153. package/legacy/Menu/Menu.js +11 -9
  154. package/legacy/MenuList/MenuList.js +7 -0
  155. package/legacy/MobileStepper/MobileStepper.js +9 -1
  156. package/legacy/Modal/Modal.js +1 -1
  157. package/legacy/Popover/Popover.js +73 -28
  158. package/legacy/index.js +1 -1
  159. package/locale/index.d.ts +80 -80
  160. package/modern/Autocomplete/Autocomplete.js +14 -2
  161. package/modern/BottomNavigation/BottomNavigation.js +0 -0
  162. package/modern/Hidden/Hidden.js +10 -10
  163. package/modern/Hidden/withWidth.js +1 -1
  164. package/modern/Menu/Menu.js +11 -9
  165. package/modern/MenuList/MenuList.js +7 -0
  166. package/modern/MobileStepper/MobileStepper.js +9 -1
  167. package/modern/Modal/Modal.js +1 -1
  168. package/modern/Popover/Popover.js +75 -28
  169. package/modern/index.js +1 -1
  170. package/node/Autocomplete/Autocomplete.js +14 -2
  171. package/node/BottomNavigation/BottomNavigation.js +0 -0
  172. package/node/Hidden/Hidden.js +10 -10
  173. package/node/Hidden/withWidth.js +1 -1
  174. package/node/Menu/Menu.js +13 -10
  175. package/node/MenuList/MenuList.js +7 -0
  176. package/node/MobileStepper/MobileStepper.js +9 -1
  177. package/node/Modal/Modal.js +1 -1
  178. package/node/Popover/Popover.js +75 -25
  179. package/node/index.js +1 -1
  180. package/package.json +3 -3
  181. package/styles/CssVarsProvider.d.ts +20 -20
  182. package/styles/excludeVariablesFromRoot.d.ts +5 -5
  183. package/styles/getOverlayAlpha.d.ts +2 -2
  184. package/styles/identifier.d.ts +2 -2
  185. package/styles/shouldSkipGeneratingVar.d.ts +1 -1
  186. package/transitions/index.d.ts +1 -1
  187. package/transitions/transition.d.ts +13 -13
  188. package/transitions/utils.d.ts +23 -23
  189. package/types/OverridableComponentAugmentation.d.ts +31 -31
  190. package/umd/material-ui.development.js +140 -243
  191. package/umd/material-ui.production.min.js +16 -16
  192. package/useMediaQuery/useMediaQuery.d.ts +46 -46
  193. package/useTouchRipple/index.d.ts +1 -1
  194. package/useTouchRipple/useTouchRipple.d.ts +28 -28
  195. package/utils/getScrollbarSize.d.ts +2 -2
  196. package/utils/ownerDocument.d.ts +2 -2
  197. package/utils/ownerWindow.d.ts +2 -2
  198. package/utils/setRef.d.ts +2 -2
package/Menu/Menu.js CHANGED
@@ -9,8 +9,7 @@ import clsx from 'clsx';
9
9
  import { unstable_composeClasses as composeClasses } from '@mui/base';
10
10
  import { HTMLElementType } from '@mui/utils';
11
11
  import MenuList from '../MenuList';
12
- import Paper from '../Paper';
13
- import Popover from '../Popover';
12
+ import Popover, { PopoverPaper } from '../Popover';
14
13
  import styled, { rootShouldForwardProp } from '../styles/styled';
15
14
  import useTheme from '../styles/useTheme';
16
15
  import useThemeProps from '../styles/useThemeProps';
@@ -41,7 +40,7 @@ const MenuRoot = styled(Popover, {
41
40
  slot: 'Root',
42
41
  overridesResolver: (props, styles) => styles.root
43
42
  })({});
44
- const MenuPaper = styled(Paper, {
43
+ export const MenuPaper = styled(PopoverPaper, {
45
44
  name: 'MuiMenu',
46
45
  slot: 'Paper',
47
46
  overridesResolver: (props, styles) => styles.paper
@@ -148,13 +147,16 @@ const Menu = /*#__PURE__*/React.forwardRef(function Menu(inProps, ref) {
148
147
  horizontal: isRtl ? 'right' : 'left'
149
148
  },
150
149
  transformOrigin: isRtl ? RTL_ORIGIN : LTR_ORIGIN,
151
- PaperProps: _extends({
152
- as: MenuPaper
153
- }, PaperProps, {
154
- classes: _extends({}, PaperProps.classes, {
155
- root: classes.paper
150
+ slots: {
151
+ paper: MenuPaper
152
+ },
153
+ slotProps: {
154
+ paper: _extends({}, PaperProps, {
155
+ classes: _extends({}, PaperProps.classes, {
156
+ root: classes.paper
157
+ })
156
158
  })
157
- }),
159
+ },
158
160
  className: classes.root,
159
161
  open: open,
160
162
  ref: ref,
@@ -1,12 +1,12 @@
1
- export interface MenuClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the Paper component. */
5
- paper: string;
6
- /** Styles applied to the List component via `MenuList`. */
7
- list: string;
8
- }
9
- export type MenuClassKey = keyof MenuClasses;
10
- export declare function getMenuUtilityClass(slot: string): string;
11
- declare const menuClasses: MenuClasses;
12
- export default menuClasses;
1
+ export interface MenuClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the Paper component. */
5
+ paper: string;
6
+ /** Styles applied to the List component via `MenuList`. */
7
+ list: string;
8
+ }
9
+ export type MenuClassKey = keyof MenuClasses;
10
+ export declare function getMenuUtilityClass(slot: string): string;
11
+ declare const menuClasses: MenuClasses;
12
+ export default menuClasses;
@@ -1,20 +1,20 @@
1
- export interface MenuItemClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** State class applied to the root element if keyboard focused. */
5
- focusVisible: string;
6
- /** Styles applied to the root element if dense. */
7
- dense: string;
8
- /** State class applied to the root element if `disabled={true}`. */
9
- disabled: string;
10
- /** Styles applied to the root element if `divider={true}`. */
11
- divider: string;
12
- /** Styles applied to the inner `component` element unless `disableGutters={true}`. */
13
- gutters: string;
14
- /** State class applied to the root element if `selected={true}`. */
15
- selected: string;
16
- }
17
- export type MenuItemClassKey = keyof MenuItemClasses;
18
- export declare function getMenuItemUtilityClass(slot: string): string;
19
- declare const menuItemClasses: MenuItemClasses;
20
- export default menuItemClasses;
1
+ export interface MenuItemClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** State class applied to the root element if keyboard focused. */
5
+ focusVisible: string;
6
+ /** Styles applied to the root element if dense. */
7
+ dense: string;
8
+ /** State class applied to the root element if `disabled={true}`. */
9
+ disabled: string;
10
+ /** Styles applied to the root element if `divider={true}`. */
11
+ divider: string;
12
+ /** Styles applied to the inner `component` element unless `disableGutters={true}`. */
13
+ gutters: string;
14
+ /** State class applied to the root element if `selected={true}`. */
15
+ selected: string;
16
+ }
17
+ export type MenuItemClassKey = keyof MenuItemClasses;
18
+ export declare function getMenuItemUtilityClass(slot: string): string;
19
+ declare const menuItemClasses: MenuItemClasses;
20
+ export default menuItemClasses;
@@ -180,6 +180,13 @@ const MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {
180
180
  // item and use the first valid item as a fallback
181
181
  React.Children.forEach(children, (child, index) => {
182
182
  if (! /*#__PURE__*/React.isValidElement(child)) {
183
+ if (activeItemIndex === index) {
184
+ activeItemIndex += 1;
185
+ if (activeItemIndex >= children.length) {
186
+ // there are no focusable items within the list.
187
+ activeItemIndex = -1;
188
+ }
189
+ }
183
190
  return;
184
191
  }
185
192
  if (process.env.NODE_ENV !== 'production') {
@@ -126,6 +126,14 @@ const MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(inPro
126
126
  position,
127
127
  variant
128
128
  });
129
+ let value;
130
+ if (variant === 'progress') {
131
+ if (steps === 1) {
132
+ value = 100;
133
+ } else {
134
+ value = Math.ceil(activeStep / (steps - 1) * 100);
135
+ }
136
+ }
129
137
  const classes = useUtilityClasses(ownerState);
130
138
  return /*#__PURE__*/_jsxs(MobileStepperRoot, _extends({
131
139
  square: true,
@@ -148,7 +156,7 @@ const MobileStepper = /*#__PURE__*/React.forwardRef(function MobileStepper(inPro
148
156
  ownerState: ownerState,
149
157
  className: classes.progress,
150
158
  variant: "determinate",
151
- value: Math.ceil(activeStep / (steps - 1) * 100)
159
+ value: value
152
160
  }, LinearProgressProps)), nextButton]
153
161
  }));
154
162
  });
@@ -1,22 +1,22 @@
1
- export interface MobileStepperClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `position="bottom"`. */
5
- positionBottom: string;
6
- /** Styles applied to the root element if `position="top"`. */
7
- positionTop: string;
8
- /** Styles applied to the root element if `position="static"`. */
9
- positionStatic: string;
10
- /** Styles applied to the dots container if `variant="dots"`. */
11
- dots: string;
12
- /** Styles applied to each dot if `variant="dots"`. */
13
- dot: string;
14
- /** Styles applied to a dot if `variant="dots"` and this is the active step. */
15
- dotActive: string;
16
- /** Styles applied to the Linear Progress component if `variant="progress"`. */
17
- progress: string;
18
- }
19
- export type MobileStepperClassKey = keyof MobileStepperClasses;
20
- export declare function getMobileStepperUtilityClass(slot: string): string;
21
- declare const mobileStepperClasses: MobileStepperClasses;
22
- export default mobileStepperClasses;
1
+ export interface MobileStepperClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `position="bottom"`. */
5
+ positionBottom: string;
6
+ /** Styles applied to the root element if `position="top"`. */
7
+ positionTop: string;
8
+ /** Styles applied to the root element if `position="static"`. */
9
+ positionStatic: string;
10
+ /** Styles applied to the dots container if `variant="dots"`. */
11
+ dots: string;
12
+ /** Styles applied to each dot if `variant="dots"`. */
13
+ dot: string;
14
+ /** Styles applied to a dot if `variant="dots"` and this is the active step. */
15
+ dotActive: string;
16
+ /** Styles applied to the Linear Progress component if `variant="progress"`. */
17
+ progress: string;
18
+ }
19
+ export type MobileStepperClassKey = keyof MobileStepperClasses;
20
+ export declare function getMobileStepperUtilityClass(slot: string): string;
21
+ declare const mobileStepperClasses: MobileStepperClasses;
22
+ export default mobileStepperClasses;
package/Modal/Modal.js CHANGED
@@ -127,7 +127,7 @@ const Modal = /*#__PURE__*/React.forwardRef(function Modal(inProps, ref) {
127
127
  className: clsx(className, rootSlotProps == null ? void 0 : rootSlotProps.className, classes == null ? void 0 : classes.root, !ownerState.open && ownerState.exited && (classes == null ? void 0 : classes.hidden))
128
128
  }),
129
129
  backdrop: () => _extends({}, BackdropProps, resolveComponentProps(backdropSlotProps, ownerState), {
130
- className: clsx(backdropSlotProps == null ? void 0 : backdropSlotProps.className, classes == null ? void 0 : classes.backdrop)
130
+ className: clsx(backdropSlotProps == null ? void 0 : backdropSlotProps.className, BackdropProps == null ? void 0 : BackdropProps.className, classes == null ? void 0 : classes.backdrop)
131
131
  })
132
132
  },
133
133
  onTransitionEnter: () => setExited(false),
@@ -1,34 +1,34 @@
1
- export interface NativeSelectClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the select component `select` class. */
5
- select: string;
6
- /** Styles applied to the select component if `multiple={true}`. */
7
- multiple: string;
8
- /** Styles applied to the select component if `variant="filled"`. */
9
- filled: string;
10
- /** Styles applied to the select component if `variant="outlined"`. */
11
- outlined: string;
12
- /** Styles applied to the select component if `variant="standard"`. */
13
- standard: string;
14
- /** State class applied to the select component `disabled` class. */
15
- disabled: string;
16
- /** Styles applied to the icon component. */
17
- icon: string;
18
- /** Styles applied to the icon component if the popup is open. */
19
- iconOpen: string;
20
- /** Styles applied to the icon component if `variant="filled"`. */
21
- iconFilled: string;
22
- /** Styles applied to the icon component if `variant="outlined"`. */
23
- iconOutlined: string;
24
- /** Styles applied to the icon component if `variant="standard"`. */
25
- iconStandard: string;
26
- /** Styles applied to the underlying native input component. */
27
- nativeInput: string;
28
- /** State class applied to the select component `error` class. */
29
- error: string;
30
- }
31
- export type NativeSelectClassKey = keyof NativeSelectClasses;
32
- export declare function getNativeSelectUtilityClasses(slot: string): string;
33
- declare const nativeSelectClasses: NativeSelectClasses;
34
- export default nativeSelectClasses;
1
+ export interface NativeSelectClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the select component `select` class. */
5
+ select: string;
6
+ /** Styles applied to the select component if `multiple={true}`. */
7
+ multiple: string;
8
+ /** Styles applied to the select component if `variant="filled"`. */
9
+ filled: string;
10
+ /** Styles applied to the select component if `variant="outlined"`. */
11
+ outlined: string;
12
+ /** Styles applied to the select component if `variant="standard"`. */
13
+ standard: string;
14
+ /** State class applied to the select component `disabled` class. */
15
+ disabled: string;
16
+ /** Styles applied to the icon component. */
17
+ icon: string;
18
+ /** Styles applied to the icon component if the popup is open. */
19
+ iconOpen: string;
20
+ /** Styles applied to the icon component if `variant="filled"`. */
21
+ iconFilled: string;
22
+ /** Styles applied to the icon component if `variant="outlined"`. */
23
+ iconOutlined: string;
24
+ /** Styles applied to the icon component if `variant="standard"`. */
25
+ iconStandard: string;
26
+ /** Styles applied to the underlying native input component. */
27
+ nativeInput: string;
28
+ /** State class applied to the select component `error` class. */
29
+ error: string;
30
+ }
31
+ export type NativeSelectClassKey = keyof NativeSelectClasses;
32
+ export declare function getNativeSelectUtilityClasses(slot: string): string;
33
+ declare const nativeSelectClasses: NativeSelectClasses;
34
+ export default nativeSelectClasses;
@@ -1,38 +1,38 @@
1
- export interface OutlinedInputClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if the color is secondary. */
5
- colorSecondary: 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 NotchedOutline element. */
21
- notchedOutline: string;
22
- /** Styles applied to the input element. */
23
- input: string;
24
- /** Styles applied to the input element if `size="small"`. */
25
- inputSizeSmall: string;
26
- /** Styles applied to the input element if `multiline={true}`. */
27
- inputMultiline: string;
28
- /** Styles applied to the input element if `startAdornment` is provided. */
29
- inputAdornedStart: string;
30
- /** Styles applied to the input element if `endAdornment` is provided. */
31
- inputAdornedEnd: string;
32
- /** Styles applied to the input element if `type="search"`. */
33
- inputTypeSearch: string;
34
- }
35
- export type OutlinedInputClassKey = keyof OutlinedInputClasses;
36
- export declare function getOutlinedInputUtilityClass(slot: string): string;
37
- declare const outlinedInputClasses: OutlinedInputClasses;
38
- export default outlinedInputClasses;
1
+ export interface OutlinedInputClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if the color is secondary. */
5
+ colorSecondary: 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 NotchedOutline element. */
21
+ notchedOutline: string;
22
+ /** Styles applied to the input element. */
23
+ input: string;
24
+ /** Styles applied to the input element if `size="small"`. */
25
+ inputSizeSmall: string;
26
+ /** Styles applied to the input element if `multiline={true}`. */
27
+ inputMultiline: string;
28
+ /** Styles applied to the input element if `startAdornment` is provided. */
29
+ inputAdornedStart: string;
30
+ /** Styles applied to the input element if `endAdornment` is provided. */
31
+ inputAdornedEnd: string;
32
+ /** Styles applied to the input element if `type="search"`. */
33
+ inputTypeSearch: string;
34
+ }
35
+ export type OutlinedInputClassKey = keyof OutlinedInputClasses;
36
+ export declare function getOutlinedInputUtilityClass(slot: string): string;
37
+ declare const outlinedInputClasses: OutlinedInputClasses;
38
+ export default outlinedInputClasses;
@@ -1,14 +1,14 @@
1
- export interface PaginationClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the ul element. */
5
- ul: string;
6
- /** Styles applied to the root element if `variant="outlined"`. */
7
- outlined: string;
8
- /** Styles applied to the root element if `variant="text"`. */
9
- text: string;
10
- }
11
- export type PaginationClassKey = keyof PaginationClasses;
12
- export declare function getPaginationUtilityClass(slot: string): string;
13
- declare const paginationClasses: PaginationClasses;
14
- export default paginationClasses;
1
+ export interface PaginationClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the ul element. */
5
+ ul: string;
6
+ /** Styles applied to the root element if `variant="outlined"`. */
7
+ outlined: string;
8
+ /** Styles applied to the root element if `variant="text"`. */
9
+ text: string;
10
+ }
11
+ export type PaginationClassKey = keyof PaginationClasses;
12
+ export declare function getPaginationUtilityClass(slot: string): string;
13
+ declare const paginationClasses: PaginationClasses;
14
+ export default paginationClasses;
@@ -1,42 +1,42 @@
1
- export interface PaginationItemClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `type="page"`. */
5
- page: string;
6
- /** Styles applied to the root element if `size="small"`. */
7
- sizeSmall: string;
8
- /** Styles applied to the root element if `size="large"`. */
9
- sizeLarge: string;
10
- /** Styles applied to the root element if `variant="text"`. */
11
- text: string;
12
- /** Styles applied to the root element if `variant="text"` and `color="primary"`. */
13
- textPrimary: string;
14
- /** Styles applied to the root element if `variant="text"` and `color="secondary"`. */
15
- textSecondary: string;
16
- /** Styles applied to the root element if `variant="outlined"`. */
17
- outlined: string;
18
- /** Styles applied to the root element if `variant="outlined"` and `color="primary"`. */
19
- outlinedPrimary: string;
20
- /** Styles applied to the root element if `variant="outlined"` and `color="secondary"`. */
21
- outlinedSecondary: string;
22
- /** Styles applied to the root element if `rounded="true"`. */
23
- rounded: string;
24
- /** Styles applied to the root element if `type="start-ellipsis"` or `type="end-ellipsis"`. */
25
- ellipsis: string;
26
- /** Styles applied to the root element if `type="first"` or type="last". */
27
- firstLast: string;
28
- /** Styles applied to the root element if `type="previous"` or type="next". */
29
- previousNext: string;
30
- /** State class applied to the root element if keyboard focused. */
31
- focusVisible: string;
32
- /** State class applied to the root element if `disabled={true}`. */
33
- disabled: string;
34
- /** State class applied to the root element if `selected={true}`. */
35
- selected: string;
36
- /** Styles applied to the icon to display. */
37
- icon: string;
38
- }
39
- export type PaginationItemClassKey = keyof PaginationItemClasses;
40
- export declare function getPaginationItemUtilityClass(slot: string): string;
41
- declare const paginationItemClasses: PaginationItemClasses;
42
- export default paginationItemClasses;
1
+ export interface PaginationItemClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `type="page"`. */
5
+ page: string;
6
+ /** Styles applied to the root element if `size="small"`. */
7
+ sizeSmall: string;
8
+ /** Styles applied to the root element if `size="large"`. */
9
+ sizeLarge: string;
10
+ /** Styles applied to the root element if `variant="text"`. */
11
+ text: string;
12
+ /** Styles applied to the root element if `variant="text"` and `color="primary"`. */
13
+ textPrimary: string;
14
+ /** Styles applied to the root element if `variant="text"` and `color="secondary"`. */
15
+ textSecondary: string;
16
+ /** Styles applied to the root element if `variant="outlined"`. */
17
+ outlined: string;
18
+ /** Styles applied to the root element if `variant="outlined"` and `color="primary"`. */
19
+ outlinedPrimary: string;
20
+ /** Styles applied to the root element if `variant="outlined"` and `color="secondary"`. */
21
+ outlinedSecondary: string;
22
+ /** Styles applied to the root element if `rounded="true"`. */
23
+ rounded: string;
24
+ /** Styles applied to the root element if `type="start-ellipsis"` or `type="end-ellipsis"`. */
25
+ ellipsis: string;
26
+ /** Styles applied to the root element if `type="first"` or type="last". */
27
+ firstLast: string;
28
+ /** Styles applied to the root element if `type="previous"` or type="next". */
29
+ previousNext: string;
30
+ /** State class applied to the root element if keyboard focused. */
31
+ focusVisible: string;
32
+ /** State class applied to the root element if `disabled={true}`. */
33
+ disabled: string;
34
+ /** State class applied to the root element if `selected={true}`. */
35
+ selected: string;
36
+ /** Styles applied to the icon to display. */
37
+ icon: string;
38
+ }
39
+ export type PaginationItemClassKey = keyof PaginationItemClasses;
40
+ export declare function getPaginationItemUtilityClass(slot: string): string;
41
+ declare const paginationItemClasses: PaginationItemClasses;
42
+ export default paginationItemClasses;
@@ -1,39 +1,39 @@
1
- export interface PaperClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element unless `square={true}`. */
5
- rounded: string;
6
- /** Styles applied to the root element if `variant="outlined"`. */
7
- outlined: string;
8
- /** Styles applied to the root element if `variant="elevation"`. */
9
- elevation: string;
10
- elevation0: string;
11
- elevation1: string;
12
- elevation2: string;
13
- elevation3: string;
14
- elevation4: string;
15
- elevation5: string;
16
- elevation6: string;
17
- elevation7: string;
18
- elevation8: string;
19
- elevation9: string;
20
- elevation10: string;
21
- elevation11: string;
22
- elevation12: string;
23
- elevation13: string;
24
- elevation14: string;
25
- elevation15: string;
26
- elevation16: string;
27
- elevation17: string;
28
- elevation18: string;
29
- elevation19: string;
30
- elevation20: string;
31
- elevation21: string;
32
- elevation22: string;
33
- elevation23: string;
34
- elevation24: string;
35
- }
36
- export type PaperClassKey = keyof PaperClasses;
37
- export declare function getPaperUtilityClass(slot: string): string;
38
- declare const paperClasses: PaperClasses;
39
- export default paperClasses;
1
+ export interface PaperClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element unless `square={true}`. */
5
+ rounded: string;
6
+ /** Styles applied to the root element if `variant="outlined"`. */
7
+ outlined: string;
8
+ /** Styles applied to the root element if `variant="elevation"`. */
9
+ elevation: string;
10
+ elevation0: string;
11
+ elevation1: string;
12
+ elevation2: string;
13
+ elevation3: string;
14
+ elevation4: string;
15
+ elevation5: string;
16
+ elevation6: string;
17
+ elevation7: string;
18
+ elevation8: string;
19
+ elevation9: string;
20
+ elevation10: string;
21
+ elevation11: string;
22
+ elevation12: string;
23
+ elevation13: string;
24
+ elevation14: string;
25
+ elevation15: string;
26
+ elevation16: string;
27
+ elevation17: string;
28
+ elevation18: string;
29
+ elevation19: string;
30
+ elevation20: string;
31
+ elevation21: string;
32
+ elevation22: string;
33
+ elevation23: string;
34
+ elevation24: string;
35
+ }
36
+ export type PaperClassKey = keyof PaperClasses;
37
+ export declare function getPaperUtilityClass(slot: string): string;
38
+ declare const paperClasses: PaperClasses;
39
+ export default paperClasses;
@@ -1,8 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
+ import { SlotComponentProps } from '@mui/base';
3
4
  import { InternalStandardProps as StandardProps } from '..';
4
- import { PaperProps } from '../Paper';
5
- import { ModalProps } from '../Modal';
5
+ import Paper, { PaperProps } from '../Paper';
6
+ import Modal, { ModalOwnerState, ModalProps } from '../Modal';
6
7
  import { Theme } from '../styles';
7
8
  import { TransitionProps } from '../transitions/transition';
8
9
  import { PopoverClasses } from './popoverClasses';
@@ -19,7 +20,8 @@ export interface PopoverPosition {
19
20
 
20
21
  export type PopoverReference = 'anchorEl' | 'anchorPosition' | 'none';
21
22
 
22
- export interface PopoverProps extends StandardProps<ModalProps, 'children'> {
23
+ export interface PopoverProps
24
+ extends StandardProps<Omit<ModalProps, 'slots' | 'slotProps'>, 'children'> {
23
25
  /**
24
26
  * A ref for imperative actions.
25
27
  * It currently only supports updatePosition() action.
@@ -88,9 +90,32 @@ export interface PopoverProps extends StandardProps<ModalProps, 'children'> {
88
90
  open: boolean;
89
91
  /**
90
92
  * Props applied to the [`Paper`](/material-ui/api/paper/) element.
93
+ *
94
+ * This prop is an alias for `slotProps.paper` and will be overriden by it if both are used.
95
+ * @deprecated Use `slotProps.paper` instead.
96
+ *
91
97
  * @default {}
92
98
  */
93
99
  PaperProps?: Partial<PaperProps>;
100
+ /**
101
+ * The components used for each slot inside.
102
+ *
103
+ * @default {}
104
+ */
105
+ slots?: {
106
+ root?: React.ElementType;
107
+ paper?: React.ElementType;
108
+ };
109
+ /**
110
+ * The extra props for the slot components.
111
+ * You can override the existing props or add new ones.
112
+ *
113
+ * @default {}
114
+ */
115
+ slotProps?: {
116
+ root?: SlotComponentProps<typeof Modal, {}, ModalOwnerState>;
117
+ paper?: SlotComponentProps<typeof Paper, {}, {}>;
118
+ };
94
119
  /**
95
120
  * The system prop that allows defining system overrides as well as additional CSS styles.
96
121
  */
@@ -140,6 +165,12 @@ export function getOffsetLeft(
140
165
  horizontal: number | 'center' | 'right' | 'left',
141
166
  ): number;
142
167
 
168
+ type PopoverRootProps = NonNullable<PopoverProps['slotProps']>['root'];
169
+ type PopoverPaperProps = NonNullable<PopoverProps['slotProps']>['paper'];
170
+
171
+ export declare const PopoverRoot: React.FC<PopoverRootProps>;
172
+ export declare const PopoverPaper: React.FC<PopoverPaperProps>;
173
+
143
174
  /**
144
175
  *
145
176
  * Demos: