@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
@@ -14,14 +14,15 @@ var _refType = _interopRequireDefault(require("@mui/utils/refType"));
14
14
  var _propTypes = _interopRequireDefault(require("prop-types"));
15
15
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
16
16
  var _InputBase = _interopRequireDefault(require("../InputBase"));
17
- var _styled = _interopRequireWildcard(require("../styles/styled"));
18
- var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
17
+ var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
18
+ var _zeroStyled = require("../zero-styled");
19
19
  var _filledInputClasses = _interopRequireWildcard(require("./filledInputClasses"));
20
20
  var _InputBase2 = require("../InputBase/InputBase");
21
21
  var _jsxRuntime = require("react/jsx-runtime");
22
22
  const _excluded = ["disableUnderline", "components", "componentsProps", "fullWidth", "hiddenLabel", "inputComponent", "multiline", "slotProps", "slots", "type"];
23
23
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
24
24
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
25
+ const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiFilledInput');
25
26
  const useUtilityClasses = ownerState => {
26
27
  const {
27
28
  classes,
@@ -34,8 +35,8 @@ const useUtilityClasses = ownerState => {
34
35
  const composedClasses = (0, _composeClasses.default)(slots, _filledInputClasses.getFilledInputUtilityClass, classes);
35
36
  return (0, _extends2.default)({}, classes, composedClasses);
36
37
  };
37
- const FilledInputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
38
- shouldForwardProp: prop => (0, _styled.rootShouldForwardProp)(prop) || prop === 'classes',
38
+ const FilledInputRoot = (0, _zeroStyled.styled)(_InputBase2.InputBaseRoot, {
39
+ shouldForwardProp: prop => (0, _rootShouldForwardProp.default)(prop) || prop === 'classes',
39
40
  name: 'MuiFilledInput',
40
41
  slot: 'Root',
41
42
  overridesResolver: (props, styles) => {
@@ -45,16 +46,14 @@ const FilledInputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
45
46
  return [...(0, _InputBase2.rootOverridesResolver)(props, styles), !ownerState.disableUnderline && styles.underline];
46
47
  }
47
48
  })(({
48
- theme,
49
- ownerState
49
+ theme
50
50
  }) => {
51
- var _palette;
52
51
  const light = theme.palette.mode === 'light';
53
52
  const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';
54
53
  const backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';
55
54
  const hoverBackground = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)';
56
55
  const disabledBackground = light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)';
57
- return (0, _extends2.default)({
56
+ return {
58
57
  position: 'relative',
59
58
  backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor,
60
59
  borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,
@@ -75,76 +74,125 @@ const FilledInputRoot = (0, _styled.default)(_InputBase2.InputBaseRoot, {
75
74
  },
76
75
  [`&.${_filledInputClasses.default.disabled}`]: {
77
76
  backgroundColor: theme.vars ? theme.vars.palette.FilledInput.disabledBg : disabledBackground
78
- }
79
- }, !ownerState.disableUnderline && {
80
- '&::after': {
81
- borderBottom: `2px solid ${(_palette = (theme.vars || theme).palette[ownerState.color || 'primary']) == null ? void 0 : _palette.main}`,
82
- left: 0,
83
- bottom: 0,
84
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
85
- content: '""',
86
- position: 'absolute',
87
- right: 0,
88
- transform: 'scaleX(0)',
89
- transition: theme.transitions.create('transform', {
90
- duration: theme.transitions.duration.shorter,
91
- easing: theme.transitions.easing.easeOut
92
- }),
93
- pointerEvents: 'none' // Transparent to the hover style.
94
- },
95
- [`&.${_filledInputClasses.default.focused}:after`]: {
96
- // translateX(0) is a workaround for Safari transform scale bug
97
- // See https://github.com/mui/material-ui/issues/31766
98
- transform: 'scaleX(1) translateX(0)'
99
77
  },
100
- [`&.${_filledInputClasses.default.error}`]: {
101
- '&::before, &::after': {
102
- borderBottomColor: (theme.vars || theme).palette.error.main
78
+ variants: [{
79
+ props: ({
80
+ ownerState
81
+ }) => !ownerState.disableUnderline,
82
+ style: {
83
+ '&::after': {
84
+ left: 0,
85
+ bottom: 0,
86
+ // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
87
+ content: '""',
88
+ position: 'absolute',
89
+ right: 0,
90
+ transform: 'scaleX(0)',
91
+ transition: theme.transitions.create('transform', {
92
+ duration: theme.transitions.duration.shorter,
93
+ easing: theme.transitions.easing.easeOut
94
+ }),
95
+ pointerEvents: 'none' // Transparent to the hover style.
96
+ },
97
+ [`&.${_filledInputClasses.default.focused}:after`]: {
98
+ // translateX(0) is a workaround for Safari transform scale bug
99
+ // See https://github.com/mui/material-ui/issues/31766
100
+ transform: 'scaleX(1) translateX(0)'
101
+ },
102
+ [`&.${_filledInputClasses.default.error}`]: {
103
+ '&::before, &::after': {
104
+ borderBottomColor: (theme.vars || theme).palette.error.main
105
+ }
106
+ },
107
+ '&::before': {
108
+ borderBottom: `1px solid ${theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})` : bottomLineColor}`,
109
+ left: 0,
110
+ bottom: 0,
111
+ // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
112
+ content: '"\\00a0"',
113
+ position: 'absolute',
114
+ right: 0,
115
+ transition: theme.transitions.create('border-bottom-color', {
116
+ duration: theme.transitions.duration.shorter
117
+ }),
118
+ pointerEvents: 'none' // Transparent to the hover style.
119
+ },
120
+ [`&:hover:not(.${_filledInputClasses.default.disabled}, .${_filledInputClasses.default.error}):before`]: {
121
+ borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`
122
+ },
123
+ [`&.${_filledInputClasses.default.disabled}:before`]: {
124
+ borderBottomStyle: 'dotted'
125
+ }
103
126
  }
104
- },
105
- '&::before': {
106
- borderBottom: `1px solid ${theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})` : bottomLineColor}`,
107
- left: 0,
108
- bottom: 0,
109
- // Doing the other way around crash on IE11 "''" https://github.com/cssinjs/jss/issues/242
110
- content: '"\\00a0"',
111
- position: 'absolute',
112
- right: 0,
113
- transition: theme.transitions.create('border-bottom-color', {
114
- duration: theme.transitions.duration.shorter
115
- }),
116
- pointerEvents: 'none' // Transparent to the hover style.
117
- },
118
- [`&:hover:not(.${_filledInputClasses.default.disabled}, .${_filledInputClasses.default.error}):before`]: {
119
- borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`
120
- },
121
- [`&.${_filledInputClasses.default.disabled}:before`]: {
122
- borderBottomStyle: 'dotted'
123
- }
124
- }, ownerState.startAdornment && {
125
- paddingLeft: 12
126
- }, ownerState.endAdornment && {
127
- paddingRight: 12
128
- }, ownerState.multiline && (0, _extends2.default)({
129
- padding: '25px 12px 8px'
130
- }, ownerState.size === 'small' && {
131
- paddingTop: 21,
132
- paddingBottom: 4
133
- }, ownerState.hiddenLabel && {
134
- paddingTop: 16,
135
- paddingBottom: 17
136
- }, ownerState.hiddenLabel && ownerState.size === 'small' && {
137
- paddingTop: 8,
138
- paddingBottom: 9
139
- }));
127
+ }, ...Object.entries(theme.palette).filter(([, value]) => value.main) // check all the used fields in the style below
128
+ .map(([color]) => {
129
+ var _palette$color;
130
+ return {
131
+ props: {
132
+ disableUnderline: false,
133
+ color
134
+ },
135
+ style: {
136
+ '&::after': {
137
+ borderBottom: `2px solid ${(_palette$color = (theme.vars || theme).palette[color]) == null ? void 0 : _palette$color.main}`
138
+ }
139
+ }
140
+ };
141
+ }), {
142
+ props: ({
143
+ ownerState
144
+ }) => ownerState.startAdornment,
145
+ style: {
146
+ paddingLeft: 12
147
+ }
148
+ }, {
149
+ props: ({
150
+ ownerState
151
+ }) => ownerState.endAdornment,
152
+ style: {
153
+ paddingRight: 12
154
+ }
155
+ }, {
156
+ props: ({
157
+ ownerState
158
+ }) => ownerState.multiline,
159
+ style: {
160
+ padding: '25px 12px 8px'
161
+ }
162
+ }, {
163
+ props: ({
164
+ ownerState,
165
+ size
166
+ }) => ownerState.multiline && size === 'small',
167
+ style: {
168
+ paddingTop: 21,
169
+ paddingBottom: 4
170
+ }
171
+ }, {
172
+ props: ({
173
+ ownerState
174
+ }) => ownerState.multiline && ownerState.hiddenLabel,
175
+ style: {
176
+ paddingTop: 16,
177
+ paddingBottom: 17
178
+ }
179
+ }, {
180
+ props: ({
181
+ ownerState
182
+ }) => ownerState.multiline && ownerState.hiddenLabel && ownerState.size === 'small',
183
+ style: {
184
+ paddingTop: 8,
185
+ paddingBottom: 9
186
+ }
187
+ }]
188
+ };
140
189
  });
141
- const FilledInputInput = (0, _styled.default)(_InputBase2.InputBaseComponent, {
190
+ const FilledInputInput = (0, _zeroStyled.styled)(_InputBase2.InputBaseInput, {
142
191
  name: 'MuiFilledInput',
143
192
  slot: 'Input',
144
193
  overridesResolver: _InputBase2.inputOverridesResolver
145
194
  })(({
146
- theme,
147
- ownerState
195
+ theme
148
196
  }) => (0, _extends2.default)({
149
197
  paddingTop: 25,
150
198
  paddingRight: 12,
@@ -170,32 +218,65 @@ const FilledInputInput = (0, _styled.default)(_InputBase2.InputBaseComponent, {
170
218
  caretColor: '#fff'
171
219
  }
172
220
  }
173
- }, ownerState.size === 'small' && {
174
- paddingTop: 21,
175
- paddingBottom: 4
176
- }, ownerState.hiddenLabel && {
177
- paddingTop: 16,
178
- paddingBottom: 17
179
- }, ownerState.startAdornment && {
180
- paddingLeft: 0
181
- }, ownerState.endAdornment && {
182
- paddingRight: 0
183
- }, ownerState.hiddenLabel && ownerState.size === 'small' && {
184
- paddingTop: 8,
185
- paddingBottom: 9
186
- }, ownerState.multiline && {
187
- paddingTop: 0,
188
- paddingBottom: 0,
189
- paddingLeft: 0,
190
- paddingRight: 0
221
+ }, {
222
+ variants: [{
223
+ props: {
224
+ size: 'small'
225
+ },
226
+ style: {
227
+ paddingTop: 21,
228
+ paddingBottom: 4
229
+ }
230
+ }, {
231
+ props: ({
232
+ ownerState
233
+ }) => ownerState.hiddenLabel,
234
+ style: {
235
+ paddingTop: 16,
236
+ paddingBottom: 17
237
+ }
238
+ }, {
239
+ props: ({
240
+ ownerState
241
+ }) => ownerState.startAdornment,
242
+ style: {
243
+ paddingLeft: 0
244
+ }
245
+ }, {
246
+ props: ({
247
+ ownerState
248
+ }) => ownerState.endAdornment,
249
+ style: {
250
+ paddingRight: 0
251
+ }
252
+ }, {
253
+ props: ({
254
+ ownerState
255
+ }) => ownerState.hiddenLabel && ownerState.size === 'small',
256
+ style: {
257
+ paddingTop: 8,
258
+ paddingBottom: 9
259
+ }
260
+ }, {
261
+ props: ({
262
+ ownerState
263
+ }) => ownerState.multiline,
264
+ style: {
265
+ paddingTop: 0,
266
+ paddingBottom: 0,
267
+ paddingLeft: 0,
268
+ paddingRight: 0
269
+ }
270
+ }]
191
271
  }));
192
272
  const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps, ref) {
193
273
  var _ref, _slots$root, _ref2, _slots$input;
194
- const props = (0, _useThemeProps.default)({
274
+ const props = useThemeProps({
195
275
  props: inProps,
196
276
  name: 'MuiFilledInput'
197
277
  });
198
278
  const {
279
+ disableUnderline = false,
199
280
  components = {},
200
281
  componentsProps: componentsPropsProp,
201
282
  fullWidth = false,
@@ -208,6 +289,7 @@ const FilledInput = /*#__PURE__*/React.forwardRef(function FilledInput(inProps,
208
289
  } = props,
209
290
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
210
291
  const ownerState = (0, _extends2.default)({}, props, {
292
+ disableUnderline,
211
293
  fullWidth,
212
294
  inputComponent,
213
295
  multiline,
@@ -302,6 +384,7 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes /* remove-proptype
302
384
  disabled: _propTypes.default.bool,
303
385
  /**
304
386
  * If `true`, the input will not have an underline.
387
+ * @default false
305
388
  */
306
389
  disableUnderline: _propTypes.default.bool,
307
390
  /**
@@ -433,5 +516,7 @@ process.env.NODE_ENV !== "production" ? FilledInput.propTypes /* remove-proptype
433
516
  */
434
517
  value: _propTypes.default.any
435
518
  } : void 0;
436
- FilledInput.muiName = 'Input';
519
+ if (FilledInput) {
520
+ FilledInput.muiName = 'Input';
521
+ }
437
522
  var _default = exports.default = FilledInput;
@@ -20,8 +20,9 @@ var _Typography = _interopRequireDefault(require("../Typography"));
20
20
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
21
21
  var _formControlLabelClasses = _interopRequireWildcard(require("./formControlLabelClasses"));
22
22
  var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
23
+ var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
23
24
  var _jsxRuntime = require("react/jsx-runtime");
24
- const _excluded = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "required", "slotProps", "value"];
25
+ const _excluded = ["checked", "className", "componentsProps", "control", "disabled", "disableTypography", "inputRef", "label", "labelPlacement", "name", "onChange", "required", "slots", "slotProps", "value"];
25
26
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
26
27
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
27
28
  const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiFormControlLabel');
@@ -119,7 +120,7 @@ const AsteriskComponent = (0, _zeroStyled.styled)('span', {
119
120
  * Use this component if you want to display an extra label.
120
121
  */
121
122
  const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel(inProps, ref) {
122
- var _ref, _slotProps$typography;
123
+ var _ref;
123
124
  const props = useThemeProps({
124
125
  props: inProps,
125
126
  name: 'MuiFormControlLabel'
@@ -133,6 +134,7 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
133
134
  label: labelProp,
134
135
  labelPlacement = 'end',
135
136
  required: requiredProp,
137
+ slots = {},
136
138
  slotProps = {}
137
139
  } = props,
138
140
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
@@ -160,10 +162,18 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
160
162
  error: fcs.error
161
163
  });
162
164
  const classes = useUtilityClasses(ownerState);
163
- const typographySlotProps = (_slotProps$typography = slotProps.typography) != null ? _slotProps$typography : componentsProps.typography;
165
+ const externalForwardedProps = {
166
+ slots,
167
+ slotProps: (0, _extends2.default)({}, componentsProps, slotProps)
168
+ };
169
+ const [TypographySlot, typographySlotProps] = (0, _useSlot.default)('typography', {
170
+ elementType: _Typography.default,
171
+ externalForwardedProps,
172
+ ownerState
173
+ });
164
174
  let label = labelProp;
165
175
  if (label != null && label.type !== _Typography.default && !disableTypography) {
166
- label = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography.default, (0, _extends2.default)({
176
+ label = /*#__PURE__*/(0, _jsxRuntime.jsx)(TypographySlot, (0, _extends2.default)({
167
177
  component: "span"
168
178
  }, typographySlotProps, {
169
179
  className: (0, _clsx.default)(classes.label, typographySlotProps == null ? void 0 : typographySlotProps.className),
@@ -206,6 +216,7 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes /* remove-pro
206
216
  /**
207
217
  * The props used for each slot inside.
208
218
  * @default {}
219
+ * @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.
209
220
  */
210
221
  componentsProps: _propTypes.default.shape({
211
222
  typography: _propTypes.default.object
@@ -255,7 +266,14 @@ process.env.NODE_ENV !== "production" ? FormControlLabel.propTypes /* remove-pro
255
266
  * @default {}
256
267
  */
257
268
  slotProps: _propTypes.default.shape({
258
- typography: _propTypes.default.object
269
+ typography: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
270
+ }),
271
+ /**
272
+ * The components used for each slot inside.
273
+ * @default {}
274
+ */
275
+ slots: _propTypes.default.shape({
276
+ typography: _propTypes.default.elementType
259
277
  }),
260
278
  /**
261
279
  * The system prop that allows defining system overrides as well as additional CSS styles.
@@ -14,15 +14,15 @@ var _clsx = _interopRequireDefault(require("clsx"));
14
14
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
15
15
  var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
16
16
  var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
17
- var _styled = _interopRequireDefault(require("../styles/styled"));
17
+ var _zeroStyled = require("../zero-styled");
18
18
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
19
19
  var _formHelperTextClasses = _interopRequireWildcard(require("./formHelperTextClasses"));
20
- var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
21
20
  var _jsxRuntime = require("react/jsx-runtime");
22
21
  var _span;
23
22
  const _excluded = ["children", "className", "component", "disabled", "error", "filled", "focused", "margin", "required", "variant"];
24
23
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
25
24
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
25
+ const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiFormHelperText');
26
26
  const useUtilityClasses = ownerState => {
27
27
  const {
28
28
  classes,
@@ -39,7 +39,7 @@ const useUtilityClasses = ownerState => {
39
39
  };
40
40
  return (0, _composeClasses.default)(slots, _formHelperTextClasses.getFormHelperTextUtilityClasses, classes);
41
41
  };
42
- const FormHelperTextRoot = (0, _styled.default)('p', {
42
+ const FormHelperTextRoot = (0, _zeroStyled.styled)('p', {
43
43
  name: 'MuiFormHelperText',
44
44
  slot: 'Root',
45
45
  overridesResolver: (props, styles) => {
@@ -82,7 +82,7 @@ const FormHelperTextRoot = (0, _styled.default)('p', {
82
82
  }]
83
83
  }));
84
84
  const FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inProps, ref) {
85
- const props = (0, _useThemeProps.default)({
85
+ const props = useThemeProps({
86
86
  props: inProps,
87
87
  name: 'MuiFormHelperText'
88
88
  });
@@ -15,13 +15,13 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
15
15
  var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
16
16
  var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
17
17
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
18
- var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
19
- var _styled = _interopRequireDefault(require("../styles/styled"));
18
+ var _zeroStyled = require("../zero-styled");
20
19
  var _formLabelClasses = _interopRequireWildcard(require("./formLabelClasses"));
21
20
  var _jsxRuntime = require("react/jsx-runtime");
22
21
  const _excluded = ["children", "className", "color", "component", "disabled", "error", "filled", "focused", "required"];
23
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
24
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
+ const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiFormLabel');
25
25
  const useUtilityClasses = ownerState => {
26
26
  const {
27
27
  classes,
@@ -38,7 +38,7 @@ const useUtilityClasses = ownerState => {
38
38
  };
39
39
  return (0, _composeClasses.default)(slots, _formLabelClasses.getFormLabelUtilityClasses, classes);
40
40
  };
41
- const FormLabelRoot = exports.FormLabelRoot = (0, _styled.default)('label', {
41
+ const FormLabelRoot = exports.FormLabelRoot = (0, _zeroStyled.styled)('label', {
42
42
  name: 'MuiFormLabel',
43
43
  slot: 'Root',
44
44
  overridesResolver: ({
@@ -47,25 +47,35 @@ const FormLabelRoot = exports.FormLabelRoot = (0, _styled.default)('label', {
47
47
  return (0, _extends2.default)({}, styles.root, ownerState.color === 'secondary' && styles.colorSecondary, ownerState.filled && styles.filled);
48
48
  }
49
49
  })(({
50
- theme,
51
- ownerState
50
+ theme
52
51
  }) => (0, _extends2.default)({
53
52
  color: (theme.vars || theme).palette.text.secondary
54
53
  }, theme.typography.body1, {
55
54
  lineHeight: '1.4375em',
56
55
  padding: 0,
57
56
  position: 'relative',
58
- [`&.${_formLabelClasses.default.focused}`]: {
59
- color: (theme.vars || theme).palette[ownerState.color].main
60
- },
61
- [`&.${_formLabelClasses.default.disabled}`]: {
62
- color: (theme.vars || theme).palette.text.disabled
63
- },
64
- [`&.${_formLabelClasses.default.error}`]: {
65
- color: (theme.vars || theme).palette.error.main
66
- }
57
+ variants: [...Object.entries(theme.palette).filter(([, value]) => value.main).map(([color]) => ({
58
+ props: {
59
+ color
60
+ },
61
+ style: {
62
+ [`&.${_formLabelClasses.default.focused}`]: {
63
+ color: (theme.vars || theme).palette[color].main
64
+ }
65
+ }
66
+ })), {
67
+ props: {},
68
+ style: {
69
+ [`&.${_formLabelClasses.default.disabled}`]: {
70
+ color: (theme.vars || theme).palette.text.disabled
71
+ },
72
+ [`&.${_formLabelClasses.default.error}`]: {
73
+ color: (theme.vars || theme).palette.error.main
74
+ }
75
+ }
76
+ }]
67
77
  }));
68
- const AsteriskComponent = (0, _styled.default)('span', {
78
+ const AsteriskComponent = (0, _zeroStyled.styled)('span', {
69
79
  name: 'MuiFormLabel',
70
80
  slot: 'Asterisk',
71
81
  overridesResolver: (props, styles) => styles.asterisk
@@ -77,7 +87,7 @@ const AsteriskComponent = (0, _styled.default)('span', {
77
87
  }
78
88
  }));
79
89
  const FormLabel = /*#__PURE__*/React.forwardRef(function FormLabel(inProps, ref) {
80
- const props = (0, _useThemeProps.default)({
90
+ const props = useThemeProps({
81
91
  props: inProps,
82
92
  name: 'MuiFormLabel'
83
93
  });
package/node/Grow/Grow.js CHANGED
@@ -259,5 +259,7 @@ process.env.NODE_ENV !== "production" ? Grow.propTypes /* remove-proptypes */ =
259
259
  exit: _propTypes.default.number
260
260
  })])
261
261
  } : void 0;
262
- Grow.muiSupportAuto = true;
262
+ if (Grow) {
263
+ Grow.muiSupportAuto = true;
264
+ }
263
265
  var _default = exports.default = Grow;