@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.
Files changed (197) hide show
  1. package/AdapterDateFns/AdapterDateFns.d.ts +3 -3
  2. package/AdapterDateFns/index.d.ts +1 -1
  3. package/AdapterDayjs/AdapterDayjs.d.ts +3 -3
  4. package/AdapterDayjs/index.d.ts +1 -1
  5. package/AdapterLuxon/AdapterLuxon.d.ts +3 -3
  6. package/AdapterLuxon/index.d.ts +1 -1
  7. package/AdapterMoment/AdapterMoment.d.ts +3 -3
  8. package/AdapterMoment/index.d.ts +1 -1
  9. package/Alert/Alert.js +4 -4
  10. package/AlertTitle/AlertTitle.js +4 -4
  11. package/Autocomplete/Autocomplete.js +4 -4
  12. package/AvatarGroup/AvatarGroup.js +4 -4
  13. package/CHANGELOG.md +124 -0
  14. package/CalendarPicker/CalendarPicker.d.ts +14 -14
  15. package/CalendarPicker/index.d.ts +2 -2
  16. package/CalendarPickerSkeleton/CalendarPickerSkeleton.d.ts +13 -13
  17. package/CalendarPickerSkeleton/index.d.ts +2 -2
  18. package/ClockPicker/ClockPicker.d.ts +14 -14
  19. package/ClockPicker/index.d.ts +2 -2
  20. package/DatePicker/DatePicker.d.ts +10 -10
  21. package/DatePicker/index.d.ts +2 -2
  22. package/DateRangePicker/DateRangePicker.d.ts +11 -11
  23. package/DateRangePicker/index.d.ts +2 -2
  24. package/DateRangePickerDay/DateRangePickerDay.d.ts +13 -13
  25. package/DateRangePickerDay/index.d.ts +2 -2
  26. package/DateTimePicker/DateTimePicker.d.ts +10 -10
  27. package/DateTimePicker/index.d.ts +2 -2
  28. package/DesktopDatePicker/DesktopDatePicker.d.ts +10 -10
  29. package/DesktopDatePicker/index.d.ts +2 -2
  30. package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +10 -10
  31. package/DesktopDateRangePicker/index.d.ts +2 -2
  32. package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +10 -10
  33. package/DesktopDateTimePicker/index.d.ts +2 -2
  34. package/DesktopTimePicker/DesktopTimePicker.d.ts +10 -10
  35. package/DesktopTimePicker/index.d.ts +2 -2
  36. package/LoadingButton/LoadingButton.js +74 -62
  37. package/LoadingButton/loadingButtonClasses.d.ts +22 -22
  38. package/LocalizationProvider/LocalizationProvider.d.ts +10 -10
  39. package/LocalizationProvider/index.d.ts +2 -2
  40. package/Masonry/Masonry.js +34 -29
  41. package/Masonry/masonryClasses.d.ts +8 -8
  42. package/MobileDatePicker/MobileDatePicker.d.ts +10 -10
  43. package/MobileDatePicker/index.d.ts +2 -2
  44. package/MobileDateRangePicker/MobileDateRangePicker.d.ts +10 -10
  45. package/MobileDateRangePicker/index.d.ts +2 -2
  46. package/MobileDateTimePicker/MobileDateTimePicker.d.ts +10 -10
  47. package/MobileDateTimePicker/index.d.ts +2 -2
  48. package/MobileTimePicker/MobileTimePicker.d.ts +10 -10
  49. package/MobileTimePicker/index.d.ts +2 -2
  50. package/MonthPicker/MonthPicker.d.ts +13 -13
  51. package/MonthPicker/index.d.ts +2 -2
  52. package/Pagination/Pagination.js +4 -4
  53. package/PaginationItem/PaginationItem.js +4 -4
  54. package/PickersDay/PickersDay.d.ts +13 -13
  55. package/PickersDay/index.d.ts +2 -2
  56. package/Rating/Rating.js +4 -4
  57. package/Skeleton/Skeleton.js +4 -4
  58. package/SpeedDial/SpeedDial.js +4 -4
  59. package/SpeedDialAction/SpeedDialAction.js +4 -4
  60. package/SpeedDialIcon/SpeedDialIcon.js +4 -4
  61. package/StaticDatePicker/StaticDatePicker.d.ts +10 -10
  62. package/StaticDatePicker/index.d.ts +2 -2
  63. package/StaticDateRangePicker/StaticDateRangePicker.d.ts +10 -10
  64. package/StaticDateRangePicker/index.d.ts +2 -2
  65. package/StaticDateTimePicker/StaticDateTimePicker.d.ts +10 -10
  66. package/StaticDateTimePicker/index.d.ts +2 -2
  67. package/StaticTimePicker/StaticTimePicker.d.ts +10 -10
  68. package/StaticTimePicker/index.d.ts +2 -2
  69. package/TabList/TabList.js +6 -8
  70. package/TabPanel/TabPanel.js +12 -13
  71. package/TabPanel/tabPanelClasses.d.ts +8 -8
  72. package/TimePicker/TimePicker.d.ts +10 -10
  73. package/TimePicker/index.d.ts +2 -2
  74. package/Timeline/Timeline.d.ts +59 -59
  75. package/Timeline/Timeline.js +11 -12
  76. package/Timeline/TimelineContext.d.ts +6 -6
  77. package/Timeline/index.d.ts +5 -5
  78. package/Timeline/timelineClasses.d.ts +3 -3
  79. package/TimelineConnector/TimelineConnector.js +7 -9
  80. package/TimelineConnector/timelineConnectorClasses.d.ts +8 -8
  81. package/TimelineContent/TimelineContent.js +15 -15
  82. package/TimelineContent/timelineContentClasses.d.ts +14 -14
  83. package/TimelineDot/TimelineDot.js +38 -31
  84. package/TimelineDot/timelineDotClasses.d.ts +24 -24
  85. package/TimelineItem/TimelineItem.js +33 -31
  86. package/TimelineItem/timelineItemClasses.d.ts +16 -16
  87. package/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
  88. package/TimelineOppositeContent/timelineOppositeContentClasses.d.ts +14 -14
  89. package/TimelineSeparator/TimelineSeparator.js +7 -9
  90. package/TimelineSeparator/timelineSeparatorClasses.d.ts +8 -8
  91. package/ToggleButton/ToggleButton.js +4 -4
  92. package/ToggleButtonGroup/ToggleButtonGroup.js +4 -4
  93. package/TreeItem/TreeItem.js +37 -37
  94. package/TreeItem/TreeItemContent.js +15 -18
  95. package/TreeItem/treeItemClasses.d.ts +24 -24
  96. package/TreeView/TreeView.js +35 -33
  97. package/TreeView/descendants.js +13 -14
  98. package/TreeView/treeViewClasses.d.ts +8 -8
  99. package/YearPicker/YearPicker.d.ts +14 -14
  100. package/YearPicker/index.d.ts +2 -2
  101. package/index.js +1 -1
  102. package/internal/svg-icons/ArrowDropDown.d.ts +7 -7
  103. package/internal/svg-icons/ArrowLeft.d.ts +7 -7
  104. package/internal/svg-icons/ArrowRight.d.ts +7 -7
  105. package/internal/svg-icons/Calendar.d.ts +7 -7
  106. package/internal/svg-icons/Clock.d.ts +7 -7
  107. package/internal/svg-icons/DateRange.d.ts +7 -7
  108. package/internal/svg-icons/Pen.d.ts +7 -7
  109. package/internal/svg-icons/Time.d.ts +7 -7
  110. package/legacy/Alert/Alert.js +4 -2
  111. package/legacy/AlertTitle/AlertTitle.js +4 -2
  112. package/legacy/Autocomplete/Autocomplete.js +4 -2
  113. package/legacy/AvatarGroup/AvatarGroup.js +4 -2
  114. package/legacy/LoadingButton/LoadingButton.js +16 -15
  115. package/legacy/Masonry/Masonry.js +10 -8
  116. package/legacy/Pagination/Pagination.js +4 -2
  117. package/legacy/PaginationItem/PaginationItem.js +4 -2
  118. package/legacy/Rating/Rating.js +4 -2
  119. package/legacy/Skeleton/Skeleton.js +4 -2
  120. package/legacy/SpeedDial/SpeedDial.js +4 -2
  121. package/legacy/SpeedDialAction/SpeedDialAction.js +4 -2
  122. package/legacy/SpeedDialIcon/SpeedDialIcon.js +4 -2
  123. package/legacy/TabList/TabList.js +4 -2
  124. package/legacy/TabPanel/TabPanel.js +6 -4
  125. package/legacy/Timeline/Timeline.js +5 -3
  126. package/legacy/TimelineConnector/TimelineConnector.js +4 -2
  127. package/legacy/TimelineContent/TimelineContent.js +6 -4
  128. package/legacy/TimelineDot/TimelineDot.js +10 -8
  129. package/legacy/TimelineItem/TimelineItem.js +7 -6
  130. package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +6 -4
  131. package/legacy/TimelineSeparator/TimelineSeparator.js +4 -2
  132. package/legacy/ToggleButton/ToggleButton.js +4 -2
  133. package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +4 -2
  134. package/legacy/TreeItem/TreeItem.js +9 -8
  135. package/legacy/TreeItem/TreeItemContent.js +5 -3
  136. package/legacy/TreeView/TreeView.js +8 -6
  137. package/legacy/TreeView/descendants.js +6 -4
  138. package/legacy/index.js +1 -1
  139. package/modern/Alert/Alert.js +4 -4
  140. package/modern/AlertTitle/AlertTitle.js +4 -4
  141. package/modern/Autocomplete/Autocomplete.js +4 -4
  142. package/modern/AvatarGroup/AvatarGroup.js +4 -4
  143. package/modern/LoadingButton/LoadingButton.js +74 -62
  144. package/modern/Masonry/Masonry.js +34 -29
  145. package/modern/Pagination/Pagination.js +4 -4
  146. package/modern/PaginationItem/PaginationItem.js +4 -4
  147. package/modern/Rating/Rating.js +4 -4
  148. package/modern/Skeleton/Skeleton.js +4 -4
  149. package/modern/SpeedDial/SpeedDial.js +4 -4
  150. package/modern/SpeedDialAction/SpeedDialAction.js +4 -4
  151. package/modern/SpeedDialIcon/SpeedDialIcon.js +4 -4
  152. package/modern/TabList/TabList.js +6 -8
  153. package/modern/TabPanel/TabPanel.js +12 -13
  154. package/modern/Timeline/Timeline.js +11 -12
  155. package/modern/TimelineConnector/TimelineConnector.js +7 -9
  156. package/modern/TimelineContent/TimelineContent.js +15 -15
  157. package/modern/TimelineDot/TimelineDot.js +38 -31
  158. package/modern/TimelineItem/TimelineItem.js +33 -31
  159. package/modern/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
  160. package/modern/TimelineSeparator/TimelineSeparator.js +7 -9
  161. package/modern/ToggleButton/ToggleButton.js +4 -4
  162. package/modern/ToggleButtonGroup/ToggleButtonGroup.js +4 -4
  163. package/modern/TreeItem/TreeItem.js +37 -37
  164. package/modern/TreeItem/TreeItemContent.js +15 -18
  165. package/modern/TreeView/TreeView.js +35 -33
  166. package/modern/TreeView/descendants.js +13 -14
  167. package/modern/index.js +1 -1
  168. package/node/Alert/Alert.js +4 -4
  169. package/node/AlertTitle/AlertTitle.js +4 -4
  170. package/node/Autocomplete/Autocomplete.js +4 -4
  171. package/node/AvatarGroup/AvatarGroup.js +4 -4
  172. package/node/LoadingButton/LoadingButton.js +74 -62
  173. package/node/Masonry/Masonry.js +34 -29
  174. package/node/Pagination/Pagination.js +4 -4
  175. package/node/PaginationItem/PaginationItem.js +4 -4
  176. package/node/Rating/Rating.js +4 -4
  177. package/node/Skeleton/Skeleton.js +4 -4
  178. package/node/SpeedDial/SpeedDial.js +4 -4
  179. package/node/SpeedDialAction/SpeedDialAction.js +4 -4
  180. package/node/SpeedDialIcon/SpeedDialIcon.js +4 -4
  181. package/node/TabList/TabList.js +6 -8
  182. package/node/TabPanel/TabPanel.js +12 -13
  183. package/node/Timeline/Timeline.js +13 -12
  184. package/node/TimelineConnector/TimelineConnector.js +7 -9
  185. package/node/TimelineContent/TimelineContent.js +15 -15
  186. package/node/TimelineDot/TimelineDot.js +38 -31
  187. package/node/TimelineItem/TimelineItem.js +33 -31
  188. package/node/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
  189. package/node/TimelineSeparator/TimelineSeparator.js +7 -9
  190. package/node/ToggleButton/ToggleButton.js +4 -4
  191. package/node/ToggleButtonGroup/ToggleButtonGroup.js +4 -4
  192. package/node/TreeItem/TreeItem.js +37 -37
  193. package/node/TreeItem/TreeItemContent.js +18 -22
  194. package/node/TreeView/TreeView.js +35 -33
  195. package/node/TreeView/descendants.js +16 -16
  196. package/node/index.js +1 -1
  197. package/package.json +4 -4
@@ -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 _extends({}, classes, composedClasses);
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
- }) => _extends({
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
- }, 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'], {
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
- 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
- }
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
- }) => _extends({
94
+ }) => ({
91
95
  position: 'absolute',
92
96
  visibility: 'visible',
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
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
- 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);
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 != null ? loadingIndicatorProp : /*#__PURE__*/_jsx(CircularProgress, {
130
141
  "aria-labelledby": id,
131
142
  color: "inherit",
132
143
  size: 16
133
144
  });
134
- const ownerState = _extends({}, props, {
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, _extends({
159
+ return /*#__PURE__*/_jsxs(LoadingButtonRoot, {
148
160
  disabled: disabled || loading,
149
161
  id: id,
150
- ref: ref
151
- }, other, {
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,22 +1,22 @@
1
- export interface LoadingButtonClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- /** Styles applied to the root element if `loading={true}`. */
5
- loading: string;
6
- /** Styles applied to the loadingIndicator element. */
7
- loadingIndicator: string;
8
- /** Styles applied to the loadingIndicator element if `loadingPosition="center"`. */
9
- loadingIndicatorCenter: string;
10
- /** Styles applied to the loadingIndicator element if `loadingPosition="start"`. */
11
- loadingIndicatorStart: string;
12
- /** Styles applied to the loadingIndicator element if `loadingPosition="end"`. */
13
- loadingIndicatorEnd: string;
14
- /** Styles applied to the endIcon element if `loading={true}` and `loadingPosition="end"`. */
15
- endIconLoadingEnd: string;
16
- /** Styles applied to the startIcon element if `loading={true}` and `loadingPosition="start"`. */
17
- startIconLoadingStart: string;
18
- }
19
- export type LoadingButtonClassKey = keyof LoadingButtonClasses;
20
- export declare function getLoadingButtonUtilityClass(slot: string): string;
21
- declare const loadingButtonClasses: LoadingButtonClasses;
22
- export default loadingButtonClasses;
1
+ export interface LoadingButtonClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ /** Styles applied to the root element if `loading={true}`. */
5
+ loading: string;
6
+ /** Styles applied to the loadingIndicator element. */
7
+ loadingIndicator: string;
8
+ /** Styles applied to the loadingIndicator element if `loadingPosition="center"`. */
9
+ loadingIndicatorCenter: string;
10
+ /** Styles applied to the loadingIndicator element if `loadingPosition="start"`. */
11
+ loadingIndicatorStart: string;
12
+ /** Styles applied to the loadingIndicator element if `loadingPosition="end"`. */
13
+ loadingIndicatorEnd: string;
14
+ /** Styles applied to the endIcon element if `loading={true}` and `loadingPosition="end"`. */
15
+ endIconLoadingEnd: string;
16
+ /** Styles applied to the startIcon element if `loading={true}` and `loadingPosition="start"`. */
17
+ startIconLoadingStart: string;
18
+ }
19
+ export type LoadingButtonClassKey = keyof LoadingButtonClasses;
20
+ export declare function getLoadingButtonUtilityClass(slot: string): string;
21
+ declare const loadingButtonClasses: LoadingButtonClasses;
22
+ export default loadingButtonClasses;
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
- type LocalizationProviderComponent = ((props: LocalizationProviderProps & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
- propTypes?: any;
4
- };
5
- /**
6
- * @ignore - do not document.
7
- */
8
- declare const LocalizationProvider: LocalizationProviderComponent;
9
- export default LocalizationProvider;
10
- export type LocalizationProviderProps = Record<any, any>;
1
+ import * as React from 'react';
2
+ type LocalizationProviderComponent = ((props: LocalizationProviderProps & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
+ propTypes?: any;
4
+ };
5
+ /**
6
+ * @ignore - do not document.
7
+ */
8
+ declare const LocalizationProvider: LocalizationProviderComponent;
9
+ export default LocalizationProvider;
10
+ export type LocalizationProviderProps = Record<any, any>;
@@ -1,2 +1,2 @@
1
- export { default } from './LocalizationProvider';
2
- export * from './LocalizationProvider';
1
+ export { default } from './LocalizationProvider';
2
+ export * from './LocalizationProvider';
@@ -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['& > *'] = _extends({}, styles['& > *'], orderStyleSSR, {
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 _extends({}, styles, stylesSSR);
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 _extends({
81
+ return {
80
82
  margin: `calc(0px - (${spacing} / 2))`,
81
83
  '& > *': {
82
84
  margin: `calc(${spacing} / 2)`
83
- }
84
- }, ownerState.maxColumnHeight && {
85
- height: typeof spacing === 'number' ? Math.ceil(ownerState.maxColumnHeight + parseToNumber(spacing)) : `calc(${ownerState.maxColumnHeight}px + ${spacing})`
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
- 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);
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 = _extends({}, props, {
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: _extends({}, lineBreakStyle, {
248
+ style: {
249
+ ...lineBreakStyle,
245
250
  order: index + 1
246
- })
251
+ }
247
252
  }, index));
248
- return /*#__PURE__*/_jsxs(MasonryRoot, _extends({
253
+ return /*#__PURE__*/_jsxs(MasonryRoot, {
249
254
  as: component,
250
255
  className: clsx(classes.root, className),
251
256
  ref: handleRef,
252
- ownerState: ownerState
253
- }, other, {
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,8 +1,8 @@
1
- export interface MasonryClasses {
2
- /** Styles applied to the root element. */
3
- root: string;
4
- }
5
- export type MasonryClassKey = keyof MasonryClasses;
6
- export declare function getMasonryUtilityClass(slot: string): string;
7
- declare const masonryClasses: MasonryClasses;
8
- export default masonryClasses;
1
+ export interface MasonryClasses {
2
+ /** Styles applied to the root element. */
3
+ root: string;
4
+ }
5
+ export type MasonryClassKey = keyof MasonryClasses;
6
+ export declare function getMasonryUtilityClass(slot: string): string;
7
+ declare const masonryClasses: MasonryClasses;
8
+ export default masonryClasses;
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
- type MobileDatePickerComponent = (<TDate>(props: MobileDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
- propTypes?: any;
4
- };
5
- /**
6
- * @ignore - do not document.
7
- */
8
- declare const MobileDatePicker: MobileDatePickerComponent;
9
- export default MobileDatePicker;
10
- export type MobileDatePickerProps<TDate> = Record<any, any>;
1
+ import * as React from 'react';
2
+ type MobileDatePickerComponent = (<TDate>(props: MobileDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
+ propTypes?: any;
4
+ };
5
+ /**
6
+ * @ignore - do not document.
7
+ */
8
+ declare const MobileDatePicker: MobileDatePickerComponent;
9
+ export default MobileDatePicker;
10
+ export type MobileDatePickerProps<TDate> = Record<any, any>;
@@ -1,2 +1,2 @@
1
- export { default } from './MobileDatePicker';
2
- export * from './MobileDatePicker';
1
+ export { default } from './MobileDatePicker';
2
+ export * from './MobileDatePicker';
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
- type MobileDateRangePickerComponent = (<TDate>(props: MobileDateRangePickerProps & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
- propTypes?: any;
4
- };
5
- /**
6
- * @ignore - do not document.
7
- */
8
- declare const MobileDateRangePicker: MobileDateRangePickerComponent;
9
- export default MobileDateRangePicker;
10
- export type MobileDateRangePickerProps = Record<any, any>;
1
+ import * as React from 'react';
2
+ type MobileDateRangePickerComponent = (<TDate>(props: MobileDateRangePickerProps & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
+ propTypes?: any;
4
+ };
5
+ /**
6
+ * @ignore - do not document.
7
+ */
8
+ declare const MobileDateRangePicker: MobileDateRangePickerComponent;
9
+ export default MobileDateRangePicker;
10
+ export type MobileDateRangePickerProps = Record<any, any>;
@@ -1,2 +1,2 @@
1
- export { default } from './MobileDateRangePicker';
2
- export * from './MobileDateRangePicker';
1
+ export { default } from './MobileDateRangePicker';
2
+ export * from './MobileDateRangePicker';
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
- type MobileDateTimePickerComponent = (<TDate>(props: MobileDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
- propTypes?: any;
4
- };
5
- /**
6
- * @ignore - do not document.
7
- */
8
- declare const MobileDateTimePicker: MobileDateTimePickerComponent;
9
- export default MobileDateTimePicker;
10
- export type MobileDateTimePickerProps<TDate> = Record<any, any>;
1
+ import * as React from 'react';
2
+ type MobileDateTimePickerComponent = (<TDate>(props: MobileDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
+ propTypes?: any;
4
+ };
5
+ /**
6
+ * @ignore - do not document.
7
+ */
8
+ declare const MobileDateTimePicker: MobileDateTimePickerComponent;
9
+ export default MobileDateTimePicker;
10
+ export type MobileDateTimePickerProps<TDate> = Record<any, any>;
@@ -1,2 +1,2 @@
1
- export { default } from './MobileDateTimePicker';
2
- export * from './MobileDateTimePicker';
1
+ export { default } from './MobileDateTimePicker';
2
+ export * from './MobileDateTimePicker';
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
2
- type MobileTimePickerComponent = (<TDate>(props: MobileTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
- propTypes?: any;
4
- };
5
- /**
6
- * @ignore - do not document.
7
- */
8
- declare const MobileTimePicker: MobileTimePickerComponent;
9
- export default MobileTimePicker;
10
- export type MobileTimePickerProps<TDate> = Record<any, any>;
1
+ import * as React from 'react';
2
+ type MobileTimePickerComponent = (<TDate>(props: MobileTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
+ propTypes?: any;
4
+ };
5
+ /**
6
+ * @ignore - do not document.
7
+ */
8
+ declare const MobileTimePicker: MobileTimePickerComponent;
9
+ export default MobileTimePicker;
10
+ export type MobileTimePickerProps<TDate> = Record<any, any>;
@@ -1,2 +1,2 @@
1
- export { default } from './MobileTimePicker';
2
- export * from './MobileTimePicker';
1
+ export { default } from './MobileTimePicker';
2
+ export * from './MobileTimePicker';
@@ -1,13 +1,13 @@
1
- import * as React from 'react';
2
- type MonthPickerComponent = (<TDate>(props: MonthPickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
- propTypes?: any;
4
- };
5
- /**
6
- * @ignore - do not document.
7
- */
8
- declare const MonthPicker: MonthPickerComponent;
9
- export default MonthPicker;
10
- export declare const monthPickerClasses: {};
11
- export declare const getMonthPickerUtilityClass: (slot: string) => string;
12
- export type MonthPickerProps<TDate> = Record<any, any>;
13
- export type MonthPickerClassKey = any;
1
+ import * as React from 'react';
2
+ type MonthPickerComponent = (<TDate>(props: MonthPickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
+ propTypes?: any;
4
+ };
5
+ /**
6
+ * @ignore - do not document.
7
+ */
8
+ declare const MonthPicker: MonthPickerComponent;
9
+ export default MonthPicker;
10
+ export declare const monthPickerClasses: {};
11
+ export declare const getMonthPickerUtilityClass: (slot: string) => string;
12
+ export type MonthPickerProps<TDate> = Record<any, any>;
13
+ export type MonthPickerClassKey = any;
@@ -1,2 +1,2 @@
1
- export { default } from './MonthPicker';
2
- export * from './MonthPicker';
1
+ export { default } from './MonthPicker';
2
+ export * from './MonthPicker';
@@ -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, _extends({
16
- ref: ref
17
- }, props));
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, _extends({
16
- ref: ref
17
- }, props));
14
+ return /*#__PURE__*/_jsx(PaginationItem, {
15
+ ref: ref,
16
+ ...props
17
+ });
18
18
  });
@@ -1,13 +1,13 @@
1
- import * as React from 'react';
2
- type PickersDayComponent = (<TDate>(props: PickersDayProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
- propTypes?: any;
4
- };
5
- /**
6
- * @ignore - do not document.
7
- */
8
- declare const PickersDay: PickersDayComponent;
9
- export default PickersDay;
10
- export declare const pickersDayClasses: {};
11
- export declare const getPickersDayUtilityClass: (slot: string) => string;
12
- export type PickersDayProps<TDate> = Record<any, any>;
13
- export type PickersDayClassKey = any;
1
+ import * as React from 'react';
2
+ type PickersDayComponent = (<TDate>(props: PickersDayProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
3
+ propTypes?: any;
4
+ };
5
+ /**
6
+ * @ignore - do not document.
7
+ */
8
+ declare const PickersDay: PickersDayComponent;
9
+ export default PickersDay;
10
+ export declare const pickersDayClasses: {};
11
+ export declare const getPickersDayUtilityClass: (slot: string) => string;
12
+ export type PickersDayProps<TDate> = Record<any, any>;
13
+ export type PickersDayClassKey = any;
@@ -1,2 +1,2 @@
1
- export { default } from './PickersDay';
2
- export * from './PickersDay';
1
+ export { default } from './PickersDay';
2
+ export * from './PickersDay';
package/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, _extends({
16
- ref: ref
17
- }, props));
14
+ return /*#__PURE__*/_jsx(Rating, {
15
+ ref: ref,
16
+ ...props
17
+ });
18
18
  });