Comparing version 0.1.3 to 0.1.4
@@ -33,22 +33,20 @@ 'use strict'; | ||
Alert.propTypes = { | ||
children: require('react').PropTypes.any.isRequired, | ||
className: require('react').PropTypes.string, | ||
success: require('react').PropTypes.bool, | ||
info: require('react').PropTypes.bool, | ||
warning: require('react').PropTypes.bool, | ||
danger: require('react').PropTypes.bool | ||
}; | ||
exports.default = Alert; | ||
Alert.propTypes = { | ||
children: _react.PropTypes.any.isRequired, | ||
className: _react.PropTypes.string, | ||
success: _react.PropTypes.bool, | ||
info: _react.PropTypes.bool, | ||
warning: _react.PropTypes.bool, | ||
danger: _react.PropTypes.bool | ||
}; | ||
function _getClasses(props) { | ||
var classes = ['alert']; | ||
ALERT_TYPES.forEach(function (t) { | ||
if (props[t]) { | ||
classes.push('alert-' + t); | ||
} | ||
ALERT_TYPES.filter(function (t) { | ||
return props[t]; | ||
}).forEach(function (t) { | ||
classes.push('alert-' + t); | ||
}); | ||
@@ -55,0 +53,0 @@ |
@@ -35,22 +35,19 @@ 'use strict'; | ||
Button.propTypes = { | ||
children: require('react').PropTypes.any.isRequired, | ||
className: require('react').PropTypes.string, | ||
default: require('react').PropTypes.bool, | ||
primary: require('react').PropTypes.bool, | ||
info: require('react').PropTypes.bool, | ||
success: require('react').PropTypes.bool, | ||
warning: require('react').PropTypes.bool, | ||
danger: require('react').PropTypes.bool, | ||
type: require('react').PropTypes.string, | ||
disabled: require('react').PropTypes.bool, | ||
fullWidth: require('react').PropTypes.bool, | ||
onClick: require('react').PropTypes.func | ||
}; | ||
exports.default = Button; | ||
Button.propTypes = { | ||
children: _react.PropTypes.any.isRequired, | ||
className: _react.PropTypes.string, | ||
primary: _react.PropTypes.bool, | ||
info: _react.PropTypes.bool, | ||
success: _react.PropTypes.bool, | ||
warning: _react.PropTypes.bool, | ||
danger: _react.PropTypes.bool, | ||
type: _react.PropTypes.string, | ||
disabled: _react.PropTypes.bool, | ||
fullWidth: _react.PropTypes.bool, | ||
onClick: _react.PropTypes.func | ||
}; | ||
function _getClasses(props) { | ||
@@ -57,0 +54,0 @@ var classes = ['btn']; |
@@ -34,34 +34,31 @@ 'use strict'; | ||
Col.propTypes = { | ||
children: require('react').PropTypes.any.isRequired, | ||
className: require('react').PropTypes.string, | ||
xs: require('react').PropTypes.number, | ||
sm: require('react').PropTypes.number, | ||
md: require('react').PropTypes.number, | ||
lg: require('react').PropTypes.number, | ||
xsOffset: require('react').PropTypes.number, | ||
smOffset: require('react').PropTypes.number, | ||
mdOffset: require('react').PropTypes.number, | ||
lgOffset: require('react').PropTypes.number | ||
}; | ||
exports.default = Col; | ||
Col.propTypes = { | ||
children: _react.PropTypes.any.isRequired, | ||
className: _react.PropTypes.string, | ||
xs: _react.PropTypes.number, | ||
sm: _react.PropTypes.number, | ||
md: _react.PropTypes.number, | ||
lg: _react.PropTypes.number, | ||
xsOffset: _react.PropTypes.number, | ||
smOffset: _react.PropTypes.number, | ||
mdOffset: _react.PropTypes.number, | ||
lgOffset: _react.PropTypes.number | ||
}; | ||
function _getClasses(props) { | ||
var classes = []; | ||
COL_WIDTHS.forEach(function (w) { | ||
if (props[w]) { | ||
classes.push('col-' + w + '-' + props[w]); | ||
} | ||
COL_WIDTHS.filter(function (w) { | ||
return props[w]; | ||
}).forEach(function (w) { | ||
classes.push('col-' + w + '-' + String(props[w])); | ||
}); | ||
COL_OFFSETS.forEach(function (o) { | ||
if (props[o]) { | ||
var width = o.substr(0, 2); | ||
classes.push('col-' + width + '-' + 'offset' + '-' + props[o]); | ||
} | ||
COL_OFFSETS.filter(function (o) { | ||
return props[o]; | ||
}).forEach(function (o) { | ||
var width = o.substr(0, 2); | ||
classes.push('col-' + width + '-offset-' + String(props[o])); | ||
}); | ||
@@ -68,0 +65,0 @@ |
@@ -31,9 +31,7 @@ 'use strict'; | ||
exports.default = Container; | ||
Container.propTypes = { | ||
children: _react.PropTypes.any.isRequired, | ||
className: _react.PropTypes.string, | ||
fluid: _react.PropTypes.bool | ||
}; | ||
children: require('react').PropTypes.any.isRequired, | ||
className: require('react').PropTypes.string, | ||
fluid: require('react').PropTypes.bool | ||
}; | ||
exports.default = Container; |
@@ -25,13 +25,12 @@ 'use strict'; | ||
Icon.propTypes = { | ||
type: require('react').PropTypes.string.isRequired, | ||
className: require('react').PropTypes.string, | ||
size2x: require('react').PropTypes.bool, | ||
size4x: require('react').PropTypes.bool, | ||
spin: require('react').PropTypes.bool | ||
}; | ||
exports.default = Icon; | ||
Icon.propTypes = { | ||
type: _react.PropTypes.string.isRequired, | ||
className: _react.PropTypes.string, | ||
size2x: _react.PropTypes.bool, | ||
size4x: _react.PropTypes.bool, | ||
spin: _react.PropTypes.bool | ||
}; | ||
function _getClasses(props) { | ||
@@ -38,0 +37,0 @@ var classes = ['fa', 'fa-' + props.type]; |
@@ -25,3 +25,3 @@ 'use strict'; | ||
_extends({ | ||
className: (0, _classnames2.default)(props.fluid ? 'row-fluid' : 'row', props.className) | ||
className: (0, _classnames2.default)('row', props.className) | ||
}, (0, _utils.getRemainingProps)(Row, props)), | ||
@@ -32,9 +32,6 @@ props.children | ||
exports.default = Row; | ||
Row.propTypes = { | ||
children: _react.PropTypes.any.isRequired, | ||
className: _react.PropTypes.string, | ||
fluid: _react.PropTypes.bool | ||
}; | ||
children: require('react').PropTypes.any.isRequired, | ||
className: require('react').PropTypes.string | ||
}; | ||
exports.default = Row; |
@@ -12,6 +12,10 @@ "use strict"; | ||
var rest = _extends({}, props); | ||
Object.keys(Component.propTypes).forEach(function (prop) { | ||
delete rest[prop]; | ||
}); | ||
if (Component.propTypes) { | ||
Object.keys(Component.propTypes).forEach(function (prop) { | ||
delete rest[prop]; | ||
}); | ||
} | ||
return rest; | ||
} |
{ | ||
"name": "cyprex-ui", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "Cyprex basic UI components", | ||
"main": "build/index.js", | ||
"scripts": { | ||
"lint": "eslint --ext .js,.jsx .", | ||
"lint": "eslint --ext .js,.jsx . && flow", | ||
"test": "npm run lint && jest", | ||
"watch": "jest --watch", | ||
"build": "babel src -d build --ignore __tests__" | ||
"build": "rimraf build && babel src -d build --ignore __tests__ && flow-copy-source -i '__tests__/**' src build", | ||
"storybook": "start-storybook -p 6006", | ||
"build-storybook": "build-storybook" | ||
}, | ||
@@ -20,2 +22,5 @@ "repository": { | ||
], | ||
"jest": { | ||
"testRegex": "/__tests__/.*_test\\.jsx?$" | ||
}, | ||
"author": "Cyprex <info@cyprex.com>", | ||
@@ -41,5 +46,8 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@kadira/storybook": "^2.21.0", | ||
"babel-cli": "^6.18.0", | ||
"babel-eslint": "^7.1.1", | ||
"babel-jest": "^17.0.2", | ||
"babel-plugin-flow-react-proptypes": "^0.19.0", | ||
"babel-plugin-transform-flow-strip-types": "^6.21.0", | ||
"babel-preset-latest": "^6.16.0", | ||
@@ -49,11 +57,17 @@ "babel-preset-react": "^6.16.0", | ||
"babel-register": "^6.18.0", | ||
"bootstrap": "^3.3.7", | ||
"enzyme": "^2.6.0", | ||
"eslint": "^3.11.1", | ||
"eslint-config-cyprex": "^1.1.1", | ||
"eslint-config-cyprex": "^1.1.2", | ||
"eslint-plugin-flowtype": "^2.29.1", | ||
"eslint-plugin-react": "^6.8.0", | ||
"flow-bin": "^0.37.4", | ||
"flow-copy-source": "^1.1.0", | ||
"font-awesome": "^4.7.0", | ||
"ghooks": "^1.3.2", | ||
"jest": "^17.0.3", | ||
"react-addons-test-utils": "^15.4.1", | ||
"react-dom": "^15.4.1" | ||
"react-dom": "^15.4.1", | ||
"rimraf": "^2.5.4" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
367292
45
4241
24
1