@mui/material 5.14.7 → 5.14.9

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 (143) hide show
  1. package/Accordion/Accordion.d.ts +2 -2
  2. package/AccordionSummary/AccordionSummary.d.ts +22 -20
  3. package/AlertTitle/AlertTitle.d.ts +1 -0
  4. package/AppBar/AppBar.d.ts +33 -31
  5. package/Avatar/Avatar.d.ts +49 -50
  6. package/Backdrop/Backdrop.d.ts +87 -85
  7. package/Badge/Badge.d.ts +2 -2
  8. package/BottomNavigation/BottomNavigation.d.ts +35 -33
  9. package/BottomNavigationAction/BottomNavigationAction.d.ts +39 -37
  10. package/Breadcrumbs/Breadcrumbs.d.ts +70 -67
  11. package/Button/Button.d.ts +72 -73
  12. package/Button/Button.js +4 -1
  13. package/ButtonBase/ButtonBase.d.ts +83 -81
  14. package/ButtonGroup/ButtonGroup.d.ts +72 -70
  15. package/ButtonGroup/ButtonGroup.js +86 -54
  16. package/ButtonGroup/ButtonGroupButtonContext.d.ts +6 -0
  17. package/ButtonGroup/ButtonGroupButtonContext.js +9 -0
  18. package/ButtonGroup/buttonGroupClasses.d.ts +6 -0
  19. package/ButtonGroup/buttonGroupClasses.js +1 -1
  20. package/CHANGELOG.md +235 -38
  21. package/Card/Card.d.ts +19 -18
  22. package/CardActionArea/CardActionArea.d.ts +15 -13
  23. package/CardContent/CardContent.d.ts +18 -16
  24. package/CardHeader/CardHeader.d.ts +77 -67
  25. package/CardMedia/CardMedia.d.ts +30 -28
  26. package/Chip/Chip.d.ts +84 -82
  27. package/CircularProgress/CircularProgress.d.ts +1 -1
  28. package/CircularProgress/CircularProgress.js +1 -1
  29. package/Container/Container.d.ts +35 -33
  30. package/DialogContentText/DialogContentText.d.ts +14 -12
  31. package/DialogTitle/DialogTitle.d.ts +19 -16
  32. package/Divider/Divider.d.ts +49 -50
  33. package/Fab/Fab.d.ts +59 -56
  34. package/FormControl/FormControl.d.ts +74 -72
  35. package/FormHelperText/FormHelperText.d.ts +52 -50
  36. package/FormLabel/FormLabel.d.ts +7 -4
  37. package/Grid/Grid.d.ts +69 -68
  38. package/Hidden/Hidden.d.ts +10 -10
  39. package/Icon/Icon.d.ts +50 -48
  40. package/IconButton/IconButton.d.ts +52 -50
  41. package/ImageList/ImageList.d.ts +41 -39
  42. package/ImageListItem/ImageListItem.d.ts +28 -26
  43. package/ImageListItem/ImageListItem.js +2 -1
  44. package/InputAdornment/InputAdornment.d.ts +39 -37
  45. package/InputBase/InputBase.js +1 -1
  46. package/InputLabel/InputLabel.d.ts +58 -56
  47. package/InputLabel/InputLabel.js +2 -1
  48. package/Link/Link.d.ts +37 -39
  49. package/List/List.d.ts +34 -35
  50. package/ListItem/ListItem.d.ts +53 -49
  51. package/ListItemButton/ListItemButton.d.ts +9 -3
  52. package/ListSubheader/ListSubheader.d.ts +38 -36
  53. package/MenuItem/MenuItem.d.ts +47 -44
  54. package/MenuList/MenuList.d.ts +37 -35
  55. package/Modal/Modal.d.ts +172 -178
  56. package/Modal/Modal.js +1 -1
  57. package/PaginationItem/PaginationItem.d.ts +85 -83
  58. package/Paper/Paper.d.ts +2 -2
  59. package/README.md +9 -198
  60. package/Radio/Radio.js +3 -2
  61. package/Radio/radioClasses.d.ts +2 -0
  62. package/Radio/radioClasses.js +1 -1
  63. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +25 -23
  64. package/Select/SelectInput.js +9 -5
  65. package/Skeleton/Skeleton.d.ts +42 -40
  66. package/Slider/Slider.d.ts +249 -247
  67. package/Slider/Slider.js +9 -86
  68. package/Stack/Stack.d.ts +39 -38
  69. package/Step/Step.d.ts +46 -44
  70. package/StepButton/StepButton.d.ts +27 -25
  71. package/Stepper/Stepper.d.ts +45 -44
  72. package/SvgIcon/SvgIcon.d.ts +77 -75
  73. package/SwipeableDrawer/SwipeableDrawer.js +4 -4
  74. package/Tab/Tab.d.ts +52 -50
  75. package/TabScrollButton/TabScrollButton.d.ts +3 -2
  76. package/Table/Table.d.ts +35 -33
  77. package/TableBody/TableBody.d.ts +18 -16
  78. package/TableContainer/TableContainer.d.ts +18 -16
  79. package/TableFooter/TableFooter.d.ts +18 -16
  80. package/TableHead/TableHead.d.ts +18 -16
  81. package/TablePagination/TablePagination.d.ts +113 -112
  82. package/TableRow/TableRow.d.ts +28 -26
  83. package/TableSortLabel/TableSortLabel.d.ts +40 -36
  84. package/Tabs/Tabs.d.ts +153 -150
  85. package/Tabs/Tabs.js +1 -4
  86. package/ToggleButton/ToggleButton.d.ts +72 -70
  87. package/Toolbar/Toolbar.d.ts +29 -27
  88. package/Typography/Typography.d.ts +2 -2
  89. package/index.js +1 -1
  90. package/legacy/Button/Button.js +4 -1
  91. package/legacy/ButtonGroup/ButtonGroup.js +81 -56
  92. package/legacy/ButtonGroup/ButtonGroupButtonContext.js +9 -0
  93. package/legacy/ButtonGroup/buttonGroupClasses.js +1 -1
  94. package/legacy/CircularProgress/CircularProgress.js +1 -1
  95. package/legacy/ImageListItem/ImageListItem.js +2 -1
  96. package/legacy/InputBase/InputBase.js +1 -1
  97. package/legacy/InputLabel/InputLabel.js +2 -1
  98. package/legacy/Modal/Modal.js +3 -1
  99. package/legacy/Radio/Radio.js +3 -2
  100. package/legacy/Radio/radioClasses.js +1 -1
  101. package/legacy/Select/SelectInput.js +9 -5
  102. package/legacy/Slider/Slider.js +9 -86
  103. package/legacy/SwipeableDrawer/SwipeableDrawer.js +4 -4
  104. package/legacy/Tabs/Tabs.js +1 -4
  105. package/legacy/index.js +1 -1
  106. package/legacy/useTouchRipple/useTouchRipple.js +4 -4
  107. package/modern/Button/Button.js +4 -1
  108. package/modern/ButtonGroup/ButtonGroup.js +86 -54
  109. package/modern/ButtonGroup/ButtonGroupButtonContext.js +9 -0
  110. package/modern/ButtonGroup/buttonGroupClasses.js +1 -1
  111. package/modern/CircularProgress/CircularProgress.js +1 -1
  112. package/modern/ImageListItem/ImageListItem.js +2 -1
  113. package/modern/InputBase/InputBase.js +1 -1
  114. package/modern/InputLabel/InputLabel.js +2 -1
  115. package/modern/Modal/Modal.js +1 -1
  116. package/modern/Radio/Radio.js +3 -2
  117. package/modern/Radio/radioClasses.js +1 -1
  118. package/modern/Select/SelectInput.js +8 -5
  119. package/modern/Slider/Slider.js +9 -86
  120. package/modern/SwipeableDrawer/SwipeableDrawer.js +4 -4
  121. package/modern/Tabs/Tabs.js +1 -4
  122. package/modern/index.js +1 -1
  123. package/node/Button/Button.js +4 -1
  124. package/node/ButtonGroup/ButtonGroup.js +86 -54
  125. package/node/ButtonGroup/ButtonGroupButtonContext.js +18 -0
  126. package/node/ButtonGroup/buttonGroupClasses.js +1 -1
  127. package/node/CircularProgress/CircularProgress.js +1 -1
  128. package/node/ImageListItem/ImageListItem.js +2 -1
  129. package/node/InputBase/InputBase.js +1 -1
  130. package/node/InputLabel/InputLabel.js +2 -1
  131. package/node/Modal/Modal.js +1 -1
  132. package/node/Radio/Radio.js +3 -2
  133. package/node/Radio/radioClasses.js +1 -1
  134. package/node/Select/SelectInput.js +9 -5
  135. package/node/Slider/Slider.js +3 -73
  136. package/node/SwipeableDrawer/SwipeableDrawer.js +4 -4
  137. package/node/Tabs/Tabs.js +1 -4
  138. package/node/index.js +1 -1
  139. package/node/useTouchRipple/useTouchRipple.js +4 -4
  140. package/package.json +16 -16
  141. package/umd/material-ui.development.js +258 -254
  142. package/umd/material-ui.production.min.js +18 -18
  143. package/useTouchRipple/useTouchRipple.js +4 -4
package/Modal/Modal.d.ts CHANGED
@@ -26,187 +26,181 @@ export interface ModalSlots {
26
26
  backdrop?: React.ElementType;
27
27
  }
28
28
 
29
+ export interface ModalOwnProps {
30
+ /**
31
+ * A backdrop component. This prop enables custom backdrop rendering.
32
+ * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
33
+ * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.
34
+ * @default styled(Backdrop, {
35
+ * name: 'MuiModal',
36
+ * slot: 'Backdrop',
37
+ * overridesResolver: (props, styles) => {
38
+ * return styles.backdrop;
39
+ * },
40
+ * })({
41
+ * zIndex: -1,
42
+ * })
43
+ */
44
+ BackdropComponent?: React.ElementType<BackdropProps>;
45
+ /**
46
+ * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
47
+ * @deprecated Use `slotProps.backdrop` instead.
48
+ */
49
+ BackdropProps?: Partial<BackdropProps>;
50
+ /**
51
+ * A single child content element.
52
+ */
53
+ children: React.ReactElement;
54
+ /**
55
+ * Override or extend the styles applied to the component.
56
+ */
57
+ classes?: Partial<ModalClasses>;
58
+ /**
59
+ * @ignore
60
+ */
61
+ className?: string;
62
+ /**
63
+ * When set to true the Modal waits until a nested Transition is completed before closing.
64
+ * @default false
65
+ */
66
+ closeAfterTransition?: boolean;
67
+ /**
68
+ * The components used for each slot inside.
69
+ *
70
+ * This prop is an alias for the `slots` prop.
71
+ * It's recommended to use the `slots` prop instead.
72
+ *
73
+ * @default {}
74
+ */
75
+ components?: {
76
+ Root?: React.ElementType;
77
+ Backdrop?: React.ElementType;
78
+ };
79
+ /**
80
+ * The extra props for the slot components.
81
+ * You can override the existing props or add new ones.
82
+ *
83
+ * This prop is an alias for the `slotProps` prop.
84
+ * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
85
+ *
86
+ * @default {}
87
+ */
88
+ componentsProps?: {
89
+ root?: SlotComponentProps<'div', ModalComponentsPropsOverrides, ModalOwnerState>;
90
+ backdrop?: SlotComponentProps<typeof Backdrop, ModalComponentsPropsOverrides, ModalOwnerState>;
91
+ };
92
+ /**
93
+ * An HTML element or function that returns one.
94
+ * The `container` will have the portal children appended to it.
95
+ *
96
+ * By default, it uses the body of the top-level document object,
97
+ * so it's simply `document.body` most of the time.
98
+ */
99
+ container?: PortalProps['container'];
100
+ /**
101
+ * If `true`, the modal will not automatically shift focus to itself when it opens, and
102
+ * replace it to the last focused element when it closes.
103
+ * This also works correctly with any modal children that have the `disableAutoFocus` prop.
104
+ *
105
+ * Generally this should never be set to `true` as it makes the modal less
106
+ * accessible to assistive technologies, like screen readers.
107
+ * @default false
108
+ */
109
+ disableAutoFocus?: boolean;
110
+ /**
111
+ * If `true`, the modal will not prevent focus from leaving the modal while open.
112
+ *
113
+ * Generally this should never be set to `true` as it makes the modal less
114
+ * accessible to assistive technologies, like screen readers.
115
+ * @default false
116
+ */
117
+ disableEnforceFocus?: boolean;
118
+ /**
119
+ * If `true`, hitting escape will not fire the `onClose` callback.
120
+ * @default false
121
+ */
122
+ disableEscapeKeyDown?: boolean;
123
+ /**
124
+ * The `children` will be under the DOM hierarchy of the parent component.
125
+ * @default false
126
+ */
127
+ disablePortal?: PortalProps['disablePortal'];
128
+ /**
129
+ * If `true`, the modal will not restore focus to previously focused element once
130
+ * modal is hidden or unmounted.
131
+ * @default false
132
+ */
133
+ disableRestoreFocus?: boolean;
134
+ /**
135
+ * Disable the scroll lock behavior.
136
+ * @default false
137
+ */
138
+ disableScrollLock?: boolean;
139
+ /**
140
+ * If `true`, the backdrop is not rendered.
141
+ * @default false
142
+ */
143
+ hideBackdrop?: boolean;
144
+ /**
145
+ * Always keep the children in the DOM.
146
+ * This prop can be useful in SEO situation or
147
+ * when you want to maximize the responsiveness of the Modal.
148
+ * @default false
149
+ */
150
+ keepMounted?: boolean;
151
+ /**
152
+ * Callback fired when the backdrop is clicked.
153
+ * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
154
+ */
155
+ onBackdropClick?: React.ReactEventHandler<{}>;
156
+ /**
157
+ * Callback fired when the component requests to be closed.
158
+ * The `reason` parameter can optionally be used to control the response to `onClose`.
159
+ *
160
+ * @param {object} event The event source of the callback.
161
+ * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
162
+ */
163
+ onClose?: {
164
+ bivarianceHack(event: {}, reason: 'backdropClick' | 'escapeKeyDown'): void;
165
+ }['bivarianceHack'];
166
+ /**
167
+ * A function called when a transition enters.
168
+ */
169
+ onTransitionEnter?: () => void;
170
+ /**
171
+ * A function called when a transition has exited.
172
+ */
173
+ onTransitionExited?: () => void;
174
+ /**
175
+ * If `true`, the component is shown.
176
+ */
177
+ open: boolean;
178
+ /**
179
+ * The components used for each slot inside the Modal.
180
+ * Either a string to use a HTML element or a component.
181
+ * @default {}
182
+ */
183
+ slots?: ModalSlots;
184
+ /**
185
+ * The props used for each slot inside the Modal.
186
+ * @default {}
187
+ */
188
+ slotProps?: {
189
+ root?: SlotComponentProps<'div', ModalComponentsPropsOverrides, ModalOwnerState>;
190
+ backdrop?: SlotComponentProps<typeof Backdrop, ModalComponentsPropsOverrides, ModalOwnerState>;
191
+ };
192
+ /**
193
+ * The system prop that allows defining system overrides as well as additional CSS styles.
194
+ */
195
+ sx?: SxProps<Theme>;
196
+ }
197
+
29
198
  export interface ModalTypeMap<
30
- DefaultComponent extends React.ElementType = 'div',
199
+ RootComponent extends React.ElementType = 'div',
31
200
  AdditionalProps = {},
32
201
  > {
33
- props: AdditionalProps & {
34
- /**
35
- * A backdrop component. This prop enables custom backdrop rendering.
36
- * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
37
- * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.
38
- * @default styled(Backdrop, {
39
- * name: 'MuiModal',
40
- * slot: 'Backdrop',
41
- * overridesResolver: (props, styles) => {
42
- * return styles.backdrop;
43
- * },
44
- * })({
45
- * zIndex: -1,
46
- * })
47
- */
48
- BackdropComponent?: React.ElementType<BackdropProps>;
49
- /**
50
- * Props applied to the [`Backdrop`](/material-ui/api/backdrop/) element.
51
- * @deprecated Use `slotProps.backdrop` instead.
52
- */
53
- BackdropProps?: Partial<BackdropProps>;
54
- /**
55
- * A single child content element.
56
- */
57
- children: React.ReactElement;
58
- /**
59
- * Override or extend the styles applied to the component.
60
- */
61
- classes?: Partial<ModalClasses>;
62
- /**
63
- * @ignore
64
- */
65
- className?: string;
66
- /**
67
- * When set to true the Modal waits until a nested Transition is completed before closing.
68
- * @default false
69
- */
70
- closeAfterTransition?: boolean;
71
- /**
72
- * The components used for each slot inside.
73
- *
74
- * This prop is an alias for the `slots` prop.
75
- * It's recommended to use the `slots` prop instead.
76
- *
77
- * @default {}
78
- */
79
- components?: {
80
- Root?: React.ElementType;
81
- Backdrop?: React.ElementType;
82
- };
83
- /**
84
- * The extra props for the slot components.
85
- * You can override the existing props or add new ones.
86
- *
87
- * This prop is an alias for the `slotProps` prop.
88
- * It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
89
- *
90
- * @default {}
91
- */
92
- componentsProps?: {
93
- root?: SlotComponentProps<'div', ModalComponentsPropsOverrides, ModalOwnerState>;
94
- backdrop?: SlotComponentProps<
95
- typeof Backdrop,
96
- ModalComponentsPropsOverrides,
97
- ModalOwnerState
98
- >;
99
- };
100
- /**
101
- * An HTML element or function that returns one.
102
- * The `container` will have the portal children appended to it.
103
- *
104
- * By default, it uses the body of the top-level document object,
105
- * so it's simply `document.body` most of the time.
106
- */
107
- container?: PortalProps['container'];
108
- /**
109
- * If `true`, the modal will not automatically shift focus to itself when it opens, and
110
- * replace it to the last focused element when it closes.
111
- * This also works correctly with any modal children that have the `disableAutoFocus` prop.
112
- *
113
- * Generally this should never be set to `true` as it makes the modal less
114
- * accessible to assistive technologies, like screen readers.
115
- * @default false
116
- */
117
- disableAutoFocus?: boolean;
118
- /**
119
- * If `true`, the modal will not prevent focus from leaving the modal while open.
120
- *
121
- * Generally this should never be set to `true` as it makes the modal less
122
- * accessible to assistive technologies, like screen readers.
123
- * @default false
124
- */
125
- disableEnforceFocus?: boolean;
126
- /**
127
- * If `true`, hitting escape will not fire the `onClose` callback.
128
- * @default false
129
- */
130
- disableEscapeKeyDown?: boolean;
131
- /**
132
- * The `children` will be under the DOM hierarchy of the parent component.
133
- * @default false
134
- */
135
- disablePortal?: PortalProps['disablePortal'];
136
- /**
137
- * If `true`, the modal will not restore focus to previously focused element once
138
- * modal is hidden or unmounted.
139
- * @default false
140
- */
141
- disableRestoreFocus?: boolean;
142
- /**
143
- * Disable the scroll lock behavior.
144
- * @default false
145
- */
146
- disableScrollLock?: boolean;
147
- /**
148
- * If `true`, the backdrop is not rendered.
149
- * @default false
150
- */
151
- hideBackdrop?: boolean;
152
- /**
153
- * Always keep the children in the DOM.
154
- * This prop can be useful in SEO situation or
155
- * when you want to maximize the responsiveness of the Modal.
156
- * @default false
157
- */
158
- keepMounted?: boolean;
159
- /**
160
- * Callback fired when the backdrop is clicked.
161
- * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
162
- */
163
- onBackdropClick?: React.ReactEventHandler<{}>;
164
- /**
165
- * Callback fired when the component requests to be closed.
166
- * The `reason` parameter can optionally be used to control the response to `onClose`.
167
- *
168
- * @param {object} event The event source of the callback.
169
- * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
170
- */
171
- onClose?: {
172
- bivarianceHack(event: {}, reason: 'backdropClick' | 'escapeKeyDown'): void;
173
- }['bivarianceHack'];
174
- /**
175
- * A function called when a transition enters.
176
- */
177
- onTransitionEnter?: () => void;
178
- /**
179
- * A function called when a transition has exited.
180
- */
181
- onTransitionExited?: () => void;
182
- /**
183
- * If `true`, the component is shown.
184
- */
185
- open: boolean;
186
- /**
187
- * The components used for each slot inside the Modal.
188
- * Either a string to use a HTML element or a component.
189
- * @default {}
190
- */
191
- slots?: ModalSlots;
192
- /**
193
- * The props used for each slot inside the Modal.
194
- * @default {}
195
- */
196
- slotProps?: {
197
- root?: SlotComponentProps<'div', ModalComponentsPropsOverrides, ModalOwnerState>;
198
- backdrop?: SlotComponentProps<
199
- typeof Backdrop,
200
- ModalComponentsPropsOverrides,
201
- ModalOwnerState
202
- >;
203
- };
204
- /**
205
- * The system prop that allows defining system overrides as well as additional CSS styles.
206
- */
207
- sx?: SxProps<Theme>;
208
- };
209
- defaultComponent: DefaultComponent;
202
+ props: AdditionalProps & ModalOwnProps;
203
+ defaultComponent: RootComponent;
210
204
  }
211
205
 
212
206
  type ModalRootProps = NonNullable<ModalTypeMap['props']['slotProps']>['root'];
package/Modal/Modal.js CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
- const _excluded = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "open", "slotProps", "slots", "theme"];
5
+ const _excluded = ["BackdropComponent", "BackdropProps", "classes", "className", "closeAfterTransition", "children", "container", "component", "components", "componentsProps", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onTransitionEnter", "onTransitionExited", "open", "slotProps", "slots", "theme"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
@@ -12,92 +12,94 @@ export interface PaginationItemPropsSizeOverrides {}
12
12
 
13
13
  export interface PaginationItemPropsColorOverrides {}
14
14
 
15
+ export interface PaginationItemOwnProps {
16
+ /**
17
+ * Override or extend the styles applied to the component.
18
+ */
19
+ classes?: Partial<PaginationItemClasses>;
20
+ /**
21
+ * The active color.
22
+ * It supports both default and custom theme colors, which can be added as shown in the
23
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
24
+ * @default 'standard'
25
+ */
26
+ color?: OverridableStringUnion<
27
+ 'standard' | 'primary' | 'secondary',
28
+ PaginationItemPropsColorOverrides
29
+ >;
30
+ /**
31
+ * The components used for each slot inside.
32
+ *
33
+ * This prop is an alias for the `slots` prop.
34
+ * It's recommended to use the `slots` prop instead.
35
+ *
36
+ * @default {}
37
+ */
38
+ components?: {
39
+ first?: React.ElementType;
40
+ last?: React.ElementType;
41
+ next?: React.ElementType;
42
+ previous?: React.ElementType;
43
+ };
44
+ /**
45
+ * If `true`, the component is disabled.
46
+ * @default false
47
+ */
48
+ disabled?: boolean;
49
+ /**
50
+ * The current page number.
51
+ */
52
+ page?: React.ReactNode;
53
+ /**
54
+ * If `true` the pagination item is selected.
55
+ * @default false
56
+ */
57
+ selected?: boolean;
58
+ /**
59
+ * The shape of the pagination item.
60
+ * @default 'circular'
61
+ */
62
+ shape?: 'circular' | 'rounded';
63
+ /**
64
+ * The size of the component.
65
+ * @default 'medium'
66
+ */
67
+ size?: OverridableStringUnion<'small' | 'medium' | 'large', PaginationItemPropsSizeOverrides>;
68
+ /**
69
+ * The components used for each slot inside.
70
+ *
71
+ * This prop is an alias for the `components` prop, which will be deprecated in the future.
72
+ *
73
+ * @default {}
74
+ */
75
+ slots?: {
76
+ first?: React.ElementType;
77
+ last?: React.ElementType;
78
+ next?: React.ElementType;
79
+ previous?: React.ElementType;
80
+ };
81
+ /**
82
+ * The system prop that allows defining system overrides as well as additional CSS styles.
83
+ */
84
+ sx?: SxProps<Theme>;
85
+ /**
86
+ * The type of pagination item.
87
+ * @default 'page'
88
+ */
89
+ type?: UsePaginationItem['type'];
90
+ /**
91
+ * The variant to use.
92
+ * @default 'text'
93
+ */
94
+ variant?: OverridableStringUnion<'text' | 'outlined', PaginationItemPropsVariantOverrides>;
95
+ }
96
+
15
97
  export interface PaginationItemTypeMap<
16
98
  AdditionalProps = {},
17
- DefaultComponent extends React.ElementType = 'div',
99
+ RootComponent extends React.ElementType = 'div',
18
100
  > {
19
- props: AdditionalProps & {
20
- /**
21
- * Override or extend the styles applied to the component.
22
- */
23
- classes?: Partial<PaginationItemClasses>;
24
- /**
25
- * The active color.
26
- * It supports both default and custom theme colors, which can be added as shown in the
27
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
28
- * @default 'standard'
29
- */
30
- color?: OverridableStringUnion<
31
- 'standard' | 'primary' | 'secondary',
32
- PaginationItemPropsColorOverrides
33
- >;
34
- /**
35
- * The components used for each slot inside.
36
- *
37
- * This prop is an alias for the `slots` prop.
38
- * It's recommended to use the `slots` prop instead.
39
- *
40
- * @default {}
41
- */
42
- components?: {
43
- first?: React.ElementType;
44
- last?: React.ElementType;
45
- next?: React.ElementType;
46
- previous?: React.ElementType;
47
- };
48
- /**
49
- * If `true`, the component is disabled.
50
- * @default false
51
- */
52
- disabled?: boolean;
53
- /**
54
- * The current page number.
55
- */
56
- page?: React.ReactNode;
57
- /**
58
- * If `true` the pagination item is selected.
59
- * @default false
60
- */
61
- selected?: boolean;
62
- /**
63
- * The shape of the pagination item.
64
- * @default 'circular'
65
- */
66
- shape?: 'circular' | 'rounded';
67
- /**
68
- * The size of the component.
69
- * @default 'medium'
70
- */
71
- size?: OverridableStringUnion<'small' | 'medium' | 'large', PaginationItemPropsSizeOverrides>;
72
- /**
73
- * The components used for each slot inside.
74
- *
75
- * This prop is an alias for the `components` prop, which will be deprecated in the future.
76
- *
77
- * @default {}
78
- */
79
- slots?: {
80
- first?: React.ElementType;
81
- last?: React.ElementType;
82
- next?: React.ElementType;
83
- previous?: React.ElementType;
84
- };
85
- /**
86
- * The system prop that allows defining system overrides as well as additional CSS styles.
87
- */
88
- sx?: SxProps<Theme>;
89
- /**
90
- * The type of pagination item.
91
- * @default 'page'
92
- */
93
- type?: UsePaginationItem['type'];
94
- /**
95
- * The variant to use.
96
- * @default 'text'
97
- */
98
- variant?: OverridableStringUnion<'text' | 'outlined', PaginationItemPropsVariantOverrides>;
99
- };
100
- defaultComponent: DefaultComponent;
101
+ props: AdditionalProps & PaginationItemOwnProps;
102
+ defaultComponent: RootComponent;
101
103
  }
102
104
 
103
105
  /**
package/Paper/Paper.d.ts CHANGED
@@ -40,10 +40,10 @@ export interface PaperOwnProps {
40
40
 
41
41
  export interface PaperTypeMap<
42
42
  AdditionalProps = {},
43
- DefaultComponent extends React.ElementType = 'div',
43
+ RootComponent extends React.ElementType = 'div',
44
44
  > {
45
45
  props: AdditionalProps & PaperOwnProps;
46
- defaultComponent: DefaultComponent;
46
+ defaultComponent: RootComponent;
47
47
  }
48
48
 
49
49
  /**