Completely updated React, fixed #11, (hopefully)

This commit is contained in:
2018-03-04 19:11:49 -05:00
parent 6e0afd6e2a
commit 34e5f5139a
13674 changed files with 333464 additions and 473223 deletions

View File

@@ -12,6 +12,10 @@ var _react = require('react');
var _react2 = _interopRequireDefault(_react);
var _propTypes = require('prop-types');
var _propTypes2 = _interopRequireDefault(_propTypes);
var _HiddenJs = require('./HiddenJs');
var _HiddenJs2 = _interopRequireDefault(_HiddenJs);
@@ -22,97 +26,6 @@ var _HiddenCss2 = _interopRequireDefault(_HiddenCss);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var babelPluginFlowReactPropTypes_proptype_Node = require('react').babelPluginFlowReactPropTypes_proptype_Node || require('prop-types').any;
var babelPluginFlowReactPropTypes_proptype_Breakpoint = require('../styles/createBreakpoints').babelPluginFlowReactPropTypes_proptype_Breakpoint || require('prop-types').any;
var babelPluginFlowReactPropTypes_proptype_Props = {
/**
* The content of the component.
*/
children: typeof babelPluginFlowReactPropTypes_proptype_Node === 'function' ? babelPluginFlowReactPropTypes_proptype_Node.isRequired ? babelPluginFlowReactPropTypes_proptype_Node.isRequired : babelPluginFlowReactPropTypes_proptype_Node : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_Node).isRequired,
/**
* @ignore
*/
className: require('prop-types').string,
/**
* Hide the given breakpoint(s).
*/
only: require('prop-types').oneOfType([typeof babelPluginFlowReactPropTypes_proptype_Breakpoint === 'function' ? babelPluginFlowReactPropTypes_proptype_Breakpoint : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_Breakpoint), require('prop-types').arrayOf(typeof babelPluginFlowReactPropTypes_proptype_Breakpoint === 'function' ? babelPluginFlowReactPropTypes_proptype_Breakpoint : require('prop-types').shape(babelPluginFlowReactPropTypes_proptype_Breakpoint))]),
/**
* If true, screens this size and up will be hidden.
*/
xsUp: require('prop-types').bool,
/**
* If true, screens this size and up will be hidden.
*/
smUp: require('prop-types').bool,
/**
* If true, screens this size and up will be hidden.
*/
mdUp: require('prop-types').bool,
/**
* If true, screens this size and up will be hidden.
*/
lgUp: require('prop-types').bool,
/**
* If true, screens this size and up will be hidden.
*/
xlUp: require('prop-types').bool,
/**
* If true, screens this size and down will be hidden.
*/
xsDown: require('prop-types').bool,
/**
* If true, screens this size and down will be hidden.
*/
smDown: require('prop-types').bool,
/**
* If true, screens this size and down will be hidden.
*/
mdDown: require('prop-types').bool,
/**
* If true, screens this size and down will be hidden.
*/
lgDown: require('prop-types').bool,
/**
* If true, screens this size and down will be hidden.
*/
xlDown: require('prop-types').bool,
/**
* Specify which implementation to use. 'js' is the default, 'css' works better for server
* side rendering.
*/
implementation: require('prop-types').oneOf(['js', 'css']),
/**
* You can use this property when choosing the `js` implementation with server side rendering.
*
* As `window.innerWidth` is unavailable on the server,
* we default to rendering an empty componenent during the first mount.
* In some situation you might want to use an heristic to approximate
* the screen width of the client browser screen width.
*
* For instance, you could be using the user-agent or the client-hints.
* http://caniuse.com/#search=client%20hint
*/
initialWidth: require('prop-types').number
};
/**
* Responsively hides children based on the selected implementation.
*/
@@ -128,19 +41,90 @@ function Hidden(props) {
return _react2.default.createElement(_HiddenCss2.default, other);
}
Hidden.propTypes = process.env.NODE_ENV !== "production" ? babelPluginFlowReactPropTypes_proptype_Props : {};
Hidden.propTypes = process.env.NODE_ENV !== "production" ? {
/**
* The content of the component.
*/
children: _propTypes2.default.node,
/**
* @ignore
*/
className: _propTypes2.default.string,
/**
* Specify which implementation to use. 'js' is the default, 'css' works better for server
* side rendering.
*/
implementation: _propTypes2.default.oneOf(['js', 'css']),
/**
* You can use this property when choosing the `js` implementation with server side rendering.
*
* As `window.innerWidth` is unavailable on the server,
* we default to rendering an empty componenent during the first mount.
* In some situation you might want to use an heristic to approximate
* the screen width of the client browser screen width.
*
* For instance, you could be using the user-agent or the client-hints.
* http://caniuse.com/#search=client%20hint
*/
initialWidth: _propTypes2.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl']),
/**
* If true, screens this size and down will be hidden.
*/
lgDown: _propTypes2.default.bool,
/**
* If true, screens this size and up will be hidden.
*/
lgUp: _propTypes2.default.bool,
/**
* If true, screens this size and down will be hidden.
*/
mdDown: _propTypes2.default.bool,
/**
* If true, screens this size and up will be hidden.
*/
mdUp: _propTypes2.default.bool,
/**
* Hide the given breakpoint(s).
*/
only: _propTypes2.default.oneOfType([_propTypes2.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl']), _propTypes2.default.arrayOf(_propTypes2.default.oneOf(['xs', 'sm', 'md', 'lg', 'xl']))]),
/**
* If true, screens this size and down will be hidden.
*/
smDown: _propTypes2.default.bool,
/**
* If true, screens this size and up will be hidden.
*/
smUp: _propTypes2.default.bool,
/**
* If true, screens this size and down will be hidden.
*/
xlDown: _propTypes2.default.bool,
/**
* If true, screens this size and up will be hidden.
*/
xlUp: _propTypes2.default.bool,
/**
* If true, screens this size and down will be hidden.
*/
xsDown: _propTypes2.default.bool,
/**
* If true, screens this size and up will be hidden.
*/
xsUp: _propTypes2.default.bool
} : {};
Hidden.defaultProps = {
implementation: 'js',
xsUp: false,
smUp: false,
mdUp: false,
lgDown: false,
lgUp: false,
mdDown: false,
mdUp: false,
smDown: false,
smUp: false,
xlDown: false,
xlUp: false,
xsDown: false,
smDown: false,
mdDown: false,
lgDown: false,
xlDown: false
xsUp: false
};
exports.default = Hidden;