@mui/material 5.15.11 → 5.15.12

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 (43) hide show
  1. package/Alert/Alert.js +53 -35
  2. package/Alert/alertClasses.d.ts +68 -12
  3. package/Alert/alertClasses.js +1 -1
  4. package/AlertTitle/AlertTitle.js +2 -2
  5. package/Avatar/Avatar.js +2 -2
  6. package/Button/Button.js +3 -3
  7. package/Button/buttonClasses.d.ts +113 -33
  8. package/Button/buttonClasses.js +1 -1
  9. package/CHANGELOG.md +194 -116
  10. package/Checkbox/Checkbox.d.ts +1 -1
  11. package/Chip/chipClasses.d.ts +78 -26
  12. package/README.md +1 -1
  13. package/Slider/Slider.d.ts +2 -4
  14. package/Slider/Slider.js +2 -4
  15. package/index.js +1 -1
  16. package/legacy/Alert/Alert.js +77 -34
  17. package/legacy/Alert/alertClasses.js +1 -1
  18. package/legacy/AlertTitle/AlertTitle.js +2 -2
  19. package/legacy/Avatar/Avatar.js +2 -2
  20. package/legacy/Button/Button.js +3 -3
  21. package/legacy/Button/buttonClasses.js +1 -1
  22. package/legacy/Slider/Slider.js +2 -4
  23. package/legacy/index.js +1 -1
  24. package/modern/Alert/Alert.js +53 -35
  25. package/modern/Alert/alertClasses.js +1 -1
  26. package/modern/AlertTitle/AlertTitle.js +2 -2
  27. package/modern/Avatar/Avatar.js +2 -2
  28. package/modern/Button/Button.js +3 -3
  29. package/modern/Button/buttonClasses.js +1 -1
  30. package/modern/Slider/Slider.js +2 -4
  31. package/modern/index.js +1 -1
  32. package/node/Alert/Alert.js +61 -43
  33. package/node/Alert/alertClasses.js +1 -1
  34. package/node/AlertTitle/AlertTitle.js +4 -4
  35. package/node/Avatar/Avatar.js +6 -6
  36. package/node/Button/Button.js +3 -3
  37. package/node/Button/buttonClasses.js +1 -1
  38. package/node/Slider/Slider.js +2 -4
  39. package/node/index.js +1 -1
  40. package/package.json +5 -5
  41. package/styles/variants.d.ts +7 -1
  42. package/umd/material-ui.development.js +2807 -2764
  43. package/umd/material-ui.production.min.js +2 -2
package/Alert/Alert.js CHANGED
@@ -6,10 +6,9 @@ const _excluded = ["action", "children", "className", "closeText", "color", "com
6
6
  import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
- import { unstable_composeClasses as composeClasses } from '@mui/base';
10
- import { darken, lighten } from '@mui/system';
11
- import styled from '../styles/styled';
12
- import useThemeProps from '../styles/useThemeProps';
9
+ import composeClasses from '@mui/utils/composeClasses';
10
+ import { darken, lighten } from '@mui/system/colorManipulator';
11
+ import { styled, createUseThemeProps } from '../zero-styled';
13
12
  import useSlot from '../utils/useSlot';
14
13
  import capitalize from '../utils/capitalize';
15
14
  import Paper from '../Paper';
@@ -22,6 +21,7 @@ import InfoOutlinedIcon from '../internal/svg-icons/InfoOutlined';
22
21
  import CloseIcon from '../internal/svg-icons/Close';
23
22
  import { jsx as _jsx } from "react/jsx-runtime";
24
23
  import { jsxs as _jsxs } from "react/jsx-runtime";
24
+ const useThemeProps = createUseThemeProps('MuiAlert');
25
25
  const useUtilityClasses = ownerState => {
26
26
  const {
27
27
  variant,
@@ -30,7 +30,7 @@ const useUtilityClasses = ownerState => {
30
30
  classes
31
31
  } = ownerState;
32
32
  const slots = {
33
- root: ['root', `${variant}${capitalize(color || severity)}`, `${variant}`],
33
+ root: ['root', `color${capitalize(color || severity)}`, `${variant}${capitalize(color || severity)}`, `${variant}`],
34
34
  icon: ['icon'],
35
35
  message: ['message'],
36
36
  action: ['action']
@@ -47,41 +47,58 @@ const AlertRoot = styled(Paper, {
47
47
  return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${capitalize(ownerState.color || ownerState.severity)}`]];
48
48
  }
49
49
  })(({
50
- theme,
51
- ownerState
50
+ theme
52
51
  }) => {
53
52
  const getColor = theme.palette.mode === 'light' ? darken : lighten;
54
53
  const getBackgroundColor = theme.palette.mode === 'light' ? lighten : darken;
55
- const color = ownerState.color || ownerState.severity;
56
54
  return _extends({}, theme.typography.body2, {
57
55
  backgroundColor: 'transparent',
58
56
  display: 'flex',
59
- padding: '6px 16px'
60
- }, color && ownerState.variant === 'standard' && {
61
- color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
62
- backgroundColor: theme.vars ? theme.vars.palette.Alert[`${color}StandardBg`] : getBackgroundColor(theme.palette[color].light, 0.9),
63
- [`& .${alertClasses.icon}`]: theme.vars ? {
64
- color: theme.vars.palette.Alert[`${color}IconColor`]
65
- } : {
66
- color: theme.palette[color].main
67
- }
68
- }, color && ownerState.variant === 'outlined' && {
69
- color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
70
- border: `1px solid ${(theme.vars || theme).palette[color].light}`,
71
- [`& .${alertClasses.icon}`]: theme.vars ? {
72
- color: theme.vars.palette.Alert[`${color}IconColor`]
73
- } : {
74
- color: theme.palette[color].main
75
- }
76
- }, color && ownerState.variant === 'filled' && _extends({
77
- fontWeight: theme.typography.fontWeightMedium
78
- }, theme.vars ? {
79
- color: theme.vars.palette.Alert[`${color}FilledColor`],
80
- backgroundColor: theme.vars.palette.Alert[`${color}FilledBg`]
81
- } : {
82
- backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main,
83
- color: theme.palette.getContrastText(theme.palette[color].main)
84
- }));
57
+ padding: '6px 16px',
58
+ variants: [...Object.entries(theme.palette).filter(([, value]) => value.main && value.light).map(([color]) => ({
59
+ props: {
60
+ colorSeverity: color,
61
+ variant: 'standard'
62
+ },
63
+ style: {
64
+ color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
65
+ backgroundColor: theme.vars ? theme.vars.palette.Alert[`${color}StandardBg`] : getBackgroundColor(theme.palette[color].light, 0.9),
66
+ [`& .${alertClasses.icon}`]: theme.vars ? {
67
+ color: theme.vars.palette.Alert[`${color}IconColor`]
68
+ } : {
69
+ color: theme.palette[color].main
70
+ }
71
+ }
72
+ })), ...Object.entries(theme.palette).filter(([, value]) => value.main && value.light).map(([color]) => ({
73
+ props: {
74
+ colorSeverity: color,
75
+ variant: 'outlined'
76
+ },
77
+ style: {
78
+ color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
79
+ border: `1px solid ${(theme.vars || theme).palette[color].light}`,
80
+ [`& .${alertClasses.icon}`]: theme.vars ? {
81
+ color: theme.vars.palette.Alert[`${color}IconColor`]
82
+ } : {
83
+ color: theme.palette[color].main
84
+ }
85
+ }
86
+ })), ...Object.entries(theme.palette).filter(([, value]) => value.main && value.dark).map(([color]) => ({
87
+ props: {
88
+ colorSeverity: color,
89
+ variant: 'filled'
90
+ },
91
+ style: _extends({
92
+ fontWeight: theme.typography.fontWeightMedium
93
+ }, theme.vars ? {
94
+ color: theme.vars.palette.Alert[`${color}FilledColor`],
95
+ backgroundColor: theme.vars.palette.Alert[`${color}FilledBg`]
96
+ } : {
97
+ backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main,
98
+ color: theme.palette.getContrastText(theme.palette[color].main)
99
+ })
100
+ }))]
101
+ });
85
102
  });
86
103
  const AlertIcon = styled('div', {
87
104
  name: 'MuiAlert',
@@ -154,7 +171,8 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
154
171
  const ownerState = _extends({}, props, {
155
172
  color,
156
173
  severity,
157
- variant
174
+ variant,
175
+ colorSeverity: color || severity
158
176
  });
159
177
  const classes = useUtilityClasses(ownerState);
160
178
  const externalForwardedProps = {
@@ -7,29 +7,85 @@ export interface AlertClasses {
7
7
  outlined: string;
8
8
  /** Styles applied to the root element if `variant="standard"`. */
9
9
  standard: string;
10
- /** Styles applied to the root element if `variant="standard"` and `color="success"`. */
10
+ /** Styles applied to the root element if `color="success"`. */
11
+ colorSuccess: string;
12
+ /** Styles applied to the root element if `color="info"`. */
13
+ colorInfo: string;
14
+ /** Styles applied to the root element if `color="warning"`. */
15
+ colorWarning: string;
16
+ /** Styles applied to the root element if `color="error"`. */
17
+ colorError: string;
18
+ /** Styles applied to the root element if `variant="standard"` and `color="success"`.
19
+ * @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
20
+ * and [.MuiAlert-colorSuccess](/material-ui/api/alert/#alert-classes-colorSuccess) classes instead.
21
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
22
+ */
11
23
  standardSuccess: string;
12
- /** Styles applied to the root element if `variant="standard"` and `color="info"`. */
24
+ /** Styles applied to the root element if `variant="standard"` and `color="info"`.
25
+ * @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
26
+ * and [.MuiAlert-colorInfo](/material-ui/api/alert/#alert-classes-colorInfo) classes instead.
27
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
28
+ */
13
29
  standardInfo: string;
14
- /** Styles applied to the root element if `variant="standard"` and `color="warning"`. */
30
+ /** Styles applied to the root element if `variant="standard"` and `color="warning"`.
31
+ * @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
32
+ * and [.MuiAlert-colorWarning](/material-ui/api/alert/#alert-classes-colorWarning) classes instead.
33
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
34
+ */
15
35
  standardWarning: string;
16
- /** Styles applied to the root element if `variant="standard"` and `color="error"`. */
36
+ /** Styles applied to the root element if `variant="standard"` and `color="error"`.
37
+ * @deprecated Combine the [.MuiAlert-standard](/material-ui/api/alert/#alert-classes-standard)
38
+ * and [.MuiAlert-colorError](/material-ui/api/alert/#alert-classes-colorError) classes instead.
39
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
40
+ */
17
41
  standardError: string;
18
- /** Styles applied to the root element if `variant="outlined"` and `color="success"`. */
42
+ /** Styles applied to the root element if `variant="outlined"` and `color="success"`.
43
+ * @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
44
+ * and [.MuiAlert-colorSuccess](/material-ui/api/alert/#alert-classes-colorSuccess) classes instead.
45
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
46
+ */
19
47
  outlinedSuccess: string;
20
- /** Styles applied to the root element if `variant="outlined"` and `color="info"`. */
48
+ /** Styles applied to the root element if `variant="outlined"` and `color="info"`.
49
+ * @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
50
+ * and [.MuiAlert-colorInfo](/material-ui/api/alert/#alert-classes-colorInfo) classes instead.
51
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
52
+ */
21
53
  outlinedInfo: string;
22
- /** Styles applied to the root element if `variant="outlined"` and `color="warning"`. */
54
+ /** Styles applied to the root element if `variant="outlined"` and `color="warning"`.
55
+ * @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
56
+ * and [.MuiAlert-colorWarning](/material-ui/api/alert/#alert-classes-colorWarning) classes instead.
57
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
58
+ */
23
59
  outlinedWarning: string;
24
- /** Styles applied to the root element if `variant="outlined"` and `color="error"`. */
60
+ /** Styles applied to the root element if `variant="outlined"` and `color="error"`.
61
+ * @deprecated Combine the [.MuiAlert-outlined](/material-ui/api/alert/#alert-classes-outlined)
62
+ * and [.MuiAlert-colorError](/material-ui/api/alert/#alert-classes-colorError) classes instead.
63
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
64
+ */
25
65
  outlinedError: string;
26
- /** Styles applied to the root element if `variant="filled"` and `color="success"`. */
66
+ /** Styles applied to the root element if `variant="filled"` and `color="success"`.
67
+ * @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
68
+ * and [.MuiAlert-colorSuccess](/material-ui/api/alert/#alert-classes-colorSuccess) classes instead.
69
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
70
+ */
27
71
  filledSuccess: string;
28
- /** Styles applied to the root element if `variant="filled"` and `color="info"`. */
72
+ /** Styles applied to the root element if `variant="filled"` and `color="info"`.
73
+ * @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
74
+ * and [.MuiAlert-colorInfo](/material-ui/api/alert/#alert-classes-colorInfo) classes instead.
75
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
76
+ */
29
77
  filledInfo: string;
30
- /** Styles applied to the root element if `variant="filled"` and `color="warning"`. */
78
+ /** Styles applied to the root element if `variant="filled"` and `color="warning"`
79
+ * @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
80
+ * and [.MuiAlert-colorWarning](/material-ui/api/alert/#alert-classes-colorWarning) classes instead.
81
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
82
+ */
31
83
  filledWarning: string;
32
- /** Styles applied to the root element if `variant="filled"` and `color="error"`. */
84
+ /** Styles applied to the root element if `variant="filled"` and `color="error"`.
85
+ * @deprecated Combine the [.MuiAlert-filled](/material-ui/api/alert/#alert-classes-filled)
86
+ * and [.MuiAlert-colorError](/material-ui/api/alert/#alert-classes-colorError) classes instead.
87
+ * [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
88
+ */
33
89
  filledError: string;
34
90
  /** Styles applied to the icon wrapper element. */
35
91
  icon: string;
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
3
3
  export function getAlertUtilityClass(slot) {
4
4
  return generateUtilityClass('MuiAlert', slot);
5
5
  }
6
- const alertClasses = generateUtilityClasses('MuiAlert', ['root', 'action', 'icon', 'message', 'filled', 'filledSuccess', 'filledInfo', 'filledWarning', 'filledError', 'outlined', 'outlinedSuccess', 'outlinedInfo', 'outlinedWarning', 'outlinedError', 'standard', 'standardSuccess', 'standardInfo', 'standardWarning', 'standardError']);
6
+ const alertClasses = generateUtilityClasses('MuiAlert', ['root', 'action', 'icon', 'message', 'filled', 'colorSuccess', 'colorInfo', 'colorWarning', 'colorError', 'filledSuccess', 'filledInfo', 'filledWarning', 'filledError', 'outlined', 'outlinedSuccess', 'outlinedInfo', 'outlinedWarning', 'outlinedError', 'standard', 'standardSuccess', 'standardInfo', 'standardWarning', 'standardError']);
7
7
  export default alertClasses;
@@ -7,11 +7,11 @@ import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
9
  import composeClasses from '@mui/utils/composeClasses';
10
- import styled from '../styles/styled';
11
- import useThemeProps from '../styles/useThemeProps';
10
+ import { styled, createUseThemeProps } from '../zero-styled';
12
11
  import Typography from '../Typography';
13
12
  import { getAlertTitleUtilityClass } from './alertTitleClasses';
14
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
+ const useThemeProps = createUseThemeProps('MuiAlertTitle');
15
15
  const useUtilityClasses = ownerState => {
16
16
  const {
17
17
  classes
package/Avatar/Avatar.js CHANGED
@@ -7,12 +7,12 @@ import * as React from 'react';
7
7
  import PropTypes from 'prop-types';
8
8
  import clsx from 'clsx';
9
9
  import composeClasses from '@mui/utils/composeClasses';
10
- import styled from '../styles/styled';
11
- import useThemeProps from '../styles/useThemeProps';
10
+ import { styled, createUseThemeProps } from '../zero-styled';
12
11
  import Person from '../internal/svg-icons/Person';
13
12
  import { getAvatarUtilityClass } from './avatarClasses';
14
13
  import useSlot from '../utils/useSlot';
15
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ const useThemeProps = createUseThemeProps('MuiAvatar');
16
16
  const useUtilityClasses = ownerState => {
17
17
  const {
18
18
  classes,
package/Button/Button.js CHANGED
@@ -28,10 +28,10 @@ const useUtilityClasses = ownerState => {
28
28
  classes
29
29
  } = ownerState;
30
30
  const slots = {
31
- root: ['root', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, color === 'inherit' && 'colorInherit', disableElevation && 'disableElevation', fullWidth && 'fullWidth'],
31
+ root: ['root', variant, `${variant}${capitalize(color)}`, `size${capitalize(size)}`, `${variant}Size${capitalize(size)}`, `color${capitalize(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth'],
32
32
  label: ['label'],
33
- startIcon: ['startIcon', `iconSize${capitalize(size)}`],
34
- endIcon: ['endIcon', `iconSize${capitalize(size)}`]
33
+ startIcon: ['icon', 'startIcon', `iconSize${capitalize(size)}`],
34
+ endIcon: ['icon', 'endIcon', `iconSize${capitalize(size)}`]
35
35
  };
36
36
  const composedClasses = composeClasses(slots, getButtonUtilityClass, classes);
37
37
  return _extends({}, classes, composedClasses);
@@ -3,51 +3,93 @@ export interface ButtonClasses {
3
3
  root: string;
4
4
  /** Styles applied to the root element if `variant="text"`. */
5
5
  text: string;
6
- /** Styles applied to the root element if `variant="text"` and `color="inherit"`. */
6
+ /** Styles applied to the root element if `variant="text"` and `color="inherit"`.
7
+ * @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-text) and [.MuiButton-colorInherit](/material-ui/api/button/#button-classes-colorInherit) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
8
+ */
7
9
  textInherit: string;
8
- /** Styles applied to the root element if `variant="text"` and `color="primary"`. */
10
+ /** Styles applied to the root element if `variant="text"` and `color="primary"`.
11
+ * @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-text) and [.MuiButton-colorPrimary](/material-ui/api/button/#button-classes-colorPrimary) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
12
+ */
9
13
  textPrimary: string;
10
- /** Styles applied to the root element if `variant="text"` and `color="secondary"`. */
14
+ /** Styles applied to the root element if `variant="text"` and `color="secondary"`.
15
+ * @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-text) and [.MuiButton-colorSecondary](/material-ui/api/button/#button-classes-colorSecondary) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
16
+ */
11
17
  textSecondary: string;
12
- /** Styles applied to the root element if `variant="text"` and `color="success"`. */
18
+ /** Styles applied to the root element if `variant="text"` and `color="success"`.
19
+ * @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-text) and [.MuiButton-colorSuccess](/material-ui/api/button/#button-classes-colorSuccess) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
20
+ */
13
21
  textSuccess: string;
14
- /** Styles applied to the root element if `variant="text"` and `color="error"`. */
22
+ /** Styles applied to the root element if `variant="text"` and `color="error"`.
23
+ * @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-text) and [.MuiButton-colorError](/material-ui/api/button/#button-classes-colorError) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
24
+ */
15
25
  textError: string;
16
- /** Styles applied to the root element if `variant="text"` and `color="info"`. */
26
+ /** Styles applied to the root element if `variant="text"` and `color="info"`.
27
+ * @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-text) and [.MuiButton-colorInfo](/material-ui/api/button/#button-classes-colorInfo) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
28
+ */
17
29
  textInfo: string;
18
- /** Styles applied to the root element if `variant="text"` and `color="warning"`. */
30
+ /** Styles applied to the root element if `variant="text"` and `color="warning"`.
31
+ * @deprecated Combine the [.MuiButton-text](/material-ui/api/button/#button-classes-text) and [.MuiButton-colorWarning](/material-ui/api/button/#button-classes-colorWarning) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
32
+ */
19
33
  textWarning: string;
20
34
  /** Styles applied to the root element if `variant="outlined"`. */
21
35
  outlined: string;
22
- /** Styles applied to the root element if `variant="outlined"` and `color="inherit"`. */
36
+ /** Styles applied to the root element if `variant="outlined"` and `color="inherit"`.
37
+ * @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-outlined) and [.MuiButton-colorInherit](/material-ui/api/button/#button-classes-colorInherit) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
38
+ */
23
39
  outlinedInherit: string;
24
- /** Styles applied to the root element if `variant="outlined"` and `color="primary"`. */
40
+ /** Styles applied to the root element if `variant="outlined"` and `color="primary"`.
41
+ * @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-outlined) and [.MuiButton-colorPrimary](/material-ui/api/button/#button-classes-colorPrimary) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
42
+ */
25
43
  outlinedPrimary: string;
26
- /** Styles applied to the root element if `variant="outlined"` and `color="secondary"`. */
44
+ /** Styles applied to the root element if `variant="outlined"` and `color="secondary"`.
45
+ * @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-outlined) and [.MuiButton-colorSecondary](/material-ui/api/button/#button-classes-colorSecondary) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
46
+ */
27
47
  outlinedSecondary: string;
28
- /** Styles applied to the root element if `variant="outlined"` and `color="success"`. */
48
+ /** Styles applied to the root element if `variant="outlined"` and `color="success"`.
49
+ * @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-outlined) and [.MuiButton-colorSuccess](/material-ui/api/button/#button-classes-colorSuccess) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
50
+ */
29
51
  outlinedSuccess: string;
30
- /** Styles applied to the root element if `variant="outlined"` and `color="error"`. */
52
+ /** Styles applied to the root element if `variant="outlined"` and `color="error"`.
53
+ * @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-outlined) and [.MuiButton-colorError](/material-ui/api/button/#button-classes-colorError) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
54
+ */
31
55
  outlinedError: string;
32
- /** Styles applied to the root element if `variant="outlined"` and `color="info"`. */
56
+ /** Styles applied to the root element if `variant="outlined"` and `color="info"`.
57
+ * @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-outlined) and [.MuiButton-colorInfo](/material-ui/api/button/#button-classes-colorInfo) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
58
+ */
33
59
  outlinedInfo: string;
34
- /** Styles applied to the root element if `variant="outlined"` and `color="warning"`. */
60
+ /** Styles applied to the root element if `variant="outlined"` and `color="warning"`.
61
+ * @deprecated Combine the [.MuiButton-outlined](/material-ui/api/button/#button-classes-outlined) and [.MuiButton-colorWarning](/material-ui/api/button/#button-classes-colorWarning) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
62
+ */
35
63
  outlinedWarning: string;
36
64
  /** Styles applied to the root element if `variant="contained"`. */
37
65
  contained: string;
38
- /** Styles applied to the root element if `variant="contained"` and `color="inherit"`. */
66
+ /** Styles applied to the root element if `variant="contained"` and `color="inherit"`.
67
+ * @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-contained) and [.MuiButton-colorInherit](/material-ui/api/button/#button-classes-colorInherit) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
68
+ */
39
69
  containedInherit: string;
40
- /** Styles applied to the root element if `variant="contained"` and `color="primary"`. */
70
+ /** Styles applied to the root element if `variant="contained"` and `color="primary"`.
71
+ * @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-contained) and [.MuiButton-colorPrimary](/material-ui/api/button/#button-classes-colorPrimary) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
72
+ */
41
73
  containedPrimary: string;
42
- /** Styles applied to the root element if `variant="contained"` and `color="secondary"`. */
74
+ /** Styles applied to the root element if `variant="contained"` and `color="secondary"`.
75
+ * @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-contained) and [.MuiButton-colorSecondary](/material-ui/api/button/#button-classes-colorSecondary) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
76
+ */
43
77
  containedSecondary: string;
44
- /** Styles applied to the root element if `variant="contained"` and `color="success"`. */
78
+ /** Styles applied to the root element if `variant="contained"` and `color="success"`.
79
+ * @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-contained) and [.MuiButton-colorSuccess](/material-ui/api/button/#button-classes-colorSuccess) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
80
+ */
45
81
  containedSuccess: string;
46
- /** Styles applied to the root element if `variant="contained"` and `color="info"`. */
82
+ /** Styles applied to the root element if `variant="contained"` and `color="info"`.
83
+ * @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-contained) and [.MuiButton-colorInfo](/material-ui/api/button/#button-classes-colorInfo) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
84
+ */
47
85
  containedInfo: string;
48
- /** Styles applied to the root element if `variant="contained"` and `color="error"`. */
86
+ /** Styles applied to the root element if `variant="contained"` and `color="error"`.
87
+ * @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-contained) and [.MuiButton-colorError](/material-ui/api/button/#button-classes-colorError) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
88
+ */
49
89
  containedError: string;
50
- /** Styles applied to the root element if `variant="contained"` and `color="warning"`. */
90
+ /** Styles applied to the root element if `variant="contained"` and `color="warning"`.
91
+ * @deprecated Combine the [.MuiButton-contained](/material-ui/api/button/#button-classes-contained) and [.MuiButton-colorWarning](/material-ui/api/button/#button-classes-colorWarning) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
92
+ */
51
93
  containedWarning: string;
52
94
  /** Styles applied to the root element if `disableElevation={true}`. */
53
95
  disableElevation: string;
@@ -57,23 +99,41 @@ export interface ButtonClasses {
57
99
  disabled: string;
58
100
  /** Styles applied to the root element if `color="inherit"`. */
59
101
  colorInherit: string;
60
- /** Styles applied to the root element if `size="small"` and `variant="text"`. */
102
+ /** Styles applied to the root element if `size="small"` and `variant="text"`.
103
+ * @deprecated Combine the [.MuiButton-sizeSmall](/material-ui/api/button/#button-classes-sizeSmall) and [.MuiButton-text](/material-ui/api/button/#button-classes-text) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
104
+ */
61
105
  textSizeSmall: string;
62
- /** Styles applied to the root element if `size="medium"` and `variant="text"`. */
106
+ /** Styles applied to the root element if `size="medium"` and `variant="text"`.
107
+ * @deprecated Combine the [.MuiButton-sizeMedium](/material-ui/api/button/#button-classes-sizeMedium) and [.MuiButton-text](/material-ui/api/button/#button-classes-text) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
108
+ */
63
109
  textSizeMedium: string;
64
- /** Styles applied to the root element if `size="large"` and `variant="text"`. */
110
+ /** Styles applied to the root element if `size="large"` and `variant="text"`.
111
+ * @deprecated Combine the [.MuiButton-sizeLarge](/material-ui/api/button/#button-classes-sizeLarge) and [.MuiButton-text](/material-ui/api/button/#button-classes-text) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
112
+ */
65
113
  textSizeLarge: string;
66
- /** Styles applied to the root element if `size="small"` and `variant="outlined"`. */
114
+ /** Styles applied to the root element if `size="small"` and `variant="outlined"`.
115
+ * @deprecated Combine the [.MuiButton-sizeSmall](/material-ui/api/button/#button-classes-sizeSmall) and [.MuiButton-outlined](/material-ui/api/button/#button-classes-outlined) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
116
+ */
67
117
  outlinedSizeSmall: string;
68
- /** Styles applied to the root element if `size="medium"` and `variant="outlined"`. */
118
+ /** Styles applied to the root element if `size="medium"` and `variant="outlined"`.
119
+ * @deprecated Combine the [.MuiButton-sizeMedium](/material-ui/api/button/#button-classes-sizeMedium) and [.MuiButton-outlined](/material-ui/api/button/#button-classes-outlined) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
120
+ */
69
121
  outlinedSizeMedium: string;
70
- /** Styles applied to the root element if `size="large"` and `variant="outlined"`. */
122
+ /** Styles applied to the root element if `size="large"` and `variant="outlined"`.
123
+ * @deprecated Combine the [.MuiButton-sizeLarge](/material-ui/api/button/#button-classes-sizeLarge) and [.MuiButton-outlined](/material-ui/api/button/#button-classes-outlined) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
124
+ */
71
125
  outlinedSizeLarge: string;
72
- /** Styles applied to the root element if `size="small"` and `variant="contained"`. */
126
+ /** Styles applied to the root element if `size="small"` and `variant="contained"`.
127
+ * @deprecated Combine the [.MuiButton-sizeSmall](/material-ui/api/button/#button-classes-sizeSmall) and [.MuiButton-contained](/material-ui/api/button/#button-classes-contained) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
128
+ */
73
129
  containedSizeSmall: string;
74
- /** Styles applied to the root element if `size="medium"` and `variant="contained"`. */
130
+ /** Styles applied to the root element if `size="medium"` and `variant="contained"`.
131
+ * @deprecated Combine the [.MuiButton-sizeMedium](/material-ui/api/button/#button-classes-sizeMedium) and [.MuiButton-contained](/material-ui/api/button/#button-classes-contained) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
132
+ */
75
133
  containedSizeMedium: string;
76
- /** Styles applied to the root element if `size="large"` and `variant="contained"`. */
134
+ /** Styles applied to the root element if `size="large"` and `variant="contained"`.
135
+ * @deprecated Combine the [.MuiButton-sizeLarge](/material-ui/api/button/#button-classes-sizeLarge) and [.MuiButton-contained](/material-ui/api/button/#button-classes-contained) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
136
+ */
77
137
  containedSizeLarge: string;
78
138
  /** Styles applied to the root element if `size="small"`. */
79
139
  sizeSmall: string;
@@ -83,16 +143,36 @@ export interface ButtonClasses {
83
143
  sizeLarge: string;
84
144
  /** Styles applied to the root element if `fullWidth={true}`. */
85
145
  fullWidth: string;
146
+ /** Styles applied to the icon element if supplied */
147
+ icon: string;
86
148
  /** Styles applied to the startIcon element if supplied. */
87
149
  startIcon: string;
88
150
  /** Styles applied to the endIcon element if supplied. */
89
151
  endIcon: string;
90
- /** Styles applied to the icon element if supplied and `size="small"`. */
152
+ /** Styles applied to the icon element if supplied and `size="small"`.
153
+ * @deprecated Combine the [.MuiButton-icon](/material-ui/api/button/#button-classes-icon) and [.MuiButtonSizeSmall](/material-ui/api/button/#button-classes-sizeSmall) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
154
+ */
91
155
  iconSizeSmall: string;
92
- /** Styles applied to the icon element if supplied and `size="medium"`. */
156
+ /** Styles applied to the icon element if supplied and `size="medium"`.
157
+ * @deprecated Combine the [.MuiButton-icon](/material-ui/api/button/#button-classes-icon) and [.MuiButtonSizeMedium](/material-ui/api/button/#button-classes-sizeMedium) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
158
+ */
93
159
  iconSizeMedium: string;
94
- /** Styles applied to the icon element if supplied and `size="large"`. */
160
+ /** Styles applied to the icon element if supplied and `size="large"`.
161
+ * @deprecated Combine the [.MuiButton-icon](/material-ui/api/button/#button-classes-icon) and [.MuiButtonSizeLarge](/material-ui/api/button/#button-classes-sizeLarge) classes instead. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
162
+ */
95
163
  iconSizeLarge: string;
164
+ /** Styles applied to the root element if `color="primary"`. */
165
+ colorPrimary: string;
166
+ /** Styles applied to the root element if `color="secondary"`. */
167
+ colorSecondary: string;
168
+ /** Styles applied to the root element if `color="success"`. */
169
+ colorSuccess: string;
170
+ /** Styles applied to the root element if `color="error"`. */
171
+ colorError: string;
172
+ /** Styles applied to the root element if `color="info"`. */
173
+ colorInfo: string;
174
+ /** Styles applied to the root element if `color="warning"`. */
175
+ colorWarning: string;
96
176
  }
97
177
  export type ButtonClassKey = keyof ButtonClasses;
98
178
  export declare function getButtonUtilityClass(slot: string): string;
@@ -3,5 +3,5 @@ import generateUtilityClass from '@mui/utils/generateUtilityClass';
3
3
  export function getButtonUtilityClass(slot) {
4
4
  return generateUtilityClass('MuiButton', slot);
5
5
  }
6
- const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
6
+ const buttonClasses = generateUtilityClasses('MuiButton', ['root', 'text', 'textInherit', 'textPrimary', 'textSecondary', 'textSuccess', 'textError', 'textInfo', 'textWarning', 'outlined', 'outlinedInherit', 'outlinedPrimary', 'outlinedSecondary', 'outlinedSuccess', 'outlinedError', 'outlinedInfo', 'outlinedWarning', 'contained', 'containedInherit', 'containedPrimary', 'containedSecondary', 'containedSuccess', 'containedError', 'containedInfo', 'containedWarning', 'disableElevation', 'focusVisible', 'disabled', 'colorInherit', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorError', 'colorInfo', 'colorWarning', 'textSizeSmall', 'textSizeMedium', 'textSizeLarge', 'outlinedSizeSmall', 'outlinedSizeMedium', 'outlinedSizeLarge', 'containedSizeSmall', 'containedSizeMedium', 'containedSizeLarge', 'sizeMedium', 'sizeSmall', 'sizeLarge', 'fullWidth', 'startIcon', 'endIcon', 'icon', 'iconSizeSmall', 'iconSizeMedium', 'iconSizeLarge']);
7
7
  export default buttonClasses;