@mui/material 5.14.4 → 5.14.5
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 +58 -58
- package/Avatar/avatarClasses.d.ts +20 -20
- package/AvatarGroup/avatarGroupClasses.d.ts +10 -10
- package/Backdrop/backdropClasses.d.ts +10 -10
- package/Badge/Badge.d.ts +135 -67
- 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/Breadcrumbs/breadcrumbsClasses.d.ts +14 -14
- 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 -4
- 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 +22 -22
- package/Chip/chipClasses.d.ts +96 -96
- package/CircularProgress/circularProgressClasses.d.ts +26 -26
- package/ClickAwayListener/index.d.ts +1 -1
- 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 +42 -42
- 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 +24 -24
- 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 +38 -38
- 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/Modal/index.d.ts +1 -1
- package/Modal/index.js +1 -1
- package/NativeSelect/nativeSelectClasses.d.ts +34 -34
- package/OutlinedInput/outlinedInputClasses.d.ts +38 -38
- 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 +65 -65
- 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 +32 -32
- package/Skeleton/skeletonClasses.d.ts +26 -26
- package/Slider/SliderValueLabel.d.ts +10 -10
- package/Slider/SliderValueLabel.types.d.ts +24 -24
- package/Slider/sliderClasses.d.ts +58 -58
- 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/Stack/stackClasses.d.ts +6 -6
- 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/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/TextField.js +11 -2
- 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/Modal/index.js +1 -1
- package/legacy/TextField/TextField.js +11 -2
- package/legacy/index.js +1 -1
- package/locale/index.d.ts +80 -80
- package/modern/BottomNavigation/BottomNavigation.js +0 -0
- package/modern/Modal/index.js +1 -1
- package/modern/TextField/TextField.js +11 -2
- package/modern/index.js +1 -1
- package/node/BottomNavigation/BottomNavigation.js +0 -0
- package/node/Modal/index.js +7 -7
- package/node/TextField/TextField.js +11 -2
- package/node/index.js +1 -1
- package/package.json +5 -5
- package/styles/CssVarsProvider.d.ts +20 -20
- package/styles/excludeVariablesFromRoot.d.ts +5 -5
- package/styles/getOverlayAlpha.d.ts +2 -2
- package/styles/identifier.d.ts +2 -2
- package/styles/shouldSkipGeneratingVar.d.ts +1 -1
- 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 +217 -127
- package/umd/material-ui.production.min.js +18 -18
- package/useMediaQuery/useMediaQuery.d.ts +46 -46
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @mui/material v5.14.
|
|
2
|
+
* @mui/material v5.14.5
|
|
3
3
|
*
|
|
4
4
|
* @license MIT
|
|
5
5
|
* This source code is licensed under the MIT license found in the
|
|
@@ -2531,6 +2531,8 @@
|
|
|
2531
2531
|
const ClassNameGenerator = createClassNameGenerator();
|
|
2532
2532
|
var ClassNameGenerator$1 = ClassNameGenerator;
|
|
2533
2533
|
|
|
2534
|
+
// If GlobalStateSlot is changed, GLOBAL_STATE_CLASSES in
|
|
2535
|
+
// \packages\api-docs-builder\utils\parseSlotsAndClasses.ts must be updated accordingly.
|
|
2534
2536
|
const globalStateClassesMapping = {
|
|
2535
2537
|
active: 'active',
|
|
2536
2538
|
checked: 'checked',
|
|
@@ -18445,23 +18447,6 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
18445
18447
|
}
|
|
18446
18448
|
}
|
|
18447
18449
|
|
|
18448
|
-
function getModalUtilityClass(slot) {
|
|
18449
|
-
return generateUtilityClass('MuiModal', slot);
|
|
18450
|
-
}
|
|
18451
|
-
const modalClasses$1 = generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);
|
|
18452
|
-
|
|
18453
|
-
const _excluded$1T = ["children", "closeAfterTransition", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "manager", "onBackdropClick", "onClose", "onKeyDown", "open", "onTransitionEnter", "onTransitionExited", "slotProps", "slots"];
|
|
18454
|
-
const useUtilityClasses$1A = ownerState => {
|
|
18455
|
-
const {
|
|
18456
|
-
open,
|
|
18457
|
-
exited
|
|
18458
|
-
} = ownerState;
|
|
18459
|
-
const slots = {
|
|
18460
|
-
root: ['root', !open && exited && 'hidden'],
|
|
18461
|
-
backdrop: ['backdrop']
|
|
18462
|
-
};
|
|
18463
|
-
return composeClasses(slots, useClassNamesOverride(getModalUtilityClass));
|
|
18464
|
-
};
|
|
18465
18450
|
function getContainer(container) {
|
|
18466
18451
|
return typeof container === 'function' ? container() : container;
|
|
18467
18452
|
}
|
|
@@ -18472,68 +18457,47 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
18472
18457
|
// A modal manager used to track and manage the state of open Modals.
|
|
18473
18458
|
// Modals don't open on the server so this won't conflict with concurrent requests.
|
|
18474
18459
|
const defaultManager = new ModalManager();
|
|
18475
|
-
|
|
18476
18460
|
/**
|
|
18477
|
-
* Modal is a lower-level construct that is leveraged by the following components:
|
|
18478
|
-
*
|
|
18479
|
-
* * [Dialog](https://mui.com/material-ui/api/dialog/)
|
|
18480
|
-
* * [Drawer](https://mui.com/material-ui/api/drawer/)
|
|
18481
|
-
* * [Menu](https://mui.com/material-ui/api/menu/)
|
|
18482
|
-
* * [Popover](https://mui.com/material-ui/api/popover/)
|
|
18483
|
-
*
|
|
18484
|
-
* If you are creating a modal dialog, you probably want to use the [Dialog](https://mui.com/material-ui/api/dialog/) component
|
|
18485
|
-
* rather than directly using Modal.
|
|
18486
|
-
*
|
|
18487
|
-
* This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).
|
|
18488
18461
|
*
|
|
18489
18462
|
* Demos:
|
|
18490
18463
|
*
|
|
18491
|
-
* - [Modal](https://mui.com/base-ui/react-modal
|
|
18464
|
+
* - [Modal](https://mui.com/base-ui/react-modal/#hook)
|
|
18492
18465
|
*
|
|
18493
18466
|
* API:
|
|
18494
18467
|
*
|
|
18495
|
-
* - [
|
|
18468
|
+
* - [useModal API](https://mui.com/base-ui/react-modal/hooks-api/#use-modal)
|
|
18496
18469
|
*/
|
|
18497
|
-
|
|
18498
|
-
var _props$ariaHidden, _slots$root;
|
|
18470
|
+
function useModal(parameters) {
|
|
18499
18471
|
const {
|
|
18500
|
-
|
|
18501
|
-
|
|
18502
|
-
|
|
18503
|
-
|
|
18504
|
-
|
|
18505
|
-
|
|
18506
|
-
|
|
18507
|
-
|
|
18508
|
-
|
|
18509
|
-
|
|
18510
|
-
|
|
18511
|
-
|
|
18512
|
-
|
|
18513
|
-
|
|
18514
|
-
|
|
18515
|
-
onKeyDown,
|
|
18516
|
-
open,
|
|
18517
|
-
onTransitionEnter,
|
|
18518
|
-
onTransitionExited,
|
|
18519
|
-
slotProps = {},
|
|
18520
|
-
slots = {}
|
|
18521
|
-
} = props,
|
|
18522
|
-
other = _objectWithoutPropertiesLoose(props, _excluded$1T);
|
|
18523
|
-
// TODO: `modal`` must change its type in this file to match the type of methods
|
|
18524
|
-
// provided by `ModalManager`
|
|
18525
|
-
const manager = managerProp;
|
|
18526
|
-
const [exited, setExited] = React__namespace.useState(!open);
|
|
18472
|
+
container,
|
|
18473
|
+
disableEscapeKeyDown = false,
|
|
18474
|
+
disableScrollLock = false,
|
|
18475
|
+
// @ts-ignore internal logic - Base UI supports the manager as a prop too
|
|
18476
|
+
manager = defaultManager,
|
|
18477
|
+
closeAfterTransition = false,
|
|
18478
|
+
onTransitionEnter,
|
|
18479
|
+
onTransitionExited,
|
|
18480
|
+
children,
|
|
18481
|
+
onClose,
|
|
18482
|
+
open,
|
|
18483
|
+
rootRef
|
|
18484
|
+
} = parameters;
|
|
18485
|
+
|
|
18486
|
+
// @ts-ignore internal logic
|
|
18527
18487
|
const modal = React__namespace.useRef({});
|
|
18528
18488
|
const mountNodeRef = React__namespace.useRef(null);
|
|
18529
18489
|
const modalRef = React__namespace.useRef(null);
|
|
18530
|
-
const handleRef = useForkRef(modalRef,
|
|
18490
|
+
const handleRef = useForkRef(modalRef, rootRef);
|
|
18491
|
+
const [exited, setExited] = React__namespace.useState(!open);
|
|
18531
18492
|
const hasTransition = getHasTransition(children);
|
|
18532
|
-
|
|
18493
|
+
let ariaHiddenProp = true;
|
|
18494
|
+
if (parameters['aria-hidden'] === 'false' || parameters['aria-hidden'] === false) {
|
|
18495
|
+
ariaHiddenProp = false;
|
|
18496
|
+
}
|
|
18533
18497
|
const getDoc = () => ownerDocument(mountNodeRef.current);
|
|
18534
18498
|
const getModal = () => {
|
|
18535
18499
|
modal.current.modalRef = modalRef.current;
|
|
18536
|
-
modal.current.
|
|
18500
|
+
modal.current.mount = mountNodeRef.current;
|
|
18537
18501
|
return modal.current;
|
|
18538
18502
|
};
|
|
18539
18503
|
const handleMounted = () => {
|
|
@@ -18558,18 +18522,18 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
18558
18522
|
const isTopModal = React__namespace.useCallback(() => manager.isTopModal(getModal()), [manager]);
|
|
18559
18523
|
const handlePortalRef = useEventCallback(node => {
|
|
18560
18524
|
mountNodeRef.current = node;
|
|
18561
|
-
if (!node
|
|
18525
|
+
if (!node) {
|
|
18562
18526
|
return;
|
|
18563
18527
|
}
|
|
18564
18528
|
if (open && isTopModal()) {
|
|
18565
18529
|
handleMounted();
|
|
18566
|
-
} else {
|
|
18530
|
+
} else if (modalRef.current) {
|
|
18567
18531
|
ariaHidden(modalRef.current, ariaHiddenProp);
|
|
18568
18532
|
}
|
|
18569
18533
|
});
|
|
18570
18534
|
const handleClose = React__namespace.useCallback(() => {
|
|
18571
18535
|
manager.remove(getModal(), ariaHiddenProp);
|
|
18572
|
-
}, [
|
|
18536
|
+
}, [ariaHiddenProp, manager]);
|
|
18573
18537
|
React__namespace.useEffect(() => {
|
|
18574
18538
|
return () => {
|
|
18575
18539
|
handleClose();
|
|
@@ -18582,49 +18546,9 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
18582
18546
|
handleClose();
|
|
18583
18547
|
}
|
|
18584
18548
|
}, [open, handleClose, hasTransition, closeAfterTransition, handleOpen]);
|
|
18585
|
-
const
|
|
18586
|
-
|
|
18587
|
-
|
|
18588
|
-
disableEnforceFocus,
|
|
18589
|
-
disableEscapeKeyDown,
|
|
18590
|
-
disablePortal,
|
|
18591
|
-
disableRestoreFocus,
|
|
18592
|
-
disableScrollLock,
|
|
18593
|
-
exited,
|
|
18594
|
-
hideBackdrop,
|
|
18595
|
-
keepMounted
|
|
18596
|
-
});
|
|
18597
|
-
const classes = useUtilityClasses$1A(ownerState);
|
|
18598
|
-
const handleEnter = () => {
|
|
18599
|
-
setExited(false);
|
|
18600
|
-
if (onTransitionEnter) {
|
|
18601
|
-
onTransitionEnter();
|
|
18602
|
-
}
|
|
18603
|
-
};
|
|
18604
|
-
const handleExited = () => {
|
|
18605
|
-
setExited(true);
|
|
18606
|
-
if (onTransitionExited) {
|
|
18607
|
-
onTransitionExited();
|
|
18608
|
-
}
|
|
18609
|
-
if (closeAfterTransition) {
|
|
18610
|
-
handleClose();
|
|
18611
|
-
}
|
|
18612
|
-
};
|
|
18613
|
-
const handleBackdropClick = event => {
|
|
18614
|
-
if (event.target !== event.currentTarget) {
|
|
18615
|
-
return;
|
|
18616
|
-
}
|
|
18617
|
-
if (onBackdropClick) {
|
|
18618
|
-
onBackdropClick(event);
|
|
18619
|
-
}
|
|
18620
|
-
if (onClose) {
|
|
18621
|
-
onClose(event, 'backdropClick');
|
|
18622
|
-
}
|
|
18623
|
-
};
|
|
18624
|
-
const handleKeyDown = event => {
|
|
18625
|
-
if (onKeyDown) {
|
|
18626
|
-
onKeyDown(event);
|
|
18627
|
-
}
|
|
18549
|
+
const createHandleKeyDown = otherHandlers => event => {
|
|
18550
|
+
var _otherHandlers$onKeyD;
|
|
18551
|
+
(_otherHandlers$onKeyD = otherHandlers.onKeyDown) == null ? void 0 : _otherHandlers$onKeyD.call(otherHandlers, event);
|
|
18628
18552
|
|
|
18629
18553
|
// The handler doesn't take event.defaultPrevented into account:
|
|
18630
18554
|
//
|
|
@@ -18643,6 +18567,158 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
18643
18567
|
}
|
|
18644
18568
|
}
|
|
18645
18569
|
};
|
|
18570
|
+
const createHandleBackdropClick = otherHandlers => event => {
|
|
18571
|
+
var _otherHandlers$onClic;
|
|
18572
|
+
(_otherHandlers$onClic = otherHandlers.onClick) == null ? void 0 : _otherHandlers$onClic.call(otherHandlers, event);
|
|
18573
|
+
if (event.target !== event.currentTarget) {
|
|
18574
|
+
return;
|
|
18575
|
+
}
|
|
18576
|
+
if (onClose) {
|
|
18577
|
+
onClose(event, 'backdropClick');
|
|
18578
|
+
}
|
|
18579
|
+
};
|
|
18580
|
+
const getRootProps = (otherHandlers = {}) => {
|
|
18581
|
+
const propsEventHandlers = extractEventHandlers(parameters);
|
|
18582
|
+
|
|
18583
|
+
// The custom event handlers shouldn't be spread on the root element
|
|
18584
|
+
delete propsEventHandlers.onTransitionEnter;
|
|
18585
|
+
delete propsEventHandlers.onTransitionExited;
|
|
18586
|
+
const externalEventHandlers = _extends({}, propsEventHandlers, otherHandlers);
|
|
18587
|
+
return _extends({
|
|
18588
|
+
role: 'presentation'
|
|
18589
|
+
}, externalEventHandlers, {
|
|
18590
|
+
onKeyDown: createHandleKeyDown(externalEventHandlers),
|
|
18591
|
+
ref: handleRef
|
|
18592
|
+
});
|
|
18593
|
+
};
|
|
18594
|
+
const getBackdropProps = (otherHandlers = {}) => {
|
|
18595
|
+
const externalEventHandlers = otherHandlers;
|
|
18596
|
+
return _extends({
|
|
18597
|
+
'aria-hidden': true
|
|
18598
|
+
}, externalEventHandlers, {
|
|
18599
|
+
onClick: createHandleBackdropClick(externalEventHandlers),
|
|
18600
|
+
open
|
|
18601
|
+
});
|
|
18602
|
+
};
|
|
18603
|
+
const getTransitionProps = () => {
|
|
18604
|
+
const handleEnter = () => {
|
|
18605
|
+
setExited(false);
|
|
18606
|
+
if (onTransitionEnter) {
|
|
18607
|
+
onTransitionEnter();
|
|
18608
|
+
}
|
|
18609
|
+
};
|
|
18610
|
+
const handleExited = () => {
|
|
18611
|
+
setExited(true);
|
|
18612
|
+
if (onTransitionExited) {
|
|
18613
|
+
onTransitionExited();
|
|
18614
|
+
}
|
|
18615
|
+
if (closeAfterTransition) {
|
|
18616
|
+
handleClose();
|
|
18617
|
+
}
|
|
18618
|
+
};
|
|
18619
|
+
return {
|
|
18620
|
+
onEnter: createChainedFunction(handleEnter, children.props.onEnter),
|
|
18621
|
+
onExited: createChainedFunction(handleExited, children.props.onExited)
|
|
18622
|
+
};
|
|
18623
|
+
};
|
|
18624
|
+
return {
|
|
18625
|
+
getRootProps,
|
|
18626
|
+
getBackdropProps,
|
|
18627
|
+
getTransitionProps,
|
|
18628
|
+
rootRef: handleRef,
|
|
18629
|
+
portalRef: handlePortalRef,
|
|
18630
|
+
isTopModal,
|
|
18631
|
+
exited,
|
|
18632
|
+
hasTransition
|
|
18633
|
+
};
|
|
18634
|
+
}
|
|
18635
|
+
|
|
18636
|
+
function getModalUtilityClass(slot) {
|
|
18637
|
+
return generateUtilityClass('MuiModal', slot);
|
|
18638
|
+
}
|
|
18639
|
+
const modalClasses$1 = generateUtilityClasses('MuiModal', ['root', 'hidden', 'backdrop']);
|
|
18640
|
+
|
|
18641
|
+
const _excluded$1T = ["children", "closeAfterTransition", "container", "disableAutoFocus", "disableEnforceFocus", "disableEscapeKeyDown", "disablePortal", "disableRestoreFocus", "disableScrollLock", "hideBackdrop", "keepMounted", "onBackdropClick", "onClose", "onKeyDown", "open", "onTransitionEnter", "onTransitionExited", "slotProps", "slots"];
|
|
18642
|
+
const useUtilityClasses$1A = ownerState => {
|
|
18643
|
+
const {
|
|
18644
|
+
open,
|
|
18645
|
+
exited
|
|
18646
|
+
} = ownerState;
|
|
18647
|
+
const slots = {
|
|
18648
|
+
root: ['root', !open && exited && 'hidden'],
|
|
18649
|
+
backdrop: ['backdrop']
|
|
18650
|
+
};
|
|
18651
|
+
return composeClasses(slots, useClassNamesOverride(getModalUtilityClass));
|
|
18652
|
+
};
|
|
18653
|
+
|
|
18654
|
+
/**
|
|
18655
|
+
* Modal is a lower-level construct that is leveraged by the following components:
|
|
18656
|
+
*
|
|
18657
|
+
* * [Dialog](https://mui.com/material-ui/api/dialog/)
|
|
18658
|
+
* * [Drawer](https://mui.com/material-ui/api/drawer/)
|
|
18659
|
+
* * [Menu](https://mui.com/material-ui/api/menu/)
|
|
18660
|
+
* * [Popover](https://mui.com/material-ui/api/popover/)
|
|
18661
|
+
*
|
|
18662
|
+
* If you are creating a modal dialog, you probably want to use the [Dialog](https://mui.com/material-ui/api/dialog/) component
|
|
18663
|
+
* rather than directly using Modal.
|
|
18664
|
+
*
|
|
18665
|
+
* This component shares many concepts with [react-overlays](https://react-bootstrap.github.io/react-overlays/#modals).
|
|
18666
|
+
*
|
|
18667
|
+
* Demos:
|
|
18668
|
+
*
|
|
18669
|
+
* - [Modal](https://mui.com/base-ui/react-modal/)
|
|
18670
|
+
*
|
|
18671
|
+
* API:
|
|
18672
|
+
*
|
|
18673
|
+
* - [Modal API](https://mui.com/base-ui/react-modal/components-api/#modal)
|
|
18674
|
+
*/
|
|
18675
|
+
const Modal$2 = /*#__PURE__*/React__namespace.forwardRef(function Modal(props, forwardedRef) {
|
|
18676
|
+
var _slots$root;
|
|
18677
|
+
const {
|
|
18678
|
+
children,
|
|
18679
|
+
closeAfterTransition = false,
|
|
18680
|
+
container,
|
|
18681
|
+
disableAutoFocus = false,
|
|
18682
|
+
disableEnforceFocus = false,
|
|
18683
|
+
disableEscapeKeyDown = false,
|
|
18684
|
+
disablePortal = false,
|
|
18685
|
+
disableRestoreFocus = false,
|
|
18686
|
+
disableScrollLock = false,
|
|
18687
|
+
hideBackdrop = false,
|
|
18688
|
+
keepMounted = false,
|
|
18689
|
+
onBackdropClick,
|
|
18690
|
+
open,
|
|
18691
|
+
slotProps = {},
|
|
18692
|
+
slots = {}
|
|
18693
|
+
} = props,
|
|
18694
|
+
other = _objectWithoutPropertiesLoose(props, _excluded$1T);
|
|
18695
|
+
const propsWithDefaults = _extends({}, props, {
|
|
18696
|
+
closeAfterTransition,
|
|
18697
|
+
disableAutoFocus,
|
|
18698
|
+
disableEnforceFocus,
|
|
18699
|
+
disableEscapeKeyDown,
|
|
18700
|
+
disablePortal,
|
|
18701
|
+
disableRestoreFocus,
|
|
18702
|
+
disableScrollLock,
|
|
18703
|
+
hideBackdrop,
|
|
18704
|
+
keepMounted
|
|
18705
|
+
});
|
|
18706
|
+
const {
|
|
18707
|
+
getRootProps,
|
|
18708
|
+
getBackdropProps,
|
|
18709
|
+
getTransitionProps,
|
|
18710
|
+
portalRef,
|
|
18711
|
+
isTopModal,
|
|
18712
|
+
exited,
|
|
18713
|
+
hasTransition
|
|
18714
|
+
} = useModal(_extends({}, propsWithDefaults, {
|
|
18715
|
+
rootRef: forwardedRef
|
|
18716
|
+
}));
|
|
18717
|
+
const ownerState = _extends({}, propsWithDefaults, {
|
|
18718
|
+
exited,
|
|
18719
|
+
hasTransition
|
|
18720
|
+
});
|
|
18721
|
+
const classes = useUtilityClasses$1A(ownerState);
|
|
18646
18722
|
const childProps = {};
|
|
18647
18723
|
if (children.props.tabIndex === undefined) {
|
|
18648
18724
|
childProps.tabIndex = '-1';
|
|
@@ -18650,19 +18726,19 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
18650
18726
|
|
|
18651
18727
|
// It's a Transition like component
|
|
18652
18728
|
if (hasTransition) {
|
|
18653
|
-
|
|
18654
|
-
|
|
18729
|
+
const {
|
|
18730
|
+
onEnter,
|
|
18731
|
+
onExited
|
|
18732
|
+
} = getTransitionProps();
|
|
18733
|
+
childProps.onEnter = onEnter;
|
|
18734
|
+
childProps.onExited = onExited;
|
|
18655
18735
|
}
|
|
18656
18736
|
const Root = (_slots$root = slots.root) != null ? _slots$root : 'div';
|
|
18657
18737
|
const rootProps = useSlotProps({
|
|
18658
18738
|
elementType: Root,
|
|
18659
18739
|
externalSlotProps: slotProps.root,
|
|
18660
18740
|
externalForwardedProps: other,
|
|
18661
|
-
|
|
18662
|
-
ref: handleRef,
|
|
18663
|
-
role: 'presentation',
|
|
18664
|
-
onKeyDown: handleKeyDown
|
|
18665
|
-
},
|
|
18741
|
+
getSlotProps: getRootProps,
|
|
18666
18742
|
className: classes.root,
|
|
18667
18743
|
ownerState
|
|
18668
18744
|
});
|
|
@@ -18670,10 +18746,17 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
18670
18746
|
const backdropProps = useSlotProps({
|
|
18671
18747
|
elementType: BackdropComponent,
|
|
18672
18748
|
externalSlotProps: slotProps.backdrop,
|
|
18673
|
-
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18749
|
+
getSlotProps: otherHandlers => {
|
|
18750
|
+
return getBackdropProps(_extends({}, otherHandlers, {
|
|
18751
|
+
onClick: e => {
|
|
18752
|
+
if (onBackdropClick) {
|
|
18753
|
+
onBackdropClick(e);
|
|
18754
|
+
}
|
|
18755
|
+
if (otherHandlers != null && otherHandlers.onClick) {
|
|
18756
|
+
otherHandlers.onClick(e);
|
|
18757
|
+
}
|
|
18758
|
+
}
|
|
18759
|
+
}));
|
|
18677
18760
|
},
|
|
18678
18761
|
className: classes.backdrop,
|
|
18679
18762
|
ownerState
|
|
@@ -18681,10 +18764,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
18681
18764
|
if (!keepMounted && !open && (!hasTransition || exited)) {
|
|
18682
18765
|
return null;
|
|
18683
18766
|
}
|
|
18684
|
-
return /*#__PURE__*/jsxRuntime_1(Portal
|
|
18685
|
-
|
|
18686
|
-
, {
|
|
18687
|
-
ref: handlePortalRef,
|
|
18767
|
+
return /*#__PURE__*/jsxRuntime_1(Portal, {
|
|
18768
|
+
ref: portalRef,
|
|
18688
18769
|
container: container,
|
|
18689
18770
|
disablePortal: disablePortal,
|
|
18690
18771
|
children: /*#__PURE__*/jsxRuntime_2(Root, _extends({}, rootProps, {
|
|
@@ -49160,6 +49241,14 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
49160
49241
|
}
|
|
49161
49242
|
InputMore['aria-describedby'] = undefined;
|
|
49162
49243
|
}
|
|
49244
|
+
const handleClick = event => {
|
|
49245
|
+
if (!disabled && onClick) {
|
|
49246
|
+
// The `onClick` is registered both on the root and the input elements.
|
|
49247
|
+
// Without stopping the propagation, the event could be triggered twice.
|
|
49248
|
+
event.stopPropagation();
|
|
49249
|
+
onClick(event);
|
|
49250
|
+
}
|
|
49251
|
+
};
|
|
49163
49252
|
const id = useId(idOverride);
|
|
49164
49253
|
const helperTextId = helperText && id ? `${id}-helper-text` : undefined;
|
|
49165
49254
|
const inputLabelId = label && id ? `${id}-label` : undefined;
|
|
@@ -49182,7 +49271,7 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
49182
49271
|
onBlur: onBlur,
|
|
49183
49272
|
onChange: onChange,
|
|
49184
49273
|
onFocus: onFocus,
|
|
49185
|
-
onClick:
|
|
49274
|
+
onClick: handleClick,
|
|
49186
49275
|
placeholder: placeholder,
|
|
49187
49276
|
inputProps: inputProps
|
|
49188
49277
|
}, InputMore, InputProps));
|
|
@@ -49195,7 +49284,8 @@ See https://mui.com/r/migration-v4/#mui-material-styles for more details.` );
|
|
|
49195
49284
|
required: required,
|
|
49196
49285
|
color: color,
|
|
49197
49286
|
variant: variant,
|
|
49198
|
-
ownerState: ownerState
|
|
49287
|
+
ownerState: ownerState,
|
|
49288
|
+
onClick: handleClick
|
|
49199
49289
|
}, other, {
|
|
49200
49290
|
children: [label != null && label !== '' && /*#__PURE__*/jsxRuntime_1(InputLabel$1, _extends({
|
|
49201
49291
|
htmlFor: id,
|