@mui/material 6.1.6 → 6.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/Accordion.d.ts +2 -0
- package/Accordion/Accordion.js +2 -0
- package/Autocomplete/Autocomplete.d.ts +5 -0
- package/Autocomplete/Autocomplete.js +6 -1
- package/Avatar/Avatar.d.ts +1 -0
- package/Avatar/Avatar.js +1 -0
- package/Backdrop/Backdrop.d.ts +1 -0
- package/Backdrop/Backdrop.js +1 -0
- package/CHANGELOG.md +111 -4
- package/Grid/Grid.js +2 -2
- package/Grid2/grid2Classes.js +1 -1
- package/Rating/Rating.d.ts +21 -4
- package/Rating/Rating.js +12 -0
- package/SpeedDial/SpeedDial.d.ts +2 -0
- package/SpeedDial/SpeedDial.js +2 -0
- package/StepIcon/StepIcon.d.ts +5 -2
- package/StepLabel/StepLabel.d.ts +2 -0
- package/StepLabel/StepLabel.js +2 -0
- package/Tooltip/Tooltip.d.ts +69 -36
- package/Tooltip/Tooltip.js +84 -58
- package/index.js +1 -1
- package/modern/Accordion/Accordion.js +2 -0
- package/modern/Autocomplete/Autocomplete.js +6 -1
- package/modern/Avatar/Avatar.js +1 -0
- package/modern/Backdrop/Backdrop.js +1 -0
- package/modern/Grid/Grid.js +2 -2
- package/modern/Grid2/grid2Classes.js +1 -1
- package/modern/Rating/Rating.js +12 -0
- package/modern/SpeedDial/SpeedDial.js +2 -0
- package/modern/StepLabel/StepLabel.js +2 -0
- package/modern/Tooltip/Tooltip.js +84 -58
- package/modern/index.js +1 -1
- package/modern/useMediaQuery/index.js +6 -1
- package/modern/version/index.js +2 -2
- package/node/Accordion/Accordion.js +2 -0
- package/node/Autocomplete/Autocomplete.js +6 -1
- package/node/Avatar/Avatar.js +1 -0
- package/node/Backdrop/Backdrop.js +1 -0
- package/node/Grid/Grid.js +2 -2
- package/node/Grid2/grid2Classes.js +1 -1
- package/node/Rating/Rating.js +12 -0
- package/node/SpeedDial/SpeedDial.js +2 -0
- package/node/StepLabel/StepLabel.js +2 -0
- package/node/Tooltip/Tooltip.js +84 -58
- package/node/index.js +1 -1
- package/node/useMediaQuery/index.js +6 -6
- package/node/version/index.js +2 -2
- package/package.json +5 -5
- package/useMediaQuery/index.d.ts +11 -1
- package/useMediaQuery/index.js +6 -1
- package/version/index.js +2 -2
|
@@ -9,7 +9,6 @@ import composeClasses from '@mui/utils/composeClasses';
|
|
|
9
9
|
import { alpha } from '@mui/system/colorManipulator';
|
|
10
10
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
11
11
|
import isFocusVisible from '@mui/utils/isFocusVisible';
|
|
12
|
-
import appendOwnerState from '@mui/utils/appendOwnerState';
|
|
13
12
|
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
14
13
|
import { styled, useTheme } from "../zero-styled/index.js";
|
|
15
14
|
import memoTheme from "../utils/memoTheme.js";
|
|
@@ -21,6 +20,7 @@ import useEventCallback from "../utils/useEventCallback.js";
|
|
|
21
20
|
import useForkRef from "../utils/useForkRef.js";
|
|
22
21
|
import useId from "../utils/useId.js";
|
|
23
22
|
import useControlled from "../utils/useControlled.js";
|
|
23
|
+
import useSlot from "../utils/useSlot.js";
|
|
24
24
|
import tooltipClasses, { getTooltipUtilityClass } from "./tooltipClasses.js";
|
|
25
25
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
26
26
|
function round(value) {
|
|
@@ -342,7 +342,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
342
342
|
slotProps = {},
|
|
343
343
|
slots = {},
|
|
344
344
|
title,
|
|
345
|
-
TransitionComponent: TransitionComponentProp
|
|
345
|
+
TransitionComponent: TransitionComponentProp,
|
|
346
346
|
TransitionProps,
|
|
347
347
|
...other
|
|
348
348
|
} = props;
|
|
@@ -592,6 +592,16 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
592
592
|
console.error(['MUI: You have provided a `title` prop to the child of <Tooltip />.', `Remove this title prop \`${children.props.title}\` or the Tooltip component.`].join('\n'));
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
+
const ownerState = {
|
|
596
|
+
...props,
|
|
597
|
+
isRtl,
|
|
598
|
+
arrow,
|
|
599
|
+
disableInteractive,
|
|
600
|
+
placement,
|
|
601
|
+
PopperComponentProp,
|
|
602
|
+
touch: ignoreNonTouchEvents.current
|
|
603
|
+
};
|
|
604
|
+
const resolvedPopperProps = typeof slotProps.popper === 'function' ? slotProps.popper(ownerState) : slotProps.popper;
|
|
595
605
|
const popperOptions = React.useMemo(() => {
|
|
596
606
|
let tooltipModifiers = [{
|
|
597
607
|
name: 'arrow',
|
|
@@ -604,44 +614,65 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
604
614
|
if (PopperProps.popperOptions?.modifiers) {
|
|
605
615
|
tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);
|
|
606
616
|
}
|
|
617
|
+
if (resolvedPopperProps?.popperOptions?.modifiers) {
|
|
618
|
+
tooltipModifiers = tooltipModifiers.concat(resolvedPopperProps.popperOptions.modifiers);
|
|
619
|
+
}
|
|
607
620
|
return {
|
|
608
621
|
...PopperProps.popperOptions,
|
|
622
|
+
...resolvedPopperProps?.popperOptions,
|
|
609
623
|
modifiers: tooltipModifiers
|
|
610
624
|
};
|
|
611
|
-
}, [arrowRef, PopperProps]);
|
|
612
|
-
const ownerState = {
|
|
613
|
-
...props,
|
|
614
|
-
isRtl,
|
|
615
|
-
arrow,
|
|
616
|
-
disableInteractive,
|
|
617
|
-
placement,
|
|
618
|
-
PopperComponentProp,
|
|
619
|
-
touch: ignoreNonTouchEvents.current
|
|
620
|
-
};
|
|
625
|
+
}, [arrowRef, PopperProps.popperOptions, resolvedPopperProps?.popperOptions]);
|
|
621
626
|
const classes = useUtilityClasses(ownerState);
|
|
622
|
-
const
|
|
623
|
-
const
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
627
|
+
const resolvedTransitionProps = typeof slotProps.transition === 'function' ? slotProps.transition(ownerState) : slotProps.transition;
|
|
628
|
+
const externalForwardedProps = {
|
|
629
|
+
slots: {
|
|
630
|
+
popper: components.Popper,
|
|
631
|
+
transition: components.Transition ?? TransitionComponentProp,
|
|
632
|
+
tooltip: components.Tooltip,
|
|
633
|
+
arrow: components.Arrow,
|
|
634
|
+
...slots
|
|
635
|
+
},
|
|
636
|
+
slotProps: {
|
|
637
|
+
arrow: slotProps.arrow ?? componentsProps.arrow,
|
|
638
|
+
popper: {
|
|
639
|
+
...PopperProps,
|
|
640
|
+
...(resolvedPopperProps ?? componentsProps.popper)
|
|
641
|
+
},
|
|
642
|
+
// resolvedPopperProps can be spread because it's already an object
|
|
643
|
+
tooltip: slotProps.tooltip ?? componentsProps.tooltip,
|
|
644
|
+
transition: {
|
|
645
|
+
...TransitionProps,
|
|
646
|
+
...(resolvedTransitionProps ?? componentsProps.transition)
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
};
|
|
650
|
+
const [PopperSlot, popperSlotProps] = useSlot('popper', {
|
|
651
|
+
elementType: TooltipPopper,
|
|
652
|
+
externalForwardedProps,
|
|
653
|
+
ownerState,
|
|
654
|
+
className: clsx(classes.popper, PopperProps?.className)
|
|
655
|
+
});
|
|
656
|
+
const [TransitionSlot, transitionSlotProps] = useSlot('transition', {
|
|
657
|
+
elementType: Grow,
|
|
658
|
+
externalForwardedProps,
|
|
659
|
+
ownerState
|
|
660
|
+
});
|
|
661
|
+
const [TooltipSlot, tooltipSlotProps] = useSlot('tooltip', {
|
|
662
|
+
elementType: TooltipTooltip,
|
|
663
|
+
className: classes.tooltip,
|
|
664
|
+
externalForwardedProps,
|
|
665
|
+
ownerState
|
|
666
|
+
});
|
|
667
|
+
const [ArrowSlot, arrowSlotProps] = useSlot('arrow', {
|
|
668
|
+
elementType: TooltipArrow,
|
|
669
|
+
className: classes.arrow,
|
|
670
|
+
externalForwardedProps,
|
|
671
|
+
ownerState,
|
|
672
|
+
ref: setArrowRef
|
|
673
|
+
});
|
|
643
674
|
return /*#__PURE__*/_jsxs(React.Fragment, {
|
|
644
|
-
children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(
|
|
675
|
+
children: [/*#__PURE__*/React.cloneElement(children, childrenProps), /*#__PURE__*/_jsx(PopperSlot, {
|
|
645
676
|
as: PopperComponentProp ?? Popper,
|
|
646
677
|
placement: placement,
|
|
647
678
|
anchorEl: followCursor ? {
|
|
@@ -659,19 +690,18 @@ const Tooltip = /*#__PURE__*/React.forwardRef(function Tooltip(inProps, ref) {
|
|
|
659
690
|
id: id,
|
|
660
691
|
transition: true,
|
|
661
692
|
...interactiveWrapperListeners,
|
|
662
|
-
...
|
|
693
|
+
...popperSlotProps,
|
|
663
694
|
popperOptions: popperOptions,
|
|
664
695
|
children: ({
|
|
665
696
|
TransitionProps: TransitionPropsInner
|
|
666
|
-
}) => /*#__PURE__*/_jsx(
|
|
697
|
+
}) => /*#__PURE__*/_jsx(TransitionSlot, {
|
|
667
698
|
timeout: theme.transitions.duration.shorter,
|
|
668
699
|
...TransitionPropsInner,
|
|
669
|
-
...
|
|
670
|
-
children: /*#__PURE__*/_jsxs(
|
|
671
|
-
...
|
|
672
|
-
children: [title, arrow ? /*#__PURE__*/_jsx(
|
|
673
|
-
...
|
|
674
|
-
ref: setArrowRef
|
|
700
|
+
...transitionSlotProps,
|
|
701
|
+
children: /*#__PURE__*/_jsxs(TooltipSlot, {
|
|
702
|
+
...tooltipSlotProps,
|
|
703
|
+
children: [title, arrow ? /*#__PURE__*/_jsx(ArrowSlot, {
|
|
704
|
+
...arrowSlotProps
|
|
675
705
|
}) : null]
|
|
676
706
|
})
|
|
677
707
|
})
|
|
@@ -703,7 +733,7 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes /* remove-proptypes */
|
|
|
703
733
|
/**
|
|
704
734
|
* The components used for each slot inside.
|
|
705
735
|
*
|
|
706
|
-
* @deprecated use the `slots` prop instead. This prop will be removed in v7. [
|
|
736
|
+
* @deprecated use the `slots` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
707
737
|
*
|
|
708
738
|
* @default {}
|
|
709
739
|
*/
|
|
@@ -717,7 +747,7 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes /* remove-proptypes */
|
|
|
717
747
|
* The extra props for the slot components.
|
|
718
748
|
* You can override the existing props or add new ones.
|
|
719
749
|
*
|
|
720
|
-
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. [
|
|
750
|
+
* @deprecated use the `slotProps` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
721
751
|
*
|
|
722
752
|
* @default {}
|
|
723
753
|
*/
|
|
@@ -814,33 +844,27 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes /* remove-proptypes */
|
|
|
814
844
|
placement: PropTypes.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),
|
|
815
845
|
/**
|
|
816
846
|
* The component used for the popper.
|
|
817
|
-
* @
|
|
847
|
+
* @deprecated use the `slots.popper` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
818
848
|
*/
|
|
819
849
|
PopperComponent: PropTypes.elementType,
|
|
820
850
|
/**
|
|
821
851
|
* Props applied to the [`Popper`](https://mui.com/material-ui/api/popper/) element.
|
|
852
|
+
* @deprecated use the `slotProps.popper` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
822
853
|
* @default {}
|
|
823
854
|
*/
|
|
824
855
|
PopperProps: PropTypes.object,
|
|
825
856
|
/**
|
|
826
|
-
* The
|
|
827
|
-
* You can override the existing props or add new ones.
|
|
828
|
-
*
|
|
829
|
-
* This prop is an alias for the `componentsProps` prop, which will be deprecated in the future.
|
|
830
|
-
*
|
|
857
|
+
* The props used for each slot inside.
|
|
831
858
|
* @default {}
|
|
832
859
|
*/
|
|
833
860
|
slotProps: PropTypes.shape({
|
|
834
|
-
arrow: PropTypes.object,
|
|
835
|
-
popper: PropTypes.object,
|
|
836
|
-
tooltip: PropTypes.object,
|
|
837
|
-
transition: PropTypes.object
|
|
861
|
+
arrow: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
862
|
+
popper: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
863
|
+
tooltip: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),
|
|
864
|
+
transition: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
838
865
|
}),
|
|
839
866
|
/**
|
|
840
867
|
* The components used for each slot inside.
|
|
841
|
-
*
|
|
842
|
-
* This prop is an alias for the `components` prop, which will be deprecated in the future.
|
|
843
|
-
*
|
|
844
868
|
* @default {}
|
|
845
869
|
*/
|
|
846
870
|
slots: PropTypes.shape({
|
|
@@ -860,12 +884,14 @@ process.env.NODE_ENV !== "production" ? Tooltip.propTypes /* remove-proptypes */
|
|
|
860
884
|
/**
|
|
861
885
|
* The component used for the transition.
|
|
862
886
|
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
863
|
-
* @
|
|
887
|
+
* @deprecated use the `slots.transition` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
864
888
|
*/
|
|
865
889
|
TransitionComponent: PropTypes.elementType,
|
|
866
890
|
/**
|
|
867
891
|
* Props applied to the transition element.
|
|
868
892
|
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
|
893
|
+
* @deprecated use the `slotProps.transition` prop instead. This prop will be removed in v7. See [Migrating from deprecated APIs](https://mui.com/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
894
|
+
* @default {}
|
|
869
895
|
*/
|
|
870
896
|
TransitionProps: PropTypes.object
|
|
871
897
|
} : void 0;
|
package/modern/index.js
CHANGED
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { unstable_createUseMediaQuery } from '@mui/system/useMediaQuery';
|
|
2
|
+
import THEME_ID from "../styles/identifier.js";
|
|
3
|
+
const useMediaQuery = unstable_createUseMediaQuery({
|
|
4
|
+
themeId: THEME_ID
|
|
5
|
+
});
|
|
6
|
+
export default useMediaQuery;
|
package/modern/version/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export const version = "6.1.
|
|
1
|
+
export const version = "6.1.8";
|
|
2
2
|
export const major = Number("6");
|
|
3
3
|
export const minor = Number("1");
|
|
4
|
-
export const patch = Number("
|
|
4
|
+
export const patch = Number("8");
|
|
5
5
|
export const prerelease = undefined;
|
|
6
6
|
export default version;
|
|
@@ -310,11 +310,13 @@ process.env.NODE_ENV !== "production" ? Accordion.propTypes /* remove-proptypes
|
|
|
310
310
|
/**
|
|
311
311
|
* The component used for the transition.
|
|
312
312
|
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
313
|
+
* @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
313
314
|
*/
|
|
314
315
|
TransitionComponent: _propTypes.default.elementType,
|
|
315
316
|
/**
|
|
316
317
|
* Props applied to the transition element.
|
|
317
318
|
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
|
319
|
+
* @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
318
320
|
*/
|
|
319
321
|
TransitionProps: _propTypes.default.object
|
|
320
322
|
} : void 0;
|
|
@@ -336,7 +336,7 @@ const AutocompleteNoOptions = (0, _zeroStyled.styled)('div', {
|
|
|
336
336
|
color: (theme.vars || theme).palette.text.secondary,
|
|
337
337
|
padding: '14px 16px'
|
|
338
338
|
})));
|
|
339
|
-
const AutocompleteListbox = (0, _zeroStyled.styled)('
|
|
339
|
+
const AutocompleteListbox = (0, _zeroStyled.styled)('ul', {
|
|
340
340
|
name: 'MuiAutocomplete',
|
|
341
341
|
slot: 'Listbox',
|
|
342
342
|
overridesResolver: (props, styles) => styles.listbox
|
|
@@ -804,6 +804,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
804
804
|
blurOnSelect: _propTypes.default.oneOfType([_propTypes.default.oneOf(['mouse', 'touch']), _propTypes.default.bool]),
|
|
805
805
|
/**
|
|
806
806
|
* Props applied to the [`Chip`](https://mui.com/material-ui/api/chip/) element.
|
|
807
|
+
* @deprecated Use `slotProps.chip` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
807
808
|
*/
|
|
808
809
|
ChipProps: _propTypes.default.object,
|
|
809
810
|
/**
|
|
@@ -1006,10 +1007,12 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1006
1007
|
/**
|
|
1007
1008
|
* The component used to render the listbox.
|
|
1008
1009
|
* @default 'ul'
|
|
1010
|
+
* @deprecated Use `slotProps.listbox.component` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
1009
1011
|
*/
|
|
1010
1012
|
ListboxComponent: _propTypes.default.elementType,
|
|
1011
1013
|
/**
|
|
1012
1014
|
* Props applied to the Listbox element.
|
|
1015
|
+
* @deprecated Use `slotProps.listbox` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
1013
1016
|
*/
|
|
1014
1017
|
ListboxProps: _propTypes.default.object,
|
|
1015
1018
|
/**
|
|
@@ -1104,11 +1107,13 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes /* remove-proptyp
|
|
|
1104
1107
|
/**
|
|
1105
1108
|
* The component used to render the body of the popup.
|
|
1106
1109
|
* @default Paper
|
|
1110
|
+
* @deprecated Use `slots.paper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
1107
1111
|
*/
|
|
1108
1112
|
PaperComponent: _propTypes.default.elementType,
|
|
1109
1113
|
/**
|
|
1110
1114
|
* The component used to position the popup.
|
|
1111
1115
|
* @default Popper
|
|
1116
|
+
* @deprecated Use `slots.popper` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
1112
1117
|
*/
|
|
1113
1118
|
PopperComponent: _propTypes.default.elementType,
|
|
1114
1119
|
/**
|
package/node/Avatar/Avatar.js
CHANGED
|
@@ -262,6 +262,7 @@ process.env.NODE_ENV !== "production" ? Avatar.propTypes /* remove-proptypes */
|
|
|
262
262
|
/**
|
|
263
263
|
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#attributes) applied to the `img` element if the component is used to display an image.
|
|
264
264
|
* It can be used to listen for the loading error event.
|
|
265
|
+
* @deprecated Use `slotProps.img` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
265
266
|
*/
|
|
266
267
|
imgProps: _propTypes.default.object,
|
|
267
268
|
/**
|
|
@@ -204,6 +204,7 @@ process.env.NODE_ENV !== "production" ? Backdrop.propTypes /* remove-proptypes *
|
|
|
204
204
|
* The component used for the transition.
|
|
205
205
|
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
206
206
|
* @default Fade
|
|
207
|
+
* @deprecated Use `slots.transition` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
207
208
|
*/
|
|
208
209
|
TransitionComponent: _propTypes.default.elementType,
|
|
209
210
|
/**
|
package/node/Grid/Grid.js
CHANGED
|
@@ -180,7 +180,7 @@ function generateRowGap({
|
|
|
180
180
|
const themeSpacing = theme.spacing(propValue);
|
|
181
181
|
if (themeSpacing !== '0px') {
|
|
182
182
|
return {
|
|
183
|
-
marginTop:
|
|
183
|
+
marginTop: `-${themeSpacing}`,
|
|
184
184
|
[`& > .${_gridClasses.default.item}`]: {
|
|
185
185
|
paddingTop: themeSpacing
|
|
186
186
|
}
|
|
@@ -225,7 +225,7 @@ function generateColumnGap({
|
|
|
225
225
|
}, columnSpacingValues, (propValue, breakpoint) => {
|
|
226
226
|
const themeSpacing = theme.spacing(propValue);
|
|
227
227
|
if (themeSpacing !== '0px') {
|
|
228
|
-
const negativeValue =
|
|
228
|
+
const negativeValue = `-${themeSpacing}`;
|
|
229
229
|
return {
|
|
230
230
|
width: `calc(100% + ${themeSpacing})`,
|
|
231
231
|
marginLeft: negativeValue,
|
|
@@ -15,7 +15,7 @@ const SPACINGS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
|
|
15
15
|
const DIRECTIONS = ['column-reverse', 'column', 'row-reverse', 'row'];
|
|
16
16
|
const WRAPS = ['nowrap', 'wrap-reverse', 'wrap'];
|
|
17
17
|
const GRID_SIZES = ['auto', true, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
|
18
|
-
const grid2Classes = (0, _generateUtilityClasses.default)('MuiGrid2', ['root', 'container',
|
|
18
|
+
const grid2Classes = (0, _generateUtilityClasses.default)('MuiGrid2', ['root', 'container',
|
|
19
19
|
// spacings
|
|
20
20
|
...SPACINGS.map(spacing => `spacing-xs-${spacing}`),
|
|
21
21
|
// direction values
|
package/node/Rating/Rating.js
CHANGED
|
@@ -324,6 +324,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
324
324
|
props: inProps
|
|
325
325
|
});
|
|
326
326
|
const {
|
|
327
|
+
component = 'span',
|
|
327
328
|
className,
|
|
328
329
|
defaultValue = null,
|
|
329
330
|
disabled = false,
|
|
@@ -464,6 +465,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
464
465
|
const [emptyValueFocused, setEmptyValueFocused] = React.useState(false);
|
|
465
466
|
const ownerState = {
|
|
466
467
|
...props,
|
|
468
|
+
component,
|
|
467
469
|
defaultValue,
|
|
468
470
|
disabled,
|
|
469
471
|
emptyIcon,
|
|
@@ -480,6 +482,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
480
482
|
};
|
|
481
483
|
const classes = useUtilityClasses(ownerState);
|
|
482
484
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(RatingRoot, {
|
|
485
|
+
as: component,
|
|
483
486
|
ref: handleRef,
|
|
484
487
|
onMouseMove: handleMouseMove,
|
|
485
488
|
onMouseLeave: handleMouseLeave,
|
|
@@ -565,6 +568,10 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
|
|
|
565
568
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
566
569
|
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
567
570
|
// └─────────────────────────────────────────────────────────────────────┘
|
|
571
|
+
/**
|
|
572
|
+
* @ignore
|
|
573
|
+
*/
|
|
574
|
+
children: _propTypes.default.node,
|
|
568
575
|
/**
|
|
569
576
|
* Override or extend the styles applied to the component.
|
|
570
577
|
*/
|
|
@@ -573,6 +580,11 @@ process.env.NODE_ENV !== "production" ? Rating.propTypes /* remove-proptypes */
|
|
|
573
580
|
* @ignore
|
|
574
581
|
*/
|
|
575
582
|
className: _propTypes.default.string,
|
|
583
|
+
/**
|
|
584
|
+
* The component used for the root node.
|
|
585
|
+
* Either a string to use a HTML element or a component.
|
|
586
|
+
*/
|
|
587
|
+
component: _propTypes.default.elementType,
|
|
576
588
|
/**
|
|
577
589
|
* The default value. Use when the component is not controlled.
|
|
578
590
|
* @default null
|
|
@@ -531,6 +531,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
|
|
|
531
531
|
* The component used for the transition.
|
|
532
532
|
* [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
|
|
533
533
|
* @default Zoom
|
|
534
|
+
* * @deprecated Use `slots.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
|
|
534
535
|
*/
|
|
535
536
|
TransitionComponent: _propTypes.default.elementType,
|
|
536
537
|
/**
|
|
@@ -549,6 +550,7 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes /* remove-proptypes
|
|
|
549
550
|
/**
|
|
550
551
|
* Props applied to the transition element.
|
|
551
552
|
* By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
|
|
553
|
+
* @deprecated Use `slotProps.transition` instead. This prop will be removed in v7. [How to migrate](/material-ui/migration/migrating-from-deprecated-apis/)
|
|
552
554
|
*/
|
|
553
555
|
TransitionProps: _propTypes.default.object
|
|
554
556
|
} : void 0;
|
|
@@ -261,10 +261,12 @@ process.env.NODE_ENV !== "production" ? StepLabel.propTypes /* remove-proptypes
|
|
|
261
261
|
}),
|
|
262
262
|
/**
|
|
263
263
|
* The component to render in place of the [`StepIcon`](https://mui.com/material-ui/api/step-icon/).
|
|
264
|
+
* @deprecated Use `slots.stepIcon` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
264
265
|
*/
|
|
265
266
|
StepIconComponent: _propTypes.default.elementType,
|
|
266
267
|
/**
|
|
267
268
|
* Props applied to the [`StepIcon`](https://mui.com/material-ui/api/step-icon/) element.
|
|
269
|
+
* @deprecated Use `slotProps.stepIcon` instead. This prop will be removed in v7. See [Migrating from deprecated APIs](/material-ui/migration/migrating-from-deprecated-apis/) for more details.
|
|
268
270
|
*/
|
|
269
271
|
StepIconProps: _propTypes.default.object,
|
|
270
272
|
/**
|