@mui/material 5.11.10 → 5.11.11
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/Autocomplete.d.ts +3 -1
- 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/buttonClasses.d.ts +100 -100
- 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 +89 -0
- 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/chipClasses.d.ts +96 -96
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/Container.js +0 -1
- package/Container/containerClasses.d.ts +6 -6
- 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/FormControlContext.d.ts +17 -17
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControl/useFormControl.d.ts +2 -2
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +34 -34
- package/ImageList/imageListClasses.d.ts +16 -16
- 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 +2 -2
- package/InputBase/inputBaseClasses.d.ts +46 -46
- package/InputLabel/InputLabel.js +3 -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/ListSubheader.js +1 -0
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MenuList/MenuList.js +7 -0
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/Modal/Modal.d.ts +9 -1
- package/Modal/Modal.js +14 -9
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/OutlinedInput.js +1 -1
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- 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 +55 -55
- package/README.md +0 -2
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/Rating.js +2 -2
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/SelectInput.js +2 -22
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +26 -26
- package/Slider/Slider.d.ts +5 -1
- package/Slider/Slider.js +16 -11
- package/Slider/SliderValueLabel.d.ts +15 -15
- package/Slider/SliderValueLabel.types.d.ts +24 -24
- package/Slider/sliderClasses.d.ts +58 -58
- package/Snackbar/Snackbar.js +21 -125
- 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.d.ts +0 -1
- package/Stack/Stack.js +9 -120
- package/Stack/index.d.ts +3 -0
- package/Stack/index.js +2 -1
- package/Stack/stackClasses.d.ts +6 -0
- package/Stack/stackClasses.js +7 -0
- 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/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +26 -26
- 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/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/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/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/Unstable_Grid2/Grid2.d.ts +4 -4
- package/Unstable_Grid2/Grid2.js +2 -3
- 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/generateUtilityClass/index.d.ts +2 -2
- package/generateUtilityClasses/index.d.ts +1 -1
- 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/Container/Container.js +0 -1
- package/legacy/InputBase/InputBase.js +2 -2
- package/legacy/InputLabel/InputLabel.js +3 -1
- package/legacy/ListSubheader/ListSubheader.js +1 -0
- package/legacy/MenuList/MenuList.js +7 -0
- package/legacy/Modal/Modal.js +14 -9
- package/legacy/OutlinedInput/OutlinedInput.js +1 -1
- package/legacy/Rating/Rating.js +2 -2
- package/legacy/Select/SelectInput.js +2 -22
- package/legacy/Slider/Slider.js +16 -12
- package/legacy/Snackbar/Snackbar.js +20 -119
- package/legacy/Stack/Stack.js +13 -122
- package/legacy/Stack/index.js +2 -1
- package/legacy/Stack/stackClasses.js +7 -0
- package/legacy/Unstable_Grid2/Grid2.js +2 -3
- package/legacy/index.js +1 -1
- package/legacy/styles/createTheme.js +1 -0
- package/legacy/useAutocomplete/useAutocomplete.js +2 -2
- package/locale/index.d.ts +75 -75
- package/modern/Badge/Badge.js +1 -1
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Container/Container.js +0 -1
- package/modern/InputBase/InputBase.js +2 -2
- package/modern/InputLabel/InputLabel.js +3 -1
- package/modern/ListSubheader/ListSubheader.js +1 -0
- package/modern/MenuList/MenuList.js +7 -0
- package/modern/Modal/Modal.js +14 -9
- package/modern/OutlinedInput/OutlinedInput.js +1 -1
- package/modern/Rating/Rating.js +2 -2
- package/modern/Select/SelectInput.js +2 -18
- package/modern/Slider/Slider.js +16 -11
- package/modern/Snackbar/Snackbar.js +21 -125
- package/modern/Stack/Stack.js +9 -120
- package/modern/Stack/index.js +2 -1
- package/modern/Stack/stackClasses.js +7 -0
- package/modern/Unstable_Grid2/Grid2.js +2 -3
- package/modern/index.js +1 -1
- package/modern/styles/createTheme.js +1 -0
- package/modern/useAutocomplete/useAutocomplete.js +2 -2
- package/node/Badge/Badge.js +2 -2
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Container/Container.js +0 -2
- package/node/InputBase/InputBase.js +2 -2
- package/node/InputLabel/InputLabel.js +3 -1
- package/node/ListSubheader/ListSubheader.js +1 -0
- package/node/MenuList/MenuList.js +7 -0
- package/node/Modal/Modal.js +14 -9
- package/node/OutlinedInput/OutlinedInput.js +1 -1
- package/node/Rating/Rating.js +2 -2
- package/node/Select/SelectInput.js +2 -22
- package/node/Slider/Slider.js +19 -14
- package/node/Snackbar/Snackbar.js +20 -124
- package/node/Stack/Stack.js +9 -122
- package/node/Stack/index.js +8 -1
- package/node/Stack/stackClasses.js +16 -0
- package/node/Unstable_Grid2/Grid2.js +0 -1
- package/node/index.js +1 -1
- package/node/styles/createTheme.js +1 -0
- package/node/useAutocomplete/useAutocomplete.js +8 -6
- package/package.json +6 -6
- package/styles/CssVarsProvider.d.ts +16 -16
- package/styles/createTheme.js +1 -0
- package/styles/excludeVariablesFromRoot.d.ts +5 -5
- package/styles/getOverlayAlpha.d.ts +2 -2
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/types/OverridableComponentAugmentation.d.ts +31 -31
- package/umd/material-ui.development.js +4132 -4060
- package/umd/material-ui.production.min.js +21 -21
- package/useAutocomplete/useAutocomplete.d.ts +2 -2
- package/useAutocomplete/useAutocomplete.js +2 -2
- package/useMediaQuery/useMediaQuery.d.ts +46 -46
- 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/node/Slider/Slider.js
CHANGED
|
@@ -12,7 +12,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
13
|
var _utils = require("@mui/utils");
|
|
14
14
|
var _base = require("@mui/base");
|
|
15
|
-
var
|
|
15
|
+
var _useSlider = _interopRequireWildcard(require("@mui/base/useSlider"));
|
|
16
16
|
var _system = require("@mui/system");
|
|
17
17
|
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
18
18
|
var _styled = _interopRequireWildcard(require("../styles/styled"));
|
|
@@ -25,7 +25,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
25
25
|
const _excluded = ["aria-label", "aria-valuetext", "aria-labelledby", "component", "components", "componentsProps", "color", "classes", "className", "disableSwap", "disabled", "getAriaLabel", "getAriaValueText", "marks", "max", "min", "name", "onChange", "onChangeCommitted", "orientation", "size", "step", "scale", "slotProps", "slots", "tabIndex", "track", "value", "valueLabelDisplay", "valueLabelFormat"];
|
|
26
26
|
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); }
|
|
27
27
|
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; }
|
|
28
|
-
const valueToPercent = (value, min, max) => (value - min) * 100 / (max - min);
|
|
29
28
|
function Identity(x) {
|
|
30
29
|
return x;
|
|
31
30
|
}
|
|
@@ -466,7 +465,6 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
466
465
|
componentsProps = {},
|
|
467
466
|
color = 'primary',
|
|
468
467
|
classes: classesProp,
|
|
469
|
-
// eslint-disable-next-line react/prop-types
|
|
470
468
|
className,
|
|
471
469
|
disableSwap = false,
|
|
472
470
|
disabled = false,
|
|
@@ -518,7 +516,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
518
516
|
values,
|
|
519
517
|
trackOffset,
|
|
520
518
|
trackLeap
|
|
521
|
-
} = (0,
|
|
519
|
+
} = (0, _useSlider.default)((0, _extends2.default)({}, ownerState, {
|
|
522
520
|
ref
|
|
523
521
|
}));
|
|
524
522
|
ownerState.marked = marks.length > 0 && marks.some(mark => mark.label);
|
|
@@ -573,7 +571,8 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
573
571
|
elementType: ThumbSlot,
|
|
574
572
|
getSlotProps: getThumbProps,
|
|
575
573
|
externalSlotProps: thumbSlotProps,
|
|
576
|
-
ownerState: (0, _extends2.default)({}, ownerState, thumbSlotProps == null ? void 0 : thumbSlotProps.ownerState)
|
|
574
|
+
ownerState: (0, _extends2.default)({}, ownerState, thumbSlotProps == null ? void 0 : thumbSlotProps.ownerState),
|
|
575
|
+
className: classes.thumb
|
|
577
576
|
});
|
|
578
577
|
const valueLabelProps = (0, _base.useSlotProps)({
|
|
579
578
|
elementType: ValueLabelSlot,
|
|
@@ -590,7 +589,8 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
590
589
|
const markLabelProps = (0, _base.useSlotProps)({
|
|
591
590
|
elementType: MarkLabelSlot,
|
|
592
591
|
externalSlotProps: markLabelSlotProps,
|
|
593
|
-
ownerState
|
|
592
|
+
ownerState,
|
|
593
|
+
className: classes.markLabel
|
|
594
594
|
});
|
|
595
595
|
const inputSliderProps = (0, _base.useSlotProps)({
|
|
596
596
|
elementType: InputSlot,
|
|
@@ -600,7 +600,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
600
600
|
});
|
|
601
601
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RootSlot, (0, _extends2.default)({}, rootProps, {
|
|
602
602
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(RailSlot, (0, _extends2.default)({}, railProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(TrackSlot, (0, _extends2.default)({}, trackProps)), marks.filter(mark => mark.value >= min && mark.value <= max).map((mark, index) => {
|
|
603
|
-
const percent = valueToPercent(mark.value, min, max);
|
|
603
|
+
const percent = (0, _useSlider.valueToPercent)(mark.value, min, max);
|
|
604
604
|
const style = axisProps[axis].offset(percent);
|
|
605
605
|
let markActive;
|
|
606
606
|
if (track === false) {
|
|
@@ -628,11 +628,13 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
628
628
|
})) : null]
|
|
629
629
|
}, index);
|
|
630
630
|
}), values.map((value, index) => {
|
|
631
|
-
const percent = valueToPercent(value, min, max);
|
|
631
|
+
const percent = (0, _useSlider.valueToPercent)(value, min, max);
|
|
632
632
|
const style = axisProps[axis].offset(percent);
|
|
633
633
|
const ValueLabelComponent = valueLabelDisplay === 'off' ? Forward : ValueLabelSlot;
|
|
634
|
-
return
|
|
635
|
-
|
|
634
|
+
return (
|
|
635
|
+
/*#__PURE__*/
|
|
636
|
+
/* TODO v6: Change component structure. It will help in avoiding the complicated React.cloneElement API added in SliderValueLabel component. Should be: Thumb -> Input, ValueLabel. Follow Joy UI's Slider structure. */
|
|
637
|
+
(0, _jsxRuntime.jsx)(ValueLabelComponent, (0, _extends2.default)({}, !(0, _base.isHostComponent)(ValueLabelComponent) && {
|
|
636
638
|
valueLabelFormat,
|
|
637
639
|
valueLabelDisplay,
|
|
638
640
|
value: typeof valueLabelFormat === 'function' ? valueLabelFormat(scale(value), index) : valueLabelFormat,
|
|
@@ -641,8 +643,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
641
643
|
disabled
|
|
642
644
|
}, valueLabelProps, {
|
|
643
645
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ThumbSlot, (0, _extends2.default)({
|
|
644
|
-
"data-index": index
|
|
645
|
-
"data-focusvisible": focusedThumbIndex === index
|
|
646
|
+
"data-index": index
|
|
646
647
|
}, thumbProps, {
|
|
647
648
|
className: (0, _clsx.default)(classes.thumb, thumbProps.className, active === index && classes.active, focusedThumbIndex === index && classes.focusVisible),
|
|
648
649
|
style: (0, _extends2.default)({}, style, {
|
|
@@ -657,8 +658,8 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
|
657
658
|
value: values[index]
|
|
658
659
|
}, inputSliderProps))
|
|
659
660
|
}))
|
|
660
|
-
}))
|
|
661
|
-
|
|
661
|
+
}), index)
|
|
662
|
+
);
|
|
662
663
|
})]
|
|
663
664
|
}));
|
|
664
665
|
});
|
|
@@ -699,6 +700,10 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes /* remove-proptypes */
|
|
|
699
700
|
* Override or extend the styles applied to the component.
|
|
700
701
|
*/
|
|
701
702
|
classes: _propTypes.default.object,
|
|
703
|
+
/**
|
|
704
|
+
* @ignore
|
|
705
|
+
*/
|
|
706
|
+
className: _propTypes.default.string,
|
|
702
707
|
/**
|
|
703
708
|
* The color of the component.
|
|
704
709
|
* It supports both default and custom theme colors, which can be added as shown in the
|
|
@@ -9,13 +9,12 @@ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runt
|
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
10
|
var React = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
-
var _clsx = _interopRequireDefault(require("clsx"));
|
|
13
12
|
var _base = require("@mui/base");
|
|
14
13
|
var _ClickAwayListener = _interopRequireDefault(require("@mui/base/ClickAwayListener"));
|
|
14
|
+
var _useSnackbar = _interopRequireDefault(require("@mui/base/useSnackbar"));
|
|
15
15
|
var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
16
16
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
17
17
|
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
18
|
-
var _useEventCallback = _interopRequireDefault(require("../utils/useEventCallback"));
|
|
19
18
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
20
19
|
var _Grow = _interopRequireDefault(require("../Grow"));
|
|
21
20
|
var _SnackbarContent = _interopRequireDefault(require("../SnackbarContent"));
|
|
@@ -109,13 +108,7 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
109
108
|
ContentProps,
|
|
110
109
|
disableWindowBlurListener = false,
|
|
111
110
|
message,
|
|
112
|
-
onBlur,
|
|
113
|
-
onClose,
|
|
114
|
-
onFocus,
|
|
115
|
-
onMouseEnter,
|
|
116
|
-
onMouseLeave,
|
|
117
111
|
open,
|
|
118
|
-
resumeHideDuration,
|
|
119
112
|
TransitionComponent = _Grow.default,
|
|
120
113
|
transitionDuration = defaultTransitionDuration,
|
|
121
114
|
TransitionProps: {
|
|
@@ -129,76 +122,27 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
129
122
|
anchorOrigin: {
|
|
130
123
|
vertical,
|
|
131
124
|
horizontal
|
|
132
|
-
}
|
|
125
|
+
},
|
|
126
|
+
autoHideDuration,
|
|
127
|
+
disableWindowBlurListener,
|
|
128
|
+
TransitionComponent,
|
|
129
|
+
transitionDuration
|
|
133
130
|
});
|
|
134
131
|
const classes = useUtilityClasses(ownerState);
|
|
135
|
-
const
|
|
132
|
+
const {
|
|
133
|
+
getRootProps,
|
|
134
|
+
onClickAway
|
|
135
|
+
} = (0, _useSnackbar.default)((0, _extends2.default)({}, ownerState, {
|
|
136
|
+
ref
|
|
137
|
+
}));
|
|
136
138
|
const [exited, setExited] = React.useState(true);
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
139
|
+
const rootProps = (0, _base.useSlotProps)({
|
|
140
|
+
elementType: SnackbarRoot,
|
|
141
|
+
getSlotProps: getRootProps,
|
|
142
|
+
externalForwardedProps: other,
|
|
143
|
+
ownerState,
|
|
144
|
+
className: [classes.root, className]
|
|
141
145
|
});
|
|
142
|
-
const setAutoHideTimer = (0, _useEventCallback.default)(autoHideDurationParam => {
|
|
143
|
-
if (!onClose || autoHideDurationParam == null) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
clearTimeout(timerAutoHide.current);
|
|
147
|
-
timerAutoHide.current = setTimeout(() => {
|
|
148
|
-
handleClose(null, 'timeout');
|
|
149
|
-
}, autoHideDurationParam);
|
|
150
|
-
});
|
|
151
|
-
React.useEffect(() => {
|
|
152
|
-
if (open) {
|
|
153
|
-
setAutoHideTimer(autoHideDuration);
|
|
154
|
-
}
|
|
155
|
-
return () => {
|
|
156
|
-
clearTimeout(timerAutoHide.current);
|
|
157
|
-
};
|
|
158
|
-
}, [open, autoHideDuration, setAutoHideTimer]);
|
|
159
|
-
|
|
160
|
-
// Pause the timer when the user is interacting with the Snackbar
|
|
161
|
-
// or when the user hide the window.
|
|
162
|
-
const handlePause = () => {
|
|
163
|
-
clearTimeout(timerAutoHide.current);
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
// Restart the timer when the user is no longer interacting with the Snackbar
|
|
167
|
-
// or when the window is shown back.
|
|
168
|
-
const handleResume = React.useCallback(() => {
|
|
169
|
-
if (autoHideDuration != null) {
|
|
170
|
-
setAutoHideTimer(resumeHideDuration != null ? resumeHideDuration : autoHideDuration * 0.5);
|
|
171
|
-
}
|
|
172
|
-
}, [autoHideDuration, resumeHideDuration, setAutoHideTimer]);
|
|
173
|
-
const handleFocus = event => {
|
|
174
|
-
if (onFocus) {
|
|
175
|
-
onFocus(event);
|
|
176
|
-
}
|
|
177
|
-
handlePause();
|
|
178
|
-
};
|
|
179
|
-
const handleMouseEnter = event => {
|
|
180
|
-
if (onMouseEnter) {
|
|
181
|
-
onMouseEnter(event);
|
|
182
|
-
}
|
|
183
|
-
handlePause();
|
|
184
|
-
};
|
|
185
|
-
const handleBlur = event => {
|
|
186
|
-
if (onBlur) {
|
|
187
|
-
onBlur(event);
|
|
188
|
-
}
|
|
189
|
-
handleResume();
|
|
190
|
-
};
|
|
191
|
-
const handleMouseLeave = event => {
|
|
192
|
-
if (onMouseLeave) {
|
|
193
|
-
onMouseLeave(event);
|
|
194
|
-
}
|
|
195
|
-
handleResume();
|
|
196
|
-
};
|
|
197
|
-
const handleClickAway = event => {
|
|
198
|
-
if (onClose) {
|
|
199
|
-
onClose(event, 'clickaway');
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
146
|
const handleExited = node => {
|
|
203
147
|
setExited(true);
|
|
204
148
|
if (onExited) {
|
|
@@ -211,63 +155,15 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
211
155
|
onEnter(node, isAppearing);
|
|
212
156
|
}
|
|
213
157
|
};
|
|
214
|
-
React.useEffect(() => {
|
|
215
|
-
// TODO: window global should be refactored here
|
|
216
|
-
if (!disableWindowBlurListener && open) {
|
|
217
|
-
window.addEventListener('focus', handleResume);
|
|
218
|
-
window.addEventListener('blur', handlePause);
|
|
219
|
-
return () => {
|
|
220
|
-
window.removeEventListener('focus', handleResume);
|
|
221
|
-
window.removeEventListener('blur', handlePause);
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
return undefined;
|
|
225
|
-
}, [disableWindowBlurListener, handleResume, open]);
|
|
226
|
-
React.useEffect(() => {
|
|
227
|
-
if (!open) {
|
|
228
|
-
return undefined;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* @param {KeyboardEvent} nativeEvent
|
|
233
|
-
*/
|
|
234
|
-
function handleKeyDown(nativeEvent) {
|
|
235
|
-
if (!nativeEvent.defaultPrevented) {
|
|
236
|
-
// IE11, Edge (prior to using Bink?) use 'Esc'
|
|
237
|
-
if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {
|
|
238
|
-
// not calling `preventDefault` since we don't know if people may ignore this event e.g. a permanently open snackbar
|
|
239
|
-
if (onClose) {
|
|
240
|
-
onClose(nativeEvent, 'escapeKeyDown');
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
document.addEventListener('keydown', handleKeyDown);
|
|
246
|
-
return () => {
|
|
247
|
-
document.removeEventListener('keydown', handleKeyDown);
|
|
248
|
-
};
|
|
249
|
-
}, [exited, open, onClose]);
|
|
250
158
|
|
|
251
159
|
// So we only render active snackbars.
|
|
252
160
|
if (!open && exited) {
|
|
253
161
|
return null;
|
|
254
162
|
}
|
|
255
163
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ClickAwayListener.default, (0, _extends2.default)({
|
|
256
|
-
onClickAway:
|
|
164
|
+
onClickAway: onClickAway
|
|
257
165
|
}, ClickAwayListenerProps, {
|
|
258
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SnackbarRoot, (0, _extends2.default)({
|
|
259
|
-
className: (0, _clsx.default)(classes.root, className),
|
|
260
|
-
onBlur: handleBlur,
|
|
261
|
-
onFocus: handleFocus,
|
|
262
|
-
onMouseEnter: handleMouseEnter,
|
|
263
|
-
onMouseLeave: handleMouseLeave,
|
|
264
|
-
ownerState: ownerState,
|
|
265
|
-
ref: ref
|
|
266
|
-
// ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
|
|
267
|
-
// See https://github.com/mui/material-ui/issues/29080
|
|
268
|
-
,
|
|
269
|
-
role: "presentation"
|
|
270
|
-
}, other, {
|
|
166
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SnackbarRoot, (0, _extends2.default)({}, rootProps, {
|
|
271
167
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TransitionComponent, (0, _extends2.default)({
|
|
272
168
|
appear: true,
|
|
273
169
|
in: open,
|
package/node/Stack/Stack.js
CHANGED
|
@@ -4,134 +4,21 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
8
|
-
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var React = _interopRequireWildcard(require("react"));
|
|
7
|
+
exports.default = void 0;
|
|
11
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
9
|
var _system = require("@mui/system");
|
|
13
|
-
var _utils = require("@mui/utils");
|
|
14
10
|
var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
15
11
|
var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
*
|
|
24
|
-
* > joinChildren([1,2,3], 0)
|
|
25
|
-
* [1,0,2,0,3]
|
|
26
|
-
*/
|
|
27
|
-
function joinChildren(children, separator) {
|
|
28
|
-
const childrenArray = React.Children.toArray(children).filter(Boolean);
|
|
29
|
-
return childrenArray.reduce((output, child, index) => {
|
|
30
|
-
output.push(child);
|
|
31
|
-
if (index < childrenArray.length - 1) {
|
|
32
|
-
output.push( /*#__PURE__*/React.cloneElement(separator, {
|
|
33
|
-
key: `separator-${index}`
|
|
34
|
-
}));
|
|
35
|
-
}
|
|
36
|
-
return output;
|
|
37
|
-
}, []);
|
|
38
|
-
}
|
|
39
|
-
const getSideFromDirection = direction => {
|
|
40
|
-
return {
|
|
41
|
-
row: 'Left',
|
|
42
|
-
'row-reverse': 'Right',
|
|
43
|
-
column: 'Top',
|
|
44
|
-
'column-reverse': 'Bottom'
|
|
45
|
-
}[direction];
|
|
46
|
-
};
|
|
47
|
-
const style = ({
|
|
48
|
-
ownerState,
|
|
49
|
-
theme
|
|
50
|
-
}) => {
|
|
51
|
-
let styles = (0, _extends2.default)({
|
|
52
|
-
display: 'flex',
|
|
53
|
-
flexDirection: 'column'
|
|
54
|
-
}, (0, _system.handleBreakpoints)({
|
|
55
|
-
theme
|
|
56
|
-
}, (0, _system.unstable_resolveBreakpointValues)({
|
|
57
|
-
values: ownerState.direction,
|
|
58
|
-
breakpoints: theme.breakpoints.values
|
|
59
|
-
}), propValue => ({
|
|
60
|
-
flexDirection: propValue
|
|
61
|
-
})));
|
|
62
|
-
if (ownerState.spacing) {
|
|
63
|
-
const transformer = (0, _system.createUnarySpacing)(theme);
|
|
64
|
-
const base = Object.keys(theme.breakpoints.values).reduce((acc, breakpoint) => {
|
|
65
|
-
if (typeof ownerState.spacing === 'object' && ownerState.spacing[breakpoint] != null || typeof ownerState.direction === 'object' && ownerState.direction[breakpoint] != null) {
|
|
66
|
-
acc[breakpoint] = true;
|
|
67
|
-
}
|
|
68
|
-
return acc;
|
|
69
|
-
}, {});
|
|
70
|
-
const directionValues = (0, _system.unstable_resolveBreakpointValues)({
|
|
71
|
-
values: ownerState.direction,
|
|
72
|
-
base
|
|
73
|
-
});
|
|
74
|
-
const spacingValues = (0, _system.unstable_resolveBreakpointValues)({
|
|
75
|
-
values: ownerState.spacing,
|
|
76
|
-
base
|
|
77
|
-
});
|
|
78
|
-
if (typeof directionValues === 'object') {
|
|
79
|
-
Object.keys(directionValues).forEach((breakpoint, index, breakpoints) => {
|
|
80
|
-
const directionValue = directionValues[breakpoint];
|
|
81
|
-
if (!directionValue) {
|
|
82
|
-
const previousDirectionValue = index > 0 ? directionValues[breakpoints[index - 1]] : 'column';
|
|
83
|
-
directionValues[breakpoint] = previousDirectionValue;
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
const styleFromPropValue = (propValue, breakpoint) => {
|
|
88
|
-
return {
|
|
89
|
-
'& > :not(style) + :not(style)': {
|
|
90
|
-
margin: 0,
|
|
91
|
-
[`margin${getSideFromDirection(breakpoint ? directionValues[breakpoint] : ownerState.direction)}`]: (0, _system.getValue)(transformer, propValue)
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
};
|
|
95
|
-
styles = (0, _utils.deepmerge)(styles, (0, _system.handleBreakpoints)({
|
|
96
|
-
theme
|
|
97
|
-
}, spacingValues, styleFromPropValue));
|
|
98
|
-
}
|
|
99
|
-
styles = (0, _system.mergeBreakpointsInOrder)(theme.breakpoints, styles);
|
|
100
|
-
return styles;
|
|
101
|
-
};
|
|
102
|
-
exports.style = style;
|
|
103
|
-
const StackRoot = (0, _styled.default)('div', {
|
|
104
|
-
name: 'MuiStack',
|
|
105
|
-
slot: 'Root',
|
|
106
|
-
overridesResolver: (props, styles) => {
|
|
107
|
-
return [styles.root];
|
|
108
|
-
}
|
|
109
|
-
})(style);
|
|
110
|
-
const Stack = /*#__PURE__*/React.forwardRef(function Stack(inProps, ref) {
|
|
111
|
-
const themeProps = (0, _useThemeProps.default)({
|
|
12
|
+
const Stack = (0, _system.createStack)({
|
|
13
|
+
createStyledComponent: (0, _styled.default)('div', {
|
|
14
|
+
name: 'MuiStack',
|
|
15
|
+
slot: 'Root',
|
|
16
|
+
overridesResolver: (props, styles) => styles.root
|
|
17
|
+
}),
|
|
18
|
+
useThemeProps: inProps => (0, _useThemeProps.default)({
|
|
112
19
|
props: inProps,
|
|
113
20
|
name: 'MuiStack'
|
|
114
|
-
})
|
|
115
|
-
const props = (0, _system.unstable_extendSxProp)(themeProps);
|
|
116
|
-
const {
|
|
117
|
-
component = 'div',
|
|
118
|
-
direction = 'column',
|
|
119
|
-
spacing = 0,
|
|
120
|
-
divider,
|
|
121
|
-
children
|
|
122
|
-
} = props,
|
|
123
|
-
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
124
|
-
const ownerState = {
|
|
125
|
-
direction,
|
|
126
|
-
spacing
|
|
127
|
-
};
|
|
128
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(StackRoot, (0, _extends2.default)({
|
|
129
|
-
as: component,
|
|
130
|
-
ownerState: ownerState,
|
|
131
|
-
ref: ref
|
|
132
|
-
}, other, {
|
|
133
|
-
children: divider ? joinChildren(children, divider) : children
|
|
134
|
-
}));
|
|
21
|
+
})
|
|
135
22
|
});
|
|
136
23
|
process.env.NODE_ENV !== "production" ? Stack.propTypes /* remove-proptypes */ = {
|
|
137
24
|
// ----------------------------- Warning --------------------------------
|
package/node/Stack/index.js
CHANGED
|
@@ -10,4 +10,11 @@ Object.defineProperty(exports, "default", {
|
|
|
10
10
|
return _Stack.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
|
|
13
|
+
Object.defineProperty(exports, "stackClasses", {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () {
|
|
16
|
+
return _stackClasses.default;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
var _Stack = _interopRequireDefault(require("./Stack"));
|
|
20
|
+
var _stackClasses = _interopRequireDefault(require("./stackClasses"));
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
exports.getStackUtilityClass = getStackUtilityClass;
|
|
9
|
+
var _utils = require("@mui/utils");
|
|
10
|
+
var _generateUtilityClass = _interopRequireDefault(require("../generateUtilityClass"));
|
|
11
|
+
function getStackUtilityClass(slot) {
|
|
12
|
+
return (0, _generateUtilityClass.default)('MuiStack', slot);
|
|
13
|
+
}
|
|
14
|
+
const stackClasses = (0, _utils.unstable_generateUtilityClasses)('MuiStack', ['root']);
|
|
15
|
+
var _default = stackClasses;
|
|
16
|
+
exports.default = _default;
|
|
@@ -14,7 +14,6 @@ const Grid2 = (0, _Unstable_Grid.createGrid)({
|
|
|
14
14
|
overridesResolver: (props, styles) => styles.root
|
|
15
15
|
}),
|
|
16
16
|
componentName: 'MuiGrid2',
|
|
17
|
-
// eslint-disable-next-line material-ui/mui-name-matches-component-name
|
|
18
17
|
useThemeProps: inProps => (0, _styles.useThemeProps)({
|
|
19
18
|
props: inProps,
|
|
20
19
|
name: 'MuiGrid2'
|
package/node/index.js
CHANGED
|
@@ -44,6 +44,7 @@ Please use another name.` : (0, _utils.formatMuiErrorMessage)(18));
|
|
|
44
44
|
muiTheme = (0, _utils.deepmerge)(muiTheme, other);
|
|
45
45
|
muiTheme = args.reduce((acc, argument) => (0, _utils.deepmerge)(acc, argument), muiTheme);
|
|
46
46
|
if (process.env.NODE_ENV !== 'production') {
|
|
47
|
+
// TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.
|
|
47
48
|
const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];
|
|
48
49
|
const traverse = (node, component) => {
|
|
49
50
|
let key;
|
|
@@ -7,18 +7,20 @@ var _exportNames = {};
|
|
|
7
7
|
Object.defineProperty(exports, "default", {
|
|
8
8
|
enumerable: true,
|
|
9
9
|
get: function () {
|
|
10
|
-
return
|
|
10
|
+
return _useAutocomplete.default;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
-
var
|
|
14
|
-
Object.keys(
|
|
13
|
+
var _useAutocomplete = _interopRequireWildcard(require("@mui/base/useAutocomplete"));
|
|
14
|
+
Object.keys(_useAutocomplete).forEach(function (key) {
|
|
15
15
|
if (key === "default" || key === "__esModule") return;
|
|
16
16
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
-
if (key in exports && exports[key] ===
|
|
17
|
+
if (key in exports && exports[key] === _useAutocomplete[key]) return;
|
|
18
18
|
Object.defineProperty(exports, key, {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
21
|
+
return _useAutocomplete[key];
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
});
|
|
24
|
+
});
|
|
25
|
+
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); }
|
|
26
|
+
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; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.11.
|
|
3
|
+
"version": "5.11.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@babel/runtime": "^7.
|
|
49
|
-
"@mui/base": "5.0.0-alpha.
|
|
50
|
-
"@mui/core-downloads-tracker": "^5.11.
|
|
51
|
-
"@mui/system": "^5.11.
|
|
48
|
+
"@babel/runtime": "^7.21.0",
|
|
49
|
+
"@mui/base": "5.0.0-alpha.119",
|
|
50
|
+
"@mui/core-downloads-tracker": "^5.11.11",
|
|
51
|
+
"@mui/system": "^5.11.11",
|
|
52
52
|
"@mui/types": "^7.2.3",
|
|
53
|
-
"@mui/utils": "^5.11.
|
|
53
|
+
"@mui/utils": "^5.11.11",
|
|
54
54
|
"@types/react-transition-group": "^4.4.5",
|
|
55
55
|
"clsx": "^1.2.1",
|
|
56
56
|
"csstype": "^3.1.1",
|
|
@@ -1,16 +1,16 @@
|
|
|
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?: Element | null | undefined;
|
|
11
|
-
colorSchemeSelector?: string | undefined;
|
|
12
|
-
storageWindow?: Window | null | undefined;
|
|
13
|
-
disableNestedContext?: boolean | undefined;
|
|
14
|
-
disableStyleSheetGeneration?: boolean | undefined;
|
|
15
|
-
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
|
|
16
|
-
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?: Element | null | undefined;
|
|
11
|
+
colorSchemeSelector?: string | undefined;
|
|
12
|
+
storageWindow?: Window | null | undefined;
|
|
13
|
+
disableNestedContext?: boolean | undefined;
|
|
14
|
+
disableStyleSheetGeneration?: boolean | undefined;
|
|
15
|
+
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
|
|
16
|
+
export { useColorScheme, getInitColorSchemeScript, shouldSkipGeneratingVar, CssVarsProvider as Experimental_CssVarsProvider, };
|
package/styles/createTheme.js
CHANGED
|
@@ -37,6 +37,7 @@ Please use another name.` : _formatMuiErrorMessage(18));
|
|
|
37
37
|
muiTheme = deepmerge(muiTheme, other);
|
|
38
38
|
muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);
|
|
39
39
|
if (process.env.NODE_ENV !== 'production') {
|
|
40
|
+
// TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.
|
|
40
41
|
const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];
|
|
41
42
|
const traverse = (node, component) => {
|
|
42
43
|
let key;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal These variables should not appear in the :root stylesheet when the `defaultMode="dark"`
|
|
3
|
-
*/
|
|
4
|
-
declare const excludeVariablesFromRoot: (cssVarPrefix: string) => string[];
|
|
5
|
-
export default excludeVariablesFromRoot;
|
|
1
|
+
/**
|
|
2
|
+
* @internal These variables should not appear in the :root stylesheet when the `defaultMode="dark"`
|
|
3
|
+
*/
|
|
4
|
+
declare const excludeVariablesFromRoot: (cssVarPrefix: string) => string[];
|
|
5
|
+
export default excludeVariablesFromRoot;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getOverlayAlpha: (elevation: number) => string;
|
|
2
|
-
export default getOverlayAlpha;
|
|
1
|
+
declare const getOverlayAlpha: (elevation: number) => string;
|
|
2
|
+
export default getOverlayAlpha;
|
package/transitions/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './transition';
|
|
1
|
+
export * from './transition';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
export type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
|
|
4
|
-
export type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
|
|
5
|
-
export interface EasingProps {
|
|
6
|
-
easing: string | {
|
|
7
|
-
enter?: string;
|
|
8
|
-
exit?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
|
|
12
|
-
export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
|
|
13
|
-
}
|
|
1
|
+
import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
|
|
4
|
+
export type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
|
|
5
|
+
export interface EasingProps {
|
|
6
|
+
easing: string | {
|
|
7
|
+
enter?: string;
|
|
8
|
+
exit?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
|
|
12
|
+
export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
|
|
13
|
+
}
|