@mui/lab 5.0.0-alpha.129 → 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/AdapterDateFns/AdapterDateFns.d.ts +3 -3
- package/AdapterDateFns/index.d.ts +1 -1
- package/AdapterDayjs/AdapterDayjs.d.ts +3 -3
- package/AdapterDayjs/index.d.ts +1 -1
- package/AdapterLuxon/AdapterLuxon.d.ts +3 -3
- package/AdapterLuxon/index.d.ts +1 -1
- package/AdapterMoment/AdapterMoment.d.ts +3 -3
- package/AdapterMoment/index.d.ts +1 -1
- 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 +124 -0
- package/CalendarPicker/CalendarPicker.d.ts +14 -14
- package/CalendarPicker/index.d.ts +2 -2
- package/CalendarPickerSkeleton/CalendarPickerSkeleton.d.ts +13 -13
- package/CalendarPickerSkeleton/index.d.ts +2 -2
- package/ClockPicker/ClockPicker.d.ts +14 -14
- package/ClockPicker/index.d.ts +2 -2
- package/DatePicker/DatePicker.d.ts +10 -10
- package/DatePicker/index.d.ts +2 -2
- package/DateRangePicker/DateRangePicker.d.ts +11 -11
- package/DateRangePicker/index.d.ts +2 -2
- package/DateRangePickerDay/DateRangePickerDay.d.ts +13 -13
- package/DateRangePickerDay/index.d.ts +2 -2
- package/DateTimePicker/DateTimePicker.d.ts +10 -10
- package/DateTimePicker/index.d.ts +2 -2
- package/DesktopDatePicker/DesktopDatePicker.d.ts +10 -10
- package/DesktopDatePicker/index.d.ts +2 -2
- package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +10 -10
- package/DesktopDateRangePicker/index.d.ts +2 -2
- package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +10 -10
- package/DesktopDateTimePicker/index.d.ts +2 -2
- package/DesktopTimePicker/DesktopTimePicker.d.ts +10 -10
- package/DesktopTimePicker/index.d.ts +2 -2
- package/LoadingButton/LoadingButton.js +74 -62
- package/LoadingButton/loadingButtonClasses.d.ts +22 -22
- package/LocalizationProvider/LocalizationProvider.d.ts +10 -10
- package/LocalizationProvider/index.d.ts +2 -2
- package/Masonry/Masonry.js +34 -29
- package/Masonry/masonryClasses.d.ts +8 -8
- package/MobileDatePicker/MobileDatePicker.d.ts +10 -10
- package/MobileDatePicker/index.d.ts +2 -2
- package/MobileDateRangePicker/MobileDateRangePicker.d.ts +10 -10
- package/MobileDateRangePicker/index.d.ts +2 -2
- package/MobileDateTimePicker/MobileDateTimePicker.d.ts +10 -10
- package/MobileDateTimePicker/index.d.ts +2 -2
- package/MobileTimePicker/MobileTimePicker.d.ts +10 -10
- package/MobileTimePicker/index.d.ts +2 -2
- package/MonthPicker/MonthPicker.d.ts +13 -13
- package/MonthPicker/index.d.ts +2 -2
- package/Pagination/Pagination.js +4 -4
- package/PaginationItem/PaginationItem.js +4 -4
- package/PickersDay/PickersDay.d.ts +13 -13
- package/PickersDay/index.d.ts +2 -2
- 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/StaticDatePicker/StaticDatePicker.d.ts +10 -10
- package/StaticDatePicker/index.d.ts +2 -2
- package/StaticDateRangePicker/StaticDateRangePicker.d.ts +10 -10
- package/StaticDateRangePicker/index.d.ts +2 -2
- package/StaticDateTimePicker/StaticDateTimePicker.d.ts +10 -10
- package/StaticDateTimePicker/index.d.ts +2 -2
- package/StaticTimePicker/StaticTimePicker.d.ts +10 -10
- package/StaticTimePicker/index.d.ts +2 -2
- package/TabList/TabList.js +6 -8
- package/TabPanel/TabPanel.js +12 -13
- package/TabPanel/tabPanelClasses.d.ts +8 -8
- package/TimePicker/TimePicker.d.ts +10 -10
- package/TimePicker/index.d.ts +2 -2
- package/Timeline/Timeline.d.ts +59 -59
- package/Timeline/Timeline.js +11 -12
- package/Timeline/TimelineContext.d.ts +6 -6
- package/Timeline/index.d.ts +5 -5
- package/Timeline/timelineClasses.d.ts +3 -3
- package/TimelineConnector/TimelineConnector.js +7 -9
- package/TimelineConnector/timelineConnectorClasses.d.ts +8 -8
- package/TimelineContent/TimelineContent.js +15 -15
- package/TimelineContent/timelineContentClasses.d.ts +14 -14
- package/TimelineDot/TimelineDot.js +38 -31
- package/TimelineDot/timelineDotClasses.d.ts +24 -24
- package/TimelineItem/TimelineItem.js +33 -31
- package/TimelineItem/timelineItemClasses.d.ts +16 -16
- package/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
- package/TimelineOppositeContent/timelineOppositeContentClasses.d.ts +14 -14
- package/TimelineSeparator/TimelineSeparator.js +7 -9
- package/TimelineSeparator/timelineSeparatorClasses.d.ts +8 -8
- 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/TreeItem/treeItemClasses.d.ts +24 -24
- package/TreeView/TreeView.js +35 -33
- package/TreeView/descendants.js +13 -14
- package/TreeView/treeViewClasses.d.ts +8 -8
- package/YearPicker/YearPicker.d.ts +14 -14
- package/YearPicker/index.d.ts +2 -2
- package/index.js +1 -1
- package/internal/svg-icons/ArrowDropDown.d.ts +7 -7
- package/internal/svg-icons/ArrowLeft.d.ts +7 -7
- package/internal/svg-icons/ArrowRight.d.ts +7 -7
- package/internal/svg-icons/Calendar.d.ts +7 -7
- package/internal/svg-icons/Clock.d.ts +7 -7
- package/internal/svg-icons/DateRange.d.ts +7 -7
- package/internal/svg-icons/Pen.d.ts +7 -7
- package/internal/svg-icons/Time.d.ts +7 -7
- 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 +5 -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 +11 -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/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 +18 -22
- package/node/TreeView/TreeView.js +35 -33
- package/node/TreeView/descendants.js +16 -16
- package/node/index.js +1 -1
- package/package.json +4 -4
|
@@ -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 ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
|
|
4
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +14,7 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedToggleButtonGrou
|
|
|
12
14
|
console.warn(['MUI: The ToggleButtonGroup component was moved from the lab to the core.', '', "You should use `import { ToggleButtonGroup } from '@mui/material'`", "or `import ToggleButtonGroup from '@mui/material/ToggleButtonGroup'`"].join('\n'));
|
|
13
15
|
warnedOnce = true;
|
|
14
16
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(ToggleButtonGroup,
|
|
17
|
+
return /*#__PURE__*/_jsx(ToggleButtonGroup, _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
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
2
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
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 clsx from 'clsx';
|
|
6
7
|
import PropTypes from 'prop-types';
|
|
@@ -90,7 +91,7 @@ var StyledTreeItemContent = styled(TreeItemContent, {
|
|
|
90
91
|
'& svg': {
|
|
91
92
|
fontSize: 18
|
|
92
93
|
}
|
|
93
|
-
}), _defineProperty(_ref4, "& .".concat(treeItemClasses.label),
|
|
94
|
+
}), _defineProperty(_ref4, "& .".concat(treeItemClasses.label), _objectSpread({
|
|
94
95
|
width: '100%',
|
|
95
96
|
// fixes overflow - see https://github.com/mui/material-ui/issues/27372
|
|
96
97
|
minWidth: 0,
|
|
@@ -173,7 +174,7 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
173
174
|
var focused = isFocused ? isFocused(nodeId) : false;
|
|
174
175
|
var selected = isSelected ? isSelected(nodeId) : false;
|
|
175
176
|
var disabled = isDisabled ? isDisabled(nodeId) : false;
|
|
176
|
-
var ownerState =
|
|
177
|
+
var ownerState = _objectSpread(_objectSpread({}, props), {}, {
|
|
177
178
|
expanded: expanded,
|
|
178
179
|
focused: focused,
|
|
179
180
|
selected: selected,
|
|
@@ -250,7 +251,7 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
250
251
|
focus(event, nodeId);
|
|
251
252
|
}
|
|
252
253
|
}
|
|
253
|
-
return /*#__PURE__*/_jsxs(TreeItemRoot,
|
|
254
|
+
return /*#__PURE__*/_jsxs(TreeItemRoot, _objectSpread(_objectSpread({
|
|
254
255
|
className: clsx(classes.root, className),
|
|
255
256
|
role: "treeitem",
|
|
256
257
|
"aria-expanded": expandable ? expanded : null,
|
|
@@ -259,10 +260,10 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
259
260
|
ref: handleRef,
|
|
260
261
|
id: id,
|
|
261
262
|
tabIndex: -1
|
|
262
|
-
}, other, {
|
|
263
|
+
}, other), {}, {
|
|
263
264
|
ownerState: ownerState,
|
|
264
265
|
onFocus: handleFocus,
|
|
265
|
-
children: [/*#__PURE__*/_jsx(StyledTreeItemContent,
|
|
266
|
+
children: [/*#__PURE__*/_jsx(StyledTreeItemContent, _objectSpread({
|
|
266
267
|
as: ContentComponent,
|
|
267
268
|
ref: contentRef,
|
|
268
269
|
classes: {
|
|
@@ -284,14 +285,14 @@ var TreeItem = /*#__PURE__*/React.forwardRef(function TreeItem(inProps, ref) {
|
|
|
284
285
|
ownerState: ownerState
|
|
285
286
|
}, ContentProps)), children && /*#__PURE__*/_jsx(DescendantProvider, {
|
|
286
287
|
id: nodeId,
|
|
287
|
-
children: /*#__PURE__*/_jsx(TreeItemGroup,
|
|
288
|
+
children: /*#__PURE__*/_jsx(TreeItemGroup, _objectSpread(_objectSpread({
|
|
288
289
|
as: TransitionComponent,
|
|
289
290
|
unmountOnExit: true,
|
|
290
291
|
className: classes.group,
|
|
291
292
|
in: expanded,
|
|
292
293
|
component: "ul",
|
|
293
294
|
role: "group"
|
|
294
|
-
}, TransitionProps, {
|
|
295
|
+
}, TransitionProps), {}, {
|
|
295
296
|
children: children
|
|
296
297
|
}))
|
|
297
298
|
})]
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
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; }
|
|
3
5
|
import * as React from 'react';
|
|
4
6
|
import clsx from 'clsx';
|
|
5
7
|
import PropTypes from 'prop-types';
|
|
@@ -46,12 +48,12 @@ var TreeItemContent = /*#__PURE__*/React.forwardRef(function TreeItemContent(pro
|
|
|
46
48
|
return (
|
|
47
49
|
/*#__PURE__*/
|
|
48
50
|
/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions -- Key event is handled by the TreeView */
|
|
49
|
-
_jsxs("div",
|
|
51
|
+
_jsxs("div", _objectSpread(_objectSpread({
|
|
50
52
|
className: clsx(className, classes.root, expanded && classes.expanded, selected && classes.selected, focused && classes.focused, disabled && classes.disabled),
|
|
51
53
|
onClick: handleClick,
|
|
52
54
|
onMouseDown: handleMouseDown,
|
|
53
55
|
ref: ref
|
|
54
|
-
}, other, {
|
|
56
|
+
}, other), {}, {
|
|
55
57
|
children: [/*#__PURE__*/_jsx("div", {
|
|
56
58
|
className: classes.iconContainer,
|
|
57
59
|
children: icon
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
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; }
|
|
5
|
+
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
6
|
import * as React from 'react';
|
|
5
7
|
import clsx from 'clsx';
|
|
6
8
|
import PropTypes from 'prop-types';
|
|
@@ -79,7 +81,7 @@ var TreeView = /*#__PURE__*/React.forwardRef(function TreeView(inProps, ref) {
|
|
|
79
81
|
other = _objectWithoutProperties(props, ["children", "className", "defaultCollapseIcon", "defaultEndIcon", "defaultExpanded", "defaultExpandIcon", "defaultParentIcon", "defaultSelected", "disabledItemsFocusable", "disableSelection", "expanded", "id", "multiSelect", "onBlur", "onFocus", "onKeyDown", "onNodeFocus", "onNodeSelect", "onNodeToggle", "selected"]);
|
|
80
82
|
var theme = useTheme();
|
|
81
83
|
var isRtl = theme.direction === 'rtl';
|
|
82
|
-
var ownerState =
|
|
84
|
+
var ownerState = _objectSpread(_objectSpread({}, props), {}, {
|
|
83
85
|
defaultExpanded: defaultExpanded,
|
|
84
86
|
defaultSelected: defaultSelected,
|
|
85
87
|
disabledItemsFocusable: disabledItemsFocusable,
|
|
@@ -569,7 +571,7 @@ var TreeView = /*#__PURE__*/React.forwardRef(function TreeView(inProps, ref) {
|
|
|
569
571
|
};
|
|
570
572
|
}, []);
|
|
571
573
|
var unregisterNode = React.useCallback(function (id) {
|
|
572
|
-
var newMap =
|
|
574
|
+
var newMap = _objectSpread({}, nodeMap.current);
|
|
573
575
|
delete newMap[id];
|
|
574
576
|
nodeMap.current = newMap;
|
|
575
577
|
setFocusedNodeId(function (oldFocusedNodeId) {
|
|
@@ -583,7 +585,7 @@ var TreeView = /*#__PURE__*/React.forwardRef(function TreeView(inProps, ref) {
|
|
|
583
585
|
firstCharMap.current[id] = firstChar;
|
|
584
586
|
}, []);
|
|
585
587
|
var unMapFirstChar = React.useCallback(function (id) {
|
|
586
|
-
var newMap =
|
|
588
|
+
var newMap = _objectSpread({}, firstCharMap.current);
|
|
587
589
|
delete newMap[id];
|
|
588
590
|
firstCharMap.current = newMap;
|
|
589
591
|
}, []);
|
|
@@ -759,7 +761,7 @@ var TreeView = /*#__PURE__*/React.forwardRef(function TreeView(inProps, ref) {
|
|
|
759
761
|
treeId: treeId
|
|
760
762
|
},
|
|
761
763
|
children: /*#__PURE__*/_jsx(DescendantProvider, {
|
|
762
|
-
children: /*#__PURE__*/_jsx(TreeViewRoot,
|
|
764
|
+
children: /*#__PURE__*/_jsx(TreeViewRoot, _objectSpread(_objectSpread({
|
|
763
765
|
role: "tree",
|
|
764
766
|
id: treeId,
|
|
765
767
|
"aria-activedescendant": activeDescendant,
|
|
@@ -771,7 +773,7 @@ var TreeView = /*#__PURE__*/React.forwardRef(function TreeView(inProps, ref) {
|
|
|
771
773
|
onFocus: handleFocus,
|
|
772
774
|
onBlur: handleBlur,
|
|
773
775
|
ownerState: ownerState
|
|
774
|
-
}, other, {
|
|
776
|
+
}, other), {}, {
|
|
775
777
|
children: children
|
|
776
778
|
}))
|
|
777
779
|
})
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
2
|
-
import
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
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; }
|
|
3
5
|
import * as React from 'react';
|
|
4
6
|
import PropTypes from 'prop-types';
|
|
5
7
|
import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
|
|
@@ -101,7 +103,7 @@ export function useDescendant(descendant) {
|
|
|
101
103
|
// Prevent any flashing
|
|
102
104
|
useEnhancedEffect(function () {
|
|
103
105
|
if (descendant.element) {
|
|
104
|
-
registerDescendant(
|
|
106
|
+
registerDescendant(_objectSpread(_objectSpread({}, descendant), {}, {
|
|
105
107
|
index: index
|
|
106
108
|
}));
|
|
107
109
|
return function () {
|
|
@@ -129,7 +131,7 @@ export function DescendantProvider(props) {
|
|
|
129
131
|
var newItems;
|
|
130
132
|
if (oldItems.length === 0) {
|
|
131
133
|
// If there are no items, register at index 0 and bail.
|
|
132
|
-
return [
|
|
134
|
+
return [_objectSpread(_objectSpread({}, other), {}, {
|
|
133
135
|
element: element,
|
|
134
136
|
index: 0
|
|
135
137
|
})];
|
|
@@ -152,7 +154,7 @@ export function DescendantProvider(props) {
|
|
|
152
154
|
// we should be sure that this index is accurate when descendent
|
|
153
155
|
// elements come or go from our component.
|
|
154
156
|
|
|
155
|
-
var newItem =
|
|
157
|
+
var newItem = _objectSpread(_objectSpread({}, other), {}, {
|
|
156
158
|
element: element,
|
|
157
159
|
index: index
|
|
158
160
|
});
|
package/legacy/index.js
CHANGED
package/modern/Alert/Alert.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import Alert from '@mui/material/Alert';
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +11,8 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedAlert(props, ref
|
|
|
12
11
|
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
12
|
warnedOnce = true;
|
|
14
13
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(Alert,
|
|
16
|
-
ref: ref
|
|
17
|
-
|
|
14
|
+
return /*#__PURE__*/_jsx(Alert, {
|
|
15
|
+
ref: ref,
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
18
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import AlertTitle from '@mui/material/AlertTitle';
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +11,8 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedAlertTitle(props
|
|
|
12
11
|
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
12
|
warnedOnce = true;
|
|
14
13
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(AlertTitle,
|
|
16
|
-
ref: ref
|
|
17
|
-
|
|
14
|
+
return /*#__PURE__*/_jsx(AlertTitle, {
|
|
15
|
+
ref: ref,
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
18
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import Autocomplete from '@mui/material/Autocomplete';
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +11,8 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedAutocomplete(pro
|
|
|
12
11
|
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
12
|
warnedOnce = true;
|
|
14
13
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(Autocomplete,
|
|
16
|
-
ref: ref
|
|
17
|
-
|
|
14
|
+
return /*#__PURE__*/_jsx(Autocomplete, {
|
|
15
|
+
ref: ref,
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
18
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import AvatarGroup from '@mui/material/AvatarGroup';
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +11,8 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedAvatarGroup(prop
|
|
|
12
11
|
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
12
|
warnedOnce = true;
|
|
14
13
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(AvatarGroup,
|
|
16
|
-
ref: ref
|
|
17
|
-
|
|
14
|
+
return /*#__PURE__*/_jsx(AvatarGroup, {
|
|
15
|
+
ref: ref,
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
18
|
});
|
|
@@ -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", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"];
|
|
4
1
|
import * as React from 'react';
|
|
5
2
|
import PropTypes from 'prop-types';
|
|
6
3
|
import { chainPropTypes } from '@mui/utils';
|
|
@@ -25,7 +22,11 @@ const useUtilityClasses = ownerState => {
|
|
|
25
22
|
loadingIndicator: ['loadingIndicator', loading && `loadingIndicator${capitalize(loadingPosition)}`]
|
|
26
23
|
};
|
|
27
24
|
const composedClasses = composeClasses(slots, getLoadingButtonUtilityClass, classes);
|
|
28
|
-
return
|
|
25
|
+
return {
|
|
26
|
+
...classes,
|
|
27
|
+
// forward the outlined, color, etc. classes to Button
|
|
28
|
+
...composedClasses
|
|
29
|
+
};
|
|
29
30
|
};
|
|
30
31
|
|
|
31
32
|
// TODO use `import { rootShouldForwardProp } from '../styles/styled';` once move to core
|
|
@@ -44,36 +45,39 @@ const LoadingButtonRoot = styled(Button, {
|
|
|
44
45
|
})(({
|
|
45
46
|
ownerState,
|
|
46
47
|
theme
|
|
47
|
-
}) =>
|
|
48
|
+
}) => ({
|
|
48
49
|
[`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {
|
|
49
50
|
transition: theme.transitions.create(['opacity'], {
|
|
50
51
|
duration: theme.transitions.duration.short
|
|
51
52
|
}),
|
|
52
53
|
opacity: 0
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
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'], {
|
|
54
|
+
},
|
|
55
|
+
...(ownerState.loadingPosition === 'center' && {
|
|
56
|
+
transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {
|
|
64
57
|
duration: theme.transitions.duration.short
|
|
65
58
|
}),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
59
|
+
[`&.${loadingButtonClasses.loading}`]: {
|
|
60
|
+
color: 'transparent'
|
|
61
|
+
}
|
|
62
|
+
}),
|
|
63
|
+
...(ownerState.loadingPosition === 'start' && ownerState.fullWidth && {
|
|
64
|
+
[`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {
|
|
65
|
+
transition: theme.transitions.create(['opacity'], {
|
|
66
|
+
duration: theme.transitions.duration.short
|
|
67
|
+
}),
|
|
68
|
+
opacity: 0,
|
|
69
|
+
marginRight: -8
|
|
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
|
+
})
|
|
77
81
|
}));
|
|
78
82
|
const LoadingButtonLoadingIndicator = styled('div', {
|
|
79
83
|
name: 'MuiLoadingButton',
|
|
@@ -87,28 +91,35 @@ const LoadingButtonLoadingIndicator = styled('div', {
|
|
|
87
91
|
})(({
|
|
88
92
|
theme,
|
|
89
93
|
ownerState
|
|
90
|
-
}) =>
|
|
94
|
+
}) => ({
|
|
91
95
|
position: 'absolute',
|
|
92
96
|
visibility: 'visible',
|
|
93
|
-
display: 'flex'
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
97
|
+
display: 'flex',
|
|
98
|
+
...(ownerState.loadingPosition === 'start' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {
|
|
99
|
+
left: ownerState.size === 'small' ? 10 : 14
|
|
100
|
+
}),
|
|
101
|
+
...(ownerState.loadingPosition === 'start' && ownerState.variant === 'text' && {
|
|
102
|
+
left: 6
|
|
103
|
+
}),
|
|
104
|
+
...(ownerState.loadingPosition === 'center' && {
|
|
105
|
+
left: '50%',
|
|
106
|
+
transform: 'translate(-50%)',
|
|
107
|
+
color: (theme.vars || theme).palette.action.disabled
|
|
108
|
+
}),
|
|
109
|
+
...(ownerState.loadingPosition === 'end' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {
|
|
110
|
+
right: ownerState.size === 'small' ? 10 : 14
|
|
111
|
+
}),
|
|
112
|
+
...(ownerState.loadingPosition === 'end' && ownerState.variant === 'text' && {
|
|
113
|
+
right: 6
|
|
114
|
+
}),
|
|
115
|
+
...(ownerState.loadingPosition === 'start' && ownerState.fullWidth && {
|
|
116
|
+
position: 'relative',
|
|
117
|
+
left: -10
|
|
118
|
+
}),
|
|
119
|
+
...(ownerState.loadingPosition === 'end' && ownerState.fullWidth && {
|
|
120
|
+
position: 'relative',
|
|
121
|
+
right: -10
|
|
122
|
+
})
|
|
112
123
|
}));
|
|
113
124
|
const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps, ref) {
|
|
114
125
|
const props = useThemeProps({
|
|
@@ -116,44 +127,45 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
|
|
|
116
127
|
name: 'MuiLoadingButton'
|
|
117
128
|
});
|
|
118
129
|
const {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
children,
|
|
131
|
+
disabled = false,
|
|
132
|
+
id: idProp,
|
|
133
|
+
loading = false,
|
|
134
|
+
loadingIndicator: loadingIndicatorProp,
|
|
135
|
+
loadingPosition = 'center',
|
|
136
|
+
variant = 'text',
|
|
137
|
+
...other
|
|
138
|
+
} = props;
|
|
128
139
|
const id = useId(idProp);
|
|
129
140
|
const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, {
|
|
130
141
|
"aria-labelledby": id,
|
|
131
142
|
color: "inherit",
|
|
132
143
|
size: 16
|
|
133
144
|
});
|
|
134
|
-
const ownerState =
|
|
145
|
+
const ownerState = {
|
|
146
|
+
...props,
|
|
135
147
|
disabled,
|
|
136
148
|
loading,
|
|
137
149
|
loadingIndicator,
|
|
138
150
|
loadingPosition,
|
|
139
151
|
variant
|
|
140
|
-
}
|
|
152
|
+
};
|
|
141
153
|
const classes = useUtilityClasses(ownerState);
|
|
142
154
|
const loadingButtonLoadingIndicator = loading ? /*#__PURE__*/_jsx(LoadingButtonLoadingIndicator, {
|
|
143
155
|
className: classes.loadingIndicator,
|
|
144
156
|
ownerState: ownerState,
|
|
145
157
|
children: loadingIndicator
|
|
146
158
|
}) : null;
|
|
147
|
-
return /*#__PURE__*/_jsxs(LoadingButtonRoot,
|
|
159
|
+
return /*#__PURE__*/_jsxs(LoadingButtonRoot, {
|
|
148
160
|
disabled: disabled || loading,
|
|
149
161
|
id: id,
|
|
150
|
-
ref: ref
|
|
151
|
-
|
|
162
|
+
ref: ref,
|
|
163
|
+
...other,
|
|
152
164
|
variant: variant,
|
|
153
165
|
classes: classes,
|
|
154
166
|
ownerState: ownerState,
|
|
155
167
|
children: [ownerState.loadingPosition === 'end' ? children : loadingButtonLoadingIndicator, ownerState.loadingPosition === 'end' ? loadingButtonLoadingIndicator : children]
|
|
156
|
-
})
|
|
168
|
+
});
|
|
157
169
|
});
|
|
158
170
|
process.env.NODE_ENV !== "production" ? LoadingButton.propTypes /* remove-proptypes */ = {
|
|
159
171
|
// ----------------------------- Warning --------------------------------
|
|
@@ -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", "component", "columns", "spacing", "defaultColumns", "defaultHeight", "defaultSpacing"];
|
|
4
1
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
5
2
|
import * as ReactDOM from 'react-dom';
|
|
6
3
|
import { styled, useThemeProps } from '@mui/material/styles';
|
|
@@ -56,11 +53,16 @@ export const getStyle = ({
|
|
|
56
53
|
}
|
|
57
54
|
stylesSSR.height = ownerState.defaultHeight;
|
|
58
55
|
stylesSSR.margin = -(defaultSpacing / 2);
|
|
59
|
-
stylesSSR['& > *'] =
|
|
56
|
+
stylesSSR['& > *'] = {
|
|
57
|
+
...styles['& > *'],
|
|
58
|
+
...orderStyleSSR,
|
|
60
59
|
margin: defaultSpacing / 2,
|
|
61
60
|
width: `calc(${(100 / ownerState.defaultColumns).toFixed(2)}% - ${defaultSpacing}px)`
|
|
62
|
-
}
|
|
63
|
-
return
|
|
61
|
+
};
|
|
62
|
+
return {
|
|
63
|
+
...styles,
|
|
64
|
+
...stylesSSR
|
|
65
|
+
};
|
|
64
66
|
}
|
|
65
67
|
const spacingValues = resolveBreakpointValues({
|
|
66
68
|
values: ownerState.spacing,
|
|
@@ -76,14 +78,15 @@ export const getStyle = ({
|
|
|
76
78
|
} else {
|
|
77
79
|
spacing = propValue;
|
|
78
80
|
}
|
|
79
|
-
return
|
|
81
|
+
return {
|
|
80
82
|
margin: `calc(0px - (${spacing} / 2))`,
|
|
81
83
|
'& > *': {
|
|
82
84
|
margin: `calc(${spacing} / 2)`
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
},
|
|
86
|
+
...(ownerState.maxColumnHeight && {
|
|
87
|
+
height: typeof spacing === 'number' ? Math.ceil(ownerState.maxColumnHeight + parseToNumber(spacing)) : `calc(${ownerState.maxColumnHeight}px + ${spacing})`
|
|
88
|
+
})
|
|
89
|
+
};
|
|
87
90
|
};
|
|
88
91
|
styles = deepmerge(styles, handleBreakpoints({
|
|
89
92
|
theme
|
|
@@ -141,21 +144,22 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
141
144
|
name: 'MuiMasonry'
|
|
142
145
|
});
|
|
143
146
|
const {
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
147
|
+
children,
|
|
148
|
+
className,
|
|
149
|
+
component = 'div',
|
|
150
|
+
columns = 4,
|
|
151
|
+
spacing = 1,
|
|
152
|
+
defaultColumns,
|
|
153
|
+
defaultHeight,
|
|
154
|
+
defaultSpacing,
|
|
155
|
+
...other
|
|
156
|
+
} = props;
|
|
154
157
|
const masonryRef = React.useRef();
|
|
155
158
|
const [maxColumnHeight, setMaxColumnHeight] = React.useState();
|
|
156
159
|
const isSSR = !maxColumnHeight && defaultHeight && defaultColumns !== undefined && defaultSpacing !== undefined;
|
|
157
160
|
const [numberOfLineBreaks, setNumberOfLineBreaks] = React.useState(isSSR ? defaultColumns - 1 : 0);
|
|
158
|
-
const ownerState =
|
|
161
|
+
const ownerState = {
|
|
162
|
+
...props,
|
|
159
163
|
spacing,
|
|
160
164
|
columns,
|
|
161
165
|
maxColumnHeight,
|
|
@@ -163,7 +167,7 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
163
167
|
defaultHeight,
|
|
164
168
|
defaultSpacing,
|
|
165
169
|
isSSR
|
|
166
|
-
}
|
|
170
|
+
};
|
|
167
171
|
const classes = useUtilityClasses(ownerState);
|
|
168
172
|
const handleResize = masonryChildren => {
|
|
169
173
|
if (!masonryRef.current || !masonryChildren || masonryChildren.length === 0) {
|
|
@@ -241,18 +245,19 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
|
|
|
241
245
|
// a line break at the end of each column prevents columns from merging
|
|
242
246
|
const lineBreaks = new Array(numberOfLineBreaks).fill('').map((_, index) => /*#__PURE__*/_jsx("span", {
|
|
243
247
|
"data-class": "line-break",
|
|
244
|
-
style:
|
|
248
|
+
style: {
|
|
249
|
+
...lineBreakStyle,
|
|
245
250
|
order: index + 1
|
|
246
|
-
}
|
|
251
|
+
}
|
|
247
252
|
}, index));
|
|
248
|
-
return /*#__PURE__*/_jsxs(MasonryRoot,
|
|
253
|
+
return /*#__PURE__*/_jsxs(MasonryRoot, {
|
|
249
254
|
as: component,
|
|
250
255
|
className: clsx(classes.root, className),
|
|
251
256
|
ref: handleRef,
|
|
252
|
-
ownerState: ownerState
|
|
253
|
-
|
|
257
|
+
ownerState: ownerState,
|
|
258
|
+
...other,
|
|
254
259
|
children: [children, lineBreaks]
|
|
255
|
-
})
|
|
260
|
+
});
|
|
256
261
|
});
|
|
257
262
|
process.env.NODE_ENV !== "production" ? Masonry.propTypes /* remove-proptypes */ = {
|
|
258
263
|
// ----------------------------- Warning --------------------------------
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import Pagination from '@mui/material/Pagination';
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +11,8 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedPagination(props
|
|
|
12
11
|
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
12
|
warnedOnce = true;
|
|
14
13
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(Pagination,
|
|
16
|
-
ref: ref
|
|
17
|
-
|
|
14
|
+
return /*#__PURE__*/_jsx(Pagination, {
|
|
15
|
+
ref: ref,
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
18
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import PaginationItem from '@mui/material/PaginationItem';
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +11,8 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedPaginationItem(p
|
|
|
12
11
|
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'));
|
|
13
12
|
warnedOnce = true;
|
|
14
13
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(PaginationItem,
|
|
16
|
-
ref: ref
|
|
17
|
-
|
|
14
|
+
return /*#__PURE__*/_jsx(PaginationItem, {
|
|
15
|
+
ref: ref,
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
18
|
});
|
package/modern/Rating/Rating.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
1
|
import * as React from 'react';
|
|
3
2
|
import Rating from '@mui/material/Rating';
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -12,7 +11,8 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedRating(props, re
|
|
|
12
11
|
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'));
|
|
13
12
|
warnedOnce = true;
|
|
14
13
|
}
|
|
15
|
-
return /*#__PURE__*/_jsx(Rating,
|
|
16
|
-
ref: ref
|
|
17
|
-
|
|
14
|
+
return /*#__PURE__*/_jsx(Rating, {
|
|
15
|
+
ref: ref,
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
18
|
});
|