@mui/material 5.10.6 → 5.10.8

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 (82) hide show
  1. package/Button/Button.js +3 -10
  2. package/CHANGELOG.md +78 -0
  3. package/Checkbox/Checkbox.js +12 -3
  4. package/Chip/chipClasses.d.ts +8 -0
  5. package/Chip/chipClasses.js +1 -1
  6. package/DialogContentText/DialogContentText.js +14 -3
  7. package/Fab/Fab.js +5 -2
  8. package/FormControlLabel/FormControlLabel.d.ts +1 -1
  9. package/InputLabel/InputLabel.js +12 -3
  10. package/ListItemButton/ListItemButton.js +10 -3
  11. package/MenuItem/MenuItem.js +10 -3
  12. package/Popover/Popover.js +1 -0
  13. package/Radio/Radio.js +12 -3
  14. package/StepLabel/StepLabel.js +5 -3
  15. package/SvgIcon/SvgIcon.js +2 -2
  16. package/SvgIcon/svgIconClasses.d.ts +2 -0
  17. package/Tooltip/Tooltip.d.ts +2 -2
  18. package/Tooltip/Tooltip.js +3 -5
  19. package/Unstable_TrapFocus/index.d.ts +2 -2
  20. package/Unstable_TrapFocus/index.js +2 -2
  21. package/esm/Button/Button.js +3 -8
  22. package/esm/Checkbox/Checkbox.js +11 -3
  23. package/esm/Chip/chipClasses.js +1 -1
  24. package/esm/DialogContentText/DialogContentText.js +13 -3
  25. package/esm/Fab/Fab.js +5 -2
  26. package/esm/InputLabel/InputLabel.js +11 -3
  27. package/esm/ListItemButton/ListItemButton.js +10 -3
  28. package/esm/MenuItem/MenuItem.js +10 -3
  29. package/esm/Popover/Popover.js +1 -0
  30. package/esm/Radio/Radio.js +11 -3
  31. package/esm/StepLabel/StepLabel.js +5 -3
  32. package/esm/SvgIcon/SvgIcon.js +2 -2
  33. package/esm/Tooltip/Tooltip.js +3 -5
  34. package/esm/Unstable_TrapFocus/index.js +1 -1
  35. package/esm/locale/index.js +81 -1
  36. package/esm/styles/CssVarsProvider.js +3 -1
  37. package/esm/styles/excludeVariablesFromRoot.js +6 -0
  38. package/index.js +1 -1
  39. package/legacy/Button/Button.js +2 -4
  40. package/legacy/Checkbox/Checkbox.js +10 -2
  41. package/legacy/Chip/chipClasses.js +1 -1
  42. package/legacy/DialogContentText/DialogContentText.js +10 -2
  43. package/legacy/Fab/Fab.js +7 -2
  44. package/legacy/InputLabel/InputLabel.js +10 -2
  45. package/legacy/ListItemButton/ListItemButton.js +9 -2
  46. package/legacy/MenuItem/MenuItem.js +9 -2
  47. package/legacy/Popover/Popover.js +1 -0
  48. package/legacy/Radio/Radio.js +10 -2
  49. package/legacy/StepLabel/StepLabel.js +5 -4
  50. package/legacy/SvgIcon/SvgIcon.js +2 -2
  51. package/legacy/Tooltip/Tooltip.js +3 -5
  52. package/legacy/Unstable_TrapFocus/index.js +1 -1
  53. package/legacy/index.js +1 -1
  54. package/legacy/locale/index.js +224 -141
  55. package/legacy/styles/CssVarsProvider.js +3 -1
  56. package/legacy/styles/excludeVariablesFromRoot.js +12 -0
  57. package/locale/index.d.ts +1 -0
  58. package/locale/index.js +83 -2
  59. package/modern/Button/Button.js +3 -8
  60. package/modern/Checkbox/Checkbox.js +11 -3
  61. package/modern/Chip/chipClasses.js +1 -1
  62. package/modern/DialogContentText/DialogContentText.js +13 -3
  63. package/modern/Fab/Fab.js +5 -2
  64. package/modern/InputLabel/InputLabel.js +11 -3
  65. package/modern/ListItemButton/ListItemButton.js +10 -3
  66. package/modern/MenuItem/MenuItem.js +10 -3
  67. package/modern/Popover/Popover.js +1 -0
  68. package/modern/Radio/Radio.js +11 -3
  69. package/modern/StepLabel/StepLabel.js +5 -3
  70. package/modern/SvgIcon/SvgIcon.js +2 -2
  71. package/modern/Tooltip/Tooltip.js +3 -5
  72. package/modern/Unstable_TrapFocus/index.js +1 -1
  73. package/modern/index.js +1 -1
  74. package/modern/locale/index.js +81 -1
  75. package/modern/styles/CssVarsProvider.js +3 -1
  76. package/modern/styles/excludeVariablesFromRoot.js +6 -0
  77. package/package.json +5 -5
  78. package/styles/CssVarsProvider.js +4 -1
  79. package/styles/excludeVariablesFromRoot.d.ts +5 -0
  80. package/styles/excludeVariablesFromRoot.js +14 -0
  81. package/umd/material-ui.development.js +485 -431
  82. package/umd/material-ui.production.min.js +9 -9
package/Button/Button.js CHANGED
@@ -37,8 +37,7 @@ var _ButtonGroupContext = _interopRequireDefault(require("../ButtonGroup/ButtonG
37
37
 
38
38
  var _jsxRuntime = require("react/jsx-runtime");
39
39
 
40
- const _excluded = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"],
41
- _excluded2 = ["root"];
40
+ const _excluded = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"];
42
41
 
43
42
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
44
43
 
@@ -283,13 +282,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
283
282
  type,
284
283
  variant
285
284
  });
286
-
287
- const _useUtilityClasses = useUtilityClasses(ownerState),
288
- {
289
- root: classesRoot
290
- } = _useUtilityClasses,
291
- classes = (0, _objectWithoutPropertiesLoose2.default)(_useUtilityClasses, _excluded2);
292
-
285
+ const classes = useUtilityClasses(ownerState);
293
286
  const startIcon = startIconProp && /*#__PURE__*/(0, _jsxRuntime.jsx)(ButtonStartIcon, {
294
287
  className: classes.startIcon,
295
288
  ownerState: ownerState,
@@ -302,7 +295,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
302
295
  });
303
296
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ButtonRoot, (0, _extends2.default)({
304
297
  ownerState: ownerState,
305
- className: (0, _clsx.default)(contextProps.className, classesRoot, className),
298
+ className: (0, _clsx.default)(contextProps.className, classes.root, className),
306
299
  component: component,
307
300
  disabled: disabled,
308
301
  focusRipple: !disableFocusRipple,
package/CHANGELOG.md CHANGED
@@ -1,5 +1,83 @@
1
1
  # [Versions](https://mui.com/versions/)
2
2
 
3
+ ## 5.10.7
4
+
5
+ <!-- generated comparing v5.10.6..master -->
6
+
7
+ _Sep 26, 2022_
8
+
9
+ A big thanks to the 21 contributors who made this release possible. Here are some highlights ✨:
10
+
11
+ - 🚀 [Divider](https://mui.com/joy-ui/react-divider/) component is added to Joy UI (#34403) @siriwatknp
12
+
13
+ ### `@mui/material@5.10.7`
14
+
15
+ - [CssVarsProvider] Exclude dark mode variables from `:root` stylesheet (#34131) @siriwatknp
16
+ - [Chip] Add chip classes (#33801) @pratikkarad
17
+ - [Slider] Fix typo in the comments in the source (#34452) @HexM7
18
+ - [SvgIcon] Fix passing an ownerState to SvgIcon changes the font size (#34429) @ZeeshanTamboli
19
+ - [Stepper] Fix optional label is not centered when `alternativeLabel` is used (#34335) @ZeeshanTamboli
20
+ - [Tooltip] Add undefined, null or false in `title` (#34289) @abhinav-22-tech
21
+ - Make @emotion/\* fully supported in all Material UI components (#34451) @garronej
22
+
23
+ ### `@mui/system@5.10.7`
24
+
25
+ - [system] Fix parsing of hsla colors in getLuminance (#34437) @ptrfrncsmrph
26
+ - [system] Fix incorrect type of `shape.borderRadius` in theme (#34076) @ZeeshanTamboli
27
+ - [system] Replace `enableSystem` with `defaultMode` (#33960) @siriwatknp
28
+
29
+ ### `@mui/material@5.0.0-alpha.101`
30
+
31
+ - [deps] Move @mui/types to dependencies (#34384) @Methuselah96
32
+
33
+ ### `@mui/base@5.0.0-alpha.99`
34
+
35
+ #### Breaking changes
36
+
37
+ - [TrapFocus] Rename TrapFocus to FocusTrap (#34216) @kabernardes
38
+
39
+ ```diff
40
+ - import TrapFocus from ‘@mui/base/TrapFocus’;
41
+ + import FocusTrap from ‘@mui/base/FocusTrap’;
42
+ ```
43
+
44
+ #### Changes
45
+
46
+ - [MultiSelect] Require a single tap to select an item on mobile Chrome (#33932) @michaldudak
47
+
48
+ ### `@mui/joy@5.0.0-alpha.47`
49
+
50
+ - [Checkbox] spread `value`, `required`, and `readOnly` to input (#34477) @siriwatknp
51
+ - [Chip] Fix unbinded `onClick` prop (#34455) @HexM7
52
+ - [Divider] Add `Divider` component (#34403) @siriwatknp
53
+ - [Radio] spread `readOnly` and `required` to input (#34478) @siriwatknp
54
+
55
+ ### Docs
56
+
57
+ - [blog] MUI Base announcement typo fixed (#34409) @prakhargupta1
58
+ - [blog] Fix typo in date-pickers v5 stable (#34386) @alexfauquette
59
+ - [blog] Update date on date pickers v5 release blog post (#34406) @joserodolfofreitas
60
+ - [docs] Update `useMenu` and `useMenuItem` hooks demo (#34166) @ZeeshanTamboli
61
+ - [docs] Update the guide for migrating to TSS (#34417) @garronej
62
+ - [docs] Fix typo in `Grid` docs (#34475) @Dustin-Digitar
63
+ - [docs] Fix typo in `Back to top` section in AppBar docs (#34479) @Dustin-Digitar
64
+ - [docs] Standardize all MUI Core "Installation" pages (#34168) @samuelsycamore
65
+ - [docs] Fix webpack file name to the standard: `webpack.config.js` (#34446) @CodingItWrong
66
+ - [docs] Fix Select `onChange` call (#34408) @siriwatknp
67
+ - [docs] Notification for pickers blog - v5 stable (#34400) @joserodolfofreitas
68
+ - [docs] Improve social sharing of docs pages (#34346) @oliviertassinari
69
+ - [docs] Refine the use of MUI vs. Material UI (#34345) @oliviertassinari
70
+ - [docs] Send feedback directly to a dedicated slack channel (#34196) @alexfauquette
71
+ - [website] Adds Bilal to about page (#34412) @MBilalShafi
72
+ - [website] Add date range picker to pricing table (#34399) @joserodolfofreitas
73
+
74
+ ### Core
75
+
76
+ - [core] Document some types in @mui/styled-engine-sc (#34413) @mnajdova
77
+ - [core] Add yml support to prettier (#33980) @Janpot
78
+
79
+ All contributors of this release in alphabetical order: @abhinav-22-tech, @alexfauquette, @CodingItWrong, @Dustin-Digitar, @garronej, @HexM7, @howlettt, @Janpot, @joserodolfofreitas, @kabernardes, @MBilalShafi, @Methuselah96, @michaldudak, @mnajdova, @oliviertassinari, @prakhargupta1, @pratikkarad, @ptrfrncsmrph, @samuelsycamore, @siriwatknp, @ZeeshanTamboli
80
+
3
81
  ## 5.10.6
4
82
 
5
83
  <!-- generated comparing v5.10.5..master -->
@@ -15,6 +15,8 @@ var React = _interopRequireWildcard(require("react"));
15
15
 
16
16
  var _propTypes = _interopRequireDefault(require("prop-types"));
17
17
 
18
+ var _clsx = _interopRequireDefault(require("clsx"));
19
+
18
20
  var _utils = require("@mui/utils");
19
21
 
20
22
  var _base = require("@mui/base");
@@ -39,7 +41,7 @@ var _checkboxClasses = _interopRequireWildcard(require("./checkboxClasses"));
39
41
 
40
42
  var _jsxRuntime = require("react/jsx-runtime");
41
43
 
42
- const _excluded = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size"];
44
+ const _excluded = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "className"];
43
45
 
44
46
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
45
47
 
@@ -106,7 +108,8 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(inProps, ref) {
106
108
  indeterminate = false,
107
109
  indeterminateIcon: indeterminateIconProp = defaultIndeterminateIcon,
108
110
  inputProps,
109
- size = 'medium'
111
+ size = 'medium',
112
+ className
110
113
  } = props,
111
114
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
112
115
  const icon = indeterminate ? indeterminateIconProp : iconProp;
@@ -129,7 +132,8 @@ const Checkbox = /*#__PURE__*/React.forwardRef(function Checkbox(inProps, ref) {
129
132
  fontSize: (_indeterminateIcon$pr = indeterminateIcon.props.fontSize) != null ? _indeterminateIcon$pr : size
130
133
  }),
131
134
  ownerState: ownerState,
132
- ref: ref
135
+ ref: ref,
136
+ className: (0, _clsx.default)(classes.root, className)
133
137
  }, other, {
134
138
  classes: classes
135
139
  }));
@@ -158,6 +162,11 @@ process.env.NODE_ENV !== "production" ? Checkbox.propTypes
158
162
  */
159
163
  classes: _propTypes.default.object,
160
164
 
165
+ /**
166
+ * @ignore
167
+ */
168
+ className: _propTypes.default.string,
169
+
161
170
  /**
162
171
  * The color of the component.
163
172
  * It supports both default and custom theme colors, which can be added as shown in the
@@ -5,10 +5,18 @@ export interface ChipClasses {
5
5
  sizeSmall: string;
6
6
  /** Styles applied to the root element if `size="medium"`. */
7
7
  sizeMedium: string;
8
+ /** Styles applied to the root element if `color="error"`. */
9
+ colorError: string;
10
+ /** Styles applied to the root element if `color="info"`. */
11
+ colorInfo: string;
8
12
  /** Styles applied to the root element if `color="primary"`. */
9
13
  colorPrimary: string;
10
14
  /** Styles applied to the root element if `color="secondary"`. */
11
15
  colorSecondary: string;
16
+ /** Styles applied to the root element if `color="success"`. */
17
+ colorSuccess: string;
18
+ /** Styles applied to the root element if `color="warning"`. */
19
+ colorWarning: string;
12
20
  /** State class applied to the root element if `disabled={true}`. */
13
21
  disabled: string;
14
22
  /** Styles applied to the root element if `onClick` is defined or `clickable={true}`. */
@@ -12,6 +12,6 @@ function getChipUtilityClass(slot) {
12
12
  return (0, _base.generateUtilityClass)('MuiChip', slot);
13
13
  }
14
14
 
15
- const chipClasses = (0, _base.generateUtilityClasses)('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorPrimary', 'colorSecondary', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
15
+ const chipClasses = (0, _base.generateUtilityClasses)('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
16
16
  var _default = chipClasses;
17
17
  exports.default = _default;
@@ -15,6 +15,8 @@ var React = _interopRequireWildcard(require("react"));
15
15
 
16
16
  var _propTypes = _interopRequireDefault(require("prop-types"));
17
17
 
18
+ var _clsx = _interopRequireDefault(require("clsx"));
19
+
18
20
  var _base = require("@mui/base");
19
21
 
20
22
  var _styled = _interopRequireWildcard(require("../styles/styled"));
@@ -27,7 +29,7 @@ var _dialogContentTextClasses = require("./dialogContentTextClasses");
27
29
 
28
30
  var _jsxRuntime = require("react/jsx-runtime");
29
31
 
30
- const _excluded = ["children"];
32
+ const _excluded = ["children", "className"];
31
33
 
32
34
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
35
 
@@ -55,14 +57,18 @@ const DialogContentText = /*#__PURE__*/React.forwardRef(function DialogContentTe
55
57
  props: inProps,
56
58
  name: 'MuiDialogContentText'
57
59
  });
58
- const ownerState = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
60
+ const {
61
+ className
62
+ } = props,
63
+ ownerState = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
59
64
  const classes = useUtilityClasses(ownerState);
60
65
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(DialogContentTextRoot, (0, _extends2.default)({
61
66
  component: "p",
62
67
  variant: "body1",
63
68
  color: "text.secondary",
64
69
  ref: ref,
65
- ownerState: ownerState
70
+ ownerState: ownerState,
71
+ className: (0, _clsx.default)(classes.root, className)
66
72
  }, props, {
67
73
  classes: classes
68
74
  }));
@@ -85,6 +91,11 @@ process.env.NODE_ENV !== "production" ? DialogContentText.propTypes
85
91
  */
86
92
  classes: _propTypes.default.object,
87
93
 
94
+ /**
95
+ * @ignore
96
+ */
97
+ className: _propTypes.default.string,
98
+
88
99
  /**
89
100
  * The system prop that allows defining system overrides as well as additional CSS styles.
90
101
  */
package/Fab/Fab.js CHANGED
@@ -27,7 +27,7 @@ var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
27
27
 
28
28
  var _fabClasses = _interopRequireWildcard(require("./fabClasses"));
29
29
 
30
- var _styled = _interopRequireDefault(require("../styles/styled"));
30
+ var _styled = _interopRequireWildcard(require("../styles/styled"));
31
31
 
32
32
  var _jsxRuntime = require("react/jsx-runtime");
33
33
 
@@ -47,12 +47,14 @@ const useUtilityClasses = ownerState => {
47
47
  const slots = {
48
48
  root: ['root', variant, `size${(0, _capitalize.default)(size)}`, color === 'inherit' ? 'colorInherit' : color]
49
49
  };
50
- return (0, _base.unstable_composeClasses)(slots, _fabClasses.getFabUtilityClass, classes);
50
+ const composedClasses = (0, _base.unstable_composeClasses)(slots, _fabClasses.getFabUtilityClass, classes);
51
+ return (0, _extends2.default)({}, classes, composedClasses);
51
52
  };
52
53
 
53
54
  const FabRoot = (0, _styled.default)(_ButtonBase.default, {
54
55
  name: 'MuiFab',
55
56
  slot: 'Root',
57
+ shouldForwardProp: prop => (0, _styled.rootShouldForwardProp)(prop) || prop === 'classes',
56
58
  overridesResolver: (props, styles) => {
57
59
  const {
58
60
  ownerState
@@ -175,6 +177,7 @@ const Fab = /*#__PURE__*/React.forwardRef(function Fab(inProps, ref) {
175
177
  ownerState: ownerState,
176
178
  ref: ref
177
179
  }, other, {
180
+ classes: classes,
178
181
  children: children
179
182
  }));
180
183
  });
@@ -21,7 +21,7 @@ export interface FormControlLabelProps
21
21
  componentsProps?: {
22
22
  /**
23
23
  * Props applied to the Typography wrapper of the passed label.
24
- * This is unused if disableTpography is true.
24
+ * This is unused if disableTypography is true.
25
25
  * @default {}
26
26
  */
27
27
  typography?: TypographyProps;
@@ -17,6 +17,8 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
17
17
 
18
18
  var _base = require("@mui/base");
19
19
 
20
+ var _clsx = _interopRequireDefault(require("clsx"));
21
+
20
22
  var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
21
23
 
22
24
  var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
@@ -31,7 +33,7 @@ var _inputLabelClasses = require("./inputLabelClasses");
31
33
 
32
34
  var _jsxRuntime = require("react/jsx-runtime");
33
35
 
34
- const _excluded = ["disableAnimation", "margin", "shrink", "variant"];
36
+ const _excluded = ["disableAnimation", "margin", "shrink", "variant", "className"];
35
37
 
36
38
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
37
39
 
@@ -134,7 +136,8 @@ const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, re
134
136
  });
135
137
  const {
136
138
  disableAnimation = false,
137
- shrink: shrinkProp
139
+ shrink: shrinkProp,
140
+ className
138
141
  } = props,
139
142
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
140
143
  const muiFormControl = (0, _useFormControl.default)();
@@ -161,7 +164,8 @@ const InputLabel = /*#__PURE__*/React.forwardRef(function InputLabel(inProps, re
161
164
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(InputLabelRoot, (0, _extends2.default)({
162
165
  "data-shrink": shrink,
163
166
  ownerState: ownerState,
164
- ref: ref
167
+ ref: ref,
168
+ className: (0, _clsx.default)(classes.root, className)
165
169
  }, other, {
166
170
  classes: classes
167
171
  }));
@@ -184,6 +188,11 @@ process.env.NODE_ENV !== "production" ? InputLabel.propTypes
184
188
  */
185
189
  classes: _propTypes.default.object,
186
190
 
191
+ /**
192
+ * @ignore
193
+ */
194
+ className: _propTypes.default.string,
195
+
187
196
  /**
188
197
  * The color of the component.
189
198
  * It supports both default and custom theme colors, which can be added as shown in the
@@ -37,7 +37,7 @@ var _listItemButtonClasses = _interopRequireWildcard(require("./listItemButtonCl
37
37
 
38
38
  var _jsxRuntime = require("react/jsx-runtime");
39
39
 
40
- const _excluded = ["alignItems", "autoFocus", "component", "children", "dense", "disableGutters", "divider", "focusVisibleClassName", "selected"];
40
+ const _excluded = ["alignItems", "autoFocus", "component", "children", "dense", "disableGutters", "divider", "focusVisibleClassName", "selected", "className"];
41
41
 
42
42
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
43
43
 
@@ -145,7 +145,8 @@ const ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inP
145
145
  disableGutters = false,
146
146
  divider = false,
147
147
  focusVisibleClassName,
148
- selected = false
148
+ selected = false,
149
+ className
149
150
  } = props,
150
151
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
151
152
  const context = React.useContext(_ListContext.default);
@@ -180,7 +181,8 @@ const ListItemButton = /*#__PURE__*/React.forwardRef(function ListItemButton(inP
180
181
  href: other.href || other.to,
181
182
  component: (other.href || other.to) && component === 'div' ? 'a' : component,
182
183
  focusVisibleClassName: (0, _clsx.default)(classes.focusVisible, focusVisibleClassName),
183
- ownerState: ownerState
184
+ ownerState: ownerState,
185
+ className: (0, _clsx.default)(classes.root, className)
184
186
  }, other, {
185
187
  classes: classes,
186
188
  children: children
@@ -219,6 +221,11 @@ process.env.NODE_ENV !== "production" ? ListItemButton.propTypes
219
221
  */
220
222
  classes: _propTypes.default.object,
221
223
 
224
+ /**
225
+ * @ignore
226
+ */
227
+ className: _propTypes.default.string,
228
+
222
229
  /**
223
230
  * The component used for the root node.
224
231
  * Either a string to use a HTML element or a component.
@@ -43,7 +43,7 @@ var _menuItemClasses = _interopRequireWildcard(require("./menuItemClasses"));
43
43
 
44
44
  var _jsxRuntime = require("react/jsx-runtime");
45
45
 
46
- const _excluded = ["autoFocus", "component", "dense", "divider", "disableGutters", "focusVisibleClassName", "role", "tabIndex"];
46
+ const _excluded = ["autoFocus", "component", "dense", "divider", "disableGutters", "focusVisibleClassName", "role", "tabIndex", "className"];
47
47
 
48
48
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
49
49
 
@@ -171,7 +171,8 @@ const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(inProps, ref) {
171
171
  disableGutters = false,
172
172
  focusVisibleClassName,
173
173
  role = 'menuitem',
174
- tabIndex: tabIndexProp
174
+ tabIndex: tabIndexProp,
175
+ className
175
176
  } = props,
176
177
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
177
178
  const context = React.useContext(_ListContext.default);
@@ -209,7 +210,8 @@ const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(inProps, ref) {
209
210
  role: role,
210
211
  tabIndex: tabIndex,
211
212
  component: component,
212
- focusVisibleClassName: (0, _clsx.default)(classes.focusVisible, focusVisibleClassName)
213
+ focusVisibleClassName: (0, _clsx.default)(classes.focusVisible, focusVisibleClassName),
214
+ className: (0, _clsx.default)(classes.root, className)
213
215
  }, other, {
214
216
  ownerState: ownerState,
215
217
  classes: classes
@@ -241,6 +243,11 @@ process.env.NODE_ENV !== "production" ? MenuItem.propTypes
241
243
  */
242
244
  classes: _propTypes.default.object,
243
245
 
246
+ /**
247
+ * @ignore
248
+ */
249
+ className: _propTypes.default.string,
250
+
244
251
  /**
245
252
  * The component used for the root node.
246
253
  * Either a string to use a HTML element or a component.
@@ -352,6 +352,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
352
352
  }, PaperProps, {
353
353
  ref: handlePaperRef,
354
354
  className: (0, _clsx.default)(classes.paper, PaperProps.className),
355
+ ownerState: ownerState,
355
356
  children: children
356
357
  }))
357
358
  }))
package/Radio/Radio.js CHANGED
@@ -15,6 +15,8 @@ var React = _interopRequireWildcard(require("react"));
15
15
 
16
16
  var _propTypes = _interopRequireDefault(require("prop-types"));
17
17
 
18
+ var _clsx = _interopRequireDefault(require("clsx"));
19
+
18
20
  var _utils = require("@mui/utils");
19
21
 
20
22
  var _base = require("@mui/base");
@@ -39,7 +41,7 @@ var _styled = _interopRequireWildcard(require("../styles/styled"));
39
41
 
40
42
  var _jsxRuntime = require("react/jsx-runtime");
41
43
 
42
- const _excluded = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size"];
44
+ const _excluded = ["checked", "checkedIcon", "color", "icon", "name", "onChange", "size", "className"];
43
45
 
44
46
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
45
47
 
@@ -115,7 +117,8 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
115
117
  icon = defaultIcon,
116
118
  name: nameProp,
117
119
  onChange: onChangeProp,
118
- size = 'medium'
120
+ size = 'medium',
121
+ className
119
122
  } = props,
120
123
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
121
124
  const ownerState = (0, _extends2.default)({}, props, {
@@ -151,7 +154,8 @@ const Radio = /*#__PURE__*/React.forwardRef(function Radio(inProps, ref) {
151
154
  name: name,
152
155
  checked: checked,
153
156
  onChange: onChange,
154
- ref: ref
157
+ ref: ref,
158
+ className: (0, _clsx.default)(classes.root, className)
155
159
  }, other));
156
160
  });
157
161
  process.env.NODE_ENV !== "production" ? Radio.propTypes
@@ -178,6 +182,11 @@ process.env.NODE_ENV !== "production" ? Radio.propTypes
178
182
  */
179
183
  classes: _propTypes.default.object,
180
184
 
185
+ /**
186
+ * @ignore
187
+ */
188
+ className: _propTypes.default.string,
189
+
181
190
  /**
182
191
  * The color of the component.
183
192
  * It supports both default and custom theme colors, which can be added as shown in the
@@ -53,7 +53,7 @@ const useUtilityClasses = ownerState => {
53
53
  root: ['root', orientation, error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
54
54
  label: ['label', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
55
55
  iconContainer: ['iconContainer', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
56
- labelContainer: ['labelContainer']
56
+ labelContainer: ['labelContainer', alternativeLabel && 'alternativeLabel']
57
57
  };
58
58
  return (0, _base.unstable_composeClasses)(slots, _stepLabelClasses.getStepLabelUtilityClass, classes);
59
59
  };
@@ -102,7 +102,6 @@ const StepLabelLabel = (0, _styled.default)('span', {
102
102
  fontWeight: 500
103
103
  },
104
104
  [`&.${_stepLabelClasses.default.alternativeLabel}`]: {
105
- textAlign: 'center',
106
105
  marginTop: 16
107
106
  },
108
107
  [`&.${_stepLabelClasses.default.error}`]: {
@@ -130,7 +129,10 @@ const StepLabelLabelContainer = (0, _styled.default)('span', {
130
129
  theme
131
130
  }) => ({
132
131
  width: '100%',
133
- color: (theme.vars || theme).palette.text.secondary
132
+ color: (theme.vars || theme).palette.text.secondary,
133
+ [`&.${_stepLabelClasses.default.alternativeLabel}`]: {
134
+ textAlign: 'center'
135
+ }
134
136
  }));
135
137
  const StepLabel = /*#__PURE__*/React.forwardRef(function StepLabel(inProps, ref) {
136
138
  const props = (0, _useThemeProps.default)({
@@ -76,7 +76,7 @@ const SvgIconRoot = (0, _styled.default)('svg', {
76
76
  inherit: 'inherit',
77
77
  small: ((_theme$typography = theme.typography) == null ? void 0 : (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',
78
78
  medium: ((_theme$typography2 = theme.typography) == null ? void 0 : (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',
79
- large: ((_theme$typography3 = theme.typography) == null ? void 0 : (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875'
79
+ large: ((_theme$typography3 = theme.typography) == null ? void 0 : (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875rem'
80
80
  }[ownerState.fontSize],
81
81
  // TODO v5 deprecate, v6 remove for sx
82
82
  color: (_palette$ownerState$c = (_palette = (theme.vars || theme).palette) == null ? void 0 : (_palette$ownerState$c2 = _palette[ownerState.color]) == null ? void 0 : _palette$ownerState$c2.main) != null ? _palette$ownerState$c : {
@@ -121,13 +121,13 @@ const SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {
121
121
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(SvgIconRoot, (0, _extends2.default)({
122
122
  as: component,
123
123
  className: (0, _clsx.default)(classes.root, className),
124
- ownerState: ownerState,
125
124
  focusable: "false",
126
125
  color: htmlColor,
127
126
  "aria-hidden": titleAccess ? undefined : true,
128
127
  role: titleAccess ? 'img' : undefined,
129
128
  ref: ref
130
129
  }, more, other, {
130
+ ownerState: ownerState,
131
131
  children: [children, titleAccess ? /*#__PURE__*/(0, _jsxRuntime.jsx)("title", {
132
132
  children: titleAccess
133
133
  }) : null]
@@ -15,6 +15,8 @@ export interface SvgIconClasses {
15
15
  fontSizeInherit: string;
16
16
  /** Styles applied to the root element if `fontSize="small"`. */
17
17
  fontSizeSmall: string;
18
+ /** Styles applied to the root element if `fontSize="medium"`. */
19
+ fontSizeMedium: string;
18
20
  /** Styles applied to the root element if `fontSize="large"`. */
19
21
  fontSizeLarge: string;
20
22
  }
@@ -160,9 +160,9 @@ export interface TooltipProps extends StandardProps<React.HTMLAttributes<HTMLDiv
160
160
  */
161
161
  sx?: SxProps<Theme>;
162
162
  /**
163
- * Tooltip title. Zero-length titles string are never displayed.
163
+ * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.
164
164
  */
165
- title: NonNullable<React.ReactNode>;
165
+ title: React.ReactNode;
166
166
  /**
167
167
  * The component used for the transition.
168
168
  * [Follow this guide](/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
@@ -498,7 +498,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
498
498
  const handleFocusRef = (0, _useForkRef.default)(focusVisibleRef, handleUseRef);
499
499
  const handleRef = (0, _useForkRef.default)(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.
500
500
 
501
- if (title === '') {
501
+ if (typeof title !== 'number' && !title) {
502
502
  open = false;
503
503
  }
504
504
 
@@ -838,11 +838,9 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes
838
838
  sx: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object, _propTypes.default.bool])), _propTypes.default.func, _propTypes.default.object]),
839
839
 
840
840
  /**
841
- * Tooltip title. Zero-length titles string are never displayed.
841
+ * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.
842
842
  */
843
- title: _propTypes.default
844
- /* @typescript-to-proptypes-ignore */
845
- .node.isRequired,
843
+ title: _propTypes.default.node,
846
844
 
847
845
  /**
848
846
  * The component used for the transition.
@@ -1,2 +1,2 @@
1
- export { default } from '@mui/base/TrapFocus';
2
- export * from '@mui/base/TrapFocus';
1
+ export { default } from '@mui/base/FocusTrap';
2
+ export * from '@mui/base/FocusTrap';
@@ -8,8 +8,8 @@ Object.defineProperty(exports, "__esModule", {
8
8
  Object.defineProperty(exports, "default", {
9
9
  enumerable: true,
10
10
  get: function () {
11
- return _TrapFocus.default;
11
+ return _FocusTrap.default;
12
12
  }
13
13
  });
14
14
 
15
- var _TrapFocus = _interopRequireDefault(require("@mui/base/TrapFocus"));
15
+ var _FocusTrap = _interopRequireDefault(require("@mui/base/FocusTrap"));
@@ -1,7 +1,6 @@
1
1
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
2
2
  import _extends from "@babel/runtime/helpers/esm/extends";
3
- const _excluded = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"],
4
- _excluded2 = ["root"];
3
+ const _excluded = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"];
5
4
  import * as React from 'react';
6
5
  import PropTypes from 'prop-types';
7
6
  import clsx from 'clsx';
@@ -259,11 +258,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
259
258
  variant
260
259
  });
261
260
 
262
- const _useUtilityClasses = useUtilityClasses(ownerState),
263
- {
264
- root: classesRoot
265
- } = _useUtilityClasses,
266
- classes = _objectWithoutPropertiesLoose(_useUtilityClasses, _excluded2);
261
+ const classes = useUtilityClasses(ownerState);
267
262
 
268
263
  const startIcon = startIconProp && /*#__PURE__*/_jsx(ButtonStartIcon, {
269
264
  className: classes.startIcon,
@@ -279,7 +274,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
279
274
 
280
275
  return /*#__PURE__*/_jsxs(ButtonRoot, _extends({
281
276
  ownerState: ownerState,
282
- className: clsx(contextProps.className, classesRoot, className),
277
+ className: clsx(contextProps.className, classes.root, className),
283
278
  component: component,
284
279
  disabled: disabled,
285
280
  focusRipple: !disableFocusRipple,