@mui/material 5.14.6 → 5.14.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +2 -2
- package/AccordionSummary/AccordionSummary.d.ts +22 -20
- package/AppBar/AppBar.d.ts +33 -31
- package/Avatar/Avatar.d.ts +49 -50
- package/Backdrop/Backdrop.d.ts +87 -85
- package/Badge/Badge.d.ts +2 -2
- package/BottomNavigation/BottomNavigation.d.ts +35 -33
- package/BottomNavigationAction/BottomNavigationAction.d.ts +39 -37
- package/Breadcrumbs/Breadcrumbs.d.ts +69 -67
- package/Button/Button.d.ts +72 -73
- package/ButtonBase/ButtonBase.d.ts +83 -81
- package/ButtonGroup/ButtonGroup.d.ts +72 -70
- package/CHANGELOG.md +136 -2
- package/Card/Card.d.ts +19 -18
- package/CardActionArea/CardActionArea.d.ts +15 -13
- package/CardContent/CardContent.d.ts +18 -16
- package/CardHeader/CardHeader.d.ts +77 -67
- package/CardMedia/CardMedia.d.ts +30 -28
- package/Chip/Chip.d.ts +84 -82
- package/CircularProgress/CircularProgress.d.ts +1 -1
- package/CircularProgress/CircularProgress.js +1 -1
- package/Container/Container.d.ts +35 -33
- package/DialogContentText/DialogContentText.d.ts +14 -12
- package/DialogTitle/DialogTitle.d.ts +18 -16
- package/Divider/Divider.d.ts +49 -50
- package/Fab/Fab.d.ts +59 -56
- package/FormControl/FormControl.d.ts +74 -72
- package/FormHelperText/FormHelperText.d.ts +52 -50
- package/FormLabel/FormLabel.d.ts +7 -4
- package/Grid/Grid.d.ts +69 -68
- package/Hidden/Hidden.d.ts +10 -10
- package/Icon/Icon.d.ts +50 -48
- package/IconButton/IconButton.d.ts +52 -50
- package/ImageList/ImageList.d.ts +41 -39
- package/ImageListItem/ImageListItem.d.ts +28 -26
- package/ImageListItem/ImageListItem.js +2 -1
- package/InputAdornment/InputAdornment.d.ts +39 -37
- package/InputBase/InputBase.js +1 -1
- package/InputLabel/InputLabel.d.ts +58 -56
- package/InputLabel/InputLabel.js +2 -1
- package/Link/Link.d.ts +37 -39
- package/List/List.d.ts +34 -35
- package/ListItem/ListItem.d.ts +53 -49
- package/ListItemButton/ListItemButton.d.ts +9 -3
- package/ListSubheader/ListSubheader.d.ts +38 -36
- package/MenuItem/MenuItem.d.ts +47 -44
- package/MenuList/MenuList.d.ts +37 -35
- package/Modal/Modal.d.ts +172 -178
- package/PaginationItem/PaginationItem.d.ts +85 -83
- package/Paper/Paper.d.ts +2 -2
- package/Popover/Popover.d.ts +2 -1
- package/Popover/Popover.js +20 -6
- package/Radio/Radio.js +3 -2
- package/Radio/radioClasses.d.ts +2 -0
- package/Radio/radioClasses.js +1 -1
- package/ScopedCssBaseline/ScopedCssBaseline.d.ts +25 -23
- package/Select/SelectInput.js +9 -5
- package/Skeleton/Skeleton.d.ts +42 -40
- package/Slider/Slider.d.ts +249 -247
- package/Snackbar/Snackbar.d.ts +4 -4
- package/Snackbar/Snackbar.js +4 -4
- package/Stack/Stack.d.ts +39 -38
- package/Step/Step.d.ts +46 -44
- package/StepButton/StepButton.d.ts +27 -25
- package/Stepper/Stepper.d.ts +45 -44
- package/SvgIcon/SvgIcon.d.ts +77 -75
- package/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/Tab/Tab.d.ts +52 -50
- package/TabScrollButton/TabScrollButton.d.ts +3 -2
- package/Table/Table.d.ts +35 -33
- package/TableBody/TableBody.d.ts +18 -16
- package/TableContainer/TableContainer.d.ts +18 -16
- package/TableFooter/TableFooter.d.ts +18 -16
- package/TableHead/TableHead.d.ts +18 -16
- package/TablePagination/TablePagination.d.ts +113 -112
- package/TableRow/TableRow.d.ts +28 -26
- package/TableSortLabel/TableSortLabel.d.ts +40 -36
- package/Tabs/Tabs.d.ts +153 -150
- package/ToggleButton/ToggleButton.d.ts +72 -70
- package/Toolbar/Toolbar.d.ts +29 -27
- package/Typography/Typography.d.ts +2 -2
- package/index.js +1 -1
- package/legacy/CircularProgress/CircularProgress.js +1 -1
- package/legacy/ImageListItem/ImageListItem.js +2 -1
- package/legacy/InputBase/InputBase.js +1 -1
- package/legacy/InputLabel/InputLabel.js +2 -1
- package/legacy/Popover/Popover.js +22 -5
- package/legacy/Radio/Radio.js +3 -2
- package/legacy/Radio/radioClasses.js +1 -1
- package/legacy/Select/SelectInput.js +9 -5
- package/legacy/Snackbar/Snackbar.js +4 -4
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/legacy/index.js +1 -1
- package/modern/CircularProgress/CircularProgress.js +1 -1
- package/modern/ImageListItem/ImageListItem.js +2 -1
- package/modern/InputBase/InputBase.js +1 -1
- package/modern/InputLabel/InputLabel.js +2 -1
- package/modern/Popover/Popover.js +20 -6
- package/modern/Radio/Radio.js +3 -2
- package/modern/Radio/radioClasses.js +1 -1
- package/modern/Select/SelectInput.js +8 -5
- package/modern/Snackbar/Snackbar.js +4 -4
- package/modern/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/modern/index.js +1 -1
- package/node/CircularProgress/CircularProgress.js +1 -1
- package/node/ImageListItem/ImageListItem.js +2 -1
- package/node/InputBase/InputBase.js +1 -1
- package/node/InputLabel/InputLabel.js +2 -1
- package/node/Popover/Popover.js +20 -6
- package/node/Radio/Radio.js +3 -2
- package/node/Radio/radioClasses.js +1 -1
- package/node/Select/SelectInput.js +9 -5
- package/node/Snackbar/Snackbar.js +4 -4
- package/node/SwipeableDrawer/SwipeableDrawer.js +4 -4
- package/node/index.js +1 -1
- package/package.json +5 -5
- package/umd/material-ui.development.js +75 -34
- package/umd/material-ui.production.min.js +7 -7
|
@@ -123,7 +123,9 @@ var Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
123
123
|
_props$TransitionProp2 = _props$TransitionProp === void 0 ? {} : _props$TransitionProp,
|
|
124
124
|
onEntering = _props$TransitionProp2.onEntering,
|
|
125
125
|
TransitionProps = _objectWithoutProperties(_props$TransitionProp2, ["onEntering"]),
|
|
126
|
-
|
|
126
|
+
_props$disableScrollL = props.disableScrollLock,
|
|
127
|
+
disableScrollLock = _props$disableScrollL === void 0 ? false : _props$disableScrollL,
|
|
128
|
+
other = _objectWithoutProperties(props, ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps", "disableScrollLock"]);
|
|
127
129
|
var externalPaperSlotProps = (_slotProps$paper = slotProps == null ? void 0 : slotProps.paper) != null ? _slotProps$paper : PaperPropsProp;
|
|
128
130
|
var paperRef = React.useRef();
|
|
129
131
|
var handlePaperRef = useForkRef(paperRef, externalPaperSlotProps.ref);
|
|
@@ -208,11 +210,11 @@ var Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
208
210
|
var widthThreshold = containerWindow.innerWidth - marginThreshold;
|
|
209
211
|
|
|
210
212
|
// Check if the vertical axis needs shifting
|
|
211
|
-
if (top < marginThreshold) {
|
|
213
|
+
if (marginThreshold !== null && top < marginThreshold) {
|
|
212
214
|
var diff = top - marginThreshold;
|
|
213
215
|
top -= diff;
|
|
214
216
|
elemTransformOrigin.vertical += diff;
|
|
215
|
-
} else if (bottom > heightThreshold) {
|
|
217
|
+
} else if (marginThreshold !== null && bottom > heightThreshold) {
|
|
216
218
|
var _diff = bottom - heightThreshold;
|
|
217
219
|
top -= _diff;
|
|
218
220
|
elemTransformOrigin.vertical += _diff;
|
|
@@ -224,7 +226,7 @@ var Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
224
226
|
}
|
|
225
227
|
|
|
226
228
|
// Check if the horizontal axis needs shifting
|
|
227
|
-
if (left < marginThreshold) {
|
|
229
|
+
if (marginThreshold !== null && left < marginThreshold) {
|
|
228
230
|
var _diff2 = left - marginThreshold;
|
|
229
231
|
left -= _diff2;
|
|
230
232
|
elemTransformOrigin.horizontal += _diff2;
|
|
@@ -257,6 +259,14 @@ var Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
257
259
|
element.style.transformOrigin = positioning.transformOrigin;
|
|
258
260
|
setIsPositioned(true);
|
|
259
261
|
}, [getPositioningStyle]);
|
|
262
|
+
React.useEffect(function () {
|
|
263
|
+
if (disableScrollLock) {
|
|
264
|
+
window.addEventListener('scroll', setPositioningStyles);
|
|
265
|
+
}
|
|
266
|
+
return function () {
|
|
267
|
+
return window.removeEventListener('scroll', setPositioningStyles);
|
|
268
|
+
};
|
|
269
|
+
}, [anchorEl, disableScrollLock, setPositioningStyles]);
|
|
260
270
|
var handleEntering = function handleEntering(element, isAppearing) {
|
|
261
271
|
if (onEntering) {
|
|
262
272
|
onEntering(element, isAppearing);
|
|
@@ -337,7 +347,8 @@ var Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
337
347
|
rootSlotPropsProp = _useSlotProps.slotProps,
|
|
338
348
|
rootProps = _objectWithoutProperties(_useSlotProps, ["slotProps"]);
|
|
339
349
|
return /*#__PURE__*/_jsx(RootSlot, _extends({}, rootProps, !isHostComponent(RootSlot) && {
|
|
340
|
-
slotProps: rootSlotPropsProp
|
|
350
|
+
slotProps: rootSlotPropsProp,
|
|
351
|
+
disableScrollLock: disableScrollLock
|
|
341
352
|
}, {
|
|
342
353
|
children: /*#__PURE__*/_jsx(TransitionComponent, _extends({
|
|
343
354
|
appear: true,
|
|
@@ -432,6 +443,11 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
|
|
|
432
443
|
* so it's simply `document.body` most of the time.
|
|
433
444
|
*/
|
|
434
445
|
container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),
|
|
446
|
+
/**
|
|
447
|
+
* Disable the scroll lock behavior.
|
|
448
|
+
* @default false
|
|
449
|
+
*/
|
|
450
|
+
disableScrollLock: PropTypes.bool,
|
|
435
451
|
/**
|
|
436
452
|
* The elevation of the popover.
|
|
437
453
|
* @default 8
|
|
@@ -439,6 +455,7 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
|
|
|
439
455
|
elevation: integerPropType,
|
|
440
456
|
/**
|
|
441
457
|
* Specifies how close to the edge of the window the popover can appear.
|
|
458
|
+
* If null, the popover will not be constrained by the window.
|
|
442
459
|
* @default 16
|
|
443
460
|
*/
|
|
444
461
|
marginThreshold: PropTypes.number,
|
package/legacy/Radio/Radio.js
CHANGED
|
@@ -21,9 +21,10 @@ import styled, { rootShouldForwardProp } from '../styles/styled';
|
|
|
21
21
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
22
|
var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
23
23
|
var classes = ownerState.classes,
|
|
24
|
-
color = ownerState.color
|
|
24
|
+
color = ownerState.color,
|
|
25
|
+
size = ownerState.size;
|
|
25
26
|
var slots = {
|
|
26
|
-
root: ['root', "color".concat(capitalize(color))]
|
|
27
|
+
root: ['root', "color".concat(capitalize(color)), size !== 'medium' && "size".concat(capitalize(size))]
|
|
27
28
|
};
|
|
28
29
|
return _extends({}, classes, composeClasses(slots, getRadioUtilityClass, classes));
|
|
29
30
|
};
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getRadioUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiRadio', slot);
|
|
5
5
|
}
|
|
6
|
-
var radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary']);
|
|
6
|
+
var radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);
|
|
7
7
|
export default radioClasses;
|
|
@@ -97,6 +97,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
97
97
|
* @ignore - internal component.
|
|
98
98
|
*/
|
|
99
99
|
var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref) {
|
|
100
|
+
var _MenuProps$slotProps;
|
|
100
101
|
var ariaDescribedby = props['aria-describedby'],
|
|
101
102
|
ariaLabel = props['aria-label'],
|
|
102
103
|
autoFocus = props.autoFocus,
|
|
@@ -443,6 +444,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
|
|
|
443
444
|
error: error
|
|
444
445
|
});
|
|
445
446
|
var classes = useUtilityClasses(ownerState);
|
|
447
|
+
var paperProps = _extends({}, MenuProps.PaperProps, (_MenuProps$slotProps = MenuProps.slotProps) == null ? void 0 : _MenuProps$slotProps.paper);
|
|
446
448
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
447
449
|
children: [/*#__PURE__*/_jsx(SelectSelect, _extends({
|
|
448
450
|
ref: handleDisplayRef,
|
|
@@ -504,11 +506,13 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
|
|
|
504
506
|
role: 'listbox',
|
|
505
507
|
disableListWrap: true
|
|
506
508
|
}, MenuProps.MenuListProps),
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
509
|
+
slotProps: {
|
|
510
|
+
paper: _extends({}, paperProps, {
|
|
511
|
+
style: _extends({
|
|
512
|
+
minWidth: menuMinWidth
|
|
513
|
+
}, paperProps != null ? paperProps.style : null)
|
|
514
|
+
})
|
|
515
|
+
},
|
|
512
516
|
children: items
|
|
513
517
|
}))]
|
|
514
518
|
});
|
|
@@ -228,10 +228,10 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes /* remove-proptypes *
|
|
|
228
228
|
*/
|
|
229
229
|
disableWindowBlurListener: PropTypes.bool,
|
|
230
230
|
/**
|
|
231
|
-
* When displaying multiple consecutive
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
* features
|
|
231
|
+
* When displaying multiple consecutive snackbars using a single parent-rendered
|
|
232
|
+
* `<Snackbar/>`, add the `key` prop to ensure independent treatment of each message.
|
|
233
|
+
* For instance, use `<Snackbar key={message} />`. Otherwise, messages might update
|
|
234
|
+
* in place, and features like `autoHideDuration` could be affected.
|
|
235
235
|
*/
|
|
236
236
|
key: function key() {
|
|
237
237
|
return null;
|
|
@@ -515,7 +515,7 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
515
515
|
*
|
|
516
516
|
* @default false
|
|
517
517
|
*/
|
|
518
|
-
allowSwipeInChildren: PropTypes.oneOfType([PropTypes.
|
|
518
|
+
allowSwipeInChildren: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
|
|
519
519
|
/**
|
|
520
520
|
* @ignore
|
|
521
521
|
*/
|
|
@@ -570,20 +570,20 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
570
570
|
/**
|
|
571
571
|
* Callback fired when the component requests to be closed.
|
|
572
572
|
*
|
|
573
|
-
* @param {
|
|
573
|
+
* @param {React.SyntheticEvent<{}>} event The event source of the callback.
|
|
574
574
|
*/
|
|
575
575
|
onClose: PropTypes.func.isRequired,
|
|
576
576
|
/**
|
|
577
577
|
* Callback fired when the component requests to be opened.
|
|
578
578
|
*
|
|
579
|
-
* @param {
|
|
579
|
+
* @param {React.SyntheticEvent<{}>} event The event source of the callback.
|
|
580
580
|
*/
|
|
581
581
|
onOpen: PropTypes.func.isRequired,
|
|
582
582
|
/**
|
|
583
583
|
* If `true`, the component is shown.
|
|
584
584
|
* @default false
|
|
585
585
|
*/
|
|
586
|
-
open: PropTypes.bool
|
|
586
|
+
open: PropTypes.bool,
|
|
587
587
|
/**
|
|
588
588
|
* @ignore
|
|
589
589
|
*/
|
package/legacy/index.js
CHANGED
|
@@ -214,7 +214,7 @@ process.env.NODE_ENV !== "production" ? CircularProgress.propTypes /* remove-pro
|
|
|
214
214
|
/**
|
|
215
215
|
* The size of the component.
|
|
216
216
|
* If using a number, the pixel unit is assumed.
|
|
217
|
-
* If using a string, you need to provide the CSS unit, e.g '3rem'.
|
|
217
|
+
* If using a string, you need to provide the CSS unit, e.g. '3rem'.
|
|
218
218
|
* @default 40
|
|
219
219
|
*/
|
|
220
220
|
size: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
@@ -107,7 +107,8 @@ const ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(inPro
|
|
|
107
107
|
height,
|
|
108
108
|
gridColumnEnd: variant !== 'masonry' ? `span ${cols}` : undefined,
|
|
109
109
|
gridRowEnd: variant !== 'masonry' ? `span ${rows}` : undefined,
|
|
110
|
-
marginBottom: variant === 'masonry' ? gap : undefined
|
|
110
|
+
marginBottom: variant === 'masonry' ? gap : undefined,
|
|
111
|
+
breakInside: variant === 'masonry' ? 'avoid' : undefined
|
|
111
112
|
}, style),
|
|
112
113
|
ownerState: ownerState
|
|
113
114
|
}, other, {
|
|
@@ -52,7 +52,7 @@ const useUtilityClasses = ownerState => {
|
|
|
52
52
|
type
|
|
53
53
|
} = ownerState;
|
|
54
54
|
const slots = {
|
|
55
|
-
root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size
|
|
55
|
+
root: ['root', `color${capitalize(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size && size !== 'medium' && `size${capitalize(size)}`, multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
|
|
56
56
|
input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
|
|
57
57
|
};
|
|
58
58
|
return composeClasses(slots, getInputBaseUtilityClass, classes);
|
|
@@ -11,6 +11,7 @@ import formControlState from '../FormControl/formControlState';
|
|
|
11
11
|
import useFormControl from '../FormControl/useFormControl';
|
|
12
12
|
import FormLabel, { formLabelClasses } from '../FormLabel';
|
|
13
13
|
import useThemeProps from '../styles/useThemeProps';
|
|
14
|
+
import capitalize from '../utils/capitalize';
|
|
14
15
|
import styled, { rootShouldForwardProp } from '../styles/styled';
|
|
15
16
|
import { getInputLabelUtilityClasses } from './inputLabelClasses';
|
|
16
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -25,7 +26,7 @@ const useUtilityClasses = ownerState => {
|
|
|
25
26
|
required
|
|
26
27
|
} = ownerState;
|
|
27
28
|
const slots = {
|
|
28
|
-
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size
|
|
29
|
+
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && `size${capitalize(size)}`, variant],
|
|
29
30
|
asterisk: [required && 'asterisk']
|
|
30
31
|
};
|
|
31
32
|
const composedClasses = composeClasses(slots, getInputLabelUtilityClasses, classes);
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
5
|
const _excluded = ["onEntering"],
|
|
6
|
-
_excluded2 = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps"],
|
|
6
|
+
_excluded2 = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps", "disableScrollLock"],
|
|
7
7
|
_excluded3 = ["slotProps"];
|
|
8
8
|
import * as React from 'react';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
@@ -112,7 +112,8 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
112
112
|
transitionDuration: transitionDurationProp = 'auto',
|
|
113
113
|
TransitionProps: {
|
|
114
114
|
onEntering
|
|
115
|
-
} = {}
|
|
115
|
+
} = {},
|
|
116
|
+
disableScrollLock = false
|
|
116
117
|
} = props,
|
|
117
118
|
TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),
|
|
118
119
|
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
@@ -200,11 +201,11 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
200
201
|
const widthThreshold = containerWindow.innerWidth - marginThreshold;
|
|
201
202
|
|
|
202
203
|
// Check if the vertical axis needs shifting
|
|
203
|
-
if (top < marginThreshold) {
|
|
204
|
+
if (marginThreshold !== null && top < marginThreshold) {
|
|
204
205
|
const diff = top - marginThreshold;
|
|
205
206
|
top -= diff;
|
|
206
207
|
elemTransformOrigin.vertical += diff;
|
|
207
|
-
} else if (bottom > heightThreshold) {
|
|
208
|
+
} else if (marginThreshold !== null && bottom > heightThreshold) {
|
|
208
209
|
const diff = bottom - heightThreshold;
|
|
209
210
|
top -= diff;
|
|
210
211
|
elemTransformOrigin.vertical += diff;
|
|
@@ -216,7 +217,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
216
217
|
}
|
|
217
218
|
|
|
218
219
|
// Check if the horizontal axis needs shifting
|
|
219
|
-
if (left < marginThreshold) {
|
|
220
|
+
if (marginThreshold !== null && left < marginThreshold) {
|
|
220
221
|
const diff = left - marginThreshold;
|
|
221
222
|
left -= diff;
|
|
222
223
|
elemTransformOrigin.horizontal += diff;
|
|
@@ -247,6 +248,12 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
247
248
|
element.style.transformOrigin = positioning.transformOrigin;
|
|
248
249
|
setIsPositioned(true);
|
|
249
250
|
}, [getPositioningStyle]);
|
|
251
|
+
React.useEffect(() => {
|
|
252
|
+
if (disableScrollLock) {
|
|
253
|
+
window.addEventListener('scroll', setPositioningStyles);
|
|
254
|
+
}
|
|
255
|
+
return () => window.removeEventListener('scroll', setPositioningStyles);
|
|
256
|
+
}, [anchorEl, disableScrollLock, setPositioningStyles]);
|
|
250
257
|
const handleEntering = (element, isAppearing) => {
|
|
251
258
|
if (onEntering) {
|
|
252
259
|
onEntering(element, isAppearing);
|
|
@@ -327,7 +334,8 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
327
334
|
} = _useSlotProps,
|
|
328
335
|
rootProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded3);
|
|
329
336
|
return /*#__PURE__*/_jsx(RootSlot, _extends({}, rootProps, !isHostComponent(RootSlot) && {
|
|
330
|
-
slotProps: rootSlotPropsProp
|
|
337
|
+
slotProps: rootSlotPropsProp,
|
|
338
|
+
disableScrollLock
|
|
331
339
|
}, {
|
|
332
340
|
children: /*#__PURE__*/_jsx(TransitionComponent, _extends({
|
|
333
341
|
appear: true,
|
|
@@ -422,6 +430,11 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
|
|
|
422
430
|
* so it's simply `document.body` most of the time.
|
|
423
431
|
*/
|
|
424
432
|
container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),
|
|
433
|
+
/**
|
|
434
|
+
* Disable the scroll lock behavior.
|
|
435
|
+
* @default false
|
|
436
|
+
*/
|
|
437
|
+
disableScrollLock: PropTypes.bool,
|
|
425
438
|
/**
|
|
426
439
|
* The elevation of the popover.
|
|
427
440
|
* @default 8
|
|
@@ -429,6 +442,7 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
|
|
|
429
442
|
elevation: integerPropType,
|
|
430
443
|
/**
|
|
431
444
|
* Specifies how close to the edge of the window the popover can appear.
|
|
445
|
+
* If null, the popover will not be constrained by the window.
|
|
432
446
|
* @default 16
|
|
433
447
|
*/
|
|
434
448
|
marginThreshold: PropTypes.number,
|
package/modern/Radio/Radio.js
CHANGED
|
@@ -21,10 +21,11 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
21
21
|
const useUtilityClasses = ownerState => {
|
|
22
22
|
const {
|
|
23
23
|
classes,
|
|
24
|
-
color
|
|
24
|
+
color,
|
|
25
|
+
size
|
|
25
26
|
} = ownerState;
|
|
26
27
|
const slots = {
|
|
27
|
-
root: ['root', `color${capitalize(color)}`]
|
|
28
|
+
root: ['root', `color${capitalize(color)}`, size !== 'medium' && `size${capitalize(size)}`]
|
|
28
29
|
};
|
|
29
30
|
return _extends({}, classes, composeClasses(slots, getRadioUtilityClass, classes));
|
|
30
31
|
};
|
|
@@ -3,5 +3,5 @@ import generateUtilityClass from '../generateUtilityClass';
|
|
|
3
3
|
export function getRadioUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiRadio', slot);
|
|
5
5
|
}
|
|
6
|
-
const radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary']);
|
|
6
|
+
const radioClasses = generateUtilityClasses('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);
|
|
7
7
|
export default radioClasses;
|
|
@@ -432,6 +432,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
432
432
|
error
|
|
433
433
|
});
|
|
434
434
|
const classes = useUtilityClasses(ownerState);
|
|
435
|
+
const paperProps = _extends({}, MenuProps.PaperProps, MenuProps.slotProps?.paper);
|
|
435
436
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
436
437
|
children: [/*#__PURE__*/_jsx(SelectSelect, _extends({
|
|
437
438
|
ref: handleDisplayRef,
|
|
@@ -493,11 +494,13 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
493
494
|
role: 'listbox',
|
|
494
495
|
disableListWrap: true
|
|
495
496
|
}, MenuProps.MenuListProps),
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
497
|
+
slotProps: {
|
|
498
|
+
paper: _extends({}, paperProps, {
|
|
499
|
+
style: _extends({
|
|
500
|
+
minWidth: menuMinWidth
|
|
501
|
+
}, paperProps != null ? paperProps.style : null)
|
|
502
|
+
})
|
|
503
|
+
},
|
|
501
504
|
children: items
|
|
502
505
|
}))]
|
|
503
506
|
});
|
|
@@ -227,10 +227,10 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes /* remove-proptypes *
|
|
|
227
227
|
*/
|
|
228
228
|
disableWindowBlurListener: PropTypes.bool,
|
|
229
229
|
/**
|
|
230
|
-
* When displaying multiple consecutive
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
* features
|
|
230
|
+
* When displaying multiple consecutive snackbars using a single parent-rendered
|
|
231
|
+
* `<Snackbar/>`, add the `key` prop to ensure independent treatment of each message.
|
|
232
|
+
* For instance, use `<Snackbar key={message} />`. Otherwise, messages might update
|
|
233
|
+
* in place, and features like `autoHideDuration` could be affected.
|
|
234
234
|
*/
|
|
235
235
|
key: () => null,
|
|
236
236
|
/**
|
|
@@ -501,7 +501,7 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
501
501
|
*
|
|
502
502
|
* @default false
|
|
503
503
|
*/
|
|
504
|
-
allowSwipeInChildren: PropTypes.oneOfType([PropTypes.
|
|
504
|
+
allowSwipeInChildren: PropTypes.oneOfType([PropTypes.func, PropTypes.bool]),
|
|
505
505
|
/**
|
|
506
506
|
* @ignore
|
|
507
507
|
*/
|
|
@@ -556,20 +556,20 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
556
556
|
/**
|
|
557
557
|
* Callback fired when the component requests to be closed.
|
|
558
558
|
*
|
|
559
|
-
* @param {
|
|
559
|
+
* @param {React.SyntheticEvent<{}>} event The event source of the callback.
|
|
560
560
|
*/
|
|
561
561
|
onClose: PropTypes.func.isRequired,
|
|
562
562
|
/**
|
|
563
563
|
* Callback fired when the component requests to be opened.
|
|
564
564
|
*
|
|
565
|
-
* @param {
|
|
565
|
+
* @param {React.SyntheticEvent<{}>} event The event source of the callback.
|
|
566
566
|
*/
|
|
567
567
|
onOpen: PropTypes.func.isRequired,
|
|
568
568
|
/**
|
|
569
569
|
* If `true`, the component is shown.
|
|
570
570
|
* @default false
|
|
571
571
|
*/
|
|
572
|
-
open: PropTypes.bool
|
|
572
|
+
open: PropTypes.bool,
|
|
573
573
|
/**
|
|
574
574
|
* @ignore
|
|
575
575
|
*/
|
package/modern/index.js
CHANGED
|
@@ -222,7 +222,7 @@ process.env.NODE_ENV !== "production" ? CircularProgress.propTypes /* remove-pro
|
|
|
222
222
|
/**
|
|
223
223
|
* The size of the component.
|
|
224
224
|
* If using a number, the pixel unit is assumed.
|
|
225
|
-
* If using a string, you need to provide the CSS unit, e.g '3rem'.
|
|
225
|
+
* If using a string, you need to provide the CSS unit, e.g. '3rem'.
|
|
226
226
|
* @default 40
|
|
227
227
|
*/
|
|
228
228
|
size: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]),
|
|
@@ -115,7 +115,8 @@ const ImageListItem = /*#__PURE__*/React.forwardRef(function ImageListItem(inPro
|
|
|
115
115
|
height,
|
|
116
116
|
gridColumnEnd: variant !== 'masonry' ? `span ${cols}` : undefined,
|
|
117
117
|
gridRowEnd: variant !== 'masonry' ? `span ${rows}` : undefined,
|
|
118
|
-
marginBottom: variant === 'masonry' ? gap : undefined
|
|
118
|
+
marginBottom: variant === 'masonry' ? gap : undefined,
|
|
119
|
+
breakInside: variant === 'masonry' ? 'avoid' : undefined
|
|
119
120
|
}, style),
|
|
120
121
|
ownerState: ownerState
|
|
121
122
|
}, other, {
|
|
@@ -60,7 +60,7 @@ const useUtilityClasses = ownerState => {
|
|
|
60
60
|
type
|
|
61
61
|
} = ownerState;
|
|
62
62
|
const slots = {
|
|
63
|
-
root: ['root', `color${(0, _capitalize.default)(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size
|
|
63
|
+
root: ['root', `color${(0, _capitalize.default)(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size && size !== 'medium' && `size${(0, _capitalize.default)(size)}`, multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
|
|
64
64
|
input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
|
|
65
65
|
};
|
|
66
66
|
return (0, _base.unstable_composeClasses)(slots, _inputBaseClasses.getInputBaseUtilityClass, classes);
|
|
@@ -16,6 +16,7 @@ var _formControlState = _interopRequireDefault(require("../FormControl/formContr
|
|
|
16
16
|
var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
|
|
17
17
|
var _FormLabel = _interopRequireWildcard(require("../FormLabel"));
|
|
18
18
|
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
19
|
+
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
19
20
|
var _styled = _interopRequireWildcard(require("../styles/styled"));
|
|
20
21
|
var _inputLabelClasses = require("./inputLabelClasses");
|
|
21
22
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -33,7 +34,7 @@ const useUtilityClasses = ownerState => {
|
|
|
33
34
|
required
|
|
34
35
|
} = ownerState;
|
|
35
36
|
const slots = {
|
|
36
|
-
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size
|
|
37
|
+
root: ['root', formControl && 'formControl', !disableAnimation && 'animated', shrink && 'shrink', size && size !== 'normal' && `size${(0, _capitalize.default)(size)}`, variant],
|
|
37
38
|
asterisk: [required && 'asterisk']
|
|
38
39
|
};
|
|
39
40
|
const composedClasses = (0, _composeClasses.unstable_composeClasses)(slots, _inputLabelClasses.getInputLabelUtilityClasses, classes);
|
package/node/Popover/Popover.js
CHANGED
|
@@ -27,7 +27,7 @@ var _Paper = _interopRequireDefault(require("../Paper"));
|
|
|
27
27
|
var _popoverClasses = require("./popoverClasses");
|
|
28
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
29
29
|
const _excluded = ["onEntering"],
|
|
30
|
-
_excluded2 = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps"],
|
|
30
|
+
_excluded2 = ["action", "anchorEl", "anchorOrigin", "anchorPosition", "anchorReference", "children", "className", "container", "elevation", "marginThreshold", "open", "PaperProps", "slots", "slotProps", "transformOrigin", "TransitionComponent", "transitionDuration", "TransitionProps", "disableScrollLock"],
|
|
31
31
|
_excluded3 = ["slotProps"];
|
|
32
32
|
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
33
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -125,7 +125,8 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
125
125
|
transitionDuration: transitionDurationProp = 'auto',
|
|
126
126
|
TransitionProps: {
|
|
127
127
|
onEntering
|
|
128
|
-
} = {}
|
|
128
|
+
} = {},
|
|
129
|
+
disableScrollLock = false
|
|
129
130
|
} = props,
|
|
130
131
|
TransitionProps = (0, _objectWithoutPropertiesLoose2.default)(props.TransitionProps, _excluded),
|
|
131
132
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
|
|
@@ -213,11 +214,11 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
213
214
|
const widthThreshold = containerWindow.innerWidth - marginThreshold;
|
|
214
215
|
|
|
215
216
|
// Check if the vertical axis needs shifting
|
|
216
|
-
if (top < marginThreshold) {
|
|
217
|
+
if (marginThreshold !== null && top < marginThreshold) {
|
|
217
218
|
const diff = top - marginThreshold;
|
|
218
219
|
top -= diff;
|
|
219
220
|
elemTransformOrigin.vertical += diff;
|
|
220
|
-
} else if (bottom > heightThreshold) {
|
|
221
|
+
} else if (marginThreshold !== null && bottom > heightThreshold) {
|
|
221
222
|
const diff = bottom - heightThreshold;
|
|
222
223
|
top -= diff;
|
|
223
224
|
elemTransformOrigin.vertical += diff;
|
|
@@ -229,7 +230,7 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
229
230
|
}
|
|
230
231
|
|
|
231
232
|
// Check if the horizontal axis needs shifting
|
|
232
|
-
if (left < marginThreshold) {
|
|
233
|
+
if (marginThreshold !== null && left < marginThreshold) {
|
|
233
234
|
const diff = left - marginThreshold;
|
|
234
235
|
left -= diff;
|
|
235
236
|
elemTransformOrigin.horizontal += diff;
|
|
@@ -260,6 +261,12 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
260
261
|
element.style.transformOrigin = positioning.transformOrigin;
|
|
261
262
|
setIsPositioned(true);
|
|
262
263
|
}, [getPositioningStyle]);
|
|
264
|
+
React.useEffect(() => {
|
|
265
|
+
if (disableScrollLock) {
|
|
266
|
+
window.addEventListener('scroll', setPositioningStyles);
|
|
267
|
+
}
|
|
268
|
+
return () => window.removeEventListener('scroll', setPositioningStyles);
|
|
269
|
+
}, [anchorEl, disableScrollLock, setPositioningStyles]);
|
|
263
270
|
const handleEntering = (element, isAppearing) => {
|
|
264
271
|
if (onEntering) {
|
|
265
272
|
onEntering(element, isAppearing);
|
|
@@ -340,7 +347,8 @@ const Popover = /*#__PURE__*/React.forwardRef(function Popover(inProps, ref) {
|
|
|
340
347
|
} = _useSlotProps,
|
|
341
348
|
rootProps = (0, _objectWithoutPropertiesLoose2.default)(_useSlotProps, _excluded3);
|
|
342
349
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(RootSlot, (0, _extends2.default)({}, rootProps, !(0, _base.isHostComponent)(RootSlot) && {
|
|
343
|
-
slotProps: rootSlotPropsProp
|
|
350
|
+
slotProps: rootSlotPropsProp,
|
|
351
|
+
disableScrollLock
|
|
344
352
|
}, {
|
|
345
353
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TransitionComponent, (0, _extends2.default)({
|
|
346
354
|
appear: true,
|
|
@@ -435,6 +443,11 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
|
|
|
435
443
|
* so it's simply `document.body` most of the time.
|
|
436
444
|
*/
|
|
437
445
|
container: _propTypes.default /* @typescript-to-proptypes-ignore */.oneOfType([_utils.HTMLElementType, _propTypes.default.func]),
|
|
446
|
+
/**
|
|
447
|
+
* Disable the scroll lock behavior.
|
|
448
|
+
* @default false
|
|
449
|
+
*/
|
|
450
|
+
disableScrollLock: _propTypes.default.bool,
|
|
438
451
|
/**
|
|
439
452
|
* The elevation of the popover.
|
|
440
453
|
* @default 8
|
|
@@ -442,6 +455,7 @@ process.env.NODE_ENV !== "production" ? Popover.propTypes /* remove-proptypes */
|
|
|
442
455
|
elevation: _utils.integerPropType,
|
|
443
456
|
/**
|
|
444
457
|
* Specifies how close to the edge of the window the popover can appear.
|
|
458
|
+
* If null, the popover will not be constrained by the window.
|
|
445
459
|
* @default 16
|
|
446
460
|
*/
|
|
447
461
|
marginThreshold: _propTypes.default.number,
|
package/node/Radio/Radio.js
CHANGED
|
@@ -29,10 +29,11 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
29
|
const useUtilityClasses = ownerState => {
|
|
30
30
|
const {
|
|
31
31
|
classes,
|
|
32
|
-
color
|
|
32
|
+
color,
|
|
33
|
+
size
|
|
33
34
|
} = ownerState;
|
|
34
35
|
const slots = {
|
|
35
|
-
root: ['root', `color${(0, _capitalize.default)(color)}`]
|
|
36
|
+
root: ['root', `color${(0, _capitalize.default)(color)}`, size !== 'medium' && `size${(0, _capitalize.default)(size)}`]
|
|
36
37
|
};
|
|
37
38
|
return (0, _extends2.default)({}, classes, (0, _composeClasses.unstable_composeClasses)(slots, _radioClasses.getRadioUtilityClass, classes));
|
|
38
39
|
};
|
|
@@ -11,6 +11,6 @@ var _generateUtilityClass = _interopRequireDefault(require("../generateUtilityCl
|
|
|
11
11
|
function getRadioUtilityClass(slot) {
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiRadio', slot);
|
|
13
13
|
}
|
|
14
|
-
const radioClasses = (0, _utils.unstable_generateUtilityClasses)('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary']);
|
|
14
|
+
const radioClasses = (0, _utils.unstable_generateUtilityClasses)('MuiRadio', ['root', 'checked', 'disabled', 'colorPrimary', 'colorSecondary', 'sizeSmall']);
|
|
15
15
|
var _default = radioClasses;
|
|
16
16
|
exports.default = _default;
|
|
@@ -115,6 +115,7 @@ const useUtilityClasses = ownerState => {
|
|
|
115
115
|
* @ignore - internal component.
|
|
116
116
|
*/
|
|
117
117
|
const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref) {
|
|
118
|
+
var _MenuProps$slotProps;
|
|
118
119
|
const {
|
|
119
120
|
'aria-describedby': ariaDescribedby,
|
|
120
121
|
'aria-label': ariaLabel,
|
|
@@ -438,6 +439,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
438
439
|
error
|
|
439
440
|
});
|
|
440
441
|
const classes = useUtilityClasses(ownerState);
|
|
442
|
+
const paperProps = (0, _extends2.default)({}, MenuProps.PaperProps, (_MenuProps$slotProps = MenuProps.slotProps) == null ? void 0 : _MenuProps$slotProps.paper);
|
|
441
443
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
442
444
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(SelectSelect, (0, _extends2.default)({
|
|
443
445
|
ref: handleDisplayRef,
|
|
@@ -499,11 +501,13 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
499
501
|
role: 'listbox',
|
|
500
502
|
disableListWrap: true
|
|
501
503
|
}, MenuProps.MenuListProps),
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
504
|
+
slotProps: {
|
|
505
|
+
paper: (0, _extends2.default)({}, paperProps, {
|
|
506
|
+
style: (0, _extends2.default)({
|
|
507
|
+
minWidth: menuMinWidth
|
|
508
|
+
}, paperProps != null ? paperProps.style : null)
|
|
509
|
+
})
|
|
510
|
+
},
|
|
507
511
|
children: items
|
|
508
512
|
}))]
|
|
509
513
|
});
|