@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.
Files changed (118) hide show
  1. package/Accordion/Accordion.d.ts +2 -2
  2. package/AccordionSummary/AccordionSummary.d.ts +22 -20
  3. package/AppBar/AppBar.d.ts +33 -31
  4. package/Avatar/Avatar.d.ts +49 -50
  5. package/Backdrop/Backdrop.d.ts +87 -85
  6. package/Badge/Badge.d.ts +2 -2
  7. package/BottomNavigation/BottomNavigation.d.ts +35 -33
  8. package/BottomNavigationAction/BottomNavigationAction.d.ts +39 -37
  9. package/Breadcrumbs/Breadcrumbs.d.ts +69 -67
  10. package/Button/Button.d.ts +72 -73
  11. package/ButtonBase/ButtonBase.d.ts +83 -81
  12. package/ButtonGroup/ButtonGroup.d.ts +72 -70
  13. package/CHANGELOG.md +136 -2
  14. package/Card/Card.d.ts +19 -18
  15. package/CardActionArea/CardActionArea.d.ts +15 -13
  16. package/CardContent/CardContent.d.ts +18 -16
  17. package/CardHeader/CardHeader.d.ts +77 -67
  18. package/CardMedia/CardMedia.d.ts +30 -28
  19. package/Chip/Chip.d.ts +84 -82
  20. package/CircularProgress/CircularProgress.d.ts +1 -1
  21. package/CircularProgress/CircularProgress.js +1 -1
  22. package/Container/Container.d.ts +35 -33
  23. package/DialogContentText/DialogContentText.d.ts +14 -12
  24. package/DialogTitle/DialogTitle.d.ts +18 -16
  25. package/Divider/Divider.d.ts +49 -50
  26. package/Fab/Fab.d.ts +59 -56
  27. package/FormControl/FormControl.d.ts +74 -72
  28. package/FormHelperText/FormHelperText.d.ts +52 -50
  29. package/FormLabel/FormLabel.d.ts +7 -4
  30. package/Grid/Grid.d.ts +69 -68
  31. package/Hidden/Hidden.d.ts +10 -10
  32. package/Icon/Icon.d.ts +50 -48
  33. package/IconButton/IconButton.d.ts +52 -50
  34. package/ImageList/ImageList.d.ts +41 -39
  35. package/ImageListItem/ImageListItem.d.ts +28 -26
  36. package/ImageListItem/ImageListItem.js +2 -1
  37. package/InputAdornment/InputAdornment.d.ts +39 -37
  38. package/InputBase/InputBase.js +1 -1
  39. package/InputLabel/InputLabel.d.ts +58 -56
  40. package/InputLabel/InputLabel.js +2 -1
  41. package/Link/Link.d.ts +37 -39
  42. package/List/List.d.ts +34 -35
  43. package/ListItem/ListItem.d.ts +53 -49
  44. package/ListItemButton/ListItemButton.d.ts +9 -3
  45. package/ListSubheader/ListSubheader.d.ts +38 -36
  46. package/MenuItem/MenuItem.d.ts +47 -44
  47. package/MenuList/MenuList.d.ts +37 -35
  48. package/Modal/Modal.d.ts +172 -178
  49. package/PaginationItem/PaginationItem.d.ts +85 -83
  50. package/Paper/Paper.d.ts +2 -2
  51. package/Popover/Popover.d.ts +2 -1
  52. package/Popover/Popover.js +20 -6
  53. package/Radio/Radio.js +3 -2
  54. package/Radio/radioClasses.d.ts +2 -0
  55. package/Radio/radioClasses.js +1 -1
  56. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +25 -23
  57. package/Select/SelectInput.js +9 -5
  58. package/Skeleton/Skeleton.d.ts +42 -40
  59. package/Slider/Slider.d.ts +249 -247
  60. package/Snackbar/Snackbar.d.ts +4 -4
  61. package/Snackbar/Snackbar.js +4 -4
  62. package/Stack/Stack.d.ts +39 -38
  63. package/Step/Step.d.ts +46 -44
  64. package/StepButton/StepButton.d.ts +27 -25
  65. package/Stepper/Stepper.d.ts +45 -44
  66. package/SvgIcon/SvgIcon.d.ts +77 -75
  67. package/SwipeableDrawer/SwipeableDrawer.js +4 -4
  68. package/Tab/Tab.d.ts +52 -50
  69. package/TabScrollButton/TabScrollButton.d.ts +3 -2
  70. package/Table/Table.d.ts +35 -33
  71. package/TableBody/TableBody.d.ts +18 -16
  72. package/TableContainer/TableContainer.d.ts +18 -16
  73. package/TableFooter/TableFooter.d.ts +18 -16
  74. package/TableHead/TableHead.d.ts +18 -16
  75. package/TablePagination/TablePagination.d.ts +113 -112
  76. package/TableRow/TableRow.d.ts +28 -26
  77. package/TableSortLabel/TableSortLabel.d.ts +40 -36
  78. package/Tabs/Tabs.d.ts +153 -150
  79. package/ToggleButton/ToggleButton.d.ts +72 -70
  80. package/Toolbar/Toolbar.d.ts +29 -27
  81. package/Typography/Typography.d.ts +2 -2
  82. package/index.js +1 -1
  83. package/legacy/CircularProgress/CircularProgress.js +1 -1
  84. package/legacy/ImageListItem/ImageListItem.js +2 -1
  85. package/legacy/InputBase/InputBase.js +1 -1
  86. package/legacy/InputLabel/InputLabel.js +2 -1
  87. package/legacy/Popover/Popover.js +22 -5
  88. package/legacy/Radio/Radio.js +3 -2
  89. package/legacy/Radio/radioClasses.js +1 -1
  90. package/legacy/Select/SelectInput.js +9 -5
  91. package/legacy/Snackbar/Snackbar.js +4 -4
  92. package/legacy/SwipeableDrawer/SwipeableDrawer.js +4 -4
  93. package/legacy/index.js +1 -1
  94. package/modern/CircularProgress/CircularProgress.js +1 -1
  95. package/modern/ImageListItem/ImageListItem.js +2 -1
  96. package/modern/InputBase/InputBase.js +1 -1
  97. package/modern/InputLabel/InputLabel.js +2 -1
  98. package/modern/Popover/Popover.js +20 -6
  99. package/modern/Radio/Radio.js +3 -2
  100. package/modern/Radio/radioClasses.js +1 -1
  101. package/modern/Select/SelectInput.js +8 -5
  102. package/modern/Snackbar/Snackbar.js +4 -4
  103. package/modern/SwipeableDrawer/SwipeableDrawer.js +4 -4
  104. package/modern/index.js +1 -1
  105. package/node/CircularProgress/CircularProgress.js +1 -1
  106. package/node/ImageListItem/ImageListItem.js +2 -1
  107. package/node/InputBase/InputBase.js +1 -1
  108. package/node/InputLabel/InputLabel.js +2 -1
  109. package/node/Popover/Popover.js +20 -6
  110. package/node/Radio/Radio.js +3 -2
  111. package/node/Radio/radioClasses.js +1 -1
  112. package/node/Select/SelectInput.js +9 -5
  113. package/node/Snackbar/Snackbar.js +4 -4
  114. package/node/SwipeableDrawer/SwipeableDrawer.js +4 -4
  115. package/node/index.js +1 -1
  116. package/package.json +5 -5
  117. package/umd/material-ui.development.js +75 -34
  118. package/umd/material-ui.production.min.js +7 -7
@@ -10,59 +10,61 @@ export interface IconButtonPropsColorOverrides {}
10
10
 
11
11
  export interface IconButtonPropsSizeOverrides {}
12
12
 
13
+ export interface IconButtonOwnProps {
14
+ /**
15
+ * The icon to display.
16
+ */
17
+ children?: React.ReactNode;
18
+ /**
19
+ * Override or extend the styles applied to the component.
20
+ */
21
+ classes?: Partial<IconButtonClasses>;
22
+ /**
23
+ * The color of the component.
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 'default'
27
+ */
28
+ color?: OverridableStringUnion<
29
+ 'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning',
30
+ IconButtonPropsColorOverrides
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 given, uses a negative margin to counteract the padding on one
44
+ * side (this is often helpful for aligning the left or right
45
+ * side of the icon with content above or below, without ruining the border
46
+ * size and shape).
47
+ * @default false
48
+ */
49
+ edge?: 'start' | 'end' | false;
50
+ /**
51
+ * The size of the component.
52
+ * `small` is equivalent to the dense button styling.
53
+ * @default 'medium'
54
+ */
55
+ size?: OverridableStringUnion<'small' | 'medium' | 'large', IconButtonPropsSizeOverrides>;
56
+ /**
57
+ * The system prop that allows defining system overrides as well as additional CSS styles.
58
+ */
59
+ sx?: SxProps<Theme>;
60
+ }
61
+
13
62
  export type IconButtonTypeMap<
14
63
  AdditionalProps = {},
15
- DefaultComponent extends React.ElementType = 'button',
64
+ RootComponent extends React.ElementType = 'button',
16
65
  > = ExtendButtonBaseTypeMap<{
17
- props: AdditionalProps & {
18
- /**
19
- * The icon to display.
20
- */
21
- children?: React.ReactNode;
22
- /**
23
- * Override or extend the styles applied to the component.
24
- */
25
- classes?: Partial<IconButtonClasses>;
26
- /**
27
- * The color of the component.
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 'default'
31
- */
32
- color?: OverridableStringUnion<
33
- 'inherit' | 'default' | 'primary' | 'secondary' | 'error' | 'info' | 'success' | 'warning',
34
- IconButtonPropsColorOverrides
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 given, uses a negative margin to counteract the padding on one
48
- * side (this is often helpful for aligning the left or right
49
- * side of the icon with content above or below, without ruining the border
50
- * size and shape).
51
- * @default false
52
- */
53
- edge?: 'start' | 'end' | false;
54
- /**
55
- * The size of the component.
56
- * `small` is equivalent to the dense button styling.
57
- * @default 'medium'
58
- */
59
- size?: OverridableStringUnion<'small' | 'medium' | 'large', IconButtonPropsSizeOverrides>;
60
- /**
61
- * The system prop that allows defining system overrides as well as additional CSS styles.
62
- */
63
- sx?: SxProps<Theme>;
64
- };
65
- defaultComponent: DefaultComponent;
66
+ props: AdditionalProps & IconButtonOwnProps;
67
+ defaultComponent: RootComponent;
66
68
  }>;
67
69
 
68
70
  /**
@@ -7,48 +7,50 @@ import { ImageListClasses } from './imageListClasses';
7
7
 
8
8
  export interface ImageListPropsVariantOverrides {}
9
9
 
10
+ export interface ImageListOwnProps {
11
+ /**
12
+ * The content of the component, normally `ImageListItem`s.
13
+ */
14
+ children: NonNullable<React.ReactNode>;
15
+ /**
16
+ * Override or extend the styles applied to the component.
17
+ */
18
+ classes?: Partial<ImageListClasses>;
19
+ /**
20
+ * Number of columns.
21
+ * @default 2
22
+ */
23
+ cols?: number;
24
+ /**
25
+ * The gap between items in px.
26
+ * @default 4
27
+ */
28
+ gap?: number;
29
+ /**
30
+ * The height of one row in px.
31
+ * @default 'auto'
32
+ */
33
+ rowHeight?: number | 'auto';
34
+ /**
35
+ * The system prop that allows defining system overrides as well as additional CSS styles.
36
+ */
37
+ sx?: SxProps<Theme>;
38
+ /**
39
+ * The variant to use.
40
+ * @default 'standard'
41
+ */
42
+ variant?: OverridableStringUnion<
43
+ 'masonry' | 'quilted' | 'standard' | 'woven',
44
+ ImageListPropsVariantOverrides
45
+ >;
46
+ }
47
+
10
48
  export interface ImageListTypeMap<
11
49
  AdditionalProps = {},
12
- DefaultComponent extends React.ElementType = 'ul',
50
+ RootComponent extends React.ElementType = 'ul',
13
51
  > {
14
- props: AdditionalProps & {
15
- /**
16
- * The content of the component, normally `ImageListItem`s.
17
- */
18
- children: NonNullable<React.ReactNode>;
19
- /**
20
- * Override or extend the styles applied to the component.
21
- */
22
- classes?: Partial<ImageListClasses>;
23
- /**
24
- * Number of columns.
25
- * @default 2
26
- */
27
- cols?: number;
28
- /**
29
- * The gap between items in px.
30
- * @default 4
31
- */
32
- gap?: number;
33
- /**
34
- * The height of one row in px.
35
- * @default 'auto'
36
- */
37
- rowHeight?: number | 'auto';
38
- /**
39
- * The system prop that allows defining system overrides as well as additional CSS styles.
40
- */
41
- sx?: SxProps<Theme>;
42
- /**
43
- * The variant to use.
44
- * @default 'standard'
45
- */
46
- variant?: OverridableStringUnion<
47
- 'masonry' | 'quilted' | 'standard' | 'woven',
48
- ImageListPropsVariantOverrides
49
- >;
50
- };
51
- defaultComponent: DefaultComponent;
52
+ props: AdditionalProps & ImageListOwnProps;
53
+ defaultComponent: RootComponent;
52
54
  }
53
55
  /**
54
56
  *
@@ -4,35 +4,37 @@ import { Theme } from '..';
4
4
  import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5
5
  import { ImageListItemClasses } from './imageListItemClasses';
6
6
 
7
+ export interface ImageListItemOwnProps {
8
+ /**
9
+ * The content of the component, normally an `<img>`.
10
+ */
11
+ children?: React.ReactNode;
12
+ /**
13
+ * Override or extend the styles applied to the component.
14
+ */
15
+ classes?: Partial<ImageListItemClasses>;
16
+ /**
17
+ * Width of the item in number of grid columns.
18
+ * @default 1
19
+ */
20
+ cols?: number;
21
+ /**
22
+ * Height of the item in number of grid rows.
23
+ * @default 1
24
+ */
25
+ rows?: number;
26
+ /**
27
+ * The system prop that allows defining system overrides as well as additional CSS styles.
28
+ */
29
+ sx?: SxProps<Theme>;
30
+ }
31
+
7
32
  export interface ImageListItemTypeMap<
8
33
  AdditionalProps = {},
9
- DefaultComponent extends React.ElementType = 'li',
34
+ RootComponent extends React.ElementType = 'li',
10
35
  > {
11
- props: AdditionalProps & {
12
- /**
13
- * The content of the component, normally an `<img>`.
14
- */
15
- children?: React.ReactNode;
16
- /**
17
- * Override or extend the styles applied to the component.
18
- */
19
- classes?: Partial<ImageListItemClasses>;
20
- /**
21
- * Width of the item in number of grid columns.
22
- * @default 1
23
- */
24
- cols?: number;
25
- /**
26
- * Height of the item in number of grid rows.
27
- * @default 1
28
- */
29
- rows?: number;
30
- /**
31
- * The system prop that allows defining system overrides as well as additional CSS styles.
32
- */
33
- sx?: SxProps<Theme>;
34
- };
35
- defaultComponent: DefaultComponent;
36
+ props: AdditionalProps & ImageListItemOwnProps;
37
+ defaultComponent: RootComponent;
36
38
  }
37
39
  /**
38
40
  *
@@ -107,7 +107,8 @@ const ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(inPro
107
107
  height,
108
108
  gridColumnEnd: variant !== 'masonry' ? `span ${cols}` : undefined,
109
109
  gridRowEnd: variant !== 'masonry' ? `span ${rows}` : undefined,
110
- marginBottom: variant === 'masonry' ? gap : undefined
110
+ marginBottom: variant === 'masonry' ? gap : undefined,
111
+ breakInside: variant === 'masonry' ? 'avoid' : undefined
111
112
  }, style),
112
113
  ownerState: ownerState
113
114
  }, other, {
@@ -4,46 +4,48 @@ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
4
4
  import { Theme } from '..';
5
5
  import { InputAdornmentClasses } from './inputAdornmentClasses';
6
6
 
7
+ export interface InputAdornmentOwnProps {
8
+ /**
9
+ * Override or extend the styles applied to the component.
10
+ */
11
+ classes?: Partial<InputAdornmentClasses>;
12
+ /**
13
+ * The content of the component, normally an `IconButton` or string.
14
+ */
15
+ children?: React.ReactNode;
16
+ /**
17
+ * Disable pointer events on the root.
18
+ * This allows for the content of the adornment to focus the `input` on click.
19
+ * @default false
20
+ */
21
+ disablePointerEvents?: boolean;
22
+ /**
23
+ * If children is a string then disable wrapping in a Typography component.
24
+ * @default false
25
+ */
26
+ disableTypography?: boolean;
27
+ /**
28
+ * The position this adornment should appear relative to the `Input`.
29
+ */
30
+ position: 'start' | 'end';
31
+ /**
32
+ * The system prop that allows defining system overrides as well as additional CSS styles.
33
+ */
34
+ sx?: SxProps<Theme>;
35
+ /**
36
+ * The variant to use.
37
+ * Note: If you are using the `TextField` component or the `FormControl` component
38
+ * you do not have to set this manually.
39
+ */
40
+ variant?: 'standard' | 'outlined' | 'filled';
41
+ }
42
+
7
43
  export interface InputAdornmentTypeMap<
8
44
  AdditionalProps = {},
9
- DefaultComponent extends React.ElementType = 'div',
45
+ RootComponent extends React.ElementType = 'div',
10
46
  > {
11
- props: AdditionalProps & {
12
- /**
13
- * Override or extend the styles applied to the component.
14
- */
15
- classes?: Partial<InputAdornmentClasses>;
16
- /**
17
- * The content of the component, normally an `IconButton` or string.
18
- */
19
- children?: React.ReactNode;
20
- /**
21
- * Disable pointer events on the root.
22
- * This allows for the content of the adornment to focus the `input` on click.
23
- * @default false
24
- */
25
- disablePointerEvents?: boolean;
26
- /**
27
- * If children is a string then disable wrapping in a Typography component.
28
- * @default false
29
- */
30
- disableTypography?: boolean;
31
- /**
32
- * The position this adornment should appear relative to the `Input`.
33
- */
34
- position: 'start' | 'end';
35
- /**
36
- * The system prop that allows defining system overrides as well as additional CSS styles.
37
- */
38
- sx?: SxProps<Theme>;
39
- /**
40
- * The variant to use.
41
- * Note: If you are using the `TextField` component or the `FormControl` component
42
- * you do not have to set this manually.
43
- */
44
- variant?: 'standard' | 'outlined' | 'filled';
45
- };
46
- defaultComponent: DefaultComponent;
47
+ props: AdditionalProps & InputAdornmentOwnProps;
48
+ defaultComponent: RootComponent;
47
49
  }
48
50
  /**
49
51
  *
@@ -52,7 +52,7 @@ const useUtilityClasses = ownerState => {
52
52
  type
53
53
  } = ownerState;
54
54
  const slots = {
55
- root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
55
+ root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size && size !== 'medium' && `size${capitalize(size)}`, multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
56
56
  input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
57
57
  };
58
58
  return composeClasses(slots, getInputBaseUtilityClass, classes);
@@ -8,65 +8,67 @@ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
8
8
 
9
9
  export interface InputLabelPropsSizeOverrides {}
10
10
 
11
+ export interface InputLabelOwnProps {
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<InputLabelClasses>;
20
+ color?: FormLabelProps['color'];
21
+ /**
22
+ * If `true`, the transition animation is disabled.
23
+ * @default false
24
+ */
25
+ disableAnimation?: boolean;
26
+ /**
27
+ * If `true`, the component is disabled.
28
+ */
29
+ disabled?: boolean;
30
+ /**
31
+ * If `true`, the label is displayed in an error state.
32
+ */
33
+ error?: boolean;
34
+ /**
35
+ * If `true`, the `input` of this label is focused.
36
+ */
37
+ focused?: boolean;
38
+ /**
39
+ * If `dense`, will adjust vertical spacing. This is normally obtained via context from
40
+ * FormControl.
41
+ */
42
+ margin?: 'dense';
43
+ /**
44
+ * if `true`, the label will indicate that the `input` is required.
45
+ */
46
+ required?: boolean;
47
+ /**
48
+ * If `true`, the label is shrunk.
49
+ */
50
+ shrink?: boolean;
51
+ /**
52
+ * The size of the component.
53
+ * @default 'normal'
54
+ */
55
+ size?: OverridableStringUnion<'small' | 'normal', InputLabelPropsSizeOverrides>;
56
+ /**
57
+ * The system prop that allows defining system overrides as well as additional CSS styles.
58
+ */
59
+ sx?: SxProps<Theme>;
60
+ /**
61
+ * The variant to use.
62
+ */
63
+ variant?: 'standard' | 'outlined' | 'filled';
64
+ }
65
+
11
66
  export type InputLabelTypeMap<
12
67
  AdditionalProps = {},
13
- DefaultComponent extends React.ElementType = 'label',
68
+ RootComponent extends React.ElementType = 'label',
14
69
  > = ExtendFormLabelTypeMap<{
15
- props: AdditionalProps & {
16
- /**
17
- * The content of the component.
18
- */
19
- children?: React.ReactNode;
20
- /**
21
- * Override or extend the styles applied to the component.
22
- */
23
- classes?: Partial<InputLabelClasses>;
24
- color?: FormLabelProps['color'];
25
- /**
26
- * If `true`, the transition animation is disabled.
27
- * @default false
28
- */
29
- disableAnimation?: boolean;
30
- /**
31
- * If `true`, the component is disabled.
32
- */
33
- disabled?: boolean;
34
- /**
35
- * If `true`, the label is displayed in an error state.
36
- */
37
- error?: boolean;
38
- /**
39
- * If `true`, the `input` of this label is focused.
40
- */
41
- focused?: boolean;
42
- /**
43
- * If `dense`, will adjust vertical spacing. This is normally obtained via context from
44
- * FormControl.
45
- */
46
- margin?: 'dense';
47
- /**
48
- * if `true`, the label will indicate that the `input` is required.
49
- */
50
- required?: boolean;
51
- /**
52
- * If `true`, the label is shrunk.
53
- */
54
- shrink?: boolean;
55
- /**
56
- * The size of the component.
57
- * @default 'normal'
58
- */
59
- size?: OverridableStringUnion<'small' | 'normal', InputLabelPropsSizeOverrides>;
60
- /**
61
- * The system prop that allows defining system overrides as well as additional CSS styles.
62
- */
63
- sx?: SxProps<Theme>;
64
- /**
65
- * The variant to use.
66
- */
67
- variant?: 'standard' | 'outlined' | 'filled';
68
- };
69
- defaultComponent: DefaultComponent;
70
+ props: AdditionalProps & InputLabelOwnProps;
71
+ defaultComponent: RootComponent;
70
72
  }>;
71
73
 
72
74
  /**
@@ -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";
@@ -25,7 +26,7 @@ const useUtilityClasses = ownerState => {
25
26
  required
26
27
  } = ownerState;
27
28
  const slots = {
28
- root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size === 'small' && 'sizeSmall', variant],
29
+ root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && `size${capitalize(size)}`, variant],
29
30
  asterisk: [required && 'asterisk']
30
31
  };
31
32
  const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);
package/Link/Link.d.ts CHANGED
@@ -6,45 +6,43 @@ import { Theme } from '../styles';
6
6
  import { TypographyOwnProps } from '../Typography';
7
7
  import { LinkClasses } from './linkClasses';
8
8
 
9
- export interface LinkTypeMap<
10
- AdditionalProps = {},
11
- DefaultComponent extends React.ElementType = 'a',
12
- > {
13
- props: AdditionalProps &
14
- LinkBaseProps & {
15
- /**
16
- * The content of the component.
17
- */
18
- children?: React.ReactNode;
19
- /**
20
- * Override or extend the styles applied to the component.
21
- */
22
- classes?: Partial<LinkClasses>;
23
- /**
24
- * The color of the link.
25
- * @default 'primary'
26
- */
27
- color?: TypographyOwnProps['color'];
28
- /**
29
- * The system prop that allows defining system overrides as well as additional CSS styles.
30
- */
31
- sx?: SxProps<Theme>;
32
- /**
33
- * `classes` prop applied to the [`Typography`](/material-ui/api/typography/) element.
34
- */
35
- TypographyClasses?: TypographyOwnProps['classes'];
36
- /**
37
- * Controls when the link should have an underline.
38
- * @default 'always'
39
- */
40
- underline?: 'none' | 'hover' | 'always';
41
- /**
42
- * Applies the theme typography styles.
43
- * @default 'inherit'
44
- */
45
- variant?: TypographyOwnProps['variant'];
46
- };
47
- defaultComponent: DefaultComponent;
9
+ export interface LinkOwnProps extends DistributiveOmit<LinkBaseProps, 'classes'> {
10
+ /**
11
+ * The content of the component.
12
+ */
13
+ children?: React.ReactNode;
14
+ /**
15
+ * Override or extend the styles applied to the component.
16
+ */
17
+ classes?: Partial<LinkClasses>;
18
+ /**
19
+ * The color of the link.
20
+ * @default 'primary'
21
+ */
22
+ color?: TypographyOwnProps['color'];
23
+ /**
24
+ * The system prop that allows defining system overrides as well as additional CSS styles.
25
+ */
26
+ sx?: SxProps<Theme>;
27
+ /**
28
+ * `classes` prop applied to the [`Typography`](/material-ui/api/typography/) element.
29
+ */
30
+ TypographyClasses?: TypographyOwnProps['classes'];
31
+ /**
32
+ * Controls when the link should have an underline.
33
+ * @default 'always'
34
+ */
35
+ underline?: 'none' | 'hover' | 'always';
36
+ /**
37
+ * Applies the theme typography styles.
38
+ * @default 'inherit'
39
+ */
40
+ variant?: TypographyOwnProps['variant'];
41
+ }
42
+
43
+ export interface LinkTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'a'> {
44
+ props: AdditionalProps & LinkOwnProps;
45
+ defaultComponent: RootComponent;
48
46
  }
49
47
 
50
48
  /**
package/List/List.d.ts CHANGED
@@ -4,41 +4,40 @@ import { Theme } from '..';
4
4
  import { OverridableComponent, OverridableTypeMap, OverrideProps } from '../OverridableComponent';
5
5
  import { ListClasses } from './listClasses';
6
6
 
7
- export interface ListTypeMap<
8
- AdditionalProps = {},
9
- DefaultComponent extends React.ElementType = 'ul',
10
- > {
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<ListClasses>;
20
- /**
21
- * If `true`, compact vertical padding designed for keyboard and mouse input is used for
22
- * the list and list items.
23
- * The prop is available to descendant components as the `dense` context.
24
- * @default false
25
- */
26
- dense?: boolean;
27
- /**
28
- * If `true`, vertical padding is removed from the list.
29
- * @default false
30
- */
31
- disablePadding?: boolean;
32
- /**
33
- * The content of the subheader, normally `ListSubheader`.
34
- */
35
- subheader?: React.ReactNode;
36
- /**
37
- * The system prop that allows defining system overrides as well as additional CSS styles.
38
- */
39
- sx?: SxProps<Theme>;
40
- };
41
- defaultComponent: DefaultComponent;
7
+ export interface ListOwnProps {
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<ListClasses>;
16
+ /**
17
+ * If `true`, compact vertical padding designed for keyboard and mouse input is used for
18
+ * the list and list items.
19
+ * The prop is available to descendant components as the `dense` context.
20
+ * @default false
21
+ */
22
+ dense?: boolean;
23
+ /**
24
+ * If `true`, vertical padding is removed from the list.
25
+ * @default false
26
+ */
27
+ disablePadding?: boolean;
28
+ /**
29
+ * The content of the subheader, normally `ListSubheader`.
30
+ */
31
+ subheader?: React.ReactNode;
32
+ /**
33
+ * The system prop that allows defining system overrides as well as additional CSS styles.
34
+ */
35
+ sx?: SxProps<Theme>;
36
+ }
37
+
38
+ export interface ListTypeMap<AdditionalProps = {}, RootComponent extends React.ElementType = 'ul'> {
39
+ props: AdditionalProps & ListOwnProps;
40
+ defaultComponent: RootComponent;
42
41
  }
43
42
 
44
43
  /**