@mui/material 6.0.0-alpha.5 → 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 (269) 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 +48 -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 +1 -1
  34. package/FormControlLabel/FormControlLabel.js +1 -1
  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 +1 -1
  65. package/PaginationItem/PaginationItem.js +1 -1
  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/SwipeableDrawer/SwipeArea.js +39 -18
  86. package/Tab/Tab.js +127 -55
  87. package/TabScrollButton/TabScrollButton.js +27 -15
  88. package/Table/Table.js +2 -2
  89. package/TableBody/TableBody.js +2 -2
  90. package/TableCell/TableCell.js +2 -2
  91. package/TableContainer/TableContainer.js +2 -2
  92. package/TableFooter/TableFooter.js +2 -2
  93. package/TableHead/TableHead.js +2 -2
  94. package/TablePagination/TablePagination.js +2 -2
  95. package/TableRow/TableRow.js +2 -2
  96. package/TableSortLabel/TableSortLabel.js +2 -2
  97. package/Tabs/Tabs.js +107 -54
  98. package/TextField/TextField.js +2 -2
  99. package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +2 -2
  100. package/Toolbar/Toolbar.js +3 -7
  101. package/Tooltip/Tooltip.js +185 -88
  102. package/Typography/Typography.js +89 -39
  103. package/index.js +1 -1
  104. package/internal/SwitchBase.js +39 -11
  105. package/modern/Accordion/Accordion.js +2 -2
  106. package/modern/Alert/Alert.js +2 -2
  107. package/modern/Avatar/Avatar.js +1 -1
  108. package/modern/Backdrop/Backdrop.js +1 -1
  109. package/modern/Badge/Badge.js +2 -2
  110. package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -1
  111. package/modern/Button/Button.js +1 -1
  112. package/modern/Checkbox/Checkbox.js +3 -1
  113. package/modern/Chip/chipClasses.js +1 -1
  114. package/modern/Collapse/Collapse.js +66 -35
  115. package/modern/Dialog/Dialog.js +105 -61
  116. package/modern/DialogActions/DialogActions.js +16 -12
  117. package/modern/DialogContent/DialogContent.js +25 -15
  118. package/modern/DialogContentText/DialogContentText.js +3 -2
  119. package/modern/DialogTitle/DialogTitle.js +2 -2
  120. package/modern/Divider/Divider.js +1 -1
  121. package/modern/Drawer/Drawer.js +73 -32
  122. package/modern/Fab/Fab.js +1 -1
  123. package/modern/FilledInput/FilledInput.js +170 -87
  124. package/modern/FormControlLabel/FormControlLabel.js +1 -1
  125. package/modern/FormHelperText/FormHelperText.js +2 -2
  126. package/modern/FormLabel/FormLabel.js +23 -13
  127. package/modern/Grow/Grow.js +3 -1
  128. package/modern/Icon/Icon.js +63 -23
  129. package/modern/ImageList/ImageList.js +2 -2
  130. package/modern/ImageListItem/ImageListItem.js +2 -2
  131. package/modern/ImageListItemBar/ImageListItemBar.js +2 -2
  132. package/modern/Input/Input.js +84 -61
  133. package/modern/InputAdornment/InputAdornment.js +37 -21
  134. package/modern/InputBase/InputBase.js +58 -28
  135. package/modern/InputLabel/InputLabel.js +120 -58
  136. package/modern/Link/Link.js +99 -54
  137. package/modern/Link/getTextDecoration.js +16 -8
  138. package/modern/List/List.js +22 -13
  139. package/modern/ListItem/ListItem.js +2 -2
  140. package/modern/ListItemAvatar/ListItemAvatar.js +2 -2
  141. package/modern/ListItemButton/ListItemButton.js +3 -2
  142. package/modern/ListItemIcon/ListItemIcon.js +14 -9
  143. package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +2 -2
  144. package/modern/ListItemText/ListItemText.js +2 -2
  145. package/modern/ListSubheader/ListSubheader.js +5 -3
  146. package/modern/Menu/Menu.js +3 -2
  147. package/modern/MenuItem/MenuItem.js +47 -27
  148. package/modern/NativeSelect/NativeSelectInput.js +78 -49
  149. package/modern/OutlinedInput/NotchedOutline.js +60 -43
  150. package/modern/OutlinedInput/OutlinedInput.js +97 -39
  151. package/modern/Pagination/Pagination.js +2 -2
  152. package/modern/PaginationItem/PaginationItem.js +1 -1
  153. package/modern/Paper/Paper.js +44 -21
  154. package/modern/Radio/Radio.js +5 -3
  155. package/modern/Radio/RadioButtonIcon.js +1 -1
  156. package/modern/Rating/Rating.js +3 -2
  157. package/modern/Select/Select.js +2 -1
  158. package/modern/Select/SelectInput.js +8 -6
  159. package/modern/Skeleton/Skeleton.js +109 -61
  160. package/modern/Slider/Slider.js +2 -2
  161. package/modern/Snackbar/Snackbar.js +66 -40
  162. package/modern/SnackbarContent/SnackbarContent.js +2 -2
  163. package/modern/SpeedDial/SpeedDial.js +107 -49
  164. package/modern/SpeedDialAction/SpeedDialAction.js +50 -24
  165. package/modern/SpeedDialIcon/SpeedDialIcon.js +37 -16
  166. package/modern/StepLabel/StepLabel.js +3 -3
  167. package/modern/SwipeableDrawer/SwipeArea.js +39 -18
  168. package/modern/Tab/Tab.js +127 -55
  169. package/modern/TabScrollButton/TabScrollButton.js +27 -15
  170. package/modern/Table/Table.js +2 -2
  171. package/modern/TableBody/TableBody.js +2 -2
  172. package/modern/TableCell/TableCell.js +2 -2
  173. package/modern/TableContainer/TableContainer.js +2 -2
  174. package/modern/TableFooter/TableFooter.js +2 -2
  175. package/modern/TableHead/TableHead.js +2 -2
  176. package/modern/TablePagination/TablePagination.js +2 -2
  177. package/modern/TableRow/TableRow.js +2 -2
  178. package/modern/TableSortLabel/TableSortLabel.js +2 -2
  179. package/modern/Tabs/Tabs.js +107 -54
  180. package/modern/TextField/TextField.js +2 -2
  181. package/modern/Toolbar/Toolbar.js +3 -7
  182. package/modern/Tooltip/Tooltip.js +185 -88
  183. package/modern/Typography/Typography.js +89 -39
  184. package/modern/index.js +1 -1
  185. package/modern/internal/SwitchBase.js +39 -11
  186. package/node/Accordion/Accordion.js +2 -2
  187. package/node/Alert/Alert.js +2 -2
  188. package/node/Avatar/Avatar.js +1 -1
  189. package/node/Backdrop/Backdrop.js +1 -1
  190. package/node/Badge/Badge.js +2 -2
  191. package/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -3
  192. package/node/Button/Button.js +2 -2
  193. package/node/Checkbox/Checkbox.js +3 -1
  194. package/node/Chip/chipClasses.js +1 -1
  195. package/node/Collapse/Collapse.js +70 -39
  196. package/node/Dialog/Dialog.js +110 -66
  197. package/node/DialogActions/DialogActions.js +18 -14
  198. package/node/DialogContent/DialogContent.js +27 -17
  199. package/node/DialogContentText/DialogContentText.js +6 -5
  200. package/node/DialogTitle/DialogTitle.js +4 -4
  201. package/node/Divider/Divider.js +1 -1
  202. package/node/Drawer/Drawer.js +78 -37
  203. package/node/Fab/Fab.js +2 -2
  204. package/node/FilledInput/FilledInput.js +176 -91
  205. package/node/FormControlLabel/FormControlLabel.js +1 -1
  206. package/node/FormHelperText/FormHelperText.js +4 -4
  207. package/node/FormLabel/FormLabel.js +26 -16
  208. package/node/Grow/Grow.js +3 -1
  209. package/node/Icon/Icon.js +65 -25
  210. package/node/ImageList/ImageList.js +4 -4
  211. package/node/ImageListItem/ImageListItem.js +4 -4
  212. package/node/ImageListItemBar/ImageListItemBar.js +8 -8
  213. package/node/Input/Input.js +87 -64
  214. package/node/InputAdornment/InputAdornment.js +39 -23
  215. package/node/InputBase/InputBase.js +61 -31
  216. package/node/InputLabel/InputLabel.js +123 -61
  217. package/node/Link/Link.js +101 -56
  218. package/node/Link/getTextDecoration.js +18 -10
  219. package/node/List/List.js +24 -15
  220. package/node/ListItem/ListItem.js +5 -5
  221. package/node/ListItemAvatar/ListItemAvatar.js +4 -4
  222. package/node/ListItemButton/ListItemButton.js +6 -5
  223. package/node/ListItemIcon/ListItemIcon.js +16 -11
  224. package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +4 -4
  225. package/node/ListItemText/ListItemText.js +4 -4
  226. package/node/ListSubheader/ListSubheader.js +7 -5
  227. package/node/Menu/Menu.js +8 -7
  228. package/node/MenuItem/MenuItem.js +50 -30
  229. package/node/NativeSelect/NativeSelectInput.js +80 -53
  230. package/node/OutlinedInput/NotchedOutline.js +64 -47
  231. package/node/OutlinedInput/OutlinedInput.js +101 -43
  232. package/node/Pagination/Pagination.js +5 -5
  233. package/node/PaginationItem/PaginationItem.js +1 -1
  234. package/node/Paper/Paper.js +49 -28
  235. package/node/Radio/Radio.js +6 -4
  236. package/node/Radio/RadioButtonIcon.js +2 -2
  237. package/node/Rating/Rating.js +9 -8
  238. package/node/Select/Select.js +6 -5
  239. package/node/Select/SelectInput.js +9 -7
  240. package/node/Skeleton/Skeleton.js +113 -65
  241. package/node/Slider/Slider.js +2 -2
  242. package/node/Snackbar/Snackbar.js +68 -42
  243. package/node/SnackbarContent/SnackbarContent.js +6 -6
  244. package/node/SpeedDial/SpeedDial.js +111 -53
  245. package/node/SpeedDialAction/SpeedDialAction.js +54 -28
  246. package/node/SpeedDialIcon/SpeedDialIcon.js +39 -18
  247. package/node/StepLabel/StepLabel.js +3 -3
  248. package/node/SwipeableDrawer/SwipeArea.js +41 -20
  249. package/node/Tab/Tab.js +129 -57
  250. package/node/TabScrollButton/TabScrollButton.js +29 -17
  251. package/node/Table/Table.js +4 -4
  252. package/node/TableBody/TableBody.js +4 -4
  253. package/node/TableCell/TableCell.js +4 -4
  254. package/node/TableContainer/TableContainer.js +4 -4
  255. package/node/TableFooter/TableFooter.js +4 -4
  256. package/node/TableHead/TableHead.js +4 -4
  257. package/node/TablePagination/TablePagination.js +10 -10
  258. package/node/TableRow/TableRow.js +4 -4
  259. package/node/TableSortLabel/TableSortLabel.js +5 -5
  260. package/node/Tabs/Tabs.js +113 -60
  261. package/node/TextField/TextField.js +4 -4
  262. package/node/Toolbar/Toolbar.js +5 -9
  263. package/node/Tooltip/Tooltip.js +189 -92
  264. package/node/Typography/Typography.js +90 -40
  265. package/node/index.js +1 -1
  266. package/node/internal/SwitchBase.js +41 -13
  267. package/package.json +4 -4
  268. package/umd/material-ui.development.js +2585 -1287
  269. package/umd/material-ui.production.min.js +4 -4
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
5
  const _excluded = ["className", "component", "elevation", "square", "variant"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
@@ -10,12 +10,12 @@ import integerPropType from '@mui/utils/integerPropType';
10
10
  import chainPropTypes from '@mui/utils/chainPropTypes';
11
11
  import composeClasses from '@mui/utils/composeClasses';
12
12
  import { alpha } from '@mui/system/colorManipulator';
13
- import styled from '../styles/styled';
13
+ import { styled, createUseThemeProps } from '../zero-styled';
14
14
  import getOverlayAlpha from '../styles/getOverlayAlpha';
15
- import useThemeProps from '../styles/useThemeProps';
16
15
  import useTheme from '../styles/useTheme';
17
16
  import { getPaperUtilityClass } from './paperClasses';
18
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
+ const useThemeProps = createUseThemeProps('MuiPaper');
19
19
  const useUtilityClasses = ownerState => {
20
20
  const {
21
21
  square,
@@ -38,28 +38,41 @@ const PaperRoot = styled('div', {
38
38
  return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles[`elevation${ownerState.elevation}`]];
39
39
  }
40
40
  })(({
41
- theme,
42
- ownerState
43
- }) => _extends({
41
+ theme
42
+ }) => ({
44
43
  backgroundColor: (theme.vars || theme).palette.background.paper,
45
44
  color: (theme.vars || theme).palette.text.primary,
46
- transition: theme.transitions.create('box-shadow')
47
- }, !ownerState.square && {
48
- borderRadius: theme.shape.borderRadius
49
- }, ownerState.variant === 'outlined' && {
50
- border: `1px solid ${(theme.vars || theme).palette.divider}`
51
- }, ownerState.variant === 'elevation' && _extends({
52
- boxShadow: (theme.vars || theme).shadows[ownerState.elevation]
53
- }, !theme.vars && theme.palette.mode === 'dark' && {
54
- backgroundImage: `linear-gradient(${alpha('#fff', getOverlayAlpha(ownerState.elevation))}, ${alpha('#fff', getOverlayAlpha(ownerState.elevation))})`
55
- }, theme.vars && {
56
- backgroundImage: theme.vars.overlays?.[ownerState.elevation]
57
- })));
45
+ transition: theme.transitions.create('box-shadow'),
46
+ variants: [{
47
+ props: ({
48
+ ownerState
49
+ }) => !ownerState.square,
50
+ style: {
51
+ borderRadius: theme.shape.borderRadius
52
+ }
53
+ }, {
54
+ props: {
55
+ variant: 'outlined'
56
+ },
57
+ style: {
58
+ border: `1px solid ${(theme.vars || theme).palette.divider}`
59
+ }
60
+ }, {
61
+ props: {
62
+ variant: 'elevation'
63
+ },
64
+ style: {
65
+ boxShadow: 'var(--Paper-shadow)',
66
+ backgroundImage: 'var(--Paper-overlay)'
67
+ }
68
+ }]
69
+ }));
58
70
  const Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
59
71
  const props = useThemeProps({
60
72
  props: inProps,
61
73
  name: 'MuiPaper'
62
74
  });
75
+ const theme = useTheme();
63
76
  const {
64
77
  className,
65
78
  component = 'div',
@@ -76,8 +89,6 @@ const Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
76
89
  });
77
90
  const classes = useUtilityClasses(ownerState);
78
91
  if (process.env.NODE_ENV !== 'production') {
79
- // eslint-disable-next-line react-hooks/rules-of-hooks
80
- const theme = useTheme();
81
92
  if (theme.shadows[elevation] === undefined) {
82
93
  console.error([`MUI: The elevation provided <Paper elevation={${elevation}}> is not available in the theme.`, `Please make sure that \`theme.shadows[${elevation}]\` is defined.`].join('\n'));
83
94
  }
@@ -87,7 +98,15 @@ const Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {
87
98
  ownerState: ownerState,
88
99
  className: clsx(classes.root, className),
89
100
  ref: ref
90
- }, other));
101
+ }, other, {
102
+ style: _extends({}, variant === 'elevation' && _extends({
103
+ '--Paper-shadow': (theme.vars || theme).shadows[elevation]
104
+ }, theme.vars && {
105
+ '--Paper-overlay': theme.overlays?.[elevation]
106
+ }, !theme.vars && theme.palette.mode === 'dark' && {
107
+ '--Paper-overlay': `linear-gradient(${alpha('#fff', getOverlayAlpha(elevation))}, ${alpha('#fff', getOverlayAlpha(elevation))})`
108
+ }), other.style)
109
+ }));
91
110
  });
92
111
  process.env.NODE_ENV !== "production" ? Paper.propTypes /* remove-proptypes */ = {
93
112
  // ┌────────────────────────────── Warning ──────────────────────────────┐
@@ -131,6 +150,10 @@ process.env.NODE_ENV !== "production" ? Paper.propTypes /* remove-proptypes */ =
131
150
  * @default false
132
151
  */
133
152
  square: PropTypes.bool,
153
+ /**
154
+ * @ignore
155
+ */
156
+ style: PropTypes.object,
134
157
  /**
135
158
  * The system prop that allows defining system overrides as well as additional CSS styles.
136
159
  */
@@ -2,7 +2,7 @@
2
2
 
3
3
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
4
  import _extends from "@babel/runtime/helpers/esm/extends";
5
- const _excluded = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size", "className"];
5
+ const _excluded = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size", "className", "disableRipple"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
@@ -15,7 +15,7 @@ import capitalize from '../utils/capitalize';
15
15
  import createChainedFunction from '../utils/createChainedFunction';
16
16
  import useRadioGroup from '../RadioGroup/useRadioGroup';
17
17
  import radioClasses, { getRadioUtilityClass } from './radioClasses';
18
- import { rootShouldForwardProp } from '../styles/styled';
18
+ import rootShouldForwardProp from '../styles/rootShouldForwardProp';
19
19
  import { styled, createUseThemeProps } from '../zero-styled';
20
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
21
  const useThemeProps = createUseThemeProps('MuiRadio');
@@ -116,10 +116,12 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
116
116
  name: nameProp,
117
117
  onChange: onChangeProp,
118
118
  size = 'medium',
119
- className
119
+ className,
120
+ disableRipple = false
120
121
  } = props,
121
122
  other = _objectWithoutPropertiesLoose(props, _excluded);
122
123
  const ownerState = _extends({}, props, {
124
+ disableRipple,
123
125
  color,
124
126
  size
125
127
  });
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import RadioButtonUncheckedIcon from '../internal/svg-icons/RadioButtonUnchecked';
7
7
  import RadioButtonCheckedIcon from '../internal/svg-icons/RadioButtonChecked';
8
- import { rootShouldForwardProp } from '../styles/styled';
8
+ import rootShouldForwardProp from '../styles/rootShouldForwardProp';
9
9
  import { styled } from '../zero-styled';
10
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
11
  const RadioButtonIconRoot = styled('span', {
@@ -15,10 +15,11 @@ import { useRtl } from '@mui/system/RtlProvider';
15
15
  import { capitalize, useForkRef, useIsFocusVisible, useControlled, unstable_useId as useId } from '../utils';
16
16
  import Star from '../internal/svg-icons/Star';
17
17
  import StarBorder from '../internal/svg-icons/StarBorder';
18
- import useThemeProps from '../styles/useThemeProps';
19
- import styled, { slotShouldForwardProp } from '../styles/styled';
18
+ import { styled, createUseThemeProps } from '../zero-styled';
19
+ import slotShouldForwardProp from '../styles/slotShouldForwardProp';
20
20
  import ratingClasses, { getRatingUtilityClass } from './ratingClasses';
21
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
+ const useThemeProps = createUseThemeProps('MuiRating');
22
23
  function getDecimalPrecision(num) {
23
24
  const decimalPart = num.toString().split('.')[1];
24
25
  return decimalPart ? decimalPart.length : 0;
@@ -18,7 +18,8 @@ import FilledInput from '../FilledInput';
18
18
  import OutlinedInput from '../OutlinedInput';
19
19
  import useThemeProps from '../styles/useThemeProps';
20
20
  import useForkRef from '../utils/useForkRef';
21
- import styled, { rootShouldForwardProp } from '../styles/styled';
21
+ import { styled } from '../zero-styled';
22
+ import rootShouldForwardProp from '../styles/rootShouldForwardProp';
22
23
  import { jsx as _jsx } from "react/jsx-runtime";
23
24
  const useUtilityClasses = ownerState => {
24
25
  const {
@@ -15,14 +15,15 @@ import refType from '@mui/utils/refType';
15
15
  import ownerDocument from '../utils/ownerDocument';
16
16
  import capitalize from '../utils/capitalize';
17
17
  import Menu from '../Menu/Menu';
18
- import { nativeSelectSelectStyles, nativeSelectIconStyles } from '../NativeSelect/NativeSelectInput';
18
+ import { StyledSelectSelect, StyledSelectIcon } from '../NativeSelect/NativeSelectInput';
19
19
  import { isFilled } from '../InputBase/utils';
20
- import styled, { slotShouldForwardProp } from '../styles/styled';
20
+ import { styled } from '../zero-styled';
21
+ import slotShouldForwardProp from '../styles/slotShouldForwardProp';
21
22
  import useForkRef from '../utils/useForkRef';
22
23
  import useControlled from '../utils/useControlled';
23
24
  import selectClasses, { getSelectUtilityClasses } from './selectClasses';
24
25
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
25
- const SelectSelect = styled('div', {
26
+ const SelectSelect = styled(StyledSelectSelect, {
26
27
  name: 'MuiSelect',
27
28
  slot: 'Select',
28
29
  overridesResolver: (props, styles) => {
@@ -41,7 +42,7 @@ const SelectSelect = styled('div', {
41
42
  [`&.${selectClasses.multiple}`]: styles.multiple
42
43
  }];
43
44
  }
44
- })(nativeSelectSelectStyles, {
45
+ })({
45
46
  // Win specificity over the input base
46
47
  [`&.${selectClasses.select}`]: {
47
48
  height: 'auto',
@@ -53,7 +54,7 @@ const SelectSelect = styled('div', {
53
54
  overflow: 'hidden'
54
55
  }
55
56
  });
56
- const SelectIcon = styled('svg', {
57
+ const SelectIcon = styled(StyledSelectIcon, {
57
58
  name: 'MuiSelect',
58
59
  slot: 'Icon',
59
60
  overridesResolver: (props, styles) => {
@@ -62,7 +63,7 @@ const SelectIcon = styled('svg', {
62
63
  } = props;
63
64
  return [styles.icon, ownerState.variant && styles[`icon${capitalize(ownerState.variant)}`], ownerState.open && styles.iconOpen];
64
65
  }
65
- })(nativeSelectIconStyles);
66
+ })({});
66
67
  const SelectNativeInput = styled('input', {
67
68
  shouldForwardProp: prop => slotShouldForwardProp(prop) && prop !== 'classes',
68
69
  name: 'MuiSelect',
@@ -435,6 +436,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
435
436
  const listboxId = useId();
436
437
  return /*#__PURE__*/_jsxs(React.Fragment, {
437
438
  children: [/*#__PURE__*/_jsx(SelectSelect, _extends({
439
+ as: "div",
438
440
  ref: handleDisplayRef,
439
441
  tabIndex: tabIndex,
440
442
  role: "combobox",
@@ -1,18 +1,17 @@
1
1
  'use client';
2
2
 
3
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
5
  const _excluded = ["animation", "className", "component", "height", "style", "variant", "width"];
6
6
  import * as React from 'react';
7
7
  import clsx from 'clsx';
8
8
  import PropTypes from 'prop-types';
9
- import { keyframes, css } from '@mui/system';
10
9
  import composeClasses from '@mui/utils/composeClasses';
11
10
  import { alpha, unstable_getUnit as getUnit, unstable_toUnitless as toUnitless } from '../styles';
12
- import styled from '../styles/styled';
13
- import useThemeProps from '../styles/useThemeProps';
11
+ import { keyframes, css, createUseThemeProps, styled } from '../zero-styled';
14
12
  import { getSkeletonUtilityClass } from './skeletonClasses';
15
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
+ const useThemeProps = createUseThemeProps('MuiSkeleton');
16
15
  const useUtilityClasses = ownerState => {
17
16
  const {
18
17
  classes,
@@ -54,6 +53,16 @@ const waveKeyframe = keyframes`
54
53
  transform: translateX(100%);
55
54
  }
56
55
  `;
56
+
57
+ // This implementation is for supporting both Styled-components v4+ and Pigment CSS.
58
+ // 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).
59
+ // which can be done by checking typeof indeterminate1Keyframe !== 'string' (at runtime, Pigment CSS transform keyframes`` to a string).
60
+ const pulseAnimation = typeof pulseKeyframe !== 'string' ? css`
61
+ animation: ${pulseKeyframe} 2s ease-in-out 0.5s infinite;
62
+ ` : null;
63
+ const waveAnimation = typeof waveKeyframe !== 'string' ? css`
64
+ animation: ${waveKeyframe} 2s linear 0.5s infinite;
65
+ ` : null;
57
66
  const SkeletonRoot = styled('span', {
58
67
  name: 'MuiSkeleton',
59
68
  slot: 'Root',
@@ -64,70 +73,109 @@ const SkeletonRoot = styled('span', {
64
73
  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];
65
74
  }
66
75
  })(({
67
- theme,
68
- ownerState
76
+ theme
69
77
  }) => {
70
78
  const radiusUnit = getUnit(theme.shape.borderRadius) || 'px';
71
79
  const radiusValue = toUnitless(theme.shape.borderRadius);
72
- return _extends({
80
+ return {
73
81
  display: 'block',
74
82
  // Create a "on paper" color with sufficient contrast retaining the color
75
83
  backgroundColor: theme.vars ? theme.vars.palette.Skeleton.bg : alpha(theme.palette.text.primary, theme.palette.mode === 'light' ? 0.11 : 0.13),
76
- height: '1.2em'
77
- }, ownerState.variant === 'text' && {
78
- marginTop: 0,
79
- marginBottom: 0,
80
- height: 'auto',
81
- transformOrigin: '0 55%',
82
- transform: 'scale(1, 0.60)',
83
- borderRadius: `${radiusValue}${radiusUnit}/${Math.round(radiusValue / 0.6 * 10) / 10}${radiusUnit}`,
84
- '&:empty:before': {
85
- content: '"\\00a0"'
86
- }
87
- }, ownerState.variant === 'circular' && {
88
- borderRadius: '50%'
89
- }, ownerState.variant === 'rounded' && {
90
- borderRadius: (theme.vars || theme).shape.borderRadius
91
- }, ownerState.hasChildren && {
92
- '& > *': {
93
- visibility: 'hidden'
94
- }
95
- }, ownerState.hasChildren && !ownerState.width && {
96
- maxWidth: 'fit-content'
97
- }, ownerState.hasChildren && !ownerState.height && {
98
- height: 'auto'
99
- });
100
- }, ({
101
- ownerState
102
- }) => ownerState.animation === 'pulse' && css`
103
- animation: ${pulseKeyframe} 2s ease-in-out 0.5s infinite;
104
- `, ({
105
- ownerState,
106
- theme
107
- }) => ownerState.animation === 'wave' && css`
108
- position: relative;
109
- overflow: hidden;
110
-
111
- /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
112
- -webkit-mask-image: -webkit-radial-gradient(white, black);
113
-
114
- &::after {
115
- animation: ${waveKeyframe} 2s linear 0.5s infinite;
116
- background: linear-gradient(
117
- 90deg,
118
- transparent,
119
- ${(theme.vars || theme).palette.action.hover},
120
- transparent
121
- );
122
- content: '';
123
- position: absolute;
124
- transform: translateX(-100%); /* Avoid flash during server-side hydration */
125
- bottom: 0;
126
- left: 0;
127
- right: 0;
128
- top: 0;
84
+ height: '1.2em',
85
+ variants: [{
86
+ props: {
87
+ variant: 'text'
88
+ },
89
+ style: {
90
+ marginTop: 0,
91
+ marginBottom: 0,
92
+ height: 'auto',
93
+ transformOrigin: '0 55%',
94
+ transform: 'scale(1, 0.60)',
95
+ borderRadius: `${radiusValue}${radiusUnit}/${Math.round(radiusValue / 0.6 * 10) / 10}${radiusUnit}`,
96
+ '&:empty:before': {
97
+ content: '"\\00a0"'
98
+ }
129
99
  }
130
- `);
100
+ }, {
101
+ props: {
102
+ variant: 'circular'
103
+ },
104
+ style: {
105
+ borderRadius: '50%'
106
+ }
107
+ }, {
108
+ props: {
109
+ variant: 'rounded'
110
+ },
111
+ style: {
112
+ borderRadius: (theme.vars || theme).shape.borderRadius
113
+ }
114
+ }, {
115
+ props: ({
116
+ ownerState
117
+ }) => ownerState.hasChildren,
118
+ style: {
119
+ '& > *': {
120
+ visibility: 'hidden'
121
+ }
122
+ }
123
+ }, {
124
+ props: ({
125
+ ownerState
126
+ }) => ownerState.hasChildren && !ownerState.width,
127
+ style: {
128
+ maxWidth: 'fit-content'
129
+ }
130
+ }, {
131
+ props: ({
132
+ ownerState
133
+ }) => ownerState.hasChildren && !ownerState.height,
134
+ style: {
135
+ height: 'auto'
136
+ }
137
+ }, {
138
+ props: {
139
+ animation: 'pulse'
140
+ },
141
+ style: pulseAnimation || {
142
+ animation: `${pulseKeyframe} 2s ease-in-out 0.5s infinite`
143
+ }
144
+ }, {
145
+ props: {
146
+ animation: 'wave'
147
+ },
148
+ style: {
149
+ position: 'relative',
150
+ overflow: 'hidden',
151
+ /* Fix bug in Safari https://bugs.webkit.org/show_bug.cgi?id=68196 */
152
+ WebkitMaskImage: '-webkit-radial-gradient(white, black)',
153
+ '&::after': {
154
+ background: `linear-gradient(
155
+ 90deg,
156
+ transparent,
157
+ ${(theme.vars || theme).palette.action.hover},
158
+ transparent
159
+ )`,
160
+ content: '""',
161
+ position: 'absolute',
162
+ transform: 'translateX(-100%)' /* Avoid flash during server-side hydration */,
163
+ bottom: 0,
164
+ left: 0,
165
+ right: 0,
166
+ top: 0
167
+ }
168
+ }
169
+ }, {
170
+ props: {
171
+ animation: 'wave'
172
+ },
173
+ style: waveAnimation || {
174
+ animation: `${waveKeyframe} 2s linear 0.5s infinite`
175
+ }
176
+ }]
177
+ };
178
+ });
131
179
  const Skeleton = /*#__PURE__*/React.forwardRef(function Skeleton(inProps, ref) {
132
180
  const props = useThemeProps({
133
181
  props: inProps,
@@ -795,7 +795,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
795
795
  /**
796
796
  * The components used for each slot inside.
797
797
  *
798
- * @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
798
+ * @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.
799
799
  *
800
800
  * @default {}
801
801
  */
@@ -813,7 +813,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
813
813
  * The extra props for the slot components.
814
814
  * You can override the existing props or add new ones.
815
815
  *
816
- * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
816
+ * @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.
817
817
  *
818
818
  * @default {}
819
819
  */
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
5
  const _excluded = ["onEnter", "onExited"],
6
6
  _excluded2 = ["action", "anchorOrigin", "autoHideDuration", "children", "className", "ClickAwayListenerProps", "ContentProps", "disableWindowBlurListener", "message", "onBlur", "onClose", "onFocus", "onMouseEnter", "onMouseLeave", "open", "resumeHideDuration", "TransitionComponent", "transitionDuration", "TransitionProps"];
7
7
  import * as React from 'react';
@@ -10,14 +10,14 @@ import { useSlotProps } from '@mui/base/utils';
10
10
  import composeClasses from '@mui/utils/composeClasses';
11
11
  import { ClickAwayListener } from '@mui/base/ClickAwayListener';
12
12
  import { useSnackbar } from '@mui/base/useSnackbar';
13
- import styled from '../styles/styled';
13
+ import { styled, createUseThemeProps } from '../zero-styled';
14
14
  import useTheme from '../styles/useTheme';
15
- import useThemeProps from '../styles/useThemeProps';
16
15
  import capitalize from '../utils/capitalize';
17
16
  import Grow from '../Grow';
18
17
  import SnackbarContent from '../SnackbarContent';
19
18
  import { getSnackbarUtilityClass } from './snackbarClasses';
20
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
+ const useThemeProps = createUseThemeProps('MuiSnackbar');
21
21
  const useUtilityClasses = ownerState => {
22
22
  const {
23
23
  classes,
@@ -38,44 +38,70 @@ const SnackbarRoot = styled('div', {
38
38
  return [styles.root, styles[`anchorOrigin${capitalize(ownerState.anchorOrigin.vertical)}${capitalize(ownerState.anchorOrigin.horizontal)}`]];
39
39
  }
40
40
  })(({
41
- theme,
42
- ownerState
43
- }) => {
44
- const center = {
45
- left: '50%',
46
- right: 'auto',
47
- transform: 'translateX(-50%)'
48
- };
49
- return _extends({
50
- zIndex: (theme.vars || theme).zIndex.snackbar,
51
- position: 'fixed',
52
- display: 'flex',
53
- left: 8,
54
- right: 8,
55
- justifyContent: 'center',
56
- alignItems: 'center'
57
- }, ownerState.anchorOrigin.vertical === 'top' ? {
58
- top: 8
59
- } : {
60
- bottom: 8
61
- }, ownerState.anchorOrigin.horizontal === 'left' && {
62
- justifyContent: 'flex-start'
63
- }, ownerState.anchorOrigin.horizontal === 'right' && {
64
- justifyContent: 'flex-end'
41
+ theme
42
+ }) => ({
43
+ zIndex: (theme.vars || theme).zIndex.snackbar,
44
+ position: 'fixed',
45
+ display: 'flex',
46
+ left: 8,
47
+ right: 8,
48
+ justifyContent: 'center',
49
+ alignItems: 'center',
50
+ variants: [{
51
+ props: ({
52
+ ownerState
53
+ }) => ownerState.anchorOrigin.vertical === 'top',
54
+ style: {
55
+ top: 8,
56
+ [theme.breakpoints.up('sm')]: {
57
+ top: 24
58
+ }
59
+ }
65
60
  }, {
66
- [theme.breakpoints.up('sm')]: _extends({}, ownerState.anchorOrigin.vertical === 'top' ? {
67
- top: 24
68
- } : {
69
- bottom: 24
70
- }, ownerState.anchorOrigin.horizontal === 'center' && center, ownerState.anchorOrigin.horizontal === 'left' && {
71
- left: 24,
72
- right: 'auto'
73
- }, ownerState.anchorOrigin.horizontal === 'right' && {
74
- right: 24,
75
- left: 'auto'
76
- })
77
- });
78
- });
61
+ props: ({
62
+ ownerState
63
+ }) => ownerState.anchorOrigin.vertical !== 'top',
64
+ style: {
65
+ bottom: 8,
66
+ [theme.breakpoints.up('sm')]: {
67
+ bottom: 24
68
+ }
69
+ }
70
+ }, {
71
+ props: ({
72
+ ownerState
73
+ }) => ownerState.anchorOrigin.horizontal === 'left',
74
+ style: {
75
+ justifyContent: 'flex-start',
76
+ [theme.breakpoints.up('sm')]: {
77
+ left: 24,
78
+ right: 'auto'
79
+ }
80
+ }
81
+ }, {
82
+ props: ({
83
+ ownerState
84
+ }) => ownerState.anchorOrigin.horizontal === 'right',
85
+ style: {
86
+ justifyContent: 'flex-end',
87
+ [theme.breakpoints.up('sm')]: {
88
+ right: 24,
89
+ left: 'auto'
90
+ }
91
+ }
92
+ }, {
93
+ props: ({
94
+ ownerState
95
+ }) => ownerState.anchorOrigin.horizontal === 'center',
96
+ style: {
97
+ [theme.breakpoints.up('sm')]: {
98
+ left: '50%',
99
+ right: 'auto',
100
+ transform: 'translateX(-50%)'
101
+ }
102
+ }
103
+ }]
104
+ }));
79
105
  const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
80
106
  const props = useThemeProps({
81
107
  props: inProps,
@@ -8,11 +8,11 @@ import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
9
  import composeClasses from '@mui/utils/composeClasses';
10
10
  import { emphasize } from '@mui/system/colorManipulator';
11
- import styled from '../styles/styled';
12
- import useThemeProps from '../styles/useThemeProps';
11
+ import { styled, createUseThemeProps } from '../zero-styled';
13
12
  import Paper from '../Paper';
14
13
  import { getSnackbarContentUtilityClass } from './snackbarContentClasses';
15
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
+ const useThemeProps = createUseThemeProps('MuiSnackbarContent');
16
16
  const useUtilityClasses = ownerState => {
17
17
  const {
18
18
  classes