Completely updated React, fixed #11, (hopefully)
This commit is contained in:
99
goTorrentWebUI/node_modules/material-ui/AppBar/AppBar.js
generated
vendored
99
goTorrentWebUI/node_modules/material-ui/AppBar/AppBar.js
generated
vendored
@@ -17,13 +17,14 @@ var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProp
|
||||
|
||||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
||||
|
||||
var _ref;
|
||||
// @inheritedComponent Paper
|
||||
|
||||
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);
|
||||
@@ -40,9 +41,11 @@ var _Paper2 = _interopRequireDefault(_Paper);
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var babelPluginFlowReactPropTypes_proptype_Node = require('react').babelPluginFlowReactPropTypes_proptype_Node || require('prop-types').any;
|
||||
// @inheritedComponent Paper
|
||||
|
||||
var styles = exports.styles = function styles(theme) {
|
||||
var backgroundColorDefault = theme.palette.type === 'light' ? theme.palette.grey[100] : theme.palette.grey[900];
|
||||
|
||||
return {
|
||||
root: {
|
||||
display: 'flex',
|
||||
@@ -64,57 +67,30 @@ var styles = exports.styles = function styles(theme) {
|
||||
left: 'auto',
|
||||
right: 0
|
||||
},
|
||||
positionSticky: {
|
||||
position: 'sticky',
|
||||
top: 0,
|
||||
left: 'auto',
|
||||
right: 0
|
||||
},
|
||||
positionStatic: {
|
||||
position: 'static',
|
||||
flexShrink: 0
|
||||
position: 'static'
|
||||
},
|
||||
colorDefault: {
|
||||
backgroundColor: theme.palette.background.appBar,
|
||||
color: theme.palette.getContrastText(theme.palette.background.appBar)
|
||||
backgroundColor: backgroundColorDefault,
|
||||
color: theme.palette.getContrastText(backgroundColorDefault)
|
||||
},
|
||||
colorPrimary: {
|
||||
backgroundColor: theme.palette.primary[500],
|
||||
color: theme.palette.getContrastText(theme.palette.primary[500])
|
||||
backgroundColor: theme.palette.primary.main,
|
||||
color: theme.palette.primary.contrastText
|
||||
},
|
||||
colorAccent: {
|
||||
backgroundColor: theme.palette.secondary.A200,
|
||||
color: theme.palette.getContrastText(theme.palette.secondary.A200)
|
||||
colorSecondary: {
|
||||
backgroundColor: theme.palette.secondary.main,
|
||||
color: theme.palette.secondary.contrastText
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
var babelPluginFlowReactPropTypes_proptype_Color = require('prop-types').oneOf(['inherit', 'primary', 'accent', 'default']);
|
||||
|
||||
var babelPluginFlowReactPropTypes_proptype_Position = require('prop-types').oneOf(['static', 'fixed', 'absolute']);
|
||||
|
||||
var babelPluginFlowReactPropTypes_proptype_Props = {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children: typeof babelPluginFlowReactPropTypes_proptype_Node === 'function' ? babelPluginFlowReactPropTypes_proptype_Node : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_Node),
|
||||
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: require('prop-types').object,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: require('prop-types').string,
|
||||
|
||||
/**
|
||||
* The color of the component. It's using the theme palette when that makes sense.
|
||||
*/
|
||||
color: require('prop-types').oneOf(['inherit', 'primary', 'accent', 'default']),
|
||||
|
||||
/**
|
||||
* The positioning type.
|
||||
*/
|
||||
position: require('prop-types').oneOf(['static', 'fixed', 'absolute'])
|
||||
};
|
||||
|
||||
|
||||
function AppBar(props) {
|
||||
var _classNames;
|
||||
|
||||
@@ -126,7 +102,7 @@ function AppBar(props) {
|
||||
other = (0, _objectWithoutProperties3.default)(props, ['children', 'classes', 'className', 'color', 'position']);
|
||||
|
||||
|
||||
var className = (0, _classnames2.default)(classes.root, classes['position' + (0, _helpers.capitalizeFirstLetter)(position)], (_classNames = {}, (0, _defineProperty3.default)(_classNames, classes['color' + (0, _helpers.capitalizeFirstLetter)(color)], color !== 'inherit'), (0, _defineProperty3.default)(_classNames, 'mui-fixed', position === 'fixed'), _classNames), classNameProp);
|
||||
var className = (0, _classnames2.default)(classes.root, classes['position' + (0, _helpers.capitalize)(position)], (_classNames = {}, (0, _defineProperty3.default)(_classNames, classes['color' + (0, _helpers.capitalize)(color)], color !== 'inherit'), (0, _defineProperty3.default)(_classNames, 'mui-fixed', position === 'fixed'), _classNames), classNameProp);
|
||||
|
||||
return _react2.default.createElement(
|
||||
_Paper2.default,
|
||||
@@ -135,12 +111,31 @@ function AppBar(props) {
|
||||
);
|
||||
}
|
||||
|
||||
AppBar.propTypes = process.env.NODE_ENV !== "production" ? (_ref = {
|
||||
classes: require('prop-types').object.isRequired,
|
||||
color: require('prop-types').oneOf(['inherit', 'primary', 'accent', 'default']).isRequired,
|
||||
position: require('prop-types').oneOf(['static', 'fixed', 'absolute']).isRequired,
|
||||
children: typeof babelPluginFlowReactPropTypes_proptype_Node === 'function' ? babelPluginFlowReactPropTypes_proptype_Node : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_Node)
|
||||
}, (0, _defineProperty3.default)(_ref, 'classes', require('prop-types').object), (0, _defineProperty3.default)(_ref, 'className', require('prop-types').string), (0, _defineProperty3.default)(_ref, 'color', require('prop-types').oneOf(['inherit', 'primary', 'accent', 'default'])), (0, _defineProperty3.default)(_ref, 'position', require('prop-types').oneOf(['static', 'fixed', 'absolute'])), _ref) : {};
|
||||
AppBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* The content of the component.
|
||||
*/
|
||||
children: _propTypes2.default.node.isRequired,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: _propTypes2.default.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes2.default.string,
|
||||
/**
|
||||
* The color of the component. It supports those theme colors that make sense for this component.
|
||||
*/
|
||||
color: _propTypes2.default.oneOf(['inherit', 'primary', 'secondary', 'default']),
|
||||
/**
|
||||
* The positioning type. The behavior of the different options is described
|
||||
* [here](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
|
||||
* Note: `sticky` is not universally supported and will fall back to `static` when unavailable.
|
||||
*/
|
||||
position: _propTypes2.default.oneOf(['fixed', 'absolute', 'sticky', 'static'])
|
||||
} : {};
|
||||
|
||||
AppBar.defaultProps = {
|
||||
color: 'primary',
|
||||
position: 'fixed'
|
||||
|
Reference in New Issue
Block a user