Completely updated React, fixed #11, (hopefully)
This commit is contained in:
		
							
								
								
									
										22
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/Step.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								goTorrentWebUI/node_modules/material-ui/es/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;
 | 
			
		||||
							
								
								
									
										120
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/Step.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										120
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/Step.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,120 @@
 | 
			
		||||
import _extends from 'babel-runtime/helpers/extends';
 | 
			
		||||
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
 | 
			
		||||
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
 | 
			
		||||
  } = props,
 | 
			
		||||
        other = _objectWithoutProperties(props, ['active', 'alternativeLabel', 'children', 'classes', 'className', 'completed', 'connector', 'disabled', 'index', 'last', 'orientation']);
 | 
			
		||||
 | 
			
		||||
  const className = classNames(classes.root, classes[orientation], {
 | 
			
		||||
    [classes.alternativeLabel]: alternativeLabel
 | 
			
		||||
  }, classNameProp);
 | 
			
		||||
 | 
			
		||||
  return React.createElement(
 | 
			
		||||
    'div',
 | 
			
		||||
    _extends({ className: className }, other),
 | 
			
		||||
    React.Children.map(children, child => React.cloneElement(child, _extends({
 | 
			
		||||
      active,
 | 
			
		||||
      alternativeLabel,
 | 
			
		||||
      completed,
 | 
			
		||||
      disabled,
 | 
			
		||||
      icon: index + 1,
 | 
			
		||||
      last,
 | 
			
		||||
      orientation
 | 
			
		||||
    }, child.props))),
 | 
			
		||||
    connector && alternativeLabel && !last && React.cloneElement(connector, { orientation, alternativeLabel })
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Step.propTypes = process.env.NODE_ENV !== "production" ? {
 | 
			
		||||
  /**
 | 
			
		||||
   * 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/es/Stepper/StepButton.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								goTorrentWebUI/node_modules/material-ui/es/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;
 | 
			
		||||
							
								
								
									
										111
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepButton.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										111
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepButton.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,111 @@
 | 
			
		||||
import _extends from 'babel-runtime/helpers/extends';
 | 
			
		||||
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
 | 
			
		||||
// @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
 | 
			
		||||
  } = props,
 | 
			
		||||
        other = _objectWithoutProperties(props, ['active', 'alternativeLabel', 'children', 'classes', 'className', 'completed', 'disabled', 'icon', 'last', 'optional', 'orientation']);
 | 
			
		||||
 | 
			
		||||
  const childProps = {
 | 
			
		||||
    active,
 | 
			
		||||
    alternativeLabel,
 | 
			
		||||
    completed,
 | 
			
		||||
    disabled,
 | 
			
		||||
    icon,
 | 
			
		||||
    optional,
 | 
			
		||||
    orientation
 | 
			
		||||
  };
 | 
			
		||||
  const child = isMuiElement(children, ['StepLabel']) ? React.cloneElement(children, childProps) : React.createElement(
 | 
			
		||||
    StepLabel,
 | 
			
		||||
    childProps,
 | 
			
		||||
    children
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
  return React.createElement(
 | 
			
		||||
    ButtonBase,
 | 
			
		||||
    _extends({ disabled: disabled, className: classNames(classes.root, classNameProp) }, other),
 | 
			
		||||
    child
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
StepButton.propTypes = process.env.NODE_ENV !== "production" ? {
 | 
			
		||||
  /**
 | 
			
		||||
   * @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/es/Stepper/StepConnector.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								goTorrentWebUI/node_modules/material-ui/es/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;
 | 
			
		||||
							
								
								
									
										85
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepConnector.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepConnector.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,85 @@
 | 
			
		||||
import _extends from 'babel-runtime/helpers/extends';
 | 
			
		||||
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
 | 
			
		||||
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 } = props,
 | 
			
		||||
        other = _objectWithoutProperties(props, ['alternativeLabel', 'className', 'classes', 'orientation']);
 | 
			
		||||
 | 
			
		||||
  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 React.createElement(
 | 
			
		||||
    'div',
 | 
			
		||||
    _extends({ className: className }, other),
 | 
			
		||||
    React.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: 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/es/Stepper/StepContent.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								goTorrentWebUI/node_modules/material-ui/es/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;
 | 
			
		||||
							
								
								
									
										120
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepContent.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										120
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepContent.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,120 @@
 | 
			
		||||
import _extends from 'babel-runtime/helpers/extends';
 | 
			
		||||
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
 | 
			
		||||
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
 | 
			
		||||
  } = props,
 | 
			
		||||
        other = _objectWithoutProperties(props, ['active', 'alternativeLabel', 'children', 'classes', 'className', 'completed', 'last', 'optional', 'orientation', 'transition', 'transitionDuration']);
 | 
			
		||||
 | 
			
		||||
  process.env.NODE_ENV !== "production" ? warning(orientation === 'vertical', 'Material-UI: <StepContent /> is only designed for use with the vertical stepper.') : void 0;
 | 
			
		||||
 | 
			
		||||
  const className = classNames(classes.root, {
 | 
			
		||||
    [classes.last]: last
 | 
			
		||||
  }, classNameProp);
 | 
			
		||||
 | 
			
		||||
  return React.createElement(
 | 
			
		||||
    'div',
 | 
			
		||||
    _extends({ className: className }, other),
 | 
			
		||||
    React.createElement(
 | 
			
		||||
      Transition,
 | 
			
		||||
      {
 | 
			
		||||
        'in': active,
 | 
			
		||||
        className: classes.transition,
 | 
			
		||||
        timeout: transitionDuration,
 | 
			
		||||
        unmountOnExit: true
 | 
			
		||||
      },
 | 
			
		||||
      children
 | 
			
		||||
    )
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
StepContent.propTypes = process.env.NODE_ENV !== "production" ? {
 | 
			
		||||
  /**
 | 
			
		||||
   * @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/es/Stepper/StepIcon.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								goTorrentWebUI/node_modules/material-ui/es/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;
 | 
			
		||||
							
								
								
									
										54
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepIcon.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepIcon.js
									
									
									
										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 React.createElement(CheckCircle, { className: classNames(classes.root, classes.completed) });
 | 
			
		||||
    }
 | 
			
		||||
    return React.createElement(StepPositionIcon, { className: classes.root, position: icon, active: active });
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  return icon;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
StepIcon.propTypes = process.env.NODE_ENV !== "production" ? {
 | 
			
		||||
  /**
 | 
			
		||||
   * 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/es/Stepper/StepLabel.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								goTorrentWebUI/node_modules/material-ui/es/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;
 | 
			
		||||
							
								
								
									
										168
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepLabel.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										168
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepLabel.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,168 @@
 | 
			
		||||
import _extends from 'babel-runtime/helpers/extends';
 | 
			
		||||
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
 | 
			
		||||
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
 | 
			
		||||
  } = props,
 | 
			
		||||
        other = _objectWithoutProperties(props, ['active', 'alternativeLabel', 'children', 'classes', 'className', 'completed', 'disabled', 'icon', 'last', 'optional', 'orientation']);
 | 
			
		||||
 | 
			
		||||
  return React.createElement(
 | 
			
		||||
    'span',
 | 
			
		||||
    _extends({
 | 
			
		||||
      className: classNames(classes.root, classes[orientation], {
 | 
			
		||||
        [classes.disabled]: disabled,
 | 
			
		||||
        [classes.alternativeLabel]: alternativeLabel
 | 
			
		||||
      }, classNameProp)
 | 
			
		||||
    }, other),
 | 
			
		||||
    icon && React.createElement(
 | 
			
		||||
      'span',
 | 
			
		||||
      {
 | 
			
		||||
        className: classNames(classes.iconContainer, {
 | 
			
		||||
          [classes.iconContainerNoAlternative]: !alternativeLabel
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
      React.createElement(StepIcon, {
 | 
			
		||||
        completed: completed,
 | 
			
		||||
        active: active,
 | 
			
		||||
        icon: icon,
 | 
			
		||||
        alternativeLabel: alternativeLabel
 | 
			
		||||
      })
 | 
			
		||||
    ),
 | 
			
		||||
    React.createElement(
 | 
			
		||||
      'span',
 | 
			
		||||
      { className: classes.labelContainer },
 | 
			
		||||
      React.createElement(
 | 
			
		||||
        Typography,
 | 
			
		||||
        {
 | 
			
		||||
          variant: 'body1',
 | 
			
		||||
          component: 'span',
 | 
			
		||||
          className: classNames(classes.label, {
 | 
			
		||||
            [classes.labelAlternativeLabel]: alternativeLabel,
 | 
			
		||||
            [classes.labelCompleted]: completed,
 | 
			
		||||
            [classes.labelActive]: active
 | 
			
		||||
          })
 | 
			
		||||
        },
 | 
			
		||||
        children
 | 
			
		||||
      ),
 | 
			
		||||
      optional
 | 
			
		||||
    )
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
StepLabel.propTypes = process.env.NODE_ENV !== "production" ? {
 | 
			
		||||
  /**
 | 
			
		||||
   * @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);
 | 
			
		||||
							
								
								
									
										64
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepPositionIcon.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/StepPositionIcon.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,64 @@
 | 
			
		||||
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.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
var _ref = React.createElement('circle', { cx: '12', cy: '12', r: '12' });
 | 
			
		||||
 | 
			
		||||
function StepPositionIcon(props) {
 | 
			
		||||
  const { position, classes, className: classNameProp, active } = props;
 | 
			
		||||
  const className = classNames(classes.root, {
 | 
			
		||||
    [classes.active]: active
 | 
			
		||||
  }, classNameProp);
 | 
			
		||||
 | 
			
		||||
  return React.createElement(
 | 
			
		||||
    SvgIcon,
 | 
			
		||||
    { className: className },
 | 
			
		||||
    _ref,
 | 
			
		||||
    React.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: 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/es/Stepper/Stepper.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								goTorrentWebUI/node_modules/material-ui/es/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;
 | 
			
		||||
							
								
								
									
										126
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/Stepper.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										126
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/Stepper.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,126 @@
 | 
			
		||||
import _extends from 'babel-runtime/helpers/extends';
 | 
			
		||||
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
 | 
			
		||||
// @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
 | 
			
		||||
  } = props,
 | 
			
		||||
        other = _objectWithoutProperties(props, ['activeStep', 'alternativeLabel', 'children', 'classes', 'className', 'connector', 'nonLinear', 'orientation']);
 | 
			
		||||
 | 
			
		||||
  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, _extends({}, controlProps, step.props))];
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
  return React.createElement(
 | 
			
		||||
    Paper,
 | 
			
		||||
    _extends({ square: true, elevation: 0, className: className }, other),
 | 
			
		||||
    steps
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Stepper.propTypes = process.env.NODE_ENV !== "production" ? {
 | 
			
		||||
  /**
 | 
			
		||||
   * 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: React.createElement(StepConnector, null),
 | 
			
		||||
  nonLinear: false,
 | 
			
		||||
  orientation: 'horizontal'
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
Stepper.muiName = 'Stepper';
 | 
			
		||||
 | 
			
		||||
export default withStyles(styles, { name: 'MuiStepper' })(Stepper);
 | 
			
		||||
							
								
								
									
										12
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/index.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								goTorrentWebUI/node_modules/material-ui/es/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';
 | 
			
		||||
							
								
								
									
										6
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/index.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								goTorrentWebUI/node_modules/material-ui/es/Stepper/index.js
									
									
									
										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