@mui/lab 5.0.0-alpha.128 → 5.0.0-alpha.130
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 +244 -0
- package/LoadingButton/LoadingButton.js +74 -62
- package/Masonry/Masonry.js +34 -29
- 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 +6 -8
- package/TabPanel/TabPanel.js +12 -13
- package/Timeline/Timeline.js +14 -12
- package/TimelineConnector/TimelineConnector.js +7 -9
- package/TimelineContent/TimelineContent.js +15 -15
- package/TimelineDot/TimelineDot.js +38 -31
- package/TimelineItem/TimelineItem.js +33 -31
- package/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
- package/TimelineSeparator/TimelineSeparator.js +7 -9
- package/ToggleButton/ToggleButton.js +4 -4
- package/ToggleButtonGroup/ToggleButtonGroup.js +4 -4
- package/TreeItem/TreeItem.js +37 -37
- package/TreeItem/TreeItemContent.js +15 -18
- package/TreeView/TreeView.js +35 -33
- package/TreeView/descendants.js +13 -14
- package/index.js +1 -1
- package/legacy/Alert/Alert.js +4 -2
- package/legacy/AlertTitle/AlertTitle.js +4 -2
- package/legacy/Autocomplete/Autocomplete.js +4 -2
- package/legacy/AvatarGroup/AvatarGroup.js +4 -2
- package/legacy/LoadingButton/LoadingButton.js +16 -15
- package/legacy/Masonry/Masonry.js +10 -8
- package/legacy/Pagination/Pagination.js +4 -2
- package/legacy/PaginationItem/PaginationItem.js +4 -2
- package/legacy/Rating/Rating.js +4 -2
- package/legacy/Skeleton/Skeleton.js +4 -2
- package/legacy/SpeedDial/SpeedDial.js +4 -2
- package/legacy/SpeedDialAction/SpeedDialAction.js +4 -2
- package/legacy/SpeedDialIcon/SpeedDialIcon.js +4 -2
- package/legacy/TabList/TabList.js +4 -2
- package/legacy/TabPanel/TabPanel.js +6 -4
- package/legacy/Timeline/Timeline.js +8 -3
- package/legacy/TimelineConnector/TimelineConnector.js +4 -2
- package/legacy/TimelineContent/TimelineContent.js +6 -4
- package/legacy/TimelineDot/TimelineDot.js +10 -8
- package/legacy/TimelineItem/TimelineItem.js +7 -6
- package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +6 -4
- package/legacy/TimelineSeparator/TimelineSeparator.js +4 -2
- package/legacy/ToggleButton/ToggleButton.js +4 -2
- package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +4 -2
- package/legacy/TreeItem/TreeItem.js +9 -8
- package/legacy/TreeItem/TreeItemContent.js +5 -3
- package/legacy/TreeView/TreeView.js +8 -6
- package/legacy/TreeView/descendants.js +6 -4
- 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 +74 -62
- package/modern/Masonry/Masonry.js +34 -29
- 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 +6 -8
- package/modern/TabPanel/TabPanel.js +12 -13
- package/modern/Timeline/Timeline.js +14 -12
- package/modern/TimelineConnector/TimelineConnector.js +7 -9
- package/modern/TimelineContent/TimelineContent.js +15 -15
- package/modern/TimelineDot/TimelineDot.js +38 -31
- package/modern/TimelineItem/TimelineItem.js +33 -31
- package/modern/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
- package/modern/TimelineSeparator/TimelineSeparator.js +7 -9
- 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 +15 -18
- package/modern/TreeView/TreeView.js +35 -33
- package/modern/TreeView/descendants.js +13 -14
- 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 +74 -62
- package/node/Masonry/Masonry.js +34 -29
- 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/TabContext/TabContext.js +1 -2
- package/node/TabList/TabList.js +6 -8
- package/node/TabPanel/TabPanel.js +12 -13
- package/node/Timeline/Timeline.js +13 -12
- package/node/TimelineConnector/TimelineConnector.js +7 -9
- package/node/TimelineContent/TimelineContent.js +15 -15
- package/node/TimelineDot/TimelineDot.js +38 -31
- package/node/TimelineItem/TimelineItem.js +33 -31
- package/node/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
- package/node/TimelineSeparator/TimelineSeparator.js +7 -9
- 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 +16 -20
- package/node/TreeView/TreeView.js +35 -33
- package/node/TreeView/descendants.js +13 -14
- package/node/index.js +1 -1
- package/package.json +4 -4
package/TreeItem/TreeItem.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "className", "collapseIcon", "ContentComponent", "ContentProps", "endIcon", "expandIcon", "disabled", "icon", "id", "label", "nodeId", "onClick", "onMouseDown", "TransitionComponent", "TransitionProps"];
|
|
4
1
|
import * as React from 'react';
|
|
5
2
|
import clsx from 'clsx';
|
|
6
3
|
import PropTypes from 'prop-types';
|
|
@@ -98,13 +95,14 @@ const StyledTreeItemContent = styled(TreeItemContent, {
|
|
|
98
95
|
fontSize: 18
|
|
99
96
|
}
|
|
100
97
|
},
|
|
101
|
-
[`& .${treeItemClasses.label}`]:
|
|
98
|
+
[`& .${treeItemClasses.label}`]: {
|
|
102
99
|
width: '100%',
|
|
103
100
|
// fixes overflow - see https://github.com/mui/material-ui/issues/27372
|
|
104
101
|
minWidth: 0,
|
|
105
102
|
paddingLeft: 4,
|
|
106
|
-
position: 'relative'
|
|
107
|
-
|
|
103
|
+
position: 'relative',
|
|
104
|
+
...theme.typography.body1
|
|
105
|
+
}
|
|
108
106
|
}));
|
|
109
107
|
const TreeItemGroup = styled(Collapse, {
|
|
110
108
|
name: 'MuiTreeItem',
|
|
@@ -121,24 +119,24 @@ const TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
121
119
|
name: 'MuiTreeItem'
|
|
122
120
|
});
|
|
123
121
|
const {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
122
|
+
children,
|
|
123
|
+
className,
|
|
124
|
+
collapseIcon,
|
|
125
|
+
ContentComponent = TreeItemContent,
|
|
126
|
+
ContentProps,
|
|
127
|
+
endIcon,
|
|
128
|
+
expandIcon,
|
|
129
|
+
disabled: disabledProp,
|
|
130
|
+
icon,
|
|
131
|
+
id: idProp,
|
|
132
|
+
label,
|
|
133
|
+
nodeId,
|
|
134
|
+
onClick,
|
|
135
|
+
onMouseDown,
|
|
136
|
+
TransitionComponent = Collapse,
|
|
137
|
+
TransitionProps,
|
|
138
|
+
...other
|
|
139
|
+
} = props;
|
|
142
140
|
const {
|
|
143
141
|
icons: contextIcons = {},
|
|
144
142
|
focus,
|
|
@@ -176,12 +174,13 @@ const TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
176
174
|
const focused = isFocused ? isFocused(nodeId) : false;
|
|
177
175
|
const selected = isSelected ? isSelected(nodeId) : false;
|
|
178
176
|
const disabled = isDisabled ? isDisabled(nodeId) : false;
|
|
179
|
-
const ownerState =
|
|
177
|
+
const ownerState = {
|
|
178
|
+
...props,
|
|
180
179
|
expanded,
|
|
181
180
|
focused,
|
|
182
181
|
selected,
|
|
183
182
|
disabled
|
|
184
|
-
}
|
|
183
|
+
};
|
|
185
184
|
const classes = useUtilityClasses(ownerState);
|
|
186
185
|
let displayIcon;
|
|
187
186
|
let expansionIcon;
|
|
@@ -253,7 +252,7 @@ const TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
253
252
|
focus(event, nodeId);
|
|
254
253
|
}
|
|
255
254
|
}
|
|
256
|
-
return /*#__PURE__*/_jsxs(TreeItemRoot,
|
|
255
|
+
return /*#__PURE__*/_jsxs(TreeItemRoot, {
|
|
257
256
|
className: clsx(classes.root, className),
|
|
258
257
|
role: "treeitem",
|
|
259
258
|
"aria-expanded": expandable ? expanded : null,
|
|
@@ -261,11 +260,11 @@ const TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
261
260
|
"aria-disabled": disabled || null,
|
|
262
261
|
ref: handleRef,
|
|
263
262
|
id: id,
|
|
264
|
-
tabIndex: -1
|
|
265
|
-
|
|
263
|
+
tabIndex: -1,
|
|
264
|
+
...other,
|
|
266
265
|
ownerState: ownerState,
|
|
267
266
|
onFocus: handleFocus,
|
|
268
|
-
children: [/*#__PURE__*/_jsx(StyledTreeItemContent,
|
|
267
|
+
children: [/*#__PURE__*/_jsx(StyledTreeItemContent, {
|
|
269
268
|
as: ContentComponent,
|
|
270
269
|
ref: contentRef,
|
|
271
270
|
classes: {
|
|
@@ -284,21 +283,22 @@ const TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
284
283
|
icon: icon,
|
|
285
284
|
expansionIcon: expansionIcon,
|
|
286
285
|
displayIcon: displayIcon,
|
|
287
|
-
ownerState: ownerState
|
|
288
|
-
|
|
286
|
+
ownerState: ownerState,
|
|
287
|
+
...ContentProps
|
|
288
|
+
}), children && /*#__PURE__*/_jsx(DescendantProvider, {
|
|
289
289
|
id: nodeId,
|
|
290
|
-
children: /*#__PURE__*/_jsx(TreeItemGroup,
|
|
290
|
+
children: /*#__PURE__*/_jsx(TreeItemGroup, {
|
|
291
291
|
as: TransitionComponent,
|
|
292
292
|
unmountOnExit: true,
|
|
293
293
|
className: classes.group,
|
|
294
294
|
in: expanded,
|
|
295
295
|
component: "ul",
|
|
296
|
-
role: "group"
|
|
297
|
-
|
|
296
|
+
role: "group",
|
|
297
|
+
...TransitionProps,
|
|
298
298
|
children: children
|
|
299
|
-
})
|
|
299
|
+
})
|
|
300
300
|
})]
|
|
301
|
-
})
|
|
301
|
+
});
|
|
302
302
|
});
|
|
303
303
|
process.env.NODE_ENV !== "production" ? TreeItem.propTypes /* remove-proptypes */ = {
|
|
304
304
|
// ----------------------------- Warning --------------------------------
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["classes", "className", "displayIcon", "expansionIcon", "icon", "label", "nodeId", "onClick", "onMouseDown"];
|
|
4
1
|
import * as React from 'react';
|
|
5
2
|
import clsx from 'clsx';
|
|
6
3
|
import PropTypes from 'prop-types';
|
|
@@ -13,17 +10,17 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
11
|
const TreeItemContent = /*#__PURE__*/React.forwardRef(function TreeItemContent(props, ref) {
|
|
15
12
|
const {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
classes,
|
|
14
|
+
className,
|
|
15
|
+
displayIcon,
|
|
16
|
+
expansionIcon,
|
|
17
|
+
icon: iconProp,
|
|
18
|
+
label,
|
|
19
|
+
nodeId,
|
|
20
|
+
onClick,
|
|
21
|
+
onMouseDown,
|
|
22
|
+
...other
|
|
23
|
+
} = props;
|
|
27
24
|
const {
|
|
28
25
|
disabled,
|
|
29
26
|
expanded,
|
|
@@ -50,12 +47,12 @@ const TreeItemContent = /*#__PURE__*/React.forwardRef(function TreeItemContent(p
|
|
|
50
47
|
return (
|
|
51
48
|
/*#__PURE__*/
|
|
52
49
|
/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
|
|
53
|
-
_jsxs("div",
|
|
50
|
+
_jsxs("div", {
|
|
54
51
|
className: clsx(className, classes.root, expanded && classes.expanded, selected && classes.selected, focused && classes.focused, disabled && classes.disabled),
|
|
55
52
|
onClick: handleClick,
|
|
56
53
|
onMouseDown: handleMouseDown,
|
|
57
|
-
ref: ref
|
|
58
|
-
|
|
54
|
+
ref: ref,
|
|
55
|
+
...other,
|
|
59
56
|
children: [/*#__PURE__*/_jsx("div", {
|
|
60
57
|
className: classes.iconContainer,
|
|
61
58
|
children: icon
|
|
@@ -63,7 +60,7 @@ const TreeItemContent = /*#__PURE__*/React.forwardRef(function TreeItemContent(p
|
|
|
63
60
|
className: classes.label,
|
|
64
61
|
children: label
|
|
65
62
|
})]
|
|
66
|
-
})
|
|
63
|
+
})
|
|
67
64
|
);
|
|
68
65
|
});
|
|
69
66
|
process.env.NODE_ENV !== "production" ? TreeItemContent.propTypes = {
|
package/TreeView/TreeView.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["children", "className", "defaultCollapseIcon", "defaultEndIcon", "defaultExpanded", "defaultExpandIcon", "defaultParentIcon", "defaultSelected", "disabledItemsFocusable", "disableSelection", "expanded", "id", "multiSelect", "onBlur", "onFocus", "onKeyDown", "onNodeFocus", "onNodeSelect", "onNodeToggle", "selected"];
|
|
4
1
|
import * as React from 'react';
|
|
5
2
|
import clsx from 'clsx';
|
|
6
3
|
import PropTypes from 'prop-types';
|
|
@@ -52,37 +49,38 @@ const TreeView = /*#__PURE__*/React.forwardRef(function TreeView(inProps, ref) {
|
|
|
52
49
|
name: 'MuiTreeView'
|
|
53
50
|
});
|
|
54
51
|
const {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
52
|
+
children,
|
|
53
|
+
className,
|
|
54
|
+
defaultCollapseIcon,
|
|
55
|
+
defaultEndIcon,
|
|
56
|
+
defaultExpanded = defaultDefaultExpanded,
|
|
57
|
+
defaultExpandIcon,
|
|
58
|
+
defaultParentIcon,
|
|
59
|
+
defaultSelected = defaultDefaultSelected,
|
|
60
|
+
disabledItemsFocusable = false,
|
|
61
|
+
disableSelection = false,
|
|
62
|
+
expanded: expandedProp,
|
|
63
|
+
id: idProp,
|
|
64
|
+
multiSelect = false,
|
|
65
|
+
onBlur,
|
|
66
|
+
onFocus,
|
|
67
|
+
onKeyDown,
|
|
68
|
+
onNodeFocus,
|
|
69
|
+
onNodeSelect,
|
|
70
|
+
onNodeToggle,
|
|
71
|
+
selected: selectedProp,
|
|
72
|
+
...other
|
|
73
|
+
} = props;
|
|
77
74
|
const theme = useTheme();
|
|
78
75
|
const isRtl = theme.direction === 'rtl';
|
|
79
|
-
const ownerState =
|
|
76
|
+
const ownerState = {
|
|
77
|
+
...props,
|
|
80
78
|
defaultExpanded,
|
|
81
79
|
defaultSelected,
|
|
82
80
|
disabledItemsFocusable,
|
|
83
81
|
disableSelection,
|
|
84
82
|
multiSelect
|
|
85
|
-
}
|
|
83
|
+
};
|
|
86
84
|
const classes = useUtilityClasses(ownerState);
|
|
87
85
|
const treeId = useId(idProp);
|
|
88
86
|
const treeRef = React.useRef(null);
|
|
@@ -515,7 +513,9 @@ const TreeView = /*#__PURE__*/React.forwardRef(function TreeView(inProps, ref) {
|
|
|
515
513
|
};
|
|
516
514
|
}, []);
|
|
517
515
|
const unregisterNode = React.useCallback(id => {
|
|
518
|
-
const newMap =
|
|
516
|
+
const newMap = {
|
|
517
|
+
...nodeMap.current
|
|
518
|
+
};
|
|
519
519
|
delete newMap[id];
|
|
520
520
|
nodeMap.current = newMap;
|
|
521
521
|
setFocusedNodeId(oldFocusedNodeId => {
|
|
@@ -529,7 +529,9 @@ const TreeView = /*#__PURE__*/React.forwardRef(function TreeView(inProps, ref) {
|
|
|
529
529
|
firstCharMap.current[id] = firstChar;
|
|
530
530
|
}, []);
|
|
531
531
|
const unMapFirstChar = React.useCallback(id => {
|
|
532
|
-
const newMap =
|
|
532
|
+
const newMap = {
|
|
533
|
+
...firstCharMap.current
|
|
534
|
+
};
|
|
533
535
|
delete newMap[id];
|
|
534
536
|
firstCharMap.current = newMap;
|
|
535
537
|
}, []);
|
|
@@ -705,7 +707,7 @@ const TreeView = /*#__PURE__*/React.forwardRef(function TreeView(inProps, ref) {
|
|
|
705
707
|
treeId
|
|
706
708
|
},
|
|
707
709
|
children: /*#__PURE__*/_jsx(DescendantProvider, {
|
|
708
|
-
children: /*#__PURE__*/_jsx(TreeViewRoot,
|
|
710
|
+
children: /*#__PURE__*/_jsx(TreeViewRoot, {
|
|
709
711
|
role: "tree",
|
|
710
712
|
id: treeId,
|
|
711
713
|
"aria-activedescendant": activeDescendant,
|
|
@@ -716,10 +718,10 @@ const TreeView = /*#__PURE__*/React.forwardRef(function TreeView(inProps, ref) {
|
|
|
716
718
|
onKeyDown: handleKeyDown,
|
|
717
719
|
onFocus: handleFocus,
|
|
718
720
|
onBlur: handleBlur,
|
|
719
|
-
ownerState: ownerState
|
|
720
|
-
|
|
721
|
+
ownerState: ownerState,
|
|
722
|
+
...other,
|
|
721
723
|
children: children
|
|
722
|
-
})
|
|
724
|
+
})
|
|
723
725
|
})
|
|
724
726
|
});
|
|
725
727
|
});
|
package/TreeView/descendants.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["element"];
|
|
4
1
|
import * as React from 'react';
|
|
5
2
|
import PropTypes from 'prop-types';
|
|
6
3
|
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
|
|
@@ -98,9 +95,10 @@ export function useDescendant(descendant) {
|
|
|
98
95
|
// Prevent any flashing
|
|
99
96
|
useEnhancedEffect(() => {
|
|
100
97
|
if (descendant.element) {
|
|
101
|
-
registerDescendant(
|
|
98
|
+
registerDescendant({
|
|
99
|
+
...descendant,
|
|
102
100
|
index
|
|
103
|
-
})
|
|
101
|
+
});
|
|
104
102
|
return () => {
|
|
105
103
|
unregisterDescendant(descendant.element);
|
|
106
104
|
};
|
|
@@ -119,19 +117,19 @@ export function DescendantProvider(props) {
|
|
|
119
117
|
id
|
|
120
118
|
} = props;
|
|
121
119
|
const [items, set] = React.useState([]);
|
|
122
|
-
const registerDescendant = React.useCallback(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
other = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
120
|
+
const registerDescendant = React.useCallback(({
|
|
121
|
+
element,
|
|
122
|
+
...other
|
|
123
|
+
}) => {
|
|
127
124
|
set(oldItems => {
|
|
128
125
|
let newItems;
|
|
129
126
|
if (oldItems.length === 0) {
|
|
130
127
|
// If there are no items, register at index 0 and bail.
|
|
131
|
-
return [
|
|
128
|
+
return [{
|
|
129
|
+
...other,
|
|
132
130
|
element,
|
|
133
131
|
index: 0
|
|
134
|
-
}
|
|
132
|
+
}];
|
|
135
133
|
}
|
|
136
134
|
const index = binaryFindElement(oldItems, element);
|
|
137
135
|
if (oldItems[index] && oldItems[index].element === element) {
|
|
@@ -151,10 +149,11 @@ export function DescendantProvider(props) {
|
|
|
151
149
|
// we should be sure that this index is accurate when descendent
|
|
152
150
|
// elements come or go from our component.
|
|
153
151
|
|
|
154
|
-
const newItem =
|
|
152
|
+
const newItem = {
|
|
153
|
+
...other,
|
|
155
154
|
element,
|
|
156
155
|
index
|
|
157
|
-
}
|
|
156
|
+
};
|
|
158
157
|
|
|
159
158
|
// If an index is not found we will push the element to the end.
|
|
160
159
|
newItems = oldItems.slice();
|
package/index.js
CHANGED
package/legacy/Alert/Alert.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import Alert from '@mui/material/Alert';
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +14,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedAlert(props, ref
|
|
|
12
14
|
console.warn(['MUI: The Alert component was moved from the lab to the core.', '', "You should use `import { Alert } from '@mui/material'`", "or `import Alert from '@mui/material/Alert'`"].join('\n'));
|
|
13
15
|
warnedOnce = true;
|
|
14
16
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(Alert,
|
|
17
|
+
return /*#__PURE__*/_jsx(Alert, _objectSpread({
|
|
16
18
|
ref: ref
|
|
17
19
|
}, props));
|
|
18
20
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import AlertTitle from '@mui/material/AlertTitle';
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +14,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedAlertTitle(props
|
|
|
12
14
|
console.warn(['MUI: The AlertTitle component was moved from the lab to the core.', '', "You should use `import { AlertTitle } from '@mui/material'`", "or `import AlertTitle from '@mui/material/AlertTitle'`"].join('\n'));
|
|
13
15
|
warnedOnce = true;
|
|
14
16
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(AlertTitle,
|
|
17
|
+
return /*#__PURE__*/_jsx(AlertTitle, _objectSpread({
|
|
16
18
|
ref: ref
|
|
17
19
|
}, props));
|
|
18
20
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import Autocomplete from '@mui/material/Autocomplete';
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +14,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedAutocomplete(pro
|
|
|
12
14
|
console.warn(['MUI: The Autocomplete component was moved from the lab to the core.', '', "You should use `import { Autocomplete } from '@mui/material'`", "or `import Autocomplete from '@mui/material/Autocomplete'`"].join('\n'));
|
|
13
15
|
warnedOnce = true;
|
|
14
16
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(Autocomplete,
|
|
17
|
+
return /*#__PURE__*/_jsx(Autocomplete, _objectSpread({
|
|
16
18
|
ref: ref
|
|
17
19
|
}, props));
|
|
18
20
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import AvatarGroup from '@mui/material/AvatarGroup';
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +14,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedAvatarGroup(prop
|
|
|
12
14
|
console.warn(['MUI: The AvatarGroup component was moved from the lab to the core.', '', "You should use `import { AvatarGroup } from '@mui/material'`", "or `import AvatarGroup from '@mui/material/AvatarGroup'`"].join('\n'));
|
|
13
15
|
warnedOnce = true;
|
|
14
16
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(AvatarGroup,
|
|
17
|
+
return /*#__PURE__*/_jsx(AvatarGroup, _objectSpread({
|
|
16
18
|
ref: ref
|
|
17
19
|
}, props));
|
|
18
20
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
|
|
3
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
4
5
|
import * as React from 'react';
|
|
5
6
|
import PropTypes from 'prop-types';
|
|
6
7
|
import { chainPropTypes } from '@mui/utils';
|
|
@@ -23,7 +24,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
23
24
|
loadingIndicator: ['loadingIndicator', loading && "loadingIndicator".concat(capitalize(loadingPosition))]
|
|
24
25
|
};
|
|
25
26
|
var composedClasses = composeClasses(slots, getLoadingButtonUtilityClass, classes);
|
|
26
|
-
return
|
|
27
|
+
return _objectSpread(_objectSpread({}, classes), composedClasses);
|
|
27
28
|
};
|
|
28
29
|
|
|
29
30
|
// TODO use `import { rootShouldForwardProp } from '../styles/styled';` once move to core
|
|
@@ -42,7 +43,7 @@ var LoadingButtonRoot = styled(Button, {
|
|
|
42
43
|
})(function (_ref3) {
|
|
43
44
|
var ownerState = _ref3.ownerState,
|
|
44
45
|
theme = _ref3.theme;
|
|
45
|
-
return
|
|
46
|
+
return _objectSpread(_objectSpread(_objectSpread(_defineProperty({}, "& .".concat(loadingButtonClasses.startIconLoadingStart, ", & .").concat(loadingButtonClasses.endIconLoadingEnd), {
|
|
46
47
|
transition: theme.transitions.create(['opacity'], {
|
|
47
48
|
duration: theme.transitions.duration.short
|
|
48
49
|
}),
|
|
@@ -53,13 +54,13 @@ var LoadingButtonRoot = styled(Button, {
|
|
|
53
54
|
})
|
|
54
55
|
}, "&.".concat(loadingButtonClasses.loading), {
|
|
55
56
|
color: 'transparent'
|
|
56
|
-
}), ownerState.loadingPosition === 'start' && ownerState.fullWidth && _defineProperty({}, "& .".concat(loadingButtonClasses.startIconLoadingStart, ", & .").concat(loadingButtonClasses.endIconLoadingEnd), {
|
|
57
|
+
})), ownerState.loadingPosition === 'start' && ownerState.fullWidth && _defineProperty({}, "& .".concat(loadingButtonClasses.startIconLoadingStart, ", & .").concat(loadingButtonClasses.endIconLoadingEnd), {
|
|
57
58
|
transition: theme.transitions.create(['opacity'], {
|
|
58
59
|
duration: theme.transitions.duration.short
|
|
59
60
|
}),
|
|
60
61
|
opacity: 0,
|
|
61
62
|
marginRight: -8
|
|
62
|
-
}), ownerState.loadingPosition === 'end' && ownerState.fullWidth && _defineProperty({}, "& .".concat(loadingButtonClasses.startIconLoadingStart, ", & .").concat(loadingButtonClasses.endIconLoadingEnd), {
|
|
63
|
+
})), ownerState.loadingPosition === 'end' && ownerState.fullWidth && _defineProperty({}, "& .".concat(loadingButtonClasses.startIconLoadingStart, ", & .").concat(loadingButtonClasses.endIconLoadingEnd), {
|
|
63
64
|
transition: theme.transitions.create(['opacity'], {
|
|
64
65
|
duration: theme.transitions.duration.short
|
|
65
66
|
}),
|
|
@@ -77,26 +78,26 @@ var LoadingButtonLoadingIndicator = styled('div', {
|
|
|
77
78
|
})(function (_ref7) {
|
|
78
79
|
var theme = _ref7.theme,
|
|
79
80
|
ownerState = _ref7.ownerState;
|
|
80
|
-
return
|
|
81
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
81
82
|
position: 'absolute',
|
|
82
83
|
visibility: 'visible',
|
|
83
84
|
display: 'flex'
|
|
84
85
|
}, ownerState.loadingPosition === 'start' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {
|
|
85
86
|
left: ownerState.size === 'small' ? 10 : 14
|
|
86
|
-
}, ownerState.loadingPosition === 'start' && ownerState.variant === 'text' && {
|
|
87
|
+
}), ownerState.loadingPosition === 'start' && ownerState.variant === 'text' && {
|
|
87
88
|
left: 6
|
|
88
|
-
}, ownerState.loadingPosition === 'center' && {
|
|
89
|
+
}), ownerState.loadingPosition === 'center' && {
|
|
89
90
|
left: '50%',
|
|
90
91
|
transform: 'translate(-50%)',
|
|
91
92
|
color: (theme.vars || theme).palette.action.disabled
|
|
92
|
-
}, ownerState.loadingPosition === 'end' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {
|
|
93
|
+
}), ownerState.loadingPosition === 'end' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {
|
|
93
94
|
right: ownerState.size === 'small' ? 10 : 14
|
|
94
|
-
}, ownerState.loadingPosition === 'end' && ownerState.variant === 'text' && {
|
|
95
|
+
}), ownerState.loadingPosition === 'end' && ownerState.variant === 'text' && {
|
|
95
96
|
right: 6
|
|
96
|
-
}, ownerState.loadingPosition === 'start' && ownerState.fullWidth && {
|
|
97
|
+
}), ownerState.loadingPosition === 'start' && ownerState.fullWidth && {
|
|
97
98
|
position: 'relative',
|
|
98
99
|
left: -10
|
|
99
|
-
}, ownerState.loadingPosition === 'end' && ownerState.fullWidth && {
|
|
100
|
+
}), ownerState.loadingPosition === 'end' && ownerState.fullWidth && {
|
|
100
101
|
position: 'relative',
|
|
101
102
|
right: -10
|
|
102
103
|
});
|
|
@@ -124,7 +125,7 @@ var LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps
|
|
|
124
125
|
color: "inherit",
|
|
125
126
|
size: 16
|
|
126
127
|
});
|
|
127
|
-
var ownerState =
|
|
128
|
+
var ownerState = _objectSpread(_objectSpread({}, props), {}, {
|
|
128
129
|
disabled: disabled,
|
|
129
130
|
loading: loading,
|
|
130
131
|
loadingIndicator: loadingIndicator,
|
|
@@ -137,11 +138,11 @@ var LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps
|
|
|
137
138
|
ownerState: ownerState,
|
|
138
139
|
children: loadingIndicator
|
|
139
140
|
}) : null;
|
|
140
|
-
return /*#__PURE__*/_jsxs(LoadingButtonRoot,
|
|
141
|
+
return /*#__PURE__*/_jsxs(LoadingButtonRoot, _objectSpread(_objectSpread({
|
|
141
142
|
disabled: disabled || loading,
|
|
142
143
|
id: id,
|
|
143
144
|
ref: ref
|
|
144
|
-
}, other, {
|
|
145
|
+
}, other), {}, {
|
|
145
146
|
variant: variant,
|
|
146
147
|
classes: classes,
|
|
147
148
|
ownerState: ownerState,
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
4
|
-
import
|
|
4
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
5
7
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
6
8
|
import * as ReactDOM from 'react-dom';
|
|
7
9
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
@@ -54,11 +56,11 @@ export var getStyle = function getStyle(_ref) {
|
|
|
54
56
|
}
|
|
55
57
|
stylesSSR.height = ownerState.defaultHeight;
|
|
56
58
|
stylesSSR.margin = -(defaultSpacing / 2);
|
|
57
|
-
stylesSSR['& > *'] =
|
|
59
|
+
stylesSSR['& > *'] = _objectSpread(_objectSpread(_objectSpread({}, styles['& > *']), orderStyleSSR), {}, {
|
|
58
60
|
margin: defaultSpacing / 2,
|
|
59
61
|
width: "calc(".concat((100 / ownerState.defaultColumns).toFixed(2), "% - ").concat(defaultSpacing, "px)")
|
|
60
62
|
});
|
|
61
|
-
return
|
|
63
|
+
return _objectSpread(_objectSpread({}, styles), stylesSSR);
|
|
62
64
|
}
|
|
63
65
|
var spacingValues = resolveBreakpointValues({
|
|
64
66
|
values: ownerState.spacing,
|
|
@@ -74,7 +76,7 @@ export var getStyle = function getStyle(_ref) {
|
|
|
74
76
|
} else {
|
|
75
77
|
spacing = propValue;
|
|
76
78
|
}
|
|
77
|
-
return
|
|
79
|
+
return _objectSpread({
|
|
78
80
|
margin: "calc(0px - (".concat(spacing, " / 2))"),
|
|
79
81
|
'& > *': {
|
|
80
82
|
margin: "calc(".concat(spacing, " / 2)")
|
|
@@ -158,7 +160,7 @@ var Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
158
160
|
var _React$useState2 = React.useState(isSSR ? defaultColumns - 1 : 0),
|
|
159
161
|
numberOfLineBreaks = _React$useState2[0],
|
|
160
162
|
setNumberOfLineBreaks = _React$useState2[1];
|
|
161
|
-
var ownerState =
|
|
163
|
+
var ownerState = _objectSpread(_objectSpread({}, props), {}, {
|
|
162
164
|
spacing: spacing,
|
|
163
165
|
columns: columns,
|
|
164
166
|
maxColumnHeight: maxColumnHeight,
|
|
@@ -247,17 +249,17 @@ var Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
247
249
|
var lineBreaks = new Array(numberOfLineBreaks).fill('').map(function (_, index) {
|
|
248
250
|
return /*#__PURE__*/_jsx("span", {
|
|
249
251
|
"data-class": "line-break",
|
|
250
|
-
style:
|
|
252
|
+
style: _objectSpread(_objectSpread({}, lineBreakStyle), {}, {
|
|
251
253
|
order: index + 1
|
|
252
254
|
})
|
|
253
255
|
}, index);
|
|
254
256
|
});
|
|
255
|
-
return /*#__PURE__*/_jsxs(MasonryRoot,
|
|
257
|
+
return /*#__PURE__*/_jsxs(MasonryRoot, _objectSpread(_objectSpread({
|
|
256
258
|
as: component,
|
|
257
259
|
className: clsx(classes.root, className),
|
|
258
260
|
ref: handleRef,
|
|
259
261
|
ownerState: ownerState
|
|
260
|
-
}, other, {
|
|
262
|
+
}, other), {}, {
|
|
261
263
|
children: [children, lineBreaks]
|
|
262
264
|
}));
|
|
263
265
|
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
3
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import Pagination from '@mui/material/Pagination';
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +14,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedPagination(props
|
|
|
12
14
|
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'));
|
|
13
15
|
warnedOnce = true;
|
|
14
16
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(Pagination,
|
|
17
|
+
return /*#__PURE__*/_jsx(Pagination, _objectSpread({
|
|
16
18
|
ref: ref
|
|
17
19
|
}, props));
|
|
18
20
|
});
|