@mui/material 5.2.8 → 5.4.1
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/Autocomplete/Autocomplete.d.ts +7 -0
- package/Autocomplete/Autocomplete.js +20 -10
- package/AvatarGroup/AvatarGroup.d.ts +10 -0
- package/AvatarGroup/AvatarGroup.js +19 -7
- package/Badge/Badge.js +5 -8
- package/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/Button/buttonClasses.d.ts +1 -1
- package/ButtonBase/ButtonBase.d.ts +5 -1
- package/ButtonBase/ButtonBase.js +15 -2
- package/ButtonBase/TouchRipple.js +1 -2
- package/CHANGELOG.md +308 -28
- package/Fab/Fab.d.ts +4 -1
- package/Fab/Fab.js +8 -20
- package/Fab/fabClasses.js +1 -1
- package/FormControlLabel/FormControlLabel.js +11 -3
- package/FormControlLabel/formControlLabelClasses.d.ts +2 -0
- package/FormControlLabel/formControlLabelClasses.js +1 -1
- package/FormGroup/FormGroup.js +14 -3
- package/FormGroup/formGroupClasses.d.ts +2 -0
- package/FormGroup/formGroupClasses.js +1 -1
- package/FormHelperText/FormHelperText.js +7 -9
- package/Grid/Grid.js +2 -4
- package/ImageList/ImageList.js +3 -1
- package/InputAdornment/InputAdornment.js +6 -9
- package/Modal/Modal.js +1 -1
- package/OutlinedInput/NotchedOutline.js +14 -16
- package/OutlinedInput/OutlinedInput.js +1 -1
- package/README.md +9 -9
- package/Radio/RadioButtonIcon.js +2 -6
- package/Rating/Rating.js +1 -1
- package/Select/Select.d.ts +9 -1
- package/Select/Select.js +10 -1
- package/Select/SelectInput.d.ts +1 -0
- package/Select/SelectInput.js +37 -14
- package/Slider/Slider.js +112 -55
- package/Snackbar/Snackbar.js +4 -1
- package/SvgIcon/SvgIcon.js +9 -9
- package/SwipeableDrawer/SwipeArea.js +1 -3
- package/TextField/TextField.js +1 -1
- package/index.d.ts +8 -3
- package/index.js +6 -3
- package/internal/SwitchBase.js +2 -6
- package/legacy/Autocomplete/Autocomplete.js +21 -10
- package/legacy/AvatarGroup/AvatarGroup.js +20 -7
- package/legacy/Badge/Badge.js +6 -8
- package/legacy/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/legacy/ButtonBase/ButtonBase.js +15 -2
- package/legacy/ButtonBase/TouchRipple.js +1 -2
- package/legacy/Fab/Fab.js +8 -20
- package/legacy/Fab/fabClasses.js +1 -1
- package/legacy/FormControlLabel/FormControlLabel.js +11 -3
- package/legacy/FormControlLabel/formControlLabelClasses.js +1 -1
- package/legacy/FormGroup/FormGroup.js +14 -3
- package/legacy/FormGroup/formGroupClasses.js +1 -1
- package/legacy/FormHelperText/FormHelperText.js +7 -9
- package/legacy/Grid/Grid.js +2 -4
- package/legacy/ImageList/ImageList.js +3 -1
- package/legacy/InputAdornment/InputAdornment.js +6 -9
- package/legacy/Modal/Modal.js +1 -1
- package/legacy/OutlinedInput/NotchedOutline.js +14 -16
- package/legacy/OutlinedInput/OutlinedInput.js +1 -1
- package/legacy/Radio/RadioButtonIcon.js +2 -6
- package/legacy/Rating/Rating.js +1 -1
- package/legacy/Select/Select.js +11 -1
- package/legacy/Select/SelectInput.js +41 -17
- package/legacy/Slider/Slider.js +113 -56
- package/legacy/Snackbar/Snackbar.js +4 -1
- package/legacy/SvgIcon/SvgIcon.js +9 -9
- package/legacy/SwipeableDrawer/SwipeArea.js +1 -3
- package/legacy/TextField/TextField.js +1 -1
- package/legacy/index.js +6 -3
- package/legacy/internal/SwitchBase.js +2 -6
- package/legacy/styles/makeStyles.js +1 -1
- package/legacy/styles/withStyles.js +1 -1
- package/legacy/styles/withTheme.js +1 -1
- package/legacy/useMediaQuery/useMediaQuery.js +87 -32
- package/legacy/utils/shouldSpreadAdditionalProps.js +7 -0
- package/modern/Autocomplete/Autocomplete.js +19 -9
- package/modern/AvatarGroup/AvatarGroup.js +17 -7
- package/modern/Badge/Badge.js +5 -8
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/modern/ButtonBase/ButtonBase.js +15 -2
- package/modern/ButtonBase/TouchRipple.js +1 -2
- package/modern/Fab/Fab.js +8 -20
- package/modern/Fab/fabClasses.js +1 -1
- package/modern/FormControlLabel/FormControlLabel.js +11 -3
- package/modern/FormControlLabel/formControlLabelClasses.js +1 -1
- package/modern/FormGroup/FormGroup.js +14 -3
- package/modern/FormGroup/formGroupClasses.js +1 -1
- package/modern/FormHelperText/FormHelperText.js +7 -9
- package/modern/Grid/Grid.js +2 -4
- package/modern/ImageList/ImageList.js +3 -1
- package/modern/InputAdornment/InputAdornment.js +6 -9
- package/modern/Modal/Modal.js +1 -1
- package/modern/OutlinedInput/NotchedOutline.js +14 -16
- package/modern/OutlinedInput/OutlinedInput.js +1 -1
- package/modern/Radio/RadioButtonIcon.js +2 -6
- package/modern/Rating/Rating.js +1 -1
- package/modern/Select/Select.js +10 -1
- package/modern/Select/SelectInput.js +37 -14
- package/modern/Slider/Slider.js +112 -55
- package/modern/Snackbar/Snackbar.js +4 -1
- package/modern/SvgIcon/SvgIcon.js +8 -8
- package/modern/SwipeableDrawer/SwipeArea.js +1 -3
- package/modern/TextField/TextField.js +1 -1
- package/modern/index.js +6 -3
- package/modern/internal/SwitchBase.js +2 -6
- package/modern/styles/makeStyles.js +1 -1
- package/modern/styles/withStyles.js +1 -1
- package/modern/styles/withTheme.js +1 -1
- package/modern/useMediaQuery/useMediaQuery.js +69 -27
- package/modern/utils/shouldSpreadAdditionalProps.js +7 -0
- package/node/Autocomplete/Autocomplete.js +20 -10
- package/node/AvatarGroup/AvatarGroup.js +19 -7
- package/node/Badge/Badge.js +7 -9
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/node/ButtonBase/ButtonBase.js +15 -2
- package/node/ButtonBase/TouchRipple.js +1 -2
- package/node/Fab/Fab.js +8 -20
- package/node/Fab/fabClasses.js +1 -1
- package/node/FormControlLabel/FormControlLabel.js +12 -3
- package/node/FormControlLabel/formControlLabelClasses.js +1 -1
- package/node/FormGroup/FormGroup.js +15 -3
- package/node/FormGroup/formGroupClasses.js +1 -1
- package/node/FormHelperText/FormHelperText.js +6 -9
- package/node/Grid/Grid.js +2 -4
- package/node/ImageList/ImageList.js +3 -1
- package/node/InputAdornment/InputAdornment.js +5 -9
- package/node/Modal/Modal.js +1 -1
- package/node/OutlinedInput/NotchedOutline.js +12 -16
- package/node/OutlinedInput/OutlinedInput.js +1 -1
- package/node/Radio/RadioButtonIcon.js +2 -6
- package/node/Rating/Rating.js +1 -1
- package/node/Select/Select.js +10 -1
- package/node/Select/SelectInput.js +36 -14
- package/node/Slider/Slider.js +98 -47
- package/node/Snackbar/Snackbar.js +4 -1
- package/node/SvgIcon/SvgIcon.js +9 -9
- package/node/SwipeableDrawer/SwipeArea.js +1 -3
- package/node/TextField/TextField.js +1 -1
- package/node/index.js +41 -16
- package/node/internal/SwitchBase.js +2 -6
- package/node/styles/makeStyles.js +1 -1
- package/node/styles/withStyles.js +1 -1
- package/node/styles/withTheme.js +1 -1
- package/node/useMediaQuery/useMediaQuery.js +69 -27
- package/node/utils/shouldSpreadAdditionalProps.js +15 -0
- package/package.json +10 -10
- package/styles/ThemeProvider.d.ts +1 -1
- package/styles/components.d.ts +452 -113
- package/styles/createTheme.d.ts +12 -6
- package/styles/makeStyles.js +1 -1
- package/styles/overrides.d.ts +16 -4
- package/styles/useThemeProps.d.ts +2 -1
- package/styles/withStyles.js +1 -1
- package/styles/withTheme.js +1 -1
- package/umd/material-ui.development.js +5099 -7092
- package/umd/material-ui.production.min.js +21 -21
- package/useMediaQuery/useMediaQuery.d.ts +4 -0
- package/useMediaQuery/useMediaQuery.js +69 -27
- package/utils/shouldSpreadAdditionalProps.js +7 -0
|
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
3
3
|
|
|
4
4
|
var _ClearIcon, _ArrowDropDownIcon;
|
|
5
5
|
|
|
6
|
-
const _excluded = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "value"];
|
|
6
|
+
const _excluded = ["autoComplete", "autoHighlight", "autoSelect", "blurOnSelect", "ChipProps", "className", "clearIcon", "clearOnBlur", "clearOnEscape", "clearText", "closeText", "componentsProps", "defaultValue", "disableClearable", "disableCloseOnSelect", "disabled", "disabledItemsFocusable", "disableListWrap", "disablePortal", "filterOptions", "filterSelectedOptions", "forcePopupIcon", "freeSolo", "fullWidth", "getLimitTagsText", "getOptionDisabled", "getOptionLabel", "isOptionEqualToValue", "groupBy", "handleHomeEndKeys", "id", "includeInputInList", "inputValue", "limitTags", "ListboxComponent", "ListboxProps", "loading", "loadingText", "multiple", "noOptionsText", "onChange", "onClose", "onHighlightChange", "onInputChange", "onOpen", "open", "openOnFocus", "openText", "options", "PaperComponent", "PopperComponent", "popupIcon", "readOnly", "renderGroup", "renderInput", "renderOption", "renderTags", "selectOnFocus", "size", "value"];
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
9
|
import clsx from 'clsx';
|
|
@@ -398,6 +398,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
398
398
|
PaperComponent = Paper,
|
|
399
399
|
PopperComponent = Popper,
|
|
400
400
|
popupIcon = _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/_jsx(ArrowDropDownIcon, {})),
|
|
401
|
+
readOnly = false,
|
|
401
402
|
renderGroup: renderGroupProp,
|
|
402
403
|
renderInput,
|
|
403
404
|
renderOption: renderOptionProp,
|
|
@@ -431,7 +432,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
431
432
|
} = useAutocomplete(_extends({}, props, {
|
|
432
433
|
componentName: 'Autocomplete'
|
|
433
434
|
}));
|
|
434
|
-
const hasClearIcon = !disableClearable && !disabled && dirty;
|
|
435
|
+
const hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;
|
|
435
436
|
const hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;
|
|
436
437
|
|
|
437
438
|
const ownerState = _extends({}, props, {
|
|
@@ -550,7 +551,8 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
550
551
|
},
|
|
551
552
|
inputProps: _extends({
|
|
552
553
|
className: clsx(classes.input),
|
|
553
|
-
disabled
|
|
554
|
+
disabled,
|
|
555
|
+
readOnly
|
|
554
556
|
}, getInputProps())
|
|
555
557
|
})
|
|
556
558
|
})), popupOpen && anchorEl ? /*#__PURE__*/_jsx(AutocompletePopper, {
|
|
@@ -564,10 +566,11 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
564
566
|
role: "presentation",
|
|
565
567
|
anchorEl: anchorEl,
|
|
566
568
|
open: true,
|
|
567
|
-
children: /*#__PURE__*/_jsxs(AutocompletePaper, {
|
|
568
|
-
as: PaperComponent,
|
|
569
|
-
className: classes.paper,
|
|
569
|
+
children: /*#__PURE__*/_jsxs(AutocompletePaper, _extends({
|
|
570
570
|
ownerState: ownerState,
|
|
571
|
+
as: PaperComponent
|
|
572
|
+
}, componentsProps.paper, {
|
|
573
|
+
className: clsx(classes.paper, componentsProps.paper?.className),
|
|
571
574
|
children: [loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(AutocompleteLoading, {
|
|
572
575
|
className: classes.loading,
|
|
573
576
|
ownerState: ownerState,
|
|
@@ -598,7 +601,7 @@ const Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps
|
|
|
598
601
|
return renderListOption(option, index);
|
|
599
602
|
})
|
|
600
603
|
})) : null]
|
|
601
|
-
})
|
|
604
|
+
}))
|
|
602
605
|
}) : null]
|
|
603
606
|
});
|
|
604
607
|
});
|
|
@@ -668,7 +671,7 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
|
|
|
668
671
|
* If `true`, the input's text is cleared on blur if no value is selected.
|
|
669
672
|
*
|
|
670
673
|
* Set to `true` if you want to help the user enter a new value.
|
|
671
|
-
* Set to `false` if you want to help the user resume
|
|
674
|
+
* Set to `false` if you want to help the user resume their search.
|
|
672
675
|
* @default !props.freeSolo
|
|
673
676
|
*/
|
|
674
677
|
clearOnBlur: PropTypes.bool,
|
|
@@ -700,7 +703,8 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
|
|
|
700
703
|
* @default {}
|
|
701
704
|
*/
|
|
702
705
|
componentsProps: PropTypes.shape({
|
|
703
|
-
clearIndicator: PropTypes.object
|
|
706
|
+
clearIndicator: PropTypes.object,
|
|
707
|
+
paper: PropTypes.object
|
|
704
708
|
}),
|
|
705
709
|
|
|
706
710
|
/**
|
|
@@ -989,6 +993,12 @@ process.env.NODE_ENV !== "production" ? Autocomplete.propTypes
|
|
|
989
993
|
*/
|
|
990
994
|
popupIcon: PropTypes.node,
|
|
991
995
|
|
|
996
|
+
/**
|
|
997
|
+
* If `true`, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.
|
|
998
|
+
* @default false
|
|
999
|
+
*/
|
|
1000
|
+
readOnly: PropTypes.bool,
|
|
1001
|
+
|
|
992
1002
|
/**
|
|
993
1003
|
* Render the group.
|
|
994
1004
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
-
const _excluded = ["children", "className", "max", "spacing", "total", "variant"];
|
|
3
|
+
const _excluded = ["children", "className", "componentsProps", "max", "spacing", "total", "variant"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { isFragment } from 'react-is';
|
|
@@ -71,6 +71,7 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
71
71
|
const {
|
|
72
72
|
children: childrenProp,
|
|
73
73
|
className,
|
|
74
|
+
componentsProps = {},
|
|
74
75
|
max = 5,
|
|
75
76
|
spacing = 'medium',
|
|
76
77
|
total,
|
|
@@ -111,15 +112,16 @@ const AvatarGroup = /*#__PURE__*/React.forwardRef(function AvatarGroup(inProps,
|
|
|
111
112
|
className: clsx(classes.root, className),
|
|
112
113
|
ref: ref
|
|
113
114
|
}, other, {
|
|
114
|
-
children: [extraAvatars ? /*#__PURE__*/_jsxs(AvatarGroupAvatar, {
|
|
115
|
+
children: [extraAvatars ? /*#__PURE__*/_jsxs(AvatarGroupAvatar, _extends({
|
|
115
116
|
ownerState: ownerState,
|
|
116
|
-
|
|
117
|
-
|
|
117
|
+
variant: variant
|
|
118
|
+
}, componentsProps.additionalAvatar, {
|
|
119
|
+
className: clsx(classes.avatar, componentsProps.additionalAvatar?.className),
|
|
120
|
+
style: _extends({
|
|
118
121
|
marginLeft
|
|
119
|
-
},
|
|
120
|
-
variant: variant,
|
|
122
|
+
}, componentsProps.additionalAvatar?.style),
|
|
121
123
|
children: ["+", extraAvatars]
|
|
122
|
-
}) : null, children.slice(0, maxAvatars).reverse().map(child => {
|
|
124
|
+
})) : null, children.slice(0, maxAvatars).reverse().map(child => {
|
|
123
125
|
return /*#__PURE__*/React.cloneElement(child, {
|
|
124
126
|
className: clsx(child.props.className, classes.avatar),
|
|
125
127
|
style: _extends({
|
|
@@ -153,6 +155,14 @@ process.env.NODE_ENV !== "production" ? AvatarGroup.propTypes
|
|
|
153
155
|
*/
|
|
154
156
|
className: PropTypes.string,
|
|
155
157
|
|
|
158
|
+
/**
|
|
159
|
+
* The props used for each slot inside the AvatarGroup.
|
|
160
|
+
* @default {}
|
|
161
|
+
*/
|
|
162
|
+
componentsProps: PropTypes.shape({
|
|
163
|
+
additionalAvatar: PropTypes.object
|
|
164
|
+
}),
|
|
165
|
+
|
|
156
166
|
/**
|
|
157
167
|
* Max avatars to show before +x.
|
|
158
168
|
* @default 5
|
package/modern/Badge/Badge.js
CHANGED
|
@@ -5,10 +5,11 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
7
7
|
import { usePreviousProps } from '@mui/utils';
|
|
8
|
-
import { generateUtilityClasses
|
|
8
|
+
import { generateUtilityClasses } from '@mui/base';
|
|
9
9
|
import BadgeUnstyled, { badgeUnstyledClasses, getBadgeUtilityClass } from '@mui/base/BadgeUnstyled';
|
|
10
10
|
import styled from '../styles/styled';
|
|
11
11
|
import useThemeProps from '../styles/useThemeProps';
|
|
12
|
+
import shouldSpreadAdditionalProps from '../utils/shouldSpreadAdditionalProps';
|
|
12
13
|
import capitalize from '../utils/capitalize';
|
|
13
14
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
15
|
export const badgeClasses = _extends({}, badgeUnstyledClasses, generateUtilityClasses('MuiBadge', ['colorError', 'colorInfo', 'colorPrimary', 'colorSecondary', 'colorSuccess', 'colorWarning', 'overlapRectangular', 'overlapCircular', // TODO: v6 remove the overlap value from these class keys
|
|
@@ -152,11 +153,6 @@ const BadgeBadge = styled('span', {
|
|
|
152
153
|
duration: theme.transitions.duration.leavingScreen
|
|
153
154
|
})
|
|
154
155
|
}));
|
|
155
|
-
|
|
156
|
-
const shouldSpreadAdditionalProps = Slot => {
|
|
157
|
-
return !Slot || !isHostComponent(Slot);
|
|
158
|
-
};
|
|
159
|
-
|
|
160
156
|
const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
161
157
|
const props = useThemeProps({
|
|
162
158
|
props: inProps,
|
|
@@ -173,7 +169,7 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
|
173
169
|
componentsProps = {},
|
|
174
170
|
overlap: overlapProp = 'rectangular',
|
|
175
171
|
color: colorProp = 'default',
|
|
176
|
-
invisible: invisibleProp,
|
|
172
|
+
invisible: invisibleProp = false,
|
|
177
173
|
badgeContent: badgeContentProp,
|
|
178
174
|
showZero = false,
|
|
179
175
|
variant: variantProp = 'standard'
|
|
@@ -187,7 +183,7 @@ const Badge = /*#__PURE__*/React.forwardRef(function Badge(inProps, ref) {
|
|
|
187
183
|
});
|
|
188
184
|
let invisible = invisibleProp;
|
|
189
185
|
|
|
190
|
-
if (invisibleProp
|
|
186
|
+
if (invisibleProp === false && (badgeContentProp === 0 && !showZero || badgeContentProp == null && variantProp !== 'dot')) {
|
|
191
187
|
invisible = true;
|
|
192
188
|
}
|
|
193
189
|
|
|
@@ -305,6 +301,7 @@ process.env.NODE_ENV !== "production" ? Badge.propTypes
|
|
|
305
301
|
|
|
306
302
|
/**
|
|
307
303
|
* If `true`, the badge is invisible.
|
|
304
|
+
* @default false
|
|
308
305
|
*/
|
|
309
306
|
invisible: PropTypes.bool,
|
|
310
307
|
|
|
@@ -6,9 +6,7 @@ import styled from '../styles/styled';
|
|
|
6
6
|
import MoreHorizIcon from '../internal/svg-icons/MoreHoriz';
|
|
7
7
|
import ButtonBase from '../ButtonBase';
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
const BreadcrumbCollapsedButton = styled(ButtonBase
|
|
10
|
-
skipSx: true
|
|
11
|
-
})(({
|
|
9
|
+
const BreadcrumbCollapsedButton = styled(ButtonBase)(({
|
|
12
10
|
theme
|
|
13
11
|
}) => _extends({
|
|
14
12
|
display: 'flex',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
const _excluded = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "type"];
|
|
3
|
+
const _excluded = ["action", "centerRipple", "children", "className", "component", "disabled", "disableRipple", "disableTouchRipple", "focusRipple", "focusVisibleClassName", "LinkComponent", "onBlur", "onClick", "onContextMenu", "onDragLeave", "onFocus", "onFocusVisible", "onKeyDown", "onKeyUp", "onMouseDown", "onMouseLeave", "onMouseUp", "onTouchEnd", "onTouchMove", "onTouchStart", "tabIndex", "TouchRippleProps", "touchRippleRef", "type"];
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import clsx from 'clsx';
|
|
@@ -118,12 +118,14 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
|
|
|
118
118
|
onTouchStart,
|
|
119
119
|
tabIndex = 0,
|
|
120
120
|
TouchRippleProps,
|
|
121
|
+
touchRippleRef,
|
|
121
122
|
type
|
|
122
123
|
} = props,
|
|
123
124
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
124
125
|
|
|
125
126
|
const buttonRef = React.useRef(null);
|
|
126
127
|
const rippleRef = React.useRef(null);
|
|
128
|
+
const handleRippleRef = useForkRef(rippleRef, touchRippleRef);
|
|
127
129
|
const {
|
|
128
130
|
isFocusVisibleRef,
|
|
129
131
|
onFocus: handleFocusVisible,
|
|
@@ -343,7 +345,7 @@ const ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, re
|
|
|
343
345
|
|
|
344
346
|
/* TouchRipple is only needed client-side, x2 boost on the server. */
|
|
345
347
|
_jsx(TouchRipple, _extends({
|
|
346
|
-
ref:
|
|
348
|
+
ref: handleRippleRef,
|
|
347
349
|
center: centerRipple
|
|
348
350
|
}, TouchRippleProps)) : null]
|
|
349
351
|
}));
|
|
@@ -526,6 +528,17 @@ process.env.NODE_ENV !== "production" ? ButtonBase.propTypes
|
|
|
526
528
|
*/
|
|
527
529
|
TouchRippleProps: PropTypes.object,
|
|
528
530
|
|
|
531
|
+
/**
|
|
532
|
+
* A ref that points to the `TouchRippple` element.
|
|
533
|
+
*/
|
|
534
|
+
touchRippleRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
|
|
535
|
+
current: PropTypes.shape({
|
|
536
|
+
pulsate: PropTypes.func.isRequired,
|
|
537
|
+
start: PropTypes.func.isRequired,
|
|
538
|
+
stop: PropTypes.func.isRequired
|
|
539
|
+
})
|
|
540
|
+
})]),
|
|
541
|
+
|
|
529
542
|
/**
|
|
530
543
|
* @ignore
|
|
531
544
|
*/
|
package/modern/Fab/Fab.js
CHANGED
|
@@ -20,7 +20,7 @@ const useUtilityClasses = ownerState => {
|
|
|
20
20
|
size
|
|
21
21
|
} = ownerState;
|
|
22
22
|
const slots = {
|
|
23
|
-
root: ['root', variant, `size${capitalize(size)}`, color === 'inherit'
|
|
23
|
+
root: ['root', variant, `size${capitalize(size)}`, color === 'inherit' ? 'colorInherit' : color]
|
|
24
24
|
};
|
|
25
25
|
return composeClasses(slots, getFabUtilityClass, classes);
|
|
26
26
|
};
|
|
@@ -32,7 +32,7 @@ const FabRoot = styled(ButtonBase, {
|
|
|
32
32
|
const {
|
|
33
33
|
ownerState
|
|
34
34
|
} = props;
|
|
35
|
-
return [styles.root, styles[ownerState.variant], styles[`size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.
|
|
35
|
+
return [styles.root, styles[ownerState.variant], styles[`size${capitalize(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, styles[capitalize(ownerState.size)], styles[ownerState.color]];
|
|
36
36
|
}
|
|
37
37
|
})(({
|
|
38
38
|
theme,
|
|
@@ -99,24 +99,14 @@ const FabRoot = styled(ButtonBase, {
|
|
|
99
99
|
}), ({
|
|
100
100
|
theme,
|
|
101
101
|
ownerState
|
|
102
|
-
}) => _extends({}, ownerState.color
|
|
103
|
-
color: theme.palette.
|
|
104
|
-
backgroundColor: theme.palette.
|
|
102
|
+
}) => _extends({}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && theme.palette[ownerState.color] != null && {
|
|
103
|
+
color: theme.palette[ownerState.color].contrastText,
|
|
104
|
+
backgroundColor: theme.palette[ownerState.color].main,
|
|
105
105
|
'&:hover': {
|
|
106
|
-
backgroundColor: theme.palette.
|
|
106
|
+
backgroundColor: theme.palette[ownerState.color].dark,
|
|
107
107
|
// Reset on touch devices, it doesn't add specificity
|
|
108
108
|
'@media (hover: none)': {
|
|
109
|
-
backgroundColor: theme.palette.
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}, ownerState.color === 'secondary' && {
|
|
113
|
-
color: theme.palette.secondary.contrastText,
|
|
114
|
-
backgroundColor: theme.palette.secondary.main,
|
|
115
|
-
'&:hover': {
|
|
116
|
-
backgroundColor: theme.palette.secondary.dark,
|
|
117
|
-
// Reset on touch devices, it doesn't add specificity
|
|
118
|
-
'@media (hover: none)': {
|
|
119
|
-
backgroundColor: theme.palette.secondary.main
|
|
109
|
+
backgroundColor: theme.palette[ownerState.color].main
|
|
120
110
|
}
|
|
121
111
|
}
|
|
122
112
|
}));
|
|
@@ -188,9 +178,7 @@ process.env.NODE_ENV !== "production" ? Fab.propTypes
|
|
|
188
178
|
* The color of the component. It supports those theme colors that make sense for this component.
|
|
189
179
|
* @default 'default'
|
|
190
180
|
*/
|
|
191
|
-
color: PropTypes
|
|
192
|
-
/* @typescript-to-proptypes-ignore */
|
|
193
|
-
.oneOfType([PropTypes.oneOf(['default', 'inherit', 'primary', 'secondary']), PropTypes.string]),
|
|
181
|
+
color: PropTypes.oneOf(['default', 'error', 'info', 'inherit', 'primary', 'secondary', 'success', 'warning']),
|
|
194
182
|
|
|
195
183
|
/**
|
|
196
184
|
* The component used for the root node.
|
package/modern/Fab/fabClasses.js
CHANGED
|
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
|
2
2
|
export function getFabUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiFab', slot);
|
|
4
4
|
}
|
|
5
|
-
const fabClasses = generateUtilityClasses('MuiFab', ['root', 'primary', 'secondary', 'extended', 'circular', 'focusVisible', 'disabled', 'colorInherit', 'sizeSmall', 'sizeMedium', 'sizeLarge']);
|
|
5
|
+
const fabClasses = generateUtilityClasses('MuiFab', ['root', 'primary', 'secondary', 'extended', 'circular', 'focusVisible', 'disabled', 'colorInherit', 'sizeSmall', 'sizeMedium', 'sizeLarge', 'info', 'error', 'warning', 'success']);
|
|
6
6
|
export default fabClasses;
|
|
@@ -12,6 +12,7 @@ import capitalize from '../utils/capitalize';
|
|
|
12
12
|
import styled from '../styles/styled';
|
|
13
13
|
import useThemeProps from '../styles/useThemeProps';
|
|
14
14
|
import formControlLabelClasses, { getFormControlLabelUtilityClasses } from './formControlLabelClasses';
|
|
15
|
+
import formControlState from '../FormControl/formControlState';
|
|
15
16
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
16
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
18
|
|
|
@@ -19,10 +20,11 @@ const useUtilityClasses = ownerState => {
|
|
|
19
20
|
const {
|
|
20
21
|
classes,
|
|
21
22
|
disabled,
|
|
22
|
-
labelPlacement
|
|
23
|
+
labelPlacement,
|
|
24
|
+
error
|
|
23
25
|
} = ownerState;
|
|
24
26
|
const slots = {
|
|
25
|
-
root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}
|
|
27
|
+
root: ['root', disabled && 'disabled', `labelPlacement${capitalize(labelPlacement)}`, error && 'error'],
|
|
26
28
|
label: ['label', disabled && 'disabled']
|
|
27
29
|
};
|
|
28
30
|
return composeClasses(slots, getFormControlLabelUtilityClasses, classes);
|
|
@@ -114,11 +116,17 @@ const FormControlLabel = /*#__PURE__*/React.forwardRef(function FormControlLabel
|
|
|
114
116
|
controlProps[key] = props[key];
|
|
115
117
|
}
|
|
116
118
|
});
|
|
119
|
+
const fcs = formControlState({
|
|
120
|
+
props,
|
|
121
|
+
muiFormControl,
|
|
122
|
+
states: ['error']
|
|
123
|
+
});
|
|
117
124
|
|
|
118
125
|
const ownerState = _extends({}, props, {
|
|
119
126
|
disabled,
|
|
120
127
|
label,
|
|
121
|
-
labelPlacement
|
|
128
|
+
labelPlacement,
|
|
129
|
+
error: fcs.error
|
|
122
130
|
});
|
|
123
131
|
|
|
124
132
|
const classes = useUtilityClasses(ownerState);
|
|
@@ -2,5 +2,5 @@ import { generateUtilityClasses, generateUtilityClass } from '@mui/base';
|
|
|
2
2
|
export function getFormControlLabelUtilityClasses(slot) {
|
|
3
3
|
return generateUtilityClass('MuiFormControlLabel', slot);
|
|
4
4
|
}
|
|
5
|
-
const formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label']);
|
|
5
|
+
const formControlLabelClasses = generateUtilityClasses('MuiFormControlLabel', ['root', 'labelPlacementStart', 'labelPlacementTop', 'labelPlacementBottom', 'disabled', 'label', 'error']);
|
|
6
6
|
export default formControlLabelClasses;
|
|
@@ -8,15 +8,18 @@ import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
|
8
8
|
import styled from '../styles/styled';
|
|
9
9
|
import useThemeProps from '../styles/useThemeProps';
|
|
10
10
|
import { getFormGroupUtilityClass } from './formGroupClasses';
|
|
11
|
+
import useFormControl from '../FormControl/useFormControl';
|
|
12
|
+
import formControlState from '../FormControl/formControlState';
|
|
11
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
14
|
|
|
13
15
|
const useUtilityClasses = ownerState => {
|
|
14
16
|
const {
|
|
15
17
|
classes,
|
|
16
|
-
row
|
|
18
|
+
row,
|
|
19
|
+
error
|
|
17
20
|
} = ownerState;
|
|
18
21
|
const slots = {
|
|
19
|
-
root: ['root', row && 'row']
|
|
22
|
+
root: ['root', row && 'row', error && 'error']
|
|
20
23
|
};
|
|
21
24
|
return composeClasses(slots, getFormGroupUtilityClass, classes);
|
|
22
25
|
};
|
|
@@ -57,8 +60,16 @@ const FormGroup = /*#__PURE__*/React.forwardRef(function FormGroup(inProps, ref)
|
|
|
57
60
|
} = props,
|
|
58
61
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
59
62
|
|
|
63
|
+
const muiFormControl = useFormControl();
|
|
64
|
+
const fcs = formControlState({
|
|
65
|
+
props,
|
|
66
|
+
muiFormControl,
|
|
67
|
+
states: ['error']
|
|
68
|
+
});
|
|
69
|
+
|
|
60
70
|
const ownerState = _extends({}, props, {
|
|
61
|
-
row
|
|
71
|
+
row,
|
|
72
|
+
error: fcs.error
|
|
62
73
|
});
|
|
63
74
|
|
|
64
75
|
const classes = useUtilityClasses(ownerState);
|
|
@@ -2,5 +2,5 @@ import { generateUtilityClass, generateUtilityClasses } from '@mui/base';
|
|
|
2
2
|
export function getFormGroupUtilityClass(slot) {
|
|
3
3
|
return generateUtilityClass('MuiFormGroup', slot);
|
|
4
4
|
}
|
|
5
|
-
const formGroupClasses = generateUtilityClasses('MuiFormGroup', ['root', 'row']);
|
|
5
|
+
const formGroupClasses = generateUtilityClasses('MuiFormGroup', ['root', 'row', 'error']);
|
|
6
6
|
export default formGroupClasses;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
|
|
4
|
+
var _span;
|
|
5
|
+
|
|
3
6
|
const _excluded = ["children", "className", "component", "disabled", "error", "filled", "focused", "margin", "required", "variant"];
|
|
4
7
|
import * as React from 'react';
|
|
5
8
|
import PropTypes from 'prop-types';
|
|
@@ -101,16 +104,11 @@ const FormHelperText = /*#__PURE__*/React.forwardRef(function FormHelperText(inP
|
|
|
101
104
|
className: clsx(classes.root, className),
|
|
102
105
|
ref: ref
|
|
103
106
|
}, other, {
|
|
104
|
-
children: children === ' ' ?
|
|
105
|
-
/*#__PURE__*/
|
|
106
|
-
// notranslate needed while Google Translate will not fix zero-width space issue
|
|
107
|
-
// eslint-disable-next-line react/no-danger
|
|
108
|
-
_jsx("span", {
|
|
107
|
+
children: children === ' ' ? // notranslate needed while Google Translate will not fix zero-width space issue
|
|
108
|
+
_span || (_span = /*#__PURE__*/_jsx("span", {
|
|
109
109
|
className: "notranslate",
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
}) : children
|
|
110
|
+
children: "\u200B"
|
|
111
|
+
})) : children
|
|
114
112
|
}));
|
|
115
113
|
});
|
|
116
114
|
process.env.NODE_ENV !== "production" ? FormHelperText.propTypes
|
package/modern/Grid/Grid.js
CHANGED
|
@@ -260,10 +260,8 @@ const GridRoot = styled('div', {
|
|
|
260
260
|
|
|
261
261
|
}, ownerState.zeroMinWidth && {
|
|
262
262
|
minWidth: 0
|
|
263
|
-
}, ownerState.wrap
|
|
264
|
-
flexWrap:
|
|
265
|
-
}, ownerState.wrap === 'reverse' && {
|
|
266
|
-
flexWrap: 'wrap-reverse'
|
|
263
|
+
}, ownerState.wrap !== 'wrap' && {
|
|
264
|
+
flexWrap: ownerState.wrap
|
|
267
265
|
}), generateDirection, generateRowGap, generateColumnGap, generateGrid);
|
|
268
266
|
|
|
269
267
|
const useUtilityClasses = ownerState => {
|
|
@@ -169,6 +169,8 @@ process.env.NODE_ENV !== "production" ? ImageList.propTypes
|
|
|
169
169
|
* The variant to use.
|
|
170
170
|
* @default 'standard'
|
|
171
171
|
*/
|
|
172
|
-
variant: PropTypes
|
|
172
|
+
variant: PropTypes
|
|
173
|
+
/* @typescript-to-proptypes-ignore */
|
|
174
|
+
.oneOfType([PropTypes.oneOf(['masonry', 'quilted', 'standard', 'woven']), PropTypes.string])
|
|
173
175
|
} : void 0;
|
|
174
176
|
export default ImageList;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
|
|
4
|
+
var _span;
|
|
5
|
+
|
|
3
6
|
const _excluded = ["children", "className", "component", "disablePointerEvents", "disableTypography", "position", "variant"];
|
|
4
7
|
import * as React from 'react';
|
|
5
8
|
import PropTypes from 'prop-types';
|
|
@@ -121,17 +124,11 @@ const InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inP
|
|
|
121
124
|
children: children
|
|
122
125
|
}) : /*#__PURE__*/_jsxs(React.Fragment, {
|
|
123
126
|
children: [position === 'start' ?
|
|
124
|
-
/*#__PURE__*/
|
|
125
|
-
|
|
126
127
|
/* notranslate needed while Google Translate will not fix zero-width space issue */
|
|
127
|
-
|
|
128
|
-
/* eslint-disable-next-line react/no-danger */
|
|
129
|
-
_jsx("span", {
|
|
128
|
+
_span || (_span = /*#__PURE__*/_jsx("span", {
|
|
130
129
|
className: "notranslate",
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}
|
|
134
|
-
}) : null, children]
|
|
130
|
+
children: "\u200B"
|
|
131
|
+
})) : null, children]
|
|
135
132
|
})
|
|
136
133
|
}))
|
|
137
134
|
});
|
package/modern/Modal/Modal.js
CHANGED
|
@@ -226,7 +226,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
226
226
|
|
|
227
227
|
/**
|
|
228
228
|
* If `true`, the modal will not restore focus to previously focused element once
|
|
229
|
-
* modal is hidden.
|
|
229
|
+
* modal is hidden or unmounted.
|
|
230
230
|
* @default false
|
|
231
231
|
*/
|
|
232
232
|
disableRestoreFocus: PropTypes.bool,
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
2
2
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
3
|
+
|
|
4
|
+
var _span;
|
|
5
|
+
|
|
3
6
|
const _excluded = ["children", "classes", "className", "label", "notched"];
|
|
4
7
|
import * as React from 'react';
|
|
5
8
|
import PropTypes from 'prop-types';
|
|
@@ -21,14 +24,12 @@ const NotchedOutlineRoot = styled('fieldset')({
|
|
|
21
24
|
overflow: 'hidden',
|
|
22
25
|
minWidth: '0%'
|
|
23
26
|
});
|
|
24
|
-
const NotchedOutlineLegend = styled('legend'
|
|
25
|
-
skipSx: true
|
|
26
|
-
})(({
|
|
27
|
+
const NotchedOutlineLegend = styled('legend')(({
|
|
27
28
|
ownerState,
|
|
28
29
|
theme
|
|
29
30
|
}) => _extends({
|
|
30
31
|
float: 'unset'
|
|
31
|
-
}, ownerState.
|
|
32
|
+
}, !ownerState.withLabel && {
|
|
32
33
|
padding: 0,
|
|
33
34
|
lineHeight: '11px',
|
|
34
35
|
// sync with `height` in `legend` styles
|
|
@@ -36,7 +37,7 @@ const NotchedOutlineLegend = styled('legend', {
|
|
|
36
37
|
duration: 150,
|
|
37
38
|
easing: theme.transitions.easing.easeOut
|
|
38
39
|
})
|
|
39
|
-
}, ownerState.
|
|
40
|
+
}, ownerState.withLabel && _extends({
|
|
40
41
|
display: 'block',
|
|
41
42
|
// Fix conflict with normalize.css and sanitize.css
|
|
42
43
|
width: 'auto',
|
|
@@ -77,9 +78,11 @@ export default function NotchedOutline(props) {
|
|
|
77
78
|
} = props,
|
|
78
79
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
79
80
|
|
|
81
|
+
const withLabel = label != null && label !== '';
|
|
82
|
+
|
|
80
83
|
const ownerState = _extends({}, props, {
|
|
81
84
|
notched,
|
|
82
|
-
|
|
85
|
+
withLabel
|
|
83
86
|
});
|
|
84
87
|
|
|
85
88
|
return /*#__PURE__*/_jsx(NotchedOutlineRoot, _extends({
|
|
@@ -89,18 +92,13 @@ export default function NotchedOutline(props) {
|
|
|
89
92
|
}, other, {
|
|
90
93
|
children: /*#__PURE__*/_jsx(NotchedOutlineLegend, {
|
|
91
94
|
ownerState: ownerState,
|
|
92
|
-
children:
|
|
95
|
+
children: withLabel ? /*#__PURE__*/_jsx("span", {
|
|
93
96
|
children: label
|
|
94
|
-
}) :
|
|
95
|
-
/*#__PURE__*/
|
|
96
|
-
// notranslate needed while Google Translate will not fix zero-width space issue
|
|
97
|
-
// eslint-disable-next-line react/no-danger
|
|
98
|
-
_jsx("span", {
|
|
97
|
+
}) : // notranslate needed while Google Translate will not fix zero-width space issue
|
|
98
|
+
_span || (_span = /*#__PURE__*/_jsx("span", {
|
|
99
99
|
className: "notranslate",
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
})
|
|
100
|
+
children: "\u200B"
|
|
101
|
+
}))
|
|
104
102
|
})
|
|
105
103
|
}));
|
|
106
104
|
}
|
|
@@ -136,7 +136,7 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
|
|
|
136
136
|
}, components),
|
|
137
137
|
renderSuffix: state => /*#__PURE__*/_jsx(NotchedOutlineRoot, {
|
|
138
138
|
className: classes.notchedOutline,
|
|
139
|
-
label: label && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
|
|
139
|
+
label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/_jsxs(React.Fragment, {
|
|
140
140
|
children: [label, "\xA0", '*']
|
|
141
141
|
})) : label,
|
|
142
142
|
notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)
|
|
@@ -10,15 +10,11 @@ const RadioButtonIconRoot = styled('span')({
|
|
|
10
10
|
position: 'relative',
|
|
11
11
|
display: 'flex'
|
|
12
12
|
});
|
|
13
|
-
const RadioButtonIconBackground = styled(RadioButtonUncheckedIcon
|
|
14
|
-
skipSx: true
|
|
15
|
-
})({
|
|
13
|
+
const RadioButtonIconBackground = styled(RadioButtonUncheckedIcon)({
|
|
16
14
|
// Scale applied to prevent dot misalignment in Safari
|
|
17
15
|
transform: 'scale(1)'
|
|
18
16
|
});
|
|
19
|
-
const RadioButtonIconDot = styled(RadioButtonCheckedIcon
|
|
20
|
-
skipSx: true
|
|
21
|
-
})(({
|
|
17
|
+
const RadioButtonIconDot = styled(RadioButtonCheckedIcon)(({
|
|
22
18
|
theme,
|
|
23
19
|
ownerState
|
|
24
20
|
}) => _extends({
|
package/modern/Rating/Rating.js
CHANGED
|
@@ -405,7 +405,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
405
405
|
|
|
406
406
|
const handleChange = event => {
|
|
407
407
|
let newValue = event.target.value === '' ? null : parseFloat(event.target.value); // Give mouse priority over keyboard
|
|
408
|
-
// Fix https://github.com/mui
|
|
408
|
+
// Fix https://github.com/mui/material-ui/issues/22827
|
|
409
409
|
|
|
410
410
|
if (hover !== -1) {
|
|
411
411
|
newValue = hover;
|