@mui/material 5.11.5 → 5.11.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Accordion/accordionClasses.d.ts +18 -18
- package/AccordionActions/accordionActionsClasses.d.ts +10 -10
- package/AccordionDetails/accordionDetailsClasses.d.ts +8 -8
- package/AccordionSummary/accordionSummaryClasses.d.ts +22 -22
- package/Alert/alertClasses.d.ts +44 -44
- package/AlertTitle/alertTitleClasses.d.ts +8 -8
- package/AppBar/appBarClasses.d.ts +28 -28
- package/Autocomplete/autocompleteClasses.d.ts +54 -54
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/badgeClasses.d.ts +56 -56
- package/BottomNavigation/BottomNavigation.js +0 -0
- package/BottomNavigation/bottomNavigationClasses.d.ts +8 -8
- package/BottomNavigationAction/bottomNavigationActionClasses.d.ts +14 -14
- package/Box/Box.d.ts +3 -2
- package/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- package/Button/Button.js +0 -2
- package/Button/buttonClasses.d.ts +100 -100
- package/ButtonBase/buttonBaseClasses.d.ts +12 -12
- package/ButtonBase/touchRippleClasses.d.ts +20 -20
- package/ButtonGroup/ButtonGroupContext.d.ts +18 -18
- package/ButtonGroup/buttonGroupClasses.d.ts +58 -58
- package/CHANGELOG.md +74 -0
- package/Card/cardClasses.d.ts +8 -8
- package/CardActionArea/cardActionAreaClasses.d.ts +12 -12
- package/CardActions/cardActionsClasses.d.ts +10 -10
- package/CardContent/cardContentClasses.d.ts +8 -8
- package/CardHeader/cardHeaderClasses.d.ts +18 -18
- package/CardMedia/cardMediaClasses.d.ts +12 -12
- package/Checkbox/checkboxClasses.d.ts +18 -18
- package/Chip/chipClasses.d.ts +96 -96
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +2 -2
- package/Collapse/collapseClasses.d.ts +18 -18
- package/Container/containerClasses.d.ts +6 -6
- package/Dialog/DialogContext.d.ts +6 -6
- package/Dialog/dialogClasses.d.ts +36 -36
- package/DialogActions/dialogActionsClasses.d.ts +10 -10
- package/DialogContent/dialogContentClasses.d.ts +10 -10
- package/DialogContentText/dialogContentTextClasses.d.ts +8 -8
- package/DialogTitle/dialogTitleClasses.d.ts +8 -8
- package/Divider/dividerClasses.d.ts +34 -34
- package/Drawer/drawerClasses.d.ts +30 -30
- package/Fab/fabClasses.d.ts +26 -26
- package/FilledInput/filledInputClasses.d.ts +40 -40
- package/FormControl/FormControlContext.d.ts +17 -17
- package/FormControl/formControlClasses.d.ts +14 -14
- package/FormControl/useFormControl.d.ts +2 -2
- package/FormControlLabel/formControlLabelClasses.d.ts +20 -20
- package/FormGroup/formGroupClasses.d.ts +12 -12
- package/FormHelperText/formHelperTextClasses.d.ts +22 -22
- package/FormLabel/formLabelClasses.d.ts +22 -22
- package/Grid/gridClasses.d.ts +48 -48
- package/Icon/iconClasses.d.ts +24 -24
- package/IconButton/iconButtonClasses.d.ts +34 -34
- package/ImageList/imageListClasses.d.ts +16 -16
- package/ImageListItem/imageListItemClasses.d.ts +18 -18
- package/ImageListItemBar/imageListItemBarClasses.d.ts +30 -30
- package/Input/inputClasses.d.ts +34 -34
- package/InputAdornment/inputAdornmentClasses.d.ts +24 -24
- package/InputBase/inputBaseClasses.d.ts +46 -46
- package/InputLabel/inputLabelClasses.d.ts +32 -32
- package/LinearProgress/linearProgressClasses.d.ts +42 -42
- package/Link/getTextDecoration.d.ts +15 -15
- package/Link/linkClasses.d.ts +18 -18
- package/List/listClasses.d.ts +14 -14
- package/ListItem/listItemClasses.d.ts +30 -30
- package/ListItemAvatar/listItemAvatarClasses.d.ts +10 -10
- package/ListItemButton/listItemButtonClasses.d.ts +22 -22
- package/ListItemIcon/listItemIconClasses.d.ts +10 -10
- package/ListItemSecondaryAction/listItemSecondaryActionClasses.d.ts +10 -10
- package/ListItemText/listItemTextClasses.d.ts +18 -18
- package/ListSubheader/listSubheaderClasses.d.ts +18 -18
- package/Menu/menuClasses.d.ts +12 -12
- package/MenuItem/menuItemClasses.d.ts +20 -20
- package/MobileStepper/mobileStepperClasses.d.ts +22 -22
- package/NativeSelect/nativeSelectClasses.d.ts +32 -32
- package/OutlinedInput/outlinedInputClasses.d.ts +36 -36
- package/Pagination/paginationClasses.d.ts +14 -14
- package/PaginationItem/paginationItemClasses.d.ts +42 -42
- package/Paper/paperClasses.d.ts +39 -39
- package/Popover/popoverClasses.d.ts +10 -10
- package/Popper/Popper.d.ts +37 -37
- package/Radio/radioClasses.d.ts +16 -16
- package/RadioGroup/RadioGroupContext.d.ts +11 -11
- package/RadioGroup/useRadioGroup.d.ts +4 -4
- package/Rating/ratingClasses.d.ts +40 -40
- package/ScopedCssBaseline/scopedCssBaselineClasses.d.ts +8 -8
- package/Select/selectClasses.d.ts +30 -30
- package/Skeleton/skeletonClasses.d.ts +26 -26
- package/Slider/Slider.d.ts +215 -35
- package/Slider/Slider.js +7 -7
- package/Slider/SliderValueLabel.d.ts +15 -15
- package/Slider/SliderValueLabel.js +3 -0
- package/Slider/SliderValueLabel.types.d.ts +24 -24
- package/Slider/index.d.ts +2 -0
- package/Slider/index.js +2 -1
- package/Slider/sliderClasses.d.ts +58 -29
- package/Slider/sliderClasses.js +5 -3
- package/Snackbar/snackbarClasses.d.ts +20 -20
- package/SnackbarContent/snackbarContentClasses.d.ts +12 -12
- package/SpeedDial/speedDialClasses.d.ts +22 -22
- package/SpeedDialAction/speedDialActionClasses.d.ts +20 -20
- package/SpeedDialIcon/speedDialIconClasses.d.ts +18 -18
- package/Step/StepContext.d.ts +20 -20
- package/Step/stepClasses.d.ts +16 -16
- package/StepButton/stepButtonClasses.d.ts +14 -14
- package/StepConnector/stepConnectorClasses.d.ts +26 -26
- package/StepContent/stepContentClasses.d.ts +12 -12
- package/StepIcon/stepIconClasses.d.ts +16 -16
- package/StepLabel/stepLabelClasses.d.ts +28 -28
- package/Stepper/StepperContext.d.ts +18 -18
- package/Stepper/stepperClasses.d.ts +14 -14
- package/SvgIcon/svgIconClasses.d.ts +26 -26
- package/SwipeableDrawer/SwipeableDrawer.d.ts +15 -0
- package/SwipeableDrawer/SwipeableDrawer.js +48 -17
- package/Switch/switchClasses.d.ts +32 -32
- package/Tab/tabClasses.d.ts +26 -26
- package/TabScrollButton/tabScrollButtonClasses.d.ts +12 -12
- package/Table/tableClasses.d.ts +10 -10
- package/TableBody/tableBodyClasses.d.ts +8 -8
- package/TableCell/tableCellClasses.d.ts +32 -32
- package/TableContainer/tableContainerClasses.d.ts +8 -8
- package/TableFooter/tableFooterClasses.d.ts +8 -8
- package/TableHead/tableHeadClasses.d.ts +8 -8
- package/TablePagination/tablePaginationClasses.d.ts +28 -28
- package/TableRow/tableRowClasses.d.ts +16 -16
- package/TableSortLabel/tableSortLabelClasses.d.ts +16 -16
- package/Tabs/tabsClasses.d.ts +32 -32
- package/TextField/textFieldClasses.d.ts +8 -8
- package/ToggleButton/toggleButtonClasses.d.ts +24 -24
- package/ToggleButtonGroup/toggleButtonGroupClasses.d.ts +18 -18
- package/Toolbar/toolbarClasses.d.ts +14 -14
- package/Tooltip/tooltipClasses.d.ts +30 -30
- package/Typography/typographyClasses.d.ts +50 -50
- package/Unstable_Grid2/Grid2.d.ts +4 -4
- package/Unstable_Grid2/Grid2Props.d.ts +15 -15
- package/Unstable_Grid2/grid2Classes.d.ts +5 -5
- package/Unstable_Grid2/index.d.ts +4 -4
- package/className/index.d.ts +1 -1
- package/darkScrollbar/index.d.ts +28 -28
- package/generateUtilityClass/index.d.ts +2 -2
- package/generateUtilityClasses/index.d.ts +1 -1
- package/index.js +1 -1
- package/internal/switchBaseClasses.d.ts +12 -12
- package/legacy/BottomNavigation/BottomNavigation.js +0 -0
- package/legacy/Button/Button.js +0 -2
- package/legacy/Slider/Slider.js +7 -7
- package/legacy/Slider/SliderValueLabel.js +3 -0
- package/legacy/Slider/index.js +2 -1
- package/legacy/Slider/sliderClasses.js +5 -3
- package/legacy/SwipeableDrawer/SwipeableDrawer.js +50 -17
- package/legacy/index.js +1 -1
- package/locale/index.d.ts +75 -75
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Button/Button.js +0 -2
- package/modern/Slider/Slider.js +7 -7
- package/modern/Slider/SliderValueLabel.js +3 -0
- package/modern/Slider/index.js +2 -1
- package/modern/Slider/sliderClasses.js +5 -3
- package/modern/SwipeableDrawer/SwipeableDrawer.js +47 -17
- package/modern/index.js +1 -1
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Button/Button.js +0 -2
- package/node/Slider/Slider.js +6 -6
- package/node/Slider/SliderValueLabel.js +3 -0
- package/node/Slider/index.js +12 -2
- package/node/Slider/sliderClasses.js +6 -3
- package/node/SwipeableDrawer/SwipeableDrawer.js +48 -17
- package/node/index.js +1 -1
- package/package.json +3 -3
- package/styles/CssVarsProvider.d.ts +16 -16
- package/styles/excludeVariablesFromRoot.d.ts +5 -5
- package/styles/getOverlayAlpha.d.ts +2 -2
- package/transitions/index.d.ts +1 -1
- package/transitions/transition.d.ts +13 -13
- package/transitions/utils.d.ts +23 -23
- package/types/OverridableComponentAugmentation.d.ts +31 -31
- package/umd/material-ui.development.js +63 -33
- package/umd/material-ui.production.min.js +20 -20
- package/useMediaQuery/useMediaQuery.d.ts +31 -31
- package/useTouchRipple/index.d.ts +1 -1
- package/useTouchRipple/useTouchRipple.d.ts +28 -28
- package/utils/getScrollbarSize.d.ts +2 -2
- package/utils/ownerDocument.d.ts +2 -2
- package/utils/ownerWindow.d.ts +2 -2
- package/utils/setRef.d.ts +2 -2
|
@@ -25,7 +25,7 @@ var _utils2 = require("../transitions/utils");
|
|
|
25
25
|
var _SwipeArea = _interopRequireDefault(require("./SwipeArea"));
|
|
26
26
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
27
|
const _excluded = ["BackdropProps"],
|
|
28
|
-
_excluded2 = ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"];
|
|
28
|
+
_excluded2 = ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "allowSwipeInChildren", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"];
|
|
29
29
|
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); }
|
|
30
30
|
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; }
|
|
31
31
|
// This value is closed to what browsers are using internally to
|
|
@@ -141,6 +141,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
141
141
|
disableSwipeToOpen = iOS,
|
|
142
142
|
hideBackdrop,
|
|
143
143
|
hysteresis = 0.52,
|
|
144
|
+
allowSwipeInChildren = false,
|
|
144
145
|
minFlingVelocity = 450,
|
|
145
146
|
ModalProps: {
|
|
146
147
|
BackdropProps
|
|
@@ -260,6 +261,30 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
260
261
|
});
|
|
261
262
|
}
|
|
262
263
|
});
|
|
264
|
+
const startMaybeSwiping = (force = false) => {
|
|
265
|
+
if (!maybeSwiping) {
|
|
266
|
+
// on Safari Mobile, if you want to be able to have the 'click' event fired on child elements, nothing in the DOM can be changed.
|
|
267
|
+
// this is because Safari Mobile will not fire any mouse events (still fires touch though) if the DOM changes during mousemove.
|
|
268
|
+
// so do this change on first touchmove instead of touchstart
|
|
269
|
+
if (force || !(disableDiscovery && allowSwipeInChildren)) {
|
|
270
|
+
(0, _reactDom.flushSync)(() => {
|
|
271
|
+
setMaybeSwiping(true);
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
const horizontalSwipe = (0, _Drawer.isHorizontal)(anchor);
|
|
275
|
+
if (!open && paperRef.current) {
|
|
276
|
+
// The ref may be null when a parent component updates while swiping.
|
|
277
|
+
setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 15 : -DRAG_STARTED_SIGNAL), {
|
|
278
|
+
changeTransition: false
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
swipeInstance.current.velocity = 0;
|
|
282
|
+
swipeInstance.current.lastTime = null;
|
|
283
|
+
swipeInstance.current.lastTranslate = null;
|
|
284
|
+
swipeInstance.current.paperHit = false;
|
|
285
|
+
touchDetected.current = true;
|
|
286
|
+
}
|
|
287
|
+
};
|
|
263
288
|
const handleBodyTouchMove = (0, _useEventCallback.default)(nativeEvent => {
|
|
264
289
|
// the ref may be null when a parent component updates while swiping
|
|
265
290
|
if (!paperRef.current || !touchDetected.current) {
|
|
@@ -270,6 +295,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
270
295
|
if (claimedSwipeInstance !== null && claimedSwipeInstance !== swipeInstance.current) {
|
|
271
296
|
return;
|
|
272
297
|
}
|
|
298
|
+
startMaybeSwiping(true);
|
|
273
299
|
const anchorRtl = (0, _Drawer.getAnchor)(theme, anchor);
|
|
274
300
|
const horizontalSwipe = (0, _Drawer.isHorizontal)(anchor);
|
|
275
301
|
const currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, (0, _ownerDocument.default)(nativeEvent.currentTarget));
|
|
@@ -380,7 +406,12 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
380
406
|
const currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, (0, _ownerDocument.default)(nativeEvent.currentTarget));
|
|
381
407
|
const currentY = calculateCurrentY(anchorRtl, nativeEvent.touches, (0, _ownerWindow.default)(nativeEvent.currentTarget));
|
|
382
408
|
if (!open) {
|
|
383
|
-
|
|
409
|
+
var _paperRef$current;
|
|
410
|
+
// logic for if swipe should be ignored:
|
|
411
|
+
// if disableSwipeToOpen
|
|
412
|
+
// if target != swipeArea, and target is not a child of paper ref
|
|
413
|
+
// if is a child of paper ref, and `allowSwipeInChildren` does not allow it
|
|
414
|
+
if (disableSwipeToOpen || !(nativeEvent.target === swipeAreaRef.current || (_paperRef$current = paperRef.current) != null && _paperRef$current.contains(nativeEvent.target) && (typeof allowSwipeInChildren === 'function' ? allowSwipeInChildren(nativeEvent, swipeAreaRef.current, paperRef.current) : allowSwipeInChildren))) {
|
|
384
415
|
return;
|
|
385
416
|
}
|
|
386
417
|
if (horizontalSwipe) {
|
|
@@ -395,20 +426,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
395
426
|
claimedSwipeInstance = null;
|
|
396
427
|
swipeInstance.current.startX = currentX;
|
|
397
428
|
swipeInstance.current.startY = currentY;
|
|
398
|
-
(
|
|
399
|
-
setMaybeSwiping(true);
|
|
400
|
-
});
|
|
401
|
-
if (!open && paperRef.current) {
|
|
402
|
-
// The ref may be null when a parent component updates while swiping.
|
|
403
|
-
setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 15 : -DRAG_STARTED_SIGNAL), {
|
|
404
|
-
changeTransition: false
|
|
405
|
-
});
|
|
406
|
-
}
|
|
407
|
-
swipeInstance.current.velocity = 0;
|
|
408
|
-
swipeInstance.current.lastTime = null;
|
|
409
|
-
swipeInstance.current.lastTranslate = null;
|
|
410
|
-
swipeInstance.current.paperHit = false;
|
|
411
|
-
touchDetected.current = true;
|
|
429
|
+
startMaybeSwiping();
|
|
412
430
|
});
|
|
413
431
|
React.useEffect(() => {
|
|
414
432
|
if (variant === 'temporary') {
|
|
@@ -456,7 +474,7 @@ const SwipeableDrawer = /*#__PURE__*/React.forwardRef(function SwipeableDrawer(i
|
|
|
456
474
|
hideBackdrop: hideBackdrop,
|
|
457
475
|
PaperProps: (0, _extends2.default)({}, PaperProps, {
|
|
458
476
|
style: (0, _extends2.default)({
|
|
459
|
-
pointerEvents: variant === 'temporary' && !open ? 'none' : ''
|
|
477
|
+
pointerEvents: variant === 'temporary' && !open && !allowSwipeInChildren ? 'none' : ''
|
|
460
478
|
}, PaperProps.style),
|
|
461
479
|
ref: handleRef
|
|
462
480
|
}),
|
|
@@ -478,6 +496,19 @@ process.env.NODE_ENV !== "production" ? SwipeableDrawer.propTypes /* remove-prop
|
|
|
478
496
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
479
497
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
480
498
|
// ----------------------------------------------------------------------
|
|
499
|
+
/**
|
|
500
|
+
* If set to true, the swipe event will open the drawer even if the user begins the swipe on one of the drawer's children.
|
|
501
|
+
* This can be useful in scenarios where the drawer is partially visible.
|
|
502
|
+
* You can customize it further with a callback that determines which children the user can drag over to open the drawer
|
|
503
|
+
* (for example, to ignore other elements that handle touch move events, like sliders).
|
|
504
|
+
*
|
|
505
|
+
* @param {TouchEvent} event The 'touchstart' event
|
|
506
|
+
* @param {HTMLDivElement} swipeArea The swipe area element
|
|
507
|
+
* @param {HTMLDivElement} paper The drawer's paper element
|
|
508
|
+
*
|
|
509
|
+
* @default false
|
|
510
|
+
*/
|
|
511
|
+
allowSwipeInChildren: _propTypes.default.oneOfType([_propTypes.default.bool, _propTypes.default.func]),
|
|
481
512
|
/**
|
|
482
513
|
* @ignore
|
|
483
514
|
*/
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/material",
|
|
3
|
-
"version": "5.11.
|
|
3
|
+
"version": "5.11.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"description": "React components that implement Google's Material Design.",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
48
|
"@babel/runtime": "^7.20.7",
|
|
49
|
-
"@mui/base": "5.0.0-alpha.
|
|
50
|
-
"@mui/core-downloads-tracker": "^5.11.
|
|
49
|
+
"@mui/base": "5.0.0-alpha.115",
|
|
50
|
+
"@mui/core-downloads-tracker": "^5.11.6",
|
|
51
51
|
"@mui/system": "^5.11.5",
|
|
52
52
|
"@mui/types": "^7.2.3",
|
|
53
53
|
"@mui/utils": "^5.11.2",
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SupportedColorScheme } from './experimental_extendTheme';
|
|
3
|
-
declare const shouldSkipGeneratingVar: (keys: string[]) => boolean;
|
|
4
|
-
declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
|
|
5
|
-
theme?: {
|
|
6
|
-
cssVarPrefix?: string | undefined;
|
|
7
|
-
colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
|
|
8
|
-
} | undefined;
|
|
9
|
-
documentNode?: Document | null | undefined;
|
|
10
|
-
colorSchemeNode?: Element | null | undefined;
|
|
11
|
-
colorSchemeSelector?: string | undefined;
|
|
12
|
-
storageWindow?: Window | null | undefined;
|
|
13
|
-
disableNestedContext?: boolean | undefined;
|
|
14
|
-
disableStyleSheetGeneration?: boolean | undefined;
|
|
15
|
-
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
|
|
16
|
-
export { useColorScheme, getInitColorSchemeScript, shouldSkipGeneratingVar, CssVarsProvider as Experimental_CssVarsProvider, };
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SupportedColorScheme } from './experimental_extendTheme';
|
|
3
|
+
declare const shouldSkipGeneratingVar: (keys: string[]) => boolean;
|
|
4
|
+
declare const CssVarsProvider: (props: import("react").PropsWithChildren<Partial<import("@mui/system").CssVarsProviderConfig<SupportedColorScheme>> & {
|
|
5
|
+
theme?: {
|
|
6
|
+
cssVarPrefix?: string | undefined;
|
|
7
|
+
colorSchemes: Record<SupportedColorScheme, Record<string, any>>;
|
|
8
|
+
} | undefined;
|
|
9
|
+
documentNode?: Document | null | undefined;
|
|
10
|
+
colorSchemeNode?: Element | null | undefined;
|
|
11
|
+
colorSchemeSelector?: string | undefined;
|
|
12
|
+
storageWindow?: Window | null | undefined;
|
|
13
|
+
disableNestedContext?: boolean | undefined;
|
|
14
|
+
disableStyleSheetGeneration?: boolean | undefined;
|
|
15
|
+
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>, useColorScheme: () => import("@mui/system").ColorSchemeContextValue<SupportedColorScheme>, getInitColorSchemeScript: typeof import("@mui/system").getInitColorSchemeScript;
|
|
16
|
+
export { useColorScheme, getInitColorSchemeScript, shouldSkipGeneratingVar, CssVarsProvider as Experimental_CssVarsProvider, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @internal These variables should not appear in the :root stylesheet when the `defaultMode="dark"`
|
|
3
|
-
*/
|
|
4
|
-
declare const excludeVariablesFromRoot: (cssVarPrefix: string) => string[];
|
|
5
|
-
export default excludeVariablesFromRoot;
|
|
1
|
+
/**
|
|
2
|
+
* @internal These variables should not appear in the :root stylesheet when the `defaultMode="dark"`
|
|
3
|
+
*/
|
|
4
|
+
declare const excludeVariablesFromRoot: (cssVarPrefix: string) => string[];
|
|
5
|
+
export default excludeVariablesFromRoot;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getOverlayAlpha: (elevation: number) => string;
|
|
2
|
-
export default getOverlayAlpha;
|
|
1
|
+
declare const getOverlayAlpha: (elevation: number) => string;
|
|
2
|
+
export default getOverlayAlpha;
|
package/transitions/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './transition';
|
|
1
|
+
export * from './transition';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
export type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
|
|
4
|
-
export type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
|
|
5
|
-
export interface EasingProps {
|
|
6
|
-
easing: string | {
|
|
7
|
-
enter?: string;
|
|
8
|
-
exit?: string;
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
|
|
12
|
-
export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
|
|
13
|
-
}
|
|
1
|
+
import { TransitionProps as _TransitionProps, TransitionActions } from 'react-transition-group/Transition';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type TransitionHandlerKeys = 'onEnter' | 'onEntering' | 'onEntered' | 'onExit' | 'onExiting' | 'onExited';
|
|
4
|
+
export type TransitionHandlerProps = Pick<_TransitionProps, TransitionHandlerKeys>;
|
|
5
|
+
export interface EasingProps {
|
|
6
|
+
easing: string | {
|
|
7
|
+
enter?: string;
|
|
8
|
+
exit?: string;
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
export type TransitionKeys = 'in' | 'mountOnEnter' | 'unmountOnExit' | 'timeout' | 'easing' | 'addEndListener' | TransitionHandlerKeys;
|
|
12
|
+
export interface TransitionProps extends TransitionActions, Partial<Pick<_TransitionProps & EasingProps, TransitionKeys>>, React.HTMLAttributes<HTMLElement> {
|
|
13
|
+
}
|
package/transitions/utils.d.ts
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export declare const reflow: (node: Element) => number;
|
|
3
|
-
interface ComponentProps {
|
|
4
|
-
easing: string | {
|
|
5
|
-
enter?: string;
|
|
6
|
-
exit?: string;
|
|
7
|
-
} | undefined;
|
|
8
|
-
style: React.CSSProperties | undefined;
|
|
9
|
-
timeout: number | {
|
|
10
|
-
enter?: number;
|
|
11
|
-
exit?: number;
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
interface Options {
|
|
15
|
-
mode: 'enter' | 'exit';
|
|
16
|
-
}
|
|
17
|
-
interface TransitionProps {
|
|
18
|
-
duration: string | number;
|
|
19
|
-
easing: string | undefined;
|
|
20
|
-
delay: string | undefined;
|
|
21
|
-
}
|
|
22
|
-
export declare function getTransitionProps(props: ComponentProps, options: Options): TransitionProps;
|
|
23
|
-
export {};
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const reflow: (node: Element) => number;
|
|
3
|
+
interface ComponentProps {
|
|
4
|
+
easing: string | {
|
|
5
|
+
enter?: string;
|
|
6
|
+
exit?: string;
|
|
7
|
+
} | undefined;
|
|
8
|
+
style: React.CSSProperties | undefined;
|
|
9
|
+
timeout: number | {
|
|
10
|
+
enter?: number;
|
|
11
|
+
exit?: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
interface Options {
|
|
15
|
+
mode: 'enter' | 'exit';
|
|
16
|
+
}
|
|
17
|
+
interface TransitionProps {
|
|
18
|
+
duration: string | number;
|
|
19
|
+
easing: string | undefined;
|
|
20
|
+
delay: string | undefined;
|
|
21
|
+
}
|
|
22
|
+
export declare function getTransitionProps(props: ComponentProps, options: Options): TransitionProps;
|
|
23
|
+
export {};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { DistributiveOmit } from '@mui/types';
|
|
3
|
-
declare module '@mui/material/OverridableComponent' {
|
|
4
|
-
/**
|
|
5
|
-
* A component whose root component can be controlled via a `component` prop.
|
|
6
|
-
*
|
|
7
|
-
* Adjusts valid props based on the type of `component`.
|
|
8
|
-
*/
|
|
9
|
-
interface OverridableComponent<M extends OverridableTypeMap> {
|
|
10
|
-
<C extends React.ElementType>(props: {
|
|
11
|
-
/**
|
|
12
|
-
* The component used for the root node.
|
|
13
|
-
* Either a string to use a HTML element or a component.
|
|
14
|
-
*/
|
|
15
|
-
component: C;
|
|
16
|
-
} & OverridePropsVer2<M, C>): JSX.Element;
|
|
17
|
-
(props: DefaultComponentPropsVer2<M>): JSX.Element;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Props of the component if `component={Component}` is used.
|
|
21
|
-
*/
|
|
22
|
-
type OverridePropsVer2<M extends OverridableTypeMap, C extends React.ElementType> = (BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<C>, keyof BaseProps<M>> & {
|
|
23
|
-
ref?: React.Ref<Element>;
|
|
24
|
-
});
|
|
25
|
-
/**
|
|
26
|
-
* Props if `component={Component}` is NOT used.
|
|
27
|
-
*/
|
|
28
|
-
type DefaultComponentPropsVer2<M extends OverridableTypeMap> = BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<M['defaultComponent']>, keyof BaseProps<M>> & {
|
|
29
|
-
ref?: React.Ref<Element>;
|
|
30
|
-
};
|
|
31
|
-
}
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DistributiveOmit } from '@mui/types';
|
|
3
|
+
declare module '@mui/material/OverridableComponent' {
|
|
4
|
+
/**
|
|
5
|
+
* A component whose root component can be controlled via a `component` prop.
|
|
6
|
+
*
|
|
7
|
+
* Adjusts valid props based on the type of `component`.
|
|
8
|
+
*/
|
|
9
|
+
interface OverridableComponent<M extends OverridableTypeMap> {
|
|
10
|
+
<C extends React.ElementType>(props: {
|
|
11
|
+
/**
|
|
12
|
+
* The component used for the root node.
|
|
13
|
+
* Either a string to use a HTML element or a component.
|
|
14
|
+
*/
|
|
15
|
+
component: C;
|
|
16
|
+
} & OverridePropsVer2<M, C>): JSX.Element;
|
|
17
|
+
(props: DefaultComponentPropsVer2<M>): JSX.Element;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Props of the component if `component={Component}` is used.
|
|
21
|
+
*/
|
|
22
|
+
type OverridePropsVer2<M extends OverridableTypeMap, C extends React.ElementType> = (BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<C>, keyof BaseProps<M>> & {
|
|
23
|
+
ref?: React.Ref<Element>;
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Props if `component={Component}` is NOT used.
|
|
27
|
+
*/
|
|
28
|
+
type DefaultComponentPropsVer2<M extends OverridableTypeMap> = BaseProps<M> & DistributiveOmit<React.ComponentPropsWithoutRef<M['defaultComponent']>, keyof BaseProps<M>> & {
|
|
29
|
+
ref?: React.Ref<Element>;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/material v5.11.
|
|
2
|
+
* @mui/material v5.11.6
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -15086,12 +15086,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
15086
15086
|
NoSsr['propTypes' + ''] = exactProp(NoSsr.propTypes);
|
|
15087
15087
|
}
|
|
15088
15088
|
|
|
15089
|
-
function getSliderUtilityClass(slot) {
|
|
15090
|
-
return generateUtilityClass('MuiSlider', slot);
|
|
15091
|
-
}
|
|
15092
|
-
const sliderUnstyledClasses = generateUtilityClasses('MuiSlider', ['root', 'active', 'focusVisible', 'disabled', 'dragging', 'marked', 'vertical', 'trackInverted', 'trackFalse', 'rail', 'track', 'mark', 'markActive', 'markLabel', 'markLabelActive', 'thumb', 'valueLabel', 'valueLabelOpen', 'valueLabelCircle', 'valueLabelLabel']);
|
|
15093
|
-
var sliderUnstyledClasses$1 = sliderUnstyledClasses;
|
|
15094
|
-
|
|
15095
15089
|
const INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;
|
|
15096
15090
|
function asc(a, b) {
|
|
15097
15091
|
return a - b;
|
|
@@ -24516,8 +24510,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
24516
24510
|
color: (theme.vars || theme).palette.action.disabled
|
|
24517
24511
|
}, ownerState.variant === 'outlined' && {
|
|
24518
24512
|
border: `1px solid ${(theme.vars || theme).palette.action.disabledBackground}`
|
|
24519
|
-
}, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {
|
|
24520
|
-
border: `1px solid ${(theme.vars || theme).palette.action.disabled}`
|
|
24521
24513
|
}, ownerState.variant === 'contained' && {
|
|
24522
24514
|
color: (theme.vars || theme).palette.action.disabled,
|
|
24523
24515
|
boxShadow: (theme.vars || theme).shadows[0],
|
|
@@ -39728,7 +39720,10 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
39728
39720
|
} ;
|
|
39729
39721
|
var Skeleton$1 = Skeleton;
|
|
39730
39722
|
|
|
39731
|
-
|
|
39723
|
+
function getSliderUtilityClass(slot) {
|
|
39724
|
+
return generateUtilityClass('MuiSlider', slot);
|
|
39725
|
+
}
|
|
39726
|
+
const sliderClasses = generateUtilityClasses('MuiSlider', ['root', 'active', 'colorPrimary', 'colorSecondary', 'disabled', 'dragging', 'focusVisible', 'mark', 'markActive', 'marked', 'markLabel', 'markLabelActive', 'rail', 'sizeSmall', 'thumb', 'thumbColorPrimary', 'thumbColorSecondary', 'track', 'trackInverted', 'trackFalse', 'thumbSizeSmall', 'valueLabel', 'valueLabelOpen', 'valueLabelCircle', 'valueLabelLabel', 'vertical']);
|
|
39732
39727
|
var sliderClasses$1 = sliderClasses;
|
|
39733
39728
|
|
|
39734
39729
|
const useValueLabelClasses = props => {
|
|
@@ -39746,13 +39741,16 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
39746
39741
|
/**
|
|
39747
39742
|
* @ignore - internal component.
|
|
39748
39743
|
*/
|
|
39749
|
-
function SliderValueLabel
|
|
39744
|
+
function SliderValueLabel(props) {
|
|
39750
39745
|
const {
|
|
39751
39746
|
children,
|
|
39752
39747
|
className,
|
|
39753
39748
|
value
|
|
39754
39749
|
} = props;
|
|
39755
39750
|
const classes = useValueLabelClasses(props);
|
|
39751
|
+
if (!children) {
|
|
39752
|
+
return null;
|
|
39753
|
+
}
|
|
39756
39754
|
return /*#__PURE__*/React__namespace.cloneElement(children, {
|
|
39757
39755
|
className: clsx(children.props.className)
|
|
39758
39756
|
}, /*#__PURE__*/jsxRuntime_2(React__namespace.Fragment, {
|
|
@@ -39769,7 +39767,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
39769
39767
|
})]
|
|
39770
39768
|
}));
|
|
39771
39769
|
}
|
|
39772
|
-
SliderValueLabel
|
|
39770
|
+
SliderValueLabel.propTypes = {
|
|
39773
39771
|
children: PropTypes.element.isRequired,
|
|
39774
39772
|
className: PropTypes.string,
|
|
39775
39773
|
value: PropTypes.node
|
|
@@ -40016,7 +40014,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
40016
40014
|
*/
|
|
40017
40015
|
children: PropTypes.node
|
|
40018
40016
|
} ;
|
|
40019
|
-
const
|
|
40017
|
+
const StyledSliderValueLabel = styled$1(SliderValueLabel, {
|
|
40020
40018
|
name: 'MuiSlider',
|
|
40021
40019
|
slot: 'ValueLabel',
|
|
40022
40020
|
overridesResolver: (props, styles) => styles.valueLabel
|
|
@@ -40074,7 +40072,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
40074
40072
|
fontSize: theme.typography.pxToRem(12),
|
|
40075
40073
|
padding: '0.25rem 0.5rem'
|
|
40076
40074
|
}));
|
|
40077
|
-
|
|
40075
|
+
StyledSliderValueLabel.propTypes /* remove-proptypes */ = {
|
|
40078
40076
|
// ----------------------------- Warning --------------------------------
|
|
40079
40077
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
40080
40078
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
@@ -40275,7 +40273,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
40275
40273
|
const RailSlot = (_ref2 = (_slots$rail = slots == null ? void 0 : slots.rail) != null ? _slots$rail : components.Rail) != null ? _ref2 : SliderRail;
|
|
40276
40274
|
const TrackSlot = (_ref3 = (_slots$track = slots == null ? void 0 : slots.track) != null ? _slots$track : components.Track) != null ? _ref3 : SliderTrack;
|
|
40277
40275
|
const ThumbSlot = (_ref4 = (_slots$thumb = slots == null ? void 0 : slots.thumb) != null ? _slots$thumb : components.Thumb) != null ? _ref4 : SliderThumb;
|
|
40278
|
-
const ValueLabelSlot = (_ref5 = (_slots$valueLabel = slots == null ? void 0 : slots.valueLabel) != null ? _slots$valueLabel : components.ValueLabel) != null ? _ref5 :
|
|
40276
|
+
const ValueLabelSlot = (_ref5 = (_slots$valueLabel = slots == null ? void 0 : slots.valueLabel) != null ? _slots$valueLabel : components.ValueLabel) != null ? _ref5 : StyledSliderValueLabel;
|
|
40279
40277
|
const MarkSlot = (_ref6 = (_slots$mark = slots == null ? void 0 : slots.mark) != null ? _slots$mark : components.Mark) != null ? _ref6 : SliderMark;
|
|
40280
40278
|
const MarkLabelSlot = (_ref7 = (_slots$markLabel = slots == null ? void 0 : slots.markLabel) != null ? _slots$markLabel : components.MarkLabel) != null ? _ref7 : SliderMarkLabel;
|
|
40281
40279
|
const InputSlot = (_ref8 = (_slots$input = slots == null ? void 0 : slots.input) != null ? _slots$input : components.Input) != null ? _ref8 : 'input';
|
|
@@ -44347,7 +44345,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44347
44345
|
var SwipeArea$1 = SwipeArea;
|
|
44348
44346
|
|
|
44349
44347
|
const _excluded$k = ["BackdropProps"],
|
|
44350
|
-
_excluded2 = ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"];
|
|
44348
|
+
_excluded2 = ["anchor", "disableBackdropTransition", "disableDiscovery", "disableSwipeToOpen", "hideBackdrop", "hysteresis", "allowSwipeInChildren", "minFlingVelocity", "ModalProps", "onClose", "onOpen", "open", "PaperProps", "SwipeAreaProps", "swipeAreaWidth", "transitionDuration", "variant"];
|
|
44351
44349
|
const UNCERTAINTY_THRESHOLD = 3; // px
|
|
44352
44350
|
|
|
44353
44351
|
// This is the part of the drawer displayed on touch start.
|
|
@@ -44452,6 +44450,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44452
44450
|
disableSwipeToOpen = iOS,
|
|
44453
44451
|
hideBackdrop,
|
|
44454
44452
|
hysteresis = 0.52,
|
|
44453
|
+
allowSwipeInChildren = false,
|
|
44455
44454
|
minFlingVelocity = 450,
|
|
44456
44455
|
ModalProps: {
|
|
44457
44456
|
BackdropProps
|
|
@@ -44571,6 +44570,30 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44571
44570
|
});
|
|
44572
44571
|
}
|
|
44573
44572
|
});
|
|
44573
|
+
const startMaybeSwiping = (force = false) => {
|
|
44574
|
+
if (!maybeSwiping) {
|
|
44575
|
+
// on Safari Mobile, if you want to be able to have the 'click' event fired on child elements, nothing in the DOM can be changed.
|
|
44576
|
+
// this is because Safari Mobile will not fire any mouse events (still fires touch though) if the DOM changes during mousemove.
|
|
44577
|
+
// so do this change on first touchmove instead of touchstart
|
|
44578
|
+
if (force || !(disableDiscovery && allowSwipeInChildren)) {
|
|
44579
|
+
ReactDOM.flushSync(() => {
|
|
44580
|
+
setMaybeSwiping(true);
|
|
44581
|
+
});
|
|
44582
|
+
}
|
|
44583
|
+
const horizontalSwipe = isHorizontal(anchor);
|
|
44584
|
+
if (!open && paperRef.current) {
|
|
44585
|
+
// The ref may be null when a parent component updates while swiping.
|
|
44586
|
+
setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 15 : -DRAG_STARTED_SIGNAL), {
|
|
44587
|
+
changeTransition: false
|
|
44588
|
+
});
|
|
44589
|
+
}
|
|
44590
|
+
swipeInstance.current.velocity = 0;
|
|
44591
|
+
swipeInstance.current.lastTime = null;
|
|
44592
|
+
swipeInstance.current.lastTranslate = null;
|
|
44593
|
+
swipeInstance.current.paperHit = false;
|
|
44594
|
+
touchDetected.current = true;
|
|
44595
|
+
}
|
|
44596
|
+
};
|
|
44574
44597
|
const handleBodyTouchMove = useEventCallback(nativeEvent => {
|
|
44575
44598
|
// the ref may be null when a parent component updates while swiping
|
|
44576
44599
|
if (!paperRef.current || !touchDetected.current) {
|
|
@@ -44581,6 +44604,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44581
44604
|
if (claimedSwipeInstance !== null && claimedSwipeInstance !== swipeInstance.current) {
|
|
44582
44605
|
return;
|
|
44583
44606
|
}
|
|
44607
|
+
startMaybeSwiping(true);
|
|
44584
44608
|
const anchorRtl = getAnchor(theme, anchor);
|
|
44585
44609
|
const horizontalSwipe = isHorizontal(anchor);
|
|
44586
44610
|
const currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));
|
|
@@ -44691,7 +44715,12 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44691
44715
|
const currentX = calculateCurrentX(anchorRtl, nativeEvent.touches, ownerDocument(nativeEvent.currentTarget));
|
|
44692
44716
|
const currentY = calculateCurrentY(anchorRtl, nativeEvent.touches, ownerWindow(nativeEvent.currentTarget));
|
|
44693
44717
|
if (!open) {
|
|
44694
|
-
|
|
44718
|
+
var _paperRef$current;
|
|
44719
|
+
// logic for if swipe should be ignored:
|
|
44720
|
+
// if disableSwipeToOpen
|
|
44721
|
+
// if target != swipeArea, and target is not a child of paper ref
|
|
44722
|
+
// if is a child of paper ref, and `allowSwipeInChildren` does not allow it
|
|
44723
|
+
if (disableSwipeToOpen || !(nativeEvent.target === swipeAreaRef.current || (_paperRef$current = paperRef.current) != null && _paperRef$current.contains(nativeEvent.target) && (typeof allowSwipeInChildren === 'function' ? allowSwipeInChildren(nativeEvent, swipeAreaRef.current, paperRef.current) : allowSwipeInChildren))) {
|
|
44695
44724
|
return;
|
|
44696
44725
|
}
|
|
44697
44726
|
if (horizontalSwipe) {
|
|
@@ -44706,20 +44735,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44706
44735
|
claimedSwipeInstance = null;
|
|
44707
44736
|
swipeInstance.current.startX = currentX;
|
|
44708
44737
|
swipeInstance.current.startY = currentY;
|
|
44709
|
-
|
|
44710
|
-
setMaybeSwiping(true);
|
|
44711
|
-
});
|
|
44712
|
-
if (!open && paperRef.current) {
|
|
44713
|
-
// The ref may be null when a parent component updates while swiping.
|
|
44714
|
-
setPosition(getMaxTranslate(horizontalSwipe, paperRef.current) + (disableDiscovery ? 15 : -DRAG_STARTED_SIGNAL), {
|
|
44715
|
-
changeTransition: false
|
|
44716
|
-
});
|
|
44717
|
-
}
|
|
44718
|
-
swipeInstance.current.velocity = 0;
|
|
44719
|
-
swipeInstance.current.lastTime = null;
|
|
44720
|
-
swipeInstance.current.lastTranslate = null;
|
|
44721
|
-
swipeInstance.current.paperHit = false;
|
|
44722
|
-
touchDetected.current = true;
|
|
44738
|
+
startMaybeSwiping();
|
|
44723
44739
|
});
|
|
44724
44740
|
React__namespace.useEffect(() => {
|
|
44725
44741
|
if (variant === 'temporary') {
|
|
@@ -44767,7 +44783,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44767
44783
|
hideBackdrop: hideBackdrop,
|
|
44768
44784
|
PaperProps: _extends({}, PaperProps, {
|
|
44769
44785
|
style: _extends({
|
|
44770
|
-
pointerEvents: variant === 'temporary' && !open ? 'none' : ''
|
|
44786
|
+
pointerEvents: variant === 'temporary' && !open && !allowSwipeInChildren ? 'none' : ''
|
|
44771
44787
|
}, PaperProps.style),
|
|
44772
44788
|
ref: handleRef
|
|
44773
44789
|
}),
|
|
@@ -44789,6 +44805,19 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
44789
44805
|
// | These PropTypes are generated from the TypeScript type definitions |
|
|
44790
44806
|
// | To update them edit the d.ts file and run "yarn proptypes" |
|
|
44791
44807
|
// ----------------------------------------------------------------------
|
|
44808
|
+
/**
|
|
44809
|
+
* If set to true, the swipe event will open the drawer even if the user begins the swipe on one of the drawer's children.
|
|
44810
|
+
* This can be useful in scenarios where the drawer is partially visible.
|
|
44811
|
+
* You can customize it further with a callback that determines which children the user can drag over to open the drawer
|
|
44812
|
+
* (for example, to ignore other elements that handle touch move events, like sliders).
|
|
44813
|
+
*
|
|
44814
|
+
* @param {TouchEvent} event The 'touchstart' event
|
|
44815
|
+
* @param {HTMLDivElement} swipeArea The swipe area element
|
|
44816
|
+
* @param {HTMLDivElement} paper The drawer's paper element
|
|
44817
|
+
*
|
|
44818
|
+
* @default false
|
|
44819
|
+
*/
|
|
44820
|
+
allowSwipeInChildren: PropTypes.oneOfType([PropTypes.bool, PropTypes.func]),
|
|
44792
44821
|
/**
|
|
44793
44822
|
* @ignore
|
|
44794
44823
|
*/
|
|
@@ -48930,7 +48959,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
48930
48959
|
exports.SliderRoot = SliderRoot;
|
|
48931
48960
|
exports.SliderThumb = SliderThumb;
|
|
48932
48961
|
exports.SliderTrack = SliderTrack;
|
|
48933
|
-
exports.SliderValueLabel =
|
|
48962
|
+
exports.SliderValueLabel = StyledSliderValueLabel;
|
|
48934
48963
|
exports.Snackbar = Snackbar$1;
|
|
48935
48964
|
exports.SnackbarContent = SnackbarContent$1;
|
|
48936
48965
|
exports.SpeedDial = SpeedDial$1;
|
|
@@ -49126,6 +49155,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
49126
49155
|
exports.getScopedCssBaselineUtilityClass = getScopedCssBaselineUtilityClass;
|
|
49127
49156
|
exports.getSelectUtilityClasses = getSelectUtilityClasses;
|
|
49128
49157
|
exports.getSkeletonUtilityClass = getSkeletonUtilityClass;
|
|
49158
|
+
exports.getSliderUtilityClass = getSliderUtilityClass;
|
|
49129
49159
|
exports.getSnackbarContentUtilityClass = getSnackbarContentUtilityClass;
|
|
49130
49160
|
exports.getSnackbarUtilityClass = getSnackbarUtilityClass;
|
|
49131
49161
|
exports.getSpeedDialActionUtilityClass = getSpeedDialActionUtilityClass;
|