@mui/material 5.10.5 → 5.10.7
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.
- package/Button/Button.js +3 -10
- package/CHANGELOG.md +153 -0
- package/CardHeader/CardHeader.js +1 -3
- package/Checkbox/Checkbox.js +12 -3
- package/Chip/chipClasses.d.ts +8 -0
- package/Chip/chipClasses.js +1 -1
- package/DialogContentText/DialogContentText.js +14 -3
- package/InputLabel/InputLabel.js +12 -3
- package/ListItemButton/ListItemButton.js +10 -3
- package/MenuItem/MenuItem.js +10 -3
- package/OutlinedInput/NotchedOutline.js +2 -2
- package/README.md +1 -0
- package/Radio/Radio.js +12 -3
- package/StepLabel/StepLabel.js +5 -3
- package/SvgIcon/SvgIcon.js +2 -2
- package/SvgIcon/svgIconClasses.d.ts +2 -0
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Tooltip/Tooltip.js +3 -5
- package/Unstable_TrapFocus/index.d.ts +2 -2
- package/Unstable_TrapFocus/index.js +2 -2
- package/esm/Button/Button.js +3 -8
- package/esm/CardHeader/CardHeader.js +1 -3
- package/esm/Checkbox/Checkbox.js +11 -3
- package/esm/Chip/chipClasses.js +1 -1
- package/esm/DialogContentText/DialogContentText.js +13 -3
- package/esm/InputLabel/InputLabel.js +11 -3
- package/esm/ListItemButton/ListItemButton.js +10 -3
- package/esm/MenuItem/MenuItem.js +10 -3
- package/esm/OutlinedInput/NotchedOutline.js +2 -2
- package/esm/Radio/Radio.js +11 -3
- package/esm/StepLabel/StepLabel.js +5 -3
- package/esm/SvgIcon/SvgIcon.js +2 -2
- package/esm/Tooltip/Tooltip.js +3 -5
- package/esm/Unstable_TrapFocus/index.js +1 -1
- package/esm/index.js +2 -1
- package/esm/styles/CssVarsProvider.js +3 -1
- package/esm/styles/excludeVariablesFromRoot.js +6 -0
- package/index.d.ts +3 -0
- package/index.js +11 -2
- package/legacy/Button/Button.js +2 -4
- package/legacy/CardHeader/CardHeader.js +1 -3
- package/legacy/Checkbox/Checkbox.js +10 -2
- package/legacy/Chip/chipClasses.js +1 -1
- package/legacy/DialogContentText/DialogContentText.js +10 -2
- package/legacy/InputLabel/InputLabel.js +10 -2
- package/legacy/ListItemButton/ListItemButton.js +9 -2
- package/legacy/MenuItem/MenuItem.js +9 -2
- package/legacy/OutlinedInput/NotchedOutline.js +2 -2
- package/legacy/Radio/Radio.js +10 -2
- package/legacy/StepLabel/StepLabel.js +5 -4
- package/legacy/SvgIcon/SvgIcon.js +2 -2
- package/legacy/Tooltip/Tooltip.js +3 -5
- package/legacy/Unstable_TrapFocus/index.js +1 -1
- package/legacy/index.js +3 -2
- package/legacy/styles/CssVarsProvider.js +3 -1
- package/legacy/styles/excludeVariablesFromRoot.js +12 -0
- package/modern/Button/Button.js +3 -8
- package/modern/CardHeader/CardHeader.js +1 -3
- package/modern/Checkbox/Checkbox.js +11 -3
- package/modern/Chip/chipClasses.js +1 -1
- package/modern/DialogContentText/DialogContentText.js +13 -3
- package/modern/InputLabel/InputLabel.js +11 -3
- package/modern/ListItemButton/ListItemButton.js +10 -3
- package/modern/MenuItem/MenuItem.js +10 -3
- package/modern/OutlinedInput/NotchedOutline.js +2 -2
- package/modern/Radio/Radio.js +11 -3
- package/modern/StepLabel/StepLabel.js +5 -3
- package/modern/SvgIcon/SvgIcon.js +2 -2
- package/modern/Tooltip/Tooltip.js +3 -5
- package/modern/Unstable_TrapFocus/index.js +1 -1
- package/modern/index.js +3 -2
- package/modern/styles/CssVarsProvider.js +3 -1
- package/modern/styles/excludeVariablesFromRoot.js +6 -0
- package/package.json +7 -7
- package/styles/CssVarsProvider.js +4 -1
- package/styles/excludeVariablesFromRoot.d.ts +5 -0
- package/styles/excludeVariablesFromRoot.js +14 -0
- package/umd/material-ui.development.js +512 -479
- package/umd/material-ui.production.min.js +20 -20
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,
|
|
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,158 @@
|
|
|
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
|
+
|
|
81
|
+
## 5.10.6
|
|
82
|
+
|
|
83
|
+
<!-- generated comparing v5.10.5..master -->
|
|
84
|
+
|
|
85
|
+
_Sep 19, 2022_
|
|
86
|
+
|
|
87
|
+
A big thanks to the 11 contributors who made this release possible.
|
|
88
|
+
This release was mostly about 🐛 bug fixes and 📚 documentation improvements.
|
|
89
|
+
|
|
90
|
+
### `@mui/material@5.10.6`
|
|
91
|
+
|
|
92
|
+
- [TextField] Fix conflict with `Bootstrap` even when label is not defined (#34343) @ZeeshanTamboli
|
|
93
|
+
|
|
94
|
+
### `@mui/joy@5.0.0-alpha.46`
|
|
95
|
+
|
|
96
|
+
#### Breaking changes
|
|
97
|
+
|
|
98
|
+
- [button][joy] Replace `start/endIcon` prop with `start/endDecorator` (#34288) @hbjORbj
|
|
99
|
+
|
|
100
|
+
**BREAKING CHANGE**: replace `start/endIcon` with `start/endDecorator`.
|
|
101
|
+
|
|
102
|
+
```jsx
|
|
103
|
+
// before
|
|
104
|
+
<Button startIcon={...} endIcon={...} />
|
|
105
|
+
|
|
106
|
+
// after
|
|
107
|
+
<Button startDecorator={...} endDecorator={...} />
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
#### Changes
|
|
111
|
+
|
|
112
|
+
- [Joy] Adjust the `Input` and `Textarea` styles (#34281) @siriwatknp
|
|
113
|
+
- [menu][joy] Set disablePortal default to false (#34283) @tomasz-sodzawiczny
|
|
114
|
+
|
|
115
|
+
### `@mui/base@5.0.0-alpha.98`
|
|
116
|
+
|
|
117
|
+
#### Breaking changes
|
|
118
|
+
|
|
119
|
+
- [Select][base] Add event parameter to the onChange callback (#34158) @michaldudak
|
|
120
|
+
|
|
121
|
+
The SelectUnstyled and MultiSelectUnstyled `onChange` callbacks did not have event as the first parameter, leading to inconsistency with other components and native HTML elements.
|
|
122
|
+
This PR adds the event parameter as the first one and moves the newly selected value to the second position. Because of this, it's a breaking change.
|
|
123
|
+
This also affects Select from Joy UI.
|
|
124
|
+
|
|
125
|
+
```jsx
|
|
126
|
+
// before
|
|
127
|
+
<SelectUnstyled onChange={(newValue) => { /* ... */ }} />
|
|
128
|
+
|
|
129
|
+
// after
|
|
130
|
+
<SelectUnstyled onChange={(event, newValue) => { /* ... */ }} />
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Docs
|
|
134
|
+
|
|
135
|
+
- [blog] The Date Pickers gets a stable v5 release (#34152) @alexfauquette
|
|
136
|
+
- [blog] Improve image handling (#34222) @oliviertassinari
|
|
137
|
+
- [blog] Correct 2021 survey data interpretation (#34291) @samuelsycamore
|
|
138
|
+
- [docs] Remove expired AospExtended showcase @oliviertassinari
|
|
139
|
+
- [docs] Link the OpenSSF Best Practices card (#34331) @oliviertassinari
|
|
140
|
+
- [docs] Fix 301 link to external projects @oliviertassinari
|
|
141
|
+
- [docs] Move 12 component names to Title Case (#34188) @oliviertassinari
|
|
142
|
+
- [docs] Fix broken links (#34320) @alexfauquette
|
|
143
|
+
- [docs] Add notification for MUI Base announcement post (#34295) @samuelsycamore
|
|
144
|
+
- [website] Fix MUI X subscribe email border style (#34330) @oliviertassinari
|
|
145
|
+
- [website] Improve security header @oliviertassinari
|
|
146
|
+
|
|
147
|
+
### Core
|
|
148
|
+
|
|
149
|
+
- [core] Lock file maintenance (#34161) @renovate[bot]
|
|
150
|
+
- [core] Issue template: move reproduction steps to the top (#34279) @Janpot
|
|
151
|
+
- [core] Create shared Next.js baseline config (#34259) @oliviertassinari
|
|
152
|
+
- [core] In `typescript-to-proptypes`, respect the value pass to the generic (#34311) @flaviendelangle
|
|
153
|
+
|
|
154
|
+
All contributors of this release in alphabetical order: @alexfauquette, @flaviendelangle, @hbjORbj, @Janpot, @michaldudak, @oliviertassinari, @renovate[bot], @samuelsycamore, @siriwatknp, @tomasz-sodzawiczny, @ZeeshanTamboli
|
|
155
|
+
|
|
3
156
|
## 5.10.5
|
|
4
157
|
|
|
5
158
|
<!-- generated comparing v5.10.4..master -->
|
package/CardHeader/CardHeader.js
CHANGED
|
@@ -196,9 +196,7 @@ process.env.NODE_ENV !== "production" ? CardHeader.propTypes
|
|
|
196
196
|
* The component used for the root node.
|
|
197
197
|
* Either a string to use a HTML element or a component.
|
|
198
198
|
*/
|
|
199
|
-
component: _propTypes.default
|
|
200
|
-
/* @typescript-to-proptypes-ignore */
|
|
201
|
-
.elementType,
|
|
199
|
+
component: _propTypes.default.elementType,
|
|
202
200
|
|
|
203
201
|
/**
|
|
204
202
|
* If `true`, `subheader` and `title` won't be wrapped by a Typography component.
|
package/Checkbox/Checkbox.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 _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
|
package/Chip/chipClasses.d.ts
CHANGED
|
@@ -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}`. */
|
package/Chip/chipClasses.js
CHANGED
|
@@ -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
|
|
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/InputLabel/InputLabel.js
CHANGED
|
@@ -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.
|
package/MenuItem/MenuItem.js
CHANGED
|
@@ -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.
|
|
@@ -49,6 +49,8 @@ const NotchedOutlineLegend = (0, _styled.default)('legend')(({
|
|
|
49
49
|
}) => (0, _extends2.default)({
|
|
50
50
|
float: 'unset',
|
|
51
51
|
// Fix conflict with bootstrap
|
|
52
|
+
width: 'auto',
|
|
53
|
+
// Fix conflict with bootstrap
|
|
52
54
|
overflow: 'hidden'
|
|
53
55
|
}, !ownerState.withLabel && {
|
|
54
56
|
padding: 0,
|
|
@@ -61,8 +63,6 @@ const NotchedOutlineLegend = (0, _styled.default)('legend')(({
|
|
|
61
63
|
}, ownerState.withLabel && (0, _extends2.default)({
|
|
62
64
|
display: 'block',
|
|
63
65
|
// Fix conflict with normalize.css and sanitize.css
|
|
64
|
-
width: 'auto',
|
|
65
|
-
// Fix conflict with bootstrap
|
|
66
66
|
padding: 0,
|
|
67
67
|
height: 11,
|
|
68
68
|
// sync with `lineHeight` in `legend` styles
|
package/README.md
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
[](https://isitmaintained.com/project/mui/material-ui 'Average time to resolve an issue')
|
|
31
31
|
[](https://translate.mui.com/project/material-ui-docs)
|
|
32
32
|
[](https://opencollective.com/mui)
|
|
33
|
+
[](https://bestpractices.coreinfrastructure.org/projects/1320)
|
|
33
34
|
|
|
34
35
|
</div>
|
|
35
36
|
|
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
|
package/StepLabel/StepLabel.js
CHANGED
|
@@ -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)({
|
package/SvgIcon/SvgIcon.js
CHANGED
|
@@ -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.
|
|
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
|
}
|
package/Tooltip/Tooltip.d.ts
CHANGED
|
@@ -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:
|
|
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.
|
package/Tooltip/Tooltip.js
CHANGED
|
@@ -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/
|
|
2
|
-
export * from '@mui/base/
|
|
1
|
+
export { default } from '@mui/base/FocusTrap';
|
|
2
|
+
export * from '@mui/base/FocusTrap';
|