@mui/material 6.4.11 → 6.5.0
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/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
- package/CHANGELOG.md +66 -0
- package/CardActionArea/CardActionArea.d.ts +40 -3
- package/CardActionArea/CardActionArea.js +47 -8
- package/Menu/Menu.d.ts +1 -1
- package/NativeSelect/NativeSelectInput.js +6 -2
- package/OutlinedInput/NotchedOutline.js +2 -0
- package/OutlinedInput/OutlinedInput.d.ts +29 -2
- package/OutlinedInput/OutlinedInput.js +30 -10
- package/Radio/RadioButtonIcon.js +7 -2
- package/SwipeableDrawer/SwipeArea.js +1 -0
- package/index.js +1 -1
- package/internal/SwitchBase.js +4 -1
- package/modern/Badge/Badge.js +27 -20
- package/modern/BottomNavigationAction/BottomNavigationAction.js +53 -9
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
- package/modern/CardActionArea/CardActionArea.js +47 -8
- package/modern/NativeSelect/NativeSelectInput.js +6 -2
- package/modern/OutlinedInput/NotchedOutline.js +2 -0
- package/modern/OutlinedInput/OutlinedInput.js +30 -10
- package/modern/Radio/RadioButtonIcon.js +7 -2
- package/modern/SwipeableDrawer/SwipeArea.js +1 -0
- package/modern/index.js +1 -1
- package/modern/internal/SwitchBase.js +4 -1
- package/modern/styles/ThemeProvider.js +17 -17
- package/modern/styles/shouldSkipGeneratingVar.js +1 -1
- package/modern/version/index.js +3 -3
- package/node/Badge/Badge.js +27 -20
- package/node/BottomNavigationAction/BottomNavigationAction.js +53 -9
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +3 -1
- package/node/CardActionArea/CardActionArea.js +47 -8
- package/node/NativeSelect/NativeSelectInput.js +6 -2
- package/node/OutlinedInput/NotchedOutline.js +2 -0
- package/node/OutlinedInput/OutlinedInput.js +30 -10
- package/node/Radio/RadioButtonIcon.js +7 -2
- package/node/SwipeableDrawer/SwipeArea.js +1 -0
- package/node/index.js +1 -1
- package/node/internal/SwitchBase.js +4 -1
- package/node/styles/ThemeProvider.js +17 -17
- package/node/styles/shouldSkipGeneratingVar.js +1 -1
- package/node/version/index.js +3 -3
- package/package.json +6 -6
- package/styles/ThemeProvider.js +17 -17
- package/styles/createThemeNoVars.d.ts +1 -0
- package/styles/shouldSkipGeneratingVar.js +1 -1
- package/version/index.js +3 -3
package/node/Badge/Badge.js
CHANGED
|
@@ -12,7 +12,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
13
|
var _usePreviousProps = _interopRequireDefault(require("@mui/utils/usePreviousProps"));
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
|
-
var _useSlotProps = _interopRequireDefault(require("@mui/utils/useSlotProps"));
|
|
16
15
|
var _useBadge = _interopRequireDefault(require("./useBadge"));
|
|
17
16
|
var _zeroStyled = require("../zero-styled");
|
|
18
17
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
@@ -20,6 +19,7 @@ var _createSimplePaletteValueFilter = _interopRequireDefault(require("../utils/c
|
|
|
20
19
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
21
20
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
22
21
|
var _badgeClasses = _interopRequireWildcard(require("./badgeClasses"));
|
|
22
|
+
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
23
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
24
24
|
const RADIUS_STANDARD = 10;
|
|
25
25
|
const RADIUS_DOT = 4;
|
|
@@ -289,26 +289,34 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
|
289
289
|
const classes = useUtilityClasses(ownerState);
|
|
290
290
|
|
|
291
291
|
// support both `slots` and `components` for backward compatibility
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
292
|
+
const externalForwardedProps = {
|
|
293
|
+
slots: {
|
|
294
|
+
root: slots?.root ?? components.Root,
|
|
295
|
+
badge: slots?.badge ?? components.Badge
|
|
296
|
+
},
|
|
297
|
+
slotProps: {
|
|
298
|
+
root: slotProps?.root ?? componentsProps.root,
|
|
299
|
+
badge: slotProps?.badge ?? componentsProps.badge
|
|
300
|
+
}
|
|
301
|
+
};
|
|
302
|
+
const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
|
|
303
|
+
elementType: BadgeRoot,
|
|
304
|
+
externalForwardedProps: {
|
|
305
|
+
...externalForwardedProps,
|
|
306
|
+
...other
|
|
303
307
|
},
|
|
304
308
|
ownerState,
|
|
305
|
-
className: (0, _clsx.default)(
|
|
309
|
+
className: (0, _clsx.default)(classes.root, className),
|
|
310
|
+
ref,
|
|
311
|
+
additionalProps: {
|
|
312
|
+
as: component
|
|
313
|
+
}
|
|
306
314
|
});
|
|
307
|
-
const badgeProps = (0,
|
|
308
|
-
elementType:
|
|
309
|
-
|
|
315
|
+
const [BadgeSlot, badgeProps] = (0, _useSlot.default)('badge', {
|
|
316
|
+
elementType: BadgeBadge,
|
|
317
|
+
externalForwardedProps,
|
|
310
318
|
ownerState,
|
|
311
|
-
className:
|
|
319
|
+
className: classes.badge
|
|
312
320
|
});
|
|
313
321
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
|
|
314
322
|
...rootProps,
|
|
@@ -406,7 +414,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ =
|
|
|
406
414
|
*/
|
|
407
415
|
showZero: _propTypes.default.bool,
|
|
408
416
|
/**
|
|
409
|
-
* The props used for each slot inside
|
|
417
|
+
* The props used for each slot inside.
|
|
410
418
|
* @default {}
|
|
411
419
|
*/
|
|
412
420
|
slotProps: _propTypes.default.shape({
|
|
@@ -414,8 +422,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes /* remove-proptypes */ =
|
|
|
414
422
|
root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
415
423
|
}),
|
|
416
424
|
/**
|
|
417
|
-
* The components used for each slot inside
|
|
418
|
-
* Either a string to use a HTML element or a component.
|
|
425
|
+
* The components used for each slot inside.
|
|
419
426
|
* @default {}
|
|
420
427
|
*/
|
|
421
428
|
slots: _propTypes.default.shape({
|
|
@@ -17,6 +17,7 @@ var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
|
17
17
|
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
18
18
|
var _unsupportedProp = _interopRequireDefault(require("../utils/unsupportedProp"));
|
|
19
19
|
var _bottomNavigationActionClasses = _interopRequireWildcard(require("./bottomNavigationActionClasses"));
|
|
20
|
+
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
20
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
22
|
const useUtilityClasses = ownerState => {
|
|
22
23
|
const {
|
|
@@ -114,6 +115,8 @@ const BottomNavigationAction = /*#__PURE__*/React.forwardRef(function BottomNavi
|
|
|
114
115
|
selected,
|
|
115
116
|
showLabel,
|
|
116
117
|
value,
|
|
118
|
+
slots = {},
|
|
119
|
+
slotProps = {},
|
|
117
120
|
...other
|
|
118
121
|
} = props;
|
|
119
122
|
const ownerState = props;
|
|
@@ -126,16 +129,41 @@ const BottomNavigationAction = /*#__PURE__*/React.forwardRef(function BottomNavi
|
|
|
126
129
|
onClick(event);
|
|
127
130
|
}
|
|
128
131
|
};
|
|
129
|
-
|
|
130
|
-
|
|
132
|
+
const externalForwardedProps = {
|
|
133
|
+
slots,
|
|
134
|
+
slotProps
|
|
135
|
+
};
|
|
136
|
+
const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
|
|
137
|
+
elementType: BottomNavigationActionRoot,
|
|
138
|
+
externalForwardedProps: {
|
|
139
|
+
...externalForwardedProps,
|
|
140
|
+
...other
|
|
141
|
+
},
|
|
142
|
+
shouldForwardComponentProp: true,
|
|
143
|
+
ownerState,
|
|
144
|
+
ref,
|
|
131
145
|
className: (0, _clsx.default)(classes.root, className),
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
146
|
+
additionalProps: {
|
|
147
|
+
focusRipple: true
|
|
148
|
+
},
|
|
149
|
+
getSlotProps: handlers => ({
|
|
150
|
+
...handlers,
|
|
151
|
+
onClick: event => {
|
|
152
|
+
handlers.onClick?.(event);
|
|
153
|
+
handleChange(event);
|
|
154
|
+
}
|
|
155
|
+
})
|
|
156
|
+
});
|
|
157
|
+
const [LabelSlot, labelProps] = (0, _useSlot.default)('label', {
|
|
158
|
+
elementType: BottomNavigationActionLabel,
|
|
159
|
+
externalForwardedProps,
|
|
160
|
+
ownerState,
|
|
161
|
+
className: classes.label
|
|
162
|
+
});
|
|
163
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
|
|
164
|
+
...rootProps,
|
|
165
|
+
children: [icon, /*#__PURE__*/(0, _jsxRuntime.jsx)(LabelSlot, {
|
|
166
|
+
...labelProps,
|
|
139
167
|
children: label
|
|
140
168
|
})]
|
|
141
169
|
});
|
|
@@ -182,6 +210,22 @@ process.env.NODE_ENV !== "production" ? BottomNavigationAction.propTypes /* remo
|
|
|
182
210
|
* The prop defaults to the value (`false`) inherited from the parent BottomNavigation component.
|
|
183
211
|
*/
|
|
184
212
|
showLabel: _propTypes.default.bool,
|
|
213
|
+
/**
|
|
214
|
+
* The props used for each slot inside.
|
|
215
|
+
* @default {}
|
|
216
|
+
*/
|
|
217
|
+
slotProps: _propTypes.default.shape({
|
|
218
|
+
label: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
219
|
+
root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
220
|
+
}),
|
|
221
|
+
/**
|
|
222
|
+
* The components used for each slot inside.
|
|
223
|
+
* @default {}
|
|
224
|
+
*/
|
|
225
|
+
slots: _propTypes.default.shape({
|
|
226
|
+
label: _propTypes.default.elementType,
|
|
227
|
+
root: _propTypes.default.elementType
|
|
228
|
+
}),
|
|
185
229
|
/**
|
|
186
230
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
187
231
|
*/
|
|
@@ -15,7 +15,9 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
|
15
15
|
var _MoreHoriz = _interopRequireDefault(require("../internal/svg-icons/MoreHoriz"));
|
|
16
16
|
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
-
const BreadcrumbCollapsedButton = (0, _zeroStyled.styled)(_ButtonBase.default
|
|
18
|
+
const BreadcrumbCollapsedButton = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
19
|
+
name: 'MuiBreadcrumbCollapsed'
|
|
20
|
+
})((0, _memoTheme.default)(({
|
|
19
21
|
theme
|
|
20
22
|
}) => ({
|
|
21
23
|
display: 'flex',
|
|
@@ -16,6 +16,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
|
16
16
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
17
17
|
var _cardActionAreaClasses = _interopRequireWildcard(require("./cardActionAreaClasses"));
|
|
18
18
|
var _ButtonBase = _interopRequireDefault(require("../ButtonBase"));
|
|
19
|
+
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
21
|
const useUtilityClasses = ownerState => {
|
|
21
22
|
const {
|
|
@@ -79,19 +80,41 @@ const CardActionArea = /*#__PURE__*/React.forwardRef(function CardActionArea(inP
|
|
|
79
80
|
children,
|
|
80
81
|
className,
|
|
81
82
|
focusVisibleClassName,
|
|
83
|
+
slots = {},
|
|
84
|
+
slotProps = {},
|
|
82
85
|
...other
|
|
83
86
|
} = props;
|
|
84
87
|
const ownerState = props;
|
|
85
88
|
const classes = useUtilityClasses(ownerState);
|
|
86
|
-
|
|
89
|
+
const externalForwardedProps = {
|
|
90
|
+
slots,
|
|
91
|
+
slotProps
|
|
92
|
+
};
|
|
93
|
+
const [RootSlot, rootProps] = (0, _useSlot.default)('root', {
|
|
94
|
+
elementType: CardActionAreaRoot,
|
|
95
|
+
externalForwardedProps: {
|
|
96
|
+
...externalForwardedProps,
|
|
97
|
+
...other
|
|
98
|
+
},
|
|
99
|
+
shouldForwardComponentProp: true,
|
|
100
|
+
ownerState,
|
|
101
|
+
ref,
|
|
87
102
|
className: (0, _clsx.default)(classes.root, className),
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
103
|
+
additionalProps: {
|
|
104
|
+
focusVisibleClassName: (0, _clsx.default)(focusVisibleClassName, classes.focusVisible)
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
const [FocusHighlightSlot, focusHighlightProps] = (0, _useSlot.default)('focusHighlight', {
|
|
108
|
+
elementType: CardActionAreaFocusHighlight,
|
|
109
|
+
externalForwardedProps,
|
|
110
|
+
ownerState,
|
|
111
|
+
ref,
|
|
112
|
+
className: classes.focusHighlight
|
|
113
|
+
});
|
|
114
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, {
|
|
115
|
+
...rootProps,
|
|
116
|
+
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(FocusHighlightSlot, {
|
|
117
|
+
...focusHighlightProps
|
|
95
118
|
})]
|
|
96
119
|
});
|
|
97
120
|
});
|
|
@@ -116,6 +139,22 @@ process.env.NODE_ENV !== "production" ? CardActionArea.propTypes /* remove-propt
|
|
|
116
139
|
* @ignore
|
|
117
140
|
*/
|
|
118
141
|
focusVisibleClassName: _propTypes.default.string,
|
|
142
|
+
/**
|
|
143
|
+
* The props used for each slot inside.
|
|
144
|
+
* @default {}
|
|
145
|
+
*/
|
|
146
|
+
slotProps: _propTypes.default.shape({
|
|
147
|
+
focusHighlight: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object]),
|
|
148
|
+
root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
149
|
+
}),
|
|
150
|
+
/**
|
|
151
|
+
* The components used for each slot inside.
|
|
152
|
+
* @default {}
|
|
153
|
+
*/
|
|
154
|
+
slots: _propTypes.default.shape({
|
|
155
|
+
focusHighlight: _propTypes.default.elementType,
|
|
156
|
+
root: _propTypes.default.elementType
|
|
157
|
+
}),
|
|
119
158
|
/**
|
|
120
159
|
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
121
160
|
*/
|
|
@@ -32,7 +32,9 @@ const useUtilityClasses = ownerState => {
|
|
|
32
32
|
};
|
|
33
33
|
return (0, _composeClasses.default)(slots, _nativeSelectClasses.getNativeSelectUtilityClasses, classes);
|
|
34
34
|
};
|
|
35
|
-
const StyledSelectSelect = exports.StyledSelectSelect = (0, _zeroStyled.styled)('select'
|
|
35
|
+
const StyledSelectSelect = exports.StyledSelectSelect = (0, _zeroStyled.styled)('select', {
|
|
36
|
+
name: 'MuiNativeSelect'
|
|
37
|
+
})(({
|
|
36
38
|
theme
|
|
37
39
|
}) => ({
|
|
38
40
|
// Reset
|
|
@@ -106,7 +108,9 @@ const NativeSelectSelect = (0, _zeroStyled.styled)(StyledSelectSelect, {
|
|
|
106
108
|
}];
|
|
107
109
|
}
|
|
108
110
|
})({});
|
|
109
|
-
const StyledSelectIcon = exports.StyledSelectIcon = (0, _zeroStyled.styled)('svg'
|
|
111
|
+
const StyledSelectIcon = exports.StyledSelectIcon = (0, _zeroStyled.styled)('svg', {
|
|
112
|
+
name: 'MuiNativeSelect'
|
|
113
|
+
})(({
|
|
110
114
|
theme
|
|
111
115
|
}) => ({
|
|
112
116
|
// We use a position absolute over a flexbox in order to forward the pointer events
|
|
@@ -15,6 +15,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
|
15
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
16
|
var _span;
|
|
17
17
|
const NotchedOutlineRoot = (0, _zeroStyled.styled)('fieldset', {
|
|
18
|
+
name: 'MuiNotchedOutlined',
|
|
18
19
|
shouldForwardProp: _rootShouldForwardProp.default
|
|
19
20
|
})({
|
|
20
21
|
textAlign: 'left',
|
|
@@ -33,6 +34,7 @@ const NotchedOutlineRoot = (0, _zeroStyled.styled)('fieldset', {
|
|
|
33
34
|
minWidth: '0%'
|
|
34
35
|
});
|
|
35
36
|
const NotchedOutlineLegend = (0, _zeroStyled.styled)('legend', {
|
|
37
|
+
name: 'MuiNotchedOutlined',
|
|
36
38
|
shouldForwardProp: _rootShouldForwardProp.default
|
|
37
39
|
})((0, _memoTheme.default)(({
|
|
38
40
|
theme
|
|
@@ -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
|
/**
|
|
@@ -16,16 +16,21 @@ var _zeroStyled = require("../zero-styled");
|
|
|
16
16
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
18
|
const RadioButtonIconRoot = (0, _zeroStyled.styled)('span', {
|
|
19
|
+
name: 'MuiRadioButtonIcon',
|
|
19
20
|
shouldForwardProp: _rootShouldForwardProp.default
|
|
20
21
|
})({
|
|
21
22
|
position: 'relative',
|
|
22
23
|
display: 'flex'
|
|
23
24
|
});
|
|
24
|
-
const RadioButtonIconBackground = (0, _zeroStyled.styled)(_RadioButtonUnchecked.default
|
|
25
|
+
const RadioButtonIconBackground = (0, _zeroStyled.styled)(_RadioButtonUnchecked.default, {
|
|
26
|
+
name: 'MuiRadioButtonIcon'
|
|
27
|
+
})({
|
|
25
28
|
// Scale applied to prevent dot misalignment in Safari
|
|
26
29
|
transform: 'scale(1)'
|
|
27
30
|
});
|
|
28
|
-
const RadioButtonIconDot = (0, _zeroStyled.styled)(_RadioButtonChecked.default
|
|
31
|
+
const RadioButtonIconDot = (0, _zeroStyled.styled)(_RadioButtonChecked.default, {
|
|
32
|
+
name: 'MuiRadioButtonIcon'
|
|
33
|
+
})((0, _memoTheme.default)(({
|
|
29
34
|
theme
|
|
30
35
|
}) => ({
|
|
31
36
|
left: 0,
|
|
@@ -17,6 +17,7 @@ var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
|
17
17
|
var _Drawer = require("../Drawer/Drawer");
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
19
|
const SwipeAreaRoot = (0, _zeroStyled.styled)('div', {
|
|
20
|
+
name: 'MuiSwipeArea',
|
|
20
21
|
shouldForwardProp: _rootShouldForwardProp.default
|
|
21
22
|
})((0, _memoTheme.default)(({
|
|
22
23
|
theme
|
package/node/index.js
CHANGED
|
@@ -33,7 +33,9 @@ const useUtilityClasses = ownerState => {
|
|
|
33
33
|
};
|
|
34
34
|
return (0, _composeClasses.default)(slots, _switchBaseClasses.getSwitchBaseUtilityClass, classes);
|
|
35
35
|
};
|
|
36
|
-
const SwitchBaseRoot = (0, _zeroStyled.styled)(_ButtonBase.default
|
|
36
|
+
const SwitchBaseRoot = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
37
|
+
name: 'MuiSwitchBase'
|
|
38
|
+
})({
|
|
37
39
|
padding: 9,
|
|
38
40
|
borderRadius: '50%',
|
|
39
41
|
variants: [{
|
|
@@ -71,6 +73,7 @@ const SwitchBaseRoot = (0, _zeroStyled.styled)(_ButtonBase.default)({
|
|
|
71
73
|
}]
|
|
72
74
|
});
|
|
73
75
|
const SwitchBaseInput = (0, _zeroStyled.styled)('input', {
|
|
76
|
+
name: 'MuiSwitchBase',
|
|
74
77
|
shouldForwardProp: _rootShouldForwardProp.default
|
|
75
78
|
})({
|
|
76
79
|
cursor: 'inherit',
|
|
@@ -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
|
}
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = shouldSkipGeneratingVar;
|
|
7
7
|
function shouldSkipGeneratingVar(keys) {
|
|
8
|
-
return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
8
|
+
return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
9
9
|
// ends with sxConfig
|
|
10
10
|
keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);
|
|
11
11
|
}
|
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.
|
|
7
|
+
const version = exports.version = "6.5.0";
|
|
8
8
|
const major = exports.major = Number("6");
|
|
9
|
-
const minor = exports.minor = Number("
|
|
10
|
-
const patch = exports.patch = Number("
|
|
9
|
+
const minor = exports.minor = Number("5");
|
|
10
|
+
const patch = exports.patch = Number("0");
|
|
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.
|
|
3
|
+
"version": "6.5.0",
|
|
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,10 +35,10 @@
|
|
|
35
35
|
"prop-types": "^15.8.1",
|
|
36
36
|
"react-is": "^19.0.0",
|
|
37
37
|
"react-transition-group": "^4.4.5",
|
|
38
|
-
"@mui/core-downloads-tracker": "^6.
|
|
39
|
-
"@mui/
|
|
40
|
-
"@mui/
|
|
41
|
-
"@mui/
|
|
38
|
+
"@mui/core-downloads-tracker": "^6.5.0",
|
|
39
|
+
"@mui/utils": "^6.4.9",
|
|
40
|
+
"@mui/system": "^6.5.0",
|
|
41
|
+
"@mui/types": "~7.2.24"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@emotion/react": "^11.5.0",
|
|
@@ -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.
|
|
49
|
+
"@mui/material-pigment-css": "^6.5.0"
|
|
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
|
}
|
|
@@ -42,6 +42,7 @@ export interface ThemeOptions extends Omit<SystemThemeOptions, 'zIndex'>, CssVar
|
|
|
42
42
|
zIndex?: ZIndexOptions;
|
|
43
43
|
unstable_strictMode?: boolean;
|
|
44
44
|
unstable_sxConfig?: SxConfig;
|
|
45
|
+
modularCssLayers?: boolean | string;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
export interface BaseTheme extends SystemTheme {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default function shouldSkipGeneratingVar(keys) {
|
|
2
|
-
return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
2
|
+
return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||
|
|
3
3
|
// ends with sxConfig
|
|
4
4
|
keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);
|
|
5
5
|
}
|
package/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.
|
|
1
|
+
export const version = "6.5.0";
|
|
2
2
|
export const major = Number("6");
|
|
3
|
-
export const minor = Number("
|
|
4
|
-
export const patch = Number("
|
|
3
|
+
export const minor = Number("5");
|
|
4
|
+
export const patch = Number("0");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|