@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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
|
|
3
4
|
const _excluded = ["breakpoints", "mixins", "spacing", "palette", "transitions", "typography", "shape"];
|
|
4
5
|
import { deepmerge } from '@mui/utils';
|
|
5
6
|
import { generateUtilityClass } from '@mui/base';
|
|
@@ -20,6 +21,11 @@ function createTheme(options = {}, ...args) {
|
|
|
20
21
|
} = options,
|
|
21
22
|
other = _objectWithoutPropertiesLoose(options, _excluded);
|
|
22
23
|
|
|
24
|
+
if (options.vars) {
|
|
25
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`vars\` is a private field used for CSS variables support.
|
|
26
|
+
Please use another name.` : _formatMuiErrorMessage(18));
|
|
27
|
+
}
|
|
28
|
+
|
|
23
29
|
const palette = createPalette(paletteInput);
|
|
24
30
|
const systemTheme = systemCreateTheme(options);
|
|
25
31
|
let muiTheme = deepmerge(systemTheme, {
|
|
@@ -44,9 +44,13 @@ export default function useScrollTrigger(options = {}) {
|
|
|
44
44
|
|
|
45
45
|
handleScroll(); // Re-evaluate trigger when dependencies change
|
|
46
46
|
|
|
47
|
-
target.addEventListener('scroll', handleScroll
|
|
47
|
+
target.addEventListener('scroll', handleScroll, {
|
|
48
|
+
passive: true
|
|
49
|
+
});
|
|
48
50
|
return () => {
|
|
49
|
-
target.removeEventListener('scroll', handleScroll
|
|
51
|
+
target.removeEventListener('scroll', handleScroll, {
|
|
52
|
+
passive: true
|
|
53
|
+
});
|
|
50
54
|
}; // See Option 3. https://github.com/facebook/react/issues/14476#issuecomment-471199055
|
|
51
55
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
52
56
|
}, [target, getTrigger, JSON.stringify(other)]);
|
package/node/Badge/Badge.js
CHANGED
|
@@ -251,7 +251,7 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
|
251
251
|
Root: BadgeRoot,
|
|
252
252
|
Badge: BadgeBadge
|
|
253
253
|
}, components),
|
|
254
|
-
className: (0, _clsx.default)(
|
|
254
|
+
className: (0, _clsx.default)((_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.className, classes.root, className),
|
|
255
255
|
componentsProps: {
|
|
256
256
|
root: (0, _extends2.default)({}, componentsProps.root, (0, _shouldSpreadAdditionalProps.default)(components.Root) && {
|
|
257
257
|
as: component,
|
|
File without changes
|
package/node/Button/Button.js
CHANGED
|
@@ -37,7 +37,8 @@ var _ButtonGroupContext = _interopRequireDefault(require("../ButtonGroup/ButtonG
|
|
|
37
37
|
|
|
38
38
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
39
39
|
|
|
40
|
-
const _excluded = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"]
|
|
40
|
+
const _excluded = ["children", "color", "component", "className", "disabled", "disableElevation", "disableFocusRipple", "endIcon", "focusVisibleClassName", "fullWidth", "size", "startIcon", "type", "variant"],
|
|
41
|
+
_excluded2 = ["root"];
|
|
41
42
|
|
|
42
43
|
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); }
|
|
43
44
|
|
|
@@ -282,7 +283,13 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
|
282
283
|
type,
|
|
283
284
|
variant
|
|
284
285
|
});
|
|
285
|
-
|
|
286
|
+
|
|
287
|
+
const _useUtilityClasses = useUtilityClasses(ownerState),
|
|
288
|
+
{
|
|
289
|
+
root: classesRoot
|
|
290
|
+
} = _useUtilityClasses,
|
|
291
|
+
classes = (0, _objectWithoutPropertiesLoose2.default)(_useUtilityClasses, _excluded2);
|
|
292
|
+
|
|
286
293
|
const startIcon = startIconProp && /*#__PURE__*/(0, _jsxRuntime.jsx)(ButtonStartIcon, {
|
|
287
294
|
className: classes.startIcon,
|
|
288
295
|
ownerState: ownerState,
|
|
@@ -295,7 +302,7 @@ const Button = /*#__PURE__*/React.forwardRef(function Button(inProps, ref) {
|
|
|
295
302
|
});
|
|
296
303
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(ButtonRoot, (0, _extends2.default)({
|
|
297
304
|
ownerState: ownerState,
|
|
298
|
-
className: (0, _clsx.default)(className,
|
|
305
|
+
className: (0, _clsx.default)(contextProps.className, classesRoot, className),
|
|
299
306
|
component: component,
|
|
300
307
|
disabled: disabled,
|
|
301
308
|
focusRipple: !disableFocusRipple,
|
|
@@ -333,7 +333,7 @@ const TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps,
|
|
|
333
333
|
stop
|
|
334
334
|
}), [pulsate, start, stop]);
|
|
335
335
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(TouchRippleRoot, (0, _extends2.default)({
|
|
336
|
-
className: (0, _clsx.default)(
|
|
336
|
+
className: (0, _clsx.default)(_touchRippleClasses.default.root, classes.root, className),
|
|
337
337
|
ref: container
|
|
338
338
|
}, other, {
|
|
339
339
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactTransitionGroup.TransitionGroup, {
|
package/node/Chip/Chip.js
CHANGED
|
@@ -60,7 +60,7 @@ const useUtilityClasses = ownerState => {
|
|
|
60
60
|
label: ['label', `label${(0, _capitalize.default)(size)}`],
|
|
61
61
|
avatar: ['avatar', `avatar${(0, _capitalize.default)(size)}`, `avatarColor${(0, _capitalize.default)(color)}`],
|
|
62
62
|
icon: ['icon', `icon${(0, _capitalize.default)(size)}`, `iconColor${(0, _capitalize.default)(color)}`],
|
|
63
|
-
deleteIcon: ['deleteIcon', `deleteIcon${(0, _capitalize.default)(size)}`, `deleteIconColor${(0, _capitalize.default)(color)}`, `
|
|
63
|
+
deleteIcon: ['deleteIcon', `deleteIcon${(0, _capitalize.default)(size)}`, `deleteIconColor${(0, _capitalize.default)(color)}`, `deleteIcon${(0, _capitalize.default)(variant)}Color${(0, _capitalize.default)(color)}`]
|
|
64
64
|
};
|
|
65
65
|
return (0, _base.unstable_composeClasses)(slots, _chipClasses.getChipUtilityClass, classes);
|
|
66
66
|
};
|
|
@@ -98,8 +98,8 @@ const ChipRoot = (0, _styled.default)('div', {
|
|
|
98
98
|
}, {
|
|
99
99
|
[`& .${_chipClasses.default.deleteIcon}`]: styles[`deleteIconColor${(0, _capitalize.default)(color)}`]
|
|
100
100
|
}, {
|
|
101
|
-
[`& .${_chipClasses.default.deleteIcon}`]: styles[`
|
|
102
|
-
}, styles.root, styles[`size${(0, _capitalize.default)(size)}`], styles[`color${(0, _capitalize.default)(color)}`], clickable && styles.clickable, clickable && color !== 'default' && styles[`clickableColor${(0, _capitalize.default)(color)})`], onDelete && styles.deletable, onDelete && color !== 'default' && styles[`deletableColor${(0, _capitalize.default)(color)}`], styles[variant],
|
|
101
|
+
[`& .${_chipClasses.default.deleteIcon}`]: styles[`deleteIcon${(0, _capitalize.default)(variant)}Color${(0, _capitalize.default)(color)}`]
|
|
102
|
+
}, styles.root, styles[`size${(0, _capitalize.default)(size)}`], styles[`color${(0, _capitalize.default)(color)}`], clickable && styles.clickable, clickable && color !== 'default' && styles[`clickableColor${(0, _capitalize.default)(color)})`], onDelete && styles.deletable, onDelete && color !== 'default' && styles[`deletableColor${(0, _capitalize.default)(color)}`], styles[variant], styles[`${variant}${(0, _capitalize.default)(color)}`]];
|
|
103
103
|
}
|
|
104
104
|
})(({
|
|
105
105
|
theme,
|
|
@@ -365,7 +365,6 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
365
365
|
};
|
|
366
366
|
|
|
367
367
|
const clickable = clickableProp !== false && onClick ? true : clickableProp;
|
|
368
|
-
const small = size === 'small';
|
|
369
368
|
const component = clickable || onDelete ? _ButtonBase.default : ComponentProp || 'div';
|
|
370
369
|
const ownerState = (0, _extends2.default)({}, props, {
|
|
371
370
|
component,
|
|
@@ -386,12 +385,11 @@ const Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {
|
|
|
386
385
|
let deleteIcon = null;
|
|
387
386
|
|
|
388
387
|
if (onDelete) {
|
|
389
|
-
const customClasses = (0, _clsx.default)(color !== 'default' && (variant === 'outlined' ? classes[`deleteIconOutlinedColor${(0, _capitalize.default)(color)}`] : classes[`deleteIconColor${(0, _capitalize.default)(color)}`]), small && classes.deleteIconSmall);
|
|
390
388
|
deleteIcon = deleteIconProp && /*#__PURE__*/React.isValidElement(deleteIconProp) ? /*#__PURE__*/React.cloneElement(deleteIconProp, {
|
|
391
|
-
className: (0, _clsx.default)(deleteIconProp.props.className, classes.deleteIcon
|
|
389
|
+
className: (0, _clsx.default)(deleteIconProp.props.className, classes.deleteIcon),
|
|
392
390
|
onClick: handleDeleteIconClick
|
|
393
391
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_Cancel.default, {
|
|
394
|
-
className: (0, _clsx.default)(classes.deleteIcon
|
|
392
|
+
className: (0, _clsx.default)(classes.deleteIcon),
|
|
395
393
|
onClick: handleDeleteIconClick
|
|
396
394
|
});
|
|
397
395
|
}
|
package/node/Chip/chipClasses.js
CHANGED
|
@@ -12,6 +12,6 @@ function getChipUtilityClass(slot) {
|
|
|
12
12
|
return (0, _base.generateUtilityClass)('MuiChip', slot);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const chipClasses = (0, _base.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']);
|
|
15
|
+
const chipClasses = (0, _base.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']);
|
|
16
16
|
var _default = chipClasses;
|
|
17
17
|
exports.default = _default;
|
package/node/Dialog/Dialog.js
CHANGED
|
@@ -320,7 +320,8 @@ process.env.NODE_ENV !== "production" ? Dialog.propTypes
|
|
|
320
320
|
|
|
321
321
|
/**
|
|
322
322
|
* A backdrop component. This prop enables custom backdrop rendering.
|
|
323
|
-
* @deprecated Use `components.Backdrop` instead.
|
|
323
|
+
* @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
|
|
324
|
+
* Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
|
|
324
325
|
* @default styled(Backdrop, {
|
|
325
326
|
* name: 'MuiModal',
|
|
326
327
|
* slot: 'Backdrop',
|
|
@@ -202,7 +202,9 @@ process.env.NODE_ENV !== "production" ? FormHelperText.propTypes
|
|
|
202
202
|
/**
|
|
203
203
|
* The variant to use.
|
|
204
204
|
*/
|
|
205
|
-
variant: _propTypes.default
|
|
205
|
+
variant: _propTypes.default
|
|
206
|
+
/* @typescript-to-proptypes-ignore */
|
|
207
|
+
.oneOfType([_propTypes.default.oneOf(['filled', 'outlined', 'standard']), _propTypes.default.string])
|
|
206
208
|
} : void 0;
|
|
207
209
|
var _default = FormHelperText;
|
|
208
210
|
exports.default = _default;
|
package/node/Grid/Grid.js
CHANGED
|
@@ -155,6 +155,32 @@ function generateDirection({
|
|
|
155
155
|
return output;
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Extracts zero value breakpoint keys before a non-zero value breakpoint key.
|
|
160
|
+
* @example { xs: 0, sm: 0, md: 2, lg: 0, xl: 0 } or [0, 0, 2, 0, 0]
|
|
161
|
+
* @returns [xs, sm]
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
function extractZeroValueBreakpointKeys({
|
|
166
|
+
breakpoints,
|
|
167
|
+
values
|
|
168
|
+
}) {
|
|
169
|
+
let nonZeroKey = '';
|
|
170
|
+
Object.keys(values).forEach(key => {
|
|
171
|
+
if (nonZeroKey !== '') {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (values[key] !== 0) {
|
|
176
|
+
nonZeroKey = key;
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
const sortedBreakpointKeysByValue = Object.keys(breakpoints).sort((a, b) => {
|
|
180
|
+
return breakpoints[a] - breakpoints[b];
|
|
181
|
+
});
|
|
182
|
+
return sortedBreakpointKeysByValue.slice(0, sortedBreakpointKeysByValue.indexOf(nonZeroKey));
|
|
183
|
+
}
|
|
158
184
|
|
|
159
185
|
function generateRowGap({
|
|
160
186
|
theme,
|
|
@@ -171,9 +197,20 @@ function generateRowGap({
|
|
|
171
197
|
values: rowSpacing,
|
|
172
198
|
breakpoints: theme.breakpoints.values
|
|
173
199
|
});
|
|
200
|
+
let zeroValueBreakpointKeys;
|
|
201
|
+
|
|
202
|
+
if (typeof rowSpacingValues === 'object') {
|
|
203
|
+
zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({
|
|
204
|
+
breakpoints: theme.breakpoints.values,
|
|
205
|
+
values: rowSpacingValues
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
|
|
174
209
|
styles = (0, _system.handleBreakpoints)({
|
|
175
210
|
theme
|
|
176
|
-
}, rowSpacingValues, propValue => {
|
|
211
|
+
}, rowSpacingValues, (propValue, breakpoint) => {
|
|
212
|
+
var _zeroValueBreakpointK;
|
|
213
|
+
|
|
177
214
|
const themeSpacing = theme.spacing(propValue);
|
|
178
215
|
|
|
179
216
|
if (themeSpacing !== '0px') {
|
|
@@ -185,7 +222,16 @@ function generateRowGap({
|
|
|
185
222
|
};
|
|
186
223
|
}
|
|
187
224
|
|
|
188
|
-
|
|
225
|
+
if ((_zeroValueBreakpointK = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK.includes(breakpoint)) {
|
|
226
|
+
return {};
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
return {
|
|
230
|
+
marginTop: 0,
|
|
231
|
+
[`& > .${_gridClasses.default.item}`]: {
|
|
232
|
+
paddingTop: 0
|
|
233
|
+
}
|
|
234
|
+
};
|
|
189
235
|
});
|
|
190
236
|
}
|
|
191
237
|
|
|
@@ -207,9 +253,20 @@ function generateColumnGap({
|
|
|
207
253
|
values: columnSpacing,
|
|
208
254
|
breakpoints: theme.breakpoints.values
|
|
209
255
|
});
|
|
256
|
+
let zeroValueBreakpointKeys;
|
|
257
|
+
|
|
258
|
+
if (typeof columnSpacingValues === 'object') {
|
|
259
|
+
zeroValueBreakpointKeys = extractZeroValueBreakpointKeys({
|
|
260
|
+
breakpoints: theme.breakpoints.values,
|
|
261
|
+
values: columnSpacingValues
|
|
262
|
+
});
|
|
263
|
+
}
|
|
264
|
+
|
|
210
265
|
styles = (0, _system.handleBreakpoints)({
|
|
211
266
|
theme
|
|
212
|
-
}, columnSpacingValues, propValue => {
|
|
267
|
+
}, columnSpacingValues, (propValue, breakpoint) => {
|
|
268
|
+
var _zeroValueBreakpointK2;
|
|
269
|
+
|
|
213
270
|
const themeSpacing = theme.spacing(propValue);
|
|
214
271
|
|
|
215
272
|
if (themeSpacing !== '0px') {
|
|
@@ -222,7 +279,17 @@ function generateColumnGap({
|
|
|
222
279
|
};
|
|
223
280
|
}
|
|
224
281
|
|
|
225
|
-
|
|
282
|
+
if ((_zeroValueBreakpointK2 = zeroValueBreakpointKeys) != null && _zeroValueBreakpointK2.includes(breakpoint)) {
|
|
283
|
+
return {};
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
return {
|
|
287
|
+
width: '100%',
|
|
288
|
+
marginLeft: 0,
|
|
289
|
+
[`& > .${_gridClasses.default.item}`]: {
|
|
290
|
+
paddingLeft: 0
|
|
291
|
+
}
|
|
292
|
+
};
|
|
226
293
|
});
|
|
227
294
|
}
|
|
228
295
|
|
|
@@ -67,9 +67,8 @@ const ImageListItemRoot = (0, _styled.default)('li', {
|
|
|
67
67
|
})(({
|
|
68
68
|
ownerState
|
|
69
69
|
}) => (0, _extends2.default)({
|
|
70
|
-
display: '
|
|
71
|
-
position: 'relative'
|
|
72
|
-
lineHeight: 0
|
|
70
|
+
display: 'block',
|
|
71
|
+
position: 'relative'
|
|
73
72
|
}, ownerState.variant === 'standard' && {
|
|
74
73
|
// For titlebar under list item
|
|
75
74
|
display: 'flex',
|
|
@@ -84,7 +83,8 @@ const ImageListItemRoot = (0, _styled.default)('li', {
|
|
|
84
83
|
[`& .${_imageListItemClasses.default.img}`]: (0, _extends2.default)({
|
|
85
84
|
objectFit: 'cover',
|
|
86
85
|
width: '100%',
|
|
87
|
-
height: '100%'
|
|
86
|
+
height: '100%',
|
|
87
|
+
display: 'block'
|
|
88
88
|
}, ownerState.variant === 'standard' && {
|
|
89
89
|
height: 'auto',
|
|
90
90
|
flexGrow: 1
|
|
@@ -81,13 +81,14 @@ const useUtilityClasses = ownerState => {
|
|
|
81
81
|
fullWidth,
|
|
82
82
|
hiddenLabel,
|
|
83
83
|
multiline,
|
|
84
|
+
readOnly,
|
|
84
85
|
size,
|
|
85
86
|
startAdornment,
|
|
86
87
|
type
|
|
87
88
|
} = ownerState;
|
|
88
89
|
const slots = {
|
|
89
|
-
root: ['root', `color${(0, _capitalize.default)(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel'],
|
|
90
|
-
input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd']
|
|
90
|
+
root: ['root', `color${(0, _capitalize.default)(color)}`, disabled && 'disabled', error && 'error', fullWidth && 'fullWidth', focused && 'focused', formControl && 'formControl', size === 'small' && 'sizeSmall', multiline && 'multiline', startAdornment && 'adornedStart', endAdornment && 'adornedEnd', hiddenLabel && 'hiddenLabel', readOnly && 'readOnly'],
|
|
91
|
+
input: ['input', disabled && 'disabled', type === 'search' && 'inputTypeSearch', multiline && 'inputMultiline', size === 'small' && 'inputSizeSmall', hiddenLabel && 'inputHiddenLabel', startAdornment && 'inputAdornedStart', endAdornment && 'inputAdornedEnd', readOnly && 'readOnly']
|
|
91
92
|
};
|
|
92
93
|
return (0, _base.unstable_composeClasses)(slots, _inputBaseClasses.getInputBaseUtilityClass, classes);
|
|
93
94
|
};
|
|
@@ -12,6 +12,6 @@ function getInputBaseUtilityClass(slot) {
|
|
|
12
12
|
return (0, _base.generateUtilityClass)('MuiInputBase', slot);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const inputBaseClasses = (0, _base.generateUtilityClasses)('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);
|
|
15
|
+
const inputBaseClasses = (0, _base.generateUtilityClasses)('MuiInputBase', ['root', 'formControl', 'focused', 'disabled', 'adornedStart', 'adornedEnd', 'error', 'sizeSmall', 'multiline', 'colorSecondary', 'fullWidth', 'hiddenLabel', 'readOnly', 'input', 'inputSizeSmall', 'inputMultiline', 'inputTypeSearch', 'inputAdornedStart', 'inputAdornedEnd', 'inputHiddenLabel']);
|
|
16
16
|
var _default = inputBaseClasses;
|
|
17
17
|
exports.default = _default;
|
package/node/Modal/Modal.js
CHANGED
|
@@ -162,7 +162,8 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
162
162
|
|
|
163
163
|
/**
|
|
164
164
|
* A backdrop component. This prop enables custom backdrop rendering.
|
|
165
|
-
* @deprecated Use `components.Backdrop` instead.
|
|
165
|
+
* @deprecated Use `components.Backdrop` instead. While this prop currently works, it will be removed in the next major version.
|
|
166
|
+
* Use the `components.Backdrop` prop to make your application ready for the next version of Material UI.
|
|
166
167
|
* @default styled(Backdrop, {
|
|
167
168
|
* name: 'MuiModal',
|
|
168
169
|
* slot: 'Backdrop',
|
package/node/Popper/Popper.js
CHANGED
|
@@ -82,6 +82,30 @@ process.env.NODE_ENV !== "production" ? Popper.propTypes
|
|
|
82
82
|
/* @typescript-to-proptypes-ignore */
|
|
83
83
|
.oneOfType([_propTypes.default.node, _propTypes.default.func]),
|
|
84
84
|
|
|
85
|
+
/**
|
|
86
|
+
* @ignore
|
|
87
|
+
*/
|
|
88
|
+
component: _propTypes.default
|
|
89
|
+
/* @typescript-to-proptypes-ignore */
|
|
90
|
+
.elementType,
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* The components used for each slot inside the Popper.
|
|
94
|
+
* Either a string to use a HTML element or a component.
|
|
95
|
+
* @default {}
|
|
96
|
+
*/
|
|
97
|
+
components: _propTypes.default.shape({
|
|
98
|
+
Root: _propTypes.default.elementType
|
|
99
|
+
}),
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The props used for each slot inside the Popper.
|
|
103
|
+
* @default {}
|
|
104
|
+
*/
|
|
105
|
+
componentsProps: _propTypes.default.shape({
|
|
106
|
+
root: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.object])
|
|
107
|
+
}),
|
|
108
|
+
|
|
85
109
|
/**
|
|
86
110
|
* An HTML element or function that returns one.
|
|
87
111
|
* The `container` will have the portal children appended to it.
|
|
@@ -533,7 +533,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
533
533
|
onFocus: onFocus
|
|
534
534
|
}, SelectDisplayProps, {
|
|
535
535
|
ownerState: ownerState,
|
|
536
|
-
className: (0, _clsx.default)(classes.select, className
|
|
536
|
+
className: (0, _clsx.default)(SelectDisplayProps.className, classes.select, className) // The id is required for proper a11y
|
|
537
537
|
,
|
|
538
538
|
id: buttonId,
|
|
539
539
|
children: isEmpty(display) ? // notranslate needed while Google Translate will not fix zero-width space issue
|
|
@@ -111,6 +111,8 @@ const SkeletonRoot = (0, _styled.default)('span', {
|
|
|
111
111
|
}
|
|
112
112
|
}, ownerState.variant === 'circular' && {
|
|
113
113
|
borderRadius: '50%'
|
|
114
|
+
}, ownerState.variant === 'rounded' && {
|
|
115
|
+
borderRadius: (theme.vars || theme).shape.borderRadius
|
|
114
116
|
}, ownerState.hasChildren && {
|
|
115
117
|
'& > *': {
|
|
116
118
|
visibility: 'hidden'
|
|
@@ -243,7 +245,7 @@ process.env.NODE_ENV !== "production" ? Skeleton.propTypes
|
|
|
243
245
|
*/
|
|
244
246
|
variant: _propTypes.default
|
|
245
247
|
/* @typescript-to-proptypes-ignore */
|
|
246
|
-
.oneOfType([_propTypes.default.oneOf(['circular', 'rectangular', 'text']), _propTypes.default.string]),
|
|
248
|
+
.oneOfType([_propTypes.default.oneOf(['circular', 'rectangular', 'rounded', 'text']), _propTypes.default.string]),
|
|
247
249
|
|
|
248
250
|
/**
|
|
249
251
|
* Width of the skeleton.
|
|
@@ -12,6 +12,6 @@ function getSkeletonUtilityClass(slot) {
|
|
|
12
12
|
return (0, _base.generateUtilityClass)('MuiSkeleton', slot);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const skeletonClasses = (0, _base.generateUtilityClasses)('MuiSkeleton', ['root', 'text', 'rectangular', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);
|
|
15
|
+
const skeletonClasses = (0, _base.generateUtilityClasses)('MuiSkeleton', ['root', 'text', 'rectangular', 'rounded', 'circular', 'pulse', 'wave', 'withChildren', 'fitContent', 'heightAuto']);
|
|
16
16
|
var _default = skeletonClasses;
|
|
17
17
|
exports.default = _default;
|
package/node/Stack/Stack.js
CHANGED
|
@@ -67,7 +67,8 @@ const style = ({
|
|
|
67
67
|
theme
|
|
68
68
|
}) => {
|
|
69
69
|
let styles = (0, _extends2.default)({
|
|
70
|
-
display: 'flex'
|
|
70
|
+
display: 'flex',
|
|
71
|
+
flexDirection: 'column'
|
|
71
72
|
}, (0, _system.handleBreakpoints)({
|
|
72
73
|
theme
|
|
73
74
|
}, (0, _system.unstable_resolveBreakpointValues)({
|
|
@@ -95,6 +96,17 @@ const style = ({
|
|
|
95
96
|
base
|
|
96
97
|
});
|
|
97
98
|
|
|
99
|
+
if (typeof directionValues === 'object') {
|
|
100
|
+
Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {
|
|
101
|
+
const directionValue = directionValues[breakpoint];
|
|
102
|
+
|
|
103
|
+
if (!directionValue) {
|
|
104
|
+
const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
|
|
105
|
+
directionValues[breakpoint] = previousDirectionValue;
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
|
|
98
110
|
const styleFromPropValue = (propValue, breakpoint) => {
|
|
99
111
|
return {
|
|
100
112
|
'& > :not(style) + :not(style)': {
|
|
@@ -109,6 +121,7 @@ const style = ({
|
|
|
109
121
|
}, spacingValues, styleFromPropValue));
|
|
110
122
|
}
|
|
111
123
|
|
|
124
|
+
styles = (0, _system.mergeBreakpointsInOrder)(theme.breakpoints, styles);
|
|
112
125
|
return styles;
|
|
113
126
|
};
|
|
114
127
|
|
|
@@ -52,7 +52,7 @@ const useUtilityClasses = ownerState => {
|
|
|
52
52
|
const slots = {
|
|
53
53
|
root: ['root', orientation, error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
|
|
54
54
|
label: ['label', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
|
|
55
|
-
iconContainer: ['iconContainer', alternativeLabel && 'alternativeLabel'],
|
|
55
|
+
iconContainer: ['iconContainer', active && 'active', completed && 'completed', error && 'error', disabled && 'disabled', alternativeLabel && 'alternativeLabel'],
|
|
56
56
|
labelContainer: ['labelContainer']
|
|
57
57
|
};
|
|
58
58
|
return (0, _base.unstable_composeClasses)(slots, _stepLabelClasses.getStepLabelUtilityClass, classes);
|
|
@@ -235,7 +235,9 @@ process.env.NODE_ENV !== "production" ? TableCell.propTypes
|
|
|
235
235
|
* Specify the size of the cell.
|
|
236
236
|
* The prop defaults to the value (`'medium'`) inherited from the parent Table component.
|
|
237
237
|
*/
|
|
238
|
-
size: _propTypes.default
|
|
238
|
+
size: _propTypes.default
|
|
239
|
+
/* @typescript-to-proptypes-ignore */
|
|
240
|
+
.oneOfType([_propTypes.default.oneOf(['medium', 'small']), _propTypes.default.string]),
|
|
239
241
|
|
|
240
242
|
/**
|
|
241
243
|
* Set aria-sort direction.
|
package/node/Tabs/Tabs.js
CHANGED
|
@@ -802,7 +802,9 @@ process.env.NODE_ENV !== "production" ? Tabs.propTypes
|
|
|
802
802
|
* Determines the color of the indicator.
|
|
803
803
|
* @default 'primary'
|
|
804
804
|
*/
|
|
805
|
-
indicatorColor: _propTypes.default
|
|
805
|
+
indicatorColor: _propTypes.default
|
|
806
|
+
/* @typescript-to-proptypes-ignore */
|
|
807
|
+
.oneOfType([_propTypes.default.oneOf(['primary', 'secondary']), _propTypes.default.string]),
|
|
806
808
|
|
|
807
809
|
/**
|
|
808
810
|
* Callback fired when the value changes.
|
package/node/Tooltip/Tooltip.js
CHANGED
|
@@ -219,7 +219,7 @@ const TooltipArrow = (0, _styled.default)('span', {
|
|
|
219
219
|
/* = width / sqrt(2) = (length of the hypotenuse) */
|
|
220
220
|
,
|
|
221
221
|
boxSizing: 'border-box',
|
|
222
|
-
color: theme.vars ?
|
|
222
|
+
color: theme.vars ? theme.vars.palette.Tooltip.bg : (0, _system.alpha)(theme.palette.grey[700], 0.9),
|
|
223
223
|
'&::before': {
|
|
224
224
|
content: '""',
|
|
225
225
|
margin: 'auto',
|
|
@@ -371,15 +371,12 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
371
371
|
const handleEnter = event => {
|
|
372
372
|
if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {
|
|
373
373
|
return;
|
|
374
|
-
} // Workaround for https://github.com/facebook/react/issues/7769
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
if (!childNode) {
|
|
378
|
-
setChildNode(event.currentTarget);
|
|
379
374
|
} // Remove the title ahead of time.
|
|
380
375
|
// We don't want to wait for the next render commit.
|
|
381
376
|
// We would risk displaying two tooltips at the same time (native + this one).
|
|
382
|
-
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
if (childNode) {
|
|
383
380
|
childNode.removeAttribute('title');
|
|
384
381
|
}
|
|
385
382
|
|
|
@@ -424,6 +421,8 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
424
421
|
|
|
425
422
|
const handleFocus = event => {
|
|
426
423
|
// Workaround for https://github.com/facebook/react/issues/7769
|
|
424
|
+
// The autoFocus of React might trigger the event before the componentDidMount.
|
|
425
|
+
// We need to account for this eventuality.
|
|
427
426
|
if (!childNode) {
|
|
428
427
|
setChildNode(event.currentTarget);
|
|
429
428
|
}
|
package/node/index.js
CHANGED
|
@@ -40,6 +40,12 @@ function createTheme(options = {}, ...args) {
|
|
|
40
40
|
typography: typographyInput = {}
|
|
41
41
|
} = options,
|
|
42
42
|
other = (0, _objectWithoutPropertiesLoose2.default)(options, _excluded);
|
|
43
|
+
|
|
44
|
+
if (options.vars) {
|
|
45
|
+
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: \`vars\` is a private field used for CSS variables support.
|
|
46
|
+
Please use another name.` : (0, _utils.formatMuiErrorMessage)(18));
|
|
47
|
+
}
|
|
48
|
+
|
|
43
49
|
const palette = (0, _createPalette.default)(paletteInput);
|
|
44
50
|
const systemTheme = (0, _system.createTheme)(options);
|
|
45
51
|
let muiTheme = (0, _utils.deepmerge)(systemTheme, {
|
|
@@ -60,9 +60,13 @@ function useScrollTrigger(options = {}) {
|
|
|
60
60
|
|
|
61
61
|
handleScroll(); // Re-evaluate trigger when dependencies change
|
|
62
62
|
|
|
63
|
-
target.addEventListener('scroll', handleScroll
|
|
63
|
+
target.addEventListener('scroll', handleScroll, {
|
|
64
|
+
passive: true
|
|
65
|
+
});
|
|
64
66
|
return () => {
|
|
65
|
-
target.removeEventListener('scroll', handleScroll
|
|
67
|
+
target.removeEventListener('scroll', handleScroll, {
|
|
68
|
+
passive: true
|
|
69
|
+
});
|
|
66
70
|
}; // See Option 3. https://github.com/facebook/react/issues/14476#issuecomment-471199055
|
|
67
71
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
72
|
}, [target, getTrigger, JSON.stringify(other)]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.10.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
|
@@ -46,16 +46,16 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/runtime": "^7.17.2",
|
|
49
|
-
"@mui/base": "5.0.0-alpha.
|
|
50
|
-
"@mui/system": "^5.
|
|
51
|
-
"@mui/types": "^7.1.
|
|
52
|
-
"@mui/utils": "^5.9.
|
|
49
|
+
"@mui/base": "5.0.0-alpha.92",
|
|
50
|
+
"@mui/system": "^5.10.0",
|
|
51
|
+
"@mui/types": "^7.1.5",
|
|
52
|
+
"@mui/utils": "^5.9.3",
|
|
53
53
|
"@types/react-transition-group": "^4.4.5",
|
|
54
54
|
"clsx": "^1.2.1",
|
|
55
55
|
"csstype": "^3.1.0",
|
|
56
56
|
"prop-types": "^15.8.1",
|
|
57
57
|
"react-is": "^18.2.0",
|
|
58
|
-
"react-transition-group": "^4.4.
|
|
58
|
+
"react-transition-group": "^4.4.5"
|
|
59
59
|
},
|
|
60
60
|
"sideEffects": false,
|
|
61
61
|
"publishConfig": {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SupportedColorScheme } from './experimental_extendTheme';
|
|
3
|
-
declare const shouldSkipGeneratingVar: (keys: string[]) => boolean;
|
|
4
|
-
declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
|
|
5
|
-
theme?: {
|
|
6
|
-
cssVarPrefix?: string | undefined;
|
|
7
|
-
colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
|
|
8
|
-
} | undefined;
|
|
9
|
-
documentNode?: Document | null | undefined;
|
|
10
|
-
colorSchemeNode?: Document | HTMLElement | null | undefined;
|
|
11
|
-
colorSchemeSelector?: string | undefined;
|
|
12
|
-
storageWindow?: Window | null | undefined;
|
|
13
|
-
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
|
|
14
|
-
export { useColorScheme, getInitColorSchemeScript, shouldSkipGeneratingVar, CssVarsProvider as Experimental_CssVarsProvider, };
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SupportedColorScheme } from './experimental_extendTheme';
|
|
3
|
+
declare const shouldSkipGeneratingVar: (keys: string[]) => boolean;
|
|
4
|
+
declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
|
|
5
|
+
theme?: {
|
|
6
|
+
cssVarPrefix?: string | undefined;
|
|
7
|
+
colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
|
|
8
|
+
} | undefined;
|
|
9
|
+
documentNode?: Document | null | undefined;
|
|
10
|
+
colorSchemeNode?: Document | HTMLElement | null | undefined;
|
|
11
|
+
colorSchemeSelector?: string | undefined;
|
|
12
|
+
storageWindow?: Window | null | undefined;
|
|
13
|
+
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
|
|
14
|
+
export { useColorScheme, getInitColorSchemeScript, shouldSkipGeneratingVar, CssVarsProvider as Experimental_CssVarsProvider, };
|