@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
|
@@ -32,8 +32,6 @@ var _useEventCallback = _interopRequireDefault(require("../utils/useEventCallbac
|
|
|
32
32
|
|
|
33
33
|
var _useEnhancedEffect = _interopRequireDefault(require("../utils/useEnhancedEffect"));
|
|
34
34
|
|
|
35
|
-
var _createTransitions = require("../styles/createTransitions");
|
|
36
|
-
|
|
37
35
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
38
36
|
|
|
39
37
|
var _utils2 = require("../transitions/utils");
|
|
@@ -156,16 +154,16 @@ function computeHasNativeHandler({
|
|
|
156
154
|
}
|
|
157
155
|
|
|
158
156
|
const iOS = typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent);
|
|
159
|
-
const transitionDurationDefault = {
|
|
160
|
-
enter: _createTransitions.duration.enteringScreen,
|
|
161
|
-
exit: _createTransitions.duration.leavingScreen
|
|
162
|
-
};
|
|
163
157
|
const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(inProps, ref) {
|
|
164
158
|
const props = (0, _system.useThemeProps)({
|
|
165
159
|
name: 'MuiSwipeableDrawer',
|
|
166
160
|
props: inProps
|
|
167
161
|
});
|
|
168
162
|
const theme = (0, _useTheme.default)();
|
|
163
|
+
const transitionDurationDefault = {
|
|
164
|
+
enter: theme.transitions.duration.enteringScreen,
|
|
165
|
+
exit: theme.transitions.duration.leavingScreen
|
|
166
|
+
};
|
|
169
167
|
const {
|
|
170
168
|
anchor = 'left',
|
|
171
169
|
disableBackdropTransition = false,
|
|
@@ -641,7 +639,10 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes
|
|
|
641
639
|
/**
|
|
642
640
|
* The duration for the transition, in milliseconds.
|
|
643
641
|
* You may specify a single timeout for all transitions, or individually with an object.
|
|
644
|
-
* @default {
|
|
642
|
+
* @default {
|
|
643
|
+
* enter: theme.transitions.duration.enteringScreen,
|
|
644
|
+
* exit: theme.transitions.duration.leavingScreen,
|
|
645
|
+
* }
|
|
645
646
|
*/
|
|
646
647
|
transitionDuration: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
|
647
648
|
appear: _propTypes.default.number,
|
|
@@ -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, {
|
|
@@ -222,12 +222,18 @@ process.env.NODE_ENV !== "production" ? ToggleButton.propTypes
|
|
|
222
222
|
fullWidth: _propTypes.default.bool,
|
|
223
223
|
|
|
224
224
|
/**
|
|
225
|
-
*
|
|
225
|
+
* Callback fired when the state changes.
|
|
226
|
+
*
|
|
227
|
+
* @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
|
|
228
|
+
* @param {any} value of the selected button.
|
|
226
229
|
*/
|
|
227
230
|
onChange: _propTypes.default.func,
|
|
228
231
|
|
|
229
232
|
/**
|
|
230
|
-
*
|
|
233
|
+
* Callback fired when the button is clicked.
|
|
234
|
+
*
|
|
235
|
+
* @param {React.MouseEvent<HTMLElement>} event The event source of the callback.
|
|
236
|
+
* @param {any} value of the selected button.
|
|
231
237
|
*/
|
|
232
238
|
onClick: _propTypes.default.func,
|
|
233
239
|
|
package/node/Zoom/Zoom.js
CHANGED
|
@@ -19,8 +19,6 @@ var _reactTransitionGroup = require("react-transition-group");
|
|
|
19
19
|
|
|
20
20
|
var _utils = require("@mui/utils");
|
|
21
21
|
|
|
22
|
-
var _createTransitions = require("../styles/createTransitions");
|
|
23
|
-
|
|
24
22
|
var _useTheme = _interopRequireDefault(require("../styles/useTheme"));
|
|
25
23
|
|
|
26
24
|
var _utils2 = require("../transitions/utils");
|
|
@@ -43,10 +41,6 @@ const styles = {
|
|
|
43
41
|
transform: 'none'
|
|
44
42
|
}
|
|
45
43
|
};
|
|
46
|
-
const defaultTimeout = {
|
|
47
|
-
enter: _createTransitions.duration.enteringScreen,
|
|
48
|
-
exit: _createTransitions.duration.leavingScreen
|
|
49
|
-
};
|
|
50
44
|
/**
|
|
51
45
|
* The Zoom transition can be used for the floating variant of the
|
|
52
46
|
* [Button](/components/buttons/#floating-action-buttons) component.
|
|
@@ -54,6 +48,11 @@ const defaultTimeout = {
|
|
|
54
48
|
*/
|
|
55
49
|
|
|
56
50
|
const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
51
|
+
const theme = (0, _useTheme.default)();
|
|
52
|
+
const defaultTimeout = {
|
|
53
|
+
enter: theme.transitions.duration.enteringScreen,
|
|
54
|
+
exit: theme.transitions.duration.leavingScreen
|
|
55
|
+
};
|
|
57
56
|
const {
|
|
58
57
|
addEndListener,
|
|
59
58
|
appear = true,
|
|
@@ -72,7 +71,6 @@ const Zoom = /*#__PURE__*/React.forwardRef(function Zoom(props, ref) {
|
|
|
72
71
|
TransitionComponent = _reactTransitionGroup.Transition
|
|
73
72
|
} = props,
|
|
74
73
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
75
|
-
const theme = (0, _useTheme.default)();
|
|
76
74
|
const nodeRef = React.useRef(null);
|
|
77
75
|
const foreignRef = (0, _useForkRef.default)(children.ref, ref);
|
|
78
76
|
const handleRef = (0, _useForkRef.default)(nodeRef, foreignRef);
|
|
@@ -237,8 +235,8 @@ process.env.NODE_ENV !== "production" ? Zoom.propTypes
|
|
|
237
235
|
* The duration for the transition, in milliseconds.
|
|
238
236
|
* You may specify a single timeout for all transitions, or individually with an object.
|
|
239
237
|
* @default {
|
|
240
|
-
* enter: duration.enteringScreen,
|
|
241
|
-
* exit: duration.leavingScreen,
|
|
238
|
+
* enter: theme.transitions.duration.enteringScreen,
|
|
239
|
+
* exit: theme.transitions.duration.leavingScreen,
|
|
242
240
|
* }
|
|
243
241
|
*/
|
|
244
242
|
timeout: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
|
package/node/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.
|
|
@@ -96,6 +96,7 @@ var _exportNames = {
|
|
|
96
96
|
Paper: true,
|
|
97
97
|
Popover: true,
|
|
98
98
|
Popper: true,
|
|
99
|
+
Portal: true,
|
|
99
100
|
Radio: true,
|
|
100
101
|
RadioGroup: true,
|
|
101
102
|
Rating: true,
|
|
@@ -144,7 +145,10 @@ var _exportNames = {
|
|
|
144
145
|
useScrollTrigger: true,
|
|
145
146
|
Zoom: true,
|
|
146
147
|
useAutocomplete: true,
|
|
147
|
-
GlobalStyles: true
|
|
148
|
+
GlobalStyles: true,
|
|
149
|
+
unstable_composeClasses: true,
|
|
150
|
+
generateUtilityClass: true,
|
|
151
|
+
generateUtilityClasses: true
|
|
148
152
|
};
|
|
149
153
|
Object.defineProperty(exports, "Accordion", {
|
|
150
154
|
enumerable: true,
|
|
@@ -644,6 +648,12 @@ Object.defineProperty(exports, "Popper", {
|
|
|
644
648
|
return _Popper.default;
|
|
645
649
|
}
|
|
646
650
|
});
|
|
651
|
+
Object.defineProperty(exports, "Portal", {
|
|
652
|
+
enumerable: true,
|
|
653
|
+
get: function () {
|
|
654
|
+
return _Portal.default;
|
|
655
|
+
}
|
|
656
|
+
});
|
|
647
657
|
Object.defineProperty(exports, "Radio", {
|
|
648
658
|
enumerable: true,
|
|
649
659
|
get: function () {
|
|
@@ -921,6 +931,24 @@ Object.defineProperty(exports, "darkScrollbar", {
|
|
|
921
931
|
return _darkScrollbar.default;
|
|
922
932
|
}
|
|
923
933
|
});
|
|
934
|
+
Object.defineProperty(exports, "generateUtilityClass", {
|
|
935
|
+
enumerable: true,
|
|
936
|
+
get: function () {
|
|
937
|
+
return _generateUtilityClass.default;
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
Object.defineProperty(exports, "generateUtilityClasses", {
|
|
941
|
+
enumerable: true,
|
|
942
|
+
get: function () {
|
|
943
|
+
return _generateUtilityClasses.default;
|
|
944
|
+
}
|
|
945
|
+
});
|
|
946
|
+
Object.defineProperty(exports, "unstable_composeClasses", {
|
|
947
|
+
enumerable: true,
|
|
948
|
+
get: function () {
|
|
949
|
+
return _composeClasses.default;
|
|
950
|
+
}
|
|
951
|
+
});
|
|
924
952
|
Object.defineProperty(exports, "useAutocomplete", {
|
|
925
953
|
enumerable: true,
|
|
926
954
|
get: function () {
|
|
@@ -978,20 +1006,6 @@ Object.keys(_utils).forEach(function (key) {
|
|
|
978
1006
|
});
|
|
979
1007
|
});
|
|
980
1008
|
|
|
981
|
-
var _base = require("@mui/base");
|
|
982
|
-
|
|
983
|
-
Object.keys(_base).forEach(function (key) {
|
|
984
|
-
if (key === "default" || key === "__esModule") return;
|
|
985
|
-
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
986
|
-
if (key in exports && exports[key] === _base[key]) return;
|
|
987
|
-
Object.defineProperty(exports, key, {
|
|
988
|
-
enumerable: true,
|
|
989
|
-
get: function () {
|
|
990
|
-
return _base[key];
|
|
991
|
-
}
|
|
992
|
-
});
|
|
993
|
-
});
|
|
994
|
-
|
|
995
1009
|
var _Accordion = _interopRequireWildcard(require("./Accordion"));
|
|
996
1010
|
|
|
997
1011
|
Object.keys(_Accordion).forEach(function (key) {
|
|
@@ -2154,6 +2168,20 @@ Object.keys(_Popper).forEach(function (key) {
|
|
|
2154
2168
|
});
|
|
2155
2169
|
});
|
|
2156
2170
|
|
|
2171
|
+
var _Portal = _interopRequireWildcard(require("./Portal"));
|
|
2172
|
+
|
|
2173
|
+
Object.keys(_Portal).forEach(function (key) {
|
|
2174
|
+
if (key === "default" || key === "__esModule") return;
|
|
2175
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
2176
|
+
if (key in exports && exports[key] === _Portal[key]) return;
|
|
2177
|
+
Object.defineProperty(exports, key, {
|
|
2178
|
+
enumerable: true,
|
|
2179
|
+
get: function () {
|
|
2180
|
+
return _Portal[key];
|
|
2181
|
+
}
|
|
2182
|
+
});
|
|
2183
|
+
});
|
|
2184
|
+
|
|
2157
2185
|
var _Radio = _interopRequireWildcard(require("./Radio"));
|
|
2158
2186
|
|
|
2159
2187
|
Object.keys(_Radio).forEach(function (key) {
|
|
@@ -2828,6 +2856,24 @@ Object.keys(_GlobalStyles).forEach(function (key) {
|
|
|
2828
2856
|
});
|
|
2829
2857
|
});
|
|
2830
2858
|
|
|
2859
|
+
var _composeClasses = _interopRequireDefault(require("@mui/base/composeClasses"));
|
|
2860
|
+
|
|
2861
|
+
var _generateUtilityClass = _interopRequireWildcard(require("@mui/base/generateUtilityClass"));
|
|
2862
|
+
|
|
2863
|
+
Object.keys(_generateUtilityClass).forEach(function (key) {
|
|
2864
|
+
if (key === "default" || key === "__esModule") return;
|
|
2865
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
2866
|
+
if (key in exports && exports[key] === _generateUtilityClass[key]) return;
|
|
2867
|
+
Object.defineProperty(exports, key, {
|
|
2868
|
+
enumerable: true,
|
|
2869
|
+
get: function () {
|
|
2870
|
+
return _generateUtilityClass[key];
|
|
2871
|
+
}
|
|
2872
|
+
});
|
|
2873
|
+
});
|
|
2874
|
+
|
|
2875
|
+
var _generateUtilityClasses = _interopRequireDefault(require("@mui/base/generateUtilityClasses"));
|
|
2876
|
+
|
|
2831
2877
|
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); }
|
|
2832
2878
|
|
|
2833
2879
|
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; }
|
|
@@ -55,9 +55,7 @@ const useUtilityClasses = ownerState => {
|
|
|
55
55
|
return (0, _base.unstable_composeClasses)(slots, _switchBaseClasses.getSwitchBaseUtilityClass, classes);
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
const SwitchBaseRoot = (0, _styled.default)(_ButtonBase.default
|
|
59
|
-
skipSx: true
|
|
60
|
-
})(({
|
|
58
|
+
const SwitchBaseRoot = (0, _styled.default)(_ButtonBase.default)(({
|
|
61
59
|
ownerState
|
|
62
60
|
}) => (0, _extends2.default)({
|
|
63
61
|
padding: 9,
|
|
@@ -67,9 +65,7 @@ const SwitchBaseRoot = (0, _styled.default)(_ButtonBase.default, {
|
|
|
67
65
|
}, ownerState.edge === 'end' && {
|
|
68
66
|
marginRight: ownerState.size === 'small' ? -3 : -12
|
|
69
67
|
}));
|
|
70
|
-
const SwitchBaseInput = (0, _styled.default)('input'
|
|
71
|
-
skipSx: true
|
|
72
|
-
})({
|
|
68
|
+
const SwitchBaseInput = (0, _styled.default)('input')({
|
|
73
69
|
cursor: 'inherit',
|
|
74
70
|
position: 'absolute',
|
|
75
71
|
opacity: 0,
|
package/node/locale/index.js
CHANGED
|
@@ -1842,9 +1842,12 @@ const itIT = {
|
|
|
1842
1842
|
|
|
1843
1843
|
return 'Vai alla pagina precedente';
|
|
1844
1844
|
},
|
|
1845
|
-
labelRowsPerPage: 'Righe per pagina:'
|
|
1846
|
-
|
|
1847
|
-
|
|
1845
|
+
labelRowsPerPage: 'Righe per pagina:',
|
|
1846
|
+
labelDisplayedRows: ({
|
|
1847
|
+
from,
|
|
1848
|
+
to,
|
|
1849
|
+
count
|
|
1850
|
+
}) => `${from}–${to} di ${count !== -1 ? count : `più di ${to}`}`
|
|
1848
1851
|
}
|
|
1849
1852
|
},
|
|
1850
1853
|
MuiRating: {
|
|
@@ -2410,9 +2413,12 @@ const plPL = {
|
|
|
2410
2413
|
|
|
2411
2414
|
return 'Przejdź do poprzedniej strony';
|
|
2412
2415
|
},
|
|
2413
|
-
labelRowsPerPage: 'Wierszy na stronę:'
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
+
labelRowsPerPage: 'Wierszy na stronę:',
|
|
2417
|
+
labelDisplayedRows: ({
|
|
2418
|
+
from,
|
|
2419
|
+
to,
|
|
2420
|
+
count
|
|
2421
|
+
}) => `${from}–${to} z ${count !== -1 ? count : `ponad ${to}`}`
|
|
2416
2422
|
}
|
|
2417
2423
|
},
|
|
2418
2424
|
MuiRating: {
|
|
@@ -10,5 +10,5 @@ var _utils = require("@mui/utils");
|
|
|
10
10
|
function makeStyles() {
|
|
11
11
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: makeStyles is not longer exported from @mui/material/styles.
|
|
12
12
|
You have to import it from @mui/styles.
|
|
13
|
-
See https://mui.com/r/migration-v4/#material-
|
|
13
|
+
See https://mui.com/r/migration-v4/#mui-material-styles for more details.` : (0, _utils.formatMuiErrorMessage)(14));
|
|
14
14
|
}
|
|
@@ -10,5 +10,5 @@ var _utils = require("@mui/utils");
|
|
|
10
10
|
function withStyles() {
|
|
11
11
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: withStyles is not longer exported from @mui/material/styles.
|
|
12
12
|
You have to import it from @mui/styles.
|
|
13
|
-
See https://mui.com/r/migration-v4/#material-
|
|
13
|
+
See https://mui.com/r/migration-v4/#mui-material-styles for more details.` : (0, _utils.formatMuiErrorMessage)(15));
|
|
14
14
|
}
|
package/node/styles/withTheme.js
CHANGED
|
@@ -10,5 +10,5 @@ var _utils = require("@mui/utils");
|
|
|
10
10
|
function withTheme() {
|
|
11
11
|
throw new Error(process.env.NODE_ENV !== "production" ? `MUI: withTheme is not longer exported from @mui/material/styles.
|
|
12
12
|
You have to import it from @mui/styles.
|
|
13
|
-
See https://mui.com/r/migration-v4/#material-
|
|
13
|
+
See https://mui.com/r/migration-v4/#mui-material-styles for more details.` : (0, _utils.formatMuiErrorMessage)(16));
|
|
14
14
|
}
|
|
@@ -17,32 +17,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
17
17
|
|
|
18
18
|
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; }
|
|
19
19
|
|
|
20
|
-
function
|
|
21
|
-
const theme = (0, _system.useThemeWithoutDefault)(); // Wait for jsdom to support the match media feature.
|
|
22
|
-
// All the browsers MUI support have this built-in.
|
|
23
|
-
// This defensive check is here for simplicity.
|
|
24
|
-
// Most of the time, the match media logic isn't central to people tests.
|
|
25
|
-
|
|
20
|
+
function useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {
|
|
26
21
|
const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
|
|
27
|
-
const {
|
|
28
|
-
defaultMatches = false,
|
|
29
|
-
matchMedia = supportMatchMedia ? window.matchMedia : null,
|
|
30
|
-
noSsr = false,
|
|
31
|
-
ssrMatchMedia = null
|
|
32
|
-
} = (0, _system.getThemeProps)({
|
|
33
|
-
name: 'MuiUseMediaQuery',
|
|
34
|
-
props: options,
|
|
35
|
-
theme
|
|
36
|
-
});
|
|
37
|
-
|
|
38
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
39
|
-
if (typeof queryInput === 'function' && theme === null) {
|
|
40
|
-
console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\n'));
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
|
|
45
|
-
query = query.replace(/^@media( ?)/m, '');
|
|
46
22
|
const [match, setMatch] = React.useState(() => {
|
|
47
23
|
if (noSsr && supportMatchMedia) {
|
|
48
24
|
return matchMedia(query).matches;
|
|
@@ -68,19 +44,85 @@ function useMediaQuery(queryInput, options = {}) {
|
|
|
68
44
|
const updateMatch = () => {
|
|
69
45
|
// Workaround Safari wrong implementation of matchMedia
|
|
70
46
|
// TODO can we remove it?
|
|
71
|
-
// https://github.com/mui
|
|
47
|
+
// https://github.com/mui/material-ui/pull/17315#issuecomment-528286677
|
|
72
48
|
if (active) {
|
|
73
49
|
setMatch(queryList.matches);
|
|
74
50
|
}
|
|
75
51
|
};
|
|
76
52
|
|
|
77
|
-
updateMatch();
|
|
53
|
+
updateMatch(); // TODO: Use `addEventListener` once support for Safari < 14 is dropped
|
|
54
|
+
|
|
78
55
|
queryList.addListener(updateMatch);
|
|
79
56
|
return () => {
|
|
80
57
|
active = false;
|
|
81
58
|
queryList.removeListener(updateMatch);
|
|
82
59
|
};
|
|
83
60
|
}, [query, matchMedia, supportMatchMedia]);
|
|
61
|
+
return match;
|
|
62
|
+
} // eslint-disable-next-line no-useless-concat -- Workaround for https://github.com/webpack/webpack/issues/14814
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
const maybeReactUseSyncExternalStore = React['useSyncExternalStore' + ''];
|
|
66
|
+
|
|
67
|
+
function useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia) {
|
|
68
|
+
const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]);
|
|
69
|
+
const getServerSnapshot = React.useMemo(() => {
|
|
70
|
+
if (ssrMatchMedia !== null) {
|
|
71
|
+
const {
|
|
72
|
+
matches
|
|
73
|
+
} = ssrMatchMedia(query);
|
|
74
|
+
return () => matches;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return getDefaultSnapshot;
|
|
78
|
+
}, [getDefaultSnapshot, query, ssrMatchMedia]);
|
|
79
|
+
const [getSnapshot, subscribe] = React.useMemo(() => {
|
|
80
|
+
if (matchMedia === null) {
|
|
81
|
+
return [getDefaultSnapshot, () => () => {}];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const mediaQueryList = matchMedia(query);
|
|
85
|
+
return [() => mediaQueryList.matches, notify => {
|
|
86
|
+
// TODO: Use `addEventListener` once support for Safari < 14 is dropped
|
|
87
|
+
mediaQueryList.addListener(notify);
|
|
88
|
+
return () => {
|
|
89
|
+
mediaQueryList.removeListener(notify);
|
|
90
|
+
};
|
|
91
|
+
}];
|
|
92
|
+
}, [getDefaultSnapshot, matchMedia, query]);
|
|
93
|
+
const match = maybeReactUseSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
94
|
+
return match;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
function useMediaQuery(queryInput, options = {}) {
|
|
98
|
+
const theme = (0, _system.useThemeWithoutDefault)(); // Wait for jsdom to support the match media feature.
|
|
99
|
+
// All the browsers MUI support have this built-in.
|
|
100
|
+
// This defensive check is here for simplicity.
|
|
101
|
+
// Most of the time, the match media logic isn't central to people tests.
|
|
102
|
+
|
|
103
|
+
const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';
|
|
104
|
+
const {
|
|
105
|
+
defaultMatches = false,
|
|
106
|
+
matchMedia = supportMatchMedia ? window.matchMedia : null,
|
|
107
|
+
ssrMatchMedia = null,
|
|
108
|
+
noSsr
|
|
109
|
+
} = (0, _system.getThemeProps)({
|
|
110
|
+
name: 'MuiUseMediaQuery',
|
|
111
|
+
props: options,
|
|
112
|
+
theme
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
116
|
+
if (typeof queryInput === 'function' && theme === null) {
|
|
117
|
+
console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\n'));
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;
|
|
122
|
+
query = query.replace(/^@media( ?)/m, ''); // TODO: Drop `useMediaQueryOld` and use `use-sync-external-store` shim in `useMediaQueryNew` once the package is stable
|
|
123
|
+
|
|
124
|
+
const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;
|
|
125
|
+
const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);
|
|
84
126
|
|
|
85
127
|
if (process.env.NODE_ENV !== 'production') {
|
|
86
128
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.3
|
|
3
|
+
"version": "5.4.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "Quickly build beautiful React apps. MUI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.",
|
|
@@ -14,12 +14,12 @@
|
|
|
14
14
|
],
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/mui
|
|
17
|
+
"url": "https://github.com/mui/material-ui.git",
|
|
18
18
|
"directory": "packages/mui-material"
|
|
19
19
|
},
|
|
20
20
|
"license": "MIT",
|
|
21
21
|
"bugs": {
|
|
22
|
-
"url": "https://github.com/mui
|
|
22
|
+
"url": "https://github.com/mui/material-ui/issues"
|
|
23
23
|
},
|
|
24
24
|
"homepage": "https://mui.com/",
|
|
25
25
|
"funding": {
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@babel/runtime": "^7.
|
|
49
|
-
"@mui/base": "5.0.0-alpha.
|
|
50
|
-
"@mui/system": "^5.3
|
|
51
|
-
"@mui/types": "^7.1.
|
|
52
|
-
"@mui/utils": "^5.
|
|
48
|
+
"@babel/runtime": "^7.17.0",
|
|
49
|
+
"@mui/base": "5.0.0-alpha.69",
|
|
50
|
+
"@mui/system": "^5.4.3",
|
|
51
|
+
"@mui/types": "^7.1.2",
|
|
52
|
+
"@mui/utils": "^5.4.2",
|
|
53
53
|
"@types/react-transition-group": "^4.4.4",
|
|
54
54
|
"clsx": "^1.1.1",
|
|
55
55
|
"csstype": "^3.0.10",
|
|
@@ -10,7 +10,7 @@ export interface ThemeProviderProps<Theme = DefaultTheme> {
|
|
|
10
10
|
* It should preferably be used at **the root of your component tree**.
|
|
11
11
|
* API:
|
|
12
12
|
*
|
|
13
|
-
* - [ThemeProvider API](
|
|
13
|
+
* - [ThemeProvider API](/customization/theming/#themeprovider)
|
|
14
14
|
*/
|
|
15
15
|
export default function ThemeProvider<T = DefaultTheme>(
|
|
16
16
|
props: ThemeProviderProps<T>,
|
package/styles/index.d.ts
CHANGED
package/styles/makeStyles.js
CHANGED
|
@@ -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
|
}
|
package/styles/withStyles.js
CHANGED
|
@@ -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
|
}
|
package/styles/withTheme.js
CHANGED
|
@@ -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
|
}
|