@mui/material 6.4.11 → 6.4.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.
- package/Badge/Badge.d.ts +32 -28
- package/Badge/Badge.js +27 -20
- package/BottomNavigationAction/BottomNavigationAction.d.ts +40 -3
- package/BottomNavigationAction/BottomNavigationAction.js +53 -9
- package/CHANGELOG.md +37 -0
- package/CardActionArea/CardActionArea.d.ts +40 -3
- package/CardActionArea/CardActionArea.js +47 -8
- package/Menu/Menu.d.ts +1 -1
- package/OutlinedInput/OutlinedInput.d.ts +29 -2
- package/OutlinedInput/OutlinedInput.js +30 -10
- package/index.js +1 -1
- package/modern/Badge/Badge.js +27 -20
- package/modern/BottomNavigationAction/BottomNavigationAction.js +53 -9
- package/modern/CardActionArea/CardActionArea.js +47 -8
- package/modern/OutlinedInput/OutlinedInput.js +30 -10
- package/modern/index.js +1 -1
- package/modern/styles/ThemeProvider.js +17 -17
- package/modern/version/index.js +2 -2
- package/node/Badge/Badge.js +27 -20
- package/node/BottomNavigationAction/BottomNavigationAction.js +53 -9
- package/node/CardActionArea/CardActionArea.js +47 -8
- package/node/OutlinedInput/OutlinedInput.js +30 -10
- package/node/index.js +1 -1
- package/node/styles/ThemeProvider.js +17 -17
- package/node/version/index.js +2 -2
- package/package.json +4 -4
- package/styles/ThemeProvider.js +17 -17
- package/version/index.js +2 -2
|
@@ -21,6 +21,7 @@ var _createSimplePaletteValueFilter = _interopRequireDefault(require("../utils/c
|
|
|
21
21
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
22
22
|
var _outlinedInputClasses = _interopRequireWildcard(require("./outlinedInputClasses"));
|
|
23
23
|
var _InputBase = _interopRequireWildcard(require("../InputBase/InputBase"));
|
|
24
|
+
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
24
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
const useUtilityClasses = ownerState => {
|
|
26
27
|
const {
|
|
@@ -185,7 +186,6 @@ const OutlinedInputInput = (0, _zeroStyled.styled)(_InputBase.InputBaseInput, {
|
|
|
185
186
|
}]
|
|
186
187
|
})));
|
|
187
188
|
const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inProps, ref) {
|
|
188
|
-
var _React$Fragment;
|
|
189
189
|
const props = (0, _DefaultPropsProvider.useDefaultProps)({
|
|
190
190
|
props: inProps,
|
|
191
191
|
name: 'MuiOutlinedInput'
|
|
@@ -198,6 +198,7 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
|
|
|
198
198
|
multiline = false,
|
|
199
199
|
notched,
|
|
200
200
|
slots = {},
|
|
201
|
+
slotProps = {},
|
|
201
202
|
type = 'text',
|
|
202
203
|
...other
|
|
203
204
|
} = props;
|
|
@@ -223,17 +224,29 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
|
|
|
223
224
|
};
|
|
224
225
|
const RootSlot = slots.root ?? components.Root ?? OutlinedInputRoot;
|
|
225
226
|
const InputSlot = slots.input ?? components.Input ?? OutlinedInputInput;
|
|
227
|
+
const [NotchedSlot, notchedProps] = (0, _useSlot.default)('notchedOutline', {
|
|
228
|
+
elementType: NotchedOutlineRoot,
|
|
229
|
+
className: classes.notchedOutline,
|
|
230
|
+
shouldForwardComponentProp: true,
|
|
231
|
+
ownerState,
|
|
232
|
+
externalForwardedProps: {
|
|
233
|
+
slots,
|
|
234
|
+
slotProps
|
|
235
|
+
},
|
|
236
|
+
additionalProps: {
|
|
237
|
+
label: label != null && label !== '' && fcs.required ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
238
|
+
children: [label, "\u2009", '*']
|
|
239
|
+
}) : label
|
|
240
|
+
}
|
|
241
|
+
});
|
|
226
242
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputBase.default, {
|
|
227
243
|
slots: {
|
|
228
244
|
root: RootSlot,
|
|
229
245
|
input: InputSlot
|
|
230
246
|
},
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
235
|
-
children: [label, "\u2009", '*']
|
|
236
|
-
})) : label,
|
|
247
|
+
slotProps: slotProps,
|
|
248
|
+
renderSuffix: state => /*#__PURE__*/(0, _jsxRuntime.jsx)(NotchedSlot, {
|
|
249
|
+
...notchedProps,
|
|
237
250
|
notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)
|
|
238
251
|
}),
|
|
239
252
|
fullWidth: fullWidth,
|
|
@@ -384,15 +397,22 @@ process.env.NODE_ENV !== "production" ? OutlinedInput.propTypes /* remove-propty
|
|
|
384
397
|
* Number of rows to display when multiline option is set to true.
|
|
385
398
|
*/
|
|
386
399
|
rows: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
400
|
+
/**
|
|
401
|
+
* The props used for each slot inside.
|
|
402
|
+
* @default {}
|
|
403
|
+
*/
|
|
404
|
+
slotProps: _propTypes.default.shape({
|
|
405
|
+
input: _propTypes.default.object,
|
|
406
|
+
notchedOutline: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
407
|
+
root: _propTypes.default.object
|
|
408
|
+
}),
|
|
387
409
|
/**
|
|
388
410
|
* The components used for each slot inside.
|
|
389
|
-
*
|
|
390
|
-
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
391
|
-
*
|
|
392
411
|
* @default {}
|
|
393
412
|
*/
|
|
394
413
|
slots: _propTypes.default.shape({
|
|
395
414
|
input: _propTypes.default.elementType,
|
|
415
|
+
notchedOutline: _propTypes.default.elementType,
|
|
396
416
|
root: _propTypes.default.elementType
|
|
397
417
|
}),
|
|
398
418
|
/**
|
package/node/index.js
CHANGED
|
@@ -16,27 +16,27 @@ function ThemeProvider({
|
|
|
16
16
|
theme,
|
|
17
17
|
...props
|
|
18
18
|
}) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
// The example use case is the docs demo that uses ThemeProvider to customize the theme while the upper theme is using CSS variables.
|
|
30
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeProviderNoVars.default, {
|
|
31
|
-
theme: {
|
|
19
|
+
const noVarsTheme = React.useMemo(() => {
|
|
20
|
+
if (typeof theme === 'function') {
|
|
21
|
+
return theme;
|
|
22
|
+
}
|
|
23
|
+
const muiTheme = _identifier.default in theme ? theme[_identifier.default] : theme;
|
|
24
|
+
if (!('colorSchemes' in muiTheme)) {
|
|
25
|
+
if (!('vars' in muiTheme)) {
|
|
26
|
+
// For non-CSS variables themes, set `vars` to null to prevent theme inheritance from the upper theme.
|
|
27
|
+
// The example use case is the docs demo that uses ThemeProvider to customize the theme while the upper theme is using CSS variables.
|
|
28
|
+
return {
|
|
32
29
|
...theme,
|
|
33
30
|
vars: null
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
return theme;
|
|
37
34
|
}
|
|
35
|
+
return null;
|
|
36
|
+
}, [theme]);
|
|
37
|
+
if (noVarsTheme) {
|
|
38
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ThemeProviderNoVars.default, {
|
|
39
|
-
theme:
|
|
39
|
+
theme: noVarsTheme,
|
|
40
40
|
...props
|
|
41
41
|
});
|
|
42
42
|
}
|
package/node/version/index.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.version = exports.prerelease = exports.patch = exports.minor = exports.major = exports.default = void 0;
|
|
7
|
-
const version = exports.version = "6.4.
|
|
7
|
+
const version = exports.version = "6.4.12";
|
|
8
8
|
const major = exports.major = Number("6");
|
|
9
9
|
const minor = exports.minor = Number("4");
|
|
10
|
-
const patch = exports.patch = Number("
|
|
10
|
+
const patch = exports.patch = Number("12");
|
|
11
11
|
const prerelease = exports.prerelease = undefined;
|
|
12
12
|
var _default = exports.default = version;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.12",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Material UI is an open-source React component library that implements Google's Material Design. It's comprehensive and can be used in production out of the box.",
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
36
|
"react-is": "^19.0.0",
|
|
37
37
|
"react-transition-group": "^4.4.5",
|
|
38
|
-
"@mui/
|
|
39
|
-
"@mui/
|
|
38
|
+
"@mui/system": "^6.4.12",
|
|
39
|
+
"@mui/core-downloads-tracker": "^6.4.12",
|
|
40
40
|
"@mui/types": "~7.2.24",
|
|
41
41
|
"@mui/utils": "^6.4.9"
|
|
42
42
|
},
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
47
47
|
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
48
48
|
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
49
|
-
"@mui/material-pigment-css": "^6.4.
|
|
49
|
+
"@mui/material-pigment-css": "^6.4.12"
|
|
50
50
|
},
|
|
51
51
|
"peerDependenciesMeta": {
|
|
52
52
|
"@types/react": {
|
package/styles/ThemeProvider.js
CHANGED
|
@@ -9,27 +9,27 @@ export default function ThemeProvider({
|
|
|
9
9
|
theme,
|
|
10
10
|
...props
|
|
11
11
|
}) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
// The example use case is the docs demo that uses ThemeProvider to customize the theme while the upper theme is using CSS variables.
|
|
23
|
-
return /*#__PURE__*/_jsx(ThemeProviderNoVars, {
|
|
24
|
-
theme: {
|
|
12
|
+
const noVarsTheme = React.useMemo(() => {
|
|
13
|
+
if (typeof theme === 'function') {
|
|
14
|
+
return theme;
|
|
15
|
+
}
|
|
16
|
+
const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme;
|
|
17
|
+
if (!('colorSchemes' in muiTheme)) {
|
|
18
|
+
if (!('vars' in muiTheme)) {
|
|
19
|
+
// For non-CSS variables themes, set `vars` to null to prevent theme inheritance from the upper theme.
|
|
20
|
+
// The example use case is the docs demo that uses ThemeProvider to customize the theme while the upper theme is using CSS variables.
|
|
21
|
+
return {
|
|
25
22
|
...theme,
|
|
26
23
|
vars: null
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return theme;
|
|
30
27
|
}
|
|
28
|
+
return null;
|
|
29
|
+
}, [theme]);
|
|
30
|
+
if (noVarsTheme) {
|
|
31
31
|
return /*#__PURE__*/_jsx(ThemeProviderNoVars, {
|
|
32
|
-
theme:
|
|
32
|
+
theme: noVarsTheme,
|
|
33
33
|
...props
|
|
34
34
|
});
|
|
35
35
|
}
|
package/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.4.
|
|
1
|
+
export const version = "6.4.12";
|
|
2
2
|
export const major = Number("6");
|
|
3
3
|
export const minor = Number("4");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("12");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|