Files
ETB/ETB-FrontEnd/node_modules/@mui/x-data-grid/components/containers/GridOverlay.js
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

64 lines
2.3 KiB
JavaScript

import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
const _excluded = ["className"];
import * as React from 'react';
import PropTypes from 'prop-types';
import clsx from 'clsx';
import { unstable_composeClasses as composeClasses } from '@mui/material';
import { alpha, styled } from '@mui/material/styles';
import { getDataGridUtilityClass } from '../../constants/gridClasses';
import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
import { jsx as _jsx } from "react/jsx-runtime";
const useUtilityClasses = ownerState => {
const {
classes
} = ownerState;
const slots = {
root: ['overlay']
};
return composeClasses(slots, getDataGridUtilityClass, classes);
};
const GridOverlayRoot = styled('div', {
name: 'MuiDataGrid',
slot: 'Overlay',
overridesResolver: (props, styles) => styles.overlay
})(({
theme
}) => ({
position: 'absolute',
top: 0,
zIndex: 4,
// should be above pinned columns, pinned rows and detail panel
width: '100%',
height: '100%',
pointerEvents: 'none',
display: 'flex',
alignSelf: 'center',
alignItems: 'center',
justifyContent: 'center',
backgroundColor: alpha(theme.palette.background.default, theme.palette.action.disabledOpacity)
}));
const GridOverlay = /*#__PURE__*/React.forwardRef(function GridOverlay(props, ref) {
const {
className
} = props,
other = _objectWithoutPropertiesLoose(props, _excluded);
const rootProps = useGridRootProps();
const classes = useUtilityClasses(rootProps);
return /*#__PURE__*/_jsx(GridOverlayRoot, _extends({
ref: ref,
className: clsx(classes.root, className),
ownerState: rootProps
}, other));
});
process.env.NODE_ENV !== "production" ? GridOverlay.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the TypeScript types and run "yarn proptypes" |
// ----------------------------------------------------------------------
sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
} : void 0;
export { GridOverlay };