@mui/material 5.11.12 → 5.11.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/autocompleteClasses.d.ts +56 -56
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/badgeClasses.d.ts +56 -56
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/buttonClasses.d.ts +100 -100
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +43 -2
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/chipClasses.d.ts +96 -96
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +6 -6
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/FormControlContext.d.ts +17 -17
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControl/useFormControl.d.ts +2 -2
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +34 -34
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/inputBaseClasses.d.ts +46 -46
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/getTextDecoration.d.ts +15 -15
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +55 -55
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +26 -26
- package/Slider/SliderValueLabel.d.ts +15 -15
- package/Slider/SliderValueLabel.types.d.ts +24 -24
- package/Slider/sliderClasses.d.ts +58 -58
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Stack/stackClasses.d.ts +6 -6
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +26 -26
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/Unstable_Grid2/Grid2.d.ts +4 -4
- package/Unstable_Grid2/Grid2Props.d.ts +15 -15
- package/Unstable_Grid2/grid2Classes.d.ts +5 -5
- package/Unstable_Grid2/index.d.ts +4 -4
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/generateUtilityClass/index.d.ts +2 -2
- package/generateUtilityClasses/index.d.ts +1 -1
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/index.js +1 -1
- package/legacy/styles/createTypography.js +8 -1
- package/legacy/styles/experimental_extendTheme.js +1 -6
- package/legacy/styles/index.js +1 -0
- package/legacy/styles/shouldSkipGeneratingVar.js +6 -0
- package/locale/index.d.ts +75 -75
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/index.js +1 -1
- package/modern/styles/createTypography.js +8 -1
- package/modern/styles/experimental_extendTheme.js +1 -3
- package/modern/styles/index.js +1 -0
- package/modern/styles/shouldSkipGeneratingVar.js +5 -0
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/index.js +1 -1
- package/node/styles/createTypography.js +8 -1
- package/node/styles/experimental_extendTheme.js +2 -9
- package/node/styles/index.js +8 -0
- package/node/styles/shouldSkipGeneratingVar.js +12 -0
- package/package.json +5 -5
- package/styles/CssVarsProvider.d.ts +15 -15
- package/styles/createTypography.js +8 -1
- package/styles/excludeVariablesFromRoot.d.ts +5 -5
- package/styles/experimental_extendTheme.d.ts +5 -1
- package/styles/experimental_extendTheme.js +1 -6
- package/styles/getOverlayAlpha.d.ts +2 -2
- package/styles/index.d.ts +1 -0
- package/styles/index.js +1 -0
- package/styles/shouldSkipGeneratingVar.d.ts +1 -0
- package/styles/shouldSkipGeneratingVar.js +6 -0
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/types/OverridableComponentAugmentation.d.ts +31 -31
- package/umd/material-ui.development.js +87 -19
- package/umd/material-ui.production.min.js +20 -20
- package/useMediaQuery/useMediaQuery.d.ts +46 -46
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
package/locale/index.d.ts
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { ComponentsPropsList } from '../styles/props';
|
|
2
|
-
export interface Localization {
|
|
3
|
-
components?: {
|
|
4
|
-
MuiAlert?: {
|
|
5
|
-
defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
|
|
6
|
-
};
|
|
7
|
-
MuiBreadcrumbs?: {
|
|
8
|
-
defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
|
|
9
|
-
};
|
|
10
|
-
MuiTablePagination?: {
|
|
11
|
-
defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
|
|
12
|
-
};
|
|
13
|
-
MuiRating?: {
|
|
14
|
-
defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
|
|
15
|
-
};
|
|
16
|
-
MuiAutocomplete?: {
|
|
17
|
-
defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
|
|
18
|
-
};
|
|
19
|
-
MuiPagination?: {
|
|
20
|
-
defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
export declare const amET: Localization;
|
|
25
|
-
export declare const arEG: Localization;
|
|
26
|
-
export declare const arSA: Localization;
|
|
27
|
-
export declare const arSD: Localization;
|
|
28
|
-
export declare const azAZ: Localization;
|
|
29
|
-
export declare const bnBD: Localization;
|
|
30
|
-
export declare const beBY: Localization;
|
|
31
|
-
export declare const bgBG: Localization;
|
|
32
|
-
export declare const caES: Localization;
|
|
33
|
-
export declare const csCZ: Localization;
|
|
34
|
-
export declare const daDK: Localization;
|
|
35
|
-
export declare const deDE: Localization;
|
|
36
|
-
export declare const elGR: Localization;
|
|
37
|
-
export declare const enUS: Localization;
|
|
38
|
-
export declare const esES: Localization;
|
|
39
|
-
export declare const etEE: Localization;
|
|
40
|
-
export declare const faIR: Localization;
|
|
41
|
-
export declare const fiFI: Localization;
|
|
42
|
-
export declare const frFR: Localization;
|
|
43
|
-
export declare const heIL: Localization;
|
|
44
|
-
export declare const hiIN: Localization;
|
|
45
|
-
export declare const hrHR: Localization;
|
|
46
|
-
export declare const huHU: Localization;
|
|
47
|
-
export declare const hyAM: Localization;
|
|
48
|
-
export declare const idID: Localization;
|
|
49
|
-
export declare const isIS: Localization;
|
|
50
|
-
export declare const itIT: Localization;
|
|
51
|
-
export declare const jaJP: Localization;
|
|
52
|
-
export declare const khKH: Localization;
|
|
53
|
-
export declare const koKR: Localization;
|
|
54
|
-
export declare const kuLatn: Localization;
|
|
55
|
-
export declare const kkKZ: Localization;
|
|
56
|
-
export declare const mkMK: Localization;
|
|
57
|
-
export declare const nbNO: Localization;
|
|
58
|
-
export declare const nlNL: Localization;
|
|
59
|
-
export declare const plPL: Localization;
|
|
60
|
-
export declare const ptBR: Localization;
|
|
61
|
-
export declare const ptPT: Localization;
|
|
62
|
-
export declare const roRO: Localization;
|
|
63
|
-
export declare const srRS: Localization;
|
|
64
|
-
export declare const ruRU: Localization;
|
|
65
|
-
export declare const siLK: Localization;
|
|
66
|
-
export declare const skSK: Localization;
|
|
67
|
-
export declare const svSE: Localization;
|
|
68
|
-
export declare const thTH: Localization;
|
|
69
|
-
export declare const trTR: Localization;
|
|
70
|
-
export declare const ukUA: Localization;
|
|
71
|
-
export declare const urPK: Localization;
|
|
72
|
-
export declare const viVN: Localization;
|
|
73
|
-
export declare const zhCN: Localization;
|
|
74
|
-
export declare const zhHK: Localization;
|
|
75
|
-
export declare const zhTW: Localization;
|
|
1
|
+
import { ComponentsPropsList } from '../styles/props';
|
|
2
|
+
export interface Localization {
|
|
3
|
+
components?: {
|
|
4
|
+
MuiAlert?: {
|
|
5
|
+
defaultProps: Pick<ComponentsPropsList['MuiAlert'], 'closeText'>;
|
|
6
|
+
};
|
|
7
|
+
MuiBreadcrumbs?: {
|
|
8
|
+
defaultProps: Pick<ComponentsPropsList['MuiBreadcrumbs'], 'expandText'>;
|
|
9
|
+
};
|
|
10
|
+
MuiTablePagination?: {
|
|
11
|
+
defaultProps: Pick<ComponentsPropsList['MuiTablePagination'], 'labelRowsPerPage' | 'labelDisplayedRows' | 'getItemAriaLabel'>;
|
|
12
|
+
};
|
|
13
|
+
MuiRating?: {
|
|
14
|
+
defaultProps: Pick<ComponentsPropsList['MuiRating'], 'emptyLabelText' | 'getLabelText'>;
|
|
15
|
+
};
|
|
16
|
+
MuiAutocomplete?: {
|
|
17
|
+
defaultProps: Pick<ComponentsPropsList['MuiAutocomplete'], 'clearText' | 'closeText' | 'loadingText' | 'noOptionsText' | 'openText'>;
|
|
18
|
+
};
|
|
19
|
+
MuiPagination?: {
|
|
20
|
+
defaultProps: Pick<ComponentsPropsList['MuiPagination'], 'aria-label' | 'getItemAriaLabel'>;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export declare const amET: Localization;
|
|
25
|
+
export declare const arEG: Localization;
|
|
26
|
+
export declare const arSA: Localization;
|
|
27
|
+
export declare const arSD: Localization;
|
|
28
|
+
export declare const azAZ: Localization;
|
|
29
|
+
export declare const bnBD: Localization;
|
|
30
|
+
export declare const beBY: Localization;
|
|
31
|
+
export declare const bgBG: Localization;
|
|
32
|
+
export declare const caES: Localization;
|
|
33
|
+
export declare const csCZ: Localization;
|
|
34
|
+
export declare const daDK: Localization;
|
|
35
|
+
export declare const deDE: Localization;
|
|
36
|
+
export declare const elGR: Localization;
|
|
37
|
+
export declare const enUS: Localization;
|
|
38
|
+
export declare const esES: Localization;
|
|
39
|
+
export declare const etEE: Localization;
|
|
40
|
+
export declare const faIR: Localization;
|
|
41
|
+
export declare const fiFI: Localization;
|
|
42
|
+
export declare const frFR: Localization;
|
|
43
|
+
export declare const heIL: Localization;
|
|
44
|
+
export declare const hiIN: Localization;
|
|
45
|
+
export declare const hrHR: Localization;
|
|
46
|
+
export declare const huHU: Localization;
|
|
47
|
+
export declare const hyAM: Localization;
|
|
48
|
+
export declare const idID: Localization;
|
|
49
|
+
export declare const isIS: Localization;
|
|
50
|
+
export declare const itIT: Localization;
|
|
51
|
+
export declare const jaJP: Localization;
|
|
52
|
+
export declare const khKH: Localization;
|
|
53
|
+
export declare const koKR: Localization;
|
|
54
|
+
export declare const kuLatn: Localization;
|
|
55
|
+
export declare const kkKZ: Localization;
|
|
56
|
+
export declare const mkMK: Localization;
|
|
57
|
+
export declare const nbNO: Localization;
|
|
58
|
+
export declare const nlNL: Localization;
|
|
59
|
+
export declare const plPL: Localization;
|
|
60
|
+
export declare const ptBR: Localization;
|
|
61
|
+
export declare const ptPT: Localization;
|
|
62
|
+
export declare const roRO: Localization;
|
|
63
|
+
export declare const srRS: Localization;
|
|
64
|
+
export declare const ruRU: Localization;
|
|
65
|
+
export declare const siLK: Localization;
|
|
66
|
+
export declare const skSK: Localization;
|
|
67
|
+
export declare const svSE: Localization;
|
|
68
|
+
export declare const thTH: Localization;
|
|
69
|
+
export declare const trTR: Localization;
|
|
70
|
+
export declare const ukUA: Localization;
|
|
71
|
+
export declare const urPK: Localization;
|
|
72
|
+
export declare const viVN: Localization;
|
|
73
|
+
export declare const zhCN: Localization;
|
|
74
|
+
export declare const zhHK: Localization;
|
|
75
|
+
export declare const zhTW: Localization;
|
|
File without changes
|
package/modern/index.js
CHANGED
|
@@ -65,7 +65,14 @@ export default function createTypography(palette, typography) {
|
|
|
65
65
|
body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),
|
|
66
66
|
button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),
|
|
67
67
|
caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
|
|
68
|
-
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)
|
|
68
|
+
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),
|
|
69
|
+
inherit: {
|
|
70
|
+
fontFamily: 'inherit',
|
|
71
|
+
fontWeight: 'inherit',
|
|
72
|
+
fontSize: 'inherit',
|
|
73
|
+
lineHeight: 'inherit',
|
|
74
|
+
letterSpacing: 'inherit'
|
|
75
|
+
}
|
|
69
76
|
};
|
|
70
77
|
return deepmerge(_extends({
|
|
71
78
|
htmlFontSize,
|
|
@@ -4,6 +4,7 @@ const _excluded = ["colorSchemes", "cssVarPrefix", "shouldSkipGeneratingVar"],
|
|
|
4
4
|
_excluded2 = ["palette"];
|
|
5
5
|
import { deepmerge } from '@mui/utils';
|
|
6
6
|
import { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, private_safeDarken as safeDarken, private_safeLighten as safeLighten, private_safeEmphasize as safeEmphasize, unstable_createGetCssVar as systemCreateGetCssVar, unstable_defaultSxConfig as defaultSxConfig, unstable_styleFunctionSx as styleFunctionSx, unstable_prepareCssVars as prepareCssVars } from '@mui/system';
|
|
7
|
+
import defaultShouldSkipGeneratingVar from './shouldSkipGeneratingVar';
|
|
7
8
|
import createThemeWithoutVars from './createTheme';
|
|
8
9
|
import getOverlayAlpha from './getOverlayAlpha';
|
|
9
10
|
const defaultDarkOverlays = [...Array(25)].map((_, index) => {
|
|
@@ -41,9 +42,6 @@ const silent = fn => {
|
|
|
41
42
|
return undefined;
|
|
42
43
|
};
|
|
43
44
|
export const createGetCssVar = (cssVarPrefix = 'mui') => systemCreateGetCssVar(cssVarPrefix);
|
|
44
|
-
export const defaultShouldSkipGeneratingVar = keys => !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
45
|
-
// ends with sxConfig
|
|
46
|
-
keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);
|
|
47
45
|
export default function extendTheme(options = {}, ...args) {
|
|
48
46
|
const {
|
|
49
47
|
colorSchemes: colorSchemesInput = {},
|
package/modern/styles/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export { default as withTheme } from './withTheme';
|
|
|
26
26
|
export * from './CssVarsProvider';
|
|
27
27
|
export { default as experimental_extendTheme } from './experimental_extendTheme';
|
|
28
28
|
export { default as getOverlayAlpha } from './getOverlayAlpha';
|
|
29
|
+
export { default as shouldSkipGeneratingVar } from './shouldSkipGeneratingVar';
|
|
29
30
|
|
|
30
31
|
// Private methods for creating parts of the theme
|
|
31
32
|
export { default as private_createTypography } from './createTypography';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export default function shouldSkipGeneratingVar(keys) {
|
|
2
|
+
return !!keys[0].match(/(cssVarPrefix|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
3
|
+
// ends with sxConfig
|
|
4
|
+
keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);
|
|
5
|
+
}
|
|
File without changes
|
package/node/index.js
CHANGED
|
@@ -72,7 +72,14 @@ function createTypography(palette, typography) {
|
|
|
72
72
|
body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),
|
|
73
73
|
button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),
|
|
74
74
|
caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
|
|
75
|
-
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)
|
|
75
|
+
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),
|
|
76
|
+
inherit: {
|
|
77
|
+
fontFamily: 'inherit',
|
|
78
|
+
fontWeight: 'inherit',
|
|
79
|
+
fontSize: 'inherit',
|
|
80
|
+
lineHeight: 'inherit',
|
|
81
|
+
letterSpacing: 'inherit'
|
|
82
|
+
}
|
|
76
83
|
};
|
|
77
84
|
return (0, _utils.deepmerge)((0, _extends2.default)({
|
|
78
85
|
htmlFontSize,
|
|
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.createGetCssVar = void 0;
|
|
8
8
|
exports.default = extendTheme;
|
|
9
|
-
exports.defaultShouldSkipGeneratingVar = void 0;
|
|
10
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
10
|
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
12
11
|
var _utils = require("@mui/utils");
|
|
13
12
|
var _system = require("@mui/system");
|
|
13
|
+
var _shouldSkipGeneratingVar = _interopRequireDefault(require("./shouldSkipGeneratingVar"));
|
|
14
14
|
var _createTheme = _interopRequireDefault(require("./createTheme"));
|
|
15
15
|
var _getOverlayAlpha = _interopRequireDefault(require("./getOverlayAlpha"));
|
|
16
16
|
const _excluded = ["colorSchemes", "cssVarPrefix", "shouldSkipGeneratingVar"],
|
|
@@ -51,19 +51,12 @@ const silent = fn => {
|
|
|
51
51
|
};
|
|
52
52
|
const createGetCssVar = (cssVarPrefix = 'mui') => (0, _system.unstable_createGetCssVar)(cssVarPrefix);
|
|
53
53
|
exports.createGetCssVar = createGetCssVar;
|
|
54
|
-
const defaultShouldSkipGeneratingVar = keys => {
|
|
55
|
-
var _keys$;
|
|
56
|
-
return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
57
|
-
// ends with sxConfig
|
|
58
|
-
keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
|
|
59
|
-
};
|
|
60
|
-
exports.defaultShouldSkipGeneratingVar = defaultShouldSkipGeneratingVar;
|
|
61
54
|
function extendTheme(options = {}, ...args) {
|
|
62
55
|
var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$li3, _colorSchemesInput$da2, _colorSchemesInput$da3;
|
|
63
56
|
const {
|
|
64
57
|
colorSchemes: colorSchemesInput = {},
|
|
65
58
|
cssVarPrefix = 'mui',
|
|
66
|
-
shouldSkipGeneratingVar =
|
|
59
|
+
shouldSkipGeneratingVar = _shouldSkipGeneratingVar.default
|
|
67
60
|
} = options,
|
|
68
61
|
input = (0, _objectWithoutPropertiesLoose2.default)(options, _excluded);
|
|
69
62
|
const getCssVar = createGetCssVar(cssVarPrefix);
|
package/node/styles/index.js
CHANGED
|
@@ -40,6 +40,7 @@ var _exportNames = {
|
|
|
40
40
|
withTheme: true,
|
|
41
41
|
experimental_extendTheme: true,
|
|
42
42
|
getOverlayAlpha: true,
|
|
43
|
+
shouldSkipGeneratingVar: true,
|
|
43
44
|
private_createTypography: true,
|
|
44
45
|
private_excludeVariablesFromRoot: true
|
|
45
46
|
};
|
|
@@ -212,6 +213,12 @@ Object.defineProperty(exports, "rgbToHex", {
|
|
|
212
213
|
return _system.rgbToHex;
|
|
213
214
|
}
|
|
214
215
|
});
|
|
216
|
+
Object.defineProperty(exports, "shouldSkipGeneratingVar", {
|
|
217
|
+
enumerable: true,
|
|
218
|
+
get: function () {
|
|
219
|
+
return _shouldSkipGeneratingVar.default;
|
|
220
|
+
}
|
|
221
|
+
});
|
|
215
222
|
Object.defineProperty(exports, "styled", {
|
|
216
223
|
enumerable: true,
|
|
217
224
|
get: function () {
|
|
@@ -290,6 +297,7 @@ Object.keys(_CssVarsProvider).forEach(function (key) {
|
|
|
290
297
|
});
|
|
291
298
|
var _experimental_extendTheme = _interopRequireDefault(require("./experimental_extendTheme"));
|
|
292
299
|
var _getOverlayAlpha = _interopRequireDefault(require("./getOverlayAlpha"));
|
|
300
|
+
var _shouldSkipGeneratingVar = _interopRequireDefault(require("./shouldSkipGeneratingVar"));
|
|
293
301
|
var _createTypography = _interopRequireDefault(require("./createTypography"));
|
|
294
302
|
var _excludeVariablesFromRoot = _interopRequireDefault(require("./excludeVariablesFromRoot"));
|
|
295
303
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = shouldSkipGeneratingVar;
|
|
7
|
+
function shouldSkipGeneratingVar(keys) {
|
|
8
|
+
var _keys$;
|
|
9
|
+
return !!keys[0].match(/(cssVarPrefix|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
10
|
+
// ends with sxConfig
|
|
11
|
+
keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.11.
|
|
3
|
+
"version": "5.11.13",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
|
@@ -46,11 +46,11 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/runtime": "^7.21.0",
|
|
49
|
-
"@mui/base": "5.0.0-alpha.
|
|
50
|
-
"@mui/core-downloads-tracker": "^5.11.
|
|
51
|
-
"@mui/system": "^5.11.
|
|
49
|
+
"@mui/base": "5.0.0-alpha.121",
|
|
50
|
+
"@mui/core-downloads-tracker": "^5.11.13",
|
|
51
|
+
"@mui/system": "^5.11.13",
|
|
52
52
|
"@mui/types": "^7.2.3",
|
|
53
|
-
"@mui/utils": "^5.11.
|
|
53
|
+
"@mui/utils": "^5.11.13",
|
|
54
54
|
"@types/react-transition-group": "^4.4.5",
|
|
55
55
|
"clsx": "^1.2.1",
|
|
56
56
|
"csstype": "^3.1.1",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SupportedColorScheme } from './experimental_extendTheme';
|
|
3
|
-
declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
|
|
4
|
-
theme?: {
|
|
5
|
-
cssVarPrefix?: string | undefined;
|
|
6
|
-
colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
|
|
7
|
-
} | undefined;
|
|
8
|
-
documentNode?: Document | null | undefined;
|
|
9
|
-
colorSchemeNode?: Element | null | undefined;
|
|
10
|
-
colorSchemeSelector?: string | undefined;
|
|
11
|
-
storageWindow?: Window | null | undefined;
|
|
12
|
-
disableNestedContext?: boolean | undefined;
|
|
13
|
-
disableStyleSheetGeneration?: boolean | undefined;
|
|
14
|
-
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
|
|
15
|
-
export { useColorScheme, getInitColorSchemeScript, CssVarsProvider as Experimental_CssVarsProvider, };
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SupportedColorScheme } from './experimental_extendTheme';
|
|
3
|
+
declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
|
|
4
|
+
theme?: {
|
|
5
|
+
cssVarPrefix?: string | undefined;
|
|
6
|
+
colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
|
|
7
|
+
} | undefined;
|
|
8
|
+
documentNode?: Document | null | undefined;
|
|
9
|
+
colorSchemeNode?: Element | null | undefined;
|
|
10
|
+
colorSchemeSelector?: string | undefined;
|
|
11
|
+
storageWindow?: Window | null | undefined;
|
|
12
|
+
disableNestedContext?: boolean | undefined;
|
|
13
|
+
disableStyleSheetGeneration?: boolean | undefined;
|
|
14
|
+
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
|
|
15
|
+
export { useColorScheme, getInitColorSchemeScript, CssVarsProvider as Experimental_CssVarsProvider, };
|
|
@@ -65,7 +65,14 @@ export default function createTypography(palette, typography) {
|
|
|
65
65
|
body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),
|
|
66
66
|
button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),
|
|
67
67
|
caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),
|
|
68
|
-
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps)
|
|
68
|
+
overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),
|
|
69
|
+
inherit: {
|
|
70
|
+
fontFamily: 'inherit',
|
|
71
|
+
fontWeight: 'inherit',
|
|
72
|
+
fontSize: 'inherit',
|
|
73
|
+
lineHeight: 'inherit',
|
|
74
|
+
letterSpacing: 'inherit'
|
|
75
|
+
}
|
|
69
76
|
};
|
|
70
77
|
return deepmerge(_extends({
|
|
71
78
|
htmlFontSize,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal These variables should not appear in the :root stylesheet when the `defaultMode="dark"`
|
|
3
|
-
*/
|
|
4
|
-
declare const excludeVariablesFromRoot: (cssVarPrefix: string) => string[];
|
|
5
|
-
export default excludeVariablesFromRoot;
|
|
1
|
+
/**
|
|
2
|
+
* @internal These variables should not appear in the :root stylesheet when the `defaultMode="dark"`
|
|
3
|
+
*/
|
|
4
|
+
declare const excludeVariablesFromRoot: (cssVarPrefix: string) => string[];
|
|
5
|
+
export default excludeVariablesFromRoot;
|
|
@@ -400,6 +400,10 @@ export interface CssVarsTheme extends ColorSystem {
|
|
|
400
400
|
vars: ThemeVars;
|
|
401
401
|
getCssVar: (field: ThemeCssVar, ...vars: ThemeCssVar[]) => string;
|
|
402
402
|
getColorSchemeSelector: (colorScheme: SupportedColorScheme) => string;
|
|
403
|
+
generateCssVars: (colorScheme?: SupportedColorScheme) => {
|
|
404
|
+
css: Record<string, string | number>;
|
|
405
|
+
vars: ThemeVars;
|
|
406
|
+
};
|
|
403
407
|
|
|
404
408
|
// Default theme tokens
|
|
405
409
|
spacing: Theme['spacing'];
|
|
@@ -417,7 +421,7 @@ export interface CssVarsTheme extends ColorSystem {
|
|
|
417
421
|
* then, keys = ['foo', 'bar']
|
|
418
422
|
* value = 'var(--test)'
|
|
419
423
|
*/
|
|
420
|
-
shouldSkipGeneratingVar
|
|
424
|
+
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
421
425
|
unstable_sxConfig: SxConfig;
|
|
422
426
|
unstable_sx: (props: SxProps<CssVarsTheme>) => CSSObject;
|
|
423
427
|
}
|
|
@@ -4,6 +4,7 @@ const _excluded = ["colorSchemes", "cssVarPrefix", "shouldSkipGeneratingVar"],
|
|
|
4
4
|
_excluded2 = ["palette"];
|
|
5
5
|
import { deepmerge } from '@mui/utils';
|
|
6
6
|
import { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, private_safeDarken as safeDarken, private_safeLighten as safeLighten, private_safeEmphasize as safeEmphasize, unstable_createGetCssVar as systemCreateGetCssVar, unstable_defaultSxConfig as defaultSxConfig, unstable_styleFunctionSx as styleFunctionSx, unstable_prepareCssVars as prepareCssVars } from '@mui/system';
|
|
7
|
+
import defaultShouldSkipGeneratingVar from './shouldSkipGeneratingVar';
|
|
7
8
|
import createThemeWithoutVars from './createTheme';
|
|
8
9
|
import getOverlayAlpha from './getOverlayAlpha';
|
|
9
10
|
const defaultDarkOverlays = [...Array(25)].map((_, index) => {
|
|
@@ -41,12 +42,6 @@ const silent = fn => {
|
|
|
41
42
|
return undefined;
|
|
42
43
|
};
|
|
43
44
|
export const createGetCssVar = (cssVarPrefix = 'mui') => systemCreateGetCssVar(cssVarPrefix);
|
|
44
|
-
export const defaultShouldSkipGeneratingVar = keys => {
|
|
45
|
-
var _keys$;
|
|
46
|
-
return !!keys[0].match(/(typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
47
|
-
// ends with sxConfig
|
|
48
|
-
keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
|
|
49
|
-
};
|
|
50
45
|
export default function extendTheme(options = {}, ...args) {
|
|
51
46
|
var _colorSchemesInput$li, _colorSchemesInput$da, _colorSchemesInput$li2, _colorSchemesInput$li3, _colorSchemesInput$da2, _colorSchemesInput$da3;
|
|
52
47
|
const {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getOverlayAlpha: (elevation: number) => string;
|
|
2
|
-
export default getOverlayAlpha;
|
|
1
|
+
declare const getOverlayAlpha: (elevation: number) => string;
|
|
2
|
+
export default getOverlayAlpha;
|
package/styles/index.d.ts
CHANGED
|
@@ -133,6 +133,7 @@ export type {
|
|
|
133
133
|
ColorSystemOptions,
|
|
134
134
|
} from './experimental_extendTheme';
|
|
135
135
|
export { default as getOverlayAlpha } from './getOverlayAlpha';
|
|
136
|
+
export { default as shouldSkipGeneratingVar } from './shouldSkipGeneratingVar';
|
|
136
137
|
|
|
137
138
|
// Private methods for creating parts of the theme
|
|
138
139
|
export { default as private_createTypography } from './createTypography';
|
package/styles/index.js
CHANGED
|
@@ -26,6 +26,7 @@ export { default as withTheme } from './withTheme';
|
|
|
26
26
|
export * from './CssVarsProvider';
|
|
27
27
|
export { default as experimental_extendTheme } from './experimental_extendTheme';
|
|
28
28
|
export { default as getOverlayAlpha } from './getOverlayAlpha';
|
|
29
|
+
export { default as shouldSkipGeneratingVar } from './shouldSkipGeneratingVar';
|
|
29
30
|
|
|
30
31
|
// Private methods for creating parts of the theme
|
|
31
32
|
export { default as private_createTypography } from './createTypography';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function shouldSkipGeneratingVar(keys: string[]): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export default function shouldSkipGeneratingVar(keys) {
|
|
2
|
+
var _keys$;
|
|
3
|
+
return !!keys[0].match(/(cssVarPrefix|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
4
|
+
// ends with sxConfig
|
|
5
|
+
keys[0] === 'palette' && !!((_keys$ = keys[1]) != null && _keys$.match(/(mode|contrastThreshold|tonalOffset)/));
|
|
6
|
+
}
|
package/transitions/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './transition';
|
|
1
|
+
export * from './transition';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
export type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
|
|
4
|
-
export type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
|
|
5
|
-
export interface EasingProps {
|
|
6
|
-
easing: string | {
|
|
7
|
-
enter?: string;
|
|
8
|
-
exit?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
|
|
12
|
-
export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
|
|
13
|
-
}
|
|
1
|
+
import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
|
|
4
|
+
export type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
|
|
5
|
+
export interface EasingProps {
|
|
6
|
+
easing: string | {
|
|
7
|
+
enter?: string;
|
|
8
|
+
exit?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
|
|
12
|
+
export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
|
|
13
|
+
}
|
package/transitions/utils.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare const reflow: (node: Element) => number;
|
|
3
|
-
interface ComponentProps {
|
|
4
|
-
easing: string | {
|
|
5
|
-
enter?: string;
|
|
6
|
-
exit?: string;
|
|
7
|
-
} | undefined;
|
|
8
|
-
style: React.CSSProperties | undefined;
|
|
9
|
-
timeout: number | {
|
|
10
|
-
enter?: number;
|
|
11
|
-
exit?: number;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
interface Options {
|
|
15
|
-
mode: 'enter' | 'exit';
|
|
16
|
-
}
|
|
17
|
-
interface TransitionProps {
|
|
18
|
-
duration: string | number;
|
|
19
|
-
easing: string | undefined;
|
|
20
|
-
delay: string | undefined;
|
|
21
|
-
}
|
|
22
|
-
export declare function getTransitionProps(props: ComponentProps, options: Options): TransitionProps;
|
|
23
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const reflow: (node: Element) => number;
|
|
3
|
+
interface ComponentProps {
|
|
4
|
+
easing: string | {
|
|
5
|
+
enter?: string;
|
|
6
|
+
exit?: string;
|
|
7
|
+
} | undefined;
|
|
8
|
+
style: React.CSSProperties | undefined;
|
|
9
|
+
timeout: number | {
|
|
10
|
+
enter?: number;
|
|
11
|
+
exit?: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
interface Options {
|
|
15
|
+
mode: 'enter' | 'exit';
|
|
16
|
+
}
|
|
17
|
+
interface TransitionProps {
|
|
18
|
+
duration: string | number;
|
|
19
|
+
easing: string | undefined;
|
|
20
|
+
delay: string | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare function getTransitionProps(props: ComponentProps, options: Options): TransitionProps;
|
|
23
|
+
export {};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { DistributiveOmit } from '@mui/types';
|
|
3
|
-
declare module '@mui/material/OverridableComponent' {
|
|
4
|
-
/**
|
|
5
|
-
* A component whose root component can be controlled via a `component` prop.
|
|
6
|
-
*
|
|
7
|
-
* Adjusts valid props based on the type of `component`.
|
|
8
|
-
*/
|
|
9
|
-
interface OverridableComponent<M extends OverridableTypeMap> {
|
|
10
|
-
<C extends React.ElementType>(props: {
|
|
11
|
-
/**
|
|
12
|
-
* The component used for the root node.
|
|
13
|
-
* Either a string to use a HTML element or a component.
|
|
14
|
-
*/
|
|
15
|
-
component: C;
|
|
16
|
-
} & OverridePropsVer2<M, C>): JSX.Element;
|
|
17
|
-
(props: DefaultComponentPropsVer2<M>): JSX.Element;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Props of the component if `component={Component}` is used.
|
|
21
|
-
*/
|
|
22
|
-
type OverridePropsVer2<M extends OverridableTypeMap, C extends React.ElementType> = (BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<C>, keyof BaseProps<M>> & {
|
|
23
|
-
ref?: React.Ref<Element>;
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* Props if `component={Component}` is NOT used.
|
|
27
|
-
*/
|
|
28
|
-
type DefaultComponentPropsVer2<M extends OverridableTypeMap> = BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<M['defaultComponent']>, keyof BaseProps<M>> & {
|
|
29
|
-
ref?: React.Ref<Element>;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DistributiveOmit } from '@mui/types';
|
|
3
|
+
declare module '@mui/material/OverridableComponent' {
|
|
4
|
+
/**
|
|
5
|
+
* A component whose root component can be controlled via a `component` prop.
|
|
6
|
+
*
|
|
7
|
+
* Adjusts valid props based on the type of `component`.
|
|
8
|
+
*/
|
|
9
|
+
interface OverridableComponent<M extends OverridableTypeMap> {
|
|
10
|
+
<C extends React.ElementType>(props: {
|
|
11
|
+
/**
|
|
12
|
+
* The component used for the root node.
|
|
13
|
+
* Either a string to use a HTML element or a component.
|
|
14
|
+
*/
|
|
15
|
+
component: C;
|
|
16
|
+
} & OverridePropsVer2<M, C>): JSX.Element;
|
|
17
|
+
(props: DefaultComponentPropsVer2<M>): JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Props of the component if `component={Component}` is used.
|
|
21
|
+
*/
|
|
22
|
+
type OverridePropsVer2<M extends OverridableTypeMap, C extends React.ElementType> = (BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<C>, keyof BaseProps<M>> & {
|
|
23
|
+
ref?: React.Ref<Element>;
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Props if `component={Component}` is NOT used.
|
|
27
|
+
*/
|
|
28
|
+
type DefaultComponentPropsVer2<M extends OverridableTypeMap> = BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<M['defaultComponent']>, keyof BaseProps<M>> & {
|
|
29
|
+
ref?: React.Ref<Element>;
|
|
30
|
+
};
|
|
31
|
+
}
|