@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
package/Dialog/Dialog.js CHANGED
@@ -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 = ["aria-describedby", "aria-labelledby", "BackdropComponent", "BackdropProps", "children", "className", "disableEscapeKeyDown", "fullScreen", "fullWidth", "maxWidth", "onBackdropClick", "onClick", "onClose", "open", "PaperComponent", "PaperProps", "scroll", "TransitionComponent", "transitionDuration", "TransitionProps"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
@@ -12,13 +12,13 @@ import capitalize from '../utils/capitalize';
12
12
  import Modal from '../Modal';
13
13
  import Fade from '../Fade';
14
14
  import Paper from '../Paper';
15
- import useThemeProps from '../styles/useThemeProps';
16
- import styled from '../styles/styled';
17
15
  import dialogClasses, { getDialogUtilityClass } from './dialogClasses';
18
16
  import DialogContext from './DialogContext';
19
17
  import Backdrop from '../Backdrop';
20
18
  import useTheme from '../styles/useTheme';
19
+ import { styled, createUseThemeProps } from '../zero-styled';
21
20
  import { jsx as _jsx } from "react/jsx-runtime";
21
+ const useThemeProps = createUseThemeProps('MuiDialog');
22
22
  const DialogBackdrop = styled(Backdrop, {
23
23
  name: 'MuiDialog',
24
24
  slot: 'Backdrop',
@@ -61,31 +61,40 @@ const DialogContainer = styled('div', {
61
61
  } = props;
62
62
  return [styles.container, styles[`scroll${capitalize(ownerState.scroll)}`]];
63
63
  }
64
- })(({
65
- ownerState
66
- }) => _extends({
64
+ })({
67
65
  height: '100%',
68
66
  '@media print': {
69
67
  height: 'auto'
70
68
  },
71
69
  // We disable the focus ring for mouse, touch and keyboard users.
72
- outline: 0
73
- }, ownerState.scroll === 'paper' && {
74
- display: 'flex',
75
- justifyContent: 'center',
76
- alignItems: 'center'
77
- }, ownerState.scroll === 'body' && {
78
- overflowY: 'auto',
79
- overflowX: 'hidden',
80
- textAlign: 'center',
81
- '&::after': {
82
- content: '""',
83
- display: 'inline-block',
84
- verticalAlign: 'middle',
85
- height: '100%',
86
- width: '0'
87
- }
88
- }));
70
+ outline: 0,
71
+ variants: [{
72
+ props: {
73
+ scroll: 'paper'
74
+ },
75
+ style: {
76
+ display: 'flex',
77
+ justifyContent: 'center',
78
+ alignItems: 'center'
79
+ }
80
+ }, {
81
+ props: {
82
+ scroll: 'body'
83
+ },
84
+ style: {
85
+ overflowY: 'auto',
86
+ overflowX: 'hidden',
87
+ textAlign: 'center',
88
+ '&::after': {
89
+ content: '""',
90
+ display: 'inline-block',
91
+ verticalAlign: 'middle',
92
+ height: '100%',
93
+ width: '0'
94
+ }
95
+ }
96
+ }]
97
+ });
89
98
  const DialogPaper = styled(Paper, {
90
99
  name: 'MuiDialog',
91
100
  slot: 'Paper',
@@ -96,9 +105,8 @@ const DialogPaper = styled(Paper, {
96
105
  return [styles.paper, styles[`scrollPaper${capitalize(ownerState.scroll)}`], styles[`paperWidth${capitalize(String(ownerState.maxWidth))}`], ownerState.fullWidth && styles.paperFullWidth, ownerState.fullScreen && styles.paperFullScreen];
97
106
  }
98
107
  })(({
99
- theme,
100
- ownerState
101
- }) => _extends({
108
+ theme
109
+ }) => ({
102
110
  margin: 32,
103
111
  position: 'relative',
104
112
  overflowY: 'auto',
@@ -106,44 +114,80 @@ const DialogPaper = styled(Paper, {
106
114
  '@media print': {
107
115
  overflowY: 'visible',
108
116
  boxShadow: 'none'
109
- }
110
- }, ownerState.scroll === 'paper' && {
111
- display: 'flex',
112
- flexDirection: 'column',
113
- maxHeight: 'calc(100% - 64px)'
114
- }, ownerState.scroll === 'body' && {
115
- display: 'inline-block',
116
- verticalAlign: 'middle',
117
- textAlign: 'left' // 'initial' doesn't work on IE11
118
- }, !ownerState.maxWidth && {
119
- maxWidth: 'calc(100% - 64px)'
120
- }, ownerState.maxWidth === 'xs' && {
121
- maxWidth: theme.breakpoints.unit === 'px' ? Math.max(theme.breakpoints.values.xs, 444) : `max(${theme.breakpoints.values.xs}${theme.breakpoints.unit}, 444px)`,
122
- [`&.${dialogClasses.paperScrollBody}`]: {
123
- [theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2)]: {
124
- maxWidth: 'calc(100% - 64px)'
117
+ },
118
+ variants: [{
119
+ props: {
120
+ scroll: 'paper'
121
+ },
122
+ style: {
123
+ display: 'flex',
124
+ flexDirection: 'column',
125
+ maxHeight: 'calc(100% - 64px)'
125
126
  }
126
- }
127
- }, ownerState.maxWidth && ownerState.maxWidth !== 'xs' && {
128
- maxWidth: `${theme.breakpoints.values[ownerState.maxWidth]}${theme.breakpoints.unit}`,
129
- [`&.${dialogClasses.paperScrollBody}`]: {
130
- [theme.breakpoints.down(theme.breakpoints.values[ownerState.maxWidth] + 32 * 2)]: {
127
+ }, {
128
+ props: {
129
+ scroll: 'body'
130
+ },
131
+ style: {
132
+ display: 'inline-block',
133
+ verticalAlign: 'middle',
134
+ textAlign: 'left' // 'initial' doesn't work on IE11
135
+ }
136
+ }, {
137
+ props: ({
138
+ ownerState
139
+ }) => !ownerState.maxWidth,
140
+ style: {
131
141
  maxWidth: 'calc(100% - 64px)'
132
142
  }
133
- }
134
- }, ownerState.fullWidth && {
135
- width: 'calc(100% - 64px)'
136
- }, ownerState.fullScreen && {
137
- margin: 0,
138
- width: '100%',
139
- maxWidth: '100%',
140
- height: '100%',
141
- maxHeight: 'none',
142
- borderRadius: 0,
143
- [`&.${dialogClasses.paperScrollBody}`]: {
144
- margin: 0,
145
- maxWidth: '100%'
146
- }
143
+ }, {
144
+ props: {
145
+ maxWidth: 'xs'
146
+ },
147
+ style: {
148
+ maxWidth: theme.breakpoints.unit === 'px' ? Math.max(theme.breakpoints.values.xs, 444) : `max(${theme.breakpoints.values.xs}${theme.breakpoints.unit}, 444px)`,
149
+ [`&.${dialogClasses.paperScrollBody}`]: {
150
+ [theme.breakpoints.down(Math.max(theme.breakpoints.values.xs, 444) + 32 * 2)]: {
151
+ maxWidth: 'calc(100% - 64px)'
152
+ }
153
+ }
154
+ }
155
+ }, ...Object.keys(theme.breakpoints.values).filter(maxWidth => maxWidth !== 'xs').map(maxWidth => ({
156
+ props: {
157
+ maxWidth
158
+ },
159
+ style: {
160
+ maxWidth: `${theme.breakpoints.values[maxWidth]}${theme.breakpoints.unit}`,
161
+ [`&.${dialogClasses.paperScrollBody}`]: {
162
+ [theme.breakpoints.down(theme.breakpoints.values[maxWidth] + 32 * 2)]: {
163
+ maxWidth: 'calc(100% - 64px)'
164
+ }
165
+ }
166
+ }
167
+ })), {
168
+ props: ({
169
+ ownerState
170
+ }) => ownerState.fullWidth,
171
+ style: {
172
+ width: 'calc(100% - 64px)'
173
+ }
174
+ }, {
175
+ props: ({
176
+ ownerState
177
+ }) => ownerState.fullScreen,
178
+ style: {
179
+ margin: 0,
180
+ width: '100%',
181
+ maxWidth: '100%',
182
+ height: '100%',
183
+ maxHeight: 'none',
184
+ borderRadius: 0,
185
+ [`&.${dialogClasses.paperScrollBody}`]: {
186
+ margin: 0,
187
+ maxWidth: '100%'
188
+ }
189
+ }
190
+ }]
147
191
  }));
148
192
 
149
193
  /**
@@ -1,16 +1,16 @@
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", "disableSpacing"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
9
  import composeClasses from '@mui/utils/composeClasses';
10
- import styled from '../styles/styled';
11
- import useThemeProps from '../styles/useThemeProps';
10
+ import { styled, createUseThemeProps } from '../zero-styled';
12
11
  import { getDialogActionsUtilityClass } from './dialogActionsClasses';
13
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
+ const useThemeProps = createUseThemeProps('MuiDialogActions');
14
14
  const useUtilityClasses = ownerState => {
15
15
  const {
16
16
  classes,
@@ -30,19 +30,23 @@ const DialogActionsRoot = styled('div', {
30
30
  } = props;
31
31
  return [styles.root, !ownerState.disableSpacing && styles.spacing];
32
32
  }
33
- })(({
34
- ownerState
35
- }) => _extends({
33
+ })({
36
34
  display: 'flex',
37
35
  alignItems: 'center',
38
36
  padding: 8,
39
37
  justifyContent: 'flex-end',
40
- flex: '0 0 auto'
41
- }, !ownerState.disableSpacing && {
42
- '& > :not(style) ~ :not(style)': {
43
- marginLeft: 8
44
- }
45
- }));
38
+ flex: '0 0 auto',
39
+ variants: [{
40
+ props: ({
41
+ ownerState
42
+ }) => !ownerState.disableSpacing,
43
+ style: {
44
+ '& > :not(style) ~ :not(style)': {
45
+ marginLeft: 8
46
+ }
47
+ }
48
+ }]
49
+ });
46
50
  const DialogActions = /*#__PURE__*/React.forwardRef(function DialogActions(inProps, ref) {
47
51
  const props = useThemeProps({
48
52
  props: inProps,
@@ -1,17 +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 = ["className", "dividers"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
9
  import composeClasses from '@mui/utils/composeClasses';
10
- import styled from '../styles/styled';
11
- import useThemeProps from '../styles/useThemeProps';
10
+ import { styled, createUseThemeProps } from '../zero-styled';
12
11
  import { getDialogContentUtilityClass } from './dialogContentClasses';
13
12
  import dialogTitleClasses from '../DialogTitle/dialogTitleClasses';
14
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
+ const useThemeProps = createUseThemeProps('MuiDialogContent');
15
15
  const useUtilityClasses = ownerState => {
16
16
  const {
17
17
  classes,
@@ -32,22 +32,32 @@ const DialogContentRoot = styled('div', {
32
32
  return [styles.root, ownerState.dividers && styles.dividers];
33
33
  }
34
34
  })(({
35
- theme,
36
- ownerState
37
- }) => _extends({
35
+ theme
36
+ }) => ({
38
37
  flex: '1 1 auto',
39
38
  // Add iOS momentum scrolling for iOS < 13.0
40
39
  WebkitOverflowScrolling: 'touch',
41
40
  overflowY: 'auto',
42
- padding: '20px 24px'
43
- }, ownerState.dividers ? {
44
- padding: '16px 24px',
45
- borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
46
- borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
47
- } : {
48
- [`.${dialogTitleClasses.root} + &`]: {
49
- paddingTop: 0
50
- }
41
+ padding: '20px 24px',
42
+ variants: [{
43
+ props: ({
44
+ ownerState
45
+ }) => ownerState.dividers,
46
+ style: {
47
+ padding: '16px 24px',
48
+ borderTop: `1px solid ${(theme.vars || theme).palette.divider}`,
49
+ borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
50
+ }
51
+ }, {
52
+ props: ({
53
+ ownerState
54
+ }) => !ownerState.dividers,
55
+ style: {
56
+ [`.${dialogTitleClasses.root} + &`]: {
57
+ paddingTop: 0
58
+ }
59
+ }
60
+ }]
51
61
  }));
52
62
  const DialogContent = /*#__PURE__*/React.forwardRef(function DialogContent(inProps, ref) {
53
63
  const props = useThemeProps({
@@ -7,11 +7,12 @@ import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
9
  import composeClasses from '@mui/utils/composeClasses';
10
- import styled, { rootShouldForwardProp } from '../styles/styled';
11
- import useThemeProps from '../styles/useThemeProps';
10
+ import rootShouldForwardProp from '../styles/rootShouldForwardProp';
11
+ import { styled, createUseThemeProps } from '../zero-styled';
12
12
  import Typography from '../Typography';
13
13
  import { getDialogContentTextUtilityClass } from './dialogContentTextClasses';
14
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ const useThemeProps = createUseThemeProps('MuiDialogContentText');
15
16
  const useUtilityClasses = ownerState => {
16
17
  const {
17
18
  classes
@@ -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 Typography from '../Typography';
11
- import styled from '../styles/styled';
12
- import useThemeProps from '../styles/useThemeProps';
11
+ import { styled, createUseThemeProps } from '../zero-styled';
13
12
  import { getDialogTitleUtilityClass } from './dialogTitleClasses';
14
13
  import DialogContext from '../Dialog/DialogContext';
15
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ const useThemeProps = createUseThemeProps('MuiDialogTitle');
16
16
  const useUtilityClasses = ownerState => {
17
17
  const {
18
18
  classes
@@ -30,7 +30,7 @@ export interface DividerOwnProps {
30
30
  /**
31
31
  * If `true`, the divider will have a lighter color.
32
32
  * @default false
33
- * @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
33
+ * @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
34
34
  */
35
35
  light?: boolean;
36
36
  /**
@@ -280,7 +280,7 @@ process.env.NODE_ENV !== "production" ? Divider.propTypes /* remove-proptypes */
280
280
  /**
281
281
  * If `true`, the divider will have a lighter color.
282
282
  * @default false
283
- * @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
283
+ * @deprecated Use <Divider sx={{ opacity: 0.6 }} /> (or any opacity or color) instead. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
284
284
  */
285
285
  light: PropTypes.bool,
286
286
  /**
package/Drawer/Drawer.js CHANGED
@@ -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 = ["BackdropProps"],
6
6
  _excluded2 = ["anchor", "BackdropProps", "children", "className", "elevation", "hideBackdrop", "ModalProps", "onClose", "open", "PaperProps", "SlideProps", "TransitionComponent", "transitionDuration", "variant"];
7
7
  import * as React from 'react';
@@ -15,10 +15,11 @@ import Slide from '../Slide';
15
15
  import Paper from '../Paper';
16
16
  import capitalize from '../utils/capitalize';
17
17
  import useTheme from '../styles/useTheme';
18
- import useThemeProps from '../styles/useThemeProps';
19
- import styled, { rootShouldForwardProp } from '../styles/styled';
18
+ import rootShouldForwardProp from '../styles/rootShouldForwardProp';
19
+ import { styled, createUseThemeProps } from '../zero-styled';
20
20
  import { getDrawerUtilityClass } from './drawerClasses';
21
21
  import { jsx as _jsx } from "react/jsx-runtime";
22
+ const useThemeProps = createUseThemeProps('MuiDrawer');
22
23
  const overridesResolver = (props, styles) => {
23
24
  const {
24
25
  ownerState
@@ -67,9 +68,8 @@ const DrawerPaper = styled(Paper, {
67
68
  return [styles.paper, styles[`paperAnchor${capitalize(ownerState.anchor)}`], ownerState.variant !== 'temporary' && styles[`paperAnchorDocked${capitalize(ownerState.anchor)}`]];
68
69
  }
69
70
  })(({
70
- theme,
71
- ownerState
72
- }) => _extends({
71
+ theme
72
+ }) => ({
73
73
  overflowY: 'auto',
74
74
  display: 'flex',
75
75
  flexDirection: 'column',
@@ -84,32 +84,73 @@ const DrawerPaper = styled(Paper, {
84
84
  // We disable the focus ring for mouse, touch and keyboard users.
85
85
  // At some point, it would be better to keep it for keyboard users.
86
86
  // :focus-ring CSS pseudo-class will help.
87
- outline: 0
88
- }, ownerState.anchor === 'left' && {
89
- left: 0
90
- }, ownerState.anchor === 'top' && {
91
- top: 0,
92
- left: 0,
93
- right: 0,
94
- height: 'auto',
95
- maxHeight: '100%'
96
- }, ownerState.anchor === 'right' && {
97
- right: 0
98
- }, ownerState.anchor === 'bottom' && {
99
- top: 'auto',
100
- left: 0,
101
- bottom: 0,
102
- right: 0,
103
- height: 'auto',
104
- maxHeight: '100%'
105
- }, ownerState.anchor === 'left' && ownerState.variant !== 'temporary' && {
106
- borderRight: `1px solid ${(theme.vars || theme).palette.divider}`
107
- }, ownerState.anchor === 'top' && ownerState.variant !== 'temporary' && {
108
- borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
109
- }, ownerState.anchor === 'right' && ownerState.variant !== 'temporary' && {
110
- borderLeft: `1px solid ${(theme.vars || theme).palette.divider}`
111
- }, ownerState.anchor === 'bottom' && ownerState.variant !== 'temporary' && {
112
- borderTop: `1px solid ${(theme.vars || theme).palette.divider}`
87
+ outline: 0,
88
+ variants: [{
89
+ props: {
90
+ anchor: 'left'
91
+ },
92
+ style: {
93
+ left: 0
94
+ }
95
+ }, {
96
+ props: {
97
+ anchor: 'top'
98
+ },
99
+ style: {
100
+ top: 0,
101
+ left: 0,
102
+ right: 0,
103
+ height: 'auto',
104
+ maxHeight: '100%'
105
+ }
106
+ }, {
107
+ props: {
108
+ anchor: 'right'
109
+ },
110
+ style: {
111
+ right: 0
112
+ }
113
+ }, {
114
+ props: {
115
+ anchor: 'bottom'
116
+ },
117
+ style: {
118
+ top: 'auto',
119
+ left: 0,
120
+ bottom: 0,
121
+ right: 0,
122
+ height: 'auto',
123
+ maxHeight: '100%'
124
+ }
125
+ }, {
126
+ props: ({
127
+ ownerState
128
+ }) => ownerState.anchor === 'left' && ownerState.variant !== 'temporary',
129
+ style: {
130
+ borderRight: `1px solid ${(theme.vars || theme).palette.divider}`
131
+ }
132
+ }, {
133
+ props: ({
134
+ ownerState
135
+ }) => ownerState.anchor === 'top' && ownerState.variant !== 'temporary',
136
+ style: {
137
+ borderBottom: `1px solid ${(theme.vars || theme).palette.divider}`
138
+ }
139
+ }, {
140
+ props: ({
141
+ ownerState
142
+ }) => ownerState.anchor === 'right' && ownerState.variant !== 'temporary',
143
+ style: {
144
+ borderLeft: `1px solid ${(theme.vars || theme).palette.divider}`
145
+ }
146
+ }, {
147
+ props: ({
148
+ ownerState
149
+ }) => ownerState.anchor === 'bottom' && ownerState.variant !== 'temporary',
150
+ style: {
151
+ borderTop: `1px solid ${(theme.vars || theme).palette.divider}`
152
+ }
153
+ }]
113
154
  }));
114
155
  const oppositeDirection = {
115
156
  left: 'right',
package/Fab/Fab.js CHANGED
@@ -10,7 +10,7 @@ import composeClasses from '@mui/utils/composeClasses';
10
10
  import ButtonBase from '../ButtonBase';
11
11
  import capitalize from '../utils/capitalize';
12
12
  import fabClasses, { getFabUtilityClass } from './fabClasses';
13
- import { rootShouldForwardProp } from '../styles/styled';
13
+ import rootShouldForwardProp from '../styles/rootShouldForwardProp';
14
14
  import { styled, createUseThemeProps } from '../zero-styled';
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
16
  const useThemeProps = createUseThemeProps('MuiFab');
@@ -17,6 +17,7 @@ export interface FilledInputProps extends StandardProps<InputBaseProps> {
17
17
  hiddenLabel?: boolean;
18
18
  /**
19
19
  * If `true`, the input will not have an underline.
20
+ * @default false
20
21
  */
21
22
  disableUnderline?: boolean;
22
23
  /**