@mui/material 5.14.7 → 5.14.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/Accordion/Accordion.d.ts +2 -2
  2. package/AccordionSummary/AccordionSummary.d.ts +22 -20
  3. package/AlertTitle/AlertTitle.d.ts +1 -0
  4. package/AppBar/AppBar.d.ts +33 -31
  5. package/Avatar/Avatar.d.ts +49 -50
  6. package/Backdrop/Backdrop.d.ts +87 -85
  7. package/Badge/Badge.d.ts +2 -2
  8. package/BottomNavigation/BottomNavigation.d.ts +35 -33
  9. package/BottomNavigationAction/BottomNavigationAction.d.ts +39 -37
  10. package/Breadcrumbs/Breadcrumbs.d.ts +70 -67
  11. package/Button/Button.d.ts +72 -73
  12. package/Button/Button.js +4 -1
  13. package/ButtonBase/ButtonBase.d.ts +83 -81
  14. package/ButtonGroup/ButtonGroup.d.ts +72 -70
  15. package/ButtonGroup/ButtonGroup.js +86 -54
  16. package/ButtonGroup/ButtonGroupButtonContext.d.ts +6 -0
  17. package/ButtonGroup/ButtonGroupButtonContext.js +9 -0
  18. package/ButtonGroup/buttonGroupClasses.d.ts +6 -0
  19. package/ButtonGroup/buttonGroupClasses.js +1 -1
  20. package/CHANGELOG.md +235 -38
  21. package/Card/Card.d.ts +19 -18
  22. package/CardActionArea/CardActionArea.d.ts +15 -13
  23. package/CardContent/CardContent.d.ts +18 -16
  24. package/CardHeader/CardHeader.d.ts +77 -67
  25. package/CardMedia/CardMedia.d.ts +30 -28
  26. package/Chip/Chip.d.ts +84 -82
  27. package/CircularProgress/CircularProgress.d.ts +1 -1
  28. package/CircularProgress/CircularProgress.js +1 -1
  29. package/Container/Container.d.ts +35 -33
  30. package/DialogContentText/DialogContentText.d.ts +14 -12
  31. package/DialogTitle/DialogTitle.d.ts +19 -16
  32. package/Divider/Divider.d.ts +49 -50
  33. package/Fab/Fab.d.ts +59 -56
  34. package/FormControl/FormControl.d.ts +74 -72
  35. package/FormHelperText/FormHelperText.d.ts +52 -50
  36. package/FormLabel/FormLabel.d.ts +7 -4
  37. package/Grid/Grid.d.ts +69 -68
  38. package/Hidden/Hidden.d.ts +10 -10
  39. package/Icon/Icon.d.ts +50 -48
  40. package/IconButton/IconButton.d.ts +52 -50
  41. package/ImageList/ImageList.d.ts +41 -39
  42. package/ImageListItem/ImageListItem.d.ts +28 -26
  43. package/ImageListItem/ImageListItem.js +2 -1
  44. package/InputAdornment/InputAdornment.d.ts +39 -37
  45. package/InputBase/InputBase.js +1 -1
  46. package/InputLabel/InputLabel.d.ts +58 -56
  47. package/InputLabel/InputLabel.js +2 -1
  48. package/Link/Link.d.ts +37 -39
  49. package/List/List.d.ts +34 -35
  50. package/ListItem/ListItem.d.ts +53 -49
  51. package/ListItemButton/ListItemButton.d.ts +9 -3
  52. package/ListSubheader/ListSubheader.d.ts +38 -36
  53. package/MenuItem/MenuItem.d.ts +47 -44
  54. package/MenuList/MenuList.d.ts +37 -35
  55. package/Modal/Modal.d.ts +172 -178
  56. package/Modal/Modal.js +1 -1
  57. package/PaginationItem/PaginationItem.d.ts +85 -83
  58. package/Paper/Paper.d.ts +2 -2
  59. package/README.md +9 -198
  60. package/Radio/Radio.js +3 -2
  61. package/Radio/radioClasses.d.ts +2 -0
  62. package/Radio/radioClasses.js +1 -1
  63. package/ScopedCssBaseline/ScopedCssBaseline.d.ts +25 -23
  64. package/Select/SelectInput.js +9 -5
  65. package/Skeleton/Skeleton.d.ts +42 -40
  66. package/Slider/Slider.d.ts +249 -247
  67. package/Slider/Slider.js +9 -86
  68. package/Stack/Stack.d.ts +39 -38
  69. package/Step/Step.d.ts +46 -44
  70. package/StepButton/StepButton.d.ts +27 -25
  71. package/Stepper/Stepper.d.ts +45 -44
  72. package/SvgIcon/SvgIcon.d.ts +77 -75
  73. package/SwipeableDrawer/SwipeableDrawer.js +4 -4
  74. package/Tab/Tab.d.ts +52 -50
  75. package/TabScrollButton/TabScrollButton.d.ts +3 -2
  76. package/Table/Table.d.ts +35 -33
  77. package/TableBody/TableBody.d.ts +18 -16
  78. package/TableContainer/TableContainer.d.ts +18 -16
  79. package/TableFooter/TableFooter.d.ts +18 -16
  80. package/TableHead/TableHead.d.ts +18 -16
  81. package/TablePagination/TablePagination.d.ts +113 -112
  82. package/TableRow/TableRow.d.ts +28 -26
  83. package/TableSortLabel/TableSortLabel.d.ts +40 -36
  84. package/Tabs/Tabs.d.ts +153 -150
  85. package/Tabs/Tabs.js +1 -4
  86. package/ToggleButton/ToggleButton.d.ts +72 -70
  87. package/Toolbar/Toolbar.d.ts +29 -27
  88. package/Typography/Typography.d.ts +2 -2
  89. package/index.js +1 -1
  90. package/legacy/Button/Button.js +4 -1
  91. package/legacy/ButtonGroup/ButtonGroup.js +81 -56
  92. package/legacy/ButtonGroup/ButtonGroupButtonContext.js +9 -0
  93. package/legacy/ButtonGroup/buttonGroupClasses.js +1 -1
  94. package/legacy/CircularProgress/CircularProgress.js +1 -1
  95. package/legacy/ImageListItem/ImageListItem.js +2 -1
  96. package/legacy/InputBase/InputBase.js +1 -1
  97. package/legacy/InputLabel/InputLabel.js +2 -1
  98. package/legacy/Modal/Modal.js +3 -1
  99. package/legacy/Radio/Radio.js +3 -2
  100. package/legacy/Radio/radioClasses.js +1 -1
  101. package/legacy/Select/SelectInput.js +9 -5
  102. package/legacy/Slider/Slider.js +9 -86
  103. package/legacy/SwipeableDrawer/SwipeableDrawer.js +4 -4
  104. package/legacy/Tabs/Tabs.js +1 -4
  105. package/legacy/index.js +1 -1
  106. package/legacy/useTouchRipple/useTouchRipple.js +4 -4
  107. package/modern/Button/Button.js +4 -1
  108. package/modern/ButtonGroup/ButtonGroup.js +86 -54
  109. package/modern/ButtonGroup/ButtonGroupButtonContext.js +9 -0
  110. package/modern/ButtonGroup/buttonGroupClasses.js +1 -1
  111. package/modern/CircularProgress/CircularProgress.js +1 -1
  112. package/modern/ImageListItem/ImageListItem.js +2 -1
  113. package/modern/InputBase/InputBase.js +1 -1
  114. package/modern/InputLabel/InputLabel.js +2 -1
  115. package/modern/Modal/Modal.js +1 -1
  116. package/modern/Radio/Radio.js +3 -2
  117. package/modern/Radio/radioClasses.js +1 -1
  118. package/modern/Select/SelectInput.js +8 -5
  119. package/modern/Slider/Slider.js +9 -86
  120. package/modern/SwipeableDrawer/SwipeableDrawer.js +4 -4
  121. package/modern/Tabs/Tabs.js +1 -4
  122. package/modern/index.js +1 -1
  123. package/node/Button/Button.js +4 -1
  124. package/node/ButtonGroup/ButtonGroup.js +86 -54
  125. package/node/ButtonGroup/ButtonGroupButtonContext.js +18 -0
  126. package/node/ButtonGroup/buttonGroupClasses.js +1 -1
  127. package/node/CircularProgress/CircularProgress.js +1 -1
  128. package/node/ImageListItem/ImageListItem.js +2 -1
  129. package/node/InputBase/InputBase.js +1 -1
  130. package/node/InputLabel/InputLabel.js +2 -1
  131. package/node/Modal/Modal.js +1 -1
  132. package/node/Radio/Radio.js +3 -2
  133. package/node/Radio/radioClasses.js +1 -1
  134. package/node/Select/SelectInput.js +9 -5
  135. package/node/Slider/Slider.js +3 -73
  136. package/node/SwipeableDrawer/SwipeableDrawer.js +4 -4
  137. package/node/Tabs/Tabs.js +1 -4
  138. package/node/index.js +1 -1
  139. package/node/useTouchRipple/useTouchRipple.js +4 -4
  140. package/package.json +16 -16
  141. package/umd/material-ui.development.js +258 -254
  142. package/umd/material-ui.production.min.js +18 -18
  143. package/useTouchRipple/useTouchRipple.js +4 -4
package/Stack/Stack.d.ts CHANGED
@@ -3,47 +3,48 @@ import { ResponsiveStyleValue, SxProps, SystemProps } from '@mui/system';
3
3
  import { OverrideProps, OverridableComponent } from '../OverridableComponent';
4
4
  import { Theme } from '../styles/createTheme';
5
5
 
6
+ export interface StackOwnProps extends SystemProps<Theme> {
7
+ /**
8
+ * The content of the component.
9
+ */
10
+ children?: React.ReactNode;
11
+ /**
12
+ * Defines the `flex-direction` style property.
13
+ * It is applied for all screen sizes.
14
+ * @default 'column'
15
+ */
16
+ direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
17
+ /**
18
+ * Defines the space between immediate children.
19
+ * @default 0
20
+ */
21
+ spacing?: ResponsiveStyleValue<number | string>;
22
+ /**
23
+ * Add an element between each child.
24
+ */
25
+ divider?: React.ReactNode;
26
+ /**
27
+ * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
28
+ *
29
+ * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
30
+ * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
31
+ *
32
+ * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
33
+ * @default false
34
+ */
35
+ useFlexGap?: boolean;
36
+ /**
37
+ * The system prop, which allows defining system overrides as well as additional CSS styles.
38
+ */
39
+ sx?: SxProps<Theme>;
40
+ }
41
+
6
42
  export interface StackTypeMap<
7
43
  AdditionalProps = {},
8
- DefaultComponent extends React.ElementType = 'div',
44
+ RootComponent extends React.ElementType = 'div',
9
45
  > {
10
- props: AdditionalProps &
11
- SystemProps<Theme> & {
12
- /**
13
- * The content of the component.
14
- */
15
- children?: React.ReactNode;
16
- /**
17
- * Defines the `flex-direction` style property.
18
- * It is applied for all screen sizes.
19
- * @default 'column'
20
- */
21
- direction?: ResponsiveStyleValue<'row' | 'row-reverse' | 'column' | 'column-reverse'>;
22
- /**
23
- * Defines the space between immediate children.
24
- * @default 0
25
- */
26
- spacing?: ResponsiveStyleValue<number | string>;
27
- /**
28
- * Add an element between each child.
29
- */
30
- divider?: React.ReactNode;
31
- /**
32
- * If `true`, the CSS flexbox `gap` is used instead of applying `margin` to children.
33
- *
34
- * While CSS `gap` removes the [known limitations](https://mui.com/joy-ui/react-stack/#limitations),
35
- * it is not fully supported in some browsers. We recommend checking https://caniuse.com/?search=flex%20gap before using this flag.
36
- *
37
- * To enable this flag globally, follow the [theme's default props](https://mui.com/material-ui/customization/theme-components/#default-props) configuration.
38
- * @default false
39
- */
40
- useFlexGap?: boolean;
41
- /**
42
- * The system prop, which allows defining system overrides as well as additional CSS styles.
43
- */
44
- sx?: SxProps<Theme>;
45
- };
46
- defaultComponent: DefaultComponent;
46
+ props: AdditionalProps & StackOwnProps;
47
+ defaultComponent: RootComponent;
47
48
  }
48
49
  /**
49
50
  *
package/Step/Step.d.ts CHANGED
@@ -4,53 +4,55 @@ import { OverridableComponent, OverrideProps } from '../OverridableComponent';
4
4
  import { Theme } from '../styles';
5
5
  import { StepClasses } from './stepClasses';
6
6
 
7
+ export interface StepOwnProps {
8
+ /**
9
+ * Sets the step as active. Is passed to child components.
10
+ */
11
+ active?: boolean;
12
+ /**
13
+ * Should be `Step` sub-components such as `StepLabel`, `StepContent`.
14
+ */
15
+ children?: React.ReactNode;
16
+ /**
17
+ * Override or extend the styles applied to the component.
18
+ */
19
+ classes?: Partial<StepClasses>;
20
+ /**
21
+ * Mark the step as completed. Is passed to child components.
22
+ */
23
+ completed?: boolean;
24
+ /**
25
+ * If `true`, the step is disabled, will also disable the button if
26
+ * `StepButton` is a child of `Step`. Is passed to child components.
27
+ */
28
+ disabled?: boolean;
29
+ /**
30
+ * Expand the step.
31
+ * @default false
32
+ */
33
+ expanded?: boolean;
34
+ /**
35
+ * The position of the step.
36
+ * The prop defaults to the value inherited from the parent Stepper component.
37
+ */
38
+ index?: number;
39
+ /**
40
+ * If `true`, the Step is displayed as rendered last.
41
+ * The prop defaults to the value inherited from the parent Stepper component.
42
+ */
43
+ last?: boolean;
44
+ /**
45
+ * The system prop that allows defining system overrides as well as additional CSS styles.
46
+ */
47
+ sx?: SxProps<Theme>;
48
+ }
49
+
7
50
  export interface StepTypeMap<
8
51
  AdditionalProps = {},
9
- DefaultComponent extends React.ElementType = 'div',
52
+ RootComponent extends React.ElementType = 'div',
10
53
  > {
11
- props: AdditionalProps & {
12
- /**
13
- * Sets the step as active. Is passed to child components.
14
- */
15
- active?: boolean;
16
- /**
17
- * Should be `Step` sub-components such as `StepLabel`, `StepContent`.
18
- */
19
- children?: React.ReactNode;
20
- /**
21
- * Override or extend the styles applied to the component.
22
- */
23
- classes?: Partial<StepClasses>;
24
- /**
25
- * Mark the step as completed. Is passed to child components.
26
- */
27
- completed?: boolean;
28
- /**
29
- * If `true`, the step is disabled, will also disable the button if
30
- * `StepButton` is a child of `Step`. Is passed to child components.
31
- */
32
- disabled?: boolean;
33
- /**
34
- * Expand the step.
35
- * @default false
36
- */
37
- expanded?: boolean;
38
- /**
39
- * The position of the step.
40
- * The prop defaults to the value inherited from the parent Stepper component.
41
- */
42
- index?: number;
43
- /**
44
- * If `true`, the Step is displayed as rendered last.
45
- * The prop defaults to the value inherited from the parent Stepper component.
46
- */
47
- last?: boolean;
48
- /**
49
- * The system prop that allows defining system overrides as well as additional CSS styles.
50
- */
51
- sx?: SxProps<Theme>;
52
- };
53
- defaultComponent: DefaultComponent;
54
+ props: AdditionalProps & StepOwnProps;
55
+ defaultComponent: RootComponent;
54
56
  }
55
57
 
56
58
  export type StepProps<
@@ -6,37 +6,39 @@ import { Theme } from '../styles';
6
6
  import { StepButtonClasses } from './stepButtonClasses';
7
7
 
8
8
  /**
9
- * @deprecated use `StepButtonProps['icon']` instead
9
+ * @deprecated use `StepButtonProps['icon']` instead.
10
10
  */
11
11
  export type StepButtonIcon = React.ReactNode;
12
12
 
13
+ export interface StepButtonOwnProps {
14
+ /**
15
+ * Can be a `StepLabel` or a node to place inside `StepLabel` as children.
16
+ */
17
+ children?: React.ReactNode;
18
+ /**
19
+ * Override or extend the styles applied to the component.
20
+ */
21
+ classes?: Partial<StepButtonClasses>;
22
+ /**
23
+ * The icon displayed by the step label.
24
+ */
25
+ icon?: React.ReactNode;
26
+ /**
27
+ * The optional node to display.
28
+ */
29
+ optional?: React.ReactNode;
30
+ /**
31
+ * The system prop that allows defining system overrides as well as additional CSS styles.
32
+ */
33
+ sx?: SxProps<Theme>;
34
+ }
35
+
13
36
  export type StepButtonTypeMap<
14
37
  AdditionalProps,
15
- DefaultComponent extends React.ElementType,
38
+ RootComponent extends React.ElementType,
16
39
  > = ExtendButtonBaseTypeMap<{
17
- props: AdditionalProps & {
18
- /**
19
- * Can be a `StepLabel` or a node to place inside `StepLabel` as children.
20
- */
21
- children?: React.ReactNode;
22
- /**
23
- * Override or extend the styles applied to the component.
24
- */
25
- classes?: Partial<StepButtonClasses>;
26
- /**
27
- * The icon displayed by the step label.
28
- */
29
- icon?: React.ReactNode;
30
- /**
31
- * The optional node to display.
32
- */
33
- optional?: React.ReactNode;
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 & StepButtonOwnProps;
41
+ defaultComponent: RootComponent;
40
42
 
41
43
  ignoredProps: 'disabled';
42
44
  }>;
@@ -7,53 +7,54 @@ import { StepperClasses } from './stepperClasses';
7
7
 
8
8
  export type Orientation = 'horizontal' | 'vertical';
9
9
 
10
+ export interface StepperOwnProps extends Pick<PaperProps, 'elevation' | 'square' | 'variant'> {
11
+ /**
12
+ * Set the active step (zero based index).
13
+ * Set to -1 to disable all the steps.
14
+ * @default 0
15
+ */
16
+ activeStep?: number;
17
+ /**
18
+ * If set to 'true' and orientation is horizontal,
19
+ * then the step label will be positioned under the icon.
20
+ * @default false
21
+ */
22
+ alternativeLabel?: boolean;
23
+ /**
24
+ * Two or more `<Step />` components.
25
+ */
26
+ children?: React.ReactNode;
27
+ /**
28
+ * Override or extend the styles applied to the component.
29
+ */
30
+ classes?: Partial<StepperClasses>;
31
+ /**
32
+ * An element to be placed between each step.
33
+ * @default <StepConnector />
34
+ */
35
+ connector?: React.ReactElement<any, any> | null;
36
+ /**
37
+ * If set the `Stepper` will not assist in controlling steps for linear flow.
38
+ * @default false
39
+ */
40
+ nonLinear?: boolean;
41
+ /**
42
+ * The component orientation (layout flow direction).
43
+ * @default 'horizontal'
44
+ */
45
+ orientation?: Orientation;
46
+ /**
47
+ * The system prop that allows defining system overrides as well as additional CSS styles.
48
+ */
49
+ sx?: SxProps<Theme>;
50
+ }
51
+
10
52
  export interface StepperTypeMap<
11
53
  AdditionalProps = {},
12
- DefaultComponent extends React.ElementType = 'div',
54
+ RootComponent extends React.ElementType = 'div',
13
55
  > {
14
- props: AdditionalProps &
15
- Pick<PaperProps, 'elevation' | 'square' | 'variant'> & {
16
- /**
17
- * Set the active step (zero based index).
18
- * Set to -1 to disable all the steps.
19
- * @default 0
20
- */
21
- activeStep?: number;
22
- /**
23
- * If set to 'true' and orientation is horizontal,
24
- * then the step label will be positioned under the icon.
25
- * @default false
26
- */
27
- alternativeLabel?: boolean;
28
- /**
29
- * Two or more `<Step />` components.
30
- */
31
- children?: React.ReactNode;
32
- /**
33
- * Override or extend the styles applied to the component.
34
- */
35
- classes?: Partial<StepperClasses>;
36
- /**
37
- * An element to be placed between each step.
38
- * @default <StepConnector />
39
- */
40
- connector?: React.ReactElement<any, any> | null;
41
- /**
42
- * If set the `Stepper` will not assist in controlling steps for linear flow.
43
- * @default false
44
- */
45
- nonLinear?: boolean;
46
- /**
47
- * The component orientation (layout flow direction).
48
- * @default 'horizontal'
49
- */
50
- orientation?: Orientation;
51
- /**
52
- * The system prop that allows defining system overrides as well as additional CSS styles.
53
- */
54
- sx?: SxProps<Theme>;
55
- };
56
- defaultComponent: DefaultComponent;
56
+ props: AdditionalProps & StepperOwnProps;
57
+ defaultComponent: RootComponent;
57
58
  }
58
59
 
59
60
  export type StepperProps<
@@ -9,84 +9,86 @@ export interface SvgIconPropsSizeOverrides {}
9
9
 
10
10
  export interface SvgIconPropsColorOverrides {}
11
11
 
12
+ export interface SvgIconOwnProps {
13
+ /**
14
+ * Node passed into the SVG element.
15
+ */
16
+ children?: React.ReactNode;
17
+ /**
18
+ * Override or extend the styles applied to the component.
19
+ */
20
+ classes?: Partial<SvgIconClasses>;
21
+ /**
22
+ * The color of the component.
23
+ * It supports both default and custom theme colors, which can be added as shown in the
24
+ * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
25
+ * You can use the `htmlColor` prop to apply a color attribute to the SVG element.
26
+ * @default 'inherit'
27
+ */
28
+ color?: OverridableStringUnion<
29
+ | 'inherit'
30
+ | 'action'
31
+ | 'disabled'
32
+ | 'primary'
33
+ | 'secondary'
34
+ | 'error'
35
+ | 'info'
36
+ | 'success'
37
+ | 'warning',
38
+ SvgIconPropsColorOverrides
39
+ >;
40
+ /**
41
+ * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
42
+ * @default 'medium'
43
+ */
44
+ fontSize?: OverridableStringUnion<
45
+ 'inherit' | 'large' | 'medium' | 'small',
46
+ SvgIconPropsSizeOverrides
47
+ >;
48
+ /**
49
+ * Applies a color attribute to the SVG element.
50
+ */
51
+ htmlColor?: string;
52
+ /**
53
+ * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
54
+ * prop will be ignored.
55
+ * Useful when you want to reference a custom `component` and have `SvgIcon` pass that
56
+ * `component`'s viewBox to the root node.
57
+ * @default false
58
+ */
59
+ inheritViewBox?: boolean;
60
+ /**
61
+ * The shape-rendering attribute. The behavior of the different options is described on the
62
+ * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
63
+ * If you are having issues with blurry icons you should investigate this prop.
64
+ */
65
+ shapeRendering?: string;
66
+ /**
67
+ * The system prop that allows defining system overrides as well as additional CSS styles.
68
+ */
69
+ sx?: SxProps<Theme>;
70
+ /**
71
+ * Provides a human-readable title for the element that contains it.
72
+ * https://www.w3.org/TR/SVG-access/#Equivalent
73
+ */
74
+ titleAccess?: string;
75
+ /**
76
+ * Allows you to redefine what the coordinates without units mean inside an SVG element.
77
+ * For example, if the SVG element is 500 (width) by 200 (height),
78
+ * and you pass viewBox="0 0 50 20",
79
+ * this means that the coordinates inside the SVG will go from the top left corner (0,0)
80
+ * to bottom right (50,20) and each unit will be worth 10px.
81
+ * @default '0 0 24 24'
82
+ */
83
+ viewBox?: string;
84
+ }
85
+
12
86
  export interface SvgIconTypeMap<
13
87
  AdditionalProps = {},
14
- DefaultComponent extends React.ElementType = 'svg',
88
+ RootComponent extends React.ElementType = 'svg',
15
89
  > {
16
- props: AdditionalProps & {
17
- /**
18
- * Node passed into the SVG element.
19
- */
20
- children?: React.ReactNode;
21
- /**
22
- * Override or extend the styles applied to the component.
23
- */
24
- classes?: Partial<SvgIconClasses>;
25
- /**
26
- * The color of the component.
27
- * It supports both default and custom theme colors, which can be added as shown in the
28
- * [palette customization guide](https://mui.com/material-ui/customization/palette/#adding-new-colors).
29
- * You can use the `htmlColor` prop to apply a color attribute to the SVG element.
30
- * @default 'inherit'
31
- */
32
- color?: OverridableStringUnion<
33
- | 'inherit'
34
- | 'action'
35
- | 'disabled'
36
- | 'primary'
37
- | 'secondary'
38
- | 'error'
39
- | 'info'
40
- | 'success'
41
- | 'warning',
42
- SvgIconPropsColorOverrides
43
- >;
44
- /**
45
- * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
46
- * @default 'medium'
47
- */
48
- fontSize?: OverridableStringUnion<
49
- 'inherit' | 'large' | 'medium' | 'small',
50
- SvgIconPropsSizeOverrides
51
- >;
52
- /**
53
- * Applies a color attribute to the SVG element.
54
- */
55
- htmlColor?: string;
56
- /**
57
- * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
58
- * prop will be ignored.
59
- * Useful when you want to reference a custom `component` and have `SvgIcon` pass that
60
- * `component`'s viewBox to the root node.
61
- * @default false
62
- */
63
- inheritViewBox?: boolean;
64
- /**
65
- * The shape-rendering attribute. The behavior of the different options is described on the
66
- * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
67
- * If you are having issues with blurry icons you should investigate this prop.
68
- */
69
- shapeRendering?: string;
70
- /**
71
- * The system prop that allows defining system overrides as well as additional CSS styles.
72
- */
73
- sx?: SxProps<Theme>;
74
- /**
75
- * Provides a human-readable title for the element that contains it.
76
- * https://www.w3.org/TR/SVG-access/#Equivalent
77
- */
78
- titleAccess?: string;
79
- /**
80
- * Allows you to redefine what the coordinates without units mean inside an SVG element.
81
- * For example, if the SVG element is 500 (width) by 200 (height),
82
- * and you pass viewBox="0 0 50 20",
83
- * this means that the coordinates inside the SVG will go from the top left corner (0,0)
84
- * to bottom right (50,20) and each unit will be worth 10px.
85
- * @default '0 0 24 24'
86
- */
87
- viewBox?: string;
88
- };
89
- defaultComponent: DefaultComponent;
90
+ props: AdditionalProps & SvgIconOwnProps;
91
+ defaultComponent: RootComponent;
90
92
  }
91
93
  /**
92
94
  *
@@ -502,7 +502,7 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
502
502
  *
503
503
  * @default false
504
504
  */
505
- allowSwipeInChildren: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
505
+ allowSwipeInChildren: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
506
506
  /**
507
507
  * @ignore
508
508
  */
@@ -557,20 +557,20 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
557
557
  /**
558
558
  * Callback fired when the component requests to be closed.
559
559
  *
560
- * @param {object} event The event source of the callback.
560
+ * @param {React.SyntheticEvent<{}>} event The event source of the callback.
561
561
  */
562
562
  onClose: PropTypes.func.isRequired,
563
563
  /**
564
564
  * Callback fired when the component requests to be opened.
565
565
  *
566
- * @param {object} event The event source of the callback.
566
+ * @param {React.SyntheticEvent<{}>} event The event source of the callback.
567
567
  */
568
568
  onOpen: PropTypes.func.isRequired,
569
569
  /**
570
570
  * If `true`, the component is shown.
571
571
  * @default false
572
572
  */
573
- open: PropTypes.bool.isRequired,
573
+ open: PropTypes.bool,
574
574
  /**
575
575
  * @ignore
576
576
  */
package/Tab/Tab.d.ts CHANGED
@@ -5,59 +5,61 @@ import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
5
5
  import { OverrideProps } from '../OverridableComponent';
6
6
  import { TabClasses } from './tabClasses';
7
7
 
8
+ export interface TabOwnProps {
9
+ /**
10
+ * This prop isn't supported.
11
+ * Use the `component` prop if you need to change the children structure.
12
+ */
13
+ children?: null;
14
+ /**
15
+ * Override or extend the styles applied to the component.
16
+ */
17
+ classes?: Partial<TabClasses>;
18
+ /**
19
+ * If `true`, the component is disabled.
20
+ * @default false
21
+ */
22
+ disabled?: boolean;
23
+ /**
24
+ * If `true`, the keyboard focus ripple is disabled.
25
+ * @default false
26
+ */
27
+ disableFocusRipple?: boolean;
28
+ /**
29
+ * The icon to display.
30
+ */
31
+ icon?: string | React.ReactElement;
32
+ /**
33
+ * The position of the icon relative to the label.
34
+ * @default 'top'
35
+ */
36
+ iconPosition?: 'top' | 'bottom' | 'start' | 'end';
37
+ /**
38
+ * The label element.
39
+ */
40
+ label?: React.ReactNode;
41
+ /**
42
+ * The system prop that allows defining system overrides as well as additional CSS styles.
43
+ */
44
+ sx?: SxProps<Theme>;
45
+ /**
46
+ * You can provide your own value. Otherwise, we fallback to the child position index.
47
+ */
48
+ value?: any;
49
+ /**
50
+ * Tab labels appear in a single row.
51
+ * They can use a second line if needed.
52
+ * @default false
53
+ */
54
+ wrapped?: boolean;
55
+ }
56
+
8
57
  export type TabTypeMap<
9
58
  AdditionalProps = {},
10
- DefaultComponent extends React.ElementType = 'div',
59
+ RootComponent extends React.ElementType = 'div',
11
60
  > = ExtendButtonBaseTypeMap<{
12
- props: AdditionalProps & {
13
- /**
14
- * This prop isn't supported.
15
- * Use the `component` prop if you need to change the children structure.
16
- */
17
- children?: null;
18
- /**
19
- * Override or extend the styles applied to the component.
20
- */
21
- classes?: Partial<TabClasses>;
22
- /**
23
- * If `true`, the component is disabled.
24
- * @default false
25
- */
26
- disabled?: boolean;
27
- /**
28
- * If `true`, the keyboard focus ripple is disabled.
29
- * @default false
30
- */
31
- disableFocusRipple?: boolean;
32
- /**
33
- * The icon to display.
34
- */
35
- icon?: string | React.ReactElement;
36
- /**
37
- * The position of the icon relative to the label.
38
- * @default 'top'
39
- */
40
- iconPosition?: 'top' | 'bottom' | 'start' | 'end';
41
- /**
42
- * The label element.
43
- */
44
- label?: React.ReactNode;
45
- /**
46
- * The system prop that allows defining system overrides as well as additional CSS styles.
47
- */
48
- sx?: SxProps<Theme>;
49
- /**
50
- * You can provide your own value. Otherwise, we fallback to the child position index.
51
- */
52
- value?: any;
53
- /**
54
- * Tab labels appear in a single row.
55
- * They can use a second line if needed.
56
- * @default false
57
- */
58
- wrapped?: boolean;
59
- };
60
- defaultComponent: DefaultComponent;
61
+ props: AdditionalProps & TabOwnProps;
62
+ defaultComponent: RootComponent;
61
63
  }>;
62
64
 
63
65
  /**
@@ -1,7 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { SxProps } from '@mui/system';
3
3
  import { SlotComponentProps } from '@mui/base';
4
- import { InternalStandardProps as StandardProps, SvgIcon, Theme } from '..';
4
+ import { ButtonBaseProps } from '../ButtonBase';
5
+ import { SvgIcon, Theme } from '..';
5
6
  import { TabScrollButtonClasses } from './tabScrollButtonClasses';
6
7
 
7
8
  export interface TabScrollButtonStartIconSlotPropsOverrides {}
@@ -11,7 +12,7 @@ export interface TabScrollButtonOwnerState extends TabScrollButtonProps {
11
12
  isRtl: boolean;
12
13
  }
13
14
 
14
- export interface TabScrollButtonProps extends StandardProps<React.HTMLAttributes<HTMLDivElement>> {
15
+ export interface TabScrollButtonProps extends ButtonBaseProps {
15
16
  /**
16
17
  * The content of the component.
17
18
  */