@mui/material 9.0.0 → 9.1.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/Accordion.d.mts +2 -2
- package/Accordion/Accordion.d.ts +2 -2
- package/Accordion/Accordion.js +3 -2
- package/Accordion/Accordion.mjs +3 -2
- package/AccordionSummary/AccordionSummary.js +27 -29
- package/AccordionSummary/AccordionSummary.mjs +27 -29
- package/Autocomplete/Autocomplete.js +73 -17
- package/Autocomplete/Autocomplete.mjs +73 -17
- package/Avatar/Avatar.js +4 -0
- package/Avatar/Avatar.mjs +4 -0
- package/Backdrop/Backdrop.d.mts +2 -2
- package/Backdrop/Backdrop.d.ts +2 -2
- package/Badge/Badge.js +31 -24
- package/Badge/Badge.mjs +31 -24
- package/BottomNavigationAction/BottomNavigationAction.js +6 -2
- package/BottomNavigationAction/BottomNavigationAction.mjs +6 -2
- package/Button/Button.js +19 -6
- package/Button/Button.mjs +19 -6
- package/ButtonBase/ButtonBase.d.mts +7 -0
- package/ButtonBase/ButtonBase.d.ts +7 -0
- package/ButtonBase/ButtonBase.js +5 -2
- package/ButtonBase/ButtonBase.mjs +5 -2
- package/ButtonBase/Ripple.js +21 -11
- package/ButtonBase/Ripple.mjs +21 -11
- package/ButtonBase/TouchRipple.js +252 -116
- package/ButtonBase/TouchRipple.mjs +253 -117
- package/CHANGELOG.md +216 -1245
- package/CardActionArea/CardActionArea.js +2 -1
- package/CardActionArea/CardActionArea.mjs +2 -1
- package/Checkbox/Checkbox.js +2 -1
- package/Checkbox/Checkbox.mjs +2 -1
- package/Chip/Chip.js +2 -1
- package/Chip/Chip.mjs +2 -1
- package/CircularProgress/CircularProgress.d.mts +12 -2
- package/CircularProgress/CircularProgress.d.ts +12 -2
- package/CircularProgress/CircularProgress.js +115 -58
- package/CircularProgress/CircularProgress.mjs +114 -58
- package/ClickAwayListener/ClickAwayListener.js +3 -6
- package/ClickAwayListener/ClickAwayListener.mjs +3 -6
- package/Collapse/Collapse.d.mts +15 -3
- package/Collapse/Collapse.d.ts +15 -3
- package/Collapse/Collapse.js +44 -31
- package/Collapse/Collapse.mjs +43 -30
- package/Dialog/Dialog.d.mts +2 -2
- package/Dialog/Dialog.d.ts +2 -2
- package/Dialog/Dialog.js +13 -6
- package/Dialog/Dialog.mjs +13 -6
- package/Drawer/Drawer.d.mts +2 -2
- package/Drawer/Drawer.d.ts +2 -2
- package/Drawer/Drawer.js +18 -4
- package/Drawer/Drawer.mjs +18 -4
- package/Fab/Fab.js +9 -2
- package/Fab/Fab.mjs +9 -2
- package/Fade/Fade.d.mts +15 -2
- package/Fade/Fade.d.ts +15 -2
- package/Fade/Fade.js +46 -19
- package/Fade/Fade.mjs +45 -18
- package/FilledInput/FilledInput.d.mts +4 -0
- package/FilledInput/FilledInput.d.ts +4 -0
- package/FilledInput/FilledInput.js +22 -23
- package/FilledInput/FilledInput.mjs +22 -23
- package/FormControl/useFormControl.d.mts +12 -2
- package/FormControl/useFormControl.d.ts +12 -2
- package/FormControl/useFormControl.js +13 -0
- package/FormControl/useFormControl.mjs +12 -0
- package/FormControlLabel/FormControlLabel.js +5 -8
- package/FormControlLabel/FormControlLabel.mjs +5 -8
- package/FormGroup/FormGroup.js +2 -5
- package/FormGroup/FormGroup.mjs +2 -5
- package/FormHelperText/FormHelperText.js +2 -5
- package/FormHelperText/FormHelperText.mjs +2 -5
- package/FormLabel/FormLabel.js +2 -5
- package/FormLabel/FormLabel.mjs +2 -5
- package/Grow/Grow.d.mts +15 -2
- package/Grow/Grow.d.ts +15 -2
- package/Grow/Grow.js +45 -28
- package/Grow/Grow.mjs +44 -27
- package/IconButton/IconButton.js +3 -9
- package/IconButton/IconButton.mjs +3 -9
- package/Input/Input.d.mts +4 -0
- package/Input/Input.d.ts +4 -0
- package/Input/Input.js +9 -2
- package/Input/Input.mjs +9 -2
- package/InputBase/InputBase.d.mts +2 -1
- package/InputBase/InputBase.d.ts +2 -1
- package/InputBase/InputBase.js +52 -16
- package/InputBase/InputBase.mjs +52 -16
- package/InputLabel/InputLabel.js +7 -9
- package/InputLabel/InputLabel.mjs +7 -9
- package/LICENSE +1 -1
- package/LinearProgress/LinearProgress.d.mts +12 -2
- package/LinearProgress/LinearProgress.d.ts +12 -2
- package/LinearProgress/LinearProgress.js +225 -126
- package/LinearProgress/LinearProgress.mjs +224 -126
- package/List/List.js +2 -1
- package/List/List.mjs +2 -1
- package/ListItem/ListItem.js +2 -1
- package/ListItem/ListItem.mjs +2 -1
- package/ListItemButton/ListItemButton.js +9 -2
- package/ListItemButton/ListItemButton.mjs +9 -2
- package/Menu/Menu.d.mts +1 -1
- package/Menu/Menu.d.ts +1 -1
- package/MenuItem/MenuItem.js +7 -1
- package/MenuItem/MenuItem.mjs +7 -1
- package/MenuList/MenuList.js +2 -1
- package/MenuList/MenuList.mjs +2 -1
- package/MobileStepper/MobileStepper.js +2 -1
- package/MobileStepper/MobileStepper.mjs +2 -1
- package/NativeSelect/NativeSelect.js +2 -5
- package/NativeSelect/NativeSelect.mjs +2 -5
- package/OutlinedInput/NotchedOutline.js +4 -3
- package/OutlinedInput/NotchedOutline.mjs +4 -3
- package/OutlinedInput/OutlinedInput.js +13 -23
- package/OutlinedInput/OutlinedInput.mjs +13 -23
- package/PaginationItem/PaginationItem.js +2 -1
- package/PaginationItem/PaginationItem.mjs +2 -1
- package/Paper/Paper.js +2 -1
- package/Paper/Paper.mjs +2 -1
- package/PigmentContainer/PigmentContainer.js +0 -1
- package/PigmentContainer/PigmentContainer.mjs +0 -1
- package/Popover/Popover.d.mts +1 -1
- package/Popover/Popover.d.ts +1 -1
- package/Popper/BasePopper.js +23 -1
- package/Popper/BasePopper.mjs +23 -1
- package/README.md +3 -2
- package/Radio/RadioButtonIcon.js +3 -2
- package/Radio/RadioButtonIcon.mjs +3 -2
- package/Rating/Rating.js +2 -1
- package/Rating/Rating.mjs +2 -1
- package/Select/Select.js +2 -5
- package/Select/Select.mjs +2 -5
- package/Select/SelectInput.js +276 -24
- package/Select/SelectInput.mjs +276 -24
- package/Select/utils/closedTypeahead.js +73 -0
- package/Select/utils/closedTypeahead.mjs +63 -0
- package/Skeleton/Skeleton.js +22 -2
- package/Skeleton/Skeleton.mjs +22 -2
- package/Slide/Slide.d.mts +15 -2
- package/Slide/Slide.d.ts +15 -2
- package/Slide/Slide.js +97 -47
- package/Slide/Slide.mjs +97 -47
- package/Slider/Slider.js +14 -4
- package/Slider/Slider.mjs +14 -4
- package/Slider/useSlider.js +4 -3
- package/Slider/useSlider.mjs +4 -3
- package/Snackbar/Snackbar.d.mts +2 -2
- package/Snackbar/Snackbar.d.ts +2 -2
- package/SpeedDial/SpeedDial.d.mts +1 -1
- package/SpeedDial/SpeedDial.d.ts +1 -1
- package/SpeedDial/SpeedDial.js +6 -2
- package/SpeedDial/SpeedDial.mjs +6 -2
- package/SpeedDialAction/SpeedDialAction.js +11 -2
- package/SpeedDialAction/SpeedDialAction.mjs +12 -3
- package/SpeedDialIcon/SpeedDialIcon.js +40 -37
- package/SpeedDialIcon/SpeedDialIcon.mjs +40 -37
- package/Step/Step.js +47 -15
- package/Step/Step.mjs +47 -15
- package/StepButton/StepButton.js +9 -3
- package/StepButton/StepButton.mjs +9 -3
- package/StepConnector/StepConnector.js +10 -0
- package/StepConnector/StepConnector.mjs +10 -0
- package/StepContent/StepContent.d.mts +2 -2
- package/StepContent/StepContent.d.ts +2 -2
- package/StepContent/StepContent.js +26 -2
- package/StepContent/StepContent.mjs +26 -2
- package/StepIcon/StepIcon.js +2 -1
- package/StepIcon/StepIcon.mjs +2 -1
- package/StepLabel/StepLabel.js +52 -7
- package/StepLabel/StepLabel.mjs +52 -7
- package/Stepper/Stepper.d.mts +2 -0
- package/Stepper/Stepper.d.ts +2 -0
- package/Stepper/Stepper.js +18 -0
- package/Stepper/Stepper.mjs +18 -0
- package/SvgIcon/SvgIcon.js +2 -1
- package/SvgIcon/SvgIcon.mjs +2 -1
- package/SwipeableDrawer/SwipeableDrawer.js +21 -6
- package/SwipeableDrawer/SwipeableDrawer.mjs +21 -6
- package/Switch/Switch.js +10 -8
- package/Switch/Switch.mjs +10 -8
- package/TableSortLabel/TableSortLabel.js +2 -1
- package/TableSortLabel/TableSortLabel.mjs +2 -1
- package/Tabs/ScrollbarSize.js +2 -1
- package/Tabs/ScrollbarSize.mjs +2 -1
- package/Tabs/Tabs.js +16 -4
- package/Tabs/Tabs.mjs +16 -4
- package/Tooltip/Tooltip.d.mts +2 -2
- package/Tooltip/Tooltip.d.ts +2 -2
- package/Tooltip/Tooltip.js +29 -108
- package/Tooltip/Tooltip.mjs +29 -108
- package/Unstable_TrapFocus/FocusTrap.js +60 -22
- package/Unstable_TrapFocus/FocusTrap.mjs +60 -22
- package/Zoom/Zoom.d.mts +15 -2
- package/Zoom/Zoom.d.ts +15 -2
- package/Zoom/Zoom.js +43 -16
- package/Zoom/Zoom.mjs +42 -15
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internal/Transition.d.mts +34 -0
- package/internal/Transition.d.ts +34 -0
- package/internal/Transition.js +444 -0
- package/internal/Transition.mjs +436 -0
- package/internal/react-transition-group.d.mts +8 -0
- package/internal/react-transition-group.d.ts +8 -0
- package/package.json +50 -50
- package/styles/createMotion.d.mts +8 -0
- package/styles/createMotion.d.ts +8 -0
- package/styles/createMotion.js +13 -0
- package/styles/createMotion.mjs +7 -0
- package/styles/createThemeFoundation.d.mts +2 -0
- package/styles/createThemeFoundation.d.ts +2 -0
- package/styles/createThemeNoVars.d.mts +3 -0
- package/styles/createThemeNoVars.d.ts +3 -0
- package/styles/createThemeNoVars.js +5 -0
- package/styles/createThemeNoVars.mjs +5 -0
- package/styles/createTransitions.d.mts +6 -2
- package/styles/createTransitions.d.ts +6 -2
- package/styles/createTransitions.js +12 -4
- package/styles/createTransitions.mjs +12 -4
- package/styles/enhanceHighContrast.d.mts +70 -0
- package/styles/enhanceHighContrast.d.ts +70 -0
- package/styles/enhanceHighContrast.js +502 -0
- package/styles/enhanceHighContrast.mjs +495 -0
- package/styles/index.d.mts +2 -0
- package/styles/index.d.ts +2 -0
- package/styles/index.js +8 -0
- package/styles/index.mjs +1 -0
- package/styles/reducedMotion.d.mts +7 -0
- package/styles/reducedMotion.d.ts +7 -0
- package/styles/reducedMotion.js +21 -0
- package/styles/reducedMotion.mjs +14 -0
- package/styles/responsiveFontSizes.js +19 -8
- package/styles/responsiveFontSizes.mjs +19 -8
- package/styles/shouldSkipGeneratingVar.js +1 -1
- package/styles/shouldSkipGeneratingVar.mjs +1 -1
- package/styles/stringifyTheme.js +1 -0
- package/styles/stringifyTheme.mjs +1 -0
- package/styles/useThemeProps.d.mts +3 -3
- package/styles/useThemeProps.d.ts +3 -3
- package/transitions/index.d.mts +1 -1
- package/transitions/index.d.ts +1 -1
- package/transitions/index.js +0 -11
- package/transitions/index.mjs +1 -1
- package/transitions/transition.d.mts +1 -12
- package/transitions/transition.d.ts +1 -12
- package/transitions/types.d.mts +73 -0
- package/transitions/types.d.ts +73 -0
- package/transitions/useReducedMotion.d.mts +14 -0
- package/transitions/useReducedMotion.d.ts +14 -0
- package/transitions/useReducedMotion.js +117 -0
- package/transitions/useReducedMotion.mjs +110 -0
- package/transitions/utils.d.mts +51 -2
- package/transitions/utils.d.ts +51 -2
- package/transitions/utils.js +97 -4
- package/transitions/utils.mjs +94 -4
- package/useAutocomplete/useAutocomplete.d.mts +12 -6
- package/useAutocomplete/useAutocomplete.d.ts +12 -6
- package/useAutocomplete/useAutocomplete.js +230 -55
- package/useAutocomplete/useAutocomplete.mjs +230 -55
- package/utils/contains.d.mts +2 -0
- package/utils/contains.d.ts +2 -0
- package/utils/contains.js +9 -0
- package/utils/contains.mjs +2 -0
- package/utils/focusable.d.mts +7 -0
- package/utils/focusable.d.ts +7 -0
- package/utils/focusable.js +20 -0
- package/utils/focusable.mjs +13 -0
- package/utils/getEventTarget.d.mts +2 -0
- package/utils/getEventTarget.d.ts +2 -0
- package/utils/getEventTarget.js +9 -0
- package/utils/getEventTarget.mjs +2 -0
- package/utils/mergeSlotProps.js +2 -8
- package/utils/mergeSlotProps.mjs +1 -8
- package/version/index.js +2 -2
- package/version/index.mjs +2 -2
- package/FormControl/formControlState.js +0 -21
- package/FormControl/formControlState.mjs +0 -15
- /package/transitions/{transition.js → types.js} +0 -0
- /package/transitions/{transition.mjs → types.mjs} +0 -0
package/MenuList/MenuList.mjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import { isItemFocusable } from '@mui/utils/useRovingTabIndex';
|
|
6
|
+
import contains from "../utils/contains.mjs";
|
|
6
7
|
import ownerDocument from "../utils/ownerDocument.mjs";
|
|
7
8
|
import getActiveElement from "../utils/getActiveElement.mjs";
|
|
8
9
|
import getScrollbarSize from "../utils/getScrollbarSize.mjs";
|
|
@@ -178,7 +179,7 @@ const MenuList = /*#__PURE__*/React.forwardRef(function MenuList(props, ref) {
|
|
|
178
179
|
return null;
|
|
179
180
|
}
|
|
180
181
|
const currentFocus = getActiveElement(ownerDocument(listRef.current));
|
|
181
|
-
if (currentFocus && listRef.current
|
|
182
|
+
if (currentFocus && contains(listRef.current, currentFocus)) {
|
|
182
183
|
return currentFocus;
|
|
183
184
|
}
|
|
184
185
|
return focusInitialTarget(true);
|
|
@@ -21,6 +21,7 @@ var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
|
21
21
|
var _slotShouldForwardProp = _interopRequireDefault(require("../styles/slotShouldForwardProp"));
|
|
22
22
|
var _mobileStepperClasses = require("./mobileStepperClasses");
|
|
23
23
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
24
|
+
var _utils = require("../transitions/utils");
|
|
24
25
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
26
|
const useUtilityClasses = ownerState => {
|
|
26
27
|
const {
|
|
@@ -112,7 +113,7 @@ const MobileStepperDot = (0, _zeroStyled.styled)('div', {
|
|
|
112
113
|
variant: 'dots'
|
|
113
114
|
},
|
|
114
115
|
style: {
|
|
115
|
-
|
|
116
|
+
...(0, _utils.getTransitionStyles)(theme, 'background-color', {
|
|
116
117
|
duration: theme.transitions.duration.shortest
|
|
117
118
|
}),
|
|
118
119
|
backgroundColor: (theme.vars || theme).palette.action.disabled,
|
|
@@ -14,6 +14,7 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
|
14
14
|
import slotShouldForwardProp from "../styles/slotShouldForwardProp.mjs";
|
|
15
15
|
import { getMobileStepperUtilityClass } from "./mobileStepperClasses.mjs";
|
|
16
16
|
import useSlot from "../utils/useSlot.mjs";
|
|
17
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
17
18
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
18
19
|
const useUtilityClasses = ownerState => {
|
|
19
20
|
const {
|
|
@@ -105,7 +106,7 @@ const MobileStepperDot = styled('div', {
|
|
|
105
106
|
variant: 'dots'
|
|
106
107
|
},
|
|
107
108
|
style: {
|
|
108
|
-
|
|
109
|
+
...getTransitionStyles(theme, 'background-color', {
|
|
109
110
|
duration: theme.transitions.duration.shortest
|
|
110
111
|
}),
|
|
111
112
|
backgroundColor: (theme.vars || theme).palette.action.disabled,
|
|
@@ -12,8 +12,7 @@ var _clsx = _interopRequireDefault(require("clsx"));
|
|
|
12
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
13
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
14
|
var _NativeSelectInput = _interopRequireDefault(require("./NativeSelectInput"));
|
|
15
|
-
var
|
|
16
|
-
var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
|
|
15
|
+
var _useFormControl = require("../FormControl/useFormControl");
|
|
17
16
|
var _ArrowDropDown = _interopRequireDefault(require("../internal/svg-icons/ArrowDropDown"));
|
|
18
17
|
var _Input = _interopRequireDefault(require("../Input"));
|
|
19
18
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
@@ -47,10 +46,8 @@ const NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(inProps
|
|
|
47
46
|
variant,
|
|
48
47
|
...other
|
|
49
48
|
} = props;
|
|
50
|
-
const
|
|
51
|
-
const fcs = (0, _formControlState.default)({
|
|
49
|
+
const [fcs] = (0, _useFormControl.useFormControlState)({
|
|
52
50
|
props,
|
|
53
|
-
muiFormControl,
|
|
54
51
|
states: ['variant']
|
|
55
52
|
});
|
|
56
53
|
const ownerState = {
|
|
@@ -5,8 +5,7 @@ import clsx from 'clsx';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import NativeSelectInput from "./NativeSelectInput.mjs";
|
|
8
|
-
import
|
|
9
|
-
import useFormControl from "../FormControl/useFormControl.mjs";
|
|
8
|
+
import { useFormControlState } from "../FormControl/useFormControl.mjs";
|
|
10
9
|
import ArrowDropDownIcon from "../internal/svg-icons/ArrowDropDown.mjs";
|
|
11
10
|
import Input from "../Input/index.mjs";
|
|
12
11
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
@@ -40,10 +39,8 @@ const NativeSelect = /*#__PURE__*/React.forwardRef(function NativeSelect(inProps
|
|
|
40
39
|
variant,
|
|
41
40
|
...other
|
|
42
41
|
} = props;
|
|
43
|
-
const
|
|
44
|
-
const fcs = formControlState({
|
|
42
|
+
const [fcs] = useFormControlState({
|
|
45
43
|
props,
|
|
46
|
-
muiFormControl,
|
|
47
44
|
states: ['variant']
|
|
48
45
|
});
|
|
49
46
|
const ownerState = {
|
|
@@ -10,6 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
10
10
|
var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
|
|
11
11
|
var _zeroStyled = require("../zero-styled");
|
|
12
12
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
13
|
+
var _utils = require("../transitions/utils");
|
|
13
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
15
|
var _span;
|
|
15
16
|
const NotchedOutlineRoot = (0, _zeroStyled.styled)('fieldset', {
|
|
@@ -51,7 +52,7 @@ const NotchedOutlineLegend = (0, _zeroStyled.styled)('legend', {
|
|
|
51
52
|
padding: 0,
|
|
52
53
|
lineHeight: '11px',
|
|
53
54
|
// sync with `height` in `legend` styles
|
|
54
|
-
|
|
55
|
+
...(0, _utils.getTransitionStyles)(theme, 'width', {
|
|
55
56
|
duration: 150,
|
|
56
57
|
easing: theme.transitions.easing.easeOut
|
|
57
58
|
})
|
|
@@ -69,7 +70,7 @@ const NotchedOutlineLegend = (0, _zeroStyled.styled)('legend', {
|
|
|
69
70
|
fontSize: '0.75em',
|
|
70
71
|
visibility: 'hidden',
|
|
71
72
|
maxWidth: 0.01,
|
|
72
|
-
|
|
73
|
+
...(0, _utils.getTransitionStyles)(theme, 'max-width', {
|
|
73
74
|
duration: 50,
|
|
74
75
|
easing: theme.transitions.easing.easeOut
|
|
75
76
|
}),
|
|
@@ -88,7 +89,7 @@ const NotchedOutlineLegend = (0, _zeroStyled.styled)('legend', {
|
|
|
88
89
|
}) => ownerState.withLabel && ownerState.notched,
|
|
89
90
|
style: {
|
|
90
91
|
maxWidth: '100%',
|
|
91
|
-
|
|
92
|
+
...(0, _utils.getTransitionStyles)(theme, 'max-width', {
|
|
92
93
|
duration: 100,
|
|
93
94
|
easing: theme.transitions.easing.easeOut,
|
|
94
95
|
delay: 50
|
|
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import rootShouldForwardProp from "../styles/rootShouldForwardProp.mjs";
|
|
6
6
|
import { styled } from "../zero-styled/index.mjs";
|
|
7
7
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
8
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
10
|
const NotchedOutlineRoot = styled('fieldset', {
|
|
10
11
|
name: 'MuiNotchedOutlined',
|
|
@@ -45,7 +46,7 @@ const NotchedOutlineLegend = styled('legend', {
|
|
|
45
46
|
padding: 0,
|
|
46
47
|
lineHeight: '11px',
|
|
47
48
|
// sync with `height` in `legend` styles
|
|
48
|
-
|
|
49
|
+
...getTransitionStyles(theme, 'width', {
|
|
49
50
|
duration: 150,
|
|
50
51
|
easing: theme.transitions.easing.easeOut
|
|
51
52
|
})
|
|
@@ -63,7 +64,7 @@ const NotchedOutlineLegend = styled('legend', {
|
|
|
63
64
|
fontSize: '0.75em',
|
|
64
65
|
visibility: 'hidden',
|
|
65
66
|
maxWidth: 0.01,
|
|
66
|
-
|
|
67
|
+
...getTransitionStyles(theme, 'max-width', {
|
|
67
68
|
duration: 50,
|
|
68
69
|
easing: theme.transitions.easing.easeOut
|
|
69
70
|
}),
|
|
@@ -82,7 +83,7 @@ const NotchedOutlineLegend = styled('legend', {
|
|
|
82
83
|
}) => ownerState.withLabel && ownerState.notched,
|
|
83
84
|
style: {
|
|
84
85
|
maxWidth: '100%',
|
|
85
|
-
|
|
86
|
+
...getTransitionStyles(theme, 'max-width', {
|
|
86
87
|
duration: 100,
|
|
87
88
|
easing: theme.transitions.easing.easeOut,
|
|
88
89
|
delay: 50
|
|
@@ -12,8 +12,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
12
12
|
var _refType = _interopRequireDefault(require("@mui/utils/refType"));
|
|
13
13
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
14
|
var _NotchedOutline = _interopRequireDefault(require("./NotchedOutline"));
|
|
15
|
-
var _useFormControl =
|
|
16
|
-
var _formControlState = _interopRequireDefault(require("../FormControl/formControlState"));
|
|
15
|
+
var _useFormControl = require("../FormControl/useFormControl");
|
|
17
16
|
var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
|
|
18
17
|
var _zeroStyled = require("../zero-styled");
|
|
19
18
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
@@ -134,26 +133,19 @@ const OutlinedInputInput = (0, _zeroStyled.styled)(_InputBase.InputBaseInput, {
|
|
|
134
133
|
theme
|
|
135
134
|
}) => ({
|
|
136
135
|
padding: '16.5px 14px',
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
'&:-webkit-autofill': {
|
|
137
|
+
...(!theme.vars && {
|
|
139
138
|
WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
|
|
140
139
|
WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
|
|
141
|
-
caretColor: theme.palette.mode === 'light' ? null : '#fff'
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
'&:-webkit-autofill': {
|
|
151
|
-
WebkitBoxShadow: '0 0 0 100px #266798 inset',
|
|
152
|
-
WebkitTextFillColor: '#fff',
|
|
153
|
-
caretColor: '#fff'
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}),
|
|
140
|
+
caretColor: theme.palette.mode === 'light' ? null : '#fff'
|
|
141
|
+
}),
|
|
142
|
+
borderRadius: 'inherit',
|
|
143
|
+
...(theme.vars && theme.applyStyles('dark', {
|
|
144
|
+
WebkitBoxShadow: '0 0 0 100px #266798 inset',
|
|
145
|
+
WebkitTextFillColor: '#fff',
|
|
146
|
+
caretColor: '#fff'
|
|
147
|
+
}))
|
|
148
|
+
},
|
|
157
149
|
variants: [{
|
|
158
150
|
props: {
|
|
159
151
|
size: 'small'
|
|
@@ -201,10 +193,8 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
|
|
|
201
193
|
...other
|
|
202
194
|
} = props;
|
|
203
195
|
const classes = useUtilityClasses(props);
|
|
204
|
-
const muiFormControl = (0, _useFormControl.
|
|
205
|
-
const fcs = (0, _formControlState.default)({
|
|
196
|
+
const [fcs, muiFormControl] = (0, _useFormControl.useFormControlState)({
|
|
206
197
|
props,
|
|
207
|
-
muiFormControl,
|
|
208
198
|
states: ['color', 'disabled', 'error', 'focused', 'hiddenLabel', 'size', 'required']
|
|
209
199
|
});
|
|
210
200
|
const ownerState = {
|
|
@@ -5,8 +5,7 @@ import PropTypes from 'prop-types';
|
|
|
5
5
|
import refType from '@mui/utils/refType';
|
|
6
6
|
import composeClasses from '@mui/utils/composeClasses';
|
|
7
7
|
import NotchedOutline from "./NotchedOutline.mjs";
|
|
8
|
-
import
|
|
9
|
-
import formControlState from "../FormControl/formControlState.mjs";
|
|
8
|
+
import { useFormControlState } from "../FormControl/useFormControl.mjs";
|
|
10
9
|
import rootShouldForwardProp from "../styles/rootShouldForwardProp.mjs";
|
|
11
10
|
import { styled } from "../zero-styled/index.mjs";
|
|
12
11
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
@@ -127,26 +126,19 @@ const OutlinedInputInput = styled(InputBaseInput, {
|
|
|
127
126
|
theme
|
|
128
127
|
}) => ({
|
|
129
128
|
padding: '16.5px 14px',
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
'&:-webkit-autofill': {
|
|
130
|
+
...(!theme.vars && {
|
|
132
131
|
WebkitBoxShadow: theme.palette.mode === 'light' ? null : '0 0 0 100px #266798 inset',
|
|
133
132
|
WebkitTextFillColor: theme.palette.mode === 'light' ? null : '#fff',
|
|
134
|
-
caretColor: theme.palette.mode === 'light' ? null : '#fff'
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
'&:-webkit-autofill': {
|
|
144
|
-
WebkitBoxShadow: '0 0 0 100px #266798 inset',
|
|
145
|
-
WebkitTextFillColor: '#fff',
|
|
146
|
-
caretColor: '#fff'
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}),
|
|
133
|
+
caretColor: theme.palette.mode === 'light' ? null : '#fff'
|
|
134
|
+
}),
|
|
135
|
+
borderRadius: 'inherit',
|
|
136
|
+
...(theme.vars && theme.applyStyles('dark', {
|
|
137
|
+
WebkitBoxShadow: '0 0 0 100px #266798 inset',
|
|
138
|
+
WebkitTextFillColor: '#fff',
|
|
139
|
+
caretColor: '#fff'
|
|
140
|
+
}))
|
|
141
|
+
},
|
|
150
142
|
variants: [{
|
|
151
143
|
props: {
|
|
152
144
|
size: 'small'
|
|
@@ -194,10 +186,8 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
|
|
|
194
186
|
...other
|
|
195
187
|
} = props;
|
|
196
188
|
const classes = useUtilityClasses(props);
|
|
197
|
-
const muiFormControl =
|
|
198
|
-
const fcs = formControlState({
|
|
189
|
+
const [fcs, muiFormControl] = useFormControlState({
|
|
199
190
|
props,
|
|
200
|
-
muiFormControl,
|
|
201
191
|
states: ['color', 'disabled', 'error', 'focused', 'hiddenLabel', 'size', 'required']
|
|
202
192
|
});
|
|
203
193
|
const ownerState = {
|
|
@@ -24,6 +24,7 @@ var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
|
24
24
|
var _zeroStyled = require("../zero-styled");
|
|
25
25
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
26
26
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
27
|
+
var _utils = require("../transitions/utils");
|
|
27
28
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
28
29
|
const overridesResolver = (props, styles) => {
|
|
29
30
|
const {
|
|
@@ -119,7 +120,7 @@ const PaginationItemPage = (0, _zeroStyled.styled)(_ButtonBase.default, {
|
|
|
119
120
|
[`&.${_paginationItemClasses.default.disabled}`]: {
|
|
120
121
|
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
121
122
|
},
|
|
122
|
-
|
|
123
|
+
...(0, _utils.getTransitionStyles)(theme, ['color', 'background-color'], {
|
|
123
124
|
duration: theme.transitions.duration.short
|
|
124
125
|
}),
|
|
125
126
|
'&:hover': {
|
|
@@ -17,6 +17,7 @@ import useSlot from "../utils/useSlot.mjs";
|
|
|
17
17
|
import { styled } from "../zero-styled/index.mjs";
|
|
18
18
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
19
19
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
20
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
20
21
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
22
|
const overridesResolver = (props, styles) => {
|
|
22
23
|
const {
|
|
@@ -112,7 +113,7 @@ const PaginationItemPage = styled(ButtonBase, {
|
|
|
112
113
|
[`&.${paginationItemClasses.disabled}`]: {
|
|
113
114
|
opacity: (theme.vars || theme).palette.action.disabledOpacity
|
|
114
115
|
},
|
|
115
|
-
|
|
116
|
+
...getTransitionStyles(theme, ['color', 'background-color'], {
|
|
116
117
|
duration: theme.transitions.duration.short
|
|
117
118
|
}),
|
|
118
119
|
'&:hover': {
|
package/Paper/Paper.js
CHANGED
|
@@ -19,6 +19,7 @@ var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
|
19
19
|
var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
20
20
|
var _getOverlayAlpha = _interopRequireDefault(require("../styles/getOverlayAlpha"));
|
|
21
21
|
var _paperClasses = require("./paperClasses");
|
|
22
|
+
var _utils = require("../transitions/utils");
|
|
22
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
24
|
const useUtilityClasses = ownerState => {
|
|
24
25
|
const {
|
|
@@ -46,7 +47,7 @@ const PaperRoot = (0, _zeroStyled.styled)('div', {
|
|
|
46
47
|
}) => ({
|
|
47
48
|
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
48
49
|
color: (theme.vars || theme).palette.text.primary,
|
|
49
|
-
|
|
50
|
+
...(0, _utils.getTransitionStyles)(theme, 'box-shadow'),
|
|
50
51
|
variants: [{
|
|
51
52
|
props: ({
|
|
52
53
|
ownerState
|
package/Paper/Paper.mjs
CHANGED
|
@@ -12,6 +12,7 @@ import memoTheme from "../utils/memoTheme.mjs";
|
|
|
12
12
|
import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
13
13
|
import getOverlayAlpha from "../styles/getOverlayAlpha.mjs";
|
|
14
14
|
import { getPaperUtilityClass } from "./paperClasses.mjs";
|
|
15
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
15
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
17
|
const useUtilityClasses = ownerState => {
|
|
17
18
|
const {
|
|
@@ -39,7 +40,7 @@ const PaperRoot = styled('div', {
|
|
|
39
40
|
}) => ({
|
|
40
41
|
backgroundColor: (theme.vars || theme).palette.background.paper,
|
|
41
42
|
color: (theme.vars || theme).palette.text.primary,
|
|
42
|
-
|
|
43
|
+
...getTransitionStyles(theme, 'box-shadow'),
|
|
43
44
|
variants: [{
|
|
44
45
|
props: ({
|
|
45
46
|
ownerState
|
package/Popover/Popover.d.mts
CHANGED
|
@@ -6,7 +6,7 @@ import { Theme } from "../styles/index.mjs";
|
|
|
6
6
|
import { InternalStandardProps as StandardProps } from "../internal/index.mjs";
|
|
7
7
|
import { PaperProps } from "../Paper/index.mjs";
|
|
8
8
|
import { ModalProps } from "../Modal/index.mjs";
|
|
9
|
-
import { TransitionProps } from "../transitions/
|
|
9
|
+
import { TransitionProps } from "../transitions/types.mjs";
|
|
10
10
|
import { PopoverClasses } from "./popoverClasses.mjs";
|
|
11
11
|
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.mjs";
|
|
12
12
|
export interface PopoverSlots {
|
package/Popover/Popover.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import { Theme } from "../styles/index.js";
|
|
|
6
6
|
import { InternalStandardProps as StandardProps } from "../internal/index.js";
|
|
7
7
|
import { PaperProps } from "../Paper/index.js";
|
|
8
8
|
import { ModalProps } from "../Modal/index.js";
|
|
9
|
-
import { TransitionProps } from "../transitions/
|
|
9
|
+
import { TransitionProps } from "../transitions/types.js";
|
|
10
10
|
import { PopoverClasses } from "./popoverClasses.js";
|
|
11
11
|
import { CreateSlotsAndSlotProps, SlotProps } from "../utils/types.js";
|
|
12
12
|
export interface PopoverSlots {
|
package/Popper/BasePopper.js
CHANGED
|
@@ -150,8 +150,30 @@ const PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props
|
|
|
150
150
|
modifiers: popperModifiers
|
|
151
151
|
});
|
|
152
152
|
handlePopperRefRef.current(popper);
|
|
153
|
+
const popperElement = tooltipRef.current;
|
|
153
154
|
return () => {
|
|
154
|
-
popper.destroy()
|
|
155
|
+
// popper.destroy() clears all inline positioning via the applyStyles
|
|
156
|
+
// modifier cleanup, which causes the element to jump to its static
|
|
157
|
+
// position. Snapshot and restore only the positioning properties so the
|
|
158
|
+
// element stays in place during the destroy/recreate gap (prevents scroll
|
|
159
|
+
// jumps when a child focuses between the two).
|
|
160
|
+
// https://github.com/mui/mui-x/issues/21839
|
|
161
|
+
if (popperElement) {
|
|
162
|
+
const {
|
|
163
|
+
style
|
|
164
|
+
} = popperElement;
|
|
165
|
+
const position = style.position;
|
|
166
|
+
const top = style.top;
|
|
167
|
+
const left = style.left;
|
|
168
|
+
const transform = style.transform;
|
|
169
|
+
popper.destroy();
|
|
170
|
+
style.position = position;
|
|
171
|
+
style.top = top;
|
|
172
|
+
style.left = left;
|
|
173
|
+
style.transform = transform;
|
|
174
|
+
} else {
|
|
175
|
+
popper.destroy();
|
|
176
|
+
}
|
|
155
177
|
handlePopperRefRef.current(null);
|
|
156
178
|
};
|
|
157
179
|
}, [resolvedAnchorElement, disablePortal, modifiers, open, popperOptions, rtlPlacement]);
|
package/Popper/BasePopper.mjs
CHANGED
|
@@ -143,8 +143,30 @@ const PopperTooltip = /*#__PURE__*/React.forwardRef(function PopperTooltip(props
|
|
|
143
143
|
modifiers: popperModifiers
|
|
144
144
|
});
|
|
145
145
|
handlePopperRefRef.current(popper);
|
|
146
|
+
const popperElement = tooltipRef.current;
|
|
146
147
|
return () => {
|
|
147
|
-
popper.destroy()
|
|
148
|
+
// popper.destroy() clears all inline positioning via the applyStyles
|
|
149
|
+
// modifier cleanup, which causes the element to jump to its static
|
|
150
|
+
// position. Snapshot and restore only the positioning properties so the
|
|
151
|
+
// element stays in place during the destroy/recreate gap (prevents scroll
|
|
152
|
+
// jumps when a child focuses between the two).
|
|
153
|
+
// https://github.com/mui/mui-x/issues/21839
|
|
154
|
+
if (popperElement) {
|
|
155
|
+
const {
|
|
156
|
+
style
|
|
157
|
+
} = popperElement;
|
|
158
|
+
const position = style.position;
|
|
159
|
+
const top = style.top;
|
|
160
|
+
const left = style.left;
|
|
161
|
+
const transform = style.transform;
|
|
162
|
+
popper.destroy();
|
|
163
|
+
style.position = position;
|
|
164
|
+
style.top = top;
|
|
165
|
+
style.left = left;
|
|
166
|
+
style.transform = transform;
|
|
167
|
+
} else {
|
|
168
|
+
popper.destroy();
|
|
169
|
+
}
|
|
148
170
|
handlePopperRefRef.current(null);
|
|
149
171
|
};
|
|
150
172
|
}, [resolvedAnchorElement, disablePortal, modifiers, open, popperOptions, rtlPlacement]);
|
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<!-- #host-reference -->
|
|
2
|
-
<!--
|
|
2
|
+
<!-- lint disable mui-first-block-heading -->
|
|
3
|
+
|
|
3
4
|
<p align="center">
|
|
4
|
-
<a href="https://mui.com/material-ui/"
|
|
5
|
+
<a href="https://mui.com/material-ui/" target="_blank"><img width="150" height="133" src="https://mui.com/static/logo.svg" alt="Material UI logo"></a>
|
|
5
6
|
</p>
|
|
6
7
|
|
|
7
8
|
<h1 align="center">Material UI</h1>
|
package/Radio/RadioButtonIcon.js
CHANGED
|
@@ -12,6 +12,7 @@ var _RadioButtonChecked = _interopRequireDefault(require("../internal/svg-icons/
|
|
|
12
12
|
var _rootShouldForwardProp = _interopRequireDefault(require("../styles/rootShouldForwardProp"));
|
|
13
13
|
var _zeroStyled = require("../zero-styled");
|
|
14
14
|
var _memoTheme = _interopRequireDefault(require("../utils/memoTheme"));
|
|
15
|
+
var _utils = require("../transitions/utils");
|
|
15
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
17
|
const RadioButtonIconRoot = (0, _zeroStyled.styled)('span', {
|
|
17
18
|
name: 'MuiRadioButtonIcon',
|
|
@@ -34,7 +35,7 @@ const RadioButtonIconDot = (0, _zeroStyled.styled)(_RadioButtonChecked.default,
|
|
|
34
35
|
left: 0,
|
|
35
36
|
position: 'absolute',
|
|
36
37
|
transform: 'scale(0)',
|
|
37
|
-
|
|
38
|
+
...(0, _utils.getTransitionStyles)(theme, 'transform', {
|
|
38
39
|
easing: theme.transitions.easing.easeIn,
|
|
39
40
|
duration: theme.transitions.duration.shortest
|
|
40
41
|
}),
|
|
@@ -44,7 +45,7 @@ const RadioButtonIconDot = (0, _zeroStyled.styled)(_RadioButtonChecked.default,
|
|
|
44
45
|
},
|
|
45
46
|
style: {
|
|
46
47
|
transform: 'scale(1)',
|
|
47
|
-
|
|
48
|
+
...(0, _utils.getTransitionStyles)(theme, 'transform', {
|
|
48
49
|
easing: theme.transitions.easing.easeOut,
|
|
49
50
|
duration: theme.transitions.duration.shortest
|
|
50
51
|
})
|
|
@@ -6,6 +6,7 @@ import RadioButtonCheckedIcon from "../internal/svg-icons/RadioButtonChecked.mjs
|
|
|
6
6
|
import rootShouldForwardProp from "../styles/rootShouldForwardProp.mjs";
|
|
7
7
|
import { styled } from "../zero-styled/index.mjs";
|
|
8
8
|
import memoTheme from "../utils/memoTheme.mjs";
|
|
9
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
9
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
11
|
const RadioButtonIconRoot = styled('span', {
|
|
11
12
|
name: 'MuiRadioButtonIcon',
|
|
@@ -28,7 +29,7 @@ const RadioButtonIconDot = styled(RadioButtonCheckedIcon, {
|
|
|
28
29
|
left: 0,
|
|
29
30
|
position: 'absolute',
|
|
30
31
|
transform: 'scale(0)',
|
|
31
|
-
|
|
32
|
+
...getTransitionStyles(theme, 'transform', {
|
|
32
33
|
easing: theme.transitions.easing.easeIn,
|
|
33
34
|
duration: theme.transitions.duration.shortest
|
|
34
35
|
}),
|
|
@@ -38,7 +39,7 @@ const RadioButtonIconDot = styled(RadioButtonCheckedIcon, {
|
|
|
38
39
|
},
|
|
39
40
|
style: {
|
|
40
41
|
transform: 'scale(1)',
|
|
41
|
-
|
|
42
|
+
...getTransitionStyles(theme, 'transform', {
|
|
42
43
|
easing: theme.transitions.easing.easeOut,
|
|
43
44
|
duration: theme.transitions.duration.shortest
|
|
44
45
|
})
|
package/Rating/Rating.js
CHANGED
|
@@ -26,6 +26,7 @@ var _DefaultPropsProvider = require("../DefaultPropsProvider");
|
|
|
26
26
|
var _slotShouldForwardProp = _interopRequireDefault(require("../styles/slotShouldForwardProp"));
|
|
27
27
|
var _ratingClasses = _interopRequireWildcard(require("./ratingClasses"));
|
|
28
28
|
var _useSlot = _interopRequireDefault(require("../utils/useSlot"));
|
|
29
|
+
var _utils2 = require("../transitions/utils");
|
|
29
30
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
30
31
|
function getDecimalPrecision(num) {
|
|
31
32
|
const decimalPart = num.toString().split('.')[1];
|
|
@@ -152,7 +153,7 @@ const RatingIcon = (0, _zeroStyled.styled)('span', {
|
|
|
152
153
|
}) => ({
|
|
153
154
|
// Fit wrapper to actual icon size.
|
|
154
155
|
display: 'flex',
|
|
155
|
-
|
|
156
|
+
...(0, _utils2.getTransitionStyles)(theme, 'transform', {
|
|
156
157
|
duration: theme.transitions.duration.shortest
|
|
157
158
|
}),
|
|
158
159
|
// Fix mouseLeave issue.
|
package/Rating/Rating.mjs
CHANGED
|
@@ -18,6 +18,7 @@ import { useDefaultProps } from "../DefaultPropsProvider/index.mjs";
|
|
|
18
18
|
import slotShouldForwardProp from "../styles/slotShouldForwardProp.mjs";
|
|
19
19
|
import ratingClasses, { getRatingUtilityClass } from "./ratingClasses.mjs";
|
|
20
20
|
import useSlot from "../utils/useSlot.mjs";
|
|
21
|
+
import { getTransitionStyles } from "../transitions/utils.mjs";
|
|
21
22
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
22
23
|
import { createElement as _createElement } from "react";
|
|
23
24
|
function getDecimalPrecision(num) {
|
|
@@ -145,7 +146,7 @@ const RatingIcon = styled('span', {
|
|
|
145
146
|
}) => ({
|
|
146
147
|
// Fit wrapper to actual icon size.
|
|
147
148
|
display: 'flex',
|
|
148
|
-
|
|
149
|
+
...getTransitionStyles(theme, 'transform', {
|
|
149
150
|
duration: theme.transitions.duration.shortest
|
|
150
151
|
}),
|
|
151
152
|
// Fix mouseLeave issue.
|
package/Select/Select.js
CHANGED
|
@@ -14,8 +14,7 @@ var _deepmerge = _interopRequireDefault(require("@mui/utils/deepmerge"));
|
|
|
14
14
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
15
15
|
var _getReactElementRef = _interopRequireDefault(require("@mui/utils/getReactElementRef"));
|
|
16
16
|
var _SelectInput = _interopRequireDefault(require("./SelectInput"));
|
|
17
|
-
var
|
|
18
|
-
var _useFormControl = _interopRequireDefault(require("../FormControl/useFormControl"));
|
|
17
|
+
var _useFormControl = require("../FormControl/useFormControl");
|
|
19
18
|
var _ArrowDropDown = _interopRequireDefault(require("../internal/svg-icons/ArrowDropDown"));
|
|
20
19
|
var _Input = _interopRequireDefault(require("../Input"));
|
|
21
20
|
var _NativeSelectInput = _interopRequireDefault(require("../NativeSelect/NativeSelectInput"));
|
|
@@ -78,10 +77,8 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
78
77
|
...other
|
|
79
78
|
} = props;
|
|
80
79
|
const inputComponent = native ? _NativeSelectInput.default : _SelectInput.default;
|
|
81
|
-
const
|
|
82
|
-
const fcs = (0, _formControlState.default)({
|
|
80
|
+
const [fcs] = (0, _useFormControl.useFormControlState)({
|
|
83
81
|
props,
|
|
84
|
-
muiFormControl,
|
|
85
82
|
states: ['variant', 'error']
|
|
86
83
|
});
|
|
87
84
|
const variant = fcs.variant || variantProp;
|
package/Select/Select.mjs
CHANGED
|
@@ -7,8 +7,7 @@ import deepmerge from '@mui/utils/deepmerge';
|
|
|
7
7
|
import composeClasses from '@mui/utils/composeClasses';
|
|
8
8
|
import getReactElementRef from '@mui/utils/getReactElementRef';
|
|
9
9
|
import SelectInput from "./SelectInput.mjs";
|
|
10
|
-
import
|
|
11
|
-
import useFormControl from "../FormControl/useFormControl.mjs";
|
|
10
|
+
import { useFormControlState } from "../FormControl/useFormControl.mjs";
|
|
12
11
|
import ArrowDropDownIcon from "../internal/svg-icons/ArrowDropDown.mjs";
|
|
13
12
|
import Input from "../Input/index.mjs";
|
|
14
13
|
import NativeSelectInput from "../NativeSelect/NativeSelectInput.mjs";
|
|
@@ -71,10 +70,8 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
71
70
|
...other
|
|
72
71
|
} = props;
|
|
73
72
|
const inputComponent = native ? NativeSelectInput : SelectInput;
|
|
74
|
-
const
|
|
75
|
-
const fcs = formControlState({
|
|
73
|
+
const [fcs] = useFormControlState({
|
|
76
74
|
props,
|
|
77
|
-
muiFormControl,
|
|
78
75
|
states: ['variant', 'error']
|
|
79
76
|
});
|
|
80
77
|
const variant = fcs.variant || variantProp;
|