@mui/material 6.0.0-alpha.4 → 6.0.0-alpha.6

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 (272) hide show
  1. package/Accordion/Accordion.d.ts +2 -2
  2. package/Accordion/Accordion.js +2 -2
  3. package/AccordionSummary/accordionSummaryClasses.d.ts +1 -1
  4. package/Alert/Alert.d.ts +2 -2
  5. package/Alert/Alert.js +2 -2
  6. package/Alert/alertClasses.d.ts +12 -12
  7. package/Avatar/Avatar.d.ts +1 -1
  8. package/Avatar/Avatar.js +1 -1
  9. package/Backdrop/Backdrop.d.ts +1 -1
  10. package/Backdrop/Backdrop.js +1 -1
  11. package/Badge/Badge.d.ts +2 -2
  12. package/Badge/Badge.js +2 -2
  13. package/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
  14. package/Button/Button.js +1 -1
  15. package/Button/buttonClasses.d.ts +33 -33
  16. package/ButtonGroup/buttonGroupClasses.d.ts +17 -17
  17. package/CHANGELOG.md +86 -0
  18. package/Checkbox/Checkbox.js +3 -1
  19. package/Chip/chipClasses.d.ts +28 -26
  20. package/Chip/chipClasses.js +1 -1
  21. package/Collapse/Collapse.js +66 -35
  22. package/Dialog/Dialog.js +105 -61
  23. package/DialogActions/DialogActions.js +16 -12
  24. package/DialogContent/DialogContent.js +25 -15
  25. package/DialogContentText/DialogContentText.js +3 -2
  26. package/DialogTitle/DialogTitle.js +2 -2
  27. package/Divider/Divider.d.ts +1 -1
  28. package/Divider/Divider.js +1 -1
  29. package/Drawer/Drawer.js +73 -32
  30. package/Fab/Fab.js +1 -1
  31. package/FilledInput/FilledInput.d.ts +1 -0
  32. package/FilledInput/FilledInput.js +170 -87
  33. package/FormControlLabel/FormControlLabel.d.ts +21 -14
  34. package/FormControlLabel/FormControlLabel.js +22 -4
  35. package/FormHelperText/FormHelperText.js +2 -2
  36. package/FormLabel/FormLabel.js +23 -13
  37. package/Grow/Grow.js +3 -1
  38. package/Icon/Icon.js +63 -23
  39. package/ImageList/ImageList.js +2 -2
  40. package/ImageListItem/ImageListItem.js +2 -2
  41. package/ImageListItemBar/ImageListItemBar.js +2 -2
  42. package/Input/Input.d.ts +1 -0
  43. package/Input/Input.js +84 -61
  44. package/InputAdornment/InputAdornment.js +37 -21
  45. package/InputBase/InputBase.js +58 -28
  46. package/InputLabel/InputLabel.js +120 -58
  47. package/Link/Link.js +99 -54
  48. package/Link/getTextDecoration.d.ts +2 -8
  49. package/Link/getTextDecoration.js +16 -8
  50. package/List/List.js +22 -13
  51. package/ListItem/ListItem.js +2 -2
  52. package/ListItemAvatar/ListItemAvatar.js +2 -2
  53. package/ListItemButton/ListItemButton.js +3 -2
  54. package/ListItemIcon/ListItemIcon.js +14 -9
  55. package/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
  56. package/ListItemText/ListItemText.js +2 -2
  57. package/ListSubheader/ListSubheader.js +5 -3
  58. package/Menu/Menu.js +3 -2
  59. package/MenuItem/MenuItem.js +47 -27
  60. package/NativeSelect/NativeSelectInput.js +78 -49
  61. package/OutlinedInput/NotchedOutline.js +60 -43
  62. package/OutlinedInput/OutlinedInput.js +97 -39
  63. package/Pagination/Pagination.js +2 -2
  64. package/PaginationItem/PaginationItem.d.ts +26 -14
  65. package/PaginationItem/PaginationItem.js +64 -20
  66. package/PaginationItem/paginationItemClasses.d.ts +4 -4
  67. package/Paper/Paper.js +44 -21
  68. package/Radio/Radio.js +5 -3
  69. package/Radio/RadioButtonIcon.js +1 -1
  70. package/Rating/Rating.js +3 -2
  71. package/Select/Select.js +2 -1
  72. package/Select/SelectInput.js +8 -6
  73. package/Skeleton/Skeleton.js +109 -61
  74. package/Slider/Slider.d.ts +2 -2
  75. package/Slider/Slider.js +2 -2
  76. package/Snackbar/Snackbar.js +66 -40
  77. package/SnackbarContent/SnackbarContent.js +2 -2
  78. package/SpeedDial/SpeedDial.d.ts +28 -1
  79. package/SpeedDial/SpeedDial.js +107 -49
  80. package/SpeedDialAction/SpeedDialAction.js +50 -24
  81. package/SpeedDialIcon/SpeedDialIcon.js +37 -16
  82. package/StepConnector/stepConnectorClasses.d.ts +2 -2
  83. package/StepLabel/StepLabel.d.ts +3 -3
  84. package/StepLabel/StepLabel.js +3 -3
  85. package/SvgIcon/SvgIcon.js +73 -21
  86. package/SwipeableDrawer/SwipeArea.js +39 -18
  87. package/Tab/Tab.js +127 -55
  88. package/TabScrollButton/TabScrollButton.js +27 -15
  89. package/Table/Table.js +2 -2
  90. package/TableBody/TableBody.js +2 -2
  91. package/TableCell/TableCell.js +2 -2
  92. package/TableContainer/TableContainer.js +2 -2
  93. package/TableFooter/TableFooter.js +2 -2
  94. package/TableHead/TableHead.js +2 -2
  95. package/TablePagination/TablePagination.js +2 -2
  96. package/TableRow/TableRow.js +2 -2
  97. package/TableSortLabel/TableSortLabel.js +2 -2
  98. package/Tabs/Tabs.js +107 -54
  99. package/TextField/TextField.js +2 -2
  100. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
  101. package/Toolbar/Toolbar.js +3 -7
  102. package/Tooltip/Tooltip.js +185 -88
  103. package/Typography/Typography.js +89 -39
  104. package/index.js +1 -1
  105. package/internal/SwitchBase.js +39 -11
  106. package/modern/Accordion/Accordion.js +2 -2
  107. package/modern/Alert/Alert.js +2 -2
  108. package/modern/Avatar/Avatar.js +1 -1
  109. package/modern/Backdrop/Backdrop.js +1 -1
  110. package/modern/Badge/Badge.js +2 -2
  111. package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
  112. package/modern/Button/Button.js +1 -1
  113. package/modern/Checkbox/Checkbox.js +3 -1
  114. package/modern/Chip/chipClasses.js +1 -1
  115. package/modern/Collapse/Collapse.js +66 -35
  116. package/modern/Dialog/Dialog.js +105 -61
  117. package/modern/DialogActions/DialogActions.js +16 -12
  118. package/modern/DialogContent/DialogContent.js +25 -15
  119. package/modern/DialogContentText/DialogContentText.js +3 -2
  120. package/modern/DialogTitle/DialogTitle.js +2 -2
  121. package/modern/Divider/Divider.js +1 -1
  122. package/modern/Drawer/Drawer.js +73 -32
  123. package/modern/Fab/Fab.js +1 -1
  124. package/modern/FilledInput/FilledInput.js +170 -87
  125. package/modern/FormControlLabel/FormControlLabel.js +22 -4
  126. package/modern/FormHelperText/FormHelperText.js +2 -2
  127. package/modern/FormLabel/FormLabel.js +23 -13
  128. package/modern/Grow/Grow.js +3 -1
  129. package/modern/Icon/Icon.js +63 -23
  130. package/modern/ImageList/ImageList.js +2 -2
  131. package/modern/ImageListItem/ImageListItem.js +2 -2
  132. package/modern/ImageListItemBar/ImageListItemBar.js +2 -2
  133. package/modern/Input/Input.js +84 -61
  134. package/modern/InputAdornment/InputAdornment.js +37 -21
  135. package/modern/InputBase/InputBase.js +58 -28
  136. package/modern/InputLabel/InputLabel.js +120 -58
  137. package/modern/Link/Link.js +99 -54
  138. package/modern/Link/getTextDecoration.js +16 -8
  139. package/modern/List/List.js +22 -13
  140. package/modern/ListItem/ListItem.js +2 -2
  141. package/modern/ListItemAvatar/ListItemAvatar.js +2 -2
  142. package/modern/ListItemButton/ListItemButton.js +3 -2
  143. package/modern/ListItemIcon/ListItemIcon.js +14 -9
  144. package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
  145. package/modern/ListItemText/ListItemText.js +2 -2
  146. package/modern/ListSubheader/ListSubheader.js +5 -3
  147. package/modern/Menu/Menu.js +3 -2
  148. package/modern/MenuItem/MenuItem.js +47 -27
  149. package/modern/NativeSelect/NativeSelectInput.js +78 -49
  150. package/modern/OutlinedInput/NotchedOutline.js +60 -43
  151. package/modern/OutlinedInput/OutlinedInput.js +97 -39
  152. package/modern/Pagination/Pagination.js +2 -2
  153. package/modern/PaginationItem/PaginationItem.js +64 -20
  154. package/modern/Paper/Paper.js +44 -21
  155. package/modern/Radio/Radio.js +5 -3
  156. package/modern/Radio/RadioButtonIcon.js +1 -1
  157. package/modern/Rating/Rating.js +3 -2
  158. package/modern/Select/Select.js +2 -1
  159. package/modern/Select/SelectInput.js +8 -6
  160. package/modern/Skeleton/Skeleton.js +109 -61
  161. package/modern/Slider/Slider.js +2 -2
  162. package/modern/Snackbar/Snackbar.js +66 -40
  163. package/modern/SnackbarContent/SnackbarContent.js +2 -2
  164. package/modern/SpeedDial/SpeedDial.js +107 -49
  165. package/modern/SpeedDialAction/SpeedDialAction.js +50 -24
  166. package/modern/SpeedDialIcon/SpeedDialIcon.js +37 -16
  167. package/modern/StepLabel/StepLabel.js +3 -3
  168. package/modern/SvgIcon/SvgIcon.js +73 -21
  169. package/modern/SwipeableDrawer/SwipeArea.js +39 -18
  170. package/modern/Tab/Tab.js +127 -55
  171. package/modern/TabScrollButton/TabScrollButton.js +27 -15
  172. package/modern/Table/Table.js +2 -2
  173. package/modern/TableBody/TableBody.js +2 -2
  174. package/modern/TableCell/TableCell.js +2 -2
  175. package/modern/TableContainer/TableContainer.js +2 -2
  176. package/modern/TableFooter/TableFooter.js +2 -2
  177. package/modern/TableHead/TableHead.js +2 -2
  178. package/modern/TablePagination/TablePagination.js +2 -2
  179. package/modern/TableRow/TableRow.js +2 -2
  180. package/modern/TableSortLabel/TableSortLabel.js +2 -2
  181. package/modern/Tabs/Tabs.js +107 -54
  182. package/modern/TextField/TextField.js +2 -2
  183. package/modern/Toolbar/Toolbar.js +3 -7
  184. package/modern/Tooltip/Tooltip.js +185 -88
  185. package/modern/Typography/Typography.js +89 -39
  186. package/modern/index.js +1 -1
  187. package/modern/internal/SwitchBase.js +39 -11
  188. package/node/Accordion/Accordion.js +2 -2
  189. package/node/Alert/Alert.js +2 -2
  190. package/node/Avatar/Avatar.js +1 -1
  191. package/node/Backdrop/Backdrop.js +1 -1
  192. package/node/Badge/Badge.js +2 -2
  193. package/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -3
  194. package/node/Button/Button.js +2 -2
  195. package/node/Checkbox/Checkbox.js +3 -1
  196. package/node/Chip/chipClasses.js +1 -1
  197. package/node/Collapse/Collapse.js +70 -39
  198. package/node/Dialog/Dialog.js +110 -66
  199. package/node/DialogActions/DialogActions.js +18 -14
  200. package/node/DialogContent/DialogContent.js +27 -17
  201. package/node/DialogContentText/DialogContentText.js +6 -5
  202. package/node/DialogTitle/DialogTitle.js +4 -4
  203. package/node/Divider/Divider.js +1 -1
  204. package/node/Drawer/Drawer.js +78 -37
  205. package/node/Fab/Fab.js +2 -2
  206. package/node/FilledInput/FilledInput.js +176 -91
  207. package/node/FormControlLabel/FormControlLabel.js +23 -5
  208. package/node/FormHelperText/FormHelperText.js +4 -4
  209. package/node/FormLabel/FormLabel.js +26 -16
  210. package/node/Grow/Grow.js +3 -1
  211. package/node/Icon/Icon.js +65 -25
  212. package/node/ImageList/ImageList.js +4 -4
  213. package/node/ImageListItem/ImageListItem.js +4 -4
  214. package/node/ImageListItemBar/ImageListItemBar.js +8 -8
  215. package/node/Input/Input.js +87 -64
  216. package/node/InputAdornment/InputAdornment.js +39 -23
  217. package/node/InputBase/InputBase.js +61 -31
  218. package/node/InputLabel/InputLabel.js +123 -61
  219. package/node/Link/Link.js +101 -56
  220. package/node/Link/getTextDecoration.js +18 -10
  221. package/node/List/List.js +24 -15
  222. package/node/ListItem/ListItem.js +5 -5
  223. package/node/ListItemAvatar/ListItemAvatar.js +4 -4
  224. package/node/ListItemButton/ListItemButton.js +6 -5
  225. package/node/ListItemIcon/ListItemIcon.js +16 -11
  226. package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -4
  227. package/node/ListItemText/ListItemText.js +4 -4
  228. package/node/ListSubheader/ListSubheader.js +7 -5
  229. package/node/Menu/Menu.js +8 -7
  230. package/node/MenuItem/MenuItem.js +50 -30
  231. package/node/NativeSelect/NativeSelectInput.js +80 -53
  232. package/node/OutlinedInput/NotchedOutline.js +64 -47
  233. package/node/OutlinedInput/OutlinedInput.js +101 -43
  234. package/node/Pagination/Pagination.js +5 -5
  235. package/node/PaginationItem/PaginationItem.js +65 -20
  236. package/node/Paper/Paper.js +49 -28
  237. package/node/Radio/Radio.js +6 -4
  238. package/node/Radio/RadioButtonIcon.js +2 -2
  239. package/node/Rating/Rating.js +9 -8
  240. package/node/Select/Select.js +6 -5
  241. package/node/Select/SelectInput.js +9 -7
  242. package/node/Skeleton/Skeleton.js +113 -65
  243. package/node/Slider/Slider.js +2 -2
  244. package/node/Snackbar/Snackbar.js +68 -42
  245. package/node/SnackbarContent/SnackbarContent.js +6 -6
  246. package/node/SpeedDial/SpeedDial.js +111 -53
  247. package/node/SpeedDialAction/SpeedDialAction.js +54 -28
  248. package/node/SpeedDialIcon/SpeedDialIcon.js +39 -18
  249. package/node/StepLabel/StepLabel.js +3 -3
  250. package/node/SvgIcon/SvgIcon.js +79 -24
  251. package/node/SwipeableDrawer/SwipeArea.js +41 -20
  252. package/node/Tab/Tab.js +129 -57
  253. package/node/TabScrollButton/TabScrollButton.js +29 -17
  254. package/node/Table/Table.js +4 -4
  255. package/node/TableBody/TableBody.js +4 -4
  256. package/node/TableCell/TableCell.js +4 -4
  257. package/node/TableContainer/TableContainer.js +4 -4
  258. package/node/TableFooter/TableFooter.js +4 -4
  259. package/node/TableHead/TableHead.js +4 -4
  260. package/node/TablePagination/TablePagination.js +10 -10
  261. package/node/TableRow/TableRow.js +4 -4
  262. package/node/TableSortLabel/TableSortLabel.js +5 -5
  263. package/node/Tabs/Tabs.js +113 -60
  264. package/node/TextField/TextField.js +4 -4
  265. package/node/Toolbar/Toolbar.js +5 -9
  266. package/node/Tooltip/Tooltip.js +189 -92
  267. package/node/Typography/Typography.js +90 -40
  268. package/node/index.js +1 -1
  269. package/node/internal/SwitchBase.js +41 -13
  270. package/package.json +6 -6
  271. package/umd/material-ui.development.js +2777 -1334
  272. package/umd/material-ui.production.min.js +4 -4
@@ -6,21 +6,20 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _clsx = _interopRequireDefault(require("clsx"));
13
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
- var _system = require("@mui/system");
15
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
16
15
  var _styles = require("../styles");
17
- var _styled = _interopRequireDefault(require("../styles/styled"));
18
- var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
16
+ var _zeroStyled = require("../zero-styled");
19
17
  var _skeletonClasses = require("./skeletonClasses");
20
18
  var _jsxRuntime = require("react/jsx-runtime");
21
19
  const _excluded = ["animation", "className", "component", "height", "style", "variant", "width"];
22
20
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
23
21
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
+ const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiSkeleton');
24
23
  const useUtilityClasses = ownerState => {
25
24
  const {
26
25
  classes,
@@ -35,7 +34,7 @@ const useUtilityClasses = ownerState => {
35
34
  };
36
35
  return (0, _composeClasses.default)(slots, _skeletonClasses.getSkeletonUtilityClass, classes);
37
36
  };
38
- const pulseKeyframe = (0, _system.keyframes)`
37
+ const pulseKeyframe = (0, _zeroStyled.keyframes)`
39
38
  0% {
40
39
  opacity: 1;
41
40
  }
@@ -48,7 +47,7 @@ const pulseKeyframe = (0, _system.keyframes)`
48
47
  opacity: 1;
49
48
  }
50
49
  `;
51
- const waveKeyframe = (0, _system.keyframes)`
50
+ const waveKeyframe = (0, _zeroStyled.keyframes)`
52
51
  0% {
53
52
  transform: translateX(-100%);
54
53
  }
@@ -62,7 +61,17 @@ const waveKeyframe = (0, _system.keyframes)`
62
61
  transform: translateX(100%);
63
62
  }
64
63
  `;
65
- const SkeletonRoot = (0, _styled.default)('span', {
64
+
65
+ // This implementation is for supporting both Styled-components v4+ and Pigment CSS.
66
+ // A global animation has to be created here for Styled-components v4+ (https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#12).
67
+ // which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).
68
+ const pulseAnimation = typeof pulseKeyframe !== 'string' ? (0, _zeroStyled.css)`
69
+ animation: ${pulseKeyframe} 2s ease-in-out 0.5s infinite;
70
+ ` : null;
71
+ const waveAnimation = typeof waveKeyframe !== 'string' ? (0, _zeroStyled.css)`
72
+ animation: ${waveKeyframe} 2s linear 0.5s infinite;
73
+ ` : null;
74
+ const SkeletonRoot = (0, _zeroStyled.styled)('span', {
66
75
  name: 'MuiSkeleton',
67
76
  slot: 'Root',
68
77
  overridesResolver: (props, styles) => {
@@ -72,72 +81,111 @@ const SkeletonRoot = (0, _styled.default)('span', {
72
81
  return [styles.root, styles[ownerState.variant], ownerState.animation !== false && styles[ownerState.animation], ownerState.hasChildren && styles.withChildren, ownerState.hasChildren && !ownerState.width && styles.fitContent, ownerState.hasChildren && !ownerState.height && styles.heightAuto];
73
82
  }
74
83
  })(({
75
- theme,
76
- ownerState
84
+ theme
77
85
  }) => {
78
86
  const radiusUnit = (0, _styles.unstable_getUnit)(theme.shape.borderRadius) || 'px';
79
87
  const radiusValue = (0, _styles.unstable_toUnitless)(theme.shape.borderRadius);
80
- return (0, _extends2.default)({
88
+ return {
81
89
  display: 'block',
82
90
  // Create a "on paper" color with sufficient contrast retaining the color
83
91
  backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : (0, _styles.alpha)(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
84
- height: '1.2em'
85
- }, ownerState.variant === 'text' && {
86
- marginTop: 0,
87
- marginBottom: 0,
88
- height: 'auto',
89
- transformOrigin: '0 55%',
90
- transform: 'scale(1, 0.60)',
91
- borderRadius: `${radiusValue}${radiusUnit}/${Math.round(radiusValue / 0.6 * 10) / 10}${radiusUnit}`,
92
- '&:empty:before': {
93
- content: '"\\00a0"'
94
- }
95
- }, ownerState.variant === 'circular' && {
96
- borderRadius: '50%'
97
- }, ownerState.variant === 'rounded' && {
98
- borderRadius: (theme.vars || theme).shape.borderRadius
99
- }, ownerState.hasChildren && {
100
- '& > *': {
101
- visibility: 'hidden'
102
- }
103
- }, ownerState.hasChildren && !ownerState.width && {
104
- maxWidth: 'fit-content'
105
- }, ownerState.hasChildren && !ownerState.height && {
106
- height: 'auto'
107
- });
108
- }, ({
109
- ownerState
110
- }) => ownerState.animation === 'pulse' && (0, _system.css)`
111
- animation: ${pulseKeyframe} 2s ease-in-out 0.5s infinite;
112
- `, ({
113
- ownerState,
114
- theme
115
- }) => ownerState.animation === 'wave' && (0, _system.css)`
116
- position: relative;
117
- overflow: hidden;
118
-
119
- /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
120
- -webkit-mask-image: -webkit-radial-gradient(white, black);
121
-
122
- &::after {
123
- animation: ${waveKeyframe} 2s linear 0.5s infinite;
124
- background: linear-gradient(
125
- 90deg,
126
- transparent,
127
- ${(theme.vars || theme).palette.action.hover},
128
- transparent
129
- );
130
- content: '';
131
- position: absolute;
132
- transform: translateX(-100%); /* Avoid flash during server-side hydration */
133
- bottom: 0;
134
- left: 0;
135
- right: 0;
136
- top: 0;
92
+ height: '1.2em',
93
+ variants: [{
94
+ props: {
95
+ variant: 'text'
96
+ },
97
+ style: {
98
+ marginTop: 0,
99
+ marginBottom: 0,
100
+ height: 'auto',
101
+ transformOrigin: '0 55%',
102
+ transform: 'scale(1, 0.60)',
103
+ borderRadius: `${radiusValue}${radiusUnit}/${Math.round(radiusValue / 0.6 * 10) / 10}${radiusUnit}`,
104
+ '&:empty:before': {
105
+ content: '"\\00a0"'
106
+ }
137
107
  }
138
- `);
108
+ }, {
109
+ props: {
110
+ variant: 'circular'
111
+ },
112
+ style: {
113
+ borderRadius: '50%'
114
+ }
115
+ }, {
116
+ props: {
117
+ variant: 'rounded'
118
+ },
119
+ style: {
120
+ borderRadius: (theme.vars || theme).shape.borderRadius
121
+ }
122
+ }, {
123
+ props: ({
124
+ ownerState
125
+ }) => ownerState.hasChildren,
126
+ style: {
127
+ '& > *': {
128
+ visibility: 'hidden'
129
+ }
130
+ }
131
+ }, {
132
+ props: ({
133
+ ownerState
134
+ }) => ownerState.hasChildren && !ownerState.width,
135
+ style: {
136
+ maxWidth: 'fit-content'
137
+ }
138
+ }, {
139
+ props: ({
140
+ ownerState
141
+ }) => ownerState.hasChildren && !ownerState.height,
142
+ style: {
143
+ height: 'auto'
144
+ }
145
+ }, {
146
+ props: {
147
+ animation: 'pulse'
148
+ },
149
+ style: pulseAnimation || {
150
+ animation: `${pulseKeyframe} 2s ease-in-out 0.5s infinite`
151
+ }
152
+ }, {
153
+ props: {
154
+ animation: 'wave'
155
+ },
156
+ style: {
157
+ position: 'relative',
158
+ overflow: 'hidden',
159
+ /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
160
+ WebkitMaskImage: '-webkit-radial-gradient(white, black)',
161
+ '&::after': {
162
+ background: `linear-gradient(
163
+ 90deg,
164
+ transparent,
165
+ ${(theme.vars || theme).palette.action.hover},
166
+ transparent
167
+ )`,
168
+ content: '""',
169
+ position: 'absolute',
170
+ transform: 'translateX(-100%)' /* Avoid flash during server-side hydration */,
171
+ bottom: 0,
172
+ left: 0,
173
+ right: 0,
174
+ top: 0
175
+ }
176
+ }
177
+ }, {
178
+ props: {
179
+ animation: 'wave'
180
+ },
181
+ style: waveAnimation || {
182
+ animation: `${waveKeyframe} 2s linear 0.5s infinite`
183
+ }
184
+ }]
185
+ };
186
+ });
139
187
  const Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {
140
- const props = (0, _useThemeProps.default)({
188
+ const props = useThemeProps({
141
189
  props: inProps,
142
190
  name: 'MuiSkeleton'
143
191
  });
@@ -820,7 +820,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
820
820
  /**
821
821
  * The components used for each slot inside.
822
822
  *
823
- * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
823
+ * @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
824
824
  *
825
825
  * @default {}
826
826
  */
@@ -838,7 +838,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
838
838
  * The extra props for the slot components.
839
839
  * You can override the existing props or add new ones.
840
840
  *
841
- * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
841
+ * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
842
842
  *
843
843
  * @default {}
844
844
  */
@@ -6,17 +6,16 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.default = void 0;
9
- var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
10
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
11
  var React = _interopRequireWildcard(require("react"));
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _utils = require("@mui/base/utils");
14
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
15
15
  var _ClickAwayListener = require("@mui/base/ClickAwayListener");
16
16
  var _useSnackbar = require("@mui/base/useSnackbar");
17
- var _styled = _interopRequireDefault(require("../styles/styled"));
17
+ var _zeroStyled = require("../zero-styled");
18
18
  var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
19
- var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
20
19
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
21
20
  var _Grow = _interopRequireDefault(require("../Grow"));
22
21
  var _SnackbarContent = _interopRequireDefault(require("../SnackbarContent"));
@@ -26,6 +25,7 @@ const _excluded = ["onEnter", "onExited"],
26
25
  _excluded2 = ["action", "anchorOrigin", "autoHideDuration", "children", "className", "ClickAwayListenerProps", "ContentProps", "disableWindowBlurListener", "message", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "TransitionComponent", "transitionDuration", "TransitionProps"];
27
26
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
28
27
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
28
+ const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiSnackbar');
29
29
  const useUtilityClasses = ownerState => {
30
30
  const {
31
31
  classes,
@@ -36,7 +36,7 @@ const useUtilityClasses = ownerState => {
36
36
  };
37
37
  return (0, _composeClasses.default)(slots, _snackbarClasses.getSnackbarUtilityClass, classes);
38
38
  };
39
- const SnackbarRoot = (0, _styled.default)('div', {
39
+ const SnackbarRoot = (0, _zeroStyled.styled)('div', {
40
40
  name: 'MuiSnackbar',
41
41
  slot: 'Root',
42
42
  overridesResolver: (props, styles) => {
@@ -46,46 +46,72 @@ const SnackbarRoot = (0, _styled.default)('div', {
46
46
  return [styles.root, styles[`anchorOrigin${(0, _capitalize.default)(ownerState.anchorOrigin.vertical)}${(0, _capitalize.default)(ownerState.anchorOrigin.horizontal)}`]];
47
47
  }
48
48
  })(({
49
- theme,
50
- ownerState
51
- }) => {
52
- const center = {
53
- left: '50%',
54
- right: 'auto',
55
- transform: 'translateX(-50%)'
56
- };
57
- return (0, _extends2.default)({
58
- zIndex: (theme.vars || theme).zIndex.snackbar,
59
- position: 'fixed',
60
- display: 'flex',
61
- left: 8,
62
- right: 8,
63
- justifyContent: 'center',
64
- alignItems: 'center'
65
- }, ownerState.anchorOrigin.vertical === 'top' ? {
66
- top: 8
67
- } : {
68
- bottom: 8
69
- }, ownerState.anchorOrigin.horizontal === 'left' && {
70
- justifyContent: 'flex-start'
71
- }, ownerState.anchorOrigin.horizontal === 'right' && {
72
- justifyContent: 'flex-end'
49
+ theme
50
+ }) => ({
51
+ zIndex: (theme.vars || theme).zIndex.snackbar,
52
+ position: 'fixed',
53
+ display: 'flex',
54
+ left: 8,
55
+ right: 8,
56
+ justifyContent: 'center',
57
+ alignItems: 'center',
58
+ variants: [{
59
+ props: ({
60
+ ownerState
61
+ }) => ownerState.anchorOrigin.vertical === 'top',
62
+ style: {
63
+ top: 8,
64
+ [theme.breakpoints.up('sm')]: {
65
+ top: 24
66
+ }
67
+ }
73
68
  }, {
74
- [theme.breakpoints.up('sm')]: (0, _extends2.default)({}, ownerState.anchorOrigin.vertical === 'top' ? {
75
- top: 24
76
- } : {
77
- bottom: 24
78
- }, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' && {
79
- left: 24,
80
- right: 'auto'
81
- }, ownerState.anchorOrigin.horizontal === 'right' && {
82
- right: 24,
83
- left: 'auto'
84
- })
85
- });
86
- });
69
+ props: ({
70
+ ownerState
71
+ }) => ownerState.anchorOrigin.vertical !== 'top',
72
+ style: {
73
+ bottom: 8,
74
+ [theme.breakpoints.up('sm')]: {
75
+ bottom: 24
76
+ }
77
+ }
78
+ }, {
79
+ props: ({
80
+ ownerState
81
+ }) => ownerState.anchorOrigin.horizontal === 'left',
82
+ style: {
83
+ justifyContent: 'flex-start',
84
+ [theme.breakpoints.up('sm')]: {
85
+ left: 24,
86
+ right: 'auto'
87
+ }
88
+ }
89
+ }, {
90
+ props: ({
91
+ ownerState
92
+ }) => ownerState.anchorOrigin.horizontal === 'right',
93
+ style: {
94
+ justifyContent: 'flex-end',
95
+ [theme.breakpoints.up('sm')]: {
96
+ right: 24,
97
+ left: 'auto'
98
+ }
99
+ }
100
+ }, {
101
+ props: ({
102
+ ownerState
103
+ }) => ownerState.anchorOrigin.horizontal === 'center',
104
+ style: {
105
+ [theme.breakpoints.up('sm')]: {
106
+ left: '50%',
107
+ right: 'auto',
108
+ transform: 'translateX(-50%)'
109
+ }
110
+ }
111
+ }]
112
+ }));
87
113
  const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
88
- const props = (0, _useThemeProps.default)({
114
+ const props = useThemeProps({
89
115
  props: inProps,
90
116
  name: 'MuiSnackbar'
91
117
  });
@@ -13,14 +13,14 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _clsx = _interopRequireDefault(require("clsx"));
14
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
15
15
  var _colorManipulator = require("@mui/system/colorManipulator");
16
- var _styled = _interopRequireDefault(require("../styles/styled"));
17
- var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
16
+ var _zeroStyled = require("../zero-styled");
18
17
  var _Paper = _interopRequireDefault(require("../Paper"));
19
18
  var _snackbarContentClasses = require("./snackbarContentClasses");
20
19
  var _jsxRuntime = require("react/jsx-runtime");
21
20
  const _excluded = ["action", "className", "message", "role"];
22
21
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
23
22
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
+ const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiSnackbarContent');
24
24
  const useUtilityClasses = ownerState => {
25
25
  const {
26
26
  classes
@@ -32,7 +32,7 @@ const useUtilityClasses = ownerState => {
32
32
  };
33
33
  return (0, _composeClasses.default)(slots, _snackbarContentClasses.getSnackbarContentUtilityClass, classes);
34
34
  };
35
- const SnackbarContentRoot = (0, _styled.default)(_Paper.default, {
35
+ const SnackbarContentRoot = (0, _zeroStyled.styled)(_Paper.default, {
36
36
  name: 'MuiSnackbarContent',
37
37
  slot: 'Root',
38
38
  overridesResolver: (props, styles) => styles.root
@@ -56,14 +56,14 @@ const SnackbarContentRoot = (0, _styled.default)(_Paper.default, {
56
56
  }
57
57
  });
58
58
  });
59
- const SnackbarContentMessage = (0, _styled.default)('div', {
59
+ const SnackbarContentMessage = (0, _zeroStyled.styled)('div', {
60
60
  name: 'MuiSnackbarContent',
61
61
  slot: 'Message',
62
62
  overridesResolver: (props, styles) => styles.message
63
63
  })({
64
64
  padding: '8px 0'
65
65
  });
66
- const SnackbarContentAction = (0, _styled.default)('div', {
66
+ const SnackbarContentAction = (0, _zeroStyled.styled)('div', {
67
67
  name: 'MuiSnackbarContent',
68
68
  slot: 'Action',
69
69
  overridesResolver: (props, styles) => styles.action
@@ -75,7 +75,7 @@ const SnackbarContentAction = (0, _styled.default)('div', {
75
75
  marginRight: -8
76
76
  });
77
77
  const SnackbarContent = /*#__PURE__*/React.forwardRef(function SnackbarContent(inProps, ref) {
78
- const props = (0, _useThemeProps.default)({
78
+ const props = useThemeProps({
79
79
  props: inProps,
80
80
  name: 'MuiSnackbarContent'
81
81
  });