@mui/material 5.9.1 → 5.10.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/Accordion/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/Badge.js +1 -1
- package/Badge/badgeClasses.d.ts +56 -56
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/Button.js +8 -3
- package/Button/buttonClasses.d.ts +100 -100
- package/ButtonBase/TouchRipple.js +1 -1
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +200 -9
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/Chip.js +5 -7
- package/Chip/chipClasses.d.ts +88 -80
- package/Chip/chipClasses.js +1 -1
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +6 -6
- package/Dialog/Dialog.js +2 -1
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/FormHelperText.d.ts +7 -1
- package/FormHelperText/FormHelperText.js +3 -1
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/Grid.d.ts +1 -1
- package/Grid/Grid.js +71 -4
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +26 -26
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/ImageListItem.js +4 -4
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/InputBase.js +3 -2
- package/InputBase/inputBaseClasses.d.ts +46 -44
- package/InputBase/inputBaseClasses.js +1 -1
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/getTextDecoration.d.ts +15 -15
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/Modal/Modal.d.ts +2 -1
- package/Modal/Modal.js +2 -1
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/OverridableComponent.d.ts +4 -0
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +24 -24
- package/Popper/Popper.js +24 -0
- package/README.md +5 -4
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/SelectInput.js +1 -1
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/Skeleton.d.ts +1 -1
- package/Skeleton/Skeleton.js +3 -1
- package/Skeleton/skeletonClasses.d.ts +26 -24
- package/Skeleton/skeletonClasses.js +1 -1
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Stack/Stack.js +15 -2
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/StepLabel.js +1 -1
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +24 -24
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/TableCell.d.ts +4 -1
- package/TableCell/TableCell.js +3 -1
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/Tabs.d.ts +7 -1
- package/Tabs/Tabs.js +3 -1
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/Tooltip.js +6 -7
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/Unstable_Grid2/Grid2.d.ts +4 -4
- package/Unstable_Grid2/Grid2Props.d.ts +15 -15
- package/Unstable_Grid2/grid2Classes.d.ts +5 -5
- package/Unstable_Grid2/index.d.ts +4 -4
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/Badge/Badge.js +1 -1
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/Button/Button.js +4 -2
- package/legacy/ButtonBase/TouchRipple.js +1 -1
- package/legacy/Chip/Chip.js +4 -6
- package/legacy/Chip/chipClasses.js +1 -1
- package/legacy/Dialog/Dialog.js +2 -1
- package/legacy/FormHelperText/FormHelperText.js +3 -1
- package/legacy/Grid/Grid.js +76 -12
- package/legacy/ImageListItem/ImageListItem.js +4 -4
- package/legacy/InputBase/InputBase.js +3 -2
- package/legacy/InputBase/inputBaseClasses.js +1 -1
- package/legacy/Modal/Modal.js +2 -1
- package/legacy/Popper/Popper.js +24 -0
- package/legacy/Select/SelectInput.js +1 -1
- package/legacy/Skeleton/Skeleton.js +3 -1
- package/legacy/Skeleton/skeletonClasses.js +1 -1
- package/legacy/Stack/Stack.js +15 -2
- package/legacy/StepLabel/StepLabel.js +1 -1
- package/legacy/TableCell/TableCell.js +3 -1
- package/legacy/Tabs/Tabs.js +3 -1
- package/legacy/Tooltip/Tooltip.js +6 -7
- package/legacy/index.js +1 -1
- package/legacy/styles/createTheme.js +5 -0
- package/legacy/useScrollTrigger/useScrollTrigger.js +6 -2
- package/locale/index.d.ts +71 -71
- package/modern/Badge/Badge.js +1 -1
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Button/Button.js +8 -3
- package/modern/ButtonBase/TouchRipple.js +1 -1
- package/modern/Chip/Chip.js +5 -7
- package/modern/Chip/chipClasses.js +1 -1
- package/modern/Dialog/Dialog.js +2 -1
- package/modern/FormHelperText/FormHelperText.js +3 -1
- package/modern/Grid/Grid.js +67 -4
- package/modern/ImageListItem/ImageListItem.js +4 -4
- package/modern/InputBase/InputBase.js +3 -2
- package/modern/InputBase/inputBaseClasses.js +1 -1
- package/modern/Modal/Modal.js +2 -1
- package/modern/Popper/Popper.js +24 -0
- package/modern/Select/SelectInput.js +1 -1
- package/modern/Skeleton/Skeleton.js +3 -1
- package/modern/Skeleton/skeletonClasses.js +1 -1
- package/modern/Stack/Stack.js +15 -2
- package/modern/StepLabel/StepLabel.js +1 -1
- package/modern/TableCell/TableCell.js +3 -1
- package/modern/Tabs/Tabs.js +3 -1
- package/modern/Tooltip/Tooltip.js +6 -7
- package/modern/index.js +1 -1
- package/modern/styles/createTheme.js +6 -0
- package/modern/useScrollTrigger/useScrollTrigger.js +6 -2
- package/node/Badge/Badge.js +1 -1
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Button/Button.js +10 -3
- package/node/ButtonBase/TouchRipple.js +1 -1
- package/node/Chip/Chip.js +5 -7
- package/node/Chip/chipClasses.js +1 -1
- package/node/Dialog/Dialog.js +2 -1
- package/node/FormHelperText/FormHelperText.js +3 -1
- package/node/Grid/Grid.js +71 -4
- package/node/ImageListItem/ImageListItem.js +4 -4
- package/node/InputBase/InputBase.js +3 -2
- package/node/InputBase/inputBaseClasses.js +1 -1
- package/node/Modal/Modal.js +2 -1
- package/node/Popper/Popper.js +24 -0
- package/node/Select/SelectInput.js +1 -1
- package/node/Skeleton/Skeleton.js +3 -1
- package/node/Skeleton/skeletonClasses.js +1 -1
- package/node/Stack/Stack.js +14 -1
- package/node/StepLabel/StepLabel.js +1 -1
- package/node/TableCell/TableCell.js +3 -1
- package/node/Tabs/Tabs.js +3 -1
- package/node/Tooltip/Tooltip.js +6 -7
- package/node/index.js +1 -1
- package/node/styles/createTheme.js +6 -0
- package/node/useScrollTrigger/useScrollTrigger.js +6 -2
- package/package.json +6 -6
- package/styles/CssVarsProvider.d.ts +14 -14
- package/styles/createTheme.js +6 -0
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/umd/material-ui.development.js +288 -74
- package/umd/material-ui.production.min.js +20 -20
- package/useMediaQuery/useMediaQuery.d.ts +31 -31
- package/useScrollTrigger/useScrollTrigger.js +6 -2
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
package/legacy/Chip/Chip.js
CHANGED
|
@@ -30,7 +30,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
30
30
|
label: ['label', "label".concat(capitalize(size))],
|
|
31
31
|
avatar: ['avatar', "avatar".concat(capitalize(size)), "avatarColor".concat(capitalize(color))],
|
|
32
32
|
icon: ['icon', "icon".concat(capitalize(size)), "iconColor".concat(capitalize(color))],
|
|
33
|
-
deleteIcon: ['deleteIcon', "deleteIcon".concat(capitalize(size)), "deleteIconColor".concat(capitalize(color)), "
|
|
33
|
+
deleteIcon: ['deleteIcon', "deleteIcon".concat(capitalize(size)), "deleteIconColor".concat(capitalize(color)), "deleteIcon".concat(capitalize(variant), "Color").concat(capitalize(color))]
|
|
34
34
|
};
|
|
35
35
|
return composeClasses(slots, getChipUtilityClass, classes);
|
|
36
36
|
};
|
|
@@ -45,7 +45,7 @@ var ChipRoot = styled('div', {
|
|
|
45
45
|
onDelete = ownerState.onDelete,
|
|
46
46
|
size = ownerState.size,
|
|
47
47
|
variant = ownerState.variant;
|
|
48
|
-
return [_defineProperty({}, "& .".concat(chipClasses.avatar), styles.avatar), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatar".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatarColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles.icon), _defineProperty({}, "& .".concat(chipClasses.icon), styles["icon".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles["iconColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles.deleteIcon), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIcon".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIconColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["
|
|
48
|
+
return [_defineProperty({}, "& .".concat(chipClasses.avatar), styles.avatar), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatar".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.avatar), styles["avatarColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles.icon), _defineProperty({}, "& .".concat(chipClasses.icon), styles["icon".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.icon), styles["iconColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles.deleteIcon), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIcon".concat(capitalize(size))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIconColor".concat(capitalize(color))]), _defineProperty({}, "& .".concat(chipClasses.deleteIcon), styles["deleteIcon".concat(capitalize(variant), "Color").concat(capitalize(color))]), styles.root, styles["size".concat(capitalize(size))], styles["color".concat(capitalize(color))], clickable && styles.clickable, clickable && color !== 'default' && styles["clickableColor".concat(capitalize(color), ")")], onDelete && styles.deletable, onDelete && color !== 'default' && styles["deletableColor".concat(capitalize(color))], styles[variant], styles["".concat(variant).concat(capitalize(color))]];
|
|
49
49
|
}
|
|
50
50
|
})(function (_ref11) {
|
|
51
51
|
var _extends2;
|
|
@@ -293,7 +293,6 @@ var Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
293
293
|
};
|
|
294
294
|
|
|
295
295
|
var clickable = clickableProp !== false && onClick ? true : clickableProp;
|
|
296
|
-
var small = size === 'small';
|
|
297
296
|
var component = clickable || onDelete ? ButtonBase : ComponentProp || 'div';
|
|
298
297
|
|
|
299
298
|
var ownerState = _extends({}, props, {
|
|
@@ -316,12 +315,11 @@ var Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
316
315
|
var deleteIcon = null;
|
|
317
316
|
|
|
318
317
|
if (onDelete) {
|
|
319
|
-
var customClasses = clsx(color !== 'default' && (variant === 'outlined' ? classes["deleteIconOutlinedColor".concat(capitalize(color))] : classes["deleteIconColor".concat(capitalize(color))]), small && classes.deleteIconSmall);
|
|
320
318
|
deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? /*#__PURE__*/React.cloneElement(deleteIconProp, {
|
|
321
|
-
className: clsx(deleteIconProp.props.className, classes.deleteIcon
|
|
319
|
+
className: clsx(deleteIconProp.props.className, classes.deleteIcon),
|
|
322
320
|
onClick: handleDeleteIconClick
|
|
323
321
|
}) : /*#__PURE__*/_jsx(CancelIcon, {
|
|
324
|
-
className: clsx(classes.deleteIcon
|
|
322
|
+
className: clsx(classes.deleteIcon),
|
|
325
323
|
onClick: handleDeleteIconClick
|
|
326
324
|
});
|
|
327
325
|
}
|
|
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
|
2
2
|
export function getChipUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiChip', slot);
|
|
4
4
|
}
|
|
5
|
-
var chipClasses = generateUtilityClasses('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorPrimary', 'colorSecondary', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'focusVisible']);
|
|
5
|
+
var chipClasses = generateUtilityClasses('MuiChip', ['root', 'sizeSmall', 'sizeMedium', 'colorPrimary', 'colorSecondary', 'disabled', 'clickable', 'clickableColorPrimary', 'clickableColorSecondary', 'deletable', 'deletableColorPrimary', 'deletableColorSecondary', 'outlined', 'filled', 'outlinedPrimary', 'outlinedSecondary', 'filledPrimary', 'filledSecondary', 'avatar', 'avatarSmall', 'avatarMedium', 'avatarColorPrimary', 'avatarColorSecondary', 'icon', 'iconSmall', 'iconMedium', 'iconColorPrimary', 'iconColorSecondary', 'label', 'labelSmall', 'labelMedium', 'deleteIcon', 'deleteIconSmall', 'deleteIconMedium', 'deleteIconColorPrimary', 'deleteIconColorSecondary', 'deleteIconOutlinedColorPrimary', 'deleteIconOutlinedColorSecondary', 'deleteIconFilledColorPrimary', 'deleteIconFilledColorSecondary', 'focusVisible']);
|
|
6
6
|
export default chipClasses;
|
package/legacy/Dialog/Dialog.js
CHANGED
|
@@ -291,7 +291,8 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
|
|
|
291
291
|
|
|
292
292
|
/**
|
|
293
293
|
* A backdrop component. This prop enables custom backdrop rendering.
|
|
294
|
-
* @deprecated Use `components.Backdrop` instead.
|
|
294
|
+
* @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
|
|
295
|
+
* Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
|
|
295
296
|
* @default styled(Backdrop, {
|
|
296
297
|
* name: 'MuiModal',
|
|
297
298
|
* slot: 'Backdrop',
|
|
@@ -184,6 +184,8 @@ process.env.NODE_ENV !== "production" ? FormHelperText.propTypes
|
|
|
184
184
|
/**
|
|
185
185
|
* The variant to use.
|
|
186
186
|
*/
|
|
187
|
-
variant: PropTypes
|
|
187
|
+
variant: PropTypes
|
|
188
|
+
/* @typescript-to-proptypes-ignore */
|
|
189
|
+
.oneOfType([PropTypes.oneOf(['filled', 'outlined', 'standard']), PropTypes.string])
|
|
188
190
|
} : void 0;
|
|
189
191
|
export default FormHelperText;
|
package/legacy/Grid/Grid.js
CHANGED
|
@@ -131,9 +131,34 @@ export function generateDirection(_ref2) {
|
|
|
131
131
|
return output;
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
/**
|
|
135
|
+
* Extracts zero value breakpoint keys before a non-zero value breakpoint key.
|
|
136
|
+
* @example { xs: 0, sm: 0, md: 2, lg: 0, xl: 0 } or [0, 0, 2, 0, 0]
|
|
137
|
+
* @returns [xs, sm]
|
|
138
|
+
*/
|
|
139
|
+
|
|
140
|
+
function extractZeroValueBreakpointKeys(_ref3) {
|
|
141
|
+
var breakpoints = _ref3.breakpoints,
|
|
142
|
+
values = _ref3.values;
|
|
143
|
+
var nonZeroKey = '';
|
|
144
|
+
Object.keys(values).forEach(function (key) {
|
|
145
|
+
if (nonZeroKey !== '') {
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
if (values[key] !== 0) {
|
|
150
|
+
nonZeroKey = key;
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
var sortedBreakpointKeysByValue = Object.keys(breakpoints).sort(function (a, b) {
|
|
154
|
+
return breakpoints[a] - breakpoints[b];
|
|
155
|
+
});
|
|
156
|
+
return sortedBreakpointKeysByValue.slice(0, sortedBreakpointKeysByValue.indexOf(nonZeroKey));
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function generateRowGap(_ref4) {
|
|
160
|
+
var theme = _ref4.theme,
|
|
161
|
+
ownerState = _ref4.ownerState;
|
|
137
162
|
var container = ownerState.container,
|
|
138
163
|
rowSpacing = ownerState.rowSpacing;
|
|
139
164
|
var styles = {};
|
|
@@ -143,9 +168,20 @@ export function generateRowGap(_ref3) {
|
|
|
143
168
|
values: rowSpacing,
|
|
144
169
|
breakpoints: theme.breakpoints.values
|
|
145
170
|
});
|
|
171
|
+
var zeroValueBreakpointKeys;
|
|
172
|
+
|
|
173
|
+
if (_typeof(rowSpacingValues) === 'object') {
|
|
174
|
+
zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({
|
|
175
|
+
breakpoints: theme.breakpoints.values,
|
|
176
|
+
values: rowSpacingValues
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
|
|
146
180
|
styles = handleBreakpoints({
|
|
147
181
|
theme: theme
|
|
148
|
-
}, rowSpacingValues, function (propValue) {
|
|
182
|
+
}, rowSpacingValues, function (propValue, breakpoint) {
|
|
183
|
+
var _zeroValueBreakpointK;
|
|
184
|
+
|
|
149
185
|
var themeSpacing = theme.spacing(propValue);
|
|
150
186
|
|
|
151
187
|
if (themeSpacing !== '0px') {
|
|
@@ -156,15 +192,23 @@ export function generateRowGap(_ref3) {
|
|
|
156
192
|
});
|
|
157
193
|
}
|
|
158
194
|
|
|
159
|
-
|
|
195
|
+
if ((_zeroValueBreakpointK = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK.includes(breakpoint)) {
|
|
196
|
+
return {};
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return _defineProperty({
|
|
200
|
+
marginTop: 0
|
|
201
|
+
}, "& > .".concat(gridClasses.item), {
|
|
202
|
+
paddingTop: 0
|
|
203
|
+
});
|
|
160
204
|
});
|
|
161
205
|
}
|
|
162
206
|
|
|
163
207
|
return styles;
|
|
164
208
|
}
|
|
165
|
-
export function generateColumnGap(
|
|
166
|
-
var theme =
|
|
167
|
-
ownerState =
|
|
209
|
+
export function generateColumnGap(_ref7) {
|
|
210
|
+
var theme = _ref7.theme,
|
|
211
|
+
ownerState = _ref7.ownerState;
|
|
168
212
|
var container = ownerState.container,
|
|
169
213
|
columnSpacing = ownerState.columnSpacing;
|
|
170
214
|
var styles = {};
|
|
@@ -174,9 +218,20 @@ export function generateColumnGap(_ref5) {
|
|
|
174
218
|
values: columnSpacing,
|
|
175
219
|
breakpoints: theme.breakpoints.values
|
|
176
220
|
});
|
|
221
|
+
var zeroValueBreakpointKeys;
|
|
222
|
+
|
|
223
|
+
if (_typeof(columnSpacingValues) === 'object') {
|
|
224
|
+
zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({
|
|
225
|
+
breakpoints: theme.breakpoints.values,
|
|
226
|
+
values: columnSpacingValues
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
|
|
177
230
|
styles = handleBreakpoints({
|
|
178
231
|
theme: theme
|
|
179
|
-
}, columnSpacingValues, function (propValue) {
|
|
232
|
+
}, columnSpacingValues, function (propValue, breakpoint) {
|
|
233
|
+
var _zeroValueBreakpointK2;
|
|
234
|
+
|
|
180
235
|
var themeSpacing = theme.spacing(propValue);
|
|
181
236
|
|
|
182
237
|
if (themeSpacing !== '0px') {
|
|
@@ -188,7 +243,16 @@ export function generateColumnGap(_ref5) {
|
|
|
188
243
|
});
|
|
189
244
|
}
|
|
190
245
|
|
|
191
|
-
|
|
246
|
+
if ((_zeroValueBreakpointK2 = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK2.includes(breakpoint)) {
|
|
247
|
+
return {};
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return _defineProperty({
|
|
251
|
+
width: '100%',
|
|
252
|
+
marginLeft: 0
|
|
253
|
+
}, "& > .".concat(gridClasses.item), {
|
|
254
|
+
paddingLeft: 0
|
|
255
|
+
});
|
|
192
256
|
});
|
|
193
257
|
}
|
|
194
258
|
|
|
@@ -252,8 +316,8 @@ var GridRoot = styled('div', {
|
|
|
252
316
|
});
|
|
253
317
|
return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth].concat(_toConsumableArray(spacingStyles), [direction !== 'row' && styles["direction-xs-".concat(String(direction))], wrap !== 'wrap' && styles["wrap-xs-".concat(String(wrap))]], breakpointsStyles);
|
|
254
318
|
}
|
|
255
|
-
})(function (
|
|
256
|
-
var ownerState =
|
|
319
|
+
})(function (_ref10) {
|
|
320
|
+
var ownerState = _ref10.ownerState;
|
|
257
321
|
return _extends({
|
|
258
322
|
boxSizing: 'border-box'
|
|
259
323
|
}, ownerState.container && {
|
|
@@ -34,9 +34,8 @@ var ImageListItemRoot = styled('li', {
|
|
|
34
34
|
})(function (_ref2) {
|
|
35
35
|
var ownerState = _ref2.ownerState;
|
|
36
36
|
return _extends({
|
|
37
|
-
display: '
|
|
38
|
-
position: 'relative'
|
|
39
|
-
lineHeight: 0
|
|
37
|
+
display: 'block',
|
|
38
|
+
position: 'relative'
|
|
40
39
|
}, ownerState.variant === 'standard' && {
|
|
41
40
|
// For titlebar under list item
|
|
42
41
|
display: 'flex',
|
|
@@ -50,7 +49,8 @@ var ImageListItemRoot = styled('li', {
|
|
|
50
49
|
}, _defineProperty({}, "& .".concat(imageListItemClasses.img), _extends({
|
|
51
50
|
objectFit: 'cover',
|
|
52
51
|
width: '100%',
|
|
53
|
-
height: '100%'
|
|
52
|
+
height: '100%',
|
|
53
|
+
display: 'block'
|
|
54
54
|
}, ownerState.variant === 'standard' && {
|
|
55
55
|
height: 'auto',
|
|
56
56
|
flexGrow: 1
|
|
@@ -40,12 +40,13 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
40
40
|
fullWidth = ownerState.fullWidth,
|
|
41
41
|
hiddenLabel = ownerState.hiddenLabel,
|
|
42
42
|
multiline = ownerState.multiline,
|
|
43
|
+
readOnly = ownerState.readOnly,
|
|
43
44
|
size = ownerState.size,
|
|
44
45
|
startAdornment = ownerState.startAdornment,
|
|
45
46
|
type = ownerState.type;
|
|
46
47
|
var slots = {
|
|
47
|
-
root: ['root', "color".concat(capitalize(color)), disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel'],
|
|
48
|
-
input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd']
|
|
48
|
+
root: ['root', "color".concat(capitalize(color)), disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
|
|
49
|
+
input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
|
|
49
50
|
};
|
|
50
51
|
return composeClasses(slots, getInputBaseUtilityClass, classes);
|
|
51
52
|
};
|
|
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
|
2
2
|
export function getInputBaseUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiInputBase', slot);
|
|
4
4
|
}
|
|
5
|
-
var inputBaseClasses = generateUtilityClasses('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);
|
|
5
|
+
var inputBaseClasses = generateUtilityClasses('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'readOnly', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);
|
|
6
6
|
export default inputBaseClasses;
|
package/legacy/Modal/Modal.js
CHANGED
|
@@ -158,7 +158,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
158
158
|
|
|
159
159
|
/**
|
|
160
160
|
* A backdrop component. This prop enables custom backdrop rendering.
|
|
161
|
-
* @deprecated Use `components.Backdrop` instead.
|
|
161
|
+
* @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
|
|
162
|
+
* Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
|
|
162
163
|
* @default styled(Backdrop, {
|
|
163
164
|
* name: 'MuiModal',
|
|
164
165
|
* slot: 'Backdrop',
|
package/legacy/Popper/Popper.js
CHANGED
|
@@ -63,6 +63,30 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes
|
|
|
63
63
|
/* @typescript-to-proptypes-ignore */
|
|
64
64
|
.oneOfType([PropTypes.node, PropTypes.func]),
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @ignore
|
|
68
|
+
*/
|
|
69
|
+
component: PropTypes
|
|
70
|
+
/* @typescript-to-proptypes-ignore */
|
|
71
|
+
.elementType,
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The components used for each slot inside the Popper.
|
|
75
|
+
* Either a string to use a HTML element or a component.
|
|
76
|
+
* @default {}
|
|
77
|
+
*/
|
|
78
|
+
components: PropTypes.shape({
|
|
79
|
+
Root: PropTypes.elementType
|
|
80
|
+
}),
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The props used for each slot inside the Popper.
|
|
84
|
+
* @default {}
|
|
85
|
+
*/
|
|
86
|
+
componentsProps: PropTypes.shape({
|
|
87
|
+
root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
88
|
+
}),
|
|
89
|
+
|
|
66
90
|
/**
|
|
67
91
|
* An HTML element or function that returns one.
|
|
68
92
|
* The `container` will have the portal children appended to it.
|
|
@@ -531,7 +531,7 @@ var SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, ref)
|
|
|
531
531
|
onFocus: onFocus
|
|
532
532
|
}, SelectDisplayProps, {
|
|
533
533
|
ownerState: ownerState,
|
|
534
|
-
className: clsx(classes.select, className
|
|
534
|
+
className: clsx(SelectDisplayProps.className, classes.select, className) // The id is required for proper a11y
|
|
535
535
|
,
|
|
536
536
|
id: buttonId,
|
|
537
537
|
children: isEmpty(display) ? // notranslate needed while Google Translate will not fix zero-width space issue
|
|
@@ -59,6 +59,8 @@ var SkeletonRoot = styled('span', {
|
|
|
59
59
|
}
|
|
60
60
|
}, ownerState.variant === 'circular' && {
|
|
61
61
|
borderRadius: '50%'
|
|
62
|
+
}, ownerState.variant === 'rounded' && {
|
|
63
|
+
borderRadius: (theme.vars || theme).shape.borderRadius
|
|
62
64
|
}, ownerState.hasChildren && {
|
|
63
65
|
'& > *': {
|
|
64
66
|
visibility: 'hidden'
|
|
@@ -172,7 +174,7 @@ process.env.NODE_ENV !== "production" ? Skeleton.propTypes
|
|
|
172
174
|
*/
|
|
173
175
|
variant: PropTypes
|
|
174
176
|
/* @typescript-to-proptypes-ignore */
|
|
175
|
-
.oneOfType([PropTypes.oneOf(['circular', 'rectangular', 'text']), PropTypes.string]),
|
|
177
|
+
.oneOfType([PropTypes.oneOf(['circular', 'rectangular', 'rounded', 'text']), PropTypes.string]),
|
|
176
178
|
|
|
177
179
|
/**
|
|
178
180
|
* Width of the skeleton.
|
|
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
|
2
2
|
export function getSkeletonUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiSkeleton', slot);
|
|
4
4
|
}
|
|
5
|
-
var skeletonClasses = generateUtilityClasses('MuiSkeleton', ['root', 'text', 'rectangular', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);
|
|
5
|
+
var skeletonClasses = generateUtilityClasses('MuiSkeleton', ['root', 'text', 'rectangular', 'rounded', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);
|
|
6
6
|
export default skeletonClasses;
|
package/legacy/Stack/Stack.js
CHANGED
|
@@ -4,7 +4,7 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";
|
|
|
4
4
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { createUnarySpacing, getValue, handleBreakpoints, unstable_extendSxProp as extendSxProp, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';
|
|
7
|
+
import { createUnarySpacing, getValue, handleBreakpoints, mergeBreakpointsInOrder, unstable_extendSxProp as extendSxProp, unstable_resolveBreakpointValues as resolveBreakpointValues } from '@mui/system';
|
|
8
8
|
import { deepmerge } from '@mui/utils';
|
|
9
9
|
import styled from '../styles/styled';
|
|
10
10
|
import useThemeProps from '../styles/useThemeProps';
|
|
@@ -47,7 +47,8 @@ export var style = function style(_ref) {
|
|
|
47
47
|
theme = _ref.theme;
|
|
48
48
|
|
|
49
49
|
var styles = _extends({
|
|
50
|
-
display: 'flex'
|
|
50
|
+
display: 'flex',
|
|
51
|
+
flexDirection: 'column'
|
|
51
52
|
}, handleBreakpoints({
|
|
52
53
|
theme: theme
|
|
53
54
|
}, resolveBreakpointValues({
|
|
@@ -77,6 +78,17 @@ export var style = function style(_ref) {
|
|
|
77
78
|
base: base
|
|
78
79
|
});
|
|
79
80
|
|
|
81
|
+
if (_typeof(directionValues) === 'object') {
|
|
82
|
+
Object.keys(directionValues).forEach(function (breakpoint, index, breakpoints) {
|
|
83
|
+
var directionValue = directionValues[breakpoint];
|
|
84
|
+
|
|
85
|
+
if (!directionValue) {
|
|
86
|
+
var previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
|
|
87
|
+
directionValues[breakpoint] = previousDirectionValue;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
|
|
80
92
|
var styleFromPropValue = function styleFromPropValue(propValue, breakpoint) {
|
|
81
93
|
return {
|
|
82
94
|
'& > :not(style) + :not(style)': _defineProperty({
|
|
@@ -90,6 +102,7 @@ export var style = function style(_ref) {
|
|
|
90
102
|
}, spacingValues, styleFromPropValue));
|
|
91
103
|
}
|
|
92
104
|
|
|
105
|
+
styles = mergeBreakpointsInOrder(theme.breakpoints, styles);
|
|
93
106
|
return styles;
|
|
94
107
|
};
|
|
95
108
|
var StackRoot = styled('div', {
|
|
@@ -25,7 +25,7 @@ var useUtilityClasses = function useUtilityClasses(ownerState) {
|
|
|
25
25
|
var slots = {
|
|
26
26
|
root: ['root', orientation, error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
|
|
27
27
|
label: ['label', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
|
|
28
|
-
iconContainer: ['iconContainer', alternativeLabel && 'alternativeLabel'],
|
|
28
|
+
iconContainer: ['iconContainer', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
|
|
29
29
|
labelContainer: ['labelContainer']
|
|
30
30
|
};
|
|
31
31
|
return composeClasses(slots, getStepLabelUtilityClass, classes);
|
|
@@ -206,7 +206,9 @@ process.env.NODE_ENV !== "production" ? TableCell.propTypes
|
|
|
206
206
|
* Specify the size of the cell.
|
|
207
207
|
* The prop defaults to the value (`'medium'`) inherited from the parent Table component.
|
|
208
208
|
*/
|
|
209
|
-
size: PropTypes
|
|
209
|
+
size: PropTypes
|
|
210
|
+
/* @typescript-to-proptypes-ignore */
|
|
211
|
+
.oneOfType([PropTypes.oneOf(['medium', 'small']), PropTypes.string]),
|
|
210
212
|
|
|
211
213
|
/**
|
|
212
214
|
* Set aria-sort direction.
|
package/legacy/Tabs/Tabs.js
CHANGED
|
@@ -789,7 +789,9 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes
|
|
|
789
789
|
* Determines the color of the indicator.
|
|
790
790
|
* @default 'primary'
|
|
791
791
|
*/
|
|
792
|
-
indicatorColor: PropTypes
|
|
792
|
+
indicatorColor: PropTypes
|
|
793
|
+
/* @typescript-to-proptypes-ignore */
|
|
794
|
+
.oneOfType([PropTypes.oneOf(['primary', 'secondary']), PropTypes.string]),
|
|
793
795
|
|
|
794
796
|
/**
|
|
795
797
|
* Callback fired when the value changes.
|
|
@@ -178,7 +178,7 @@ var TooltipArrow = styled('span', {
|
|
|
178
178
|
/* = width / sqrt(2) = (length of the hypotenuse) */
|
|
179
179
|
,
|
|
180
180
|
boxSizing: 'border-box',
|
|
181
|
-
color: theme.vars ?
|
|
181
|
+
color: theme.vars ? theme.vars.palette.Tooltip.bg : alpha(theme.palette.grey[700], 0.9),
|
|
182
182
|
'&::before': {
|
|
183
183
|
content: '""',
|
|
184
184
|
margin: 'auto',
|
|
@@ -360,15 +360,12 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
360
360
|
var handleEnter = function handleEnter(event) {
|
|
361
361
|
if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
|
|
362
362
|
return;
|
|
363
|
-
} // Workaround for https://github.com/facebook/react/issues/7769
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
if (!childNode) {
|
|
367
|
-
setChildNode(event.currentTarget);
|
|
368
363
|
} // Remove the title ahead of time.
|
|
369
364
|
// We don't want to wait for the next render commit.
|
|
370
365
|
// We would risk displaying two tooltips at the same time (native + this one).
|
|
371
|
-
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
if (childNode) {
|
|
372
369
|
childNode.removeAttribute('title');
|
|
373
370
|
}
|
|
374
371
|
|
|
@@ -414,6 +411,8 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
414
411
|
|
|
415
412
|
var handleFocus = function handleFocus(event) {
|
|
416
413
|
// Workaround for https://github.com/facebook/react/issues/7769
|
|
414
|
+
// The autoFocus of React might trigger the event before the componentDidMount.
|
|
415
|
+
// We need to account for this eventuality.
|
|
417
416
|
if (!childNode) {
|
|
418
417
|
setChildNode(event.currentTarget);
|
|
419
418
|
}
|
package/legacy/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
4
|
+
import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
|
|
4
5
|
import { deepmerge } from '@mui/utils';
|
|
5
6
|
import { generateUtilityClass } from '@mui/base';
|
|
6
7
|
import { createTheme as systemCreateTheme } from '@mui/system';
|
|
@@ -27,6 +28,10 @@ function createTheme() {
|
|
|
27
28
|
shapeInput = options.shape,
|
|
28
29
|
other = _objectWithoutProperties(options, ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"]);
|
|
29
30
|
|
|
31
|
+
if (options.vars) {
|
|
32
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: `vars` is a private field used for CSS variables support.\nPlease use another name." : _formatMuiErrorMessage(18));
|
|
33
|
+
}
|
|
34
|
+
|
|
30
35
|
var palette = createPalette(paletteInput);
|
|
31
36
|
var systemTheme = systemCreateTheme(options);
|
|
32
37
|
var muiTheme = deepmerge(systemTheme, {
|
|
@@ -51,9 +51,13 @@ export default function useScrollTrigger() {
|
|
|
51
51
|
|
|
52
52
|
handleScroll(); // Re-evaluate trigger when dependencies change
|
|
53
53
|
|
|
54
|
-
target.addEventListener('scroll', handleScroll
|
|
54
|
+
target.addEventListener('scroll', handleScroll, {
|
|
55
|
+
passive: true
|
|
56
|
+
});
|
|
55
57
|
return function () {
|
|
56
|
-
target.removeEventListener('scroll', handleScroll
|
|
58
|
+
target.removeEventListener('scroll', handleScroll, {
|
|
59
|
+
passive: true
|
|
60
|
+
});
|
|
57
61
|
}; // See Option 3. https://github.com/facebook/react/issues/14476#issuecomment-471199055
|
|
58
62
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
59
63
|
}, [target, getTrigger, JSON.stringify(other)]);
|