@mui/material 5.3.1 → 5.4.3
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 +5 -0
- package/Autocomplete/Autocomplete.js +11 -3
- package/AvatarGroup/AvatarGroup.d.ts +10 -0
- package/AvatarGroup/AvatarGroup.js +19 -7
- package/Badge/Badge.js +3 -2
- package/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/ButtonBase/ButtonBase.d.ts +5 -1
- package/ButtonBase/ButtonBase.js +15 -2
- package/ButtonBase/TouchRipple.js +1 -2
- package/CHANGELOG.md +295 -27
- package/Dialog/Dialog.d.ts +4 -1
- package/Dialog/Dialog.js +10 -6
- package/Drawer/Drawer.d.ts +4 -1
- package/Drawer/Drawer.js +11 -9
- package/Fab/Fab.d.ts +4 -1
- package/Fab/Fab.js +8 -20
- package/Fab/fabClasses.js +1 -1
- package/Fade/Fade.d.ts +2 -2
- package/Fade/Fade.js +8 -8
- 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 +6 -6
- package/Radio/RadioButtonIcon.js +2 -6
- package/Rating/Rating.js +1 -1
- package/Select/Select.js +19 -7
- package/Select/SelectInput.js +12 -10
- package/Slide/Slide.d.ts +4 -4
- package/Slide/Slide.js +14 -14
- package/Slider/Slider.js +3 -1
- package/Snackbar/Snackbar.d.ts +2 -2
- package/Snackbar/Snackbar.js +12 -9
- package/SpeedDial/SpeedDial.d.ts +2 -2
- package/SpeedDial/SpeedDial.js +9 -7
- package/Step/StepContext.d.ts +20 -0
- package/Step/StepContext.js +10 -2
- package/Step/index.d.ts +3 -0
- package/Step/index.js +3 -1
- package/SwipeableDrawer/SwipeArea.js +1 -3
- package/SwipeableDrawer/SwipeableDrawer.js +8 -6
- package/TextField/TextField.js +1 -1
- package/ToggleButton/ToggleButton.d.ts +15 -0
- package/ToggleButton/ToggleButton.js +8 -2
- package/Zoom/Zoom.d.ts +2 -2
- package/Zoom/Zoom.js +8 -8
- package/index.d.ts +11 -3
- package/index.js +8 -3
- package/internal/SwitchBase.js +2 -6
- package/legacy/Autocomplete/Autocomplete.js +12 -3
- package/legacy/AvatarGroup/AvatarGroup.js +20 -7
- package/legacy/Badge/Badge.js +4 -2
- package/legacy/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/legacy/ButtonBase/ButtonBase.js +15 -2
- package/legacy/ButtonBase/TouchRipple.js +1 -2
- package/legacy/Dialog/Dialog.js +10 -6
- package/legacy/Drawer/Drawer.js +11 -9
- package/legacy/Fab/Fab.js +8 -20
- package/legacy/Fab/fabClasses.js +1 -1
- package/legacy/Fade/Fade.js +8 -8
- 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 +23 -7
- package/legacy/Select/SelectInput.js +12 -10
- package/legacy/Slide/Slide.js +14 -14
- package/legacy/Slider/Slider.js +3 -1
- package/legacy/Snackbar/Snackbar.js +12 -9
- package/legacy/SpeedDial/SpeedDial.js +9 -7
- package/legacy/Step/StepContext.js +10 -2
- package/legacy/Step/index.js +3 -1
- package/legacy/SwipeableDrawer/SwipeArea.js +1 -3
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +8 -6
- package/legacy/TextField/TextField.js +1 -1
- package/legacy/ToggleButton/ToggleButton.js +8 -2
- package/legacy/Zoom/Zoom.js +8 -8
- package/legacy/index.js +8 -3
- package/legacy/internal/SwitchBase.js +2 -6
- package/legacy/locale/index.js +86 -78
- 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/locale/index.js +12 -6
- package/modern/Autocomplete/Autocomplete.js +11 -3
- package/modern/AvatarGroup/AvatarGroup.js +17 -7
- package/modern/Badge/Badge.js +3 -2
- package/modern/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/modern/ButtonBase/ButtonBase.js +15 -2
- package/modern/ButtonBase/TouchRipple.js +1 -2
- package/modern/Dialog/Dialog.js +10 -6
- package/modern/Drawer/Drawer.js +11 -9
- package/modern/Fab/Fab.js +8 -20
- package/modern/Fab/fabClasses.js +1 -1
- package/modern/Fade/Fade.js +8 -8
- 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 +19 -7
- package/modern/Select/SelectInput.js +12 -10
- package/modern/Slide/Slide.js +14 -14
- package/modern/Slider/Slider.js +3 -1
- package/modern/Snackbar/Snackbar.js +12 -9
- package/modern/SpeedDial/SpeedDial.js +9 -7
- package/modern/Step/StepContext.js +10 -2
- package/modern/Step/index.js +3 -1
- package/modern/SwipeableDrawer/SwipeArea.js +1 -3
- package/modern/SwipeableDrawer/SwipeableDrawer.js +8 -6
- package/modern/TextField/TextField.js +1 -1
- package/modern/ToggleButton/ToggleButton.js +8 -2
- package/modern/Zoom/Zoom.js +8 -8
- package/modern/index.js +8 -3
- package/modern/internal/SwitchBase.js +2 -6
- package/modern/locale/index.js +12 -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/node/Autocomplete/Autocomplete.js +11 -3
- package/node/AvatarGroup/AvatarGroup.js +19 -7
- package/node/Badge/Badge.js +3 -2
- package/node/Breadcrumbs/BreadcrumbCollapsed.js +1 -3
- package/node/ButtonBase/ButtonBase.js +15 -2
- package/node/ButtonBase/TouchRipple.js +1 -2
- package/node/Dialog/Dialog.js +11 -7
- package/node/Drawer/Drawer.js +11 -10
- package/node/Fab/Fab.js +8 -20
- package/node/Fab/fabClasses.js +1 -1
- package/node/Fade/Fade.js +7 -9
- 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 +22 -9
- package/node/Select/SelectInput.js +11 -10
- package/node/Slide/Slide.js +14 -16
- package/node/Slider/Slider.js +3 -1
- package/node/Snackbar/Snackbar.js +12 -10
- package/node/SpeedDial/SpeedDial.js +9 -7
- package/node/Step/StepContext.js +11 -1
- package/node/Step/index.js +22 -1
- package/node/SwipeableDrawer/SwipeArea.js +1 -3
- package/node/SwipeableDrawer/SwipeableDrawer.js +8 -7
- package/node/TextField/TextField.js +1 -1
- package/node/ToggleButton/ToggleButton.js +8 -2
- package/node/Zoom/Zoom.js +7 -9
- package/node/index.js +62 -16
- package/node/internal/SwitchBase.js +2 -6
- package/node/locale/index.js +12 -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/package.json +8 -8
- package/styles/ThemeProvider.d.ts +1 -1
- package/styles/index.d.ts +3 -0
- package/styles/makeStyles.js +1 -1
- package/styles/withStyles.js +1 -1
- package/styles/withTheme.js +1 -1
- package/umd/material-ui.development.js +5022 -7146
- package/umd/material-ui.production.min.js +21 -21
- package/useMediaQuery/useMediaQuery.d.ts +4 -0
- package/useMediaQuery/useMediaQuery.js +69 -27
package/modern/Select/Select.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _StyledInput, _StyledFilledInput;
|
|
5
5
|
|
|
6
6
|
const _excluded = ["autoWidth", "children", "classes", "className", "defaultOpen", "displayEmpty", "IconComponent", "id", "input", "inputProps", "label", "labelId", "MenuProps", "multiple", "native", "onClose", "onOpen", "open", "renderValue", "SelectDisplayProps", "variant"];
|
|
7
7
|
import * as React from 'react';
|
|
@@ -18,6 +18,7 @@ import FilledInput from '../FilledInput';
|
|
|
18
18
|
import OutlinedInput from '../OutlinedInput';
|
|
19
19
|
import useThemeProps from '../styles/useThemeProps';
|
|
20
20
|
import useForkRef from '../utils/useForkRef';
|
|
21
|
+
import styled, { rootShouldForwardProp } from '../styles/styled';
|
|
21
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
23
|
|
|
23
24
|
const useUtilityClasses = ownerState => {
|
|
@@ -27,6 +28,15 @@ const useUtilityClasses = ownerState => {
|
|
|
27
28
|
return classes;
|
|
28
29
|
};
|
|
29
30
|
|
|
31
|
+
const styledRootConfig = {
|
|
32
|
+
name: 'MuiSelect',
|
|
33
|
+
overridesResolver: (props, styles) => styles.root,
|
|
34
|
+
shouldForwardProp: prop => rootShouldForwardProp(prop) && prop !== 'variant',
|
|
35
|
+
slot: 'Root'
|
|
36
|
+
};
|
|
37
|
+
const StyledInput = styled(Input, styledRootConfig)('');
|
|
38
|
+
const StyledOutlinedInput = styled(OutlinedInput, styledRootConfig)('');
|
|
39
|
+
const StyledFilledInput = styled(FilledInput, styledRootConfig)('');
|
|
30
40
|
const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
31
41
|
const props = useThemeProps({
|
|
32
42
|
name: 'MuiSelect',
|
|
@@ -54,7 +64,7 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
54
64
|
open,
|
|
55
65
|
renderValue,
|
|
56
66
|
SelectDisplayProps,
|
|
57
|
-
variant:
|
|
67
|
+
variant: variantProp = 'outlined'
|
|
58
68
|
} = props,
|
|
59
69
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
60
70
|
|
|
@@ -65,16 +75,17 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
65
75
|
muiFormControl,
|
|
66
76
|
states: ['variant']
|
|
67
77
|
});
|
|
68
|
-
const variant = fcs.variant ||
|
|
78
|
+
const variant = fcs.variant || variantProp;
|
|
69
79
|
const InputComponent = input || {
|
|
70
|
-
standard:
|
|
71
|
-
outlined: /*#__PURE__*/_jsx(
|
|
80
|
+
standard: _StyledInput || (_StyledInput = /*#__PURE__*/_jsx(StyledInput, {})),
|
|
81
|
+
outlined: /*#__PURE__*/_jsx(StyledOutlinedInput, {
|
|
72
82
|
label: label
|
|
73
83
|
}),
|
|
74
|
-
filled:
|
|
84
|
+
filled: _StyledFilledInput || (_StyledFilledInput = /*#__PURE__*/_jsx(StyledFilledInput, {}))
|
|
75
85
|
}[variant];
|
|
76
86
|
|
|
77
87
|
const ownerState = _extends({}, props, {
|
|
88
|
+
variant,
|
|
78
89
|
classes: classesProp
|
|
79
90
|
});
|
|
80
91
|
|
|
@@ -113,7 +124,8 @@ const Select = /*#__PURE__*/React.forwardRef(function Select(inProps, ref) {
|
|
|
113
124
|
notched: true
|
|
114
125
|
} : {}, {
|
|
115
126
|
ref: inputComponentRef,
|
|
116
|
-
className: clsx(InputComponent.props.className, className)
|
|
127
|
+
className: clsx(InputComponent.props.className, className),
|
|
128
|
+
variant
|
|
117
129
|
}, other));
|
|
118
130
|
});
|
|
119
131
|
process.env.NODE_ENV !== "production" ? Select.propTypes
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
|
|
4
|
+
|
|
5
|
+
var _span;
|
|
6
|
+
|
|
4
7
|
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"];
|
|
5
8
|
import * as React from 'react';
|
|
6
9
|
import { isFragment } from 'react-is';
|
|
@@ -186,6 +189,10 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
186
189
|
}
|
|
187
190
|
}, [autoFocus]);
|
|
188
191
|
React.useEffect(() => {
|
|
192
|
+
if (!labelId) {
|
|
193
|
+
return undefined;
|
|
194
|
+
}
|
|
195
|
+
|
|
189
196
|
const label = ownerDocument(displayRef.current).getElementById(labelId);
|
|
190
197
|
|
|
191
198
|
if (label) {
|
|
@@ -282,7 +289,7 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
282
289
|
if (onChange) {
|
|
283
290
|
// Redefine target to allow name and value to be read.
|
|
284
291
|
// This allows seamless integration with the most popular form libraries.
|
|
285
|
-
// https://github.com/mui
|
|
292
|
+
// https://github.com/mui/material-ui/issues/13485#issuecomment-676048492
|
|
286
293
|
// Clone the event to not override `target` of the original event.
|
|
287
294
|
const nativeEvent = event.nativeEvent || event;
|
|
288
295
|
const clonedEvent = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
|
|
@@ -482,16 +489,11 @@ const SelectInput = /*#__PURE__*/React.forwardRef(function SelectInput(props, re
|
|
|
482
489
|
className: clsx(classes.select, className, SelectDisplayProps.className) // The id is required for proper a11y
|
|
483
490
|
,
|
|
484
491
|
id: buttonId,
|
|
485
|
-
children: isEmpty(display) ?
|
|
486
|
-
/*#__PURE__*/
|
|
487
|
-
// notranslate needed while Google Translate will not fix zero-width space issue
|
|
488
|
-
// eslint-disable-next-line react/no-danger
|
|
489
|
-
_jsx("span", {
|
|
492
|
+
children: isEmpty(display) ? // notranslate needed while Google Translate will not fix zero-width space issue
|
|
493
|
+
_span || (_span = /*#__PURE__*/_jsx("span", {
|
|
490
494
|
className: "notranslate",
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
}
|
|
494
|
-
}) : display
|
|
495
|
+
children: "\u200B"
|
|
496
|
+
})) : display
|
|
495
497
|
})), /*#__PURE__*/_jsx(SelectNativeInput, _extends({
|
|
496
498
|
value: Array.isArray(value) ? value.join(',') : value,
|
|
497
499
|
name: name,
|
package/modern/Slide/Slide.js
CHANGED
|
@@ -8,7 +8,6 @@ import { elementAcceptingRef, HTMLElementType, chainPropTypes } from '@mui/utils
|
|
|
8
8
|
import debounce from '../utils/debounce';
|
|
9
9
|
import useForkRef from '../utils/useForkRef';
|
|
10
10
|
import useTheme from '../styles/useTheme';
|
|
11
|
-
import { duration, easing } from '../styles/createTransitions';
|
|
12
11
|
import { reflow, getTransitionProps } from '../transitions/utils';
|
|
13
12
|
import { ownerWindow } from '../utils'; // Translate the node so it can't be seen on the screen.
|
|
14
13
|
// Later, we're going to translate the node back to its original location with `none`.
|
|
@@ -82,20 +81,22 @@ export function setTranslateValue(direction, node, containerProp) {
|
|
|
82
81
|
node.style.transform = transform;
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
|
-
const defaultEasing = {
|
|
86
|
-
enter: easing.easeOut,
|
|
87
|
-
exit: easing.sharp
|
|
88
|
-
};
|
|
89
|
-
const defaultTimeout = {
|
|
90
|
-
enter: duration.enteringScreen,
|
|
91
|
-
exit: duration.leavingScreen
|
|
92
|
-
};
|
|
93
84
|
/**
|
|
94
85
|
* The Slide transition is used by the [Drawer](/components/drawers/) component.
|
|
95
86
|
* It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally.
|
|
96
87
|
*/
|
|
97
88
|
|
|
98
89
|
const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
90
|
+
const theme = useTheme();
|
|
91
|
+
const defaultEasing = {
|
|
92
|
+
enter: theme.transitions.easing.easeOut,
|
|
93
|
+
exit: theme.transitions.easing.sharp
|
|
94
|
+
};
|
|
95
|
+
const defaultTimeout = {
|
|
96
|
+
enter: theme.transitions.duration.enteringScreen,
|
|
97
|
+
exit: theme.transitions.duration.leavingScreen
|
|
98
|
+
};
|
|
99
|
+
|
|
99
100
|
const {
|
|
100
101
|
addEndListener,
|
|
101
102
|
appear = true,
|
|
@@ -117,7 +118,6 @@ const Slide = /*#__PURE__*/React.forwardRef(function Slide(props, ref) {
|
|
|
117
118
|
} = props,
|
|
118
119
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
119
120
|
|
|
120
|
-
const theme = useTheme();
|
|
121
121
|
const childrenRef = React.useRef(null);
|
|
122
122
|
const handleRefIntermediary = useForkRef(children.ref, childrenRef);
|
|
123
123
|
const handleRef = useForkRef(handleRefIntermediary, ref);
|
|
@@ -305,8 +305,8 @@ process.env.NODE_ENV !== "production" ? Slide.propTypes
|
|
|
305
305
|
* The transition timing function.
|
|
306
306
|
* You may specify a single easing or a object containing enter and exit values.
|
|
307
307
|
* @default {
|
|
308
|
-
* enter: easing.easeOut,
|
|
309
|
-
* exit: easing.sharp,
|
|
308
|
+
* enter: theme.transitions.easing.easeOut,
|
|
309
|
+
* exit: theme.transitions.easing.sharp,
|
|
310
310
|
* }
|
|
311
311
|
*/
|
|
312
312
|
easing: PropTypes.oneOfType([PropTypes.shape({
|
|
@@ -358,8 +358,8 @@ process.env.NODE_ENV !== "production" ? Slide.propTypes
|
|
|
358
358
|
* The duration for the transition, in milliseconds.
|
|
359
359
|
* You may specify a single timeout for all transitions, or individually with an object.
|
|
360
360
|
* @default {
|
|
361
|
-
* enter: duration.enteringScreen,
|
|
362
|
-
* exit: duration.leavingScreen,
|
|
361
|
+
* enter: theme.transitions.duration.enteringScreen,
|
|
362
|
+
* exit: theme.transitions.duration.leavingScreen,
|
|
363
363
|
* }
|
|
364
364
|
*/
|
|
365
365
|
timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
package/modern/Slider/Slider.js
CHANGED
|
@@ -689,7 +689,9 @@ process.env.NODE_ENV !== "production" ? Slider.propTypes
|
|
|
689
689
|
* The size of the slider.
|
|
690
690
|
* @default 'medium'
|
|
691
691
|
*/
|
|
692
|
-
size: PropTypes
|
|
692
|
+
size: PropTypes
|
|
693
|
+
/* @typescript-to-proptypes-ignore */
|
|
694
|
+
.oneOfType([PropTypes.oneOf(['small', 'medium']), PropTypes.string]),
|
|
693
695
|
|
|
694
696
|
/**
|
|
695
697
|
* The granularity with which the slider can step through values. (A "discrete" slider.)
|
|
@@ -10,7 +10,6 @@ import ClickAwayListener from '@mui/base/ClickAwayListener';
|
|
|
10
10
|
import styled from '../styles/styled';
|
|
11
11
|
import useTheme from '../styles/useTheme';
|
|
12
12
|
import useThemeProps from '../styles/useThemeProps';
|
|
13
|
-
import { duration } from '../styles/createTransitions';
|
|
14
13
|
import useEventCallback from '../utils/useEventCallback';
|
|
15
14
|
import capitalize from '../utils/capitalize';
|
|
16
15
|
import Grow from '../Grow';
|
|
@@ -93,6 +92,11 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
93
92
|
props: inProps,
|
|
94
93
|
name: 'MuiSnackbar'
|
|
95
94
|
});
|
|
95
|
+
const theme = useTheme();
|
|
96
|
+
const defaultTransitionDuration = {
|
|
97
|
+
enter: theme.transitions.duration.enteringScreen,
|
|
98
|
+
exit: theme.transitions.duration.leavingScreen
|
|
99
|
+
};
|
|
96
100
|
|
|
97
101
|
const {
|
|
98
102
|
action,
|
|
@@ -118,10 +122,7 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
118
122
|
open,
|
|
119
123
|
resumeHideDuration,
|
|
120
124
|
TransitionComponent = Grow,
|
|
121
|
-
transitionDuration =
|
|
122
|
-
enter: duration.enteringScreen,
|
|
123
|
-
exit: duration.leavingScreen
|
|
124
|
-
},
|
|
125
|
+
transitionDuration = defaultTransitionDuration,
|
|
125
126
|
TransitionProps: {
|
|
126
127
|
onEnter,
|
|
127
128
|
onExited
|
|
@@ -130,7 +131,6 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
130
131
|
TransitionProps = _objectWithoutPropertiesLoose(props.TransitionProps, _excluded),
|
|
131
132
|
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
132
133
|
|
|
133
|
-
const theme = useTheme();
|
|
134
134
|
const isRtl = theme.direction === 'rtl';
|
|
135
135
|
|
|
136
136
|
const ownerState = _extends({}, props, {
|
|
@@ -290,7 +290,10 @@ const Snackbar = /*#__PURE__*/React.forwardRef(function Snackbar(inProps, ref) {
|
|
|
290
290
|
onMouseEnter: handleMouseEnter,
|
|
291
291
|
onMouseLeave: handleMouseLeave,
|
|
292
292
|
ownerState: ownerState,
|
|
293
|
-
ref: ref
|
|
293
|
+
ref: ref // ClickAwayListener adds an `onClick` prop which results in the alert not being announced.
|
|
294
|
+
// See https://github.com/mui-org/material-ui/issues/29080
|
|
295
|
+
,
|
|
296
|
+
role: "presentation"
|
|
294
297
|
}, other, {
|
|
295
298
|
children: /*#__PURE__*/_jsx(TransitionComponent, _extends({
|
|
296
299
|
appear: true,
|
|
@@ -446,8 +449,8 @@ process.env.NODE_ENV !== "production" ? Snackbar.propTypes
|
|
|
446
449
|
* The duration for the transition, in milliseconds.
|
|
447
450
|
* You may specify a single timeout for all transitions, or individually with an object.
|
|
448
451
|
* @default {
|
|
449
|
-
* enter: duration.enteringScreen,
|
|
450
|
-
* exit: duration.leavingScreen,
|
|
452
|
+
* enter: theme.transitions.duration.enteringScreen,
|
|
453
|
+
* exit: theme.transitions.duration.leavingScreen,
|
|
451
454
|
* }
|
|
452
455
|
*/
|
|
453
456
|
transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
@@ -10,7 +10,7 @@ import clsx from 'clsx';
|
|
|
10
10
|
import { unstable_composeClasses as composeClasses } from '@mui/base';
|
|
11
11
|
import styled from '../styles/styled';
|
|
12
12
|
import useThemeProps from '../styles/useThemeProps';
|
|
13
|
-
import
|
|
13
|
+
import useTheme from '../styles/useTheme';
|
|
14
14
|
import Zoom from '../Zoom';
|
|
15
15
|
import Fab from '../Fab';
|
|
16
16
|
import capitalize from '../utils/capitalize';
|
|
@@ -137,6 +137,11 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
137
137
|
props: inProps,
|
|
138
138
|
name: 'MuiSpeedDial'
|
|
139
139
|
});
|
|
140
|
+
const theme = useTheme();
|
|
141
|
+
const defaultTransitionDuration = {
|
|
142
|
+
enter: theme.transitions.duration.enteringScreen,
|
|
143
|
+
exit: theme.transitions.duration.leavingScreen
|
|
144
|
+
};
|
|
140
145
|
|
|
141
146
|
const {
|
|
142
147
|
ariaLabel,
|
|
@@ -157,10 +162,7 @@ const SpeedDial = /*#__PURE__*/React.forwardRef(function SpeedDial(inProps, ref)
|
|
|
157
162
|
onOpen,
|
|
158
163
|
open: openProp,
|
|
159
164
|
TransitionComponent = Zoom,
|
|
160
|
-
transitionDuration =
|
|
161
|
-
enter: duration.enteringScreen,
|
|
162
|
-
exit: duration.leavingScreen
|
|
163
|
-
},
|
|
165
|
+
transitionDuration = defaultTransitionDuration,
|
|
164
166
|
TransitionProps
|
|
165
167
|
} = props,
|
|
166
168
|
FabProps = _objectWithoutPropertiesLoose(props.FabProps, _excluded),
|
|
@@ -542,8 +544,8 @@ process.env.NODE_ENV !== "production" ? SpeedDial.propTypes
|
|
|
542
544
|
* The duration for the transition, in milliseconds.
|
|
543
545
|
* You may specify a single timeout for all transitions, or individually with an object.
|
|
544
546
|
* @default {
|
|
545
|
-
* enter: duration.enteringScreen,
|
|
546
|
-
* exit: duration.leavingScreen,
|
|
547
|
+
* enter: theme.transitions.duration.enteringScreen,
|
|
548
|
+
* exit: theme.transitions.duration.leavingScreen,
|
|
547
549
|
* }
|
|
548
550
|
*/
|
|
549
551
|
transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
|
|
2
3
|
/**
|
|
3
|
-
*
|
|
4
|
+
* Provides information about the current step in Stepper.
|
|
4
5
|
*/
|
|
5
|
-
|
|
6
6
|
const StepContext = /*#__PURE__*/React.createContext({});
|
|
7
7
|
|
|
8
8
|
if (process.env.NODE_ENV !== 'production') {
|
|
9
9
|
StepContext.displayName = 'StepContext';
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* Returns the current StepContext or an empty object if no StepContext
|
|
13
|
+
* has been defined in the component tree.
|
|
14
|
+
*/
|
|
15
|
+
|
|
11
16
|
|
|
17
|
+
export function useStepContext() {
|
|
18
|
+
return React.useContext(StepContext);
|
|
19
|
+
}
|
|
12
20
|
export default StepContext;
|
package/modern/Step/index.js
CHANGED
|
@@ -8,9 +8,7 @@ import styled from '../styles/styled';
|
|
|
8
8
|
import capitalize from '../utils/capitalize';
|
|
9
9
|
import { isHorizontal } from '../Drawer/Drawer';
|
|
10
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
const SwipeAreaRoot = styled('div'
|
|
12
|
-
skipSx: true
|
|
13
|
-
})(({
|
|
11
|
+
const SwipeAreaRoot = styled('div')(({
|
|
14
12
|
theme,
|
|
15
13
|
ownerState
|
|
16
14
|
}) => _extends({
|
|
@@ -12,7 +12,6 @@ import ownerDocument from '../utils/ownerDocument';
|
|
|
12
12
|
import ownerWindow from '../utils/ownerWindow';
|
|
13
13
|
import useEventCallback from '../utils/useEventCallback';
|
|
14
14
|
import useEnhancedEffect from '../utils/useEnhancedEffect';
|
|
15
|
-
import { duration } from '../styles/createTransitions';
|
|
16
15
|
import useTheme from '../styles/useTheme';
|
|
17
16
|
import { getTransitionProps } from '../transitions/utils';
|
|
18
17
|
import SwipeArea from './SwipeArea'; // This value is closed to what browsers are using internally to
|
|
@@ -125,16 +124,16 @@ function computeHasNativeHandler({
|
|
|
125
124
|
}
|
|
126
125
|
|
|
127
126
|
const iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);
|
|
128
|
-
const transitionDurationDefault = {
|
|
129
|
-
enter: duration.enteringScreen,
|
|
130
|
-
exit: duration.leavingScreen
|
|
131
|
-
};
|
|
132
127
|
const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inProps, ref) {
|
|
133
128
|
const props = useThemeProps({
|
|
134
129
|
name: 'MuiSwipeableDrawer',
|
|
135
130
|
props: inProps
|
|
136
131
|
});
|
|
137
132
|
const theme = useTheme();
|
|
133
|
+
const transitionDurationDefault = {
|
|
134
|
+
enter: theme.transitions.duration.enteringScreen,
|
|
135
|
+
exit: theme.transitions.duration.leavingScreen
|
|
136
|
+
};
|
|
138
137
|
|
|
139
138
|
const {
|
|
140
139
|
anchor = 'left',
|
|
@@ -612,7 +611,10 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes
|
|
|
612
611
|
/**
|
|
613
612
|
* The duration for the transition, in milliseconds.
|
|
614
613
|
* You may specify a single timeout for all transitions, or individually with an object.
|
|
615
|
-
* @default {
|
|
614
|
+
* @default {
|
|
615
|
+
* enter: theme.transitions.duration.enteringScreen,
|
|
616
|
+
* exit: theme.transitions.duration.leavingScreen,
|
|
617
|
+
* }
|
|
616
618
|
*/
|
|
617
619
|
transitionDuration: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
|
618
620
|
appear: PropTypes.number,
|
|
@@ -191,7 +191,7 @@ const TextField = /*#__PURE__*/React.forwardRef(function TextField(inProps, ref)
|
|
|
191
191
|
variant: variant,
|
|
192
192
|
ownerState: ownerState
|
|
193
193
|
}, other, {
|
|
194
|
-
children: [label && /*#__PURE__*/_jsx(InputLabel, _extends({
|
|
194
|
+
children: [label != null && label !== '' && /*#__PURE__*/_jsx(InputLabel, _extends({
|
|
195
195
|
htmlFor: id,
|
|
196
196
|
id: inputLabelId
|
|
197
197
|
}, InputLabelProps, {
|
|
@@ -200,12 +200,18 @@ process.env.NODE_ENV !== "production" ? ToggleButton.propTypes
|
|
|
200
200
|
fullWidth: PropTypes.bool,
|
|
201
201
|
|
|
202
202
|
/**
|
|
203
|
-
*
|
|
203
|
+
* Callback fired when the state changes.
|
|
204
|
+
*
|
|
205
|
+
* @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
|
|
206
|
+
* @param {any} value of the selected button.
|
|
204
207
|
*/
|
|
205
208
|
onChange: PropTypes.func,
|
|
206
209
|
|
|
207
210
|
/**
|
|
208
|
-
*
|
|
211
|
+
* Callback fired when the button is clicked.
|
|
212
|
+
*
|
|
213
|
+
* @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
|
|
214
|
+
* @param {any} value of the selected button.
|
|
209
215
|
*/
|
|
210
216
|
onClick: PropTypes.func,
|
|
211
217
|
|
package/modern/Zoom/Zoom.js
CHANGED
|
@@ -5,7 +5,6 @@ import * as React from 'react';
|
|
|
5
5
|
import PropTypes from 'prop-types';
|
|
6
6
|
import { Transition } from 'react-transition-group';
|
|
7
7
|
import { elementAcceptingRef } from '@mui/utils';
|
|
8
|
-
import { duration } from '../styles/createTransitions';
|
|
9
8
|
import useTheme from '../styles/useTheme';
|
|
10
9
|
import { reflow, getTransitionProps } from '../transitions/utils';
|
|
11
10
|
import useForkRef from '../utils/useForkRef';
|
|
@@ -18,10 +17,6 @@ const styles = {
|
|
|
18
17
|
transform: 'none'
|
|
19
18
|
}
|
|
20
19
|
};
|
|
21
|
-
const defaultTimeout = {
|
|
22
|
-
enter: duration.enteringScreen,
|
|
23
|
-
exit: duration.leavingScreen
|
|
24
|
-
};
|
|
25
20
|
/**
|
|
26
21
|
* The Zoom transition can be used for the floating variant of the
|
|
27
22
|
* [Button](/components/buttons/#floating-action-buttons) component.
|
|
@@ -29,6 +24,12 @@ const defaultTimeout = {
|
|
|
29
24
|
*/
|
|
30
25
|
|
|
31
26
|
const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
27
|
+
const theme = useTheme();
|
|
28
|
+
const defaultTimeout = {
|
|
29
|
+
enter: theme.transitions.duration.enteringScreen,
|
|
30
|
+
exit: theme.transitions.duration.leavingScreen
|
|
31
|
+
};
|
|
32
|
+
|
|
32
33
|
const {
|
|
33
34
|
addEndListener,
|
|
34
35
|
appear = true,
|
|
@@ -48,7 +49,6 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
48
49
|
} = props,
|
|
49
50
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
50
51
|
|
|
51
|
-
const theme = useTheme();
|
|
52
52
|
const nodeRef = React.useRef(null);
|
|
53
53
|
const foreignRef = useForkRef(children.ref, ref);
|
|
54
54
|
const handleRef = useForkRef(nodeRef, foreignRef);
|
|
@@ -213,8 +213,8 @@ process.env.NODE_ENV !== "production" ? Zoom.propTypes
|
|
|
213
213
|
* The duration for the transition, in milliseconds.
|
|
214
214
|
* You may specify a single timeout for all transitions, or individually with an object.
|
|
215
215
|
* @default {
|
|
216
|
-
* enter: duration.enteringScreen,
|
|
217
|
-
* exit: duration.leavingScreen,
|
|
216
|
+
* enter: theme.transitions.duration.enteringScreen,
|
|
217
|
+
* exit: theme.transitions.duration.leavingScreen,
|
|
218
218
|
* }
|
|
219
219
|
*/
|
|
220
220
|
timeout: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
|
package/modern/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** @license MUI v5.3
|
|
1
|
+
/** @license MUI v5.4.3
|
|
2
2
|
*
|
|
3
3
|
* This source code is licensed under the MIT license found in the
|
|
4
4
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -8,7 +8,6 @@ import * as colors from './colors';
|
|
|
8
8
|
export { colors };
|
|
9
9
|
export * from './styles';
|
|
10
10
|
export * from './utils';
|
|
11
|
-
export * from '@mui/base';
|
|
12
11
|
export { default as Accordion } from './Accordion';
|
|
13
12
|
export * from './Accordion';
|
|
14
13
|
export { default as AccordionActions } from './AccordionActions';
|
|
@@ -175,6 +174,8 @@ export { default as Popover } from './Popover';
|
|
|
175
174
|
export * from './Popover';
|
|
176
175
|
export { default as Popper } from './Popper';
|
|
177
176
|
export * from './Popper';
|
|
177
|
+
export { default as Portal } from './Portal';
|
|
178
|
+
export * from './Portal';
|
|
178
179
|
export { default as Radio } from './Radio';
|
|
179
180
|
export * from './Radio';
|
|
180
181
|
export { default as RadioGroup } from './RadioGroup';
|
|
@@ -273,4 +274,8 @@ export * from './Zoom'; // createFilterOptions is exported from Autocomplete
|
|
|
273
274
|
export { default as useAutocomplete } from './useAutocomplete';
|
|
274
275
|
export { default as GlobalStyles } from './GlobalStyles';
|
|
275
276
|
export * from './GlobalStyles';
|
|
276
|
-
export { StyledEngineProvider } from './styles';
|
|
277
|
+
export { StyledEngineProvider } from './styles';
|
|
278
|
+
export { default as unstable_composeClasses } from '@mui/base/composeClasses';
|
|
279
|
+
export { default as generateUtilityClass } from '@mui/base/generateUtilityClass';
|
|
280
|
+
export * from '@mui/base/generateUtilityClass';
|
|
281
|
+
export { default as generateUtilityClasses } from '@mui/base/generateUtilityClasses';
|
|
@@ -29,9 +29,7 @@ const useUtilityClasses = ownerState => {
|
|
|
29
29
|
return composeClasses(slots, getSwitchBaseUtilityClass, classes);
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
const SwitchBaseRoot = styled(ButtonBase
|
|
33
|
-
skipSx: true
|
|
34
|
-
})(({
|
|
32
|
+
const SwitchBaseRoot = styled(ButtonBase)(({
|
|
35
33
|
ownerState
|
|
36
34
|
}) => _extends({
|
|
37
35
|
padding: 9,
|
|
@@ -41,9 +39,7 @@ const SwitchBaseRoot = styled(ButtonBase, {
|
|
|
41
39
|
}, ownerState.edge === 'end' && {
|
|
42
40
|
marginRight: ownerState.size === 'small' ? -3 : -12
|
|
43
41
|
}));
|
|
44
|
-
const SwitchBaseInput = styled('input'
|
|
45
|
-
skipSx: true
|
|
46
|
-
})({
|
|
42
|
+
const SwitchBaseInput = styled('input')({
|
|
47
43
|
cursor: 'inherit',
|
|
48
44
|
position: 'absolute',
|
|
49
45
|
opacity: 0,
|
package/modern/locale/index.js
CHANGED
|
@@ -1813,9 +1813,12 @@ export const itIT = {
|
|
|
1813
1813
|
|
|
1814
1814
|
return 'Vai alla pagina precedente';
|
|
1815
1815
|
},
|
|
1816
|
-
labelRowsPerPage: 'Righe per pagina:'
|
|
1817
|
-
|
|
1818
|
-
|
|
1816
|
+
labelRowsPerPage: 'Righe per pagina:',
|
|
1817
|
+
labelDisplayedRows: ({
|
|
1818
|
+
from,
|
|
1819
|
+
to,
|
|
1820
|
+
count
|
|
1821
|
+
}) => `${from}–${to} di ${count !== -1 ? count : `più di ${to}`}`
|
|
1819
1822
|
}
|
|
1820
1823
|
},
|
|
1821
1824
|
MuiRating: {
|
|
@@ -2374,9 +2377,12 @@ export const plPL = {
|
|
|
2374
2377
|
|
|
2375
2378
|
return 'Przejdź do poprzedniej strony';
|
|
2376
2379
|
},
|
|
2377
|
-
labelRowsPerPage: 'Wierszy na stronę:'
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
+
labelRowsPerPage: 'Wierszy na stronę:',
|
|
2381
|
+
labelDisplayedRows: ({
|
|
2382
|
+
from,
|
|
2383
|
+
to,
|
|
2384
|
+
count
|
|
2385
|
+
}) => `${from}–${to} z ${count !== -1 ? count : `ponad ${to}`}`
|
|
2380
2386
|
}
|
|
2381
2387
|
},
|
|
2382
2388
|
MuiRating: {
|
|
@@ -2,5 +2,5 @@ import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
|
|
|
2
2
|
export default function makeStyles() {
|
|
3
3
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: makeStyles is not longer exported from @mui/material/styles.
|
|
4
4
|
You have to import it from @mui/styles.
|
|
5
|
-
See https://mui.com/r/migration-v4/#material-
|
|
5
|
+
See https://mui.com/r/migration-v4/#mui-material-styles for more details.` : _formatMuiErrorMessage(14));
|
|
6
6
|
}
|
|
@@ -2,5 +2,5 @@ import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
|
|
|
2
2
|
export default function withStyles() {
|
|
3
3
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: withStyles is not longer exported from @mui/material/styles.
|
|
4
4
|
You have to import it from @mui/styles.
|
|
5
|
-
See https://mui.com/r/migration-v4/#material-
|
|
5
|
+
See https://mui.com/r/migration-v4/#mui-material-styles for more details.` : _formatMuiErrorMessage(15));
|
|
6
6
|
}
|
|
@@ -2,5 +2,5 @@ import { formatMuiErrorMessage as _formatMuiErrorMessage } from "@mui/utils";
|
|
|
2
2
|
export default function withTheme() {
|
|
3
3
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: withTheme is not longer exported from @mui/material/styles.
|
|
4
4
|
You have to import it from @mui/styles.
|
|
5
|
-
See https://mui.com/r/migration-v4/#material-
|
|
5
|
+
See https://mui.com/r/migration-v4/#mui-material-styles for more details.` : _formatMuiErrorMessage(16));
|
|
6
6
|
}
|