Completely updated React, fixed #11, (hopefully)
This commit is contained in:
284
goTorrentWebUI/node_modules/material-ui/Dialog/Dialog.js
generated
vendored
284
goTorrentWebUI/node_modules/material-ui/Dialog/Dialog.js
generated
vendored
@@ -17,12 +17,14 @@ var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProp
|
||||
|
||||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
||||
|
||||
var _ref;
|
||||
|
||||
var _react = require('react');
|
||||
|
||||
var _react2 = _interopRequireDefault(_react);
|
||||
|
||||
var _propTypes = require('prop-types');
|
||||
|
||||
var _propTypes2 = _interopRequireDefault(_propTypes);
|
||||
|
||||
var _classnames = require('classnames');
|
||||
|
||||
var _classnames2 = _interopRequireDefault(_classnames);
|
||||
@@ -33,7 +35,7 @@ var _withStyles2 = _interopRequireDefault(_withStyles);
|
||||
|
||||
var _helpers = require('../utils/helpers');
|
||||
|
||||
var _Modal = require('../internal/Modal');
|
||||
var _Modal = require('../Modal');
|
||||
|
||||
var _Modal2 = _interopRequireDefault(_Modal);
|
||||
|
||||
@@ -49,14 +51,6 @@ var _Paper2 = _interopRequireDefault(_Paper);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var babelPluginFlowReactPropTypes_proptype_Node = require('react').babelPluginFlowReactPropTypes_proptype_Node || require('prop-types').any;
|
||||
|
||||
var babelPluginFlowReactPropTypes_proptype_ComponentType = require('prop-types').func;
|
||||
|
||||
var babelPluginFlowReactPropTypes_proptype_TransitionCallback = require('../internal/transition').babelPluginFlowReactPropTypes_proptype_TransitionCallback || require('prop-types').any;
|
||||
|
||||
var babelPluginFlowReactPropTypes_proptype_TransitionDuration = require('../internal/transition').babelPluginFlowReactPropTypes_proptype_TransitionDuration || require('prop-types').any;
|
||||
|
||||
var styles = exports.styles = function styles(theme) {
|
||||
return {
|
||||
root: {
|
||||
@@ -76,7 +70,7 @@ var styles = exports.styles = function styles(theme) {
|
||||
}
|
||||
},
|
||||
paperWidthXs: {
|
||||
maxWidth: theme.breakpoints.values.xs
|
||||
maxWidth: Math.max(theme.breakpoints.values.xs, 360)
|
||||
},
|
||||
paperWidthSm: {
|
||||
maxWidth: theme.breakpoints.values.sm
|
||||
@@ -98,118 +92,11 @@ var styles = exports.styles = function styles(theme) {
|
||||
};
|
||||
};
|
||||
|
||||
var babelPluginFlowReactPropTypes_proptype_Props = {
|
||||
/**
|
||||
* Dialog children, usually the included sub-components.
|
||||
*/
|
||||
children: typeof babelPluginFlowReactPropTypes_proptype_Node === 'function' ? babelPluginFlowReactPropTypes_proptype_Node : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_Node),
|
||||
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: require('prop-types').object,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: require('prop-types').string,
|
||||
|
||||
/**
|
||||
* If `true`, it will be full-screen
|
||||
*/
|
||||
fullScreen: require('prop-types').bool,
|
||||
|
||||
/**
|
||||
* If `true`, clicking the backdrop will not fire the `onRequestClose` callback.
|
||||
*/
|
||||
ignoreBackdropClick: require('prop-types').bool,
|
||||
|
||||
/**
|
||||
* If `true`, hitting escape will not fire the `onRequestClose` callback.
|
||||
*/
|
||||
ignoreEscapeKeyUp: require('prop-types').bool,
|
||||
|
||||
/**
|
||||
* The duration for the transition, in milliseconds.
|
||||
* You may specify a single timeout for all transitions, or individually with an object.
|
||||
*/
|
||||
transitionDuration: typeof babelPluginFlowReactPropTypes_proptype_TransitionDuration === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionDuration : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionDuration),
|
||||
|
||||
/**
|
||||
* Determine the max width of the dialog.
|
||||
* The dialog width grows with the size of the screen, this property is useful
|
||||
* on the desktop where you might need some coherent different width size across your
|
||||
* application.
|
||||
*/
|
||||
maxWidth: require('prop-types').oneOf(['xs', 'sm', 'md']),
|
||||
|
||||
/**
|
||||
* If specified, stretches dialog to max width.
|
||||
*/
|
||||
fullWidth: require('prop-types').bool,
|
||||
|
||||
/**
|
||||
* Callback fired when the backdrop is clicked.
|
||||
*/
|
||||
onBackdropClick: require('prop-types').func,
|
||||
|
||||
/**
|
||||
* Callback fired before the dialog enters.
|
||||
*/
|
||||
onEnter: typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback),
|
||||
|
||||
/**
|
||||
* Callback fired when the dialog is entering.
|
||||
*/
|
||||
onEntering: typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback),
|
||||
|
||||
/**
|
||||
* Callback fired when the dialog has entered.
|
||||
*/
|
||||
onEntered: typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback),
|
||||
|
||||
/**
|
||||
* Callback fires when the escape key is released and the modal is in focus.
|
||||
*/
|
||||
onEscapeKeyUp: require('prop-types').func,
|
||||
|
||||
/**
|
||||
* Callback fired before the dialog exits.
|
||||
*/
|
||||
onExit: typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback),
|
||||
|
||||
/**
|
||||
* Callback fired when the dialog is exiting.
|
||||
*/
|
||||
onExiting: typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback),
|
||||
|
||||
/**
|
||||
* Callback fired when the dialog has exited.
|
||||
*/
|
||||
onExited: typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback),
|
||||
|
||||
/**
|
||||
* Callback fired when the component requests to be closed.
|
||||
*
|
||||
* @param {object} event The event source of the callback
|
||||
*/
|
||||
onRequestClose: require('prop-types').func,
|
||||
|
||||
/**
|
||||
* If `true`, the Dialog is open.
|
||||
*/
|
||||
open: require('prop-types').bool,
|
||||
|
||||
/**
|
||||
* Transition component.
|
||||
*/
|
||||
transition: typeof babelPluginFlowReactPropTypes_proptype_ComponentType === 'function' ? babelPluginFlowReactPropTypes_proptype_ComponentType : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_ComponentType)
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Dialogs are overlaid modal paper based components with a backdrop.
|
||||
*/
|
||||
// @inheritedComponent Modal
|
||||
|
||||
function Dialog(props) {
|
||||
var _classNames;
|
||||
|
||||
@@ -217,36 +104,40 @@ function Dialog(props) {
|
||||
classes = props.classes,
|
||||
className = props.className,
|
||||
fullScreen = props.fullScreen,
|
||||
ignoreBackdropClick = props.ignoreBackdropClick,
|
||||
ignoreEscapeKeyUp = props.ignoreEscapeKeyUp,
|
||||
transitionDuration = props.transitionDuration,
|
||||
maxWidth = props.maxWidth,
|
||||
fullWidth = props.fullWidth,
|
||||
open = props.open,
|
||||
disableBackdropClick = props.disableBackdropClick,
|
||||
disableEscapeKeyDown = props.disableEscapeKeyDown,
|
||||
maxWidth = props.maxWidth,
|
||||
onBackdropClick = props.onBackdropClick,
|
||||
onEscapeKeyUp = props.onEscapeKeyUp,
|
||||
onClose = props.onClose,
|
||||
onEnter = props.onEnter,
|
||||
onEntering = props.onEntering,
|
||||
onEntered = props.onEntered,
|
||||
onEntering = props.onEntering,
|
||||
onEscapeKeyDown = props.onEscapeKeyDown,
|
||||
onExit = props.onExit,
|
||||
onExiting = props.onExiting,
|
||||
onExited = props.onExited,
|
||||
onRequestClose = props.onRequestClose,
|
||||
onExiting = props.onExiting,
|
||||
open = props.open,
|
||||
PaperProps = props.PaperProps,
|
||||
TransitionProp = props.transition,
|
||||
other = (0, _objectWithoutProperties3.default)(props, ['children', 'classes', 'className', 'fullScreen', 'ignoreBackdropClick', 'ignoreEscapeKeyUp', 'transitionDuration', 'maxWidth', 'fullWidth', 'open', 'onBackdropClick', 'onEscapeKeyUp', 'onEnter', 'onEntering', 'onEntered', 'onExit', 'onExiting', 'onExited', 'onRequestClose', 'transition']);
|
||||
transitionDuration = props.transitionDuration,
|
||||
other = (0, _objectWithoutProperties3.default)(props, ['children', 'classes', 'className', 'fullScreen', 'fullWidth', 'disableBackdropClick', 'disableEscapeKeyDown', 'maxWidth', 'onBackdropClick', 'onClose', 'onEnter', 'onEntered', 'onEntering', 'onEscapeKeyDown', 'onExit', 'onExited', 'onExiting', 'open', 'PaperProps', 'transition', 'transitionDuration']);
|
||||
|
||||
|
||||
return _react2.default.createElement(
|
||||
_Modal2.default,
|
||||
(0, _extends3.default)({
|
||||
className: (0, _classnames2.default)(classes.root, className),
|
||||
BackdropTransitionDuration: transitionDuration,
|
||||
ignoreBackdropClick: ignoreBackdropClick,
|
||||
ignoreEscapeKeyUp: ignoreEscapeKeyUp,
|
||||
BackdropProps: {
|
||||
transitionDuration: transitionDuration
|
||||
},
|
||||
disableBackdropClick: disableBackdropClick,
|
||||
disableEscapeKeyDown: disableEscapeKeyDown,
|
||||
onBackdropClick: onBackdropClick,
|
||||
onEscapeKeyUp: onEscapeKeyUp,
|
||||
onRequestClose: onRequestClose,
|
||||
show: open
|
||||
onEscapeKeyDown: onEscapeKeyDown,
|
||||
onClose: onClose,
|
||||
open: open,
|
||||
role: 'dialog'
|
||||
}, other),
|
||||
_react2.default.createElement(
|
||||
TransitionProp,
|
||||
@@ -263,33 +154,118 @@ function Dialog(props) {
|
||||
},
|
||||
_react2.default.createElement(
|
||||
_Paper2.default,
|
||||
{
|
||||
(0, _extends3.default)({
|
||||
elevation: 24,
|
||||
className: (0, _classnames2.default)(classes.paper, classes['paperWidth' + (0, _helpers.capitalizeFirstLetter)(maxWidth)], (_classNames = {}, (0, _defineProperty3.default)(_classNames, classes.fullScreen, fullScreen), (0, _defineProperty3.default)(_classNames, classes.fullWidth, fullWidth), _classNames))
|
||||
},
|
||||
className: (0, _classnames2.default)(classes.paper, (_classNames = {}, (0, _defineProperty3.default)(_classNames, classes['paperWidth' + (maxWidth ? (0, _helpers.capitalize)(maxWidth) : '')], maxWidth), (0, _defineProperty3.default)(_classNames, classes.fullScreen, fullScreen), (0, _defineProperty3.default)(_classNames, classes.fullWidth, fullWidth), _classNames))
|
||||
}, PaperProps),
|
||||
children
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Dialog.propTypes = process.env.NODE_ENV !== "production" ? (_ref = {
|
||||
classes: require('prop-types').object.isRequired,
|
||||
transition: typeof babelPluginFlowReactPropTypes_proptype_ComponentType === 'function' ? babelPluginFlowReactPropTypes_proptype_ComponentType.isRequired ? babelPluginFlowReactPropTypes_proptype_ComponentType.isRequired : babelPluginFlowReactPropTypes_proptype_ComponentType : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_ComponentType).isRequired,
|
||||
children: typeof babelPluginFlowReactPropTypes_proptype_Node === 'function' ? babelPluginFlowReactPropTypes_proptype_Node : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_Node)
|
||||
}, (0, _defineProperty3.default)(_ref, 'classes', require('prop-types').object), (0, _defineProperty3.default)(_ref, 'className', require('prop-types').string), (0, _defineProperty3.default)(_ref, 'fullScreen', require('prop-types').bool), (0, _defineProperty3.default)(_ref, 'ignoreBackdropClick', require('prop-types').bool), (0, _defineProperty3.default)(_ref, 'ignoreEscapeKeyUp', require('prop-types').bool), (0, _defineProperty3.default)(_ref, 'transitionDuration', typeof babelPluginFlowReactPropTypes_proptype_TransitionDuration === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionDuration : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionDuration)), (0, _defineProperty3.default)(_ref, 'maxWidth', require('prop-types').oneOf(['xs', 'sm', 'md'])), (0, _defineProperty3.default)(_ref, 'fullWidth', require('prop-types').bool), (0, _defineProperty3.default)(_ref, 'onBackdropClick', require('prop-types').func), (0, _defineProperty3.default)(_ref, 'onEnter', typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback)), (0, _defineProperty3.default)(_ref, 'onEntering', typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback)), (0, _defineProperty3.default)(_ref, 'onEntered', typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback)), (0, _defineProperty3.default)(_ref, 'onEscapeKeyUp', require('prop-types').func), (0, _defineProperty3.default)(_ref, 'onExit', typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback)), (0, _defineProperty3.default)(_ref, 'onExiting', typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback)), (0, _defineProperty3.default)(_ref, 'onExited', typeof babelPluginFlowReactPropTypes_proptype_TransitionCallback === 'function' ? babelPluginFlowReactPropTypes_proptype_TransitionCallback : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_TransitionCallback)), (0, _defineProperty3.default)(_ref, 'onRequestClose', require('prop-types').func), (0, _defineProperty3.default)(_ref, 'open', require('prop-types').bool), (0, _defineProperty3.default)(_ref, 'transition', typeof babelPluginFlowReactPropTypes_proptype_ComponentType === 'function' ? babelPluginFlowReactPropTypes_proptype_ComponentType : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_ComponentType)), _ref) : {};
|
||||
Dialog.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* Dialog children, usually the included sub-components.
|
||||
*/
|
||||
children: _propTypes2.default.node.isRequired,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: _propTypes2.default.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes2.default.string,
|
||||
/**
|
||||
* If `true`, clicking the backdrop will not fire the `onClose` callback.
|
||||
*/
|
||||
disableBackdropClick: _propTypes2.default.bool,
|
||||
/**
|
||||
* If `true`, hitting escape will not fire the `onClose` callback.
|
||||
*/
|
||||
disableEscapeKeyDown: _propTypes2.default.bool,
|
||||
/**
|
||||
* If `true`, the dialog will be full-screen
|
||||
*/
|
||||
fullScreen: _propTypes2.default.bool,
|
||||
/**
|
||||
* If `true`, the dialog stretches to `maxWidth`.
|
||||
*/
|
||||
fullWidth: _propTypes2.default.bool,
|
||||
/**
|
||||
* Determine the max width of the dialog.
|
||||
* The dialog width grows with the size of the screen, this property is useful
|
||||
* on the desktop where you might need some coherent different width size across your
|
||||
* application. Set to `false` to disable `maxWidth`.
|
||||
*/
|
||||
maxWidth: _propTypes2.default.oneOf(['xs', 'sm', 'md', false]),
|
||||
/**
|
||||
* Callback fired when the backdrop is clicked.
|
||||
*/
|
||||
onBackdropClick: _propTypes2.default.func,
|
||||
/**
|
||||
* Callback fired when the component requests to be closed.
|
||||
*
|
||||
* @param {object} event The event source of the callback
|
||||
*/
|
||||
onClose: _propTypes2.default.func,
|
||||
/**
|
||||
* Callback fired before the dialog enters.
|
||||
*/
|
||||
onEnter: _propTypes2.default.func,
|
||||
/**
|
||||
* Callback fired when the dialog has entered.
|
||||
*/
|
||||
onEntered: _propTypes2.default.func,
|
||||
/**
|
||||
* Callback fired when the dialog is entering.
|
||||
*/
|
||||
onEntering: _propTypes2.default.func,
|
||||
/**
|
||||
* Callback fired when the escape key is pressed,
|
||||
* `disableKeyboard` is false and the modal is in focus.
|
||||
*/
|
||||
onEscapeKeyDown: _propTypes2.default.func,
|
||||
/**
|
||||
* Callback fired before the dialog exits.
|
||||
*/
|
||||
onExit: _propTypes2.default.func,
|
||||
/**
|
||||
* Callback fired when the dialog has exited.
|
||||
*/
|
||||
onExited: _propTypes2.default.func,
|
||||
/**
|
||||
* Callback fired when the dialog is exiting.
|
||||
*/
|
||||
onExiting: _propTypes2.default.func,
|
||||
/**
|
||||
* If `true`, the Dialog is open.
|
||||
*/
|
||||
open: _propTypes2.default.bool.isRequired,
|
||||
/**
|
||||
* Properties applied to the `Paper` element.
|
||||
*/
|
||||
PaperProps: _propTypes2.default.object,
|
||||
/**
|
||||
* Transition component.
|
||||
*/
|
||||
transition: _propTypes2.default.oneOfType([_propTypes2.default.string, _propTypes2.default.func]),
|
||||
/**
|
||||
* The duration for the transition, in milliseconds.
|
||||
* You may specify a single timeout for all transitions, or individually with an object.
|
||||
*/
|
||||
transitionDuration: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.shape({ enter: _propTypes2.default.number, exit: _propTypes2.default.number })])
|
||||
} : {};
|
||||
|
||||
Dialog.defaultProps = {
|
||||
fullScreen: false,
|
||||
ignoreBackdropClick: false,
|
||||
ignoreEscapeKeyUp: false,
|
||||
transitionDuration: {
|
||||
enter: _transitions.duration.enteringScreen,
|
||||
exit: _transitions.duration.leavingScreen
|
||||
},
|
||||
maxWidth: 'sm',
|
||||
fullWidth: false,
|
||||
open: false,
|
||||
transition: _Fade2.default
|
||||
disableBackdropClick: false,
|
||||
disableEscapeKeyDown: false,
|
||||
maxWidth: 'sm',
|
||||
transition: _Fade2.default,
|
||||
transitionDuration: { enter: _transitions.duration.enteringScreen, exit: _transitions.duration.leavingScreen }
|
||||
};
|
||||
|
||||
exports.default = (0, _withStyles2.default)(styles, { name: 'MuiDialog' })(Dialog);
|
Reference in New Issue
Block a user