@mui/material 5.14.6 → 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 +136 -2
- 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/Popover/Popover.d.ts +2 -1
- package/Popover/Popover.js +20 -6
- 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/Snackbar/Snackbar.d.ts +4 -4
- package/Snackbar/Snackbar.js +4 -4
- 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/Popover/Popover.js +22 -5
- package/legacy/Radio/Radio.js +3 -2
- package/legacy/Radio/radioClasses.js +1 -1
- package/legacy/Select/SelectInput.js +9 -5
- package/legacy/Snackbar/Snackbar.js +4 -4
- 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/Popover/Popover.js +20 -6
- package/modern/Radio/Radio.js +3 -2
- package/modern/Radio/radioClasses.js +1 -1
- package/modern/Select/SelectInput.js +8 -5
- package/modern/Snackbar/Snackbar.js +4 -4
- 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/Popover/Popover.js +20 -6
- package/node/Radio/Radio.js +3 -2
- package/node/Radio/radioClasses.js +1 -1
- package/node/Select/SelectInput.js +9 -5
- package/node/Snackbar/Snackbar.js +4 -4
- package/node/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/node/index.js +1 -1
- package/package.json +5 -5
- package/umd/material-ui.development.js +75 -34
- package/umd/material-ui.production.min.js +7 -7
package/Tabs/Tabs.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { SxProps } from '@mui/system';
|
|
|
3
3
|
import { SlotComponentProps } from '@mui/base';
|
|
4
4
|
import { OverridableStringUnion } from '@mui/types';
|
|
5
5
|
import { Theme } from '../styles';
|
|
6
|
-
import ButtonBase from '../ButtonBase';
|
|
7
6
|
import { TabScrollButtonProps } from '../TabScrollButton';
|
|
8
7
|
import { OverridableComponent, OverrideProps } from '../OverridableComponent';
|
|
9
8
|
import { TabsClasses } from './tabsClasses';
|
|
@@ -24,158 +23,162 @@ export interface TabsOwnerState extends TabsProps {
|
|
|
24
23
|
scrollButtonsHideMobile: boolean;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
|
-
export interface
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
endScrollButtonIcon?: SlotComponentProps<
|
|
89
|
-
typeof SvgIcon,
|
|
90
|
-
TabsEndScrollButtonIconSlotPropsOverrides,
|
|
91
|
-
TabsOwnerState
|
|
92
|
-
>;
|
|
93
|
-
};
|
|
94
|
-
/**
|
|
95
|
-
* Determines the color of the indicator.
|
|
96
|
-
* @default 'primary'
|
|
97
|
-
*/
|
|
98
|
-
indicatorColor?: OverridableStringUnion<
|
|
99
|
-
'secondary' | 'primary',
|
|
100
|
-
TabsPropsIndicatorColorOverrides
|
|
26
|
+
export interface TabsOwnProps {
|
|
27
|
+
/**
|
|
28
|
+
* Callback fired when the component mounts.
|
|
29
|
+
* This is useful when you want to trigger an action programmatically.
|
|
30
|
+
* It supports two actions: `updateIndicator()` and `updateScrollButtons()`
|
|
31
|
+
*
|
|
32
|
+
* @param {object} actions This object contains all possible actions
|
|
33
|
+
* that can be triggered programmatically.
|
|
34
|
+
*/
|
|
35
|
+
action?: React.Ref<TabsActions>;
|
|
36
|
+
/**
|
|
37
|
+
* If `true`, the scroll buttons aren't forced hidden on mobile.
|
|
38
|
+
* By default the scroll buttons are hidden on mobile and takes precedence over `scrollButtons`.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
allowScrollButtonsMobile?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The label for the Tabs as a string.
|
|
44
|
+
*/
|
|
45
|
+
'aria-label'?: string;
|
|
46
|
+
/**
|
|
47
|
+
* An id or list of ids separated by a space that label the Tabs.
|
|
48
|
+
*/
|
|
49
|
+
'aria-labelledby'?: string;
|
|
50
|
+
/**
|
|
51
|
+
* If `true`, the tabs are centered.
|
|
52
|
+
* This prop is intended for large views.
|
|
53
|
+
* @default false
|
|
54
|
+
*/
|
|
55
|
+
centered?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* The content of the component.
|
|
58
|
+
*/
|
|
59
|
+
children?: React.ReactNode;
|
|
60
|
+
/**
|
|
61
|
+
* Override or extend the styles applied to the component.
|
|
62
|
+
*/
|
|
63
|
+
classes?: Partial<TabsClasses>;
|
|
64
|
+
/**
|
|
65
|
+
* The components used for each slot inside.
|
|
66
|
+
* @default {}
|
|
67
|
+
*/
|
|
68
|
+
slots?: {
|
|
69
|
+
StartScrollButtonIcon?: React.ElementType;
|
|
70
|
+
EndScrollButtonIcon?: React.ElementType;
|
|
71
|
+
};
|
|
72
|
+
/**
|
|
73
|
+
* The extra props for the slot components.
|
|
74
|
+
* You can override the existing props or add new ones.
|
|
75
|
+
* @default {}
|
|
76
|
+
*/
|
|
77
|
+
slotProps?: {
|
|
78
|
+
startScrollButtonIcon?: SlotComponentProps<
|
|
79
|
+
typeof SvgIcon,
|
|
80
|
+
TabsStartScrollButtonIconSlotPropsOverrides,
|
|
81
|
+
TabsOwnerState
|
|
82
|
+
>;
|
|
83
|
+
endScrollButtonIcon?: SlotComponentProps<
|
|
84
|
+
typeof SvgIcon,
|
|
85
|
+
TabsEndScrollButtonIconSlotPropsOverrides,
|
|
86
|
+
TabsOwnerState
|
|
101
87
|
>;
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
textColor?: 'secondary' | 'primary' | 'inherit';
|
|
151
|
-
/**
|
|
152
|
-
* The value of the currently selected `Tab`.
|
|
153
|
-
* If you don't want any selected `Tab`, you can set this prop to `false`.
|
|
154
|
-
*/
|
|
155
|
-
value?: any;
|
|
156
|
-
/**
|
|
157
|
-
* Determines additional display behavior of the tabs:
|
|
158
|
-
*
|
|
159
|
-
* - `scrollable` will invoke scrolling properties and allow for horizontally
|
|
160
|
-
* scrolling (or swiping) of the tab bar.
|
|
161
|
-
* -`fullWidth` will make the tabs grow to use all the available space,
|
|
162
|
-
* which should be used for small views, like on mobile.
|
|
163
|
-
* - `standard` will render the default state.
|
|
164
|
-
* @default 'standard'
|
|
165
|
-
*/
|
|
166
|
-
variant?: 'standard' | 'scrollable' | 'fullWidth';
|
|
167
|
-
/**
|
|
168
|
-
* If `true`, the scrollbar is visible. It can be useful when displaying
|
|
169
|
-
* a long vertical list of tabs.
|
|
170
|
-
* @default false
|
|
171
|
-
*/
|
|
172
|
-
visibleScrollbar?: boolean;
|
|
173
|
-
/**
|
|
174
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
175
|
-
*/
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Determines the color of the indicator.
|
|
91
|
+
* @default 'primary'
|
|
92
|
+
*/
|
|
93
|
+
indicatorColor?: OverridableStringUnion<
|
|
94
|
+
'secondary' | 'primary',
|
|
95
|
+
TabsPropsIndicatorColorOverrides
|
|
96
|
+
>;
|
|
97
|
+
/**
|
|
98
|
+
* Callback fired when the value changes.
|
|
99
|
+
*
|
|
100
|
+
* @param {React.SyntheticEvent} event The event source of the callback. **Warning**: This is a generic event not a change event.
|
|
101
|
+
* @param {any} value We default to the index of the child (number)
|
|
102
|
+
*/
|
|
103
|
+
onChange?: (event: React.SyntheticEvent, value: any) => void;
|
|
104
|
+
/**
|
|
105
|
+
* The component orientation (layout flow direction).
|
|
106
|
+
* @default 'horizontal'
|
|
107
|
+
*/
|
|
108
|
+
orientation?: 'horizontal' | 'vertical';
|
|
109
|
+
/**
|
|
110
|
+
* The component used to render the scroll buttons.
|
|
111
|
+
* @default TabScrollButton
|
|
112
|
+
*/
|
|
113
|
+
ScrollButtonComponent?: React.ElementType;
|
|
114
|
+
/**
|
|
115
|
+
* Determine behavior of scroll buttons when tabs are set to scroll:
|
|
116
|
+
*
|
|
117
|
+
* - `auto` will only present them when not all the items are visible.
|
|
118
|
+
* - `true` will always present them.
|
|
119
|
+
* - `false` will never present them.
|
|
120
|
+
*
|
|
121
|
+
* By default the scroll buttons are hidden on mobile.
|
|
122
|
+
* This behavior can be disabled with `allowScrollButtonsMobile`.
|
|
123
|
+
* @default 'auto'
|
|
124
|
+
*/
|
|
125
|
+
scrollButtons?: 'auto' | true | false;
|
|
126
|
+
/**
|
|
127
|
+
* If `true` the selected tab changes on focus. Otherwise it only
|
|
128
|
+
* changes on activation.
|
|
129
|
+
*/
|
|
130
|
+
selectionFollowsFocus?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Props applied to the tab indicator element.
|
|
133
|
+
* @default {}
|
|
134
|
+
*/
|
|
135
|
+
TabIndicatorProps?: React.HTMLAttributes<HTMLDivElement> & {
|
|
176
136
|
sx?: SxProps<Theme>;
|
|
177
137
|
};
|
|
178
|
-
|
|
138
|
+
/**
|
|
139
|
+
* Props applied to the [`TabScrollButton`](/material-ui/api/tab-scroll-button/) element.
|
|
140
|
+
* @default {}
|
|
141
|
+
*/
|
|
142
|
+
TabScrollButtonProps?: Partial<TabScrollButtonProps>;
|
|
143
|
+
/**
|
|
144
|
+
* Determines the color of the `Tab`.
|
|
145
|
+
* @default 'primary'
|
|
146
|
+
*/
|
|
147
|
+
textColor?: 'secondary' | 'primary' | 'inherit';
|
|
148
|
+
/**
|
|
149
|
+
* The value of the currently selected `Tab`.
|
|
150
|
+
* If you don't want any selected `Tab`, you can set this prop to `false`.
|
|
151
|
+
*/
|
|
152
|
+
value?: any;
|
|
153
|
+
/**
|
|
154
|
+
* Determines additional display behavior of the tabs:
|
|
155
|
+
*
|
|
156
|
+
* - `scrollable` will invoke scrolling properties and allow for horizontally
|
|
157
|
+
* scrolling (or swiping) of the tab bar.
|
|
158
|
+
* -`fullWidth` will make the tabs grow to use all the available space,
|
|
159
|
+
* which should be used for small views, like on mobile.
|
|
160
|
+
* - `standard` will render the default state.
|
|
161
|
+
* @default 'standard'
|
|
162
|
+
*/
|
|
163
|
+
variant?: 'standard' | 'scrollable' | 'fullWidth';
|
|
164
|
+
/**
|
|
165
|
+
* If `true`, the scrollbar is visible. It can be useful when displaying
|
|
166
|
+
* a long vertical list of tabs.
|
|
167
|
+
* @default false
|
|
168
|
+
*/
|
|
169
|
+
visibleScrollbar?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
172
|
+
*/
|
|
173
|
+
sx?: SxProps<Theme>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export interface TabsTypeMap<
|
|
177
|
+
AdditionalProps = {},
|
|
178
|
+
RootComponent extends React.ElementType = 'div',
|
|
179
|
+
> {
|
|
180
|
+
props: AdditionalProps & TabsOwnProps;
|
|
181
|
+
defaultComponent: RootComponent;
|
|
179
182
|
}
|
|
180
183
|
|
|
181
184
|
/**
|
|
@@ -10,79 +10,81 @@ export interface ToggleButtonPropsSizeOverrides {}
|
|
|
10
10
|
|
|
11
11
|
export interface ToggleButtonPropsColorOverrides {}
|
|
12
12
|
|
|
13
|
+
export interface ToggleButtonOwnProps {
|
|
14
|
+
/**
|
|
15
|
+
* The content of the component.
|
|
16
|
+
*/
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
/**
|
|
19
|
+
* Override or extend the styles applied to the component.
|
|
20
|
+
*/
|
|
21
|
+
classes?: Partial<ToggleButtonClasses>;
|
|
22
|
+
/**
|
|
23
|
+
* The color of the button when it is in an active state.
|
|
24
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
25
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
26
|
+
* @default 'standard'
|
|
27
|
+
*/
|
|
28
|
+
color?: OverridableStringUnion<
|
|
29
|
+
'standard' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning',
|
|
30
|
+
ToggleButtonPropsColorOverrides
|
|
31
|
+
>;
|
|
32
|
+
/**
|
|
33
|
+
* If `true`, the component is disabled.
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
disableFocusRipple?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* If `true`, the button will take up the full width of its container.
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
fullWidth?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Callback fired when the state changes.
|
|
49
|
+
*
|
|
50
|
+
* @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
|
|
51
|
+
* @param {any} value of the selected button.
|
|
52
|
+
*/
|
|
53
|
+
onChange?: (event: React.MouseEvent<HTMLElement>, value: any) => void;
|
|
54
|
+
/**
|
|
55
|
+
* Callback fired when the button is clicked.
|
|
56
|
+
*
|
|
57
|
+
* @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
|
|
58
|
+
* @param {any} value of the selected button.
|
|
59
|
+
*/
|
|
60
|
+
onClick?: (event: React.MouseEvent<HTMLElement>, value: any) => void;
|
|
61
|
+
/**
|
|
62
|
+
* If `true`, the button is rendered in an active state.
|
|
63
|
+
*/
|
|
64
|
+
selected?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* The size of the component.
|
|
67
|
+
* The prop defaults to the value inherited from the parent ToggleButtonGroup component.
|
|
68
|
+
* @default 'medium'
|
|
69
|
+
*/
|
|
70
|
+
size?: OverridableStringUnion<'small' | 'medium' | 'large', ToggleButtonPropsSizeOverrides>;
|
|
71
|
+
/**
|
|
72
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
73
|
+
*/
|
|
74
|
+
sx?: SxProps<Theme>;
|
|
75
|
+
/**
|
|
76
|
+
* The value to associate with the button when selected in a
|
|
77
|
+
* ToggleButtonGroup.
|
|
78
|
+
*/
|
|
79
|
+
value: NonNullable<unknown>;
|
|
80
|
+
}
|
|
81
|
+
|
|
13
82
|
export type ToggleButtonTypeMap<
|
|
14
83
|
AdditionalProps = {},
|
|
15
|
-
|
|
84
|
+
RootComponent extends React.ElementType = 'button',
|
|
16
85
|
> = ExtendButtonBaseTypeMap<{
|
|
17
|
-
props: AdditionalProps &
|
|
18
|
-
|
|
19
|
-
* The content of the component.
|
|
20
|
-
*/
|
|
21
|
-
children?: React.ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
* Override or extend the styles applied to the component.
|
|
24
|
-
*/
|
|
25
|
-
classes?: Partial<ToggleButtonClasses>;
|
|
26
|
-
/**
|
|
27
|
-
* The color of the button when it is in an active state.
|
|
28
|
-
* It supports both default and custom theme colors, which can be added as shown in the
|
|
29
|
-
* [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
|
|
30
|
-
* @default 'standard'
|
|
31
|
-
*/
|
|
32
|
-
color?: OverridableStringUnion<
|
|
33
|
-
'standard' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning',
|
|
34
|
-
ToggleButtonPropsColorOverrides
|
|
35
|
-
>;
|
|
36
|
-
/**
|
|
37
|
-
* If `true`, the component is disabled.
|
|
38
|
-
* @default false
|
|
39
|
-
*/
|
|
40
|
-
disabled?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* If `true`, the keyboard focus ripple is disabled.
|
|
43
|
-
* @default false
|
|
44
|
-
*/
|
|
45
|
-
disableFocusRipple?: boolean;
|
|
46
|
-
/**
|
|
47
|
-
* If `true`, the button will take up the full width of its container.
|
|
48
|
-
* @default false
|
|
49
|
-
*/
|
|
50
|
-
fullWidth?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Callback fired when the state changes.
|
|
53
|
-
*
|
|
54
|
-
* @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
|
|
55
|
-
* @param {any} value of the selected button.
|
|
56
|
-
*/
|
|
57
|
-
onChange?: (event: React.MouseEvent<HTMLElement>, value: any) => void;
|
|
58
|
-
/**
|
|
59
|
-
* Callback fired when the button is clicked.
|
|
60
|
-
*
|
|
61
|
-
* @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
|
|
62
|
-
* @param {any} value of the selected button.
|
|
63
|
-
*/
|
|
64
|
-
onClick?: (event: React.MouseEvent<HTMLElement>, value: any) => void;
|
|
65
|
-
/**
|
|
66
|
-
* If `true`, the button is rendered in an active state.
|
|
67
|
-
*/
|
|
68
|
-
selected?: boolean;
|
|
69
|
-
/**
|
|
70
|
-
* The size of the component.
|
|
71
|
-
* The prop defaults to the value inherited from the parent ToggleButtonGroup component.
|
|
72
|
-
* @default 'medium'
|
|
73
|
-
*/
|
|
74
|
-
size?: OverridableStringUnion<'small' | 'medium' | 'large', ToggleButtonPropsSizeOverrides>;
|
|
75
|
-
/**
|
|
76
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
77
|
-
*/
|
|
78
|
-
sx?: SxProps<Theme>;
|
|
79
|
-
/**
|
|
80
|
-
* The value to associate with the button when selected in a
|
|
81
|
-
* ToggleButtonGroup.
|
|
82
|
-
*/
|
|
83
|
-
value: NonNullable<unknown>;
|
|
84
|
-
};
|
|
85
|
-
defaultComponent: DefaultComponent;
|
|
86
|
+
props: AdditionalProps & ToggleButtonOwnProps;
|
|
87
|
+
defaultComponent: RootComponent;
|
|
86
88
|
}>;
|
|
87
89
|
|
|
88
90
|
/**
|
package/Toolbar/Toolbar.d.ts
CHANGED
|
@@ -7,36 +7,38 @@ import { ToolbarClasses } from './toolbarClasses';
|
|
|
7
7
|
|
|
8
8
|
export interface ToolbarPropsVariantOverrides {}
|
|
9
9
|
|
|
10
|
+
export interface ToolbarOwnProps {
|
|
11
|
+
/**
|
|
12
|
+
* The Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.
|
|
13
|
+
* The Toolbar is a flex container, allowing flex item properties to be used to lay out the children.
|
|
14
|
+
*/
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* Override or extend the styles applied to the component.
|
|
18
|
+
*/
|
|
19
|
+
classes?: Partial<ToolbarClasses>;
|
|
20
|
+
/**
|
|
21
|
+
* If `true`, disables gutter padding.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
disableGutters?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* The variant to use.
|
|
27
|
+
* @default 'regular'
|
|
28
|
+
*/
|
|
29
|
+
variant?: OverridableStringUnion<'regular' | 'dense', ToolbarPropsVariantOverrides>;
|
|
30
|
+
/**
|
|
31
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
32
|
+
*/
|
|
33
|
+
sx?: SxProps<Theme>;
|
|
34
|
+
}
|
|
35
|
+
|
|
10
36
|
export interface ToolbarTypeMap<
|
|
11
37
|
AdditionalProps = {},
|
|
12
|
-
|
|
38
|
+
RootComponent extends React.ElementType = 'div',
|
|
13
39
|
> {
|
|
14
|
-
props: AdditionalProps &
|
|
15
|
-
|
|
16
|
-
* The Toolbar children, usually a mixture of `IconButton`, `Button` and `Typography`.
|
|
17
|
-
* The Toolbar is a flex container, allowing flex item properties to be used to lay out the children.
|
|
18
|
-
*/
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* Override or extend the styles applied to the component.
|
|
22
|
-
*/
|
|
23
|
-
classes?: Partial<ToolbarClasses>;
|
|
24
|
-
/**
|
|
25
|
-
* If `true`, disables gutter padding.
|
|
26
|
-
* @default false
|
|
27
|
-
*/
|
|
28
|
-
disableGutters?: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* The variant to use.
|
|
31
|
-
* @default 'regular'
|
|
32
|
-
*/
|
|
33
|
-
variant?: OverridableStringUnion<'regular' | 'dense', ToolbarPropsVariantOverrides>;
|
|
34
|
-
/**
|
|
35
|
-
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
36
|
-
*/
|
|
37
|
-
sx?: SxProps<Theme>;
|
|
38
|
-
};
|
|
39
|
-
defaultComponent: DefaultComponent;
|
|
40
|
+
props: AdditionalProps & ToolbarOwnProps;
|
|
41
|
+
defaultComponent: RootComponent;
|
|
40
42
|
}
|
|
41
43
|
/**
|
|
42
44
|
*
|
|
@@ -75,10 +75,10 @@ export interface TypographyOwnProps extends SystemProps<Theme> {
|
|
|
75
75
|
|
|
76
76
|
export interface TypographyTypeMap<
|
|
77
77
|
AdditionalProps = {},
|
|
78
|
-
|
|
78
|
+
RootComponent extends React.ElementType = 'span',
|
|
79
79
|
> {
|
|
80
80
|
props: AdditionalProps & TypographyOwnProps;
|
|
81
|
-
defaultComponent:
|
|
81
|
+
defaultComponent: RootComponent;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
/**
|
package/index.js
CHANGED
|
@@ -192,7 +192,7 @@ process.env.NODE_ENV !== "production" ? CircularProgress.propTypes /* remove-pro
|
|
|
192
192
|
/**
|
|
193
193
|
* The size of the component.
|
|
194
194
|
* If using a number, the pixel unit is assumed.
|
|
195
|
-
* If using a string, you need to provide the CSS unit, e.g '3rem'.
|
|
195
|
+
* If using a string, you need to provide the CSS unit, e.g. '3rem'.
|
|
196
196
|
* @default 40
|
|
197
197
|
*/
|
|
198
198
|
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -101,7 +101,8 @@ var ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(inProps
|
|
|
101
101
|
height: height,
|
|
102
102
|
gridColumnEnd: variant !== 'masonry' ? "span ".concat(cols) : undefined,
|
|
103
103
|
gridRowEnd: variant !== 'masonry' ? "span ".concat(rows) : undefined,
|
|
104
|
-
marginBottom: variant === 'masonry' ? gap : undefined
|
|
104
|
+
marginBottom: variant === 'masonry' ? gap : undefined,
|
|
105
|
+
breakInside: variant === 'masonry' ? 'avoid' : undefined
|
|
105
106
|
}, style),
|
|
106
107
|
ownerState: ownerState
|
|
107
108
|
}, other, {
|
|
@@ -46,7 +46,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
46
46
|
startAdornment = ownerState.startAdornment,
|
|
47
47
|
type = ownerState.type;
|
|
48
48
|
var slots = {
|
|
49
|
-
root: ['root', "color".concat(capitalize(color)), disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size
|
|
49
|
+
root: ['root', "color".concat(capitalize(color)), disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size && size !== 'medium' && "size".concat(capitalize(size)), multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
|
|
50
50
|
input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
|
|
51
51
|
};
|
|
52
52
|
return composeClasses(slots, getInputBaseUtilityClass, classes);
|
|
@@ -11,6 +11,7 @@ import formControlState from '../FormControl/formControlState';
|
|
|
11
11
|
import useFormControl from '../FormControl/useFormControl';
|
|
12
12
|
import FormLabel, { formLabelClasses } from '../FormLabel';
|
|
13
13
|
import useThemeProps from '../styles/useThemeProps';
|
|
14
|
+
import capitalize from '../utils/capitalize';
|
|
14
15
|
import styled, { rootShouldForwardProp } from '../styles/styled';
|
|
15
16
|
import { getInputLabelUtilityClasses } from './inputLabelClasses';
|
|
16
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -23,7 +24,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
23
24
|
variant = ownerState.variant,
|
|
24
25
|
required = ownerState.required;
|
|
25
26
|
var slots = {
|
|
26
|
-
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size
|
|
27
|
+
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && "size".concat(capitalize(size)), variant],
|
|
27
28
|
asterisk: [required && 'asterisk']
|
|
28
29
|
};
|
|
29
30
|
var composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);
|