worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
16
node_modules/@mui/material/esm/Portal/Portal.d.ts
generated
vendored
Normal file
16
node_modules/@mui/material/esm/Portal/Portal.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import * as React from 'react';
|
||||
import { PortalProps } from "./Portal.types.js";
|
||||
/**
|
||||
* Portals provide a first-class way to render children into a DOM node
|
||||
* that exists outside the DOM hierarchy of the parent component.
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Portal](https://mui.com/material-ui/react-portal/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Portal API](https://mui.com/material-ui/api/portal/)
|
||||
*/
|
||||
declare const Portal: React.ForwardRefExoticComponent<PortalProps & React.RefAttributes<Element>>;
|
||||
export default Portal;
|
||||
91
node_modules/@mui/material/esm/Portal/Portal.js
generated
vendored
Normal file
91
node_modules/@mui/material/esm/Portal/Portal.js
generated
vendored
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
'use client';
|
||||
|
||||
import * as React from 'react';
|
||||
import * as ReactDOM from 'react-dom';
|
||||
import PropTypes from 'prop-types';
|
||||
import useEnhancedEffect from '@mui/utils/useEnhancedEffect';
|
||||
import useForkRef from '@mui/utils/useForkRef';
|
||||
import setRef from '@mui/utils/setRef';
|
||||
import getReactElementRef from '@mui/utils/getReactElementRef';
|
||||
import exactProp from '@mui/utils/exactProp';
|
||||
import HTMLElementType from '@mui/utils/HTMLElementType';
|
||||
function getContainer(container) {
|
||||
return typeof container === 'function' ? container() : container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Portals provide a first-class way to render children into a DOM node
|
||||
* that exists outside the DOM hierarchy of the parent component.
|
||||
*
|
||||
* Demos:
|
||||
*
|
||||
* - [Portal](https://mui.com/material-ui/react-portal/)
|
||||
*
|
||||
* API:
|
||||
*
|
||||
* - [Portal API](https://mui.com/material-ui/api/portal/)
|
||||
*/
|
||||
const Portal = /*#__PURE__*/React.forwardRef(function Portal(props, forwardedRef) {
|
||||
const {
|
||||
children,
|
||||
container,
|
||||
disablePortal = false
|
||||
} = props;
|
||||
const [mountNode, setMountNode] = React.useState(null);
|
||||
const handleRef = useForkRef(/*#__PURE__*/React.isValidElement(children) ? getReactElementRef(children) : null, forwardedRef);
|
||||
useEnhancedEffect(() => {
|
||||
if (!disablePortal) {
|
||||
setMountNode(getContainer(container) || document.body);
|
||||
}
|
||||
}, [container, disablePortal]);
|
||||
useEnhancedEffect(() => {
|
||||
if (mountNode && !disablePortal) {
|
||||
setRef(forwardedRef, mountNode);
|
||||
return () => {
|
||||
setRef(forwardedRef, null);
|
||||
};
|
||||
}
|
||||
return undefined;
|
||||
}, [forwardedRef, mountNode, disablePortal]);
|
||||
if (disablePortal) {
|
||||
if (/*#__PURE__*/React.isValidElement(children)) {
|
||||
const newProps = {
|
||||
ref: handleRef
|
||||
};
|
||||
return /*#__PURE__*/React.cloneElement(children, newProps);
|
||||
}
|
||||
return children;
|
||||
}
|
||||
return mountNode ? /*#__PURE__*/ReactDOM.createPortal(children, mountNode) : mountNode;
|
||||
});
|
||||
process.env.NODE_ENV !== "production" ? Portal.propTypes /* remove-proptypes */ = {
|
||||
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
||||
// │ These PropTypes are generated from the TypeScript type definitions. │
|
||||
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
||||
// └─────────────────────────────────────────────────────────────────────┘
|
||||
/**
|
||||
* The children to render into the `container`.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* An HTML element or function that returns one.
|
||||
* The `container` will have the portal children appended to it.
|
||||
*
|
||||
* You can also provide a callback, which is called in a React layout effect.
|
||||
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
||||
*
|
||||
* By default, it uses the body of the top-level document object,
|
||||
* so it's simply `document.body` most of the time.
|
||||
*/
|
||||
container: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([HTMLElementType, PropTypes.func]),
|
||||
/**
|
||||
* The `children` will be under the DOM hierarchy of the parent component.
|
||||
* @default false
|
||||
*/
|
||||
disablePortal: PropTypes.bool
|
||||
} : void 0;
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
// eslint-disable-next-line
|
||||
Portal['propTypes' + ''] = exactProp(Portal.propTypes);
|
||||
}
|
||||
export default Portal;
|
||||
23
node_modules/@mui/material/esm/Portal/Portal.types.d.ts
generated
vendored
Normal file
23
node_modules/@mui/material/esm/Portal/Portal.types.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import * as React from 'react';
|
||||
export interface PortalProps {
|
||||
/**
|
||||
* The children to render into the `container`.
|
||||
*/
|
||||
children?: React.ReactNode;
|
||||
/**
|
||||
* An HTML element or function that returns one.
|
||||
* The `container` will have the portal children appended to it.
|
||||
*
|
||||
* You can also provide a callback, which is called in a React layout effect.
|
||||
* This lets you set the container from a ref, and also makes server-side rendering possible.
|
||||
*
|
||||
* By default, it uses the body of the top-level document object,
|
||||
* so it's simply `document.body` most of the time.
|
||||
*/
|
||||
container?: Element | (() => Element | null) | null;
|
||||
/**
|
||||
* The `children` will be under the DOM hierarchy of the parent component.
|
||||
* @default false
|
||||
*/
|
||||
disablePortal?: boolean;
|
||||
}
|
||||
1
node_modules/@mui/material/esm/Portal/Portal.types.js
generated
vendored
Normal file
1
node_modules/@mui/material/esm/Portal/Portal.types.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export {};
|
||||
3
node_modules/@mui/material/esm/Portal/index.d.ts
generated
vendored
Normal file
3
node_modules/@mui/material/esm/Portal/index.d.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
export { default } from "./Portal.js";
|
||||
export * from "./Portal.js";
|
||||
export * from "./Portal.types.js";
|
||||
1
node_modules/@mui/material/esm/Portal/index.js
generated
vendored
Normal file
1
node_modules/@mui/material/esm/Portal/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
export { default } from "./Portal.js";
|
||||
Loading…
Add table
Add a link
Reference in a new issue