@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
@@ -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
  */
package/Table/Table.d.ts CHANGED
@@ -7,42 +7,44 @@ import { TableClasses } from './tableClasses';
7
7
 
8
8
  export interface TablePropsSizeOverrides {}
9
9
 
10
+ export interface TableOwnProps {
11
+ /**
12
+ * The content of the table, normally `TableHead` and `TableBody`.
13
+ */
14
+ children?: React.ReactNode;
15
+ /**
16
+ * Override or extend the styles applied to the component.
17
+ */
18
+ classes?: Partial<TableClasses>;
19
+ /**
20
+ * Allows TableCells to inherit padding of the Table.
21
+ * @default 'normal'
22
+ */
23
+ padding?: 'normal' | 'checkbox' | 'none';
24
+ /**
25
+ * Allows TableCells to inherit size of the Table.
26
+ * @default 'medium'
27
+ */
28
+ size?: OverridableStringUnion<'small' | 'medium', TablePropsSizeOverrides>;
29
+ /**
30
+ * Set the header sticky.
31
+ *
32
+ * ⚠️ It doesn't work with IE11.
33
+ * @default false
34
+ */
35
+ stickyHeader?: boolean;
36
+ /**
37
+ * The system prop that allows defining system overrides as well as additional CSS styles.
38
+ */
39
+ sx?: SxProps<Theme>;
40
+ }
41
+
10
42
  export interface TableTypeMap<
11
43
  AdditionalProps = {},
12
- DefaultComponent extends React.ElementType = 'table',
44
+ RootComponent extends React.ElementType = 'table',
13
45
  > {
14
- props: AdditionalProps & {
15
- /**
16
- * The content of the table, normally `TableHead` and `TableBody`.
17
- */
18
- children?: React.ReactNode;
19
- /**
20
- * Override or extend the styles applied to the component.
21
- */
22
- classes?: Partial<TableClasses>;
23
- /**
24
- * Allows TableCells to inherit padding of the Table.
25
- * @default 'normal'
26
- */
27
- padding?: 'normal' | 'checkbox' | 'none';
28
- /**
29
- * Allows TableCells to inherit size of the Table.
30
- * @default 'medium'
31
- */
32
- size?: OverridableStringUnion<'small' | 'medium', TablePropsSizeOverrides>;
33
- /**
34
- * Set the header sticky.
35
- *
36
- * ⚠️ It doesn't work with IE11.
37
- * @default false
38
- */
39
- stickyHeader?: boolean;
40
- /**
41
- * The system prop that allows defining system overrides as well as additional CSS styles.
42
- */
43
- sx?: SxProps<Theme>;
44
- };
45
- defaultComponent: DefaultComponent;
46
+ props: AdditionalProps & TableOwnProps;
47
+ defaultComponent: RootComponent;
46
48
  }
47
49
  /**
48
50
  *
@@ -4,25 +4,27 @@ import { Theme } from '..';
4
4
  import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5
5
  import { TableBodyClasses } from './tableBodyClasses';
6
6
 
7
+ export interface TableBodyOwnProps {
8
+ /**
9
+ * The content of the component, normally `TableRow`.
10
+ */
11
+ children?: React.ReactNode;
12
+ /**
13
+ * Override or extend the styles applied to the component.
14
+ */
15
+ classes?: Partial<TableBodyClasses>;
16
+ /**
17
+ * The system prop that allows defining system overrides as well as additional CSS styles.
18
+ */
19
+ sx?: SxProps<Theme>;
20
+ }
21
+
7
22
  export interface TableBodyTypeMap<
8
23
  AdditionalProps = {},
9
- DefaultComponent extends React.ElementType = 'tbody',
24
+ RootComponent extends React.ElementType = 'tbody',
10
25
  > {
11
- props: AdditionalProps & {
12
- /**
13
- * The content of the component, normally `TableRow`.
14
- */
15
- children?: React.ReactNode;
16
- /**
17
- * Override or extend the styles applied to the component.
18
- */
19
- classes?: Partial<TableBodyClasses>;
20
- /**
21
- * The system prop that allows defining system overrides as well as additional CSS styles.
22
- */
23
- sx?: SxProps<Theme>;
24
- };
25
- defaultComponent: DefaultComponent;
26
+ props: AdditionalProps & TableBodyOwnProps;
27
+ defaultComponent: RootComponent;
26
28
  }
27
29
  /**
28
30
  *
@@ -4,25 +4,27 @@ import { Theme } from '..';
4
4
  import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5
5
  import { TableContainerClasses } from './tableContainerClasses';
6
6
 
7
+ export interface TableContainerOwnProps {
8
+ /**
9
+ * The content of the component, normally `Table`.
10
+ */
11
+ children?: React.ReactNode;
12
+ /**
13
+ * Override or extend the styles applied to the component.
14
+ */
15
+ classes?: Partial<TableContainerClasses>;
16
+ /**
17
+ * The system prop that allows defining system overrides as well as additional CSS styles.
18
+ */
19
+ sx?: SxProps<Theme>;
20
+ }
21
+
7
22
  export interface TableContainerTypeMap<
8
23
  AdditionalProps = {},
9
- DefaultComponent extends React.ElementType = 'div',
24
+ RootComponent extends React.ElementType = 'div',
10
25
  > {
11
- props: AdditionalProps & {
12
- /**
13
- * The content of the component, normally `Table`.
14
- */
15
- children?: React.ReactNode;
16
- /**
17
- * Override or extend the styles applied to the component.
18
- */
19
- classes?: Partial<TableContainerClasses>;
20
- /**
21
- * The system prop that allows defining system overrides as well as additional CSS styles.
22
- */
23
- sx?: SxProps<Theme>;
24
- };
25
- defaultComponent: DefaultComponent;
26
+ props: AdditionalProps & TableContainerOwnProps;
27
+ defaultComponent: RootComponent;
26
28
  }
27
29
  /**
28
30
  *
@@ -4,25 +4,27 @@ import { Theme } from '..';
4
4
  import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5
5
  import { TableFooterClasses } from './tableFooterClasses';
6
6
 
7
+ export interface TableFooterOwnProps {
8
+ /**
9
+ * The content of the component, normally `TableRow`.
10
+ */
11
+ children?: React.ReactNode;
12
+ /**
13
+ * Override or extend the styles applied to the component.
14
+ */
15
+ classes?: Partial<TableFooterClasses>;
16
+ /**
17
+ * The system prop that allows defining system overrides as well as additional CSS styles.
18
+ */
19
+ sx?: SxProps<Theme>;
20
+ }
21
+
7
22
  export interface TableFooterTypeMap<
8
23
  AdditionalProps = {},
9
- DefaultComponent extends React.ElementType = 'tfoot',
24
+ RootComponent extends React.ElementType = 'tfoot',
10
25
  > {
11
- props: AdditionalProps & {
12
- /**
13
- * The content of the component, normally `TableRow`.
14
- */
15
- children?: React.ReactNode;
16
- /**
17
- * Override or extend the styles applied to the component.
18
- */
19
- classes?: Partial<TableFooterClasses>;
20
- /**
21
- * The system prop that allows defining system overrides as well as additional CSS styles.
22
- */
23
- sx?: SxProps<Theme>;
24
- };
25
- defaultComponent: DefaultComponent;
26
+ props: AdditionalProps & TableFooterOwnProps;
27
+ defaultComponent: RootComponent;
26
28
  }
27
29
  /**
28
30
  *
@@ -4,25 +4,27 @@ import { Theme } from '..';
4
4
  import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5
5
  import { TableHeadClasses } from './tableHeadClasses';
6
6
 
7
+ export interface TableHeadOwnProps {
8
+ /**
9
+ * The content of the component, normally `TableRow`.
10
+ */
11
+ children?: React.ReactNode;
12
+ /**
13
+ * Override or extend the styles applied to the component.
14
+ */
15
+ classes?: Partial<TableHeadClasses>;
16
+ /**
17
+ * The system prop that allows defining system overrides as well as additional CSS styles.
18
+ */
19
+ sx?: SxProps<Theme>;
20
+ }
21
+
7
22
  export interface TableHeadTypeMap<
8
23
  AdditionalProps = {},
9
- DefaultComponent extends React.ElementType = 'thead',
24
+ RootComponent extends React.ElementType = 'thead',
10
25
  > {
11
- props: AdditionalProps & {
12
- /**
13
- * The content of the component, normally `TableRow`.
14
- */
15
- children?: React.ReactNode;
16
- /**
17
- * Override or extend the styles applied to the component.
18
- */
19
- classes?: Partial<TableHeadClasses>;
20
- /**
21
- * The system prop that allows defining system overrides as well as additional CSS styles.
22
- */
23
- sx?: SxProps<Theme>;
24
- };
25
- defaultComponent: DefaultComponent;
26
+ props: AdditionalProps & TableHeadOwnProps;
27
+ defaultComponent: RootComponent;
26
28
  }
27
29
  /**
28
30
  *
@@ -15,116 +15,119 @@ export interface LabelDisplayedRowsArgs {
15
15
  page: number;
16
16
  }
17
17
 
18
- export interface TablePaginationTypeMap<
19
- AdditionalProps,
20
- DefaultComponent extends React.ElementType,
21
- > {
22
- props: AdditionalProps &
23
- TablePaginationBaseProps & {
24
- /**
25
- * The component used for displaying the actions.
26
- * Either a string to use a HTML element or a component.
27
- * @default TablePaginationActions
28
- */
29
- ActionsComponent?: React.ElementType<TablePaginationActionsProps>;
30
- /**
31
- * Props applied to the back arrow [`IconButton`](/material-ui/api/icon-button/) component.
32
- */
33
- backIconButtonProps?: Partial<IconButtonProps>;
34
- /**
35
- * Override or extend the styles applied to the component.
36
- */
37
- classes?: Partial<TablePaginationClasses>;
38
- /**
39
- * The total number of rows.
40
- *
41
- * To enable server side pagination for an unknown number of items, provide -1.
42
- */
43
- count: number;
44
- /**
45
- * Accepts a function which returns a string value that provides a user-friendly name for the current page.
46
- * This is important for screen reader users.
47
- *
48
- * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
49
- * @param {string} type The link or button type to format ('first' | 'last' | 'next' | 'previous').
50
- * @returns {string}
51
- * @default function defaultGetAriaLabel(type) {
52
- * return `Go to ${type} page`;
53
- * }
54
- */
55
- getItemAriaLabel?: (type: 'first' | 'last' | 'next' | 'previous') => string;
56
- /**
57
- * Customize the displayed rows label. Invoked with a `{ from, to, count, page }`
58
- * object.
59
- *
60
- * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
61
- * @default function defaultLabelDisplayedRows({ from, to, count }) {
62
- * return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
63
- * }
64
- */
65
- labelDisplayedRows?: (paginationInfo: LabelDisplayedRowsArgs) => React.ReactNode;
66
- /**
67
- * Customize the rows per page label.
68
- *
69
- * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
70
- * @default 'Rows per page:'
71
- */
72
- labelRowsPerPage?: React.ReactNode;
73
- /**
74
- * Props applied to the next arrow [`IconButton`](/material-ui/api/icon-button/) element.
75
- */
76
- nextIconButtonProps?: Partial<IconButtonProps>;
77
- /**
78
- * Callback fired when the page is changed.
79
- *
80
- * @param {React.MouseEvent<HTMLButtonElement> | null} event The event source of the callback.
81
- * @param {number} page The page selected.
82
- */
83
- onPageChange: (event: React.MouseEvent<HTMLButtonElement> | null, page: number) => void;
84
- /**
85
- * Callback fired when the number of rows per page is changed.
86
- *
87
- * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
88
- */
89
- onRowsPerPageChange?: React.ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;
90
- /**
91
- * The zero-based index of the current page.
92
- */
93
- page: number;
94
- /**
95
- * The number of rows per page.
96
- *
97
- * Set -1 to display all the rows.
98
- */
99
- rowsPerPage: number;
100
- /**
101
- * Customizes the options of the rows per page select field. If less than two options are
102
- * available, no select field will be displayed.
103
- * Use -1 for the value with a custom label to show all the rows.
104
- * @default [10, 25, 50, 100]
105
- */
106
- rowsPerPageOptions?: Array<number | { value: number; label: string }>;
107
- /**
108
- * Props applied to the rows per page [`Select`](/material-ui/api/select/) element.
109
- * @default {}
110
- */
111
- SelectProps?: Partial<SelectProps>;
112
- /**
113
- * If `true`, show the first-page button.
114
- * @default false
115
- */
116
- showFirstButton?: boolean;
117
- /**
118
- * If `true`, show the last-page button.
119
- * @default false
120
- */
121
- showLastButton?: boolean;
122
- /**
123
- * The system prop that allows defining system overrides as well as additional CSS styles.
124
- */
125
- sx?: SxProps<Theme>;
126
- };
127
- defaultComponent: DefaultComponent;
18
+ /**
19
+ * This type is kept for compatibility. Use `TablePaginationOwnProps` instead.
20
+ */
21
+ export type TablePaginationBaseProps = Omit<TableCellProps, 'classes' | 'component' | 'children'>;
22
+
23
+ export interface TablePaginationOwnProps extends TablePaginationBaseProps {
24
+ /**
25
+ * The component used for displaying the actions.
26
+ * Either a string to use a HTML element or a component.
27
+ * @default TablePaginationActions
28
+ */
29
+ ActionsComponent?: React.ElementType<TablePaginationActionsProps>;
30
+ /**
31
+ * Props applied to the back arrow [`IconButton`](/material-ui/api/icon-button/) component.
32
+ */
33
+ backIconButtonProps?: Partial<IconButtonProps>;
34
+ /**
35
+ * Override or extend the styles applied to the component.
36
+ */
37
+ classes?: Partial<TablePaginationClasses>;
38
+ /**
39
+ * The total number of rows.
40
+ *
41
+ * To enable server side pagination for an unknown number of items, provide -1.
42
+ */
43
+ count: number;
44
+ /**
45
+ * Accepts a function which returns a string value that provides a user-friendly name for the current page.
46
+ * This is important for screen reader users.
47
+ *
48
+ * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
49
+ * @param {string} type The link or button type to format ('first' | 'last' | 'next' | 'previous').
50
+ * @returns {string}
51
+ * @default function defaultGetAriaLabel(type) {
52
+ * return `Go to ${type} page`;
53
+ * }
54
+ */
55
+ getItemAriaLabel?: (type: 'first' | 'last' | 'next' | 'previous') => string;
56
+ /**
57
+ * Customize the displayed rows label. Invoked with a `{ from, to, count, page }`
58
+ * object.
59
+ *
60
+ * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
61
+ * @default function defaultLabelDisplayedRows({ from, to, count }) {
62
+ * return `${from}–${to} of ${count !== -1 ? count : `more than ${to}`}`;
63
+ * }
64
+ */
65
+ labelDisplayedRows?: (paginationInfo: LabelDisplayedRowsArgs) => React.ReactNode;
66
+ /**
67
+ * Customize the rows per page label.
68
+ *
69
+ * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).
70
+ * @default 'Rows per page:'
71
+ */
72
+ labelRowsPerPage?: React.ReactNode;
73
+ /**
74
+ * Props applied to the next arrow [`IconButton`](/material-ui/api/icon-button/) element.
75
+ */
76
+ nextIconButtonProps?: Partial<IconButtonProps>;
77
+ /**
78
+ * Callback fired when the page is changed.
79
+ *
80
+ * @param {React.MouseEvent<HTMLButtonElement> | null} event The event source of the callback.
81
+ * @param {number} page The page selected.
82
+ */
83
+ onPageChange: (event: React.MouseEvent<HTMLButtonElement> | null, page: number) => void;
84
+ /**
85
+ * Callback fired when the number of rows per page is changed.
86
+ *
87
+ * @param {React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>} event The event source of the callback.
88
+ */
89
+ onRowsPerPageChange?: React.ChangeEventHandler<HTMLTextAreaElement | HTMLInputElement>;
90
+ /**
91
+ * The zero-based index of the current page.
92
+ */
93
+ page: number;
94
+ /**
95
+ * The number of rows per page.
96
+ *
97
+ * Set -1 to display all the rows.
98
+ */
99
+ rowsPerPage: number;
100
+ /**
101
+ * Customizes the options of the rows per page select field. If less than two options are
102
+ * available, no select field will be displayed.
103
+ * Use -1 for the value with a custom label to show all the rows.
104
+ * @default [10, 25, 50, 100]
105
+ */
106
+ rowsPerPageOptions?: Array<number | { value: number; label: string }>;
107
+ /**
108
+ * Props applied to the rows per page [`Select`](/material-ui/api/select/) element.
109
+ * @default {}
110
+ */
111
+ SelectProps?: Partial<SelectProps>;
112
+ /**
113
+ * If `true`, show the first-page button.
114
+ * @default false
115
+ */
116
+ showFirstButton?: boolean;
117
+ /**
118
+ * If `true`, show the last-page button.
119
+ * @default false
120
+ */
121
+ showLastButton?: boolean;
122
+ /**
123
+ * The system prop that allows defining system overrides as well as additional CSS styles.
124
+ */
125
+ sx?: SxProps<Theme>;
126
+ }
127
+
128
+ export interface TablePaginationTypeMap<AdditionalProps, RootComponent extends React.ElementType> {
129
+ props: AdditionalProps & TablePaginationOwnProps;
130
+ defaultComponent: RootComponent;
128
131
  }
129
132
 
130
133
  /**
@@ -143,8 +146,6 @@ declare const TablePagination: OverridableComponent<
143
146
  TablePaginationTypeMap<{}, React.JSXElementConstructor<TablePaginationBaseProps>>
144
147
  >;
145
148
 
146
- export type TablePaginationBaseProps = Omit<TableCellProps, 'classes' | 'component' | 'children'>;
147
-
148
149
  export type TablePaginationProps<
149
150
  RootComponent extends React.ElementType = React.JSXElementConstructor<TablePaginationBaseProps>,
150
151
  AdditionalProps = {},
@@ -4,35 +4,37 @@ import { Theme } from '..';
4
4
  import { OverridableComponent, OverrideProps } from '../OverridableComponent';
5
5
  import { TableRowClasses } from './tableRowClasses';
6
6
 
7
+ export interface TableRowOwnProps {
8
+ /**
9
+ * Should be valid <tr> children such as `TableCell`.
10
+ */
11
+ children?: React.ReactNode;
12
+ /**
13
+ * Override or extend the styles applied to the component.
14
+ */
15
+ classes?: Partial<TableRowClasses>;
16
+ /**
17
+ * If `true`, the table row will shade on hover.
18
+ * @default false
19
+ */
20
+ hover?: boolean;
21
+ /**
22
+ * If `true`, the table row will have the selected shading.
23
+ * @default false
24
+ */
25
+ selected?: boolean;
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 TableRowTypeMap<
8
33
  AdditionalProps = {},
9
- DefaultComponent extends React.ElementType = 'tr',
34
+ RootComponent extends React.ElementType = 'tr',
10
35
  > {
11
- props: AdditionalProps & {
12
- /**
13
- * Should be valid <tr> children such as `TableCell`.
14
- */
15
- children?: React.ReactNode;
16
- /**
17
- * Override or extend the styles applied to the component.
18
- */
19
- classes?: Partial<TableRowClasses>;
20
- /**
21
- * If `true`, the table row will shade on hover.
22
- * @default false
23
- */
24
- hover?: boolean;
25
- /**
26
- * If `true`, the table row will have the selected shading.
27
- * @default false
28
- */
29
- selected?: boolean;
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 & TableRowOwnProps;
37
+ defaultComponent: RootComponent;
36
38
  }
37
39
  /**
38
40
  * Will automatically set dynamic row height
@@ -5,45 +5,49 @@ import { ExtendButtonBase, ExtendButtonBaseTypeMap } from '../ButtonBase';
5
5
  import { OverrideProps } from '../OverridableComponent';
6
6
  import { TableSortLabelClasses } from './tableSortLabelClasses';
7
7
 
8
+ export interface TableSortLabelOwnProps {
9
+ /**
10
+ * If `true`, the label will have the active styling (should be true for the sorted column).
11
+ * @default false
12
+ */
13
+ active?: boolean;
14
+ /**
15
+ * Label contents, the arrow will be appended automatically.
16
+ */
17
+ children?: React.ReactNode;
18
+ /**
19
+ * Override or extend the styles applied to the component.
20
+ */
21
+ classes?: Partial<TableSortLabelClasses>;
22
+ /**
23
+ * The current sort direction.
24
+ * @default 'asc'
25
+ */
26
+ direction?: 'asc' | 'desc';
27
+ /**
28
+ * Hide sort icon when active is false.
29
+ * @default false
30
+ */
31
+ hideSortIcon?: boolean;
32
+ /**
33
+ * Sort icon to use.
34
+ * @default ArrowDownwardIcon
35
+ */
36
+ IconComponent?: React.JSXElementConstructor<{
37
+ className: string;
38
+ }>;
39
+ /**
40
+ * The system prop that allows defining system overrides as well as additional CSS styles.
41
+ */
42
+ sx?: SxProps<Theme>;
43
+ }
44
+
8
45
  export type TableSortLabelTypeMap<
9
46
  AdditionalProps = {},
10
- DefaultComponent extends React.ElementType = 'span',
47
+ RootComponent extends React.ElementType = 'span',
11
48
  > = ExtendButtonBaseTypeMap<{
12
- props: AdditionalProps & {
13
- /**
14
- * If `true`, the label will have the active styling (should be true for the sorted column).
15
- * @default false
16
- */
17
- active?: boolean;
18
- /**
19
- * Label contents, the arrow will be appended automatically.
20
- */
21
- children?: React.ReactNode;
22
- /**
23
- * Override or extend the styles applied to the component.
24
- */
25
- classes?: Partial<TableSortLabelClasses>;
26
- /**
27
- * The current sort direction.
28
- * @default 'asc'
29
- */
30
- direction?: 'asc' | 'desc';
31
- /**
32
- * Hide sort icon when active is false.
33
- * @default false
34
- */
35
- hideSortIcon?: boolean;
36
- /**
37
- * Sort icon to use.
38
- * @default ArrowDownwardIcon
39
- */
40
- IconComponent?: React.JSXElementConstructor<{ className: string }>;
41
- /**
42
- * The system prop that allows defining system overrides as well as additional CSS styles.
43
- */
44
- sx?: SxProps<Theme>;
45
- };
46
- defaultComponent: DefaultComponent;
49
+ props: AdditionalProps & TableSortLabelOwnProps;
50
+ defaultComponent: RootComponent;
47
51
  }>;
48
52
 
49
53
  /**