0.2.0 - Mid migration

This commit is contained in:
Daniel Mason 2022-04-25 14:47:15 +12:00
parent 139e6a915e
commit 7e38fdbd7d
42393 changed files with 5358157 additions and 62 deletions

View file

@ -0,0 +1,44 @@
import * as React from 'react';
import { Omit, StandardProps } from '..';
import { FadeProps } from '../Fade';
import { TransitionProps } from '../transitions/transition';
export interface BackdropProps
extends StandardProps<
React.HTMLAttributes<HTMLDivElement> & Partial<Omit<FadeProps, 'children'>>,
BackdropClassKey
> {
/**
* The content of the component.
*/
children?: React.ReactNode;
/**
* If `true`, the backdrop is invisible.
* It can be used when rendering a popover or a custom select component.
*/
invisible?: boolean;
/**
* If `true`, the backdrop is open.
*/
open: boolean;
/**
* The duration for the transition, in milliseconds.
* You may specify a single timeout for all transitions, or individually with an object.
*/
transitionDuration?: TransitionProps['timeout'];
}
export type BackdropClassKey = 'root' | 'invisible';
/**
*
* Demos:
*
* - [Backdrop](https://material-ui.com/components/backdrop/)
*
* API:
*
* - [Backdrop API](https://material-ui.com/api/backdrop/)
* - inherits [Fade API](https://material-ui.com/api/fade/)
*/
export default function Backdrop(props: BackdropProps): JSX.Element;

117
web/node_modules/@material-ui/core/Backdrop/Backdrop.js generated vendored Normal file
View file

@ -0,0 +1,117 @@
"use strict";
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = exports.styles = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
var React = _interopRequireWildcard(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _clsx = _interopRequireDefault(require("clsx"));
var _withStyles = _interopRequireDefault(require("../styles/withStyles"));
var _Fade = _interopRequireDefault(require("../Fade"));
var styles = {
/* Styles applied to the root element. */
root: {
// Improve scrollable dialog support.
zIndex: -1,
position: 'fixed',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
right: 0,
bottom: 0,
top: 0,
left: 0,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
WebkitTapHighlightColor: 'transparent'
},
/* Styles applied to the root element if `invisible={true}`. */
invisible: {
backgroundColor: 'transparent'
}
};
exports.styles = styles;
var Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(props, ref) {
var children = props.children,
classes = props.classes,
className = props.className,
_props$invisible = props.invisible,
invisible = _props$invisible === void 0 ? false : _props$invisible,
open = props.open,
transitionDuration = props.transitionDuration,
_props$TransitionComp = props.TransitionComponent,
TransitionComponent = _props$TransitionComp === void 0 ? _Fade.default : _props$TransitionComp,
other = (0, _objectWithoutProperties2.default)(props, ["children", "classes", "className", "invisible", "open", "transitionDuration", "TransitionComponent"]);
return /*#__PURE__*/React.createElement(TransitionComponent, (0, _extends2.default)({
in: open,
timeout: transitionDuration
}, other), /*#__PURE__*/React.createElement("div", {
className: (0, _clsx.default)(classes.root, className, invisible && classes.invisible),
"aria-hidden": true,
ref: ref
}, children));
});
process.env.NODE_ENV !== "production" ? Backdrop.propTypes = {
// ----------------------------- Warning --------------------------------
// | These PropTypes are generated from the TypeScript type definitions |
// | To update them edit the d.ts file and run "yarn proptypes" |
// ----------------------------------------------------------------------
/**
* The content of the component.
*/
children: _propTypes.default.node,
/**
* Override or extend the styles applied to the component.
* See [CSS API](#css) below for more details.
*/
classes: _propTypes.default.object,
/**
* @ignore
*/
className: _propTypes.default.string,
/**
* If `true`, the backdrop is invisible.
* It can be used when rendering a popover or a custom select component.
*/
invisible: _propTypes.default.bool,
/**
* If `true`, the backdrop is open.
*/
open: _propTypes.default.bool.isRequired,
/**
* The duration for the transition, in milliseconds.
* You may specify a single timeout for all transitions, or individually with an object.
*/
transitionDuration: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
appear: _propTypes.default.number,
enter: _propTypes.default.number,
exit: _propTypes.default.number
})])
} : void 0;
var _default = (0, _withStyles.default)(styles, {
name: 'MuiBackdrop'
})(Backdrop);
exports.default = _default;

View file

@ -0,0 +1,2 @@
export { default } from './Backdrop';
export * from './Backdrop';

15
web/node_modules/@material-ui/core/Backdrop/index.js generated vendored Normal file
View file

@ -0,0 +1,15 @@
"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "default", {
enumerable: true,
get: function get() {
return _Backdrop.default;
}
});
var _Backdrop = _interopRequireDefault(require("./Backdrop"));

View file

@ -0,0 +1,5 @@
{
"sideEffects": false,
"module": "../esm/Backdrop/index.js",
"typings": "./index.d.ts"
}