Completely updated React, fixed #11, (hopefully)
This commit is contained in:
137
goTorrentWebUI/node_modules/material-ui/Input/InputLabel.js
generated
vendored
137
goTorrentWebUI/node_modules/material-ui/Input/InputLabel.js
generated
vendored
@@ -17,8 +17,6 @@ var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProp
|
||||
|
||||
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
||||
|
||||
var _ref;
|
||||
|
||||
var _react = require('react');
|
||||
|
||||
var _react2 = _interopRequireDefault(_react);
|
||||
@@ -39,19 +37,17 @@ var _Form = require('../Form');
|
||||
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
|
||||
var babelPluginFlowReactPropTypes_proptype_Node = require('react').babelPluginFlowReactPropTypes_proptype_Node || require('prop-types').any;
|
||||
|
||||
var styles = exports.styles = function styles(theme) {
|
||||
return {
|
||||
root: {
|
||||
transformOrigin: 'top ' + (theme.direction === 'ltr' ? 'left' : 'right')
|
||||
transformOrigin: 'top left'
|
||||
},
|
||||
formControl: {
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
top: 0,
|
||||
// slight alteration to spec spacing to match visual spec result
|
||||
transform: 'translate(0, ' + (theme.spacing.unit * 3 - 1) + 'px) scale(1)'
|
||||
transform: 'translate(0, ' + theme.spacing.unit * 3 + 'px) scale(1)'
|
||||
},
|
||||
labelDense: {
|
||||
// Compensation for the `Input.inputDense` style.
|
||||
@@ -59,7 +55,7 @@ var styles = exports.styles = function styles(theme) {
|
||||
},
|
||||
shrink: {
|
||||
transform: 'translate(0, 1.5px) scale(0.75)',
|
||||
transformOrigin: 'top ' + (theme.direction === 'ltr' ? 'left' : 'right')
|
||||
transformOrigin: 'top left'
|
||||
},
|
||||
animated: {
|
||||
transition: theme.transitions.create('transform', {
|
||||
@@ -68,82 +64,23 @@ var styles = exports.styles = function styles(theme) {
|
||||
})
|
||||
},
|
||||
disabled: {
|
||||
color: theme.palette.input.disabled
|
||||
color: theme.palette.text.disabled
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
var babelPluginFlowReactPropTypes_proptype_Props = {
|
||||
/**
|
||||
* The contents of the `InputLabel`.
|
||||
*/
|
||||
children: typeof babelPluginFlowReactPropTypes_proptype_Node === 'function' ? babelPluginFlowReactPropTypes_proptype_Node : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_Node),
|
||||
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: require('prop-types').object,
|
||||
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: require('prop-types').string,
|
||||
|
||||
/**
|
||||
* If `true`, the transition animation is disabled.
|
||||
*/
|
||||
disableAnimation: require('prop-types').bool,
|
||||
|
||||
/**
|
||||
* If `true`, apply disabled class.
|
||||
*/
|
||||
disabled: require('prop-types').bool,
|
||||
|
||||
/**
|
||||
* If `true`, the label will be displayed in an error state.
|
||||
*/
|
||||
error: require('prop-types').bool,
|
||||
|
||||
/**
|
||||
* `classes` property applied to the `FormControl` element.
|
||||
*/
|
||||
FormControlClasses: require('prop-types').object,
|
||||
|
||||
/**
|
||||
* If `true`, the input of this label is focused.
|
||||
*/
|
||||
focused: require('prop-types').bool,
|
||||
|
||||
/**
|
||||
* If `dense`, will adjust vertical spacing. This is normally obtained via context from
|
||||
* FormControl.
|
||||
*/
|
||||
margin: require('prop-types').oneOf(['dense']),
|
||||
|
||||
/**
|
||||
* if `true`, the label will indicate that the input is required.
|
||||
*/
|
||||
required: require('prop-types').bool,
|
||||
|
||||
/**
|
||||
* If `true`, the label is shrunk.
|
||||
*/
|
||||
shrink: require('prop-types').bool
|
||||
};
|
||||
|
||||
}; // @inheritedComponent FormLabel
|
||||
|
||||
function InputLabel(props, context) {
|
||||
var _classNames;
|
||||
|
||||
var disabled = props.disabled,
|
||||
disableAnimation = props.disableAnimation,
|
||||
children = props.children,
|
||||
var children = props.children,
|
||||
classes = props.classes,
|
||||
classNameProp = props.className,
|
||||
disableAnimation = props.disableAnimation,
|
||||
disabled = props.disabled,
|
||||
FormControlClasses = props.FormControlClasses,
|
||||
shrinkProp = props.shrink,
|
||||
marginProp = props.margin,
|
||||
other = (0, _objectWithoutProperties3.default)(props, ['disabled', 'disableAnimation', 'children', 'classes', 'className', 'FormControlClasses', 'shrink', 'margin']);
|
||||
shrinkProp = props.shrink,
|
||||
other = (0, _objectWithoutProperties3.default)(props, ['children', 'classes', 'className', 'disableAnimation', 'disabled', 'FormControlClasses', 'margin', 'shrink']);
|
||||
var muiFormControl = context.muiFormControl;
|
||||
|
||||
var shrink = shrinkProp;
|
||||
@@ -166,12 +103,54 @@ function InputLabel(props, context) {
|
||||
);
|
||||
}
|
||||
|
||||
InputLabel.propTypes = process.env.NODE_ENV !== "production" ? (_ref = {
|
||||
classes: require('prop-types').object.isRequired,
|
||||
disabled: require('prop-types').bool.isRequired,
|
||||
disableAnimation: require('prop-types').bool.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, 'disableAnimation', require('prop-types').bool), (0, _defineProperty3.default)(_ref, 'disabled', require('prop-types').bool), (0, _defineProperty3.default)(_ref, 'error', require('prop-types').bool), (0, _defineProperty3.default)(_ref, 'FormControlClasses', require('prop-types').object), (0, _defineProperty3.default)(_ref, 'focused', require('prop-types').bool), (0, _defineProperty3.default)(_ref, 'margin', require('prop-types').oneOf(['dense'])), (0, _defineProperty3.default)(_ref, 'required', require('prop-types').bool), (0, _defineProperty3.default)(_ref, 'shrink', require('prop-types').bool), _ref) : {};
|
||||
InputLabel.propTypes = process.env.NODE_ENV !== "production" ? {
|
||||
/**
|
||||
* The contents of the `InputLabel`.
|
||||
*/
|
||||
children: _propTypes2.default.node,
|
||||
/**
|
||||
* Useful to extend the style applied to components.
|
||||
*/
|
||||
classes: _propTypes2.default.object.isRequired,
|
||||
/**
|
||||
* @ignore
|
||||
*/
|
||||
className: _propTypes2.default.string,
|
||||
/**
|
||||
* If `true`, the transition animation is disabled.
|
||||
*/
|
||||
disableAnimation: _propTypes2.default.bool,
|
||||
/**
|
||||
* If `true`, apply disabled class.
|
||||
*/
|
||||
disabled: _propTypes2.default.bool,
|
||||
/**
|
||||
* If `true`, the label will be displayed in an error state.
|
||||
*/
|
||||
error: _propTypes2.default.bool,
|
||||
/**
|
||||
* If `true`, the input of this label is focused.
|
||||
*/
|
||||
focused: _propTypes2.default.bool,
|
||||
/**
|
||||
* `classes` property applied to the `FormControl` element.
|
||||
*/
|
||||
FormControlClasses: _propTypes2.default.object,
|
||||
/**
|
||||
* If `dense`, will adjust vertical spacing. This is normally obtained via context from
|
||||
* FormControl.
|
||||
*/
|
||||
margin: _propTypes2.default.oneOf(['dense']),
|
||||
/**
|
||||
* if `true`, the label will indicate that the input is required.
|
||||
*/
|
||||
required: _propTypes2.default.bool,
|
||||
/**
|
||||
* If `true`, the label is shrunk.
|
||||
*/
|
||||
shrink: _propTypes2.default.bool
|
||||
} : {};
|
||||
|
||||
InputLabel.defaultProps = {
|
||||
disabled: false,
|
||||
disableAnimation: false
|
||||
|
Reference in New Issue
Block a user