@mui/lab 5.0.0-alpha.130 → 5.0.0-alpha.132
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/Alert/Alert.js +4 -4
- package/AlertTitle/AlertTitle.js +4 -4
- package/Autocomplete/Autocomplete.js +4 -4
- package/AvatarGroup/AvatarGroup.js +4 -4
- package/CHANGELOG.md +93 -0
- package/LoadingButton/LoadingButton.js +62 -74
- package/Masonry/Masonry.js +29 -34
- package/Pagination/Pagination.js +4 -4
- package/PaginationItem/PaginationItem.js +4 -4
- package/Rating/Rating.js +4 -4
- package/Skeleton/Skeleton.js +4 -4
- package/SpeedDial/SpeedDial.js +4 -4
- package/SpeedDialAction/SpeedDialAction.js +4 -4
- package/SpeedDialIcon/SpeedDialIcon.js +4 -4
- package/TabList/TabList.js +8 -6
- package/TabPanel/TabPanel.js +13 -12
- package/Timeline/Timeline.js +12 -11
- package/TimelineConnector/TimelineConnector.js +9 -7
- package/TimelineContent/TimelineContent.js +15 -15
- package/TimelineDot/TimelineDot.js +31 -38
- package/TimelineItem/TimelineItem.js +31 -33
- package/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
- package/TimelineSeparator/TimelineSeparator.js +9 -7
- package/ToggleButton/ToggleButton.js +4 -4
- package/ToggleButtonGroup/ToggleButtonGroup.js +4 -4
- package/TreeItem/TreeItem.js +37 -37
- package/TreeItem/TreeItemContent.js +18 -15
- package/TreeView/TreeView.js +33 -35
- package/TreeView/descendants.js +14 -13
- package/index.js +1 -1
- package/legacy/Alert/Alert.js +2 -4
- package/legacy/AlertTitle/AlertTitle.js +2 -4
- package/legacy/Autocomplete/Autocomplete.js +2 -4
- package/legacy/AvatarGroup/AvatarGroup.js +2 -4
- package/legacy/LoadingButton/LoadingButton.js +15 -16
- package/legacy/Masonry/Masonry.js +8 -10
- package/legacy/Pagination/Pagination.js +2 -4
- package/legacy/PaginationItem/PaginationItem.js +2 -4
- package/legacy/Rating/Rating.js +2 -4
- package/legacy/Skeleton/Skeleton.js +2 -4
- package/legacy/SpeedDial/SpeedDial.js +2 -4
- package/legacy/SpeedDialAction/SpeedDialAction.js +2 -4
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +2 -4
- package/legacy/TabList/TabList.js +2 -4
- package/legacy/TabPanel/TabPanel.js +4 -6
- package/legacy/Timeline/Timeline.js +3 -5
- package/legacy/TimelineConnector/TimelineConnector.js +2 -4
- package/legacy/TimelineContent/TimelineContent.js +4 -6
- package/legacy/TimelineDot/TimelineDot.js +8 -10
- package/legacy/TimelineItem/TimelineItem.js +6 -7
- package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +4 -6
- package/legacy/TimelineSeparator/TimelineSeparator.js +2 -4
- package/legacy/ToggleButton/ToggleButton.js +2 -4
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +2 -4
- package/legacy/TreeItem/TreeItem.js +8 -9
- package/legacy/TreeItem/TreeItemContent.js +3 -5
- package/legacy/TreeView/TreeView.js +6 -8
- package/legacy/TreeView/descendants.js +4 -6
- package/legacy/index.js +1 -1
- package/modern/Alert/Alert.js +4 -4
- package/modern/AlertTitle/AlertTitle.js +4 -4
- package/modern/Autocomplete/Autocomplete.js +4 -4
- package/modern/AvatarGroup/AvatarGroup.js +4 -4
- package/modern/LoadingButton/LoadingButton.js +62 -74
- package/modern/Masonry/Masonry.js +29 -34
- package/modern/Pagination/Pagination.js +4 -4
- package/modern/PaginationItem/PaginationItem.js +4 -4
- package/modern/Rating/Rating.js +4 -4
- package/modern/Skeleton/Skeleton.js +4 -4
- package/modern/SpeedDial/SpeedDial.js +4 -4
- package/modern/SpeedDialAction/SpeedDialAction.js +4 -4
- package/modern/SpeedDialIcon/SpeedDialIcon.js +4 -4
- package/modern/TabList/TabList.js +8 -6
- package/modern/TabPanel/TabPanel.js +13 -12
- package/modern/Timeline/Timeline.js +12 -11
- package/modern/TimelineConnector/TimelineConnector.js +9 -7
- package/modern/TimelineContent/TimelineContent.js +15 -15
- package/modern/TimelineDot/TimelineDot.js +31 -38
- package/modern/TimelineItem/TimelineItem.js +31 -33
- package/modern/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
- package/modern/TimelineSeparator/TimelineSeparator.js +9 -7
- package/modern/ToggleButton/ToggleButton.js +4 -4
- package/modern/ToggleButtonGroup/ToggleButtonGroup.js +4 -4
- package/modern/TreeItem/TreeItem.js +37 -37
- package/modern/TreeItem/TreeItemContent.js +18 -15
- package/modern/TreeView/TreeView.js +33 -35
- package/modern/TreeView/descendants.js +14 -13
- package/modern/index.js +1 -1
- package/node/Alert/Alert.js +4 -4
- package/node/AlertTitle/AlertTitle.js +4 -4
- package/node/Autocomplete/Autocomplete.js +4 -4
- package/node/AvatarGroup/AvatarGroup.js +4 -4
- package/node/LoadingButton/LoadingButton.js +62 -74
- package/node/Masonry/Masonry.js +29 -34
- package/node/Pagination/Pagination.js +4 -4
- package/node/PaginationItem/PaginationItem.js +4 -4
- package/node/Rating/Rating.js +4 -4
- package/node/Skeleton/Skeleton.js +4 -4
- package/node/SpeedDial/SpeedDial.js +4 -4
- package/node/SpeedDialAction/SpeedDialAction.js +4 -4
- package/node/SpeedDialIcon/SpeedDialIcon.js +4 -4
- package/node/TabList/TabList.js +8 -6
- package/node/TabPanel/TabPanel.js +13 -12
- package/node/Timeline/Timeline.js +12 -13
- package/node/TimelineConnector/TimelineConnector.js +9 -7
- package/node/TimelineContent/TimelineContent.js +15 -15
- package/node/TimelineDot/TimelineDot.js +31 -38
- package/node/TimelineItem/TimelineItem.js +31 -33
- package/node/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
- package/node/TimelineSeparator/TimelineSeparator.js +9 -7
- package/node/ToggleButton/ToggleButton.js +4 -4
- package/node/ToggleButtonGroup/ToggleButtonGroup.js +4 -4
- package/node/TreeItem/TreeItem.js +37 -37
- package/node/TreeItem/TreeItemContent.js +22 -18
- package/node/TreeView/TreeView.js +33 -35
- package/node/TreeView/descendants.js +16 -16
- package/node/index.js +1 -1
- package/package.json +3 -3
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
const _excluded = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"];
|
|
1
4
|
import * as React from 'react';
|
|
2
5
|
import PropTypes from 'prop-types';
|
|
3
6
|
import { chainPropTypes } from '@mui/utils';
|
|
@@ -22,11 +25,7 @@ const useUtilityClasses = ownerState => {
|
|
|
22
25
|
loadingIndicator: ['loadingIndicator', loading && `loadingIndicator${capitalize(loadingPosition)}`]
|
|
23
26
|
};
|
|
24
27
|
const composedClasses = composeClasses(slots, getLoadingButtonUtilityClass, classes);
|
|
25
|
-
return {
|
|
26
|
-
...classes,
|
|
27
|
-
// forward the outlined, color, etc. classes to Button
|
|
28
|
-
...composedClasses
|
|
29
|
-
};
|
|
28
|
+
return _extends({}, classes, composedClasses);
|
|
30
29
|
};
|
|
31
30
|
|
|
32
31
|
// TODO use `import { rootShouldForwardProp } from '../styles/styled';` once move to core
|
|
@@ -45,39 +44,36 @@ const LoadingButtonRoot = styled(Button, {
|
|
|
45
44
|
})(({
|
|
46
45
|
ownerState,
|
|
47
46
|
theme
|
|
48
|
-
}) => ({
|
|
47
|
+
}) => _extends({
|
|
49
48
|
[`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {
|
|
50
49
|
transition: theme.transitions.create(['opacity'], {
|
|
51
50
|
duration: theme.transitions.duration.short
|
|
52
51
|
}),
|
|
53
52
|
opacity: 0
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
53
|
+
}
|
|
54
|
+
}, ownerState.loadingPosition === 'center' && {
|
|
55
|
+
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {
|
|
56
|
+
duration: theme.transitions.duration.short
|
|
57
|
+
}),
|
|
58
|
+
[`&.${loadingButtonClasses.loading}`]: {
|
|
59
|
+
color: 'transparent'
|
|
60
|
+
}
|
|
61
|
+
}, ownerState.loadingPosition === 'start' && ownerState.fullWidth && {
|
|
62
|
+
[`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {
|
|
63
|
+
transition: theme.transitions.create(['opacity'], {
|
|
57
64
|
duration: theme.transitions.duration.short
|
|
58
65
|
}),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
71
|
-
}),
|
|
72
|
-
...(ownerState.loadingPosition === 'end' && ownerState.fullWidth && {
|
|
73
|
-
[`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {
|
|
74
|
-
transition: theme.transitions.create(['opacity'], {
|
|
75
|
-
duration: theme.transitions.duration.short
|
|
76
|
-
}),
|
|
77
|
-
opacity: 0,
|
|
78
|
-
marginLeft: -8
|
|
79
|
-
}
|
|
80
|
-
})
|
|
66
|
+
opacity: 0,
|
|
67
|
+
marginRight: -8
|
|
68
|
+
}
|
|
69
|
+
}, ownerState.loadingPosition === 'end' && ownerState.fullWidth && {
|
|
70
|
+
[`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {
|
|
71
|
+
transition: theme.transitions.create(['opacity'], {
|
|
72
|
+
duration: theme.transitions.duration.short
|
|
73
|
+
}),
|
|
74
|
+
opacity: 0,
|
|
75
|
+
marginLeft: -8
|
|
76
|
+
}
|
|
81
77
|
}));
|
|
82
78
|
const LoadingButtonLoadingIndicator = styled('div', {
|
|
83
79
|
name: 'MuiLoadingButton',
|
|
@@ -91,35 +87,28 @@ const LoadingButtonLoadingIndicator = styled('div', {
|
|
|
91
87
|
})(({
|
|
92
88
|
theme,
|
|
93
89
|
ownerState
|
|
94
|
-
}) => ({
|
|
90
|
+
}) => _extends({
|
|
95
91
|
position: 'absolute',
|
|
96
92
|
visibility: 'visible',
|
|
97
|
-
display: 'flex'
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
position: 'relative',
|
|
117
|
-
left: -10
|
|
118
|
-
}),
|
|
119
|
-
...(ownerState.loadingPosition === 'end' && ownerState.fullWidth && {
|
|
120
|
-
position: 'relative',
|
|
121
|
-
right: -10
|
|
122
|
-
})
|
|
93
|
+
display: 'flex'
|
|
94
|
+
}, ownerState.loadingPosition === 'start' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {
|
|
95
|
+
left: ownerState.size === 'small' ? 10 : 14
|
|
96
|
+
}, ownerState.loadingPosition === 'start' && ownerState.variant === 'text' && {
|
|
97
|
+
left: 6
|
|
98
|
+
}, ownerState.loadingPosition === 'center' && {
|
|
99
|
+
left: '50%',
|
|
100
|
+
transform: 'translate(-50%)',
|
|
101
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
102
|
+
}, ownerState.loadingPosition === 'end' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {
|
|
103
|
+
right: ownerState.size === 'small' ? 10 : 14
|
|
104
|
+
}, ownerState.loadingPosition === 'end' && ownerState.variant === 'text' && {
|
|
105
|
+
right: 6
|
|
106
|
+
}, ownerState.loadingPosition === 'start' && ownerState.fullWidth && {
|
|
107
|
+
position: 'relative',
|
|
108
|
+
left: -10
|
|
109
|
+
}, ownerState.loadingPosition === 'end' && ownerState.fullWidth && {
|
|
110
|
+
position: 'relative',
|
|
111
|
+
right: -10
|
|
123
112
|
}));
|
|
124
113
|
const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps, ref) {
|
|
125
114
|
const props = useThemeProps({
|
|
@@ -127,45 +116,44 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
127
116
|
name: 'MuiLoadingButton'
|
|
128
117
|
});
|
|
129
118
|
const {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
119
|
+
children,
|
|
120
|
+
disabled = false,
|
|
121
|
+
id: idProp,
|
|
122
|
+
loading = false,
|
|
123
|
+
loadingIndicator: loadingIndicatorProp,
|
|
124
|
+
loadingPosition = 'center',
|
|
125
|
+
variant = 'text'
|
|
126
|
+
} = props,
|
|
127
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
139
128
|
const id = useId(idProp);
|
|
140
129
|
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, {
|
|
141
130
|
"aria-labelledby": id,
|
|
142
131
|
color: "inherit",
|
|
143
132
|
size: 16
|
|
144
133
|
});
|
|
145
|
-
const ownerState = {
|
|
146
|
-
...props,
|
|
134
|
+
const ownerState = _extends({}, props, {
|
|
147
135
|
disabled,
|
|
148
136
|
loading,
|
|
149
137
|
loadingIndicator,
|
|
150
138
|
loadingPosition,
|
|
151
139
|
variant
|
|
152
|
-
};
|
|
140
|
+
});
|
|
153
141
|
const classes = useUtilityClasses(ownerState);
|
|
154
142
|
const loadingButtonLoadingIndicator = loading ? /*#__PURE__*/_jsx(LoadingButtonLoadingIndicator, {
|
|
155
143
|
className: classes.loadingIndicator,
|
|
156
144
|
ownerState: ownerState,
|
|
157
145
|
children: loadingIndicator
|
|
158
146
|
}) : null;
|
|
159
|
-
return /*#__PURE__*/_jsxs(LoadingButtonRoot, {
|
|
147
|
+
return /*#__PURE__*/_jsxs(LoadingButtonRoot, _extends({
|
|
160
148
|
disabled: disabled || loading,
|
|
161
149
|
id: id,
|
|
162
|
-
ref: ref
|
|
163
|
-
|
|
150
|
+
ref: ref
|
|
151
|
+
}, other, {
|
|
164
152
|
variant: variant,
|
|
165
153
|
classes: classes,
|
|
166
154
|
ownerState: ownerState,
|
|
167
155
|
children: [ownerState.loadingPosition === 'end' ? children : loadingButtonLoadingIndicator, ownerState.loadingPosition === 'end' ? loadingButtonLoadingIndicator : children]
|
|
168
|
-
});
|
|
156
|
+
}));
|
|
169
157
|
});
|
|
170
158
|
process.env.NODE_ENV !== "production" ? LoadingButton.propTypes /* remove-proptypes */ = {
|
|
171
159
|
// ----------------------------- Warning --------------------------------
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
const _excluded = ["children", "className", "component", "columns", "spacing", "defaultColumns", "defaultHeight", "defaultSpacing"];
|
|
1
4
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
2
5
|
import * as ReactDOM from 'react-dom';
|
|
3
6
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
@@ -53,16 +56,11 @@ export const getStyle = ({
|
|
|
53
56
|
}
|
|
54
57
|
stylesSSR.height = ownerState.defaultHeight;
|
|
55
58
|
stylesSSR.margin = -(defaultSpacing / 2);
|
|
56
|
-
stylesSSR['& > *'] = {
|
|
57
|
-
...styles['& > *'],
|
|
58
|
-
...orderStyleSSR,
|
|
59
|
+
stylesSSR['& > *'] = _extends({}, styles['& > *'], orderStyleSSR, {
|
|
59
60
|
margin: defaultSpacing / 2,
|
|
60
61
|
width: `calc(${(100 / ownerState.defaultColumns).toFixed(2)}% - ${defaultSpacing}px)`
|
|
61
|
-
};
|
|
62
|
-
return {
|
|
63
|
-
...styles,
|
|
64
|
-
...stylesSSR
|
|
65
|
-
};
|
|
62
|
+
});
|
|
63
|
+
return _extends({}, styles, stylesSSR);
|
|
66
64
|
}
|
|
67
65
|
const spacingValues = resolveBreakpointValues({
|
|
68
66
|
values: ownerState.spacing,
|
|
@@ -78,15 +76,14 @@ export const getStyle = ({
|
|
|
78
76
|
} else {
|
|
79
77
|
spacing = propValue;
|
|
80
78
|
}
|
|
81
|
-
return {
|
|
79
|
+
return _extends({
|
|
82
80
|
margin: `calc(0px - (${spacing} / 2))`,
|
|
83
81
|
'& > *': {
|
|
84
82
|
margin: `calc(${spacing} / 2)`
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
};
|
|
83
|
+
}
|
|
84
|
+
}, ownerState.maxColumnHeight && {
|
|
85
|
+
height: typeof spacing === 'number' ? Math.ceil(ownerState.maxColumnHeight + parseToNumber(spacing)) : `calc(${ownerState.maxColumnHeight}px + ${spacing})`
|
|
86
|
+
});
|
|
90
87
|
};
|
|
91
88
|
styles = deepmerge(styles, handleBreakpoints({
|
|
92
89
|
theme
|
|
@@ -144,22 +141,21 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
144
141
|
name: 'MuiMasonry'
|
|
145
142
|
});
|
|
146
143
|
const {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
144
|
+
children,
|
|
145
|
+
className,
|
|
146
|
+
component = 'div',
|
|
147
|
+
columns = 4,
|
|
148
|
+
spacing = 1,
|
|
149
|
+
defaultColumns,
|
|
150
|
+
defaultHeight,
|
|
151
|
+
defaultSpacing
|
|
152
|
+
} = props,
|
|
153
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
157
154
|
const masonryRef = React.useRef();
|
|
158
155
|
const [maxColumnHeight, setMaxColumnHeight] = React.useState();
|
|
159
156
|
const isSSR = !maxColumnHeight && defaultHeight && defaultColumns !== undefined && defaultSpacing !== undefined;
|
|
160
157
|
const [numberOfLineBreaks, setNumberOfLineBreaks] = React.useState(isSSR ? defaultColumns - 1 : 0);
|
|
161
|
-
const ownerState = {
|
|
162
|
-
...props,
|
|
158
|
+
const ownerState = _extends({}, props, {
|
|
163
159
|
spacing,
|
|
164
160
|
columns,
|
|
165
161
|
maxColumnHeight,
|
|
@@ -167,7 +163,7 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
167
163
|
defaultHeight,
|
|
168
164
|
defaultSpacing,
|
|
169
165
|
isSSR
|
|
170
|
-
};
|
|
166
|
+
});
|
|
171
167
|
const classes = useUtilityClasses(ownerState);
|
|
172
168
|
const handleResize = masonryChildren => {
|
|
173
169
|
if (!masonryRef.current || !masonryChildren || masonryChildren.length === 0) {
|
|
@@ -245,19 +241,18 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
245
241
|
// a line break at the end of each column prevents columns from merging
|
|
246
242
|
const lineBreaks = new Array(numberOfLineBreaks).fill('').map((_, index) => /*#__PURE__*/_jsx("span", {
|
|
247
243
|
"data-class": "line-break",
|
|
248
|
-
style: {
|
|
249
|
-
...lineBreakStyle,
|
|
244
|
+
style: _extends({}, lineBreakStyle, {
|
|
250
245
|
order: index + 1
|
|
251
|
-
}
|
|
246
|
+
})
|
|
252
247
|
}, index));
|
|
253
|
-
return /*#__PURE__*/_jsxs(MasonryRoot, {
|
|
248
|
+
return /*#__PURE__*/_jsxs(MasonryRoot, _extends({
|
|
254
249
|
as: component,
|
|
255
250
|
className: clsx(classes.root, className),
|
|
256
251
|
ref: handleRef,
|
|
257
|
-
ownerState: ownerState
|
|
258
|
-
|
|
252
|
+
ownerState: ownerState
|
|
253
|
+
}, other, {
|
|
259
254
|
children: [children, lineBreaks]
|
|
260
|
-
});
|
|
255
|
+
}));
|
|
261
256
|
});
|
|
262
257
|
process.env.NODE_ENV !== "production" ? Masonry.propTypes /* remove-proptypes */ = {
|
|
263
258
|
// ----------------------------- Warning --------------------------------
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import Pagination from '@mui/material/Pagination';
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -11,8 +12,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedPagination(props
|
|
|
11
12
|
console.warn(['MUI: The Pagination component was moved from the lab to the core.', '', "You should use `import { Pagination } from '@mui/material'`", "or `import Pagination from '@mui/material/Pagination'`"].join('\n'));
|
|
12
13
|
warnedOnce = true;
|
|
13
14
|
}
|
|
14
|
-
return /*#__PURE__*/_jsx(Pagination, {
|
|
15
|
-
ref: ref
|
|
16
|
-
|
|
17
|
-
});
|
|
15
|
+
return /*#__PURE__*/_jsx(Pagination, _extends({
|
|
16
|
+
ref: ref
|
|
17
|
+
}, props));
|
|
18
18
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import PaginationItem from '@mui/material/PaginationItem';
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -11,8 +12,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedPaginationItem(p
|
|
|
11
12
|
console.warn(['MUI: The PaginationItem component was moved from the lab to the core.', '', "You should use `import { PaginationItem } from '@mui/material'`", "or `import PaginationItem from '@mui/material/PaginationItem'`"].join('\n'));
|
|
12
13
|
warnedOnce = true;
|
|
13
14
|
}
|
|
14
|
-
return /*#__PURE__*/_jsx(PaginationItem, {
|
|
15
|
-
ref: ref
|
|
16
|
-
|
|
17
|
-
});
|
|
15
|
+
return /*#__PURE__*/_jsx(PaginationItem, _extends({
|
|
16
|
+
ref: ref
|
|
17
|
+
}, props));
|
|
18
18
|
});
|
package/modern/Rating/Rating.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import Rating from '@mui/material/Rating';
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -11,8 +12,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedRating(props, re
|
|
|
11
12
|
console.warn(['MUI: The Rating component was moved from the lab to the core.', '', "You should use `import { Rating } from '@mui/material'`", "or `import Rating from '@mui/material/Rating'`"].join('\n'));
|
|
12
13
|
warnedOnce = true;
|
|
13
14
|
}
|
|
14
|
-
return /*#__PURE__*/_jsx(Rating, {
|
|
15
|
-
ref: ref
|
|
16
|
-
|
|
17
|
-
});
|
|
15
|
+
return /*#__PURE__*/_jsx(Rating, _extends({
|
|
16
|
+
ref: ref
|
|
17
|
+
}, props));
|
|
18
18
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import Skeleton from '@mui/material/Skeleton';
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -11,8 +12,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedSkeleton(props,
|
|
|
11
12
|
console.warn(['MUI: The Skeleton component was moved from the lab to the core.', '', "You should use `import { Skeleton } from '@mui/material'`", "or `import Skeleton from '@mui/material/Skeleton'`"].join('\n'));
|
|
12
13
|
warnedOnce = true;
|
|
13
14
|
}
|
|
14
|
-
return /*#__PURE__*/_jsx(Skeleton, {
|
|
15
|
-
ref: ref
|
|
16
|
-
|
|
17
|
-
});
|
|
15
|
+
return /*#__PURE__*/_jsx(Skeleton, _extends({
|
|
16
|
+
ref: ref
|
|
17
|
+
}, props));
|
|
18
18
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import SpeedDial from '@mui/material/SpeedDial';
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -11,8 +12,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedSpeedDial(props,
|
|
|
11
12
|
console.warn(['MUI: The SpeedDial component was moved from the lab to the core.', '', "You should use `import { SpeedDial } from '@mui/material'`", "or `import SpeedDial from '@mui/material/SpeedDial'`"].join('\n'));
|
|
12
13
|
warnedOnce = true;
|
|
13
14
|
}
|
|
14
|
-
return /*#__PURE__*/_jsx(SpeedDial, {
|
|
15
|
-
ref: ref
|
|
16
|
-
|
|
17
|
-
});
|
|
15
|
+
return /*#__PURE__*/_jsx(SpeedDial, _extends({
|
|
16
|
+
ref: ref
|
|
17
|
+
}, props));
|
|
18
18
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import SpeedDialAction from '@mui/material/SpeedDialAction';
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -11,8 +12,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedSpeedDialAction(
|
|
|
11
12
|
console.warn(['MUI: The SpeedDialAction component was moved from the lab to the core.', '', "You should use `import { SpeedDialAction } from '@mui/material'`", "or `import SpeedDialAction from '@mui/material/SpeedDialAction'`"].join('\n'));
|
|
12
13
|
warnedOnce = true;
|
|
13
14
|
}
|
|
14
|
-
return /*#__PURE__*/_jsx(SpeedDialAction, {
|
|
15
|
-
ref: ref
|
|
16
|
-
|
|
17
|
-
});
|
|
15
|
+
return /*#__PURE__*/_jsx(SpeedDialAction, _extends({
|
|
16
|
+
ref: ref
|
|
17
|
+
}, props));
|
|
18
18
|
});
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
1
2
|
import * as React from 'react';
|
|
2
3
|
import SpeedDialIcon from '@mui/material/SpeedDialIcon';
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -11,8 +12,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedSpeedDialIcon(pr
|
|
|
11
12
|
console.warn(['MUI: The SpeedDialIcon component was moved from the lab to the core.', '', "You should use `import { SpeedDialIcon } from '@mui/material'`", "or `import SpeedDialIcon from '@mui/material/SpeedDialIcon'`"].join('\n'));
|
|
12
13
|
warnedOnce = true;
|
|
13
14
|
}
|
|
14
|
-
return /*#__PURE__*/_jsx(SpeedDialIcon, {
|
|
15
|
-
ref: ref
|
|
16
|
-
|
|
17
|
-
});
|
|
15
|
+
return /*#__PURE__*/_jsx(SpeedDialIcon, _extends({
|
|
16
|
+
ref: ref
|
|
17
|
+
}, props));
|
|
18
18
|
});
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["children"];
|
|
1
4
|
import * as React from 'react';
|
|
2
5
|
import PropTypes from 'prop-types';
|
|
3
6
|
import Tabs from '@mui/material/Tabs';
|
|
@@ -5,9 +8,9 @@ import { useTabContext, getTabId, getPanelId } from '../TabContext';
|
|
|
5
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
9
|
const TabList = /*#__PURE__*/React.forwardRef(function TabList(props, ref) {
|
|
7
10
|
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
+
children: childrenProp
|
|
12
|
+
} = props,
|
|
13
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
11
14
|
const context = useTabContext();
|
|
12
15
|
if (context === null) {
|
|
13
16
|
throw new TypeError('No TabContext provided');
|
|
@@ -22,12 +25,11 @@ const TabList = /*#__PURE__*/React.forwardRef(function TabList(props, ref) {
|
|
|
22
25
|
id: getTabId(context, child.props.value)
|
|
23
26
|
});
|
|
24
27
|
});
|
|
25
|
-
return /*#__PURE__*/_jsx(Tabs, {
|
|
26
|
-
...other,
|
|
28
|
+
return /*#__PURE__*/_jsx(Tabs, _extends({}, other, {
|
|
27
29
|
ref: ref,
|
|
28
30
|
value: context.value,
|
|
29
31
|
children: children
|
|
30
|
-
});
|
|
32
|
+
}));
|
|
31
33
|
});
|
|
32
34
|
process.env.NODE_ENV !== "production" ? TabList.propTypes /* remove-proptypes */ = {
|
|
33
35
|
// ----------------------------- Warning --------------------------------
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["children", "className", "value"];
|
|
1
4
|
import * as React from 'react';
|
|
2
5
|
import PropTypes from 'prop-types';
|
|
3
6
|
import clsx from 'clsx';
|
|
@@ -30,14 +33,12 @@ const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(inProps, ref) {
|
|
|
30
33
|
name: 'MuiTabPanel'
|
|
31
34
|
});
|
|
32
35
|
const {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const ownerState = {
|
|
39
|
-
...props
|
|
40
|
-
};
|
|
36
|
+
children,
|
|
37
|
+
className,
|
|
38
|
+
value
|
|
39
|
+
} = props,
|
|
40
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
41
|
+
const ownerState = _extends({}, props);
|
|
41
42
|
const classes = useUtilityClasses(ownerState);
|
|
42
43
|
const context = useTabContext();
|
|
43
44
|
if (context === null) {
|
|
@@ -45,17 +46,17 @@ const TabPanel = /*#__PURE__*/React.forwardRef(function TabPanel(inProps, ref) {
|
|
|
45
46
|
}
|
|
46
47
|
const id = getPanelId(context, value);
|
|
47
48
|
const tabId = getTabId(context, value);
|
|
48
|
-
return /*#__PURE__*/_jsx(TabPanelRoot, {
|
|
49
|
+
return /*#__PURE__*/_jsx(TabPanelRoot, _extends({
|
|
49
50
|
"aria-labelledby": tabId,
|
|
50
51
|
className: clsx(classes.root, className),
|
|
51
52
|
hidden: value !== context.value,
|
|
52
53
|
id: id,
|
|
53
54
|
ref: ref,
|
|
54
55
|
role: "tabpanel",
|
|
55
|
-
ownerState: ownerState
|
|
56
|
-
|
|
56
|
+
ownerState: ownerState
|
|
57
|
+
}, other, {
|
|
57
58
|
children: value === context.value && children
|
|
58
|
-
});
|
|
59
|
+
}));
|
|
59
60
|
});
|
|
60
61
|
process.env.NODE_ENV !== "production" ? TabPanel.propTypes /* remove-proptypes */ = {
|
|
61
62
|
// ----------------------------- Warning --------------------------------
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["position", "className"];
|
|
1
4
|
import * as React from 'react';
|
|
2
5
|
import PropTypes from 'prop-types';
|
|
3
6
|
import clsx from 'clsx';
|
|
@@ -52,28 +55,26 @@ const Timeline = /*#__PURE__*/React.forwardRef(function Timeline(inProps, ref) {
|
|
|
52
55
|
name: 'MuiTimeline'
|
|
53
56
|
});
|
|
54
57
|
const {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
const ownerState = {
|
|
60
|
-
...props,
|
|
58
|
+
position = 'right',
|
|
59
|
+
className
|
|
60
|
+
} = props,
|
|
61
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
62
|
+
const ownerState = _extends({}, props, {
|
|
61
63
|
position
|
|
62
|
-
};
|
|
64
|
+
});
|
|
63
65
|
const classes = useUtilityClasses(ownerState);
|
|
64
66
|
const contextValue = React.useMemo(() => ({
|
|
65
67
|
position
|
|
66
68
|
}), [position]);
|
|
67
69
|
return /*#__PURE__*/_jsx(TimelineContext.Provider, {
|
|
68
70
|
value: contextValue,
|
|
69
|
-
children: /*#__PURE__*/_jsx(TimelineRoot, {
|
|
71
|
+
children: /*#__PURE__*/_jsx(TimelineRoot, _extends({
|
|
70
72
|
className: clsx(classes.root, className),
|
|
71
73
|
ownerState: ownerState
|
|
72
74
|
// @ts-expect-error TypeScript bug, need to keep unknown for DX
|
|
73
75
|
,
|
|
74
|
-
ref: ref
|
|
75
|
-
|
|
76
|
-
})
|
|
76
|
+
ref: ref
|
|
77
|
+
}, other))
|
|
77
78
|
});
|
|
78
79
|
});
|
|
79
80
|
process.env.NODE_ENV !== "production" ? Timeline.propTypes /* remove-proptypes */ = {
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["className"];
|
|
1
4
|
import * as React from 'react';
|
|
2
5
|
import PropTypes from 'prop-types';
|
|
3
6
|
import clsx from 'clsx';
|
|
@@ -33,17 +36,16 @@ const TimelineConnector = /*#__PURE__*/React.forwardRef(function TimelineConnect
|
|
|
33
36
|
name: 'MuiTimelineConnector'
|
|
34
37
|
});
|
|
35
38
|
const {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
className
|
|
40
|
+
} = props,
|
|
41
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
39
42
|
const ownerState = props;
|
|
40
43
|
const classes = useUtilityClasses(ownerState);
|
|
41
|
-
return /*#__PURE__*/_jsx(TimelineConnectorRoot, {
|
|
44
|
+
return /*#__PURE__*/_jsx(TimelineConnectorRoot, _extends({
|
|
42
45
|
className: clsx(classes.root, className),
|
|
43
46
|
ownerState: ownerState,
|
|
44
|
-
ref: ref
|
|
45
|
-
|
|
46
|
-
});
|
|
47
|
+
ref: ref
|
|
48
|
+
}, other));
|
|
47
49
|
});
|
|
48
50
|
process.env.NODE_ENV !== "production" ? TimelineConnector.propTypes /* remove-proptypes */ = {
|
|
49
51
|
// ----------------------------- Warning --------------------------------
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
const _excluded = ["className"];
|
|
1
4
|
import * as React from 'react';
|
|
2
5
|
import PropTypes from 'prop-types';
|
|
3
6
|
import clsx from 'clsx';
|
|
@@ -29,13 +32,12 @@ const TimelineContentRoot = styled(Typography, {
|
|
|
29
32
|
}
|
|
30
33
|
})(({
|
|
31
34
|
ownerState
|
|
32
|
-
}) => ({
|
|
35
|
+
}) => _extends({
|
|
33
36
|
flex: 1,
|
|
34
37
|
padding: '6px 16px',
|
|
35
|
-
textAlign: 'left'
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
})
|
|
38
|
+
textAlign: 'left'
|
|
39
|
+
}, ownerState.position === 'left' && {
|
|
40
|
+
textAlign: 'right'
|
|
39
41
|
}));
|
|
40
42
|
const TimelineContent = /*#__PURE__*/React.forwardRef(function TimelineContent(inProps, ref) {
|
|
41
43
|
const props = useThemeProps({
|
|
@@ -43,24 +45,22 @@ const TimelineContent = /*#__PURE__*/React.forwardRef(function TimelineContent(i
|
|
|
43
45
|
name: 'MuiTimelineContent'
|
|
44
46
|
});
|
|
45
47
|
const {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
className
|
|
49
|
+
} = props,
|
|
50
|
+
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
49
51
|
const {
|
|
50
52
|
position: positionContext
|
|
51
53
|
} = React.useContext(TimelineContext);
|
|
52
|
-
const ownerState = {
|
|
53
|
-
...props,
|
|
54
|
+
const ownerState = _extends({}, props, {
|
|
54
55
|
position: positionContext || 'right'
|
|
55
|
-
};
|
|
56
|
+
});
|
|
56
57
|
const classes = useUtilityClasses(ownerState);
|
|
57
|
-
return /*#__PURE__*/_jsx(TimelineContentRoot, {
|
|
58
|
+
return /*#__PURE__*/_jsx(TimelineContentRoot, _extends({
|
|
58
59
|
component: "div",
|
|
59
60
|
className: clsx(classes.root, className),
|
|
60
61
|
ownerState: ownerState,
|
|
61
|
-
ref: ref
|
|
62
|
-
|
|
63
|
-
});
|
|
62
|
+
ref: ref
|
|
63
|
+
}, other));
|
|
64
64
|
});
|
|
65
65
|
process.env.NODE_ENV !== "production" ? TimelineContent.propTypes /* remove-proptypes */ = {
|
|
66
66
|
// ----------------------------- Warning --------------------------------
|