Completely updated React, fixed #11, (hopefully)
This commit is contained in:
22
goTorrentWebUI/node_modules/material-ui/Stepper/Step.d.ts
generated
vendored
Normal file
22
goTorrentWebUI/node_modules/material-ui/Stepper/Step.d.ts
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import * as React from 'react';
|
||||
import { StandardProps } from '..';
|
||||
import { Orientation } from './Stepper';
|
||||
|
||||
export interface StepProps
|
||||
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, StepClasskey> {
|
||||
active?: boolean;
|
||||
alternativeLabel?: boolean;
|
||||
children?: React.ReactNode;
|
||||
completed?: boolean;
|
||||
connector?: React.ReactElement<any>;
|
||||
disabled?: boolean;
|
||||
index?: number;
|
||||
last?: boolean;
|
||||
orientation?: Orientation;
|
||||
}
|
||||
|
||||
export type StepClasskey = 'root' | 'horizontal' | 'vertical' | 'alternativeLabel';
|
||||
|
||||
declare const Step: React.ComponentType<StepProps>;
|
||||
|
||||
export default Step;
|
151
goTorrentWebUI/node_modules/material-ui/Stepper/Step.js
generated
vendored
Normal file
151
goTorrentWebUI/node_modules/material-ui/Stepper/Step.js
generated
vendored
Normal file
@@ -0,0 +1,151 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.styles = undefined;
|
||||
|
||||
var _extends2 = require('babel-runtime/helpers/extends');
|
||||
|
||||
var _extends3 = _interopRequireDefault(_extends2);
|
||||
|
||||
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
||||
|
||||
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
||||
|
||||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
||||
|
||||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
||||
|
||||
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);
|
||||
|
||||
var _withStyles = require('../styles/withStyles');
|
||||
|
||||
var _withStyles2 = _interopRequireDefault(_withStyles);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var styles = exports.styles = function styles(theme) {
|
||||
return {
|
||||
root: {},
|
||||
horizontal: {
|
||||
paddingLeft: theme.spacing.unit,
|
||||
paddingRight: theme.spacing.unit,
|
||||
'&:first-child': {
|
||||
paddingLeft: 0
|
||||
},
|
||||
'&:last-child': {
|
||||
paddingRight: 0
|
||||
}
|
||||
},
|
||||
vertical: {},
|
||||
alternativeLabel: {
|
||||
flex: 1,
|
||||
position: 'relative'
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function Step(props) {
|
||||
var active = props.active,
|
||||
alternativeLabel = props.alternativeLabel,
|
||||
children = props.children,
|
||||
classes = props.classes,
|
||||
classNameProp = props.className,
|
||||
completed = props.completed,
|
||||
connector = props.connector,
|
||||
disabled = props.disabled,
|
||||
index = props.index,
|
||||
last = props.last,
|
||||
orientation = props.orientation,
|
||||
other = (0, _objectWithoutProperties3.default)(props, ['active', 'alternativeLabel', 'children', 'classes', 'className', 'completed', 'connector', 'disabled', 'index', 'last', 'orientation']);
|
||||
|
||||
|
||||
var className = (0, _classnames2.default)(classes.root, classes[orientation], (0, _defineProperty3.default)({}, classes.alternativeLabel, alternativeLabel), classNameProp);
|
||||
|
||||
return _react2.default.createElement(
|
||||
'div',
|
||||
(0, _extends3.default)({ className: className }, other),
|
||||
_react2.default.Children.map(children, function (child) {
|
||||
return _react2.default.cloneElement(child, (0, _extends3.default)({
|
||||
active: active,
|
||||
alternativeLabel: alternativeLabel,
|
||||
completed: completed,
|
||||
disabled: disabled,
|
||||
icon: index + 1,
|
||||
last: last,
|
||||
orientation: orientation
|
||||
}, child.props));
|
||||
}),
|
||||
connector && alternativeLabel && !last && _react2.default.cloneElement(connector, { orientation: orientation, alternativeLabel: alternativeLabel })
|
||||
);
|
||||
}
|
||||
|
||||
Step.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* Sets the step as active. Is passed to child components.
|
||||
*/
|
||||
active: _propTypes2.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Stepper when it's supplied with the alternativeLabel property.
|
||||
*/
|
||||
alternativeLabel: _propTypes2.default.bool,
|
||||
/**
|
||||
* Should be `Step` sub-components such as `StepLabel`, `StepContent`.
|
||||
*/
|
||||
children: _propTypes2.default.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
classes: _propTypes2.default.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes2.default.string,
|
||||
/**
|
||||
* Mark the step as completed. Is passed to child components.
|
||||
*/
|
||||
completed: _propTypes2.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Passed down from Stepper if alternativeLabel is also set.
|
||||
*/
|
||||
connector: _propTypes2.default.element,
|
||||
/**
|
||||
* Mark the step as disabled, will also disable the button if
|
||||
* `StepButton` is a child of `Step`. Is passed to child components.
|
||||
*/
|
||||
disabled: _propTypes2.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Used internally for numbering.
|
||||
*/
|
||||
index: _propTypes2.default.number,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
last: _propTypes2.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
orientation: _propTypes2.default.oneOf(['horizontal', 'vertical'])
|
||||
} : {};
|
||||
|
||||
Step.defaultProps = {
|
||||
active: false,
|
||||
completed: false,
|
||||
disabled: false
|
||||
};
|
||||
|
||||
exports.default = (0, _withStyles2.default)(styles, { name: 'MuiStep' })(Step);
|
129
goTorrentWebUI/node_modules/material-ui/Stepper/Step.js.flow
generated
vendored
Normal file
129
goTorrentWebUI/node_modules/material-ui/Stepper/Step.js.flow
generated
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import withStyles from '../styles/withStyles';
|
||||
|
||||
export const styles = theme => ({
|
||||
root: {},
|
||||
horizontal: {
|
||||
paddingLeft: theme.spacing.unit,
|
||||
paddingRight: theme.spacing.unit,
|
||||
'&:first-child': {
|
||||
paddingLeft: 0,
|
||||
},
|
||||
'&:last-child': {
|
||||
paddingRight: 0,
|
||||
},
|
||||
},
|
||||
vertical: {},
|
||||
alternativeLabel: {
|
||||
flex: 1,
|
||||
position: 'relative',
|
||||
},
|
||||
});
|
||||
|
||||
function Step(props) {
|
||||
const {
|
||||
active,
|
||||
alternativeLabel,
|
||||
children,
|
||||
classes,
|
||||
className: classNameProp,
|
||||
completed,
|
||||
connector,
|
||||
disabled,
|
||||
index,
|
||||
last,
|
||||
orientation,
|
||||
...other
|
||||
} = props;
|
||||
|
||||
const className = classNames(
|
||||
classes.root,
|
||||
classes[orientation],
|
||||
{
|
||||
[classes.alternativeLabel]: alternativeLabel,
|
||||
},
|
||||
classNameProp,
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={className} {...other}>
|
||||
{React.Children.map(children, child =>
|
||||
React.cloneElement(child, {
|
||||
active,
|
||||
alternativeLabel,
|
||||
completed,
|
||||
disabled,
|
||||
icon: index + 1,
|
||||
last,
|
||||
orientation,
|
||||
...child.props,
|
||||
}),
|
||||
)}
|
||||
{connector &&
|
||||
alternativeLabel &&
|
||||
!last &&
|
||||
React.cloneElement(connector, { orientation, alternativeLabel })}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Step.propTypes = {
|
||||
/**
|
||||
* Sets the step as active. Is passed to child components.
|
||||
*/
|
||||
active: PropTypes.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Stepper when it's supplied with the alternativeLabel property.
|
||||
*/
|
||||
alternativeLabel: PropTypes.bool,
|
||||
/**
|
||||
* Should be `Step` sub-components such as `StepLabel`, `StepContent`.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* Mark the step as completed. Is passed to child components.
|
||||
*/
|
||||
completed: PropTypes.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Passed down from Stepper if alternativeLabel is also set.
|
||||
*/
|
||||
connector: PropTypes.element,
|
||||
/**
|
||||
* Mark the step as disabled, will also disable the button if
|
||||
* `StepButton` is a child of `Step`. Is passed to child components.
|
||||
*/
|
||||
disabled: PropTypes.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Used internally for numbering.
|
||||
*/
|
||||
index: PropTypes.number,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
last: PropTypes.bool,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
||||
};
|
||||
|
||||
Step.defaultProps = {
|
||||
active: false,
|
||||
completed: false,
|
||||
disabled: false,
|
||||
};
|
||||
|
||||
export default withStyles(styles, { name: 'MuiStep' })(Step);
|
23
goTorrentWebUI/node_modules/material-ui/Stepper/StepButton.d.ts
generated
vendored
Normal file
23
goTorrentWebUI/node_modules/material-ui/Stepper/StepButton.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import * as React from 'react';
|
||||
import { StandardProps } from '..';
|
||||
import { Orientation } from './Stepper';
|
||||
import { ButtonBaseProps, ButtonBaseClassKey } from '../ButtonBase';
|
||||
|
||||
export type StepButtonIcon = React.ReactElement<any> | string | number;
|
||||
|
||||
export interface StepButtonProps extends StandardProps<ButtonBaseProps, StepButtonClasskey> {
|
||||
active?: boolean;
|
||||
alternativeLabel?: boolean;
|
||||
completed?: boolean;
|
||||
disabled?: boolean;
|
||||
icon?: StepButtonIcon;
|
||||
last?: boolean;
|
||||
optional?: React.ReactNode;
|
||||
orientation?: Orientation;
|
||||
}
|
||||
|
||||
export type StepButtonClasskey = ButtonBaseClassKey | 'root';
|
||||
|
||||
declare const StepButton: React.ComponentType<StepButtonProps>;
|
||||
|
||||
export default StepButton;
|
143
goTorrentWebUI/node_modules/material-ui/Stepper/StepButton.js
generated
vendored
Normal file
143
goTorrentWebUI/node_modules/material-ui/Stepper/StepButton.js
generated
vendored
Normal file
@@ -0,0 +1,143 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.styles = undefined;
|
||||
|
||||
var _extends2 = require('babel-runtime/helpers/extends');
|
||||
|
||||
var _extends3 = _interopRequireDefault(_extends2);
|
||||
|
||||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
||||
|
||||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
||||
|
||||
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);
|
||||
|
||||
var _withStyles = require('../styles/withStyles');
|
||||
|
||||
var _withStyles2 = _interopRequireDefault(_withStyles);
|
||||
|
||||
var _ButtonBase = require('../ButtonBase');
|
||||
|
||||
var _ButtonBase2 = _interopRequireDefault(_ButtonBase);
|
||||
|
||||
var _StepLabel = require('./StepLabel');
|
||||
|
||||
var _StepLabel2 = _interopRequireDefault(_StepLabel);
|
||||
|
||||
var _reactHelpers = require('../utils/reactHelpers');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var styles = exports.styles = function styles(theme) {
|
||||
return {
|
||||
root: {
|
||||
width: '100%',
|
||||
padding: theme.spacing.unit * 3 + 'px ' + theme.spacing.unit * 2 + 'px',
|
||||
margin: -theme.spacing.unit * 3 + 'px ' + -theme.spacing.unit * 2 + 'px',
|
||||
boxSizing: 'content-box'
|
||||
}
|
||||
};
|
||||
}; // @inheritedComponent ButtonBase
|
||||
|
||||
function StepButton(props) {
|
||||
var active = props.active,
|
||||
alternativeLabel = props.alternativeLabel,
|
||||
children = props.children,
|
||||
classes = props.classes,
|
||||
classNameProp = props.className,
|
||||
completed = props.completed,
|
||||
disabled = props.disabled,
|
||||
icon = props.icon,
|
||||
last = props.last,
|
||||
optional = props.optional,
|
||||
orientation = props.orientation,
|
||||
other = (0, _objectWithoutProperties3.default)(props, ['active', 'alternativeLabel', 'children', 'classes', 'className', 'completed', 'disabled', 'icon', 'last', 'optional', 'orientation']);
|
||||
|
||||
|
||||
var childProps = {
|
||||
active: active,
|
||||
alternativeLabel: alternativeLabel,
|
||||
completed: completed,
|
||||
disabled: disabled,
|
||||
icon: icon,
|
||||
optional: optional,
|
||||
orientation: orientation
|
||||
};
|
||||
var child = (0, _reactHelpers.isMuiElement)(children, ['StepLabel']) ? _react2.default.cloneElement(children, childProps) : _react2.default.createElement(
|
||||
_StepLabel2.default,
|
||||
childProps,
|
||||
children
|
||||
);
|
||||
|
||||
return _react2.default.createElement(
|
||||
_ButtonBase2.default,
|
||||
(0, _extends3.default)({ disabled: disabled, className: (0, _classnames2.default)(classes.root, classNameProp) }, other),
|
||||
child
|
||||
);
|
||||
}
|
||||
|
||||
StepButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* @ignore
|
||||
* Passed in via `Step` - passed through to `StepLabel`.
|
||||
*/
|
||||
active: _propTypes2.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Stepper when it's supplied with the alternativeLabel property.
|
||||
*/
|
||||
alternativeLabel: _propTypes2.default.bool,
|
||||
/**
|
||||
* Can be a `StepLabel` or a node to place inside `StepLabel` as children.
|
||||
*/
|
||||
children: _propTypes2.default.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
classes: _propTypes2.default.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes2.default.string,
|
||||
/**
|
||||
* @ignore
|
||||
* Sets completed styling. Is passed to StepLabel.
|
||||
*/
|
||||
completed: _propTypes2.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Disables the button and sets disabled styling. Is passed to StepLabel.
|
||||
*/
|
||||
disabled: _propTypes2.default.bool,
|
||||
/**
|
||||
* The icon displayed by the step label.
|
||||
*/
|
||||
icon: _propTypes2.default.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
last: _propTypes2.default.bool,
|
||||
/**
|
||||
* The optional node to display.
|
||||
*/
|
||||
optional: _propTypes2.default.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
orientation: _propTypes2.default.oneOf(['horizontal', 'vertical'])
|
||||
} : {};
|
||||
|
||||
exports.default = (0, _withStyles2.default)(styles, { name: 'MuiStepButton' })(StepButton);
|
109
goTorrentWebUI/node_modules/material-ui/Stepper/StepButton.js.flow
generated
vendored
Normal file
109
goTorrentWebUI/node_modules/material-ui/Stepper/StepButton.js.flow
generated
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
// @inheritedComponent ButtonBase
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import withStyles from '../styles/withStyles';
|
||||
import ButtonBase from '../ButtonBase';
|
||||
import StepLabel from './StepLabel';
|
||||
import { isMuiElement } from '../utils/reactHelpers';
|
||||
|
||||
export const styles = theme => ({
|
||||
root: {
|
||||
width: '100%',
|
||||
padding: `${theme.spacing.unit * 3}px ${theme.spacing.unit * 2}px`,
|
||||
margin: `${-theme.spacing.unit * 3}px ${-theme.spacing.unit * 2}px`,
|
||||
boxSizing: 'content-box',
|
||||
},
|
||||
});
|
||||
|
||||
function StepButton(props) {
|
||||
const {
|
||||
active,
|
||||
alternativeLabel,
|
||||
children,
|
||||
classes,
|
||||
className: classNameProp,
|
||||
completed,
|
||||
disabled,
|
||||
icon,
|
||||
last,
|
||||
optional,
|
||||
orientation,
|
||||
...other
|
||||
} = props;
|
||||
|
||||
const childProps = {
|
||||
active,
|
||||
alternativeLabel,
|
||||
completed,
|
||||
disabled,
|
||||
icon,
|
||||
optional,
|
||||
orientation,
|
||||
};
|
||||
const child = isMuiElement(children, ['StepLabel']) ? (
|
||||
React.cloneElement(children, childProps)
|
||||
) : (
|
||||
<StepLabel {...childProps}>{children}</StepLabel>
|
||||
);
|
||||
|
||||
return (
|
||||
<ButtonBase disabled={disabled} className={classNames(classes.root, classNameProp)} {...other}>
|
||||
{child}
|
||||
</ButtonBase>
|
||||
);
|
||||
}
|
||||
|
||||
StepButton.propTypes = {
|
||||
/**
|
||||
* @ignore
|
||||
* Passed in via `Step` - passed through to `StepLabel`.
|
||||
*/
|
||||
active: PropTypes.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Stepper when it's supplied with the alternativeLabel property.
|
||||
*/
|
||||
alternativeLabel: PropTypes.bool,
|
||||
/**
|
||||
* Can be a `StepLabel` or a node to place inside `StepLabel` as children.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* @ignore
|
||||
* Sets completed styling. Is passed to StepLabel.
|
||||
*/
|
||||
completed: PropTypes.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Disables the button and sets disabled styling. Is passed to StepLabel.
|
||||
*/
|
||||
disabled: PropTypes.bool,
|
||||
/**
|
||||
* The icon displayed by the step label.
|
||||
*/
|
||||
icon: PropTypes.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
last: PropTypes.bool,
|
||||
/**
|
||||
* The optional node to display.
|
||||
*/
|
||||
optional: PropTypes.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
||||
};
|
||||
|
||||
export default withStyles(styles, { name: 'MuiStepButton' })(StepButton);
|
24
goTorrentWebUI/node_modules/material-ui/Stepper/StepConnector.d.ts
generated
vendored
Normal file
24
goTorrentWebUI/node_modules/material-ui/Stepper/StepConnector.d.ts
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
import * as React from 'react';
|
||||
import { StandardProps } from '..';
|
||||
import { Orientation } from './Stepper';
|
||||
|
||||
export type StepConnectorIcon = React.ReactElement<any> | string | number;
|
||||
|
||||
export interface StepConnectorProps
|
||||
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, StepConnectorClasskey> {
|
||||
alternativeLabel?: boolean;
|
||||
orientation?: Orientation;
|
||||
}
|
||||
|
||||
export type StepConnectorClasskey =
|
||||
| 'root'
|
||||
| 'horizontal'
|
||||
| 'vertical'
|
||||
| 'alternativeLabel'
|
||||
| 'line'
|
||||
| 'lineHorizontal'
|
||||
| 'lineVertical';
|
||||
|
||||
declare const StepConnector: React.ComponentType<StepConnectorProps>;
|
||||
|
||||
export default StepConnector;
|
118
goTorrentWebUI/node_modules/material-ui/Stepper/StepConnector.js
generated
vendored
Normal file
118
goTorrentWebUI/node_modules/material-ui/Stepper/StepConnector.js
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.styles = undefined;
|
||||
|
||||
var _extends2 = require('babel-runtime/helpers/extends');
|
||||
|
||||
var _extends3 = _interopRequireDefault(_extends2);
|
||||
|
||||
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
||||
|
||||
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
||||
|
||||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
||||
|
||||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
||||
|
||||
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);
|
||||
|
||||
var _withStyles = require('../styles/withStyles');
|
||||
|
||||
var _withStyles2 = _interopRequireDefault(_withStyles);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var styles = exports.styles = function styles(theme) {
|
||||
return {
|
||||
root: {
|
||||
flex: '1 1 auto'
|
||||
},
|
||||
horizontal: {},
|
||||
vertical: {
|
||||
marginLeft: 12, // half icon
|
||||
padding: '0 0 ' + theme.spacing.unit + 'px'
|
||||
},
|
||||
alternativeLabel: {
|
||||
position: 'absolute',
|
||||
top: theme.spacing.unit + 4,
|
||||
left: 'calc(50% + 20px)',
|
||||
right: 'calc(-50% + 20px)'
|
||||
},
|
||||
line: {
|
||||
display: 'block',
|
||||
borderColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]
|
||||
},
|
||||
lineHorizontal: {
|
||||
borderTopStyle: 'solid',
|
||||
borderTopWidth: 1
|
||||
},
|
||||
lineVertical: {
|
||||
borderLeftStyle: 'solid',
|
||||
borderLeftWidth: 1,
|
||||
minHeight: theme.spacing.unit * 3
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @ignore - internal component.
|
||||
*/
|
||||
function StepConnector(props) {
|
||||
var _classNames2;
|
||||
|
||||
var alternativeLabel = props.alternativeLabel,
|
||||
classNameProp = props.className,
|
||||
classes = props.classes,
|
||||
orientation = props.orientation,
|
||||
other = (0, _objectWithoutProperties3.default)(props, ['alternativeLabel', 'className', 'classes', 'orientation']);
|
||||
|
||||
|
||||
var className = (0, _classnames2.default)(classes.root, classes[orientation], (0, _defineProperty3.default)({}, classes.alternativeLabel, alternativeLabel), classNameProp);
|
||||
var lineClassName = (0, _classnames2.default)(classes.line, (_classNames2 = {}, (0, _defineProperty3.default)(_classNames2, classes.lineHorizontal, orientation === 'horizontal'), (0, _defineProperty3.default)(_classNames2, classes.lineVertical, orientation === 'vertical'), _classNames2));
|
||||
|
||||
return _react2.default.createElement(
|
||||
'div',
|
||||
(0, _extends3.default)({ className: className }, other),
|
||||
_react2.default.createElement('span', { className: lineClassName })
|
||||
);
|
||||
}
|
||||
|
||||
StepConnector.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Step when it's supplied with the alternativeLabel property.
|
||||
*/
|
||||
alternativeLabel: _propTypes2.default.bool,
|
||||
/**
|
||||
* Useful to extend the style applied to the component.
|
||||
*/
|
||||
classes: _propTypes2.default.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes2.default.string,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
orientation: _propTypes2.default.oneOf(['horizontal', 'vertical'])
|
||||
} : {};
|
||||
|
||||
StepConnector.defaultProps = {
|
||||
alternativeLabel: false,
|
||||
orientation: 'horizontal'
|
||||
};
|
||||
|
||||
exports.default = (0, _withStyles2.default)(styles, { name: 'MuiStepConnector' })(StepConnector);
|
87
goTorrentWebUI/node_modules/material-ui/Stepper/StepConnector.js.flow
generated
vendored
Normal file
87
goTorrentWebUI/node_modules/material-ui/Stepper/StepConnector.js.flow
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import withStyles from '../styles/withStyles';
|
||||
|
||||
export const styles = theme => ({
|
||||
root: {
|
||||
flex: '1 1 auto',
|
||||
},
|
||||
horizontal: {},
|
||||
vertical: {
|
||||
marginLeft: 12, // half icon
|
||||
padding: `0 0 ${theme.spacing.unit}px`,
|
||||
},
|
||||
alternativeLabel: {
|
||||
position: 'absolute',
|
||||
top: theme.spacing.unit + 4,
|
||||
left: 'calc(50% + 20px)',
|
||||
right: 'calc(-50% + 20px)',
|
||||
},
|
||||
line: {
|
||||
display: 'block',
|
||||
borderColor: theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600],
|
||||
},
|
||||
lineHorizontal: {
|
||||
borderTopStyle: 'solid',
|
||||
borderTopWidth: 1,
|
||||
},
|
||||
lineVertical: {
|
||||
borderLeftStyle: 'solid',
|
||||
borderLeftWidth: 1,
|
||||
minHeight: theme.spacing.unit * 3,
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* @ignore - internal component.
|
||||
*/
|
||||
function StepConnector(props) {
|
||||
const { alternativeLabel, className: classNameProp, classes, orientation, ...other } = props;
|
||||
|
||||
const className = classNames(
|
||||
classes.root,
|
||||
classes[orientation],
|
||||
{
|
||||
[classes.alternativeLabel]: alternativeLabel,
|
||||
},
|
||||
classNameProp,
|
||||
);
|
||||
const lineClassName = classNames(classes.line, {
|
||||
[classes.lineHorizontal]: orientation === 'horizontal',
|
||||
[classes.lineVertical]: orientation === 'vertical',
|
||||
});
|
||||
|
||||
return (
|
||||
<div className={className} {...other}>
|
||||
<span className={lineClassName} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
StepConnector.propTypes = {
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Step when it's supplied with the alternativeLabel property.
|
||||
*/
|
||||
alternativeLabel: PropTypes.bool,
|
||||
/**
|
||||
* Useful to extend the style applied to the component.
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
||||
};
|
||||
|
||||
StepConnector.defaultProps = {
|
||||
alternativeLabel: false,
|
||||
orientation: 'horizontal',
|
||||
};
|
||||
|
||||
export default withStyles(styles, { name: 'MuiStepConnector' })(StepConnector);
|
23
goTorrentWebUI/node_modules/material-ui/Stepper/StepContent.d.ts
generated
vendored
Normal file
23
goTorrentWebUI/node_modules/material-ui/Stepper/StepContent.d.ts
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
import * as React from 'react';
|
||||
import { StandardProps } from '..';
|
||||
import { Orientation } from './Stepper';
|
||||
import { TransitionProps } from '../transitions/transition';
|
||||
|
||||
export interface StepContentProps
|
||||
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, StepContentClasskey> {
|
||||
active?: boolean;
|
||||
alternativeLabel?: boolean;
|
||||
children: React.ReactNode;
|
||||
completed?: boolean;
|
||||
last?: boolean;
|
||||
optional?: boolean;
|
||||
orientation?: Orientation;
|
||||
transition?: React.ComponentType<TransitionProps>;
|
||||
transitionDuration?: TransitionProps['timeout'] | 'auto';
|
||||
}
|
||||
|
||||
export type StepContentClasskey = 'root' | 'last' | 'transition';
|
||||
|
||||
declare const StepContent: React.ComponentType<StepContentProps>;
|
||||
|
||||
export default StepContent;
|
155
goTorrentWebUI/node_modules/material-ui/Stepper/StepContent.js
generated
vendored
Normal file
155
goTorrentWebUI/node_modules/material-ui/Stepper/StepContent.js
generated
vendored
Normal file
@@ -0,0 +1,155 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.styles = undefined;
|
||||
|
||||
var _extends2 = require('babel-runtime/helpers/extends');
|
||||
|
||||
var _extends3 = _interopRequireDefault(_extends2);
|
||||
|
||||
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
||||
|
||||
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
||||
|
||||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
||||
|
||||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
||||
|
||||
var _react = require('react');
|
||||
|
||||
var _react2 = _interopRequireDefault(_react);
|
||||
|
||||
var _propTypes = require('prop-types');
|
||||
|
||||
var _propTypes2 = _interopRequireDefault(_propTypes);
|
||||
|
||||
var _warning = require('warning');
|
||||
|
||||
var _warning2 = _interopRequireDefault(_warning);
|
||||
|
||||
var _classnames = require('classnames');
|
||||
|
||||
var _classnames2 = _interopRequireDefault(_classnames);
|
||||
|
||||
var _Collapse = require('../transitions/Collapse');
|
||||
|
||||
var _Collapse2 = _interopRequireDefault(_Collapse);
|
||||
|
||||
var _withStyles = require('../styles/withStyles');
|
||||
|
||||
var _withStyles2 = _interopRequireDefault(_withStyles);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var styles = exports.styles = function styles(theme) {
|
||||
return {
|
||||
root: {
|
||||
marginTop: theme.spacing.unit,
|
||||
marginLeft: 12, // half icon
|
||||
paddingLeft: theme.spacing.unit + 12, // margin + half icon
|
||||
paddingRight: theme.spacing.unit,
|
||||
borderLeft: '1px solid ' + (theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600])
|
||||
},
|
||||
last: {
|
||||
borderLeft: 'none'
|
||||
},
|
||||
transition: {}
|
||||
};
|
||||
};
|
||||
|
||||
function StepContent(props) {
|
||||
var active = props.active,
|
||||
alternativeLabel = props.alternativeLabel,
|
||||
children = props.children,
|
||||
classes = props.classes,
|
||||
classNameProp = props.className,
|
||||
completed = props.completed,
|
||||
last = props.last,
|
||||
optional = props.optional,
|
||||
orientation = props.orientation,
|
||||
Transition = props.transition,
|
||||
transitionDuration = props.transitionDuration,
|
||||
other = (0, _objectWithoutProperties3.default)(props, ['active', 'alternativeLabel', 'children', 'classes', 'className', 'completed', 'last', 'optional', 'orientation', 'transition', 'transitionDuration']);
|
||||
|
||||
|
||||
process.env.NODE_ENV !== "production" ? (0, _warning2.default)(orientation === 'vertical', 'Material-UI: <StepContent /> is only designed for use with the vertical stepper.') : void 0;
|
||||
|
||||
var className = (0, _classnames2.default)(classes.root, (0, _defineProperty3.default)({}, classes.last, last), classNameProp);
|
||||
|
||||
return _react2.default.createElement(
|
||||
'div',
|
||||
(0, _extends3.default)({ className: className }, other),
|
||||
_react2.default.createElement(
|
||||
Transition,
|
||||
{
|
||||
'in': active,
|
||||
className: classes.transition,
|
||||
timeout: transitionDuration,
|
||||
unmountOnExit: true
|
||||
},
|
||||
children
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
StepContent.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* @ignore
|
||||
* Expands the content.
|
||||
*/
|
||||
active: _propTypes2.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Step when it's supplied with the alternativeLabel property.
|
||||
*/
|
||||
alternativeLabel: _propTypes2.default.bool,
|
||||
/**
|
||||
* Step content.
|
||||
*/
|
||||
children: _propTypes2.default.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
classes: _propTypes2.default.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes2.default.string,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
completed: _propTypes2.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
last: _propTypes2.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Step when it's supplied with the optional property.
|
||||
*/
|
||||
optional: _propTypes2.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
orientation: _propTypes2.default.oneOf(['horizontal', 'vertical']),
|
||||
/**
|
||||
* Collapse component.
|
||||
*/
|
||||
transition: _propTypes2.default.func,
|
||||
/**
|
||||
* Adjust the duration of the content expand transition.
|
||||
* Passed as a property to the transition component.
|
||||
*
|
||||
* Set to 'auto' to automatically calculate transition time based on height.
|
||||
*/
|
||||
transitionDuration: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.shape({ enter: _propTypes2.default.number, exit: _propTypes2.default.number }), _propTypes2.default.oneOf(['auto'])])
|
||||
} : {};
|
||||
|
||||
StepContent.defaultProps = {
|
||||
transition: _Collapse2.default,
|
||||
transitionDuration: 'auto'
|
||||
};
|
||||
|
||||
exports.default = (0, _withStyles2.default)(styles, { name: 'MuiStepContent' })(StepContent);
|
129
goTorrentWebUI/node_modules/material-ui/Stepper/StepContent.js.flow
generated
vendored
Normal file
129
goTorrentWebUI/node_modules/material-ui/Stepper/StepContent.js.flow
generated
vendored
Normal file
@@ -0,0 +1,129 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import warning from 'warning';
|
||||
import classNames from 'classnames';
|
||||
import Collapse from '../transitions/Collapse';
|
||||
import withStyles from '../styles/withStyles';
|
||||
|
||||
export const styles = theme => ({
|
||||
root: {
|
||||
marginTop: theme.spacing.unit,
|
||||
marginLeft: 12, // half icon
|
||||
paddingLeft: theme.spacing.unit + 12, // margin + half icon
|
||||
paddingRight: theme.spacing.unit,
|
||||
borderLeft: `1px solid ${
|
||||
theme.palette.type === 'light' ? theme.palette.grey[400] : theme.palette.grey[600]
|
||||
}`,
|
||||
},
|
||||
last: {
|
||||
borderLeft: 'none',
|
||||
},
|
||||
transition: {},
|
||||
});
|
||||
|
||||
function StepContent(props) {
|
||||
const {
|
||||
active,
|
||||
alternativeLabel,
|
||||
children,
|
||||
classes,
|
||||
className: classNameProp,
|
||||
completed,
|
||||
last,
|
||||
optional,
|
||||
orientation,
|
||||
transition: Transition,
|
||||
transitionDuration,
|
||||
...other
|
||||
} = props;
|
||||
|
||||
warning(
|
||||
orientation === 'vertical',
|
||||
'Material-UI: <StepContent /> is only designed for use with the vertical stepper.',
|
||||
);
|
||||
|
||||
const className = classNames(
|
||||
classes.root,
|
||||
{
|
||||
[classes.last]: last,
|
||||
},
|
||||
classNameProp,
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={className} {...other}>
|
||||
<Transition
|
||||
in={active}
|
||||
className={classes.transition}
|
||||
timeout={transitionDuration}
|
||||
unmountOnExit
|
||||
>
|
||||
{children}
|
||||
</Transition>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
StepContent.propTypes = {
|
||||
/**
|
||||
* @ignore
|
||||
* Expands the content.
|
||||
*/
|
||||
active: PropTypes.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Step when it's supplied with the alternativeLabel property.
|
||||
*/
|
||||
alternativeLabel: PropTypes.bool,
|
||||
/**
|
||||
* Step content.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
completed: PropTypes.bool,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
last: PropTypes.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Step when it's supplied with the optional property.
|
||||
*/
|
||||
optional: PropTypes.bool,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
||||
/**
|
||||
* Collapse component.
|
||||
*/
|
||||
transition: PropTypes.func,
|
||||
/**
|
||||
* Adjust the duration of the content expand transition.
|
||||
* Passed as a property to the transition component.
|
||||
*
|
||||
* Set to 'auto' to automatically calculate transition time based on height.
|
||||
*/
|
||||
transitionDuration: PropTypes.oneOfType([
|
||||
PropTypes.number,
|
||||
PropTypes.shape({ enter: PropTypes.number, exit: PropTypes.number }),
|
||||
PropTypes.oneOf(['auto']),
|
||||
]),
|
||||
};
|
||||
|
||||
StepContent.defaultProps = {
|
||||
transition: Collapse,
|
||||
transitionDuration: 'auto',
|
||||
};
|
||||
|
||||
export default withStyles(styles, { name: 'MuiStepContent' })(StepContent);
|
15
goTorrentWebUI/node_modules/material-ui/Stepper/StepIcon.d.ts
generated
vendored
Normal file
15
goTorrentWebUI/node_modules/material-ui/Stepper/StepIcon.d.ts
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
import * as React from 'react';
|
||||
import { StandardProps } from '..';
|
||||
|
||||
export interface StepIconProps
|
||||
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, StepIconClasskey> {
|
||||
active?: boolean;
|
||||
completed?: boolean;
|
||||
icon: React.ReactNode;
|
||||
}
|
||||
|
||||
export type StepIconClasskey = 'root' | 'completed';
|
||||
|
||||
declare const StepIcon: React.ComponentType<StepIconProps>;
|
||||
|
||||
export default StepIcon;
|
86
goTorrentWebUI/node_modules/material-ui/Stepper/StepIcon.js
generated
vendored
Normal file
86
goTorrentWebUI/node_modules/material-ui/Stepper/StepIcon.js
generated
vendored
Normal file
@@ -0,0 +1,86 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.styles = undefined;
|
||||
|
||||
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);
|
||||
|
||||
var _CheckCircle = require('../internal/svg-icons/CheckCircle');
|
||||
|
||||
var _CheckCircle2 = _interopRequireDefault(_CheckCircle);
|
||||
|
||||
var _withStyles = require('../styles/withStyles');
|
||||
|
||||
var _withStyles2 = _interopRequireDefault(_withStyles);
|
||||
|
||||
var _StepPositionIcon = require('./StepPositionIcon');
|
||||
|
||||
var _StepPositionIcon2 = _interopRequireDefault(_StepPositionIcon);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var styles = exports.styles = function styles(theme) {
|
||||
return {
|
||||
root: {
|
||||
display: 'block'
|
||||
},
|
||||
completed: {
|
||||
color: theme.palette.primary.main
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function StepIcon(props) {
|
||||
var completed = props.completed,
|
||||
icon = props.icon,
|
||||
active = props.active,
|
||||
classes = props.classes;
|
||||
|
||||
|
||||
if (typeof icon === 'number' || typeof icon === 'string') {
|
||||
if (completed) {
|
||||
return _react2.default.createElement(_CheckCircle2.default, { className: (0, _classnames2.default)(classes.root, classes.completed) });
|
||||
}
|
||||
return _react2.default.createElement(_StepPositionIcon2.default, { className: classes.root, position: icon, active: active });
|
||||
}
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
StepIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* Whether this step is active.
|
||||
*/
|
||||
active: _propTypes2.default.bool,
|
||||
/**
|
||||
* Classses for component style customizations.
|
||||
*/
|
||||
classes: _propTypes2.default.object.isRequired,
|
||||
/**
|
||||
* Mark the step as completed. Is passed to child components.
|
||||
*/
|
||||
completed: _propTypes2.default.bool,
|
||||
/**
|
||||
* The icon displayed by the step label.
|
||||
*/
|
||||
icon: _propTypes2.default.node.isRequired
|
||||
} : {};
|
||||
|
||||
StepIcon.defaultProps = {
|
||||
active: false,
|
||||
completed: false
|
||||
};
|
||||
|
||||
exports.default = (0, _withStyles2.default)(styles, { name: 'MuiStepIcon' })(StepIcon);
|
54
goTorrentWebUI/node_modules/material-ui/Stepper/StepIcon.js.flow
generated
vendored
Normal file
54
goTorrentWebUI/node_modules/material-ui/Stepper/StepIcon.js.flow
generated
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import CheckCircle from '../internal/svg-icons/CheckCircle';
|
||||
import withStyles from '../styles/withStyles';
|
||||
import StepPositionIcon from './StepPositionIcon';
|
||||
|
||||
export const styles = theme => ({
|
||||
root: {
|
||||
display: 'block',
|
||||
},
|
||||
completed: {
|
||||
color: theme.palette.primary.main,
|
||||
},
|
||||
});
|
||||
|
||||
function StepIcon(props) {
|
||||
const { completed, icon, active, classes } = props;
|
||||
|
||||
if (typeof icon === 'number' || typeof icon === 'string') {
|
||||
if (completed) {
|
||||
return <CheckCircle className={classNames(classes.root, classes.completed)} />;
|
||||
}
|
||||
return <StepPositionIcon className={classes.root} position={icon} active={active} />;
|
||||
}
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
StepIcon.propTypes = {
|
||||
/**
|
||||
* Whether this step is active.
|
||||
*/
|
||||
active: PropTypes.bool,
|
||||
/**
|
||||
* Classses for component style customizations.
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* Mark the step as completed. Is passed to child components.
|
||||
*/
|
||||
completed: PropTypes.bool,
|
||||
/**
|
||||
* The icon displayed by the step label.
|
||||
*/
|
||||
icon: PropTypes.node.isRequired,
|
||||
};
|
||||
|
||||
StepIcon.defaultProps = {
|
||||
active: false,
|
||||
completed: false,
|
||||
};
|
||||
|
||||
export default withStyles(styles, { name: 'MuiStepIcon' })(StepIcon);
|
35
goTorrentWebUI/node_modules/material-ui/Stepper/StepLabel.d.ts
generated
vendored
Normal file
35
goTorrentWebUI/node_modules/material-ui/Stepper/StepLabel.d.ts
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
import * as React from 'react';
|
||||
import { StandardProps } from '..';
|
||||
import { Orientation } from './Stepper';
|
||||
import { StepButtonIcon } from './StepButton';
|
||||
|
||||
export interface StepLabelProps
|
||||
extends StandardProps<React.HTMLAttributes<HTMLDivElement>, StepLabelClasskey> {
|
||||
active?: boolean;
|
||||
alternativeLabel?: boolean;
|
||||
children: React.ReactNode;
|
||||
completed?: boolean;
|
||||
disabled?: boolean;
|
||||
icon?: StepButtonIcon;
|
||||
last?: boolean;
|
||||
optional?: React.ReactNode;
|
||||
orientation?: Orientation;
|
||||
}
|
||||
|
||||
export type StepLabelClasskey =
|
||||
| 'root'
|
||||
| 'horizontal'
|
||||
| 'vertical'
|
||||
| 'alternativeLabel'
|
||||
| 'disabled'
|
||||
| 'label'
|
||||
| 'labelActive'
|
||||
| 'labelCompleted'
|
||||
| 'labelAlternativeLabel'
|
||||
| 'iconContainer'
|
||||
| 'iconContainerNoAlternative'
|
||||
| 'labelContainer';
|
||||
|
||||
declare const StepLabel: React.ComponentType<StepLabelProps>;
|
||||
|
||||
export default StepLabel;
|
198
goTorrentWebUI/node_modules/material-ui/Stepper/StepLabel.js
generated
vendored
Normal file
198
goTorrentWebUI/node_modules/material-ui/Stepper/StepLabel.js
generated
vendored
Normal file
@@ -0,0 +1,198 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.styles = undefined;
|
||||
|
||||
var _extends2 = require('babel-runtime/helpers/extends');
|
||||
|
||||
var _extends3 = _interopRequireDefault(_extends2);
|
||||
|
||||
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
||||
|
||||
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
||||
|
||||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
||||
|
||||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
||||
|
||||
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);
|
||||
|
||||
var _withStyles = require('../styles/withStyles');
|
||||
|
||||
var _withStyles2 = _interopRequireDefault(_withStyles);
|
||||
|
||||
var _Typography = require('../Typography');
|
||||
|
||||
var _Typography2 = _interopRequireDefault(_Typography);
|
||||
|
||||
var _StepIcon = require('./StepIcon');
|
||||
|
||||
var _StepIcon2 = _interopRequireDefault(_StepIcon);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var styles = exports.styles = function styles(theme) {
|
||||
return {
|
||||
root: {
|
||||
display: 'flex',
|
||||
alignItems: 'center'
|
||||
},
|
||||
horizontal: {},
|
||||
vertical: {},
|
||||
alternativeLabel: {
|
||||
flexDirection: 'column'
|
||||
},
|
||||
disabled: {
|
||||
cursor: 'default'
|
||||
},
|
||||
label: {
|
||||
color: theme.palette.text.secondary
|
||||
},
|
||||
labelActive: {
|
||||
color: theme.palette.text.primary,
|
||||
fontWeight: 500
|
||||
},
|
||||
labelCompleted: {
|
||||
color: theme.palette.text.primary,
|
||||
fontWeight: 500
|
||||
},
|
||||
labelAlternativeLabel: {
|
||||
textAlign: 'center',
|
||||
marginTop: theme.spacing.unit * 2
|
||||
},
|
||||
iconContainer: {},
|
||||
iconContainerNoAlternative: {
|
||||
paddingRight: theme.spacing.unit
|
||||
},
|
||||
labelContainer: {
|
||||
width: '100%'
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function StepLabel(props) {
|
||||
var _classNames, _classNames3;
|
||||
|
||||
var active = props.active,
|
||||
alternativeLabel = props.alternativeLabel,
|
||||
children = props.children,
|
||||
classes = props.classes,
|
||||
classNameProp = props.className,
|
||||
completed = props.completed,
|
||||
disabled = props.disabled,
|
||||
icon = props.icon,
|
||||
last = props.last,
|
||||
optional = props.optional,
|
||||
orientation = props.orientation,
|
||||
other = (0, _objectWithoutProperties3.default)(props, ['active', 'alternativeLabel', 'children', 'classes', 'className', 'completed', 'disabled', 'icon', 'last', 'optional', 'orientation']);
|
||||
|
||||
|
||||
return _react2.default.createElement(
|
||||
'span',
|
||||
(0, _extends3.default)({
|
||||
className: (0, _classnames2.default)(classes.root, classes[orientation], (_classNames = {}, (0, _defineProperty3.default)(_classNames, classes.disabled, disabled), (0, _defineProperty3.default)(_classNames, classes.alternativeLabel, alternativeLabel), _classNames), classNameProp)
|
||||
}, other),
|
||||
icon && _react2.default.createElement(
|
||||
'span',
|
||||
{
|
||||
className: (0, _classnames2.default)(classes.iconContainer, (0, _defineProperty3.default)({}, classes.iconContainerNoAlternative, !alternativeLabel))
|
||||
},
|
||||
_react2.default.createElement(_StepIcon2.default, {
|
||||
completed: completed,
|
||||
active: active,
|
||||
icon: icon,
|
||||
alternativeLabel: alternativeLabel
|
||||
})
|
||||
),
|
||||
_react2.default.createElement(
|
||||
'span',
|
||||
{ className: classes.labelContainer },
|
||||
_react2.default.createElement(
|
||||
_Typography2.default,
|
||||
{
|
||||
variant: 'body1',
|
||||
component: 'span',
|
||||
className: (0, _classnames2.default)(classes.label, (_classNames3 = {}, (0, _defineProperty3.default)(_classNames3, classes.labelAlternativeLabel, alternativeLabel), (0, _defineProperty3.default)(_classNames3, classes.labelCompleted, completed), (0, _defineProperty3.default)(_classNames3, classes.labelActive, active), _classNames3))
|
||||
},
|
||||
children
|
||||
),
|
||||
optional
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
StepLabel.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* @ignore
|
||||
* Sets the step as active. Is passed to child components.
|
||||
*/
|
||||
active: _propTypes2.default.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Stepper when it's supplied with the alternativeLabel property.
|
||||
*/
|
||||
alternativeLabel: _propTypes2.default.bool,
|
||||
/**
|
||||
* In most cases will simply be a string containing a title for the label.
|
||||
*/
|
||||
children: _propTypes2.default.node,
|
||||
/**
|
||||
* Custom styles for component.
|
||||
*/
|
||||
classes: _propTypes2.default.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes2.default.string,
|
||||
/**
|
||||
* @ignore
|
||||
* Mark the step as completed. Is passed to child components.
|
||||
*/
|
||||
completed: _propTypes2.default.bool,
|
||||
/**
|
||||
* Mark the step as disabled, will also disable the button if
|
||||
* `StepLabelButton` is a child of `StepLabel`. Is passed to child components.
|
||||
*/
|
||||
disabled: _propTypes2.default.bool,
|
||||
/**
|
||||
* Override the default icon.
|
||||
*/
|
||||
icon: _propTypes2.default.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
last: _propTypes2.default.bool,
|
||||
/**
|
||||
* The optional node to display.
|
||||
*/
|
||||
optional: _propTypes2.default.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
orientation: _propTypes2.default.oneOf(['horizontal', 'vertical'])
|
||||
} : {};
|
||||
|
||||
StepLabel.defaultProps = {
|
||||
active: false,
|
||||
alternativeLabel: false,
|
||||
completed: false,
|
||||
disabled: false,
|
||||
last: false,
|
||||
orientation: 'horizontal'
|
||||
};
|
||||
|
||||
StepLabel.muiName = 'StepLabel';
|
||||
|
||||
exports.default = (0, _withStyles2.default)(styles, { name: 'MuiStepLabel' })(StepLabel);
|
168
goTorrentWebUI/node_modules/material-ui/Stepper/StepLabel.js.flow
generated
vendored
Normal file
168
goTorrentWebUI/node_modules/material-ui/Stepper/StepLabel.js.flow
generated
vendored
Normal file
@@ -0,0 +1,168 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import withStyles from '../styles/withStyles';
|
||||
import Typography from '../Typography';
|
||||
import StepIcon from './StepIcon';
|
||||
|
||||
export const styles = theme => ({
|
||||
root: {
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
},
|
||||
horizontal: {},
|
||||
vertical: {},
|
||||
alternativeLabel: {
|
||||
flexDirection: 'column',
|
||||
},
|
||||
disabled: {
|
||||
cursor: 'default',
|
||||
},
|
||||
label: {
|
||||
color: theme.palette.text.secondary,
|
||||
},
|
||||
labelActive: {
|
||||
color: theme.palette.text.primary,
|
||||
fontWeight: 500,
|
||||
},
|
||||
labelCompleted: {
|
||||
color: theme.palette.text.primary,
|
||||
fontWeight: 500,
|
||||
},
|
||||
labelAlternativeLabel: {
|
||||
textAlign: 'center',
|
||||
marginTop: theme.spacing.unit * 2,
|
||||
},
|
||||
iconContainer: {},
|
||||
iconContainerNoAlternative: {
|
||||
paddingRight: theme.spacing.unit,
|
||||
},
|
||||
labelContainer: {
|
||||
width: '100%',
|
||||
},
|
||||
});
|
||||
|
||||
function StepLabel(props) {
|
||||
const {
|
||||
active,
|
||||
alternativeLabel,
|
||||
children,
|
||||
classes,
|
||||
className: classNameProp,
|
||||
completed,
|
||||
disabled,
|
||||
icon,
|
||||
last,
|
||||
optional,
|
||||
orientation,
|
||||
...other
|
||||
} = props;
|
||||
|
||||
return (
|
||||
<span
|
||||
className={classNames(
|
||||
classes.root,
|
||||
classes[orientation],
|
||||
{
|
||||
[classes.disabled]: disabled,
|
||||
[classes.alternativeLabel]: alternativeLabel,
|
||||
},
|
||||
classNameProp,
|
||||
)}
|
||||
{...other}
|
||||
>
|
||||
{icon && (
|
||||
<span
|
||||
className={classNames(classes.iconContainer, {
|
||||
[classes.iconContainerNoAlternative]: !alternativeLabel,
|
||||
})}
|
||||
>
|
||||
<StepIcon
|
||||
completed={completed}
|
||||
active={active}
|
||||
icon={icon}
|
||||
alternativeLabel={alternativeLabel}
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
<span className={classes.labelContainer}>
|
||||
<Typography
|
||||
variant="body1"
|
||||
component="span"
|
||||
className={classNames(classes.label, {
|
||||
[classes.labelAlternativeLabel]: alternativeLabel,
|
||||
[classes.labelCompleted]: completed,
|
||||
[classes.labelActive]: active,
|
||||
})}
|
||||
>
|
||||
{children}
|
||||
</Typography>
|
||||
{optional}
|
||||
</span>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
StepLabel.propTypes = {
|
||||
/**
|
||||
* @ignore
|
||||
* Sets the step as active. Is passed to child components.
|
||||
*/
|
||||
active: PropTypes.bool,
|
||||
/**
|
||||
* @ignore
|
||||
* Set internally by Stepper when it's supplied with the alternativeLabel property.
|
||||
*/
|
||||
alternativeLabel: PropTypes.bool,
|
||||
/**
|
||||
* In most cases will simply be a string containing a title for the label.
|
||||
*/
|
||||
children: PropTypes.node,
|
||||
/**
|
||||
* Custom styles for component.
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* @ignore
|
||||
* Mark the step as completed. Is passed to child components.
|
||||
*/
|
||||
completed: PropTypes.bool,
|
||||
/**
|
||||
* Mark the step as disabled, will also disable the button if
|
||||
* `StepLabelButton` is a child of `StepLabel`. Is passed to child components.
|
||||
*/
|
||||
disabled: PropTypes.bool,
|
||||
/**
|
||||
* Override the default icon.
|
||||
*/
|
||||
icon: PropTypes.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
last: PropTypes.bool,
|
||||
/**
|
||||
* The optional node to display.
|
||||
*/
|
||||
optional: PropTypes.node,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
||||
};
|
||||
|
||||
StepLabel.defaultProps = {
|
||||
active: false,
|
||||
alternativeLabel: false,
|
||||
completed: false,
|
||||
disabled: false,
|
||||
last: false,
|
||||
orientation: 'horizontal',
|
||||
};
|
||||
|
||||
StepLabel.muiName = 'StepLabel';
|
||||
|
||||
export default withStyles(styles, { name: 'MuiStepLabel' })(StepLabel);
|
95
goTorrentWebUI/node_modules/material-ui/Stepper/StepPositionIcon.js
generated
vendored
Normal file
95
goTorrentWebUI/node_modules/material-ui/Stepper/StepPositionIcon.js
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.styles = undefined;
|
||||
|
||||
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
||||
|
||||
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
||||
|
||||
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);
|
||||
|
||||
var _withStyles = require('../styles/withStyles');
|
||||
|
||||
var _withStyles2 = _interopRequireDefault(_withStyles);
|
||||
|
||||
var _SvgIcon = require('../SvgIcon');
|
||||
|
||||
var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var styles = exports.styles = function styles(theme) {
|
||||
return {
|
||||
root: {
|
||||
color: theme.palette.text.disabled
|
||||
},
|
||||
active: {
|
||||
color: theme.palette.primary.main
|
||||
},
|
||||
text: {
|
||||
fill: theme.palette.primary.contrastText,
|
||||
fontSize: theme.typography.caption.fontSize,
|
||||
fontFamily: theme.typography.fontFamily
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
/**
|
||||
* @ignore - internal component.
|
||||
*/
|
||||
|
||||
var _ref = _react2.default.createElement('circle', { cx: '12', cy: '12', r: '12' });
|
||||
|
||||
function StepPositionIcon(props) {
|
||||
var position = props.position,
|
||||
classes = props.classes,
|
||||
classNameProp = props.className,
|
||||
active = props.active;
|
||||
|
||||
var className = (0, _classnames2.default)(classes.root, (0, _defineProperty3.default)({}, classes.active, active), classNameProp);
|
||||
|
||||
return _react2.default.createElement(
|
||||
_SvgIcon2.default,
|
||||
{ className: className },
|
||||
_ref,
|
||||
_react2.default.createElement(
|
||||
'text',
|
||||
{ className: classes.text, x: '12', y: '16', textAnchor: 'middle' },
|
||||
position
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
StepPositionIcon.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* Whether this step is active.
|
||||
*/
|
||||
active: _propTypes2.default.bool,
|
||||
/**
|
||||
* Classses for component style customizations.
|
||||
*/
|
||||
classes: _propTypes2.default.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes2.default.string,
|
||||
/**
|
||||
* The step position as a number.
|
||||
*/
|
||||
position: _propTypes2.default.node
|
||||
} : {};
|
||||
|
||||
exports.default = (0, _withStyles2.default)(styles, { name: 'MuiStepPosition' })(StepPositionIcon);
|
63
goTorrentWebUI/node_modules/material-ui/Stepper/StepPositionIcon.js.flow
generated
vendored
Normal file
63
goTorrentWebUI/node_modules/material-ui/Stepper/StepPositionIcon.js.flow
generated
vendored
Normal file
@@ -0,0 +1,63 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import withStyles from '../styles/withStyles';
|
||||
import SvgIcon from '../SvgIcon';
|
||||
|
||||
export const styles = theme => ({
|
||||
root: {
|
||||
color: theme.palette.text.disabled,
|
||||
},
|
||||
active: {
|
||||
color: theme.palette.primary.main,
|
||||
},
|
||||
text: {
|
||||
fill: theme.palette.primary.contrastText,
|
||||
fontSize: theme.typography.caption.fontSize,
|
||||
fontFamily: theme.typography.fontFamily,
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* @ignore - internal component.
|
||||
*/
|
||||
function StepPositionIcon(props) {
|
||||
const { position, classes, className: classNameProp, active } = props;
|
||||
const className = classNames(
|
||||
classes.root,
|
||||
{
|
||||
[classes.active]: active,
|
||||
},
|
||||
classNameProp,
|
||||
);
|
||||
|
||||
return (
|
||||
<SvgIcon className={className}>
|
||||
<circle cx="12" cy="12" r="12" />
|
||||
<text className={classes.text} x="12" y="16" textAnchor="middle">
|
||||
{position}
|
||||
</text>
|
||||
</SvgIcon>
|
||||
);
|
||||
}
|
||||
|
||||
StepPositionIcon.propTypes = {
|
||||
/**
|
||||
* Whether this step is active.
|
||||
*/
|
||||
active: PropTypes.bool,
|
||||
/**
|
||||
* Classses for component style customizations.
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* The step position as a number.
|
||||
*/
|
||||
position: PropTypes.node,
|
||||
};
|
||||
|
||||
export default withStyles(styles, { name: 'MuiStepPosition' })(StepPositionIcon);
|
26
goTorrentWebUI/node_modules/material-ui/Stepper/Stepper.d.ts
generated
vendored
Normal file
26
goTorrentWebUI/node_modules/material-ui/Stepper/Stepper.d.ts
generated
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import * as React from 'react';
|
||||
import { StandardProps } from '..';
|
||||
import { PaperProps } from '../Paper';
|
||||
import { PaperClassKey } from '../Paper/Paper';
|
||||
|
||||
export type Orientation = 'horizontal' | 'vertical';
|
||||
|
||||
export interface StepperProps extends StandardProps<PaperProps, StepperClasskey> {
|
||||
activeStep?: number;
|
||||
alternativeLabel?: boolean;
|
||||
children: React.ReactNode;
|
||||
connector?: React.ReactElement<any> | React.ReactNode;
|
||||
nonLinear?: boolean;
|
||||
orientation?: Orientation;
|
||||
}
|
||||
|
||||
export type StepperClasskey =
|
||||
| PaperClassKey
|
||||
| 'root'
|
||||
| 'horizontal'
|
||||
| 'vertical'
|
||||
| 'alternativeLabel';
|
||||
|
||||
declare const Stepper: React.ComponentType<StepperProps>;
|
||||
|
||||
export default Stepper;
|
161
goTorrentWebUI/node_modules/material-ui/Stepper/Stepper.js
generated
vendored
Normal file
161
goTorrentWebUI/node_modules/material-ui/Stepper/Stepper.js
generated
vendored
Normal file
@@ -0,0 +1,161 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.styles = undefined;
|
||||
|
||||
var _extends2 = require('babel-runtime/helpers/extends');
|
||||
|
||||
var _extends3 = _interopRequireDefault(_extends2);
|
||||
|
||||
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
||||
|
||||
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
||||
|
||||
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
||||
|
||||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
||||
|
||||
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);
|
||||
|
||||
var _withStyles = require('../styles/withStyles');
|
||||
|
||||
var _withStyles2 = _interopRequireDefault(_withStyles);
|
||||
|
||||
var _Paper = require('../Paper');
|
||||
|
||||
var _Paper2 = _interopRequireDefault(_Paper);
|
||||
|
||||
var _StepConnector = require('./StepConnector');
|
||||
|
||||
var _StepConnector2 = _interopRequireDefault(_StepConnector);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
// @inheritedComponent Paper
|
||||
|
||||
var styles = exports.styles = function styles(theme) {
|
||||
return {
|
||||
root: {
|
||||
display: 'flex',
|
||||
padding: theme.spacing.unit * 3
|
||||
},
|
||||
horizontal: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center'
|
||||
},
|
||||
vertical: {
|
||||
flexDirection: 'column'
|
||||
},
|
||||
alternativeLabel: {
|
||||
alignItems: 'flex-start'
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
function Stepper(props) {
|
||||
var activeStep = props.activeStep,
|
||||
alternativeLabel = props.alternativeLabel,
|
||||
children = props.children,
|
||||
classes = props.classes,
|
||||
classNameProp = props.className,
|
||||
connectorProp = props.connector,
|
||||
nonLinear = props.nonLinear,
|
||||
orientation = props.orientation,
|
||||
other = (0, _objectWithoutProperties3.default)(props, ['activeStep', 'alternativeLabel', 'children', 'classes', 'className', 'connector', 'nonLinear', 'orientation']);
|
||||
|
||||
|
||||
var className = (0, _classnames2.default)(classes.root, classes[orientation], (0, _defineProperty3.default)({}, classes.alternativeLabel, alternativeLabel), classNameProp);
|
||||
|
||||
var connector = _react2.default.isValidElement(connectorProp) ? _react2.default.cloneElement(connectorProp, { orientation: orientation }) : null;
|
||||
var childrenArray = _react2.default.Children.toArray(children);
|
||||
var steps = childrenArray.map(function (step, index) {
|
||||
var controlProps = {
|
||||
index: index,
|
||||
orientation: orientation,
|
||||
active: false,
|
||||
completed: false,
|
||||
disabled: false,
|
||||
last: index + 1 === childrenArray.length,
|
||||
alternativeLabel: alternativeLabel,
|
||||
connector: connectorProp
|
||||
};
|
||||
|
||||
if (activeStep === index) {
|
||||
controlProps.active = true;
|
||||
} else if (!nonLinear && activeStep > index) {
|
||||
controlProps.completed = true;
|
||||
} else if (!nonLinear && activeStep < index) {
|
||||
controlProps.disabled = true;
|
||||
}
|
||||
|
||||
return [!alternativeLabel && connector && index > 0 && _react2.default.cloneElement(connector, {
|
||||
key: index // eslint-disable-line react/no-array-index-key
|
||||
}), _react2.default.cloneElement(step, (0, _extends3.default)({}, controlProps, step.props))];
|
||||
});
|
||||
|
||||
return _react2.default.createElement(
|
||||
_Paper2.default,
|
||||
(0, _extends3.default)({ square: true, elevation: 0, className: className }, other),
|
||||
steps
|
||||
);
|
||||
}
|
||||
|
||||
Stepper.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* Set the active step (zero based index).
|
||||
*/
|
||||
activeStep: _propTypes2.default.number,
|
||||
/**
|
||||
* If set to 'true' and orientation is horizontal,
|
||||
* then the step label will be positioned under the icon.
|
||||
*/
|
||||
alternativeLabel: _propTypes2.default.bool,
|
||||
/**
|
||||
* Two or more `<Step />` components.
|
||||
*/
|
||||
children: _propTypes2.default.node.isRequired,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: _propTypes2.default.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes2.default.string,
|
||||
/**
|
||||
* A component to be placed between each step.
|
||||
*/
|
||||
connector: _propTypes2.default.element,
|
||||
/**
|
||||
* If set the `Stepper` will not assist in controlling steps for linear flow.
|
||||
*/
|
||||
nonLinear: _propTypes2.default.bool,
|
||||
/**
|
||||
* The stepper orientation (layout flow direction).
|
||||
*/
|
||||
orientation: _propTypes2.default.oneOf(['horizontal', 'vertical'])
|
||||
} : {};
|
||||
|
||||
Stepper.defaultProps = {
|
||||
activeStep: 0,
|
||||
alternativeLabel: false,
|
||||
connector: _react2.default.createElement(_StepConnector2.default, null),
|
||||
nonLinear: false,
|
||||
orientation: 'horizontal'
|
||||
};
|
||||
|
||||
Stepper.muiName = 'Stepper';
|
||||
|
||||
exports.default = (0, _withStyles2.default)(styles, { name: 'MuiStepper' })(Stepper);
|
137
goTorrentWebUI/node_modules/material-ui/Stepper/Stepper.js.flow
generated
vendored
Normal file
137
goTorrentWebUI/node_modules/material-ui/Stepper/Stepper.js.flow
generated
vendored
Normal file
@@ -0,0 +1,137 @@
|
||||
// @inheritedComponent Paper
|
||||
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import classNames from 'classnames';
|
||||
import withStyles from '../styles/withStyles';
|
||||
import Paper from '../Paper';
|
||||
import StepConnector from './StepConnector';
|
||||
|
||||
export const styles = theme => ({
|
||||
root: {
|
||||
display: 'flex',
|
||||
padding: theme.spacing.unit * 3,
|
||||
},
|
||||
horizontal: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
},
|
||||
vertical: {
|
||||
flexDirection: 'column',
|
||||
},
|
||||
alternativeLabel: {
|
||||
alignItems: 'flex-start',
|
||||
},
|
||||
});
|
||||
|
||||
function Stepper(props) {
|
||||
const {
|
||||
activeStep,
|
||||
alternativeLabel,
|
||||
children,
|
||||
classes,
|
||||
className: classNameProp,
|
||||
connector: connectorProp,
|
||||
nonLinear,
|
||||
orientation,
|
||||
...other
|
||||
} = props;
|
||||
|
||||
const className = classNames(
|
||||
classes.root,
|
||||
classes[orientation],
|
||||
{
|
||||
[classes.alternativeLabel]: alternativeLabel,
|
||||
},
|
||||
classNameProp,
|
||||
);
|
||||
|
||||
const connector = React.isValidElement(connectorProp)
|
||||
? React.cloneElement(connectorProp, { orientation })
|
||||
: null;
|
||||
const childrenArray = React.Children.toArray(children);
|
||||
const steps = childrenArray.map((step, index) => {
|
||||
const controlProps = {
|
||||
index,
|
||||
orientation,
|
||||
active: false,
|
||||
completed: false,
|
||||
disabled: false,
|
||||
last: index + 1 === childrenArray.length,
|
||||
alternativeLabel,
|
||||
connector: connectorProp,
|
||||
};
|
||||
|
||||
if (activeStep === index) {
|
||||
controlProps.active = true;
|
||||
} else if (!nonLinear && activeStep > index) {
|
||||
controlProps.completed = true;
|
||||
} else if (!nonLinear && activeStep < index) {
|
||||
controlProps.disabled = true;
|
||||
}
|
||||
|
||||
return [
|
||||
!alternativeLabel &&
|
||||
connector &&
|
||||
index > 0 &&
|
||||
React.cloneElement(connector, {
|
||||
key: index, // eslint-disable-line react/no-array-index-key
|
||||
}),
|
||||
React.cloneElement(step, { ...controlProps, ...step.props }),
|
||||
];
|
||||
});
|
||||
|
||||
return (
|
||||
<Paper square elevation={0} className={className} {...other}>
|
||||
{steps}
|
||||
</Paper>
|
||||
);
|
||||
}
|
||||
|
||||
Stepper.propTypes = {
|
||||
/**
|
||||
* Set the active step (zero based index).
|
||||
*/
|
||||
activeStep: PropTypes.number,
|
||||
/**
|
||||
* If set to 'true' and orientation is horizontal,
|
||||
* then the step label will be positioned under the icon.
|
||||
*/
|
||||
alternativeLabel: PropTypes.bool,
|
||||
/**
|
||||
* Two or more `<Step />` components.
|
||||
*/
|
||||
children: PropTypes.node.isRequired,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: PropTypes.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: PropTypes.string,
|
||||
/**
|
||||
* A component to be placed between each step.
|
||||
*/
|
||||
connector: PropTypes.element,
|
||||
/**
|
||||
* If set the `Stepper` will not assist in controlling steps for linear flow.
|
||||
*/
|
||||
nonLinear: PropTypes.bool,
|
||||
/**
|
||||
* The stepper orientation (layout flow direction).
|
||||
*/
|
||||
orientation: PropTypes.oneOf(['horizontal', 'vertical']),
|
||||
};
|
||||
|
||||
Stepper.defaultProps = {
|
||||
activeStep: 0,
|
||||
alternativeLabel: false,
|
||||
connector: <StepConnector />,
|
||||
nonLinear: false,
|
||||
orientation: 'horizontal',
|
||||
};
|
||||
|
||||
Stepper.muiName = 'Stepper';
|
||||
|
||||
export default withStyles(styles, { name: 'MuiStepper' })(Stepper);
|
12
goTorrentWebUI/node_modules/material-ui/Stepper/index.d.ts
generated
vendored
Normal file
12
goTorrentWebUI/node_modules/material-ui/Stepper/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
export { default } from './Stepper';
|
||||
export * from './Stepper';
|
||||
export { default as Step } from './Step';
|
||||
export * from './Step';
|
||||
export { default as StepButton } from './StepButton';
|
||||
export * from './StepButton';
|
||||
export { default as StepContent } from './StepContent';
|
||||
export * from './StepContent';
|
||||
export { default as StepIcon } from './StepIcon';
|
||||
export * from './StepIcon';
|
||||
export { default as StepLabel } from './StepLabel';
|
||||
export * from './StepLabel';
|
61
goTorrentWebUI/node_modules/material-ui/Stepper/index.js
generated
vendored
Normal file
61
goTorrentWebUI/node_modules/material-ui/Stepper/index.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
|
||||
var _Stepper = require('./Stepper');
|
||||
|
||||
Object.defineProperty(exports, 'default', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_Stepper).default;
|
||||
}
|
||||
});
|
||||
|
||||
var _Step = require('./Step');
|
||||
|
||||
Object.defineProperty(exports, 'Step', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_Step).default;
|
||||
}
|
||||
});
|
||||
|
||||
var _StepButton = require('./StepButton');
|
||||
|
||||
Object.defineProperty(exports, 'StepButton', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_StepButton).default;
|
||||
}
|
||||
});
|
||||
|
||||
var _StepContent = require('./StepContent');
|
||||
|
||||
Object.defineProperty(exports, 'StepContent', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_StepContent).default;
|
||||
}
|
||||
});
|
||||
|
||||
var _StepIcon = require('./StepIcon');
|
||||
|
||||
Object.defineProperty(exports, 'StepIcon', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_StepIcon).default;
|
||||
}
|
||||
});
|
||||
|
||||
var _StepLabel = require('./StepLabel');
|
||||
|
||||
Object.defineProperty(exports, 'StepLabel', {
|
||||
enumerable: true,
|
||||
get: function get() {
|
||||
return _interopRequireDefault(_StepLabel).default;
|
||||
}
|
||||
});
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
6
goTorrentWebUI/node_modules/material-ui/Stepper/index.js.flow
generated
vendored
Normal file
6
goTorrentWebUI/node_modules/material-ui/Stepper/index.js.flow
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export { default } from './Stepper';
|
||||
export { default as Step } from './Step';
|
||||
export { default as StepButton } from './StepButton';
|
||||
export { default as StepContent } from './StepContent';
|
||||
export { default as StepIcon } from './StepIcon';
|
||||
export { default as StepLabel } from './StepLabel';
|
Reference in New Issue
Block a user