@mui/material 6.0.0-alpha.3 → 6.0.0-alpha.5
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/CHANGELOG.md +93 -0
- package/Checkbox/Checkbox.js +51 -20
- package/FormControlLabel/FormControlLabel.d.ts +21 -14
- package/FormControlLabel/FormControlLabel.js +22 -4
- package/FormHelperText/FormHelperText.js +18 -8
- package/IconButton/IconButton.js +97 -40
- package/ImageList/ImageList.js +16 -14
- package/ImageListItem/ImageListItem.js +37 -22
- package/ImageListItemBar/ImageListItemBar.js +65 -32
- package/ListItem/ListItem.js +94 -50
- package/ListItemAvatar/ListItemAvatar.js +12 -8
- package/ListItemButton/ListItemButton.js +35 -15
- package/ListItemSecondaryAction/ListItemSecondaryAction.js +12 -8
- package/ListItemText/ListItemText.js +20 -11
- package/ListSubheader/ListSubheader.js +44 -19
- package/PaginationItem/PaginationItem.d.ts +26 -14
- package/PaginationItem/PaginationItem.js +64 -20
- package/Radio/Radio.js +50 -20
- package/Radio/RadioButtonIcon.js +18 -12
- package/Rating/Rating.js +71 -37
- package/SvgIcon/SvgIcon.js +73 -21
- package/Table/Table.js +11 -6
- package/TableCell/TableCell.js +96 -41
- package/TableSortLabel/TableSortLabel.js +19 -9
- package/Toolbar/Toolbar.js +33 -17
- package/Typography/Typography.js +3 -2
- package/index.js +1 -1
- package/modern/Checkbox/Checkbox.js +51 -20
- package/modern/FormControlLabel/FormControlLabel.js +22 -4
- package/modern/FormHelperText/FormHelperText.js +18 -8
- package/modern/IconButton/IconButton.js +97 -40
- package/modern/ImageList/ImageList.js +16 -14
- package/modern/ImageListItem/ImageListItem.js +37 -22
- package/modern/ImageListItemBar/ImageListItemBar.js +65 -32
- package/modern/ListItem/ListItem.js +94 -50
- package/modern/ListItemAvatar/ListItemAvatar.js +12 -8
- package/modern/ListItemButton/ListItemButton.js +35 -15
- package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +12 -8
- package/modern/ListItemText/ListItemText.js +20 -11
- package/modern/ListSubheader/ListSubheader.js +44 -19
- package/modern/PaginationItem/PaginationItem.js +64 -20
- package/modern/Radio/Radio.js +50 -20
- package/modern/Radio/RadioButtonIcon.js +18 -12
- package/modern/Rating/Rating.js +71 -37
- package/modern/SvgIcon/SvgIcon.js +73 -21
- package/modern/Table/Table.js +11 -6
- package/modern/TableCell/TableCell.js +96 -41
- package/modern/TableSortLabel/TableSortLabel.js +19 -9
- package/modern/Toolbar/Toolbar.js +33 -17
- package/modern/Typography/Typography.js +3 -2
- package/modern/index.js +1 -1
- package/modern/styles/experimental_extendTheme.js +2 -1
- package/modern/styles/getOverlayAlpha.js +3 -4
- package/node/Checkbox/Checkbox.js +54 -23
- package/node/FormControlLabel/FormControlLabel.js +23 -5
- package/node/FormHelperText/FormHelperText.js +18 -8
- package/node/IconButton/IconButton.js +99 -43
- package/node/ImageList/ImageList.js +16 -14
- package/node/ImageListItem/ImageListItem.js +37 -22
- package/node/ImageListItemBar/ImageListItemBar.js +65 -32
- package/node/ListItem/ListItem.js +94 -50
- package/node/ListItemAvatar/ListItemAvatar.js +12 -8
- package/node/ListItemButton/ListItemButton.js +35 -15
- package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +12 -8
- package/node/ListItemText/ListItemText.js +20 -11
- package/node/ListSubheader/ListSubheader.js +44 -19
- package/node/PaginationItem/PaginationItem.js +65 -20
- package/node/Radio/Radio.js +52 -22
- package/node/Radio/RadioButtonIcon.js +21 -15
- package/node/Rating/Rating.js +71 -37
- package/node/SvgIcon/SvgIcon.js +79 -24
- package/node/Table/Table.js +11 -6
- package/node/TableCell/TableCell.js +96 -41
- package/node/TableSortLabel/TableSortLabel.js +19 -9
- package/node/Toolbar/Toolbar.js +33 -17
- package/node/Typography/Typography.js +3 -2
- package/node/index.js +1 -1
- package/node/styles/experimental_extendTheme.js +1 -0
- package/node/styles/getOverlayAlpha.js +4 -5
- package/package.json +6 -6
- package/styles/experimental_extendTheme.d.ts +2 -0
- package/styles/experimental_extendTheme.js +2 -1
- package/styles/getOverlayAlpha.d.ts +1 -2
- package/styles/getOverlayAlpha.js +3 -4
- package/umd/material-ui.development.js +1223 -583
- package/umd/material-ui.production.min.js +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["actionIcon", "actionPosition", "className", "subtitle", "title", "position"];
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import clsx from 'clsx';
|
|
@@ -38,26 +38,41 @@ const ImageListItemBarRoot = styled('div', {
|
|
|
38
38
|
return [styles.root, styles[`position${capitalize(ownerState.position)}`]];
|
|
39
39
|
}
|
|
40
40
|
})(({
|
|
41
|
-
theme
|
|
42
|
-
ownerState
|
|
41
|
+
theme
|
|
43
42
|
}) => {
|
|
44
|
-
return
|
|
43
|
+
return {
|
|
45
44
|
position: 'absolute',
|
|
46
45
|
left: 0,
|
|
47
46
|
right: 0,
|
|
48
47
|
background: 'rgba(0, 0, 0, 0.5)',
|
|
49
48
|
display: 'flex',
|
|
50
49
|
alignItems: 'center',
|
|
51
|
-
fontFamily: theme.typography.fontFamily
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
fontFamily: theme.typography.fontFamily,
|
|
51
|
+
variants: [{
|
|
52
|
+
props: {
|
|
53
|
+
position: 'bottom'
|
|
54
|
+
},
|
|
55
|
+
style: {
|
|
56
|
+
bottom: 0
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
props: {
|
|
60
|
+
position: 'top'
|
|
61
|
+
},
|
|
62
|
+
style: {
|
|
63
|
+
top: 0
|
|
64
|
+
}
|
|
65
|
+
}, {
|
|
66
|
+
props: {
|
|
67
|
+
position: 'below'
|
|
68
|
+
},
|
|
69
|
+
style: {
|
|
70
|
+
position: 'relative',
|
|
71
|
+
background: 'transparent',
|
|
72
|
+
alignItems: 'normal'
|
|
73
|
+
}
|
|
74
|
+
}]
|
|
75
|
+
};
|
|
61
76
|
});
|
|
62
77
|
const ImageListItemBarTitleWrap = styled('div', {
|
|
63
78
|
name: 'MuiImageListItemBar',
|
|
@@ -69,22 +84,37 @@ const ImageListItemBarTitleWrap = styled('div', {
|
|
|
69
84
|
return [styles.titleWrap, styles[`titleWrap${capitalize(ownerState.position)}`], ownerState.actionIcon && styles[`titleWrapActionPos${capitalize(ownerState.actionPosition)}`]];
|
|
70
85
|
}
|
|
71
86
|
})(({
|
|
72
|
-
theme
|
|
73
|
-
ownerState
|
|
87
|
+
theme
|
|
74
88
|
}) => {
|
|
75
|
-
return
|
|
89
|
+
return {
|
|
76
90
|
flexGrow: 1,
|
|
77
91
|
padding: '12px 16px',
|
|
78
92
|
color: (theme.vars || theme).palette.common.white,
|
|
79
|
-
overflow: 'hidden'
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
overflow: 'hidden',
|
|
94
|
+
variants: [{
|
|
95
|
+
props: {
|
|
96
|
+
position: 'below'
|
|
97
|
+
},
|
|
98
|
+
style: {
|
|
99
|
+
padding: '6px 0 12px',
|
|
100
|
+
color: 'inherit'
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
props: ({
|
|
104
|
+
ownerState
|
|
105
|
+
}) => ownerState.actionIcon && ownerState.actionPosition === 'left',
|
|
106
|
+
style: {
|
|
107
|
+
paddingLeft: 0
|
|
108
|
+
}
|
|
109
|
+
}, {
|
|
110
|
+
props: ({
|
|
111
|
+
ownerState
|
|
112
|
+
}) => ownerState.actionIcon && ownerState.actionPosition === 'right',
|
|
113
|
+
style: {
|
|
114
|
+
paddingRight: 0
|
|
115
|
+
}
|
|
116
|
+
}]
|
|
117
|
+
};
|
|
88
118
|
});
|
|
89
119
|
const ImageListItemBarTitle = styled('div', {
|
|
90
120
|
name: 'MuiImageListItemBar',
|
|
@@ -125,12 +155,15 @@ const ImageListItemBarActionIcon = styled('div', {
|
|
|
125
155
|
} = props;
|
|
126
156
|
return [styles.actionIcon, styles[`actionIconActionPos${capitalize(ownerState.actionPosition)}`]];
|
|
127
157
|
}
|
|
128
|
-
})(
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
158
|
+
})({
|
|
159
|
+
variants: [{
|
|
160
|
+
props: {
|
|
161
|
+
actionPosition: 'left'
|
|
162
|
+
},
|
|
163
|
+
style: {
|
|
164
|
+
order: -1
|
|
165
|
+
}
|
|
166
|
+
}]
|
|
134
167
|
});
|
|
135
168
|
const ImageListItemBar = /*#__PURE__*/React.forwardRef(function ImageListItemBar(inProps, ref) {
|
|
136
169
|
const props = useThemeProps({
|
package/ListItem/ListItem.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["className"],
|
|
6
6
|
_excluded2 = ["alignItems", "autoFocus", "button", "children", "className", "component", "components", "componentsProps", "ContainerComponent", "ContainerProps", "dense", "disabled", "disableGutters", "disablePadding", "divider", "focusVisibleClassName", "secondaryAction", "selected", "slotProps", "slots"];
|
|
7
7
|
import * as React from 'react';
|
|
@@ -53,9 +53,8 @@ export const ListItemRoot = styled('div', {
|
|
|
53
53
|
slot: 'Root',
|
|
54
54
|
overridesResolver
|
|
55
55
|
})(({
|
|
56
|
-
theme
|
|
57
|
-
|
|
58
|
-
}) => _extends({
|
|
56
|
+
theme
|
|
57
|
+
}) => ({
|
|
59
58
|
display: 'flex',
|
|
60
59
|
justifyContent: 'flex-start',
|
|
61
60
|
alignItems: 'center',
|
|
@@ -63,25 +62,7 @@ export const ListItemRoot = styled('div', {
|
|
|
63
62
|
textDecoration: 'none',
|
|
64
63
|
width: '100%',
|
|
65
64
|
boxSizing: 'border-box',
|
|
66
|
-
textAlign: 'left'
|
|
67
|
-
}, !ownerState.disablePadding && _extends({
|
|
68
|
-
paddingTop: 8,
|
|
69
|
-
paddingBottom: 8
|
|
70
|
-
}, ownerState.dense && {
|
|
71
|
-
paddingTop: 4,
|
|
72
|
-
paddingBottom: 4
|
|
73
|
-
}, !ownerState.disableGutters && {
|
|
74
|
-
paddingLeft: 16,
|
|
75
|
-
paddingRight: 16
|
|
76
|
-
}, !!ownerState.secondaryAction && {
|
|
77
|
-
// Add some space to avoid collision as `ListItemSecondaryAction`
|
|
78
|
-
// is absolutely positioned.
|
|
79
|
-
paddingRight: 48
|
|
80
|
-
}), !!ownerState.secondaryAction && {
|
|
81
|
-
[`& > .${listItemButtonClasses.root}`]: {
|
|
82
|
-
paddingRight: 48
|
|
83
|
-
}
|
|
84
|
-
}, {
|
|
65
|
+
textAlign: 'left',
|
|
85
66
|
[`&.${listItemClasses.focusVisible}`]: {
|
|
86
67
|
backgroundColor: (theme.vars || theme).palette.action.focus
|
|
87
68
|
},
|
|
@@ -93,35 +74,98 @@ export const ListItemRoot = styled('div', {
|
|
|
93
74
|
},
|
|
94
75
|
[`&.${listItemClasses.disabled}`]: {
|
|
95
76
|
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
96
|
-
}
|
|
97
|
-
}, ownerState.alignItems === 'flex-start' && {
|
|
98
|
-
alignItems: 'flex-start'
|
|
99
|
-
}, ownerState.divider && {
|
|
100
|
-
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
101
|
-
backgroundClip: 'padding-box'
|
|
102
|
-
}, ownerState.button && {
|
|
103
|
-
transition: theme.transitions.create('background-color', {
|
|
104
|
-
duration: theme.transitions.duration.shortest
|
|
105
|
-
}),
|
|
106
|
-
'&:hover': {
|
|
107
|
-
textDecoration: 'none',
|
|
108
|
-
backgroundColor: (theme.vars || theme).palette.action.hover,
|
|
109
|
-
// Reset on touch devices, it doesn't add specificity
|
|
110
|
-
'@media (hover: none)': {
|
|
111
|
-
backgroundColor: 'transparent'
|
|
112
|
-
}
|
|
113
77
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
78
|
+
variants: [{
|
|
79
|
+
props: ({
|
|
80
|
+
ownerState
|
|
81
|
+
}) => !ownerState.disablePadding,
|
|
82
|
+
style: {
|
|
83
|
+
paddingTop: 8,
|
|
84
|
+
paddingBottom: 8
|
|
119
85
|
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
86
|
+
}, {
|
|
87
|
+
props: ({
|
|
88
|
+
ownerState
|
|
89
|
+
}) => !ownerState.disablePadding && ownerState.dense,
|
|
90
|
+
style: {
|
|
91
|
+
paddingTop: 4,
|
|
92
|
+
paddingBottom: 4
|
|
93
|
+
}
|
|
94
|
+
}, {
|
|
95
|
+
props: ({
|
|
96
|
+
ownerState
|
|
97
|
+
}) => !ownerState.disablePadding && !ownerState.disableGutters,
|
|
98
|
+
style: {
|
|
99
|
+
paddingLeft: 16,
|
|
100
|
+
paddingRight: 16
|
|
101
|
+
}
|
|
102
|
+
}, {
|
|
103
|
+
props: ({
|
|
104
|
+
ownerState
|
|
105
|
+
}) => !ownerState.disablePadding && !!ownerState.secondaryAction,
|
|
106
|
+
style: {
|
|
107
|
+
// Add some space to avoid collision as `ListItemSecondaryAction`
|
|
108
|
+
// is absolutely positioned.
|
|
109
|
+
paddingRight: 48
|
|
110
|
+
}
|
|
111
|
+
}, {
|
|
112
|
+
props: ({
|
|
113
|
+
ownerState
|
|
114
|
+
}) => !!ownerState.secondaryAction,
|
|
115
|
+
style: {
|
|
116
|
+
[`& > .${listItemButtonClasses.root}`]: {
|
|
117
|
+
paddingRight: 48
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}, {
|
|
121
|
+
props: {
|
|
122
|
+
alignItems: 'flex-start'
|
|
123
|
+
},
|
|
124
|
+
style: {
|
|
125
|
+
alignItems: 'flex-start'
|
|
126
|
+
}
|
|
127
|
+
}, {
|
|
128
|
+
props: ({
|
|
129
|
+
ownerState
|
|
130
|
+
}) => ownerState.divider,
|
|
131
|
+
style: {
|
|
132
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
133
|
+
backgroundClip: 'padding-box'
|
|
134
|
+
}
|
|
135
|
+
}, {
|
|
136
|
+
props: ({
|
|
137
|
+
ownerState
|
|
138
|
+
}) => ownerState.button,
|
|
139
|
+
style: {
|
|
140
|
+
transition: theme.transitions.create('background-color', {
|
|
141
|
+
duration: theme.transitions.duration.shortest
|
|
142
|
+
}),
|
|
143
|
+
'&:hover': {
|
|
144
|
+
textDecoration: 'none',
|
|
145
|
+
backgroundColor: (theme.vars || theme).palette.action.hover,
|
|
146
|
+
// Reset on touch devices, it doesn't add specificity
|
|
147
|
+
'@media (hover: none)': {
|
|
148
|
+
backgroundColor: 'transparent'
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
[`&.${listItemClasses.selected}:hover`]: {
|
|
152
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / calc(${theme.vars.palette.action.selectedOpacity} + ${theme.vars.palette.action.hoverOpacity}))` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),
|
|
153
|
+
// Reset on touch devices, it doesn't add specificity
|
|
154
|
+
'@media (hover: none)': {
|
|
155
|
+
backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.selectedOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.selectedOpacity)
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}, {
|
|
160
|
+
props: ({
|
|
161
|
+
ownerState
|
|
162
|
+
}) => ownerState.hasSecondaryAction,
|
|
163
|
+
style: {
|
|
164
|
+
// Add some space to avoid collision as `ListItemSecondaryAction`
|
|
165
|
+
// is absolutely positioned.
|
|
166
|
+
paddingRight: 48
|
|
167
|
+
}
|
|
168
|
+
}]
|
|
125
169
|
}));
|
|
126
170
|
const ListItemContainer = styled('li', {
|
|
127
171
|
name: 'MuiListItem',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["className"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -31,14 +31,18 @@ const ListItemAvatarRoot = styled('div', {
|
|
|
31
31
|
} = props;
|
|
32
32
|
return [styles.root, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart];
|
|
33
33
|
}
|
|
34
|
-
})(
|
|
35
|
-
ownerState
|
|
36
|
-
}) => _extends({
|
|
34
|
+
})({
|
|
37
35
|
minWidth: 56,
|
|
38
|
-
flexShrink: 0
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
36
|
+
flexShrink: 0,
|
|
37
|
+
variants: [{
|
|
38
|
+
props: {
|
|
39
|
+
alignItems: 'flex-start'
|
|
40
|
+
},
|
|
41
|
+
style: {
|
|
42
|
+
marginTop: 8
|
|
43
|
+
}
|
|
44
|
+
}]
|
|
45
|
+
});
|
|
42
46
|
|
|
43
47
|
/**
|
|
44
48
|
* A simple wrapper to apply `List` styles to an `Avatar`.
|
|
@@ -44,9 +44,8 @@ const ListItemButtonRoot = styled(ButtonBase, {
|
|
|
44
44
|
slot: 'Root',
|
|
45
45
|
overridesResolver
|
|
46
46
|
})(({
|
|
47
|
-
theme
|
|
48
|
-
|
|
49
|
-
}) => _extends({
|
|
47
|
+
theme
|
|
48
|
+
}) => ({
|
|
50
49
|
display: 'flex',
|
|
51
50
|
flexGrow: 1,
|
|
52
51
|
justifyContent: 'flex-start',
|
|
@@ -87,18 +86,39 @@ const ListItemButtonRoot = styled(ButtonBase, {
|
|
|
87
86
|
},
|
|
88
87
|
[`&.${listItemButtonClasses.disabled}`]: {
|
|
89
88
|
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
},
|
|
90
|
+
variants: [{
|
|
91
|
+
props: ({
|
|
92
|
+
ownerState
|
|
93
|
+
}) => ownerState.divider,
|
|
94
|
+
style: {
|
|
95
|
+
borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`,
|
|
96
|
+
backgroundClip: 'padding-box'
|
|
97
|
+
}
|
|
98
|
+
}, {
|
|
99
|
+
props: {
|
|
100
|
+
alignItems: 'flex-start'
|
|
101
|
+
},
|
|
102
|
+
style: {
|
|
103
|
+
alignItems: 'flex-start'
|
|
104
|
+
}
|
|
105
|
+
}, {
|
|
106
|
+
props: ({
|
|
107
|
+
ownerState
|
|
108
|
+
}) => !ownerState.disableGutters,
|
|
109
|
+
style: {
|
|
110
|
+
paddingLeft: 16,
|
|
111
|
+
paddingRight: 16
|
|
112
|
+
}
|
|
113
|
+
}, {
|
|
114
|
+
props: ({
|
|
115
|
+
ownerState
|
|
116
|
+
}) => ownerState.dense,
|
|
117
|
+
style: {
|
|
118
|
+
paddingTop: 4,
|
|
119
|
+
paddingBottom: 4
|
|
120
|
+
}
|
|
121
|
+
}]
|
|
102
122
|
}));
|
|
103
123
|
const ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inProps, ref) {
|
|
104
124
|
const props = useThemeProps({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["className"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -31,16 +31,20 @@ const ListItemSecondaryActionRoot = styled('div', {
|
|
|
31
31
|
} = props;
|
|
32
32
|
return [styles.root, ownerState.disableGutters && styles.disableGutters];
|
|
33
33
|
}
|
|
34
|
-
})(
|
|
35
|
-
ownerState
|
|
36
|
-
}) => _extends({
|
|
34
|
+
})({
|
|
37
35
|
position: 'absolute',
|
|
38
36
|
right: 16,
|
|
39
37
|
top: '50%',
|
|
40
|
-
transform: 'translateY(-50%)'
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
transform: 'translateY(-50%)',
|
|
39
|
+
variants: [{
|
|
40
|
+
props: ({
|
|
41
|
+
ownerState
|
|
42
|
+
}) => ownerState.disableGutters,
|
|
43
|
+
style: {
|
|
44
|
+
right: 0
|
|
45
|
+
}
|
|
46
|
+
}]
|
|
47
|
+
});
|
|
44
48
|
|
|
45
49
|
/**
|
|
46
50
|
* Must be used as the last child of ListItem to function properly.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["children", "className", "disableTypography", "inset", "primary", "primaryTypographyProps", "secondary", "secondaryTypographyProps"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -41,19 +41,28 @@ const ListItemTextRoot = styled('div', {
|
|
|
41
41
|
[`& .${listItemTextClasses.secondary}`]: styles.secondary
|
|
42
42
|
}, styles.root, ownerState.inset && styles.inset, ownerState.primary && ownerState.secondary && styles.multiline, ownerState.dense && styles.dense];
|
|
43
43
|
}
|
|
44
|
-
})(
|
|
45
|
-
ownerState
|
|
46
|
-
}) => _extends({
|
|
44
|
+
})({
|
|
47
45
|
flex: '1 1 auto',
|
|
48
46
|
minWidth: 0,
|
|
49
47
|
marginTop: 4,
|
|
50
|
-
marginBottom: 4
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
48
|
+
marginBottom: 4,
|
|
49
|
+
variants: [{
|
|
50
|
+
props: ({
|
|
51
|
+
ownerState
|
|
52
|
+
}) => ownerState.primary && ownerState.secondary,
|
|
53
|
+
style: {
|
|
54
|
+
marginTop: 6,
|
|
55
|
+
marginBottom: 6
|
|
56
|
+
}
|
|
57
|
+
}, {
|
|
58
|
+
props: ({
|
|
59
|
+
ownerState
|
|
60
|
+
}) => ownerState.inset,
|
|
61
|
+
style: {
|
|
62
|
+
paddingLeft: 56
|
|
63
|
+
}
|
|
64
|
+
}]
|
|
65
|
+
});
|
|
57
66
|
const ListItemText = /*#__PURE__*/React.forwardRef(function ListItemText(inProps, ref) {
|
|
58
67
|
const props = useThemeProps({
|
|
59
68
|
props: inProps,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
4
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["className", "color", "component", "disableGutters", "disableSticky", "inset"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import PropTypes from 'prop-types';
|
|
@@ -35,30 +35,55 @@ const ListSubheaderRoot = styled('li', {
|
|
|
35
35
|
return [styles.root, ownerState.color !== 'default' && styles[`color${capitalize(ownerState.color)}`], !ownerState.disableGutters && styles.gutters, ownerState.inset && styles.inset, !ownerState.disableSticky && styles.sticky];
|
|
36
36
|
}
|
|
37
37
|
})(({
|
|
38
|
-
theme
|
|
39
|
-
|
|
40
|
-
}) => _extends({
|
|
38
|
+
theme
|
|
39
|
+
}) => ({
|
|
41
40
|
boxSizing: 'border-box',
|
|
42
41
|
lineHeight: '48px',
|
|
43
42
|
listStyle: 'none',
|
|
44
43
|
color: (theme.vars || theme).palette.text.secondary,
|
|
45
44
|
fontFamily: theme.typography.fontFamily,
|
|
46
45
|
fontWeight: theme.typography.fontWeightMedium,
|
|
47
|
-
fontSize: theme.typography.pxToRem(14)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
fontSize: theme.typography.pxToRem(14),
|
|
47
|
+
variants: [{
|
|
48
|
+
props: {
|
|
49
|
+
color: 'primary'
|
|
50
|
+
},
|
|
51
|
+
style: {
|
|
52
|
+
color: (theme.vars || theme).palette.primary.main
|
|
53
|
+
}
|
|
54
|
+
}, {
|
|
55
|
+
props: {
|
|
56
|
+
color: 'inherit'
|
|
57
|
+
},
|
|
58
|
+
style: {
|
|
59
|
+
color: 'inherit'
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
props: ({
|
|
63
|
+
ownerState
|
|
64
|
+
}) => !ownerState.disableGutters,
|
|
65
|
+
style: {
|
|
66
|
+
paddingLeft: 16,
|
|
67
|
+
paddingRight: 16
|
|
68
|
+
}
|
|
69
|
+
}, {
|
|
70
|
+
props: ({
|
|
71
|
+
ownerState
|
|
72
|
+
}) => ownerState.inset,
|
|
73
|
+
style: {
|
|
74
|
+
paddingLeft: 72
|
|
75
|
+
}
|
|
76
|
+
}, {
|
|
77
|
+
props: ({
|
|
78
|
+
ownerState
|
|
79
|
+
}) => !ownerState.disableSticky,
|
|
80
|
+
style: {
|
|
81
|
+
position: 'sticky',
|
|
82
|
+
top: 0,
|
|
83
|
+
zIndex: 1,
|
|
84
|
+
backgroundColor: (theme.vars || theme).palette.background.paper
|
|
85
|
+
}
|
|
86
|
+
}]
|
|
62
87
|
}));
|
|
63
88
|
const ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(inProps, ref) {
|
|
64
89
|
const props = useThemeProps({
|
|
@@ -5,6 +5,7 @@ import { OverridableComponent, OverrideProps } from '@mui/material/OverridableCo
|
|
|
5
5
|
import { Theme } from '../styles';
|
|
6
6
|
import { UsePaginationItem } from '../usePagination/usePagination';
|
|
7
7
|
import { PaginationItemClasses } from './paginationItemClasses';
|
|
8
|
+
import { CreateSlotsAndSlotProps, SlotProps } from '../utils/types';
|
|
8
9
|
|
|
9
10
|
export interface PaginationItemPropsVariantOverrides {}
|
|
10
11
|
|
|
@@ -12,7 +13,30 @@ export interface PaginationItemPropsSizeOverrides {}
|
|
|
12
13
|
|
|
13
14
|
export interface PaginationItemPropsColorOverrides {}
|
|
14
15
|
|
|
15
|
-
export interface
|
|
16
|
+
export interface PaginationItemSlots {
|
|
17
|
+
first?: React.ElementType;
|
|
18
|
+
last?: React.ElementType;
|
|
19
|
+
next?: React.ElementType;
|
|
20
|
+
previous?: React.ElementType;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export type PaginationItemSlotsAndSlotProps = CreateSlotsAndSlotProps<
|
|
24
|
+
PaginationItemSlots,
|
|
25
|
+
{
|
|
26
|
+
first: SlotProps<React.ElementType<React.HTMLProps<HTMLElement>>, {}, PaginationItemOwnerState>;
|
|
27
|
+
last: SlotProps<React.ElementType<React.HTMLProps<HTMLElement>>, {}, PaginationItemOwnerState>;
|
|
28
|
+
next: SlotProps<React.ElementType<React.HTMLProps<HTMLElement>>, {}, PaginationItemOwnerState>;
|
|
29
|
+
previous: SlotProps<
|
|
30
|
+
React.ElementType<React.HTMLProps<HTMLElement>>,
|
|
31
|
+
{},
|
|
32
|
+
PaginationItemOwnerState
|
|
33
|
+
>;
|
|
34
|
+
}
|
|
35
|
+
>;
|
|
36
|
+
|
|
37
|
+
export interface PaginationItemOwnerState extends PaginationItemProps {}
|
|
38
|
+
|
|
39
|
+
export interface PaginationItemOwnProps extends PaginationItemSlotsAndSlotProps {
|
|
16
40
|
/**
|
|
17
41
|
* Override or extend the styles applied to the component.
|
|
18
42
|
*/
|
|
@@ -34,6 +58,7 @@ export interface PaginationItemOwnProps {
|
|
|
34
58
|
* It's recommended to use the `slots` prop instead.
|
|
35
59
|
*
|
|
36
60
|
* @default {}
|
|
61
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
37
62
|
*/
|
|
38
63
|
components?: {
|
|
39
64
|
first?: React.ElementType;
|
|
@@ -65,19 +90,6 @@ export interface PaginationItemOwnProps {
|
|
|
65
90
|
* @default 'medium'
|
|
66
91
|
*/
|
|
67
92
|
size?: OverridableStringUnion<'small' | 'medium' | 'large', PaginationItemPropsSizeOverrides>;
|
|
68
|
-
/**
|
|
69
|
-
* The components used for each slot inside.
|
|
70
|
-
*
|
|
71
|
-
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
72
|
-
*
|
|
73
|
-
* @default {}
|
|
74
|
-
*/
|
|
75
|
-
slots?: {
|
|
76
|
-
first?: React.ElementType;
|
|
77
|
-
last?: React.ElementType;
|
|
78
|
-
next?: React.ElementType;
|
|
79
|
-
previous?: React.ElementType;
|
|
80
|
-
};
|
|
81
93
|
/**
|
|
82
94
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
83
95
|
*/
|