@mui/lab 6.0.0-alpha.1 → 6.0.0-alpha.11

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 (255) hide show
  1. package/Alert/Alert.js +4 -4
  2. package/AlertTitle/AlertTitle.js +4 -4
  3. package/Autocomplete/Autocomplete.js +4 -4
  4. package/AvatarGroup/AvatarGroup.js +4 -4
  5. package/CHANGELOG.md +538 -4
  6. package/CalendarPicker/CalendarPicker.d.ts +1 -1
  7. package/CalendarPickerSkeleton/CalendarPickerSkeleton.d.ts +1 -1
  8. package/ClockPicker/ClockPicker.d.ts +1 -1
  9. package/DatePicker/DatePicker.d.ts +1 -1
  10. package/DateRangePicker/DateRangePicker.d.ts +1 -1
  11. package/DateRangePickerDay/DateRangePickerDay.d.ts +1 -1
  12. package/DateTimePicker/DateTimePicker.d.ts +1 -1
  13. package/DesktopDatePicker/DesktopDatePicker.d.ts +1 -1
  14. package/DesktopDateRangePicker/DesktopDateRangePicker.d.ts +1 -1
  15. package/DesktopDateTimePicker/DesktopDateTimePicker.d.ts +1 -1
  16. package/DesktopTimePicker/DesktopTimePicker.d.ts +1 -1
  17. package/LoadingButton/LoadingButton.d.ts +4 -4
  18. package/LoadingButton/LoadingButton.js +142 -69
  19. package/LocalizationProvider/LocalizationProvider.d.ts +1 -1
  20. package/Masonry/Masonry.d.ts +2 -2
  21. package/Masonry/Masonry.js +35 -30
  22. package/MobileDatePicker/MobileDatePicker.d.ts +1 -1
  23. package/MobileDateRangePicker/MobileDateRangePicker.d.ts +1 -1
  24. package/MobileDateTimePicker/MobileDateTimePicker.d.ts +1 -1
  25. package/MobileTimePicker/MobileTimePicker.d.ts +1 -1
  26. package/MonthPicker/MonthPicker.d.ts +1 -1
  27. package/Pagination/Pagination.js +4 -4
  28. package/PaginationItem/PaginationItem.js +4 -4
  29. package/PickersDay/PickersDay.d.ts +1 -1
  30. package/Rating/Rating.js +4 -4
  31. package/Skeleton/Skeleton.js +4 -4
  32. package/SpeedDial/SpeedDial.js +4 -4
  33. package/SpeedDialAction/SpeedDialAction.js +4 -4
  34. package/SpeedDialIcon/SpeedDialIcon.js +4 -4
  35. package/StaticDatePicker/StaticDatePicker.d.ts +1 -1
  36. package/StaticDateRangePicker/StaticDateRangePicker.d.ts +1 -1
  37. package/StaticDateTimePicker/StaticDateTimePicker.d.ts +1 -1
  38. package/StaticTimePicker/StaticTimePicker.d.ts +1 -1
  39. package/TabContext/TabContext.d.ts +3 -3
  40. package/TabList/TabList.d.ts +3 -3
  41. package/TabList/TabList.js +6 -8
  42. package/TabPanel/TabPanel.d.ts +3 -3
  43. package/TabPanel/TabPanel.js +13 -14
  44. package/TimePicker/TimePicker.d.ts +1 -1
  45. package/Timeline/Timeline.d.ts +2 -2
  46. package/Timeline/Timeline.js +13 -14
  47. package/TimelineConnector/TimelineConnector.d.ts +3 -3
  48. package/TimelineConnector/TimelineConnector.js +7 -9
  49. package/TimelineContent/TimelineContent.d.ts +4 -4
  50. package/TimelineContent/TimelineContent.js +15 -15
  51. package/TimelineDot/TimelineDot.d.ts +3 -3
  52. package/TimelineDot/TimelineDot.js +38 -31
  53. package/TimelineItem/TimelineItem.d.ts +3 -3
  54. package/TimelineItem/TimelineItem.js +33 -31
  55. package/TimelineOppositeContent/TimelineOppositeContent.d.ts +6 -4
  56. package/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
  57. package/TimelineSeparator/TimelineSeparator.d.ts +3 -3
  58. package/TimelineSeparator/TimelineSeparator.js +7 -9
  59. package/ToggleButton/ToggleButton.js +4 -4
  60. package/ToggleButtonGroup/ToggleButtonGroup.js +4 -4
  61. package/TreeItem/TreeItem.d.ts +1 -1
  62. package/TreeView/TreeView.d.ts +1 -1
  63. package/YearPicker/YearPicker.d.ts +1 -1
  64. package/index.js +1 -1
  65. package/modern/Alert/Alert.js +4 -4
  66. package/modern/AlertTitle/AlertTitle.js +4 -4
  67. package/modern/Autocomplete/Autocomplete.js +4 -4
  68. package/modern/AvatarGroup/AvatarGroup.js +4 -4
  69. package/modern/LoadingButton/LoadingButton.js +142 -69
  70. package/modern/Masonry/Masonry.js +35 -30
  71. package/modern/Pagination/Pagination.js +4 -4
  72. package/modern/PaginationItem/PaginationItem.js +4 -4
  73. package/modern/Rating/Rating.js +4 -4
  74. package/modern/Skeleton/Skeleton.js +4 -4
  75. package/modern/SpeedDial/SpeedDial.js +4 -4
  76. package/modern/SpeedDialAction/SpeedDialAction.js +4 -4
  77. package/modern/SpeedDialIcon/SpeedDialIcon.js +4 -4
  78. package/modern/TabList/TabList.js +6 -8
  79. package/modern/TabPanel/TabPanel.js +13 -14
  80. package/modern/Timeline/Timeline.js +13 -14
  81. package/modern/TimelineConnector/TimelineConnector.js +7 -9
  82. package/modern/TimelineContent/TimelineContent.js +15 -15
  83. package/modern/TimelineDot/TimelineDot.js +38 -31
  84. package/modern/TimelineItem/TimelineItem.js +33 -31
  85. package/modern/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
  86. package/modern/TimelineSeparator/TimelineSeparator.js +7 -9
  87. package/modern/ToggleButton/ToggleButton.js +4 -4
  88. package/modern/ToggleButtonGroup/ToggleButtonGroup.js +4 -4
  89. package/modern/index.js +1 -1
  90. package/modern/zero-styled/index.js +7 -0
  91. package/node/Alert/Alert.js +4 -4
  92. package/node/AlertTitle/AlertTitle.js +4 -4
  93. package/node/Autocomplete/Autocomplete.js +4 -4
  94. package/node/AvatarGroup/AvatarGroup.js +4 -4
  95. package/node/LoadingButton/LoadingButton.js +145 -72
  96. package/node/Masonry/Masonry.js +35 -30
  97. package/node/Pagination/Pagination.js +4 -4
  98. package/node/PaginationItem/PaginationItem.js +4 -4
  99. package/node/Rating/Rating.js +4 -4
  100. package/node/Skeleton/Skeleton.js +4 -4
  101. package/node/SpeedDial/SpeedDial.js +4 -4
  102. package/node/SpeedDialAction/SpeedDialAction.js +4 -4
  103. package/node/SpeedDialIcon/SpeedDialIcon.js +4 -4
  104. package/node/TabList/TabList.js +6 -8
  105. package/node/TabPanel/TabPanel.js +13 -14
  106. package/node/Timeline/Timeline.js +13 -14
  107. package/node/TimelineConnector/TimelineConnector.js +7 -9
  108. package/node/TimelineContent/TimelineContent.js +15 -15
  109. package/node/TimelineDot/TimelineDot.js +38 -31
  110. package/node/TimelineItem/TimelineItem.js +33 -31
  111. package/node/TimelineOppositeContent/TimelineOppositeContent.js +15 -15
  112. package/node/TimelineSeparator/TimelineSeparator.js +7 -9
  113. package/node/ToggleButton/ToggleButton.js +4 -4
  114. package/node/ToggleButtonGroup/ToggleButtonGroup.js +4 -4
  115. package/node/index.js +1 -1
  116. package/node/zero-styled/index.js +17 -0
  117. package/package.json +8 -8
  118. package/zero-styled/index.d.ts +3 -0
  119. package/zero-styled/index.js +7 -0
  120. package/zero-styled/package.json +6 -0
  121. package/legacy/AdapterDateFns/AdapterDateFns.js +0 -18
  122. package/legacy/AdapterDateFns/index.js +0 -1
  123. package/legacy/AdapterDayjs/AdapterDayjs.js +0 -18
  124. package/legacy/AdapterDayjs/index.js +0 -1
  125. package/legacy/AdapterLuxon/AdapterLuxon.js +0 -18
  126. package/legacy/AdapterLuxon/index.js +0 -1
  127. package/legacy/AdapterMoment/AdapterMoment.js +0 -18
  128. package/legacy/AdapterMoment/index.js +0 -1
  129. package/legacy/Alert/Alert.js +0 -20
  130. package/legacy/Alert/index.js +0 -1
  131. package/legacy/AlertTitle/AlertTitle.js +0 -20
  132. package/legacy/AlertTitle/index.js +0 -1
  133. package/legacy/Autocomplete/Autocomplete.js +0 -20
  134. package/legacy/Autocomplete/index.js +0 -1
  135. package/legacy/AvatarGroup/AvatarGroup.js +0 -20
  136. package/legacy/AvatarGroup/index.js +0 -1
  137. package/legacy/CalendarPicker/CalendarPicker.js +0 -21
  138. package/legacy/CalendarPicker/index.js +0 -2
  139. package/legacy/CalendarPickerSkeleton/CalendarPickerSkeleton.js +0 -25
  140. package/legacy/CalendarPickerSkeleton/index.js +0 -2
  141. package/legacy/ClockPicker/ClockPicker.js +0 -21
  142. package/legacy/ClockPicker/index.js +0 -2
  143. package/legacy/DatePicker/DatePicker.js +0 -19
  144. package/legacy/DatePicker/index.js +0 -2
  145. package/legacy/DateRangePicker/DateRangePicker.js +0 -18
  146. package/legacy/DateRangePicker/index.js +0 -2
  147. package/legacy/DateRangePickerDay/DateRangePickerDay.js +0 -22
  148. package/legacy/DateRangePickerDay/index.js +0 -2
  149. package/legacy/DateTimePicker/DateTimePicker.js +0 -20
  150. package/legacy/DateTimePicker/index.js +0 -2
  151. package/legacy/DesktopDatePicker/DesktopDatePicker.js +0 -20
  152. package/legacy/DesktopDatePicker/index.js +0 -2
  153. package/legacy/DesktopDateRangePicker/DesktopDateRangePicker.js +0 -18
  154. package/legacy/DesktopDateRangePicker/index.js +0 -2
  155. package/legacy/DesktopDateTimePicker/DesktopDateTimePicker.js +0 -20
  156. package/legacy/DesktopDateTimePicker/index.js +0 -2
  157. package/legacy/DesktopTimePicker/DesktopTimePicker.js +0 -20
  158. package/legacy/DesktopTimePicker/index.js +0 -2
  159. package/legacy/LoadingButton/LoadingButton.js +0 -213
  160. package/legacy/LoadingButton/index.js +0 -3
  161. package/legacy/LoadingButton/loadingButtonClasses.js +0 -7
  162. package/legacy/LocalizationProvider/LocalizationProvider.js +0 -19
  163. package/legacy/LocalizationProvider/index.js +0 -2
  164. package/legacy/Masonry/Masonry.js +0 -339
  165. package/legacy/Masonry/index.js +0 -3
  166. package/legacy/Masonry/masonryClasses.js +0 -7
  167. package/legacy/MobileDatePicker/MobileDatePicker.js +0 -20
  168. package/legacy/MobileDatePicker/index.js +0 -2
  169. package/legacy/MobileDateRangePicker/MobileDateRangePicker.js +0 -18
  170. package/legacy/MobileDateRangePicker/index.js +0 -2
  171. package/legacy/MobileDateTimePicker/MobileDateTimePicker.js +0 -20
  172. package/legacy/MobileDateTimePicker/index.js +0 -2
  173. package/legacy/MobileTimePicker/MobileTimePicker.js +0 -20
  174. package/legacy/MobileTimePicker/index.js +0 -2
  175. package/legacy/MonthPicker/MonthPicker.js +0 -25
  176. package/legacy/MonthPicker/index.js +0 -2
  177. package/legacy/Pagination/Pagination.js +0 -20
  178. package/legacy/Pagination/index.js +0 -2
  179. package/legacy/Pagination/usePagination.js +0 -3
  180. package/legacy/PaginationItem/PaginationItem.js +0 -20
  181. package/legacy/PaginationItem/index.js +0 -1
  182. package/legacy/PickersDay/PickersDay.js +0 -25
  183. package/legacy/PickersDay/index.js +0 -2
  184. package/legacy/Rating/Rating.js +0 -20
  185. package/legacy/Rating/index.js +0 -1
  186. package/legacy/Skeleton/Skeleton.js +0 -20
  187. package/legacy/Skeleton/index.js +0 -1
  188. package/legacy/SpeedDial/SpeedDial.js +0 -20
  189. package/legacy/SpeedDial/index.js +0 -1
  190. package/legacy/SpeedDialAction/SpeedDialAction.js +0 -20
  191. package/legacy/SpeedDialAction/index.js +0 -1
  192. package/legacy/SpeedDialIcon/SpeedDialIcon.js +0 -20
  193. package/legacy/SpeedDialIcon/index.js +0 -1
  194. package/legacy/StaticDatePicker/StaticDatePicker.js +0 -20
  195. package/legacy/StaticDatePicker/index.js +0 -2
  196. package/legacy/StaticDateRangePicker/StaticDateRangePicker.js +0 -18
  197. package/legacy/StaticDateRangePicker/index.js +0 -2
  198. package/legacy/StaticDateTimePicker/StaticDateTimePicker.js +0 -20
  199. package/legacy/StaticDateTimePicker/index.js +0 -2
  200. package/legacy/StaticTimePicker/StaticTimePicker.js +0 -20
  201. package/legacy/StaticTimePicker/index.js +0 -2
  202. package/legacy/TabContext/TabContext.js +0 -72
  203. package/legacy/TabContext/index.js +0 -2
  204. package/legacy/TabList/TabList.js +0 -43
  205. package/legacy/TabList/index.js +0 -1
  206. package/legacy/TabPanel/TabPanel.js +0 -96
  207. package/legacy/TabPanel/index.js +0 -3
  208. package/legacy/TabPanel/tabPanelClasses.js +0 -7
  209. package/legacy/TimePicker/TimePicker.js +0 -20
  210. package/legacy/TimePicker/index.js +0 -2
  211. package/legacy/Timeline/Timeline.js +0 -113
  212. package/legacy/Timeline/Timeline.types.js +0 -1
  213. package/legacy/Timeline/TimelineContext.js +0 -10
  214. package/legacy/Timeline/index.js +0 -4
  215. package/legacy/Timeline/timelineClasses.js +0 -7
  216. package/legacy/TimelineConnector/TimelineConnector.js +0 -70
  217. package/legacy/TimelineConnector/index.js +0 -3
  218. package/legacy/TimelineConnector/timelineConnectorClasses.js +0 -7
  219. package/legacy/TimelineContent/TimelineContent.js +0 -82
  220. package/legacy/TimelineContent/index.js +0 -3
  221. package/legacy/TimelineContent/timelineContentClasses.js +0 -7
  222. package/legacy/TimelineDot/TimelineDot.js +0 -112
  223. package/legacy/TimelineDot/index.js +0 -3
  224. package/legacy/TimelineDot/timelineDotClasses.js +0 -7
  225. package/legacy/TimelineItem/TimelineItem.js +0 -118
  226. package/legacy/TimelineItem/index.js +0 -3
  227. package/legacy/TimelineItem/timelineItemClasses.js +0 -7
  228. package/legacy/TimelineOppositeContent/TimelineOppositeContent.js +0 -84
  229. package/legacy/TimelineOppositeContent/index.js +0 -3
  230. package/legacy/TimelineOppositeContent/timelineOppositeContentClasses.js +0 -7
  231. package/legacy/TimelineSeparator/TimelineSeparator.js +0 -68
  232. package/legacy/TimelineSeparator/index.js +0 -3
  233. package/legacy/TimelineSeparator/timelineSeparatorClasses.js +0 -7
  234. package/legacy/ToggleButton/ToggleButton.js +0 -20
  235. package/legacy/ToggleButton/index.js +0 -1
  236. package/legacy/ToggleButtonGroup/ToggleButtonGroup.js +0 -20
  237. package/legacy/ToggleButtonGroup/index.js +0 -1
  238. package/legacy/TreeItem/TreeItem.js +0 -19
  239. package/legacy/TreeItem/index.js +0 -2
  240. package/legacy/TreeView/TreeView.js +0 -20
  241. package/legacy/TreeView/index.js +0 -2
  242. package/legacy/YearPicker/YearPicker.js +0 -24
  243. package/legacy/YearPicker/index.js +0 -2
  244. package/legacy/index.js +0 -113
  245. package/legacy/internal/convertTimelinePositionToClass.js +0 -4
  246. package/legacy/internal/svg-icons/ArrowDropDown.js +0 -12
  247. package/legacy/internal/svg-icons/ArrowLeft.js +0 -12
  248. package/legacy/internal/svg-icons/ArrowRight.js +0 -12
  249. package/legacy/internal/svg-icons/Calendar.js +0 -12
  250. package/legacy/internal/svg-icons/Clock.js +0 -16
  251. package/legacy/internal/svg-icons/DateRange.js +0 -12
  252. package/legacy/internal/svg-icons/Pen.js +0 -12
  253. package/legacy/internal/svg-icons/Time.js +0 -16
  254. package/legacy/themeAugmentation/index.js +0 -1
  255. package/legacy/useAutocomplete/index.js +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type CalendarPickerSkeletonComponent = ((props: CalendarPickerSkeletonProps & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type CalendarPickerSkeletonComponent = ((props: CalendarPickerSkeletonProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type ClockPickerComponent = (<TDate>(props: ClockPickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type ClockPickerComponent = (<TDate>(props: ClockPickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type DatePickerComponent = (<TDate>(props: DatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type DatePickerComponent = (<TDate>(props: DatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type DateRangePickerComponent = (<TDate>(props: DateRangePickerProps & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type DateRangePickerComponent = (<TDate>(props: DateRangePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type DateRangePickerDayComponent = (<TDate>(props: DateRangePickerDayProps & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type DateRangePickerDayComponent = (<TDate>(props: DateRangePickerDayProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type DateTimePickerComponent = (<TDate>(props: DateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type DateTimePickerComponent = (<TDate>(props: DateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type DesktopDatePickerComponent = (<TDate>(props: DesktopDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type DesktopDatePickerComponent = (<TDate>(props: DesktopDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type DesktopDateRangePickerComponent = (<TDate>(props: DesktopDateRangePickerProps & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type DesktopDateRangePickerComponent = (<TDate>(props: DesktopDateRangePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type DesktopDateTimePickerComponent = (<TDate>(props: DesktopDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type DesktopDateTimePickerComponent = (<TDate>(props: DesktopDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type DesktopTimePickerComponent = (<TDate>(props: DesktopTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type DesktopTimePickerComponent = (<TDate>(props: DesktopTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -60,13 +60,13 @@ export type LoadingButtonTypeMap<
60
60
  *
61
61
  * Demos:
62
62
  *
63
- * - [Button Group](https://mui.com/material-ui/react-button-group/)
64
- * - [Button](https://mui.com/material-ui/react-button/)
63
+ * - [Button Group](https://next.mui.com/material-ui/react-button-group/)
64
+ * - [Button](https://next.mui.com/material-ui/react-button/)
65
65
  *
66
66
  * API:
67
67
  *
68
- * - [LoadingButton API](https://mui.com/material-ui/api/loading-button/)
69
- * - inherits [Button API](https://mui.com/material-ui/api/button/)
68
+ * - [LoadingButton API](https://next.mui.com/material-ui/api/loading-button/)
69
+ * - inherits [Button API](https://next.mui.com/material-ui/api/button/)
70
70
  */
71
71
  declare const LoadingButton: ExtendButton<LoadingButtonTypeMap>;
72
72
 
@@ -1,20 +1,18 @@
1
1
  'use client';
2
2
 
3
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
- import _extends from "@babel/runtime/helpers/esm/extends";
5
- const _excluded = ["children", "disabled", "id", "loading", "loadingIndicator", "loadingPosition", "variant"];
6
3
  import * as React from 'react';
7
4
  import PropTypes from 'prop-types';
8
5
  import { chainPropTypes } from '@mui/utils';
9
6
  import { capitalize, unstable_useId as useId } from '@mui/material/utils';
10
7
  import { unstable_composeClasses as composeClasses } from '@mui/base';
11
- import { styled, useThemeProps } from '@mui/material/styles';
12
8
  import Button from '@mui/material/Button';
13
9
  import { ButtonGroupContext } from '@mui/material/ButtonGroup';
14
10
  import CircularProgress from '@mui/material/CircularProgress';
15
11
  import resolveProps from '@mui/utils/resolveProps';
12
+ import { styled, createUseThemeProps } from '../zero-styled';
16
13
  import loadingButtonClasses, { getLoadingButtonUtilityClass } from './loadingButtonClasses';
17
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ const useThemeProps = createUseThemeProps('MuiLoadingButton');
18
16
  const useUtilityClasses = ownerState => {
19
17
  const {
20
18
  loading,
@@ -28,10 +26,14 @@ const useUtilityClasses = ownerState => {
28
26
  loadingIndicator: ['loadingIndicator', loading && `loadingIndicator${capitalize(loadingPosition)}`]
29
27
  };
30
28
  const composedClasses = composeClasses(slots, getLoadingButtonUtilityClass, classes);
31
- return _extends({}, classes, composedClasses);
29
+ return {
30
+ ...classes,
31
+ // forward the outlined, color, etc. classes to Button
32
+ ...composedClasses
33
+ };
32
34
  };
33
35
 
34
- // TODO use `import { rootShouldForwardProp } from '../styles/styled';` once move to core
36
+ // TODO use `import rootShouldForwardProp from '../styles/rootShouldForwardProp';` once move to core
35
37
  const rootShouldForwardProp = prop => prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as' && prop !== 'classes';
36
38
  const LoadingButtonRoot = styled(Button, {
37
39
  shouldForwardProp: prop => rootShouldForwardProp(prop) || prop === 'classes',
@@ -45,38 +47,53 @@ const LoadingButtonRoot = styled(Button, {
45
47
  }];
46
48
  }
47
49
  })(({
48
- ownerState,
49
50
  theme
50
- }) => _extends({
51
+ }) => ({
51
52
  [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {
52
53
  transition: theme.transitions.create(['opacity'], {
53
54
  duration: theme.transitions.duration.short
54
55
  }),
55
56
  opacity: 0
56
- }
57
- }, ownerState.loadingPosition === 'center' && {
58
- transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {
59
- duration: theme.transitions.duration.short
60
- }),
61
- [`&.${loadingButtonClasses.loading}`]: {
62
- color: 'transparent'
63
- }
64
- }, ownerState.loadingPosition === 'start' && ownerState.fullWidth && {
65
- [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {
66
- transition: theme.transitions.create(['opacity'], {
67
- duration: theme.transitions.duration.short
68
- }),
69
- opacity: 0,
70
- marginRight: -8
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
- }
57
+ },
58
+ variants: [{
59
+ props: {
60
+ loadingPosition: 'center'
61
+ },
62
+ style: {
63
+ transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color'], {
64
+ duration: theme.transitions.duration.short
65
+ }),
66
+ [`&.${loadingButtonClasses.loading}`]: {
67
+ color: 'transparent'
68
+ }
69
+ }
70
+ }, {
71
+ props: ({
72
+ ownerState
73
+ }) => ownerState.loadingPosition === 'start' && ownerState.fullWidth,
74
+ style: {
75
+ [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {
76
+ transition: theme.transitions.create(['opacity'], {
77
+ duration: theme.transitions.duration.short
78
+ }),
79
+ opacity: 0,
80
+ marginRight: -8
81
+ }
82
+ }
83
+ }, {
84
+ props: ({
85
+ ownerState
86
+ }) => ownerState.loadingPosition === 'end' && ownerState.fullWidth,
87
+ style: {
88
+ [`& .${loadingButtonClasses.startIconLoadingStart}, & .${loadingButtonClasses.endIconLoadingEnd}`]: {
89
+ transition: theme.transitions.create(['opacity'], {
90
+ duration: theme.transitions.duration.short
91
+ }),
92
+ opacity: 0,
93
+ marginLeft: -8
94
+ }
95
+ }
96
+ }]
80
97
  }));
81
98
  const LoadingButtonLoadingIndicator = styled('span', {
82
99
  name: 'MuiLoadingButton',
@@ -88,30 +105,85 @@ const LoadingButtonLoadingIndicator = styled('span', {
88
105
  return [styles.loadingIndicator, styles[`loadingIndicator${capitalize(ownerState.loadingPosition)}`]];
89
106
  }
90
107
  })(({
91
- theme,
92
- ownerState
93
- }) => _extends({
108
+ theme
109
+ }) => ({
94
110
  position: 'absolute',
95
111
  visibility: 'visible',
96
- display: 'flex'
97
- }, ownerState.loadingPosition === 'start' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {
98
- left: ownerState.size === 'small' ? 10 : 14
99
- }, ownerState.loadingPosition === 'start' && ownerState.variant === 'text' && {
100
- left: 6
101
- }, ownerState.loadingPosition === 'center' && {
102
- left: '50%',
103
- transform: 'translate(-50%)',
104
- color: (theme.vars || theme).palette.action.disabled
105
- }, ownerState.loadingPosition === 'end' && (ownerState.variant === 'outlined' || ownerState.variant === 'contained') && {
106
- right: ownerState.size === 'small' ? 10 : 14
107
- }, ownerState.loadingPosition === 'end' && ownerState.variant === 'text' && {
108
- right: 6
109
- }, ownerState.loadingPosition === 'start' && ownerState.fullWidth && {
110
- position: 'relative',
111
- left: -10
112
- }, ownerState.loadingPosition === 'end' && ownerState.fullWidth && {
113
- position: 'relative',
114
- right: -10
112
+ display: 'flex',
113
+ variants: [{
114
+ props: {
115
+ loadingPosition: 'start',
116
+ size: 'small'
117
+ },
118
+ style: {
119
+ left: 10
120
+ }
121
+ }, {
122
+ props: ({
123
+ loadingPosition,
124
+ ownerState
125
+ }) => loadingPosition === 'start' && ownerState.size !== 'small',
126
+ style: {
127
+ left: 14
128
+ }
129
+ }, {
130
+ props: {
131
+ variant: 'text',
132
+ loadingPosition: 'start'
133
+ },
134
+ style: {
135
+ left: 6
136
+ }
137
+ }, {
138
+ props: {
139
+ loadingPosition: 'center'
140
+ },
141
+ style: {
142
+ left: '50%',
143
+ transform: 'translate(-50%)',
144
+ color: (theme.vars || theme).palette.action.disabled
145
+ }
146
+ }, {
147
+ props: {
148
+ loadingPosition: 'end',
149
+ size: 'small'
150
+ },
151
+ style: {
152
+ right: 10
153
+ }
154
+ }, {
155
+ props: ({
156
+ loadingPosition,
157
+ ownerState
158
+ }) => loadingPosition === 'end' && ownerState.size !== 'small',
159
+ style: {
160
+ right: 14
161
+ }
162
+ }, {
163
+ props: {
164
+ variant: 'text',
165
+ loadingPosition: 'end'
166
+ },
167
+ style: {
168
+ right: 6
169
+ }
170
+ }, {
171
+ props: ({
172
+ ownerState
173
+ }) => ownerState.loadingPosition === 'start' && ownerState.fullWidth,
174
+ style: {
175
+ position: 'relative',
176
+ left: -10
177
+ }
178
+ }, {
179
+ props: ({
180
+ ownerState
181
+ }) => ownerState.loadingPosition === 'end' && ownerState.fullWidth,
182
+ style: {
183
+ position: 'relative',
184
+ right: -10
185
+ }
186
+ }]
115
187
  }));
116
188
  const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inProps, ref) {
117
189
  const contextProps = React.useContext(ButtonGroupContext);
@@ -121,44 +193,45 @@ const LoadingButton = /*#__PURE__*/React.forwardRef(function LoadingButton(inPro
121
193
  name: 'MuiLoadingButton'
122
194
  });
123
195
  const {
124
- children,
125
- disabled = false,
126
- id: idProp,
127
- loading = false,
128
- loadingIndicator: loadingIndicatorProp,
129
- loadingPosition = 'center',
130
- variant = 'text'
131
- } = props,
132
- other = _objectWithoutPropertiesLoose(props, _excluded);
196
+ children,
197
+ disabled = false,
198
+ id: idProp,
199
+ loading = false,
200
+ loadingIndicator: loadingIndicatorProp,
201
+ loadingPosition = 'center',
202
+ variant = 'text',
203
+ ...other
204
+ } = props;
133
205
  const id = useId(idProp);
134
206
  const loadingIndicator = loadingIndicatorProp ?? /*#__PURE__*/_jsx(CircularProgress, {
135
207
  "aria-labelledby": id,
136
208
  color: "inherit",
137
209
  size: 16
138
210
  });
139
- const ownerState = _extends({}, props, {
211
+ const ownerState = {
212
+ ...props,
140
213
  disabled,
141
214
  loading,
142
215
  loadingIndicator,
143
216
  loadingPosition,
144
217
  variant
145
- });
218
+ };
146
219
  const classes = useUtilityClasses(ownerState);
147
220
  const loadingButtonLoadingIndicator = loading ? /*#__PURE__*/_jsx(LoadingButtonLoadingIndicator, {
148
221
  className: classes.loadingIndicator,
149
222
  ownerState: ownerState,
150
223
  children: loadingIndicator
151
224
  }) : null;
152
- return /*#__PURE__*/_jsxs(LoadingButtonRoot, _extends({
225
+ return /*#__PURE__*/_jsxs(LoadingButtonRoot, {
153
226
  disabled: disabled || loading,
154
227
  id: id,
155
- ref: ref
156
- }, other, {
228
+ ref: ref,
229
+ ...other,
157
230
  variant: variant,
158
231
  classes: classes,
159
232
  ownerState: ownerState,
160
233
  children: [ownerState.loadingPosition === 'end' ? children : loadingButtonLoadingIndicator, ownerState.loadingPosition === 'end' ? loadingButtonLoadingIndicator : children]
161
- }));
234
+ });
162
235
  });
163
236
  process.env.NODE_ENV !== "production" ? LoadingButton.propTypes /* remove-proptypes */ = {
164
237
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type LocalizationProviderComponent = ((props: LocalizationProviderProps & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type LocalizationProviderComponent = ((props: LocalizationProviderProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -56,11 +56,11 @@ export interface MasonryTypeMap<
56
56
  *
57
57
  * Demos:
58
58
  *
59
- * - [Masonry](https://mui.com/material-ui/react-masonry/)
59
+ * - [Masonry](https://next.mui.com/material-ui/react-masonry/)
60
60
  *
61
61
  * API:
62
62
  *
63
- * - [Masonry API](https://mui.com/material-ui/api/masonry/)
63
+ * - [Masonry API](https://next.mui.com/material-ui/api/masonry/)
64
64
  */
65
65
  declare const Masonry: OverridableComponent<MasonryTypeMap>;
66
66
 
@@ -1,8 +1,5 @@
1
1
  'use client';
2
2
 
3
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
- import _extends from "@babel/runtime/helpers/esm/extends";
5
- const _excluded = ["children", "className", "component", "columns", "spacing", "sequential", "defaultColumns", "defaultHeight", "defaultSpacing"];
6
3
  import { unstable_composeClasses as composeClasses } from '@mui/base';
7
4
  import * as ReactDOM from 'react-dom';
8
5
  import { styled, useThemeProps } from '@mui/material/styles';
@@ -57,11 +54,16 @@ export const getStyle = ({
57
54
  }
58
55
  stylesSSR.height = ownerState.defaultHeight;
59
56
  stylesSSR.margin = -(defaultSpacing / 2);
60
- stylesSSR['& > *'] = _extends({}, styles['& > *'], orderStyleSSR, {
57
+ stylesSSR['& > *'] = {
58
+ ...styles['& > *'],
59
+ ...orderStyleSSR,
61
60
  margin: defaultSpacing / 2,
62
61
  width: `calc(${(100 / ownerState.defaultColumns).toFixed(2)}% - ${defaultSpacing}px)`
63
- });
64
- return _extends({}, styles, stylesSSR);
62
+ };
63
+ return {
64
+ ...styles,
65
+ ...stylesSSR
66
+ };
65
67
  }
66
68
  const spacingValues = resolveBreakpointValues({
67
69
  values: ownerState.spacing,
@@ -77,14 +79,15 @@ export const getStyle = ({
77
79
  } else {
78
80
  spacing = propValue;
79
81
  }
80
- return _extends({
82
+ return {
81
83
  margin: `calc(0px - (${spacing} / 2))`,
82
84
  '& > *': {
83
85
  margin: `calc(${spacing} / 2)`
84
- }
85
- }, ownerState.maxColumnHeight && {
86
- height: typeof spacing === 'number' ? Math.ceil(ownerState.maxColumnHeight + parseToNumber(spacing)) : `calc(${ownerState.maxColumnHeight}px + ${spacing})`
87
- });
86
+ },
87
+ ...(ownerState.maxColumnHeight && {
88
+ height: typeof spacing === 'number' ? Math.ceil(ownerState.maxColumnHeight + parseToNumber(spacing)) : `calc(${ownerState.maxColumnHeight}px + ${spacing})`
89
+ })
90
+ };
88
91
  };
89
92
  styles = deepmerge(styles, handleBreakpoints({
90
93
  theme
@@ -142,22 +145,23 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
142
145
  name: 'MuiMasonry'
143
146
  });
144
147
  const {
145
- children,
146
- className,
147
- component = 'div',
148
- columns = 4,
149
- spacing = 1,
150
- sequential = false,
151
- defaultColumns,
152
- defaultHeight,
153
- defaultSpacing
154
- } = props,
155
- other = _objectWithoutPropertiesLoose(props, _excluded);
148
+ children,
149
+ className,
150
+ component = 'div',
151
+ columns = 4,
152
+ spacing = 1,
153
+ sequential = false,
154
+ defaultColumns,
155
+ defaultHeight,
156
+ defaultSpacing,
157
+ ...other
158
+ } = props;
156
159
  const masonryRef = React.useRef();
157
160
  const [maxColumnHeight, setMaxColumnHeight] = React.useState();
158
161
  const isSSR = !maxColumnHeight && defaultHeight && defaultColumns !== undefined && defaultSpacing !== undefined;
159
162
  const [numberOfLineBreaks, setNumberOfLineBreaks] = React.useState(isSSR ? defaultColumns - 1 : 0);
160
- const ownerState = _extends({}, props, {
163
+ const ownerState = {
164
+ ...props,
161
165
  spacing,
162
166
  columns,
163
167
  maxColumnHeight,
@@ -165,7 +169,7 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
165
169
  defaultHeight,
166
170
  defaultSpacing,
167
171
  isSSR
168
- });
172
+ };
169
173
  const classes = useUtilityClasses(ownerState);
170
174
  const handleResize = React.useCallback(masonryChildren => {
171
175
  if (!masonryRef.current || !masonryChildren || masonryChildren.length === 0) {
@@ -263,18 +267,19 @@ const Masonry = /*#__PURE__*/React.forwardRef(function Masonry(inProps, ref) {
263
267
  // a line break at the end of each column prevents columns from merging
264
268
  const lineBreaks = new Array(numberOfLineBreaks).fill('').map((_, index) => /*#__PURE__*/_jsx("span", {
265
269
  "data-class": "line-break",
266
- style: _extends({}, lineBreakStyle, {
270
+ style: {
271
+ ...lineBreakStyle,
267
272
  order: index + 1
268
- })
273
+ }
269
274
  }, index));
270
- return /*#__PURE__*/_jsxs(MasonryRoot, _extends({
275
+ return /*#__PURE__*/_jsxs(MasonryRoot, {
271
276
  as: component,
272
277
  className: clsx(classes.root, className),
273
278
  ref: handleRef,
274
- ownerState: ownerState
275
- }, other, {
279
+ ownerState: ownerState,
280
+ ...other,
276
281
  children: [children, lineBreaks]
277
- }));
282
+ });
278
283
  });
279
284
  process.env.NODE_ENV !== "production" ? Masonry.propTypes /* remove-proptypes */ = {
280
285
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type MobileDatePickerComponent = (<TDate>(props: MobileDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type MobileDatePickerComponent = (<TDate>(props: MobileDatePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type MobileDateRangePickerComponent = (<TDate>(props: MobileDateRangePickerProps & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type MobileDateRangePickerComponent = (<TDate>(props: MobileDateRangePickerProps & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type MobileDateTimePickerComponent = (<TDate>(props: MobileDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type MobileDateTimePickerComponent = (<TDate>(props: MobileDateTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type MobileTimePickerComponent = (<TDate>(props: MobileTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type MobileTimePickerComponent = (<TDate>(props: MobileTimePickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type MonthPickerComponent = (<TDate>(props: MonthPickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type MonthPickerComponent = (<TDate>(props: MonthPickerProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
3
  import * as React from 'react';
5
4
  import Pagination from '@mui/material/Pagination';
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -14,7 +13,8 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedPagination(props
14
13
  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'));
15
14
  warnedOnce = true;
16
15
  }
17
- return /*#__PURE__*/_jsx(Pagination, _extends({
18
- ref: ref
19
- }, props));
16
+ return /*#__PURE__*/_jsx(Pagination, {
17
+ ref: ref,
18
+ ...props
19
+ });
20
20
  });
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
3
  import * as React from 'react';
5
4
  import PaginationItem from '@mui/material/PaginationItem';
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -14,7 +13,8 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedPaginationItem(p
14
13
  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'));
15
14
  warnedOnce = true;
16
15
  }
17
- return /*#__PURE__*/_jsx(PaginationItem, _extends({
18
- ref: ref
19
- }, props));
16
+ return /*#__PURE__*/_jsx(PaginationItem, {
17
+ ref: ref,
18
+ ...props
19
+ });
20
20
  });
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- type PickersDayComponent = (<TDate>(props: PickersDayProps<TDate> & React.RefAttributes<HTMLDivElement>) => JSX.Element) & {
2
+ type PickersDayComponent = (<TDate>(props: PickersDayProps<TDate> & React.RefAttributes<HTMLDivElement>) => React.JSX.Element) & {
3
3
  propTypes?: any;
4
4
  };
5
5
  /**
package/Rating/Rating.js CHANGED
@@ -1,6 +1,5 @@
1
1
  'use client';
2
2
 
3
- import _extends from "@babel/runtime/helpers/esm/extends";
4
3
  import * as React from 'react';
5
4
  import Rating from '@mui/material/Rating';
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -14,7 +13,8 @@ export default /*#__PURE__*/React.forwardRef(function DeprecatedRating(props, re
14
13
  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'));
15
14
  warnedOnce = true;
16
15
  }
17
- return /*#__PURE__*/_jsx(Rating, _extends({
18
- ref: ref
19
- }, props));
16
+ return /*#__PURE__*/_jsx(Rating, {
17
+ ref: ref,
18
+ ...props
19
+ });
20
20
  });