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

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 (75) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/Checkbox/Checkbox.js +51 -20
  3. package/FormHelperText/FormHelperText.js +18 -8
  4. package/IconButton/IconButton.js +97 -40
  5. package/ImageList/ImageList.js +16 -14
  6. package/ImageListItem/ImageListItem.js +37 -22
  7. package/ImageListItemBar/ImageListItemBar.js +65 -32
  8. package/ListItem/ListItem.js +94 -50
  9. package/ListItemAvatar/ListItemAvatar.js +12 -8
  10. package/ListItemButton/ListItemButton.js +35 -15
  11. package/ListItemSecondaryAction/ListItemSecondaryAction.js +12 -8
  12. package/ListItemText/ListItemText.js +20 -11
  13. package/ListSubheader/ListSubheader.js +44 -19
  14. package/Radio/Radio.js +50 -20
  15. package/Radio/RadioButtonIcon.js +18 -12
  16. package/Rating/Rating.js +71 -37
  17. package/Table/Table.js +11 -6
  18. package/TableCell/TableCell.js +96 -41
  19. package/TableSortLabel/TableSortLabel.js +19 -9
  20. package/Toolbar/Toolbar.js +33 -17
  21. package/Typography/Typography.js +3 -2
  22. package/index.js +1 -1
  23. package/modern/Checkbox/Checkbox.js +51 -20
  24. package/modern/FormHelperText/FormHelperText.js +18 -8
  25. package/modern/IconButton/IconButton.js +97 -40
  26. package/modern/ImageList/ImageList.js +16 -14
  27. package/modern/ImageListItem/ImageListItem.js +37 -22
  28. package/modern/ImageListItemBar/ImageListItemBar.js +65 -32
  29. package/modern/ListItem/ListItem.js +94 -50
  30. package/modern/ListItemAvatar/ListItemAvatar.js +12 -8
  31. package/modern/ListItemButton/ListItemButton.js +35 -15
  32. package/modern/ListItemSecondaryAction/ListItemSecondaryAction.js +12 -8
  33. package/modern/ListItemText/ListItemText.js +20 -11
  34. package/modern/ListSubheader/ListSubheader.js +44 -19
  35. package/modern/Radio/Radio.js +50 -20
  36. package/modern/Radio/RadioButtonIcon.js +18 -12
  37. package/modern/Rating/Rating.js +71 -37
  38. package/modern/Table/Table.js +11 -6
  39. package/modern/TableCell/TableCell.js +96 -41
  40. package/modern/TableSortLabel/TableSortLabel.js +19 -9
  41. package/modern/Toolbar/Toolbar.js +33 -17
  42. package/modern/Typography/Typography.js +3 -2
  43. package/modern/index.js +1 -1
  44. package/modern/styles/experimental_extendTheme.js +2 -1
  45. package/modern/styles/getOverlayAlpha.js +3 -4
  46. package/node/Checkbox/Checkbox.js +54 -23
  47. package/node/FormHelperText/FormHelperText.js +18 -8
  48. package/node/IconButton/IconButton.js +99 -43
  49. package/node/ImageList/ImageList.js +16 -14
  50. package/node/ImageListItem/ImageListItem.js +37 -22
  51. package/node/ImageListItemBar/ImageListItemBar.js +65 -32
  52. package/node/ListItem/ListItem.js +94 -50
  53. package/node/ListItemAvatar/ListItemAvatar.js +12 -8
  54. package/node/ListItemButton/ListItemButton.js +35 -15
  55. package/node/ListItemSecondaryAction/ListItemSecondaryAction.js +12 -8
  56. package/node/ListItemText/ListItemText.js +20 -11
  57. package/node/ListSubheader/ListSubheader.js +44 -19
  58. package/node/Radio/Radio.js +52 -22
  59. package/node/Radio/RadioButtonIcon.js +21 -15
  60. package/node/Rating/Rating.js +71 -37
  61. package/node/Table/Table.js +11 -6
  62. package/node/TableCell/TableCell.js +96 -41
  63. package/node/TableSortLabel/TableSortLabel.js +19 -9
  64. package/node/Toolbar/Toolbar.js +33 -17
  65. package/node/Typography/Typography.js +3 -2
  66. package/node/index.js +1 -1
  67. package/node/styles/experimental_extendTheme.js +1 -0
  68. package/node/styles/getOverlayAlpha.js +4 -5
  69. package/package.json +4 -4
  70. package/styles/experimental_extendTheme.d.ts +2 -0
  71. package/styles/experimental_extendTheme.js +2 -1
  72. package/styles/getOverlayAlpha.d.ts +1 -2
  73. package/styles/getOverlayAlpha.js +3 -4
  74. package/umd/material-ui.development.js +1028 -533
  75. package/umd/material-ui.production.min.js +4 -4
@@ -39,8 +39,7 @@ const TableCellRoot = styled('td', {
39
39
  return [styles.root, styles[ownerState.variant], styles[`size${capitalize(ownerState.size)}`], ownerState.padding !== 'normal' && styles[`padding${capitalize(ownerState.padding)}`], ownerState.align !== 'inherit' && styles[`align${capitalize(ownerState.align)}`], ownerState.stickyHeader && styles.stickyHeader];
40
40
  }
41
41
  })(({
42
- theme,
43
- ownerState
42
+ theme
44
43
  }) => _extends({}, theme.typography.body2, {
45
44
  display: 'table-cell',
46
45
  verticalAlign: 'inherit',
@@ -49,47 +48,103 @@ const TableCellRoot = styled('td', {
49
48
  borderBottom: theme.vars ? `1px solid ${theme.vars.palette.TableCell.border}` : `1px solid
50
49
  ${theme.palette.mode === 'light' ? lighten(alpha(theme.palette.divider, 1), 0.88) : darken(alpha(theme.palette.divider, 1), 0.68)}`,
51
50
  textAlign: 'left',
52
- padding: 16
53
- }, ownerState.variant === 'head' && {
54
- color: (theme.vars || theme).palette.text.primary,
55
- lineHeight: theme.typography.pxToRem(24),
56
- fontWeight: theme.typography.fontWeightMedium
57
- }, ownerState.variant === 'body' && {
58
- color: (theme.vars || theme).palette.text.primary
59
- }, ownerState.variant === 'footer' && {
60
- color: (theme.vars || theme).palette.text.secondary,
61
- lineHeight: theme.typography.pxToRem(21),
62
- fontSize: theme.typography.pxToRem(12)
63
- }, ownerState.size === 'small' && {
64
- padding: '6px 16px',
65
- [`&.${tableCellClasses.paddingCheckbox}`]: {
66
- width: 24,
67
- // prevent the checkbox column from growing
68
- padding: '0 12px 0 16px',
69
- '& > *': {
51
+ padding: 16,
52
+ variants: [{
53
+ props: {
54
+ variant: 'head'
55
+ },
56
+ style: {
57
+ color: (theme.vars || theme).palette.text.primary,
58
+ lineHeight: theme.typography.pxToRem(24),
59
+ fontWeight: theme.typography.fontWeightMedium
60
+ }
61
+ }, {
62
+ props: {
63
+ variant: 'body'
64
+ },
65
+ style: {
66
+ color: (theme.vars || theme).palette.text.primary
67
+ }
68
+ }, {
69
+ props: {
70
+ variant: 'footer'
71
+ },
72
+ style: {
73
+ color: (theme.vars || theme).palette.text.secondary,
74
+ lineHeight: theme.typography.pxToRem(21),
75
+ fontSize: theme.typography.pxToRem(12)
76
+ }
77
+ }, {
78
+ props: {
79
+ size: 'small'
80
+ },
81
+ style: {
82
+ padding: '6px 16px',
83
+ [`&.${tableCellClasses.paddingCheckbox}`]: {
84
+ width: 24,
85
+ // prevent the checkbox column from growing
86
+ padding: '0 12px 0 16px',
87
+ '& > *': {
88
+ padding: 0
89
+ }
90
+ }
91
+ }
92
+ }, {
93
+ props: {
94
+ padding: 'checkbox'
95
+ },
96
+ style: {
97
+ width: 48,
98
+ // prevent the checkbox column from growing
99
+ padding: '0 0 0 4px'
100
+ }
101
+ }, {
102
+ props: {
103
+ padding: 'none'
104
+ },
105
+ style: {
70
106
  padding: 0
71
107
  }
72
- }
73
- }, ownerState.padding === 'checkbox' && {
74
- width: 48,
75
- // prevent the checkbox column from growing
76
- padding: '0 0 0 4px'
77
- }, ownerState.padding === 'none' && {
78
- padding: 0
79
- }, ownerState.align === 'left' && {
80
- textAlign: 'left'
81
- }, ownerState.align === 'center' && {
82
- textAlign: 'center'
83
- }, ownerState.align === 'right' && {
84
- textAlign: 'right',
85
- flexDirection: 'row-reverse'
86
- }, ownerState.align === 'justify' && {
87
- textAlign: 'justify'
88
- }, ownerState.stickyHeader && {
89
- position: 'sticky',
90
- top: 0,
91
- zIndex: 2,
92
- backgroundColor: (theme.vars || theme).palette.background.default
108
+ }, {
109
+ props: {
110
+ align: 'left'
111
+ },
112
+ style: {
113
+ textAlign: 'left'
114
+ }
115
+ }, {
116
+ props: {
117
+ align: 'center'
118
+ },
119
+ style: {
120
+ textAlign: 'center'
121
+ }
122
+ }, {
123
+ props: {
124
+ align: 'right'
125
+ },
126
+ style: {
127
+ textAlign: 'right',
128
+ flexDirection: 'row-reverse'
129
+ }
130
+ }, {
131
+ props: {
132
+ align: 'justify'
133
+ },
134
+ style: {
135
+ textAlign: 'justify'
136
+ }
137
+ }, {
138
+ props: ({
139
+ ownerState
140
+ }) => ownerState.stickyHeader,
141
+ style: {
142
+ position: 'sticky',
143
+ top: 0,
144
+ zIndex: 2,
145
+ backgroundColor: (theme.vars || theme).palette.background.default
146
+ }
147
+ }]
93
148
  }));
94
149
 
95
150
  /**
@@ -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 = ["active", "children", "className", "direction", "hideSortIcon", "IconComponent"];
6
6
  import composeClasses from '@mui/utils/composeClasses';
7
7
  import clsx from 'clsx';
@@ -70,9 +70,8 @@ const TableSortLabelIcon = styled('span', {
70
70
  return [styles.icon, styles[`iconDirection${capitalize(ownerState.direction)}`]];
71
71
  }
72
72
  })(({
73
- theme,
74
- ownerState
75
- }) => _extends({
73
+ theme
74
+ }) => ({
76
75
  fontSize: 18,
77
76
  marginRight: 4,
78
77
  marginLeft: 4,
@@ -80,11 +79,22 @@ const TableSortLabelIcon = styled('span', {
80
79
  transition: theme.transitions.create(['opacity', 'transform'], {
81
80
  duration: theme.transitions.duration.shorter
82
81
  }),
83
- userSelect: 'none'
84
- }, ownerState.direction === 'desc' && {
85
- transform: 'rotate(0deg)'
86
- }, ownerState.direction === 'asc' && {
87
- transform: 'rotate(180deg)'
82
+ userSelect: 'none',
83
+ variants: [{
84
+ props: {
85
+ direction: 'desc'
86
+ },
87
+ style: {
88
+ transform: 'rotate(0deg)'
89
+ }
90
+ }, {
91
+ props: {
92
+ direction: 'asc'
93
+ },
94
+ style: {
95
+ transform: 'rotate(180deg)'
96
+ }
97
+ }]
88
98
  }));
89
99
 
90
100
  /**
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
- import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
5
  const _excluded = ["className", "component", "disableGutters", "variant"];
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
@@ -32,25 +32,41 @@ const ToolbarRoot = styled('div', {
32
32
  return [styles.root, !ownerState.disableGutters && styles.gutters, styles[ownerState.variant]];
33
33
  }
34
34
  })(({
35
- theme,
36
- ownerState
37
- }) => _extends({
35
+ theme
36
+ }) => ({
38
37
  position: 'relative',
39
38
  display: 'flex',
40
- alignItems: 'center'
41
- }, !ownerState.disableGutters && {
42
- paddingLeft: theme.spacing(2),
43
- paddingRight: theme.spacing(2),
44
- [theme.breakpoints.up('sm')]: {
45
- paddingLeft: theme.spacing(3),
46
- paddingRight: theme.spacing(3)
47
- }
48
- }, ownerState.variant === 'dense' && {
49
- minHeight: 48
39
+ alignItems: 'center',
40
+ variants: [{
41
+ props: ({
42
+ ownerState
43
+ }) => !ownerState.disableGutters,
44
+ style: {
45
+ paddingLeft: theme.spacing(2),
46
+ paddingRight: theme.spacing(2),
47
+ [theme.breakpoints.up('sm')]: {
48
+ paddingLeft: theme.spacing(3),
49
+ paddingRight: theme.spacing(3)
50
+ }
51
+ }
52
+ }, {
53
+ props: {
54
+ variant: 'dense'
55
+ },
56
+ style: {
57
+ minHeight: 48
58
+ }
59
+ }]
50
60
  }), ({
51
- theme,
52
- ownerState
53
- }) => ownerState.variant === 'regular' && theme.mixins.toolbar);
61
+ theme
62
+ }) => ({
63
+ variants: [{
64
+ props: {
65
+ variant: 'regular'
66
+ },
67
+ style: theme.mixins.toolbar
68
+ }]
69
+ }));
54
70
  const Toolbar = /*#__PURE__*/React.forwardRef(function Toolbar(inProps, ref) {
55
71
  const props = useThemeProps({
56
72
  props: inProps,
@@ -118,9 +118,10 @@ const Typography = /*#__PURE__*/React.forwardRef(function Typography(inProps, re
118
118
  return /*#__PURE__*/_jsx(TypographyRoot, _extends({
119
119
  as: Component,
120
120
  ref: ref,
121
- ownerState: ownerState,
122
121
  className: clsx(classes.root, className)
123
- }, other));
122
+ }, other, {
123
+ ownerState: ownerState
124
+ }));
124
125
  });
125
126
  process.env.NODE_ENV !== "production" ? Typography.propTypes /* remove-proptypes */ = {
126
127
  // ┌────────────────────────────── Warning ──────────────────────────────┐
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/material v6.0.0-alpha.3
2
+ * @mui/material v6.0.0-alpha.4
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -5,7 +5,7 @@ const _excluded = ["colorSchemes", "cssVarPrefix", "shouldSkipGeneratingVar", "g
5
5
  import deepmerge from '@mui/utils/deepmerge';
6
6
  import { unstable_createGetCssVar as systemCreateGetCssVar, createSpacing } from '@mui/system';
7
7
  import { createUnarySpacing } from '@mui/system/spacing';
8
- import { prepareCssVars } from '@mui/system/cssVars';
8
+ import { prepareCssVars, prepareTypographyVars } from '@mui/system/cssVars';
9
9
  import styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';
10
10
  import { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, private_safeDarken as safeDarken, private_safeLighten as safeLighten, private_safeEmphasize as safeEmphasize, hslToRgb } from '@mui/system/colorManipulator';
11
11
  import defaultShouldSkipGeneratingVar from './shouldSkipGeneratingVar';
@@ -118,6 +118,7 @@ export default function extendTheme(options = {}, ...args) {
118
118
  overlays: colorSchemesInput.dark?.overlays || defaultDarkOverlays
119
119
  })
120
120
  }),
121
+ font: _extends({}, prepareTypographyVars(muiTheme.typography), muiTheme.font),
121
122
  spacing: getSpacingVal(input.spacing)
122
123
  });
123
124
  Object.keys(theme.colorSchemes).forEach(key => {
@@ -1,11 +1,10 @@
1
1
  // Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61
2
- const getOverlayAlpha = elevation => {
2
+ export default function getOverlayAlpha(elevation) {
3
3
  let alphaValue;
4
4
  if (elevation < 1) {
5
5
  alphaValue = 5.11916 * elevation ** 2;
6
6
  } else {
7
7
  alphaValue = 4.5 * Math.log(elevation + 1) + 2;
8
8
  }
9
- return (alphaValue / 100).toFixed(2);
10
- };
11
- export default getOverlayAlpha;
9
+ return Math.round(alphaValue * 10) / 1000;
10
+ }
@@ -19,13 +19,14 @@ var _CheckBoxOutlineBlank = _interopRequireDefault(require("../internal/svg-icon
19
19
  var _CheckBox = _interopRequireDefault(require("../internal/svg-icons/CheckBox"));
20
20
  var _IndeterminateCheckBox = _interopRequireDefault(require("../internal/svg-icons/IndeterminateCheckBox"));
21
21
  var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
22
- var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
23
- var _styled = _interopRequireWildcard(require("../styles/styled"));
22
+ var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
24
23
  var _checkboxClasses = _interopRequireWildcard(require("./checkboxClasses"));
24
+ var _zeroStyled = require("../zero-styled");
25
25
  var _jsxRuntime = require("react/jsx-runtime");
26
26
  const _excluded = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "className"];
27
27
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
28
28
  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; }
29
+ const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiCheckbox');
29
30
  const useUtilityClasses = ownerState => {
30
31
  const {
31
32
  classes,
@@ -39,8 +40,8 @@ const useUtilityClasses = ownerState => {
39
40
  const composedClasses = (0, _composeClasses.default)(slots, _checkboxClasses.getCheckboxUtilityClass, classes);
40
41
  return (0, _extends2.default)({}, classes, composedClasses);
41
42
  };
42
- const CheckboxRoot = (0, _styled.default)(_SwitchBase.default, {
43
- shouldForwardProp: prop => (0, _styled.rootShouldForwardProp)(prop) || prop === 'classes',
43
+ const CheckboxRoot = (0, _zeroStyled.styled)(_SwitchBase.default, {
44
+ shouldForwardProp: prop => (0, _rootShouldForwardProp.default)(prop) || prop === 'classes',
44
45
  name: 'MuiCheckbox',
45
46
  slot: 'Root',
46
47
  overridesResolver: (props, styles) => {
@@ -50,32 +51,62 @@ const CheckboxRoot = (0, _styled.default)(_SwitchBase.default, {
50
51
  return [styles.root, ownerState.indeterminate && styles.indeterminate, styles[`size${(0, _capitalize.default)(ownerState.size)}`], ownerState.color !== 'default' && styles[`color${(0, _capitalize.default)(ownerState.color)}`]];
51
52
  }
52
53
  })(({
53
- theme,
54
- ownerState
55
- }) => (0, _extends2.default)({
56
- color: (theme.vars || theme).palette.text.secondary
57
- }, !ownerState.disableRipple && {
58
- '&:hover': {
59
- backgroundColor: theme.vars ? `rgba(${ownerState.color === 'default' ? theme.vars.palette.action.activeChannel : theme.vars.palette[ownerState.color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _colorManipulator.alpha)(ownerState.color === 'default' ? theme.palette.action.active : theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),
60
- // Reset on touch devices, it doesn't add specificity
61
- '@media (hover: none)': {
62
- backgroundColor: 'transparent'
54
+ theme
55
+ }) => ({
56
+ color: (theme.vars || theme).palette.text.secondary,
57
+ variants: [{
58
+ props: {
59
+ color: 'default',
60
+ disableRipple: false
61
+ },
62
+ style: {
63
+ '&:hover': {
64
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _colorManipulator.alpha)(theme.palette.action.active, theme.palette.action.hoverOpacity)
65
+ }
63
66
  }
64
- }
65
- }, ownerState.color !== 'default' && {
66
- [`&.${_checkboxClasses.default.checked}, &.${_checkboxClasses.default.indeterminate}`]: {
67
- color: (theme.vars || theme).palette[ownerState.color].main
68
- },
69
- [`&.${_checkboxClasses.default.disabled}`]: {
70
- color: (theme.vars || theme).palette.action.disabled
71
- }
67
+ }, ...Object.entries(theme.palette).filter(([, palette]) => palette.main).map(([color]) => ({
68
+ props: {
69
+ color,
70
+ disableRipple: false
71
+ },
72
+ style: {
73
+ '&:hover': {
74
+ backgroundColor: theme.vars ? `rgba(${theme.vars.palette[color].mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : (0, _colorManipulator.alpha)(theme.palette[color].main, theme.palette.action.hoverOpacity)
75
+ }
76
+ }
77
+ })), ...Object.entries(theme.palette).filter(([, palette]) => palette.main).map(([color]) => ({
78
+ props: {
79
+ color
80
+ },
81
+ style: {
82
+ [`&.${_checkboxClasses.default.checked}, &.${_checkboxClasses.default.indeterminate}`]: {
83
+ color: (theme.vars || theme).palette[color].main
84
+ },
85
+ [`&.${_checkboxClasses.default.disabled}`]: {
86
+ color: (theme.vars || theme).palette.action.disabled
87
+ }
88
+ }
89
+ })), {
90
+ // Should be last to override other colors
91
+ props: {
92
+ disableRipple: false
93
+ },
94
+ style: {
95
+ // Reset on touch devices, it doesn't add specificity
96
+ '&:hover': {
97
+ '@media (hover: none)': {
98
+ backgroundColor: 'transparent'
99
+ }
100
+ }
101
+ }
102
+ }]
72
103
  }));
73
104
  const defaultCheckedIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckBox.default, {});
74
105
  const defaultIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_CheckBoxOutlineBlank.default, {});
75
106
  const defaultIndeterminateIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_IndeterminateCheckBox.default, {});
76
107
  const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(inProps, ref) {
77
108
  var _icon$props$fontSize, _indeterminateIcon$pr;
78
- const props = (0, _useThemeProps.default)({
109
+ const props = useThemeProps({
79
110
  props: inProps,
80
111
  name: 'MuiCheckbox'
81
112
  });
@@ -49,8 +49,7 @@ const FormHelperTextRoot = (0, _styled.default)('p', {
49
49
  return [styles.root, ownerState.size && styles[`size${(0, _capitalize.default)(ownerState.size)}`], ownerState.contained && styles.contained, ownerState.filled && styles.filled];
50
50
  }
51
51
  })(({
52
- theme,
53
- ownerState
52
+ theme
54
53
  }) => (0, _extends2.default)({
55
54
  color: (theme.vars || theme).palette.text.secondary
56
55
  }, theme.typography.caption, {
@@ -64,12 +63,23 @@ const FormHelperTextRoot = (0, _styled.default)('p', {
64
63
  },
65
64
  [`&.${_formHelperTextClasses.default.error}`]: {
66
65
  color: (theme.vars || theme).palette.error.main
67
- }
68
- }, ownerState.size === 'small' && {
69
- marginTop: 4
70
- }, ownerState.contained && {
71
- marginLeft: 14,
72
- marginRight: 14
66
+ },
67
+ variants: [{
68
+ props: {
69
+ size: 'small'
70
+ },
71
+ style: {
72
+ marginTop: 4
73
+ }
74
+ }, {
75
+ props: ({
76
+ ownerState
77
+ }) => ownerState.contained,
78
+ style: {
79
+ marginLeft: 14,
80
+ marginRight: 14
81
+ }
82
+ }]
73
83
  }));
74
84
  const FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inProps, ref) {
75
85
  const props = (0, _useThemeProps.default)({