@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.
- package/Alert/Alert.js +53 -35
- package/Alert/alertClasses.d.ts +68 -12
- package/Alert/alertClasses.js +1 -1
- package/AlertTitle/AlertTitle.js +2 -2
- package/Avatar/Avatar.js +2 -2
- package/Button/Button.js +3 -3
- package/Button/buttonClasses.d.ts +113 -33
- package/Button/buttonClasses.js +1 -1
- package/CHANGELOG.md +194 -116
- package/Checkbox/Checkbox.d.ts +1 -1
- package/Chip/chipClasses.d.ts +78 -26
- package/README.md +1 -1
- package/Slider/Slider.d.ts +2 -4
- package/Slider/Slider.js +2 -4
- package/index.js +1 -1
- package/legacy/Alert/Alert.js +77 -34
- package/legacy/Alert/alertClasses.js +1 -1
- package/legacy/AlertTitle/AlertTitle.js +2 -2
- package/legacy/Avatar/Avatar.js +2 -2
- package/legacy/Button/Button.js +3 -3
- package/legacy/Button/buttonClasses.js +1 -1
- package/legacy/Slider/Slider.js +2 -4
- package/legacy/index.js +1 -1
- package/modern/Alert/Alert.js +53 -35
- package/modern/Alert/alertClasses.js +1 -1
- package/modern/AlertTitle/AlertTitle.js +2 -2
- package/modern/Avatar/Avatar.js +2 -2
- package/modern/Button/Button.js +3 -3
- package/modern/Button/buttonClasses.js +1 -1
- package/modern/Slider/Slider.js +2 -4
- package/modern/index.js +1 -1
- package/node/Alert/Alert.js +61 -43
- package/node/Alert/alertClasses.js +1 -1
- package/node/AlertTitle/AlertTitle.js +4 -4
- package/node/Avatar/Avatar.js +6 -6
- package/node/Button/Button.js +3 -3
- package/node/Button/buttonClasses.js +1 -1
- package/node/Slider/Slider.js +2 -4
- package/node/index.js +1 -1
- package/package.json +5 -5
- package/styles/variants.d.ts +7 -1
- package/umd/material-ui.development.js +2807 -2764
- package/umd/material-ui.production.min.js +2 -2
|
@@ -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 '../
|
|
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/modern/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 '../
|
|
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/modern/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
|
|
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,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;
|
package/modern/Slider/Slider.js
CHANGED
|
@@ -632,8 +632,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
632
632
|
/**
|
|
633
633
|
* The components used for each slot inside.
|
|
634
634
|
*
|
|
635
|
-
* This prop
|
|
636
|
-
* It's recommended to use the `slots` prop instead.
|
|
635
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
637
636
|
*
|
|
638
637
|
* @default {}
|
|
639
638
|
*/
|
|
@@ -651,8 +650,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
651
650
|
* The extra props for the slot components.
|
|
652
651
|
* You can override the existing props or add new ones.
|
|
653
652
|
*
|
|
654
|
-
* This prop
|
|
655
|
-
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
653
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
656
654
|
*
|
|
657
655
|
* @default {}
|
|
658
656
|
*/
|
package/modern/index.js
CHANGED
package/node/Alert/Alert.js
CHANGED
|
@@ -11,10 +11,9 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
|
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
14
|
+
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
|
+
var _colorManipulator = require("@mui/system/colorManipulator");
|
|
16
|
+
var _zeroStyled = require("../zero-styled");
|
|
18
17
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
19
18
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
20
19
|
var _Paper = _interopRequireDefault(require("../Paper"));
|
|
@@ -29,6 +28,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
29
28
|
const _excluded = ["action", "children", "className", "closeText", "color", "components", "componentsProps", "icon", "iconMapping", "onClose", "role", "severity", "slotProps", "slots", "variant"];
|
|
30
29
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
31
30
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
31
|
+
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiAlert');
|
|
32
32
|
const useUtilityClasses = ownerState => {
|
|
33
33
|
const {
|
|
34
34
|
variant,
|
|
@@ -37,14 +37,14 @@ const useUtilityClasses = ownerState => {
|
|
|
37
37
|
classes
|
|
38
38
|
} = ownerState;
|
|
39
39
|
const slots = {
|
|
40
|
-
root: ['root', `${variant}${(0, _capitalize.default)(color || severity)}`, `${variant}`],
|
|
40
|
+
root: ['root', `color${(0, _capitalize.default)(color || severity)}`, `${variant}${(0, _capitalize.default)(color || severity)}`, `${variant}`],
|
|
41
41
|
icon: ['icon'],
|
|
42
42
|
message: ['message'],
|
|
43
43
|
action: ['action']
|
|
44
44
|
};
|
|
45
|
-
return (0,
|
|
45
|
+
return (0, _composeClasses.default)(slots, _alertClasses.getAlertUtilityClass, classes);
|
|
46
46
|
};
|
|
47
|
-
const AlertRoot = (0,
|
|
47
|
+
const AlertRoot = (0, _zeroStyled.styled)(_Paper.default, {
|
|
48
48
|
name: 'MuiAlert',
|
|
49
49
|
slot: 'Root',
|
|
50
50
|
overridesResolver: (props, styles) => {
|
|
@@ -54,43 +54,60 @@ const AlertRoot = (0, _styled.default)(_Paper.default, {
|
|
|
54
54
|
return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${(0, _capitalize.default)(ownerState.color || ownerState.severity)}`]];
|
|
55
55
|
}
|
|
56
56
|
})(({
|
|
57
|
-
theme
|
|
58
|
-
ownerState
|
|
57
|
+
theme
|
|
59
58
|
}) => {
|
|
60
|
-
const getColor = theme.palette.mode === 'light' ?
|
|
61
|
-
const getBackgroundColor = theme.palette.mode === 'light' ?
|
|
62
|
-
const color = ownerState.color || ownerState.severity;
|
|
59
|
+
const getColor = theme.palette.mode === 'light' ? _colorManipulator.darken : _colorManipulator.lighten;
|
|
60
|
+
const getBackgroundColor = theme.palette.mode === 'light' ? _colorManipulator.lighten : _colorManipulator.darken;
|
|
63
61
|
return (0, _extends2.default)({}, theme.typography.body2, {
|
|
64
62
|
backgroundColor: 'transparent',
|
|
65
63
|
display: 'flex',
|
|
66
|
-
padding: '6px 16px'
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
64
|
+
padding: '6px 16px',
|
|
65
|
+
variants: [...Object.entries(theme.palette).filter(([, value]) => value.main && value.light).map(([color]) => ({
|
|
66
|
+
props: {
|
|
67
|
+
colorSeverity: color,
|
|
68
|
+
variant: 'standard'
|
|
69
|
+
},
|
|
70
|
+
style: {
|
|
71
|
+
color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
|
|
72
|
+
backgroundColor: theme.vars ? theme.vars.palette.Alert[`${color}StandardBg`] : getBackgroundColor(theme.palette[color].light, 0.9),
|
|
73
|
+
[`& .${_alertClasses.default.icon}`]: theme.vars ? {
|
|
74
|
+
color: theme.vars.palette.Alert[`${color}IconColor`]
|
|
75
|
+
} : {
|
|
76
|
+
color: theme.palette[color].main
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
})), ...Object.entries(theme.palette).filter(([, value]) => value.main && value.light).map(([color]) => ({
|
|
80
|
+
props: {
|
|
81
|
+
colorSeverity: color,
|
|
82
|
+
variant: 'outlined'
|
|
83
|
+
},
|
|
84
|
+
style: {
|
|
85
|
+
color: theme.vars ? theme.vars.palette.Alert[`${color}Color`] : getColor(theme.palette[color].light, 0.6),
|
|
86
|
+
border: `1px solid ${(theme.vars || theme).palette[color].light}`,
|
|
87
|
+
[`& .${_alertClasses.default.icon}`]: theme.vars ? {
|
|
88
|
+
color: theme.vars.palette.Alert[`${color}IconColor`]
|
|
89
|
+
} : {
|
|
90
|
+
color: theme.palette[color].main
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
})), ...Object.entries(theme.palette).filter(([, value]) => value.main && value.dark).map(([color]) => ({
|
|
94
|
+
props: {
|
|
95
|
+
colorSeverity: color,
|
|
96
|
+
variant: 'filled'
|
|
97
|
+
},
|
|
98
|
+
style: (0, _extends2.default)({
|
|
99
|
+
fontWeight: theme.typography.fontWeightMedium
|
|
100
|
+
}, theme.vars ? {
|
|
101
|
+
color: theme.vars.palette.Alert[`${color}FilledColor`],
|
|
102
|
+
backgroundColor: theme.vars.palette.Alert[`${color}FilledBg`]
|
|
103
|
+
} : {
|
|
104
|
+
backgroundColor: theme.palette.mode === 'dark' ? theme.palette[color].dark : theme.palette[color].main,
|
|
105
|
+
color: theme.palette.getContrastText(theme.palette[color].main)
|
|
106
|
+
})
|
|
107
|
+
}))]
|
|
108
|
+
});
|
|
92
109
|
});
|
|
93
|
-
const AlertIcon = (0,
|
|
110
|
+
const AlertIcon = (0, _zeroStyled.styled)('div', {
|
|
94
111
|
name: 'MuiAlert',
|
|
95
112
|
slot: 'Icon',
|
|
96
113
|
overridesResolver: (props, styles) => styles.icon
|
|
@@ -101,7 +118,7 @@ const AlertIcon = (0, _styled.default)('div', {
|
|
|
101
118
|
fontSize: 22,
|
|
102
119
|
opacity: 0.9
|
|
103
120
|
});
|
|
104
|
-
const AlertMessage = (0,
|
|
121
|
+
const AlertMessage = (0, _zeroStyled.styled)('div', {
|
|
105
122
|
name: 'MuiAlert',
|
|
106
123
|
slot: 'Message',
|
|
107
124
|
overridesResolver: (props, styles) => styles.message
|
|
@@ -110,7 +127,7 @@ const AlertMessage = (0, _styled.default)('div', {
|
|
|
110
127
|
minWidth: 0,
|
|
111
128
|
overflow: 'auto'
|
|
112
129
|
});
|
|
113
|
-
const AlertAction = (0,
|
|
130
|
+
const AlertAction = (0, _zeroStyled.styled)('div', {
|
|
114
131
|
name: 'MuiAlert',
|
|
115
132
|
slot: 'Action',
|
|
116
133
|
overridesResolver: (props, styles) => styles.action
|
|
@@ -136,7 +153,7 @@ const defaultIconMapping = {
|
|
|
136
153
|
})
|
|
137
154
|
};
|
|
138
155
|
const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
139
|
-
const props = (
|
|
156
|
+
const props = useThemeProps({
|
|
140
157
|
props: inProps,
|
|
141
158
|
name: 'MuiAlert'
|
|
142
159
|
});
|
|
@@ -161,7 +178,8 @@ const Alert = /*#__PURE__*/React.forwardRef(function Alert(inProps, ref) {
|
|
|
161
178
|
const ownerState = (0, _extends2.default)({}, props, {
|
|
162
179
|
color,
|
|
163
180
|
severity,
|
|
164
|
-
variant
|
|
181
|
+
variant,
|
|
182
|
+
colorSeverity: color || severity
|
|
165
183
|
});
|
|
166
184
|
const classes = useUtilityClasses(ownerState);
|
|
167
185
|
const externalForwardedProps = {
|
|
@@ -11,5 +11,5 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
|
|
|
11
11
|
function getAlertUtilityClass(slot) {
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiAlert', slot);
|
|
13
13
|
}
|
|
14
|
-
const alertClasses = (0, _generateUtilityClasses.default)('MuiAlert', ['root', 'action', 'icon', 'message', 'filled', 'filledSuccess', 'filledInfo', 'filledWarning', 'filledError', 'outlined', 'outlinedSuccess', 'outlinedInfo', 'outlinedWarning', 'outlinedError', 'standard', 'standardSuccess', 'standardInfo', 'standardWarning', 'standardError']);
|
|
14
|
+
const alertClasses = (0, _generateUtilityClasses.default)('MuiAlert', ['root', 'action', 'icon', 'message', 'filled', 'colorSuccess', 'colorInfo', 'colorWarning', 'colorError', 'filledSuccess', 'filledInfo', 'filledWarning', 'filledError', 'outlined', 'outlinedSuccess', 'outlinedInfo', 'outlinedWarning', 'outlinedError', 'standard', 'standardSuccess', 'standardInfo', 'standardWarning', 'standardError']);
|
|
15
15
|
var _default = exports.default = alertClasses;
|
|
@@ -12,14 +12,14 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
|
-
var
|
|
16
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
15
|
+
var _zeroStyled = require("../zero-styled");
|
|
17
16
|
var _Typography = _interopRequireDefault(require("../Typography"));
|
|
18
17
|
var _alertTitleClasses = require("./alertTitleClasses");
|
|
19
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
19
|
const _excluded = ["className"];
|
|
21
20
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
22
21
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
22
|
+
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiAlertTitle');
|
|
23
23
|
const useUtilityClasses = ownerState => {
|
|
24
24
|
const {
|
|
25
25
|
classes
|
|
@@ -29,7 +29,7 @@ const useUtilityClasses = ownerState => {
|
|
|
29
29
|
};
|
|
30
30
|
return (0, _composeClasses.default)(slots, _alertTitleClasses.getAlertTitleUtilityClass, classes);
|
|
31
31
|
};
|
|
32
|
-
const AlertTitleRoot = (0,
|
|
32
|
+
const AlertTitleRoot = (0, _zeroStyled.styled)(_Typography.default, {
|
|
33
33
|
name: 'MuiAlertTitle',
|
|
34
34
|
slot: 'Root',
|
|
35
35
|
overridesResolver: (props, styles) => styles.root
|
|
@@ -42,7 +42,7 @@ const AlertTitleRoot = (0, _styled.default)(_Typography.default, {
|
|
|
42
42
|
};
|
|
43
43
|
});
|
|
44
44
|
const AlertTitle = /*#__PURE__*/React.forwardRef(function AlertTitle(inProps, ref) {
|
|
45
|
-
const props = (
|
|
45
|
+
const props = useThemeProps({
|
|
46
46
|
props: inProps,
|
|
47
47
|
name: 'MuiAlertTitle'
|
|
48
48
|
});
|
package/node/Avatar/Avatar.js
CHANGED
|
@@ -12,8 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
|
-
var
|
|
16
|
-
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
15
|
+
var _zeroStyled = require("../zero-styled");
|
|
17
16
|
var _Person = _interopRequireDefault(require("../internal/svg-icons/Person"));
|
|
18
17
|
var _avatarClasses = require("./avatarClasses");
|
|
19
18
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
@@ -21,6 +20,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
21
20
|
const _excluded = ["alt", "children", "className", "component", "slots", "slotProps", "imgProps", "sizes", "src", "srcSet", "variant"];
|
|
22
21
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
23
22
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
23
|
+
const useThemeProps = (0, _zeroStyled.createUseThemeProps)('MuiAvatar');
|
|
24
24
|
const useUtilityClasses = ownerState => {
|
|
25
25
|
const {
|
|
26
26
|
classes,
|
|
@@ -34,7 +34,7 @@ const useUtilityClasses = ownerState => {
|
|
|
34
34
|
};
|
|
35
35
|
return (0, _composeClasses.default)(slots, _avatarClasses.getAvatarUtilityClass, classes);
|
|
36
36
|
};
|
|
37
|
-
const AvatarRoot = (0,
|
|
37
|
+
const AvatarRoot = (0, _zeroStyled.styled)('div', {
|
|
38
38
|
name: 'MuiAvatar',
|
|
39
39
|
slot: 'Root',
|
|
40
40
|
overridesResolver: (props, styles) => {
|
|
@@ -88,7 +88,7 @@ const AvatarRoot = (0, _styled.default)('div', {
|
|
|
88
88
|
})))
|
|
89
89
|
}]
|
|
90
90
|
}));
|
|
91
|
-
const AvatarImg = (0,
|
|
91
|
+
const AvatarImg = (0, _zeroStyled.styled)('img', {
|
|
92
92
|
name: 'MuiAvatar',
|
|
93
93
|
slot: 'Img',
|
|
94
94
|
overridesResolver: (props, styles) => styles.img
|
|
@@ -103,7 +103,7 @@ const AvatarImg = (0, _styled.default)('img', {
|
|
|
103
103
|
// Hide the image broken icon, only works on Chrome.
|
|
104
104
|
textIndent: 10000
|
|
105
105
|
});
|
|
106
|
-
const AvatarFallback = (0,
|
|
106
|
+
const AvatarFallback = (0, _zeroStyled.styled)(_Person.default, {
|
|
107
107
|
name: 'MuiAvatar',
|
|
108
108
|
slot: 'Fallback',
|
|
109
109
|
overridesResolver: (props, styles) => styles.fallback
|
|
@@ -150,7 +150,7 @@ function useLoaded({
|
|
|
150
150
|
return loaded;
|
|
151
151
|
}
|
|
152
152
|
const Avatar = /*#__PURE__*/React.forwardRef(function Avatar(inProps, ref) {
|
|
153
|
-
const props = (
|
|
153
|
+
const props = useThemeProps({
|
|
154
154
|
props: inProps,
|
|
155
155
|
name: 'MuiAvatar'
|
|
156
156
|
});
|
package/node/Button/Button.js
CHANGED
|
@@ -35,10 +35,10 @@ const useUtilityClasses = ownerState => {
|
|
|
35
35
|
classes
|
|
36
36
|
} = ownerState;
|
|
37
37
|
const slots = {
|
|
38
|
-
root: ['root', variant, `${variant}${(0, _capitalize.default)(color)}`, `size${(0, _capitalize.default)(size)}`, `${variant}Size${(0, _capitalize.default)(size)}`, color
|
|
38
|
+
root: ['root', variant, `${variant}${(0, _capitalize.default)(color)}`, `size${(0, _capitalize.default)(size)}`, `${variant}Size${(0, _capitalize.default)(size)}`, `color${(0, _capitalize.default)(color)}`, disableElevation && 'disableElevation', fullWidth && 'fullWidth'],
|
|
39
39
|
label: ['label'],
|
|
40
|
-
startIcon: ['startIcon', `iconSize${(0, _capitalize.default)(size)}`],
|
|
41
|
-
endIcon: ['endIcon', `iconSize${(0, _capitalize.default)(size)}`]
|
|
40
|
+
startIcon: ['icon', 'startIcon', `iconSize${(0, _capitalize.default)(size)}`],
|
|
41
|
+
endIcon: ['icon', 'endIcon', `iconSize${(0, _capitalize.default)(size)}`]
|
|
42
42
|
};
|
|
43
43
|
const composedClasses = (0, _composeClasses.default)(slots, _buttonClasses.getButtonUtilityClass, classes);
|
|
44
44
|
return (0, _extends2.default)({}, classes, composedClasses);
|
|
@@ -11,5 +11,5 @@ var _generateUtilityClass = _interopRequireDefault(require("@mui/utils/generateU
|
|
|
11
11
|
function getButtonUtilityClass(slot) {
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiButton', slot);
|
|
13
13
|
}
|
|
14
|
-
const buttonClasses = (0, _generateUtilityClasses.default)('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']);
|
|
14
|
+
const buttonClasses = (0, _generateUtilityClasses.default)('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']);
|
|
15
15
|
var _default = exports.default = buttonClasses;
|
package/node/Slider/Slider.js
CHANGED
|
@@ -640,8 +640,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
640
640
|
/**
|
|
641
641
|
* The components used for each slot inside.
|
|
642
642
|
*
|
|
643
|
-
* This prop
|
|
644
|
-
* It's recommended to use the `slots` prop instead.
|
|
643
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
645
644
|
*
|
|
646
645
|
* @default {}
|
|
647
646
|
*/
|
|
@@ -659,8 +658,7 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
659
658
|
* The extra props for the slot components.
|
|
660
659
|
* You can override the existing props or add new ones.
|
|
661
660
|
*
|
|
662
|
-
* This prop
|
|
663
|
-
* It's recommended to use the `slotProps` prop instead, as `componentsProps` will be deprecated in the future.
|
|
661
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/).
|
|
664
662
|
*
|
|
665
663
|
* @default {}
|
|
666
664
|
*/
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.15.
|
|
3
|
+
"version": "5.15.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.",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"prop-types": "^15.8.1",
|
|
35
35
|
"react-is": "^18.2.0",
|
|
36
36
|
"react-transition-group": "^4.4.5",
|
|
37
|
-
"@mui/base": "5.0.0-beta.
|
|
37
|
+
"@mui/base": "5.0.0-beta.38",
|
|
38
38
|
"@mui/types": "^7.2.13",
|
|
39
|
-
"@mui/
|
|
40
|
-
"@mui/
|
|
41
|
-
"@mui/core-downloads-tracker": "^5.15.
|
|
39
|
+
"@mui/system": "^5.15.12",
|
|
40
|
+
"@mui/utils": "^5.15.12",
|
|
41
|
+
"@mui/core-downloads-tracker": "^5.15.12"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@emotion/react": "^11.5.0",
|
package/styles/variants.d.ts
CHANGED
|
@@ -3,7 +3,13 @@ import { ComponentsPropsList } from './props';
|
|
|
3
3
|
|
|
4
4
|
export type ComponentsVariants<Theme = unknown> = {
|
|
5
5
|
[Name in keyof ComponentsPropsList]?: Array<{
|
|
6
|
-
props:
|
|
6
|
+
props:
|
|
7
|
+
| Partial<ComponentsPropsList[Name]>
|
|
8
|
+
| ((
|
|
9
|
+
props: Partial<ComponentsPropsList[Name]> & {
|
|
10
|
+
ownerState: Partial<ComponentsPropsList[Name]>;
|
|
11
|
+
},
|
|
12
|
+
) => boolean);
|
|
7
13
|
style: Interpolation<{ theme: Theme }>;
|
|
8
14
|
}>;
|
|
9
15
|
};
|