@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
|
@@ -190,7 +190,9 @@ process.env.NODE_ENV !== "production" ? ImageList.propTypes
|
|
|
190
190
|
* The variant to use.
|
|
191
191
|
* @default 'standard'
|
|
192
192
|
*/
|
|
193
|
-
variant: _propTypes.default
|
|
193
|
+
variant: _propTypes.default
|
|
194
|
+
/* @typescript-to-proptypes-ignore */
|
|
195
|
+
.oneOfType([_propTypes.default.oneOf(['masonry', 'quilted', 'standard', 'woven']), _propTypes.default.string])
|
|
194
196
|
} : void 0;
|
|
195
197
|
var _default = ImageList;
|
|
196
198
|
exports.default = _default;
|
|
@@ -35,6 +35,8 @@ var _useThemeProps = _interopRequireDefault(require("../styles/useThemeProps"));
|
|
|
35
35
|
|
|
36
36
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
37
37
|
|
|
38
|
+
var _span;
|
|
39
|
+
|
|
38
40
|
const _excluded = ["children", "className", "component", "disablePointerEvents", "disableTypography", "position", "variant"];
|
|
39
41
|
|
|
40
42
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -144,17 +146,11 @@ const InputAdornment = /*#__PURE__*/React.forwardRef(function InputAdornment(inP
|
|
|
144
146
|
children: children
|
|
145
147
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
146
148
|
children: [position === 'start' ?
|
|
147
|
-
/*#__PURE__*/
|
|
148
|
-
|
|
149
149
|
/* notranslate needed while Google Translate will not fix zero-width space issue */
|
|
150
|
-
|
|
151
|
-
/* eslint-disable-next-line react/no-danger */
|
|
152
|
-
(0, _jsxRuntime.jsx)("span", {
|
|
150
|
+
_span || (_span = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
153
151
|
className: "notranslate",
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
}) : null, children]
|
|
152
|
+
children: "\u200B"
|
|
153
|
+
})) : null, children]
|
|
158
154
|
})
|
|
159
155
|
}))
|
|
160
156
|
});
|
package/node/Modal/Modal.js
CHANGED
|
@@ -250,7 +250,7 @@ process.env.NODE_ENV !== "production" ? Modal.propTypes
|
|
|
250
250
|
|
|
251
251
|
/**
|
|
252
252
|
* If `true`, the modal will not restore focus to previously focused element once
|
|
253
|
-
* modal is hidden.
|
|
253
|
+
* modal is hidden or unmounted.
|
|
254
254
|
* @default false
|
|
255
255
|
*/
|
|
256
256
|
disableRestoreFocus: _propTypes.default.bool,
|
|
@@ -19,6 +19,8 @@ var _styled = _interopRequireDefault(require("../styles/styled"));
|
|
|
19
19
|
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
21
|
|
|
22
|
+
var _span;
|
|
23
|
+
|
|
22
24
|
const _excluded = ["children", "classes", "className", "label", "notched"];
|
|
23
25
|
|
|
24
26
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -41,14 +43,12 @@ const NotchedOutlineRoot = (0, _styled.default)('fieldset')({
|
|
|
41
43
|
overflow: 'hidden',
|
|
42
44
|
minWidth: '0%'
|
|
43
45
|
});
|
|
44
|
-
const NotchedOutlineLegend = (0, _styled.default)('legend'
|
|
45
|
-
skipSx: true
|
|
46
|
-
})(({
|
|
46
|
+
const NotchedOutlineLegend = (0, _styled.default)('legend')(({
|
|
47
47
|
ownerState,
|
|
48
48
|
theme
|
|
49
49
|
}) => (0, _extends2.default)({
|
|
50
50
|
float: 'unset'
|
|
51
|
-
}, ownerState.
|
|
51
|
+
}, !ownerState.withLabel && {
|
|
52
52
|
padding: 0,
|
|
53
53
|
lineHeight: '11px',
|
|
54
54
|
// sync with `height` in `legend` styles
|
|
@@ -56,7 +56,7 @@ const NotchedOutlineLegend = (0, _styled.default)('legend', {
|
|
|
56
56
|
duration: 150,
|
|
57
57
|
easing: theme.transitions.easing.easeOut
|
|
58
58
|
})
|
|
59
|
-
}, ownerState.
|
|
59
|
+
}, ownerState.withLabel && (0, _extends2.default)({
|
|
60
60
|
display: 'block',
|
|
61
61
|
// Fix conflict with normalize.css and sanitize.css
|
|
62
62
|
width: 'auto',
|
|
@@ -96,9 +96,10 @@ function NotchedOutline(props) {
|
|
|
96
96
|
notched
|
|
97
97
|
} = props,
|
|
98
98
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
99
|
+
const withLabel = label != null && label !== '';
|
|
99
100
|
const ownerState = (0, _extends2.default)({}, props, {
|
|
100
101
|
notched,
|
|
101
|
-
|
|
102
|
+
withLabel
|
|
102
103
|
});
|
|
103
104
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(NotchedOutlineRoot, (0, _extends2.default)({
|
|
104
105
|
"aria-hidden": true,
|
|
@@ -107,18 +108,13 @@ function NotchedOutline(props) {
|
|
|
107
108
|
}, other, {
|
|
108
109
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(NotchedOutlineLegend, {
|
|
109
110
|
ownerState: ownerState,
|
|
110
|
-
children:
|
|
111
|
+
children: withLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
111
112
|
children: label
|
|
112
|
-
}) :
|
|
113
|
-
/*#__PURE__*/
|
|
114
|
-
// notranslate needed while Google Translate will not fix zero-width space issue
|
|
115
|
-
// eslint-disable-next-line react/no-danger
|
|
116
|
-
(0, _jsxRuntime.jsx)("span", {
|
|
113
|
+
}) : // notranslate needed while Google Translate will not fix zero-width space issue
|
|
114
|
+
_span || (_span = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
117
115
|
className: "notranslate",
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
}
|
|
121
|
-
})
|
|
116
|
+
children: "\u200B"
|
|
117
|
+
}))
|
|
122
118
|
})
|
|
123
119
|
}));
|
|
124
120
|
}
|
|
@@ -160,7 +160,7 @@ const OutlinedInput = /*#__PURE__*/React.forwardRef(function OutlinedInput(inPro
|
|
|
160
160
|
}, components),
|
|
161
161
|
renderSuffix: state => /*#__PURE__*/(0, _jsxRuntime.jsx)(NotchedOutlineRoot, {
|
|
162
162
|
className: classes.notchedOutline,
|
|
163
|
-
label: label && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
163
|
+
label: label != null && label !== '' && fcs.required ? _React$Fragment || (_React$Fragment = /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
|
|
164
164
|
children: [label, "\xA0", '*']
|
|
165
165
|
})) : label,
|
|
166
166
|
notched: typeof notched !== 'undefined' ? notched : Boolean(state.startAdornment || state.filled || state.focused)
|
|
@@ -29,15 +29,11 @@ const RadioButtonIconRoot = (0, _styled.default)('span')({
|
|
|
29
29
|
position: 'relative',
|
|
30
30
|
display: 'flex'
|
|
31
31
|
});
|
|
32
|
-
const RadioButtonIconBackground = (0, _styled.default)(_RadioButtonUnchecked.default
|
|
33
|
-
skipSx: true
|
|
34
|
-
})({
|
|
32
|
+
const RadioButtonIconBackground = (0, _styled.default)(_RadioButtonUnchecked.default)({
|
|
35
33
|
// Scale applied to prevent dot misalignment in Safari
|
|
36
34
|
transform: 'scale(1)'
|
|
37
35
|
});
|
|
38
|
-
const RadioButtonIconDot = (0, _styled.default)(_RadioButtonChecked.default
|
|
39
|
-
skipSx: true
|
|
40
|
-
})(({
|
|
36
|
+
const RadioButtonIconDot = (0, _styled.default)(_RadioButtonChecked.default)(({
|
|
41
37
|
theme,
|
|
42
38
|
ownerState
|
|
43
39
|
}) => (0, _extends2.default)({
|
package/node/Rating/Rating.js
CHANGED
|
@@ -426,7 +426,7 @@ const Rating = /*#__PURE__*/React.forwardRef(function Rating(inProps, ref) {
|
|
|
426
426
|
|
|
427
427
|
const handleChange = event => {
|
|
428
428
|
let newValue = event.target.value === '' ? null : parseFloat(event.target.value); // Give mouse priority over keyboard
|
|
429
|
-
// Fix https://github.com/mui
|
|
429
|
+
// Fix https://github.com/mui/material-ui/issues/22827
|
|
430
430
|
|
|
431
431
|
if (hover !== -1) {
|
|
432
432
|
newValue = hover;
|
package/node/Select/Select.js
CHANGED
|
@@ -43,7 +43,7 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
43
43
|
|
|
44
44
|
var _Input, _FilledInput;
|
|
45
45
|
|
|
46
|
-
const _excluded = ["autoWidth", "children", "classes", "className", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"];
|
|
46
|
+
const _excluded = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"];
|
|
47
47
|
|
|
48
48
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
49
49
|
|
|
@@ -66,6 +66,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
66
66
|
children,
|
|
67
67
|
classes: classesProp = {},
|
|
68
68
|
className,
|
|
69
|
+
defaultOpen = false,
|
|
69
70
|
displayEmpty = false,
|
|
70
71
|
IconComponent = _ArrowDropDown.default,
|
|
71
72
|
id,
|
|
@@ -119,6 +120,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
119
120
|
id
|
|
120
121
|
} : {
|
|
121
122
|
autoWidth,
|
|
123
|
+
defaultOpen,
|
|
122
124
|
displayEmpty,
|
|
123
125
|
labelId,
|
|
124
126
|
MenuProps,
|
|
@@ -173,6 +175,13 @@ process.env.NODE_ENV !== "production" ? Select.propTypes
|
|
|
173
175
|
*/
|
|
174
176
|
className: _propTypes.default.string,
|
|
175
177
|
|
|
178
|
+
/**
|
|
179
|
+
* If `true`, the component is initially open. Use when the component open state is not controlled (i.e. the `open` prop is not defined).
|
|
180
|
+
* You can only use it when the `native` prop is `false` (default).
|
|
181
|
+
* @default false
|
|
182
|
+
*/
|
|
183
|
+
defaultOpen: _propTypes.default.bool,
|
|
184
|
+
|
|
176
185
|
/**
|
|
177
186
|
* The default value. Use when the component is not controlled.
|
|
178
187
|
*/
|
|
@@ -43,7 +43,9 @@ var _selectClasses = _interopRequireWildcard(require("./selectClasses"));
|
|
|
43
43
|
|
|
44
44
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
45
45
|
|
|
46
|
-
|
|
46
|
+
var _span;
|
|
47
|
+
|
|
48
|
+
const _excluded = ["aria-describedby", "aria-label", "autoFocus", "autoWidth", "children", "className", "defaultOpen", "defaultValue", "disabled", "displayEmpty", "IconComponent", "inputRef", "labelId", "MenuProps", "multiple", "name", "onBlur", "onChange", "onClose", "onFocus", "onOpen", "open", "readOnly", "renderValue", "SelectDisplayProps", "tabIndex", "type", "value", "variant"];
|
|
47
49
|
|
|
48
50
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
49
51
|
|
|
@@ -143,6 +145,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
143
145
|
autoWidth,
|
|
144
146
|
children,
|
|
145
147
|
className,
|
|
148
|
+
defaultOpen,
|
|
146
149
|
defaultValue,
|
|
147
150
|
disabled,
|
|
148
151
|
displayEmpty,
|
|
@@ -171,6 +174,11 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
171
174
|
default: defaultValue,
|
|
172
175
|
name: 'Select'
|
|
173
176
|
});
|
|
177
|
+
const [openState, setOpenState] = (0, _useControlled.default)({
|
|
178
|
+
controlled: openProp,
|
|
179
|
+
default: defaultOpen,
|
|
180
|
+
name: 'Select'
|
|
181
|
+
});
|
|
174
182
|
const inputRef = React.useRef(null);
|
|
175
183
|
const displayRef = React.useRef(null);
|
|
176
184
|
const [displayNode, setDisplayNode] = React.useState(null);
|
|
@@ -178,7 +186,6 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
178
186
|
current: isOpenControlled
|
|
179
187
|
} = React.useRef(openProp != null);
|
|
180
188
|
const [menuMinWidthState, setMenuMinWidthState] = React.useState();
|
|
181
|
-
const [openState, setOpenState] = React.useState(false);
|
|
182
189
|
const handleRef = (0, _useForkRef.default)(ref, inputRefProp);
|
|
183
190
|
const handleDisplayRef = React.useCallback(node => {
|
|
184
191
|
displayRef.current = node;
|
|
@@ -193,13 +200,27 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
193
200
|
},
|
|
194
201
|
node: inputRef.current,
|
|
195
202
|
value
|
|
196
|
-
}), [value]);
|
|
203
|
+
}), [value]); // Resize menu on `defaultOpen` automatic toggle.
|
|
204
|
+
|
|
205
|
+
React.useEffect(() => {
|
|
206
|
+
if (defaultOpen && openState && displayNode && !isOpenControlled) {
|
|
207
|
+
setMenuMinWidthState(autoWidth ? null : displayNode.clientWidth);
|
|
208
|
+
displayRef.current.focus();
|
|
209
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
210
|
+
|
|
211
|
+
}, [displayNode, autoWidth]); // `isOpenControlled` is ignored because the component should never switch between controlled and uncontrolled modes.
|
|
212
|
+
// `defaultOpen` and `openState` are ignored to avoid unnecessary callbacks.
|
|
213
|
+
|
|
197
214
|
React.useEffect(() => {
|
|
198
215
|
if (autoFocus) {
|
|
199
216
|
displayRef.current.focus();
|
|
200
217
|
}
|
|
201
218
|
}, [autoFocus]);
|
|
202
219
|
React.useEffect(() => {
|
|
220
|
+
if (!labelId) {
|
|
221
|
+
return undefined;
|
|
222
|
+
}
|
|
223
|
+
|
|
203
224
|
const label = (0, _ownerDocument.default)(displayRef.current).getElementById(labelId);
|
|
204
225
|
|
|
205
226
|
if (label) {
|
|
@@ -296,7 +317,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
296
317
|
if (onChange) {
|
|
297
318
|
// Redefine target to allow name and value to be read.
|
|
298
319
|
// This allows seamless integration with the most popular form libraries.
|
|
299
|
-
// https://github.com/mui
|
|
320
|
+
// https://github.com/mui/material-ui/issues/13485#issuecomment-676048492
|
|
300
321
|
// Clone the event to not override `target` of the original event.
|
|
301
322
|
const nativeEvent = event.nativeEvent || event;
|
|
302
323
|
const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
@@ -329,7 +350,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
329
350
|
}
|
|
330
351
|
};
|
|
331
352
|
|
|
332
|
-
const open = displayNode !== null &&
|
|
353
|
+
const open = displayNode !== null && openState;
|
|
333
354
|
|
|
334
355
|
const handleBlur = event => {
|
|
335
356
|
// if open event.stopImmediatePropagation
|
|
@@ -494,16 +515,11 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
494
515
|
className: (0, _clsx.default)(classes.select, className, SelectDisplayProps.className) // The id is required for proper a11y
|
|
495
516
|
,
|
|
496
517
|
id: buttonId,
|
|
497
|
-
children: isEmpty(display) ?
|
|
498
|
-
/*#__PURE__*/
|
|
499
|
-
// notranslate needed while Google Translate will not fix zero-width space issue
|
|
500
|
-
// eslint-disable-next-line react/no-danger
|
|
501
|
-
(0, _jsxRuntime.jsx)("span", {
|
|
518
|
+
children: isEmpty(display) ? // notranslate needed while Google Translate will not fix zero-width space issue
|
|
519
|
+
_span || (_span = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
502
520
|
className: "notranslate",
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
}
|
|
506
|
-
}) : display
|
|
521
|
+
children: "\u200B"
|
|
522
|
+
})) : display
|
|
507
523
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectNativeInput, (0, _extends2.default)({
|
|
508
524
|
value: Array.isArray(value) ? value.join(',') : value,
|
|
509
525
|
name: name,
|
|
@@ -586,6 +602,12 @@ process.env.NODE_ENV !== "production" ? SelectInput.propTypes = {
|
|
|
586
602
|
*/
|
|
587
603
|
className: _propTypes.default.string,
|
|
588
604
|
|
|
605
|
+
/**
|
|
606
|
+
* If `true`, the component is toggled on mount. Use when the component open state is not controlled.
|
|
607
|
+
* You can only use it when the `native` prop is `false` (default).
|
|
608
|
+
*/
|
|
609
|
+
defaultOpen: _propTypes.default.bool,
|
|
610
|
+
|
|
589
611
|
/**
|
|
590
612
|
* The default value. Use when the component is not controlled.
|
|
591
613
|
*/
|
package/node/Slider/Slider.js
CHANGED
|
@@ -31,11 +31,13 @@ var _styled = _interopRequireWildcard(require("../styles/styled"));
|
|
|
31
31
|
|
|
32
32
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
33
33
|
|
|
34
|
+
var _shouldSpreadAdditionalProps = _interopRequireDefault(require("../utils/shouldSpreadAdditionalProps"));
|
|
35
|
+
|
|
34
36
|
var _capitalize = _interopRequireDefault(require("../utils/capitalize"));
|
|
35
37
|
|
|
36
38
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
37
39
|
|
|
38
|
-
const _excluded = ["components", "componentsProps", "color", "size"];
|
|
40
|
+
const _excluded = ["component", "components", "componentsProps", "color", "size"];
|
|
39
41
|
|
|
40
42
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
41
43
|
|
|
@@ -110,6 +112,19 @@ const SliderRoot = (0, _styled.default)('span', {
|
|
|
110
112
|
}
|
|
111
113
|
}));
|
|
112
114
|
exports.SliderRoot = SliderRoot;
|
|
115
|
+
process.env.NODE_ENV !== "production" ? SliderRoot.propTypes
|
|
116
|
+
/* remove-proptypes */
|
|
117
|
+
= {
|
|
118
|
+
// ----------------------------- Warning --------------------------------
|
|
119
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
120
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
121
|
+
// ----------------------------------------------------------------------
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @ignore
|
|
125
|
+
*/
|
|
126
|
+
children: _propTypes.default.node
|
|
127
|
+
} : void 0;
|
|
113
128
|
const SliderRail = (0, _styled.default)('span', {
|
|
114
129
|
name: 'MuiSlider',
|
|
115
130
|
slot: 'Rail',
|
|
@@ -136,6 +151,19 @@ const SliderRail = (0, _styled.default)('span', {
|
|
|
136
151
|
opacity: 1
|
|
137
152
|
}));
|
|
138
153
|
exports.SliderRail = SliderRail;
|
|
154
|
+
process.env.NODE_ENV !== "production" ? SliderRail.propTypes
|
|
155
|
+
/* remove-proptypes */
|
|
156
|
+
= {
|
|
157
|
+
// ----------------------------- Warning --------------------------------
|
|
158
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
159
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
160
|
+
// ----------------------------------------------------------------------
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* @ignore
|
|
164
|
+
*/
|
|
165
|
+
children: _propTypes.default.node
|
|
166
|
+
} : void 0;
|
|
139
167
|
const SliderTrack = (0, _styled.default)('span', {
|
|
140
168
|
name: 'MuiSlider',
|
|
141
169
|
slot: 'Track',
|
|
@@ -173,6 +201,19 @@ const SliderTrack = (0, _styled.default)('span', {
|
|
|
173
201
|
});
|
|
174
202
|
});
|
|
175
203
|
exports.SliderTrack = SliderTrack;
|
|
204
|
+
process.env.NODE_ENV !== "production" ? SliderTrack.propTypes
|
|
205
|
+
/* remove-proptypes */
|
|
206
|
+
= {
|
|
207
|
+
// ----------------------------- Warning --------------------------------
|
|
208
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
209
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
210
|
+
// ----------------------------------------------------------------------
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* @ignore
|
|
214
|
+
*/
|
|
215
|
+
children: _propTypes.default.node
|
|
216
|
+
} : void 0;
|
|
176
217
|
const SliderThumb = (0, _styled.default)('span', {
|
|
177
218
|
name: 'MuiSlider',
|
|
178
219
|
slot: 'Thumb',
|
|
@@ -246,6 +287,19 @@ const SliderThumb = (0, _styled.default)('span', {
|
|
|
246
287
|
}
|
|
247
288
|
}));
|
|
248
289
|
exports.SliderThumb = SliderThumb;
|
|
290
|
+
process.env.NODE_ENV !== "production" ? SliderThumb.propTypes
|
|
291
|
+
/* remove-proptypes */
|
|
292
|
+
= {
|
|
293
|
+
// ----------------------------- Warning --------------------------------
|
|
294
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
295
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
296
|
+
// ----------------------------------------------------------------------
|
|
297
|
+
|
|
298
|
+
/**
|
|
299
|
+
* @ignore
|
|
300
|
+
*/
|
|
301
|
+
children: _propTypes.default.node
|
|
302
|
+
} : void 0;
|
|
249
303
|
const SliderValueLabel = (0, _styled.default)(_SliderUnstyled.SliderValueLabelUnstyled, {
|
|
250
304
|
name: 'MuiSlider',
|
|
251
305
|
slot: 'ValueLabel',
|
|
@@ -291,6 +345,19 @@ const SliderValueLabel = (0, _styled.default)(_SliderUnstyled.SliderValueLabelUn
|
|
|
291
345
|
}
|
|
292
346
|
}));
|
|
293
347
|
exports.SliderValueLabel = SliderValueLabel;
|
|
348
|
+
process.env.NODE_ENV !== "production" ? SliderValueLabel.propTypes
|
|
349
|
+
/* remove-proptypes */
|
|
350
|
+
= {
|
|
351
|
+
// ----------------------------- Warning --------------------------------
|
|
352
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
353
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
354
|
+
// ----------------------------------------------------------------------
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* @ignore
|
|
358
|
+
*/
|
|
359
|
+
children: _propTypes.default.node
|
|
360
|
+
} : void 0;
|
|
294
361
|
const SliderMark = (0, _styled.default)('span', {
|
|
295
362
|
name: 'MuiSlider',
|
|
296
363
|
slot: 'Mark',
|
|
@@ -317,6 +384,19 @@ const SliderMark = (0, _styled.default)('span', {
|
|
|
317
384
|
opacity: 0.8
|
|
318
385
|
}));
|
|
319
386
|
exports.SliderMark = SliderMark;
|
|
387
|
+
process.env.NODE_ENV !== "production" ? SliderMark.propTypes
|
|
388
|
+
/* remove-proptypes */
|
|
389
|
+
= {
|
|
390
|
+
// ----------------------------- Warning --------------------------------
|
|
391
|
+
// | These PropTypes are generated from the TypeScript type definitions |
|
|
392
|
+
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
393
|
+
// ----------------------------------------------------------------------
|
|
394
|
+
|
|
395
|
+
/**
|
|
396
|
+
* @ignore
|
|
397
|
+
*/
|
|
398
|
+
children: _propTypes.default.node
|
|
399
|
+
} : void 0;
|
|
320
400
|
const SliderMarkLabel = (0, _styled.default)('span', {
|
|
321
401
|
name: 'MuiSlider',
|
|
322
402
|
slot: 'MarkLabel',
|
|
@@ -346,7 +426,9 @@ const SliderMarkLabel = (0, _styled.default)('span', {
|
|
|
346
426
|
color: theme.palette.text.primary
|
|
347
427
|
}));
|
|
348
428
|
exports.SliderMarkLabel = SliderMarkLabel;
|
|
349
|
-
|
|
429
|
+
process.env.NODE_ENV !== "production" ? SliderMarkLabel.propTypes
|
|
430
|
+
/* remove-proptypes */
|
|
431
|
+
= {
|
|
350
432
|
// ----------------------------- Warning --------------------------------
|
|
351
433
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
352
434
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -355,40 +437,8 @@ SliderRoot.propTypes = {
|
|
|
355
437
|
/**
|
|
356
438
|
* @ignore
|
|
357
439
|
*/
|
|
358
|
-
children: _propTypes.default.node
|
|
359
|
-
|
|
360
|
-
/**
|
|
361
|
-
* @ignore
|
|
362
|
-
*/
|
|
363
|
-
ownerState: _propTypes.default.shape({
|
|
364
|
-
'aria-label': _propTypes.default.string,
|
|
365
|
-
'aria-labelledby': _propTypes.default.string,
|
|
366
|
-
'aria-valuetext': _propTypes.default.string,
|
|
367
|
-
classes: _propTypes.default.object,
|
|
368
|
-
color: _propTypes.default.oneOf(['primary', 'secondary']),
|
|
369
|
-
defaultValue: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.number]),
|
|
370
|
-
disabled: _propTypes.default.bool,
|
|
371
|
-
getAriaLabel: _propTypes.default.func,
|
|
372
|
-
getAriaValueText: _propTypes.default.func,
|
|
373
|
-
isRtl: _propTypes.default.bool,
|
|
374
|
-
marks: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.shape({
|
|
375
|
-
label: _propTypes.default.node,
|
|
376
|
-
value: _propTypes.default.number.isRequired
|
|
377
|
-
})), _propTypes.default.bool]),
|
|
378
|
-
max: _propTypes.default.number,
|
|
379
|
-
min: _propTypes.default.number,
|
|
380
|
-
name: _propTypes.default.string,
|
|
381
|
-
onChange: _propTypes.default.func,
|
|
382
|
-
onChangeCommitted: _propTypes.default.func,
|
|
383
|
-
orientation: _propTypes.default.oneOf(['horizontal', 'vertical']),
|
|
384
|
-
scale: _propTypes.default.func,
|
|
385
|
-
step: _propTypes.default.number,
|
|
386
|
-
track: _propTypes.default.oneOf(['inverted', 'normal', false]),
|
|
387
|
-
value: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.number), _propTypes.default.number]),
|
|
388
|
-
valueLabelDisplay: _propTypes.default.oneOf(['auto', 'off', 'on']),
|
|
389
|
-
valueLabelFormat: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.string])
|
|
390
|
-
})
|
|
391
|
-
};
|
|
440
|
+
children: _propTypes.default.node
|
|
441
|
+
} : void 0;
|
|
392
442
|
|
|
393
443
|
const extendUtilityClasses = ownerState => {
|
|
394
444
|
const {
|
|
@@ -402,20 +452,18 @@ const extendUtilityClasses = ownerState => {
|
|
|
402
452
|
});
|
|
403
453
|
};
|
|
404
454
|
|
|
405
|
-
const
|
|
406
|
-
return !Component || !(0, _base.isHostComponent)(Component);
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
const Slider = /*#__PURE__*/React.forwardRef(function Slider(sliderProps, ref) {
|
|
455
|
+
const Slider = /*#__PURE__*/React.forwardRef(function Slider(inputProps, ref) {
|
|
410
456
|
var _componentsProps$root, _componentsProps$thum, _componentsProps$trac, _componentsProps$valu;
|
|
411
457
|
|
|
412
458
|
const props = (0, _useThemeProps.default)({
|
|
413
|
-
props:
|
|
459
|
+
props: inputProps,
|
|
414
460
|
name: 'MuiSlider'
|
|
415
461
|
});
|
|
416
462
|
const theme = (0, _useTheme.default)();
|
|
417
463
|
const isRtl = theme.direction === 'rtl';
|
|
418
464
|
const {
|
|
465
|
+
// eslint-disable-next-line react/prop-types
|
|
466
|
+
component = 'span',
|
|
419
467
|
components = {},
|
|
420
468
|
componentsProps = {},
|
|
421
469
|
color = 'primary',
|
|
@@ -439,25 +487,26 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider(sliderProps, ref) {
|
|
|
439
487
|
MarkLabel: SliderMarkLabel
|
|
440
488
|
}, components),
|
|
441
489
|
componentsProps: (0, _extends2.default)({}, componentsProps, {
|
|
442
|
-
root: (0, _extends2.default)({}, componentsProps.root,
|
|
490
|
+
root: (0, _extends2.default)({}, componentsProps.root, (0, _shouldSpreadAdditionalProps.default)(components.Root) && {
|
|
491
|
+
as: component,
|
|
443
492
|
ownerState: (0, _extends2.default)({}, (_componentsProps$root = componentsProps.root) == null ? void 0 : _componentsProps$root.ownerState, {
|
|
444
493
|
color,
|
|
445
494
|
size
|
|
446
495
|
})
|
|
447
496
|
}),
|
|
448
|
-
thumb: (0, _extends2.default)({}, componentsProps.thumb,
|
|
497
|
+
thumb: (0, _extends2.default)({}, componentsProps.thumb, (0, _shouldSpreadAdditionalProps.default)(components.Thumb) && {
|
|
449
498
|
ownerState: (0, _extends2.default)({}, (_componentsProps$thum = componentsProps.thumb) == null ? void 0 : _componentsProps$thum.ownerState, {
|
|
450
499
|
color,
|
|
451
500
|
size
|
|
452
501
|
})
|
|
453
502
|
}),
|
|
454
|
-
track: (0, _extends2.default)({}, componentsProps.track,
|
|
503
|
+
track: (0, _extends2.default)({}, componentsProps.track, (0, _shouldSpreadAdditionalProps.default)(components.Track) && {
|
|
455
504
|
ownerState: (0, _extends2.default)({}, (_componentsProps$trac = componentsProps.track) == null ? void 0 : _componentsProps$trac.ownerState, {
|
|
456
505
|
color,
|
|
457
506
|
size
|
|
458
507
|
})
|
|
459
508
|
}),
|
|
460
|
-
valueLabel: (0, _extends2.default)({}, componentsProps.valueLabel,
|
|
509
|
+
valueLabel: (0, _extends2.default)({}, componentsProps.valueLabel, (0, _shouldSpreadAdditionalProps.default)(components.ValueLabel) && {
|
|
461
510
|
ownerState: (0, _extends2.default)({}, (_componentsProps$valu = componentsProps.valueLabel) == null ? void 0 : _componentsProps$valu.ownerState, {
|
|
462
511
|
color,
|
|
463
512
|
size
|
|
@@ -669,7 +718,9 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
|
|
|
669
718
|
* The size of the slider.
|
|
670
719
|
* @default 'medium'
|
|
671
720
|
*/
|
|
672
|
-
size: _propTypes.default
|
|
721
|
+
size: _propTypes.default
|
|
722
|
+
/* @typescript-to-proptypes-ignore */
|
|
723
|
+
.oneOfType([_propTypes.default.oneOf(['small', 'medium']), _propTypes.default.string]),
|
|
673
724
|
|
|
674
725
|
/**
|
|
675
726
|
* The granularity with which the slider can step through values. (A "discrete" slider.)
|
|
@@ -315,7 +315,10 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
315
315
|
onMouseEnter: handleMouseEnter,
|
|
316
316
|
onMouseLeave: handleMouseLeave,
|
|
317
317
|
ownerState: ownerState,
|
|
318
|
-
ref: ref
|
|
318
|
+
ref: ref // ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
|
|
319
|
+
// See https://github.com/mui-org/material-ui/issues/29080
|
|
320
|
+
,
|
|
321
|
+
role: "presentation"
|
|
319
322
|
}, other, {
|
|
320
323
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(TransitionComponent, (0, _extends2.default)({
|
|
321
324
|
appear: true,
|
package/node/SvgIcon/SvgIcon.js
CHANGED
|
@@ -60,7 +60,7 @@ const SvgIconRoot = (0, _styled.default)('svg', {
|
|
|
60
60
|
theme,
|
|
61
61
|
ownerState
|
|
62
62
|
}) => {
|
|
63
|
-
var _theme$palette$ownerS, _theme$palette$ownerS2;
|
|
63
|
+
var _theme$transitions, _theme$transitions$cr, _theme$transitions2, _theme$transitions2$d, _theme$typography, _theme$typography$pxT, _theme$typography2, _theme$typography2$px, _theme$typography3, _theme$typography3$px, _theme$palette$ownerS, _theme$palette, _theme$palette$ownerS2, _theme$palette2, _theme$palette2$actio, _theme$palette3, _theme$palette3$actio;
|
|
64
64
|
|
|
65
65
|
return {
|
|
66
66
|
userSelect: 'none',
|
|
@@ -69,19 +69,19 @@ const SvgIconRoot = (0, _styled.default)('svg', {
|
|
|
69
69
|
display: 'inline-block',
|
|
70
70
|
fill: 'currentColor',
|
|
71
71
|
flexShrink: 0,
|
|
72
|
-
transition: theme.transitions.create('fill', {
|
|
73
|
-
duration: theme.transitions.duration.shorter
|
|
72
|
+
transition: (_theme$transitions = theme.transitions) == null ? void 0 : (_theme$transitions$cr = _theme$transitions.create) == null ? void 0 : _theme$transitions$cr.call(_theme$transitions, 'fill', {
|
|
73
|
+
duration: (_theme$transitions2 = theme.transitions) == null ? void 0 : (_theme$transitions2$d = _theme$transitions2.duration) == null ? void 0 : _theme$transitions2$d.shorter
|
|
74
74
|
}),
|
|
75
75
|
fontSize: {
|
|
76
76
|
inherit: 'inherit',
|
|
77
|
-
small: theme.typography.pxToRem(20),
|
|
78
|
-
medium: theme.typography.pxToRem(24),
|
|
79
|
-
large: theme.typography.pxToRem(35)
|
|
77
|
+
small: ((_theme$typography = theme.typography) == null ? void 0 : (_theme$typography$pxT = _theme$typography.pxToRem) == null ? void 0 : _theme$typography$pxT.call(_theme$typography, 20)) || '1.25rem',
|
|
78
|
+
medium: ((_theme$typography2 = theme.typography) == null ? void 0 : (_theme$typography2$px = _theme$typography2.pxToRem) == null ? void 0 : _theme$typography2$px.call(_theme$typography2, 24)) || '1.5rem',
|
|
79
|
+
large: ((_theme$typography3 = theme.typography) == null ? void 0 : (_theme$typography3$px = _theme$typography3.pxToRem) == null ? void 0 : _theme$typography3$px.call(_theme$typography3, 35)) || '2.1875'
|
|
80
80
|
}[ownerState.fontSize],
|
|
81
81
|
// TODO v5 deprecate, v6 remove for sx
|
|
82
|
-
color: (_theme$palette$ownerS = (_theme$palette
|
|
83
|
-
action: theme.palette.action.active,
|
|
84
|
-
disabled: theme.palette.action.disabled,
|
|
82
|
+
color: (_theme$palette$ownerS = (_theme$palette = theme.palette) == null ? void 0 : (_theme$palette$ownerS2 = _theme$palette[ownerState.color]) == null ? void 0 : _theme$palette$ownerS2.main) != null ? _theme$palette$ownerS : {
|
|
83
|
+
action: (_theme$palette2 = theme.palette) == null ? void 0 : (_theme$palette2$actio = _theme$palette2.action) == null ? void 0 : _theme$palette2$actio.active,
|
|
84
|
+
disabled: (_theme$palette3 = theme.palette) == null ? void 0 : (_theme$palette3$actio = _theme$palette3.action) == null ? void 0 : _theme$palette3$actio.disabled,
|
|
85
85
|
inherit: undefined
|
|
86
86
|
}[ownerState.color]
|
|
87
87
|
};
|
|
@@ -31,9 +31,7 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
31
31
|
|
|
32
32
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
33
33
|
|
|
34
|
-
const SwipeAreaRoot = (0, _styled.default)('div'
|
|
35
|
-
skipSx: true
|
|
36
|
-
})(({
|
|
34
|
+
const SwipeAreaRoot = (0, _styled.default)('div')(({
|
|
37
35
|
theme,
|
|
38
36
|
ownerState
|
|
39
37
|
}) => (0, _extends2.default)({
|
|
@@ -217,7 +217,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
217
217
|
variant: variant,
|
|
218
218
|
ownerState: ownerState
|
|
219
219
|
}, other, {
|
|
220
|
-
children: [label && /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputLabel.default, (0, _extends2.default)({
|
|
220
|
+
children: [label != null && label !== '' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputLabel.default, (0, _extends2.default)({
|
|
221
221
|
htmlFor: id,
|
|
222
222
|
id: inputLabelId
|
|
223
223
|
}, InputLabelProps, {
|