@mui/material 5.14.7 → 5.14.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +2 -2
- package/AccordionSummary/AccordionSummary.d.ts +22 -20
- package/AppBar/AppBar.d.ts +33 -31
- package/Avatar/Avatar.d.ts +49 -50
- package/Backdrop/Backdrop.d.ts +87 -85
- package/Badge/Badge.d.ts +2 -2
- package/BottomNavigation/BottomNavigation.d.ts +35 -33
- package/BottomNavigationAction/BottomNavigationAction.d.ts +39 -37
- package/Breadcrumbs/Breadcrumbs.d.ts +69 -67
- package/Button/Button.d.ts +72 -73
- package/ButtonBase/ButtonBase.d.ts +83 -81
- package/ButtonGroup/ButtonGroup.d.ts +72 -70
- package/CHANGELOG.md +111 -19
- package/Card/Card.d.ts +19 -18
- package/CardActionArea/CardActionArea.d.ts +15 -13
- package/CardContent/CardContent.d.ts +18 -16
- package/CardHeader/CardHeader.d.ts +77 -67
- package/CardMedia/CardMedia.d.ts +30 -28
- package/Chip/Chip.d.ts +84 -82
- package/CircularProgress/CircularProgress.d.ts +1 -1
- package/CircularProgress/CircularProgress.js +1 -1
- package/Container/Container.d.ts +35 -33
- package/DialogContentText/DialogContentText.d.ts +14 -12
- package/DialogTitle/DialogTitle.d.ts +18 -16
- package/Divider/Divider.d.ts +49 -50
- package/Fab/Fab.d.ts +59 -56
- package/FormControl/FormControl.d.ts +74 -72
- package/FormHelperText/FormHelperText.d.ts +52 -50
- package/FormLabel/FormLabel.d.ts +7 -4
- package/Grid/Grid.d.ts +69 -68
- package/Hidden/Hidden.d.ts +10 -10
- package/Icon/Icon.d.ts +50 -48
- package/IconButton/IconButton.d.ts +52 -50
- package/ImageList/ImageList.d.ts +41 -39
- package/ImageListItem/ImageListItem.d.ts +28 -26
- package/ImageListItem/ImageListItem.js +2 -1
- package/InputAdornment/InputAdornment.d.ts +39 -37
- package/InputBase/InputBase.js +1 -1
- package/InputLabel/InputLabel.d.ts +58 -56
- package/InputLabel/InputLabel.js +2 -1
- package/Link/Link.d.ts +37 -39
- package/List/List.d.ts +34 -35
- package/ListItem/ListItem.d.ts +53 -49
- package/ListItemButton/ListItemButton.d.ts +9 -3
- package/ListSubheader/ListSubheader.d.ts +38 -36
- package/MenuItem/MenuItem.d.ts +47 -44
- package/MenuList/MenuList.d.ts +37 -35
- package/Modal/Modal.d.ts +172 -178
- package/PaginationItem/PaginationItem.d.ts +85 -83
- package/Paper/Paper.d.ts +2 -2
- package/Radio/Radio.js +3 -2
- package/Radio/radioClasses.d.ts +2 -0
- package/Radio/radioClasses.js +1 -1
- package/ScopedCssBaseline/ScopedCssBaseline.d.ts +25 -23
- package/Select/SelectInput.js +9 -5
- package/Skeleton/Skeleton.d.ts +42 -40
- package/Slider/Slider.d.ts +249 -247
- package/Stack/Stack.d.ts +39 -38
- package/Step/Step.d.ts +46 -44
- package/StepButton/StepButton.d.ts +27 -25
- package/Stepper/Stepper.d.ts +45 -44
- package/SvgIcon/SvgIcon.d.ts +77 -75
- package/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/Tab/Tab.d.ts +52 -50
- package/TabScrollButton/TabScrollButton.d.ts +3 -2
- package/Table/Table.d.ts +35 -33
- package/TableBody/TableBody.d.ts +18 -16
- package/TableContainer/TableContainer.d.ts +18 -16
- package/TableFooter/TableFooter.d.ts +18 -16
- package/TableHead/TableHead.d.ts +18 -16
- package/TablePagination/TablePagination.d.ts +113 -112
- package/TableRow/TableRow.d.ts +28 -26
- package/TableSortLabel/TableSortLabel.d.ts +40 -36
- package/Tabs/Tabs.d.ts +153 -150
- package/ToggleButton/ToggleButton.d.ts +72 -70
- package/Toolbar/Toolbar.d.ts +29 -27
- package/Typography/Typography.d.ts +2 -2
- package/index.js +1 -1
- package/legacy/CircularProgress/CircularProgress.js +1 -1
- package/legacy/ImageListItem/ImageListItem.js +2 -1
- package/legacy/InputBase/InputBase.js +1 -1
- package/legacy/InputLabel/InputLabel.js +2 -1
- package/legacy/Radio/Radio.js +3 -2
- package/legacy/Radio/radioClasses.js +1 -1
- package/legacy/Select/SelectInput.js +9 -5
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/legacy/index.js +1 -1
- package/modern/CircularProgress/CircularProgress.js +1 -1
- package/modern/ImageListItem/ImageListItem.js +2 -1
- package/modern/InputBase/InputBase.js +1 -1
- package/modern/InputLabel/InputLabel.js +2 -1
- package/modern/Radio/Radio.js +3 -2
- package/modern/Radio/radioClasses.js +1 -1
- package/modern/Select/SelectInput.js +8 -5
- package/modern/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/modern/index.js +1 -1
- package/node/CircularProgress/CircularProgress.js +1 -1
- package/node/ImageListItem/ImageListItem.js +2 -1
- package/node/InputBase/InputBase.js +1 -1
- package/node/InputLabel/InputLabel.js +2 -1
- package/node/Radio/Radio.js +3 -2
- package/node/Radio/radioClasses.js +1 -1
- package/node/Select/SelectInput.js +9 -5
- package/node/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/node/index.js +1 -1
- package/package.json +5 -5
- package/umd/material-ui.development.js +50 -23
- package/umd/material-ui.production.min.js +5 -5
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
|
-
|
|
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'];
|
|
@@ -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
|
-
|
|
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
|
-
|
|
43
|
+
RootComponent extends React.ElementType = 'div',
|
|
44
44
|
> {
|
|
45
45
|
props: AdditionalProps & PaperOwnProps;
|
|
46
|
-
defaultComponent:
|
|
46
|
+
defaultComponent: RootComponent;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
/**
|
package/Radio/Radio.js
CHANGED
|
@@ -21,10 +21,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
21
21
|
const useUtilityClasses = ownerState => {
|
|
22
22
|
const {
|
|
23
23
|
classes,
|
|
24
|
-
color
|
|
24
|
+
color,
|
|
25
|
+
size
|
|
25
26
|
} = ownerState;
|
|
26
27
|
const slots = {
|
|
27
|
-
root: ['root', `color${capitalize(color)}`]
|
|
28
|
+
root: ['root', `color${capitalize(color)}`, size !== 'medium' && `size${capitalize(size)}`]
|
|
28
29
|
};
|
|
29
30
|
return _extends({}, classes, composeClasses(slots, getRadioUtilityClass, classes));
|
|
30
31
|
};
|
package/Radio/radioClasses.d.ts
CHANGED
|
@@ -9,6 +9,8 @@ export interface RadioClasses {
|
|
|
9
9
|
colorPrimary: string;
|
|
10
10
|
/** Styles applied to the root element if `color="secondary"`. */
|
|
11
11
|
colorSecondary: string;
|
|
12
|
+
/** Styles applied to the root element if `size="small"`. */
|
|
13
|
+
sizeSmall: string;
|
|
12
14
|
}
|
|
13
15
|
export type RadioClassKey = keyof RadioClasses;
|
|
14
16
|
export declare function getRadioUtilityClass(slot: string): string;
|
package/Radio/radioClasses.js
CHANGED
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getRadioUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiRadio', slot);
|
|
5
5
|
}
|
|
6
|
-
const radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary']);
|
|
6
|
+
const radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);
|
|
7
7
|
export default radioClasses;
|
|
@@ -1,34 +1,36 @@
|
|
|
1
|
-
import { SxProps } from '@mui/system';
|
|
2
1
|
import * as React from 'react';
|
|
2
|
+
import { SxProps } from '@mui/system';
|
|
3
3
|
import { Theme } from '../styles';
|
|
4
4
|
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
|
5
5
|
import { ScopedCssBaselineClasses } from './scopedCssBaselineClasses';
|
|
6
6
|
|
|
7
|
+
export interface ScopedCssBaselineOwnProps {
|
|
8
|
+
/**
|
|
9
|
+
* The content of the component.
|
|
10
|
+
*/
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Override or extend the styles applied to the component.
|
|
14
|
+
*/
|
|
15
|
+
classes?: Partial<ScopedCssBaselineClasses>;
|
|
16
|
+
/**
|
|
17
|
+
* Enable `color-scheme` CSS property to use `theme.palette.mode`.
|
|
18
|
+
* For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
|
|
19
|
+
* For browser support, check out https://caniuse.com/?search=color-scheme
|
|
20
|
+
*/
|
|
21
|
+
enableColorScheme?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
24
|
+
*/
|
|
25
|
+
sx?: SxProps<Theme>;
|
|
26
|
+
}
|
|
27
|
+
|
|
7
28
|
export interface ScopedCssBaselineTypeMap<
|
|
8
29
|
AdditionalProps = {},
|
|
9
|
-
|
|
30
|
+
RootComponent extends React.ElementType = 'div',
|
|
10
31
|
> {
|
|
11
|
-
props: AdditionalProps &
|
|
12
|
-
|
|
13
|
-
* The content of the component.
|
|
14
|
-
*/
|
|
15
|
-
children?: React.ReactNode;
|
|
16
|
-
/**
|
|
17
|
-
* Override or extend the styles applied to the component.
|
|
18
|
-
*/
|
|
19
|
-
classes?: Partial<ScopedCssBaselineClasses>;
|
|
20
|
-
/**
|
|
21
|
-
* Enable `color-scheme` CSS property to use `theme.palette.mode`.
|
|
22
|
-
* For more details, check out https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme
|
|
23
|
-
* For browser support, check out https://caniuse.com/?search=color-scheme
|
|
24
|
-
*/
|
|
25
|
-
enableColorScheme?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
28
|
-
*/
|
|
29
|
-
sx?: SxProps<Theme>;
|
|
30
|
-
};
|
|
31
|
-
defaultComponent: DefaultComponent;
|
|
32
|
+
props: AdditionalProps & ScopedCssBaselineOwnProps;
|
|
33
|
+
defaultComponent: RootComponent;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
*
|
package/Select/SelectInput.js
CHANGED
|
@@ -109,6 +109,7 @@ const useUtilityClasses = ownerState => {
|
|
|
109
109
|
* @ignore - internal component.
|
|
110
110
|
*/
|
|
111
111
|
const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref) {
|
|
112
|
+
var _MenuProps$slotProps;
|
|
112
113
|
const {
|
|
113
114
|
'aria-describedby': ariaDescribedby,
|
|
114
115
|
'aria-label': ariaLabel,
|
|
@@ -432,6 +433,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
432
433
|
error
|
|
433
434
|
});
|
|
434
435
|
const classes = useUtilityClasses(ownerState);
|
|
436
|
+
const paperProps = _extends({}, MenuProps.PaperProps, (_MenuProps$slotProps = MenuProps.slotProps) == null ? void 0 : _MenuProps$slotProps.paper);
|
|
435
437
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
436
438
|
children: [/*#__PURE__*/_jsx(SelectSelect, _extends({
|
|
437
439
|
ref: handleDisplayRef,
|
|
@@ -493,11 +495,13 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
493
495
|
role: 'listbox',
|
|
494
496
|
disableListWrap: true
|
|
495
497
|
}, MenuProps.MenuListProps),
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
498
|
+
slotProps: {
|
|
499
|
+
paper: _extends({}, paperProps, {
|
|
500
|
+
style: _extends({
|
|
501
|
+
minWidth: menuMinWidth
|
|
502
|
+
}, paperProps != null ? paperProps.style : null)
|
|
503
|
+
})
|
|
504
|
+
},
|
|
501
505
|
children: items
|
|
502
506
|
}))]
|
|
503
507
|
});
|