@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 = ["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/modern/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');
@@ -9,11 +9,12 @@ import refType from '@mui/utils/refType';
9
9
  import PropTypes from 'prop-types';
10
10
  import composeClasses from '@mui/utils/composeClasses';
11
11
  import InputBase from '../InputBase';
12
- import styled, { rootShouldForwardProp } from '../styles/styled';
13
- import useThemeProps from '../styles/useThemeProps';
12
+ import rootShouldForwardProp from '../styles/rootShouldForwardProp';
13
+ import { styled, createUseThemeProps } from '../zero-styled';
14
14
  import filledInputClasses, { getFilledInputUtilityClass } from './filledInputClasses';
15
- import { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseComponent as InputBaseInput } from '../InputBase/InputBase';
15
+ import { rootOverridesResolver as inputBaseRootOverridesResolver, inputOverridesResolver as inputBaseInputOverridesResolver, InputBaseRoot, InputBaseInput } from '../InputBase/InputBase';
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
+ const useThemeProps = createUseThemeProps('MuiFilledInput');
17
18
  const useUtilityClasses = ownerState => {
18
19
  const {
19
20
  classes,
@@ -37,15 +38,14 @@ const FilledInputRoot = styled(InputBaseRoot, {
37
38
  return [...inputBaseRootOverridesResolver(props, styles), !ownerState.disableUnderline && styles.underline];
38
39
  }
39
40
  })(({
40
- theme,
41
- ownerState
41
+ theme
42
42
  }) => {
43
43
  const light = theme.palette.mode === 'light';
44
44
  const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
45
45
  const backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';
46
46
  const hoverBackground = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)';
47
47
  const disabledBackground = light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)';
48
- return _extends({
48
+ return {
49
49
  position: 'relative',
50
50
  backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor,
51
51
  borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
@@ -66,76 +66,122 @@ const FilledInputRoot = styled(InputBaseRoot, {
66
66
  },
67
67
  [`&.${filledInputClasses.disabled}`]: {
68
68
  backgroundColor: theme.vars ? theme.vars.palette.FilledInput.disabledBg : disabledBackground
69
- }
70
- }, !ownerState.disableUnderline && {
71
- '&::after': {
72
- borderBottom: `2px solid ${(theme.vars || theme).palette[ownerState.color || 'primary']?.main}`,
73
- left: 0,
74
- bottom: 0,
75
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
76
- content: '""',
77
- position: 'absolute',
78
- right: 0,
79
- transform: 'scaleX(0)',
80
- transition: theme.transitions.create('transform', {
81
- duration: theme.transitions.duration.shorter,
82
- easing: theme.transitions.easing.easeOut
83
- }),
84
- pointerEvents: 'none' // Transparent to the hover style.
85
- },
86
- [`&.${filledInputClasses.focused}:after`]: {
87
- // translateX(0) is a workaround for Safari transform scale bug
88
- // See https://github.com/mui/material-ui/issues/31766
89
- transform: 'scaleX(1) translateX(0)'
90
69
  },
91
- [`&.${filledInputClasses.error}`]: {
92
- '&::before, &::after': {
93
- borderBottomColor: (theme.vars || theme).palette.error.main
70
+ variants: [{
71
+ props: ({
72
+ ownerState
73
+ }) => !ownerState.disableUnderline,
74
+ style: {
75
+ '&::after': {
76
+ left: 0,
77
+ bottom: 0,
78
+ // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
79
+ content: '""',
80
+ position: 'absolute',
81
+ right: 0,
82
+ transform: 'scaleX(0)',
83
+ transition: theme.transitions.create('transform', {
84
+ duration: theme.transitions.duration.shorter,
85
+ easing: theme.transitions.easing.easeOut
86
+ }),
87
+ pointerEvents: 'none' // Transparent to the hover style.
88
+ },
89
+ [`&.${filledInputClasses.focused}:after`]: {
90
+ // translateX(0) is a workaround for Safari transform scale bug
91
+ // See https://github.com/mui/material-ui/issues/31766
92
+ transform: 'scaleX(1) translateX(0)'
93
+ },
94
+ [`&.${filledInputClasses.error}`]: {
95
+ '&::before, &::after': {
96
+ borderBottomColor: (theme.vars || theme).palette.error.main
97
+ }
98
+ },
99
+ '&::before': {
100
+ borderBottom: `1px solid ${theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})` : bottomLineColor}`,
101
+ left: 0,
102
+ bottom: 0,
103
+ // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
104
+ content: '"\\00a0"',
105
+ position: 'absolute',
106
+ right: 0,
107
+ transition: theme.transitions.create('border-bottom-color', {
108
+ duration: theme.transitions.duration.shorter
109
+ }),
110
+ pointerEvents: 'none' // Transparent to the hover style.
111
+ },
112
+ [`&:hover:not(.${filledInputClasses.disabled}, .${filledInputClasses.error}):before`]: {
113
+ borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`
114
+ },
115
+ [`&.${filledInputClasses.disabled}:before`]: {
116
+ borderBottomStyle: 'dotted'
117
+ }
94
118
  }
95
- },
96
- '&::before': {
97
- borderBottom: `1px solid ${theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})` : bottomLineColor}`,
98
- left: 0,
99
- bottom: 0,
100
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
101
- content: '"\\00a0"',
102
- position: 'absolute',
103
- right: 0,
104
- transition: theme.transitions.create('border-bottom-color', {
105
- duration: theme.transitions.duration.shorter
106
- }),
107
- pointerEvents: 'none' // Transparent to the hover style.
108
- },
109
- [`&:hover:not(.${filledInputClasses.disabled}, .${filledInputClasses.error}):before`]: {
110
- borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`
111
- },
112
- [`&.${filledInputClasses.disabled}:before`]: {
113
- borderBottomStyle: 'dotted'
114
- }
115
- }, ownerState.startAdornment && {
116
- paddingLeft: 12
117
- }, ownerState.endAdornment && {
118
- paddingRight: 12
119
- }, ownerState.multiline && _extends({
120
- padding: '25px 12px 8px'
121
- }, ownerState.size === 'small' && {
122
- paddingTop: 21,
123
- paddingBottom: 4
124
- }, ownerState.hiddenLabel && {
125
- paddingTop: 16,
126
- paddingBottom: 17
127
- }, ownerState.hiddenLabel && ownerState.size === 'small' && {
128
- paddingTop: 8,
129
- paddingBottom: 9
130
- }));
119
+ }, ...Object.entries(theme.palette).filter(([, value]) => value.main) // check all the used fields in the style below
120
+ .map(([color]) => ({
121
+ props: {
122
+ disableUnderline: false,
123
+ color
124
+ },
125
+ style: {
126
+ '&::after': {
127
+ borderBottom: `2px solid ${(theme.vars || theme).palette[color]?.main}`
128
+ }
129
+ }
130
+ })), {
131
+ props: ({
132
+ ownerState
133
+ }) => ownerState.startAdornment,
134
+ style: {
135
+ paddingLeft: 12
136
+ }
137
+ }, {
138
+ props: ({
139
+ ownerState
140
+ }) => ownerState.endAdornment,
141
+ style: {
142
+ paddingRight: 12
143
+ }
144
+ }, {
145
+ props: ({
146
+ ownerState
147
+ }) => ownerState.multiline,
148
+ style: {
149
+ padding: '25px 12px 8px'
150
+ }
151
+ }, {
152
+ props: ({
153
+ ownerState,
154
+ size
155
+ }) => ownerState.multiline && size === 'small',
156
+ style: {
157
+ paddingTop: 21,
158
+ paddingBottom: 4
159
+ }
160
+ }, {
161
+ props: ({
162
+ ownerState
163
+ }) => ownerState.multiline && ownerState.hiddenLabel,
164
+ style: {
165
+ paddingTop: 16,
166
+ paddingBottom: 17
167
+ }
168
+ }, {
169
+ props: ({
170
+ ownerState
171
+ }) => ownerState.multiline && ownerState.hiddenLabel && ownerState.size === 'small',
172
+ style: {
173
+ paddingTop: 8,
174
+ paddingBottom: 9
175
+ }
176
+ }]
177
+ };
131
178
  });
132
179
  const FilledInputInput = styled(InputBaseInput, {
133
180
  name: 'MuiFilledInput',
134
181
  slot: 'Input',
135
182
  overridesResolver: inputBaseInputOverridesResolver
136
183
  })(({
137
- theme,
138
- ownerState
184
+ theme
139
185
  }) => _extends({
140
186
  paddingTop: 25,
141
187
  paddingRight: 12,
@@ -161,24 +207,56 @@ const FilledInputInput = styled(InputBaseInput, {
161
207
  caretColor: '#fff'
162
208
  }
163
209
  }
164
- }, ownerState.size === 'small' && {
165
- paddingTop: 21,
166
- paddingBottom: 4
167
- }, ownerState.hiddenLabel && {
168
- paddingTop: 16,
169
- paddingBottom: 17
170
- }, ownerState.startAdornment && {
171
- paddingLeft: 0
172
- }, ownerState.endAdornment && {
173
- paddingRight: 0
174
- }, ownerState.hiddenLabel && ownerState.size === 'small' && {
175
- paddingTop: 8,
176
- paddingBottom: 9
177
- }, ownerState.multiline && {
178
- paddingTop: 0,
179
- paddingBottom: 0,
180
- paddingLeft: 0,
181
- paddingRight: 0
210
+ }, {
211
+ variants: [{
212
+ props: {
213
+ size: 'small'
214
+ },
215
+ style: {
216
+ paddingTop: 21,
217
+ paddingBottom: 4
218
+ }
219
+ }, {
220
+ props: ({
221
+ ownerState
222
+ }) => ownerState.hiddenLabel,
223
+ style: {
224
+ paddingTop: 16,
225
+ paddingBottom: 17
226
+ }
227
+ }, {
228
+ props: ({
229
+ ownerState
230
+ }) => ownerState.startAdornment,
231
+ style: {
232
+ paddingLeft: 0
233
+ }
234
+ }, {
235
+ props: ({
236
+ ownerState
237
+ }) => ownerState.endAdornment,
238
+ style: {
239
+ paddingRight: 0
240
+ }
241
+ }, {
242
+ props: ({
243
+ ownerState
244
+ }) => ownerState.hiddenLabel && ownerState.size === 'small',
245
+ style: {
246
+ paddingTop: 8,
247
+ paddingBottom: 9
248
+ }
249
+ }, {
250
+ props: ({
251
+ ownerState
252
+ }) => ownerState.multiline,
253
+ style: {
254
+ paddingTop: 0,
255
+ paddingBottom: 0,
256
+ paddingLeft: 0,
257
+ paddingRight: 0
258
+ }
259
+ }]
182
260
  }));
183
261
  const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps, ref) {
184
262
  const props = useThemeProps({
@@ -186,6 +264,7 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
186
264
  name: 'MuiFilledInput'
187
265
  });
188
266
  const {
267
+ disableUnderline = false,
189
268
  components = {},
190
269
  componentsProps: componentsPropsProp,
191
270
  fullWidth = false,
@@ -198,6 +277,7 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
198
277
  } = props,
199
278
  other = _objectWithoutPropertiesLoose(props, _excluded);
200
279
  const ownerState = _extends({}, props, {
280
+ disableUnderline,
201
281
  fullWidth,
202
282
  inputComponent,
203
283
  multiline,
@@ -292,6 +372,7 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes /* remove-proptype
292
372
  disabled: PropTypes.bool,
293
373
  /**
294
374
  * If `true`, the input will not have an underline.
375
+ * @default false
295
376
  */
296
377
  disableUnderline: PropTypes.bool,
297
378
  /**
@@ -423,5 +504,7 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes /* remove-proptype
423
504
  */
424
505
  value: PropTypes.any
425
506
  } : void 0;
426
- FilledInput.muiName = 'Input';
507
+ if (FilledInput) {
508
+ FilledInput.muiName = 'Input';
509
+ }
427
510
  export default FilledInput;
@@ -207,7 +207,7 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes /* remove-pro
207
207
  /**
208
208
  * The props used for each slot inside.
209
209
  * @default {}
210
- * @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
210
+ * @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.
211
211
  */
212
212
  componentsProps: PropTypes.shape({
213
213
  typography: PropTypes.object
@@ -10,11 +10,11 @@ import clsx from 'clsx';
10
10
  import composeClasses from '@mui/utils/composeClasses';
11
11
  import formControlState from '../FormControl/formControlState';
12
12
  import useFormControl from '../FormControl/useFormControl';
13
- import styled from '../styles/styled';
13
+ import { styled, createUseThemeProps } from '../zero-styled';
14
14
  import capitalize from '../utils/capitalize';
15
15
  import formHelperTextClasses, { getFormHelperTextUtilityClasses } from './formHelperTextClasses';
16
- import useThemeProps from '../styles/useThemeProps';
17
16
  import { jsx as _jsx } from "react/jsx-runtime";
17
+ const useThemeProps = createUseThemeProps('MuiFormHelperText');
18
18
  const useUtilityClasses = ownerState => {
19
19
  const {
20
20
  classes,
@@ -10,10 +10,10 @@ import composeClasses from '@mui/utils/composeClasses';
10
10
  import formControlState from '../FormControl/formControlState';
11
11
  import useFormControl from '../FormControl/useFormControl';
12
12
  import capitalize from '../utils/capitalize';
13
- import useThemeProps from '../styles/useThemeProps';
14
- import styled from '../styles/styled';
13
+ import { styled, createUseThemeProps } from '../zero-styled';
15
14
  import formLabelClasses, { getFormLabelUtilityClasses } from './formLabelClasses';
16
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
+ const useThemeProps = createUseThemeProps('MuiFormLabel');
17
17
  const useUtilityClasses = ownerState => {
18
18
  const {
19
19
  classes,
@@ -39,23 +39,33 @@ export const FormLabelRoot = styled('label', {
39
39
  return _extends({}, styles.root, ownerState.color === 'secondary' && styles.colorSecondary, ownerState.filled && styles.filled);
40
40
  }
41
41
  })(({
42
- theme,
43
- ownerState
42
+ theme
44
43
  }) => _extends({
45
44
  color: (theme.vars || theme).palette.text.secondary
46
45
  }, theme.typography.body1, {
47
46
  lineHeight: '1.4375em',
48
47
  padding: 0,
49
48
  position: 'relative',
50
- [`&.${formLabelClasses.focused}`]: {
51
- color: (theme.vars || theme).palette[ownerState.color].main
52
- },
53
- [`&.${formLabelClasses.disabled}`]: {
54
- color: (theme.vars || theme).palette.text.disabled
55
- },
56
- [`&.${formLabelClasses.error}`]: {
57
- color: (theme.vars || theme).palette.error.main
58
- }
49
+ variants: [...Object.entries(theme.palette).filter(([, value]) => value.main).map(([color]) => ({
50
+ props: {
51
+ color
52
+ },
53
+ style: {
54
+ [`&.${formLabelClasses.focused}`]: {
55
+ color: (theme.vars || theme).palette[color].main
56
+ }
57
+ }
58
+ })), {
59
+ props: {},
60
+ style: {
61
+ [`&.${formLabelClasses.disabled}`]: {
62
+ color: (theme.vars || theme).palette.text.disabled
63
+ },
64
+ [`&.${formLabelClasses.error}`]: {
65
+ color: (theme.vars || theme).palette.error.main
66
+ }
67
+ }
68
+ }]
59
69
  }));
60
70
  const AsteriskComponent = styled('span', {
61
71
  name: 'MuiFormLabel',
@@ -251,5 +251,7 @@ process.env.NODE_ENV !== "production" ? Grow.propTypes /* remove-proptypes */ =
251
251
  exit: PropTypes.number
252
252
  })])
253
253
  } : void 0;
254
- Grow.muiSupportAuto = true;
254
+ if (Grow) {
255
+ Grow.muiSupportAuto = true;
256
+ }
255
257
  export default Grow;