@brightleaf/elements
Advanced tools
Comparing version 0.16.0 to 0.17.0
@@ -152,20 +152,3 @@ "use strict"; | ||
exports.Card = Card; | ||
Card.propTypes = { | ||
children: function children(props, propName, componentName) { | ||
var prop = props[propName]; | ||
var types = [CardHeader, CardBody, CardImage, Card, CardImageContainer]; | ||
if (propName === 'children') { | ||
if (!prop.forEach) { | ||
return; | ||
} | ||
prop.forEach(function (p) { | ||
if (types.indexOf(p.type) === -1) { | ||
return new Error("'".concat(prop.type, "' not allowed")); | ||
} | ||
}); | ||
} | ||
} | ||
}; | ||
Card.propTypes = {}; | ||
Card.defaultProps = { | ||
@@ -172,0 +155,0 @@ className: '', |
@@ -73,2 +73,7 @@ "use strict"; | ||
isNarrow = _ref2.isNarrow, | ||
isOffsetOneQuarter = _ref2.isOffsetOneQuarter, | ||
isOffsetOneFifth = _ref2.isOffsetOneFifth, | ||
isOffsetHalf = _ref2.isOffsetHalf, | ||
isOffsetOneThird = _ref2.isOffsetOneThird, | ||
offset = _ref2.offset, | ||
size = _ref2.size, | ||
@@ -87,3 +92,7 @@ is = _ref2.is; | ||
'is-full': isFull, | ||
'is-narrow': isNarrow | ||
'is-narrow': isNarrow, | ||
'is-offset-one-quarter': isOffsetOneQuarter, | ||
'is-offset-one-fifth': isOffsetOneFifth, | ||
'is-offset-half': isOffsetHalf, | ||
'is-offset-one-third': isOffsetOneThird | ||
}; | ||
@@ -99,2 +108,6 @@ | ||
if (offset) { | ||
classes["is-offset-".concat(offset)] = true; | ||
} | ||
if (size && is) { | ||
@@ -112,3 +125,4 @@ console.warn('Do not use both size and is'); | ||
size: _propTypes.default.oneOf(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']), | ||
is: _propTypes.default.oneOf(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']) | ||
is: _propTypes.default.oneOf(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12']), | ||
offset: _propTypes.default.oneOf(['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11']) | ||
}; | ||
@@ -115,0 +129,0 @@ Column.defaultProps = { |
@@ -6,3 +6,3 @@ "use strict"; | ||
}); | ||
exports.StackedIcons = exports.BaseIcon = exports.default = exports.Icon = void 0; | ||
exports.MaterialIcon = exports.StackedIcons = exports.BaseIcon = exports.default = exports.Icon = void 0; | ||
@@ -122,2 +122,9 @@ var _react = _interopRequireDefault(require("react")); | ||
var change = rotation(props); | ||
/* | ||
material-icons | ||
<span className="icon is-left is-small"> | ||
<i className="material-icons">search</i> | ||
</span> | ||
*/ | ||
return _react.default.createElement("span", { | ||
@@ -335,2 +342,118 @@ className: (0, _classnames.default)(iconClassName, className, parent) | ||
}; | ||
StackedIcons.defaultProps = {}; | ||
StackedIcons.defaultProps = {}; | ||
var MaterialIcon = function MaterialIcon(_ref5) { | ||
var className = _ref5.className, | ||
iconClassName = _ref5.iconClassName, | ||
_ref5$icon = _ref5.icon, | ||
icon = _ref5$icon === void 0 ? 'home' : _ref5$icon, | ||
isSmall = _ref5.isSmall, | ||
isMedium = _ref5.isMedium, | ||
isLarge = _ref5.isLarge, | ||
isMediumFA = _ref5.isMediumFA, | ||
isLargeFA = _ref5.isLargeFA, | ||
isLeft = _ref5.isLeft, | ||
isRight = _ref5.isRight, | ||
hasTextWhite = _ref5.hasTextWhite, | ||
hasTextBlack = _ref5.hasTextBlack, | ||
hasTextLight = _ref5.hasTextLight, | ||
hasTextDark = _ref5.hasTextDark, | ||
hasTextPrimary = _ref5.hasTextPrimary, | ||
hasTextInfo = _ref5.hasTextInfo, | ||
hasTextLink = _ref5.hasTextLink, | ||
hasTextSuccess = _ref5.hasTextSuccess, | ||
hasTextWarning = _ref5.hasTextWarning, | ||
hasTextDanger = _ref5.hasTextDanger, | ||
hasTextBlackBis = _ref5.hasTextBlackBis, | ||
hasTextBlackTer = _ref5.hasTextBlackTer, | ||
hasTextGreyDarker = _ref5.hasTextGreyDarker, | ||
hasTextGreyDark = _ref5.hasTextGreyDark, | ||
hasTextGrey = _ref5.hasTextGrey, | ||
hasTextGreyLight = _ref5.hasTextGreyLight, | ||
hasTextGreyLighter = _ref5.hasTextGreyLighter, | ||
hasTextWhiteTer = _ref5.hasTextWhiteTer, | ||
hasTextWhiteBis = _ref5.hasTextWhiteBis, | ||
props = _objectWithoutProperties(_ref5, ["className", "iconClassName", "icon", "isSmall", "isMedium", "isLarge", "isMediumFA", "isLargeFA", "isLeft", "isRight", "hasTextWhite", "hasTextBlack", "hasTextLight", "hasTextDark", "hasTextPrimary", "hasTextInfo", "hasTextLink", "hasTextSuccess", "hasTextWarning", "hasTextDanger", "hasTextBlackBis", "hasTextBlackTer", "hasTextGreyDarker", "hasTextGreyDark", "hasTextGrey", "hasTextGreyLight", "hasTextGreyLighter", "hasTextWhiteTer", "hasTextWhiteBis"]); | ||
var parent = _objectSpread({ | ||
'is-left': isLeft, | ||
'is-right': isRight | ||
}, (0, _modifiers.Sizes)({ | ||
isSmall: isSmall, | ||
isMedium: isMedium, | ||
isLarge: isLarge | ||
}), {}, (0, _modifiers.HasText)({ | ||
hasTextWhite: hasTextWhite, | ||
hasTextBlack: hasTextBlack, | ||
hasTextLight: hasTextLight, | ||
hasTextDark: hasTextDark, | ||
hasTextPrimary: hasTextPrimary, | ||
hasTextInfo: hasTextInfo, | ||
hasTextLink: hasTextLink, | ||
hasTextSuccess: hasTextSuccess, | ||
hasTextWarning: hasTextWarning, | ||
hasTextDanger: hasTextDanger, | ||
hasTextBlackBis: hasTextBlackBis, | ||
hasTextBlackTer: hasTextBlackTer, | ||
hasTextGreyDarker: hasTextGreyDarker, | ||
hasTextGreyDark: hasTextGreyDark, | ||
hasTextGrey: hasTextGrey, | ||
hasTextGreyLight: hasTextGreyLight, | ||
hasTextGreyLighter: hasTextGreyLighter, | ||
hasTextWhiteTer: hasTextWhiteTer, | ||
hasTextWhiteBis: hasTextWhiteBis | ||
})); | ||
var iconName = "".concat(icon); | ||
/* | ||
material-icons | ||
<span className="icon is-left is-small"> | ||
<i className="material-icons">search</i> | ||
</span> | ||
<MaterialIcon icon="search" /> | ||
*/ | ||
return _react.default.createElement("span", { | ||
className: (0, _classnames.default)('icon', className, parent) | ||
}, _react.default.createElement("i", { | ||
className: "material-icons" | ||
}, iconName)); | ||
}; | ||
exports.MaterialIcon = MaterialIcon; | ||
MaterialIcon.propTypes = { | ||
className: _propTypes.default.string, | ||
iconClassName: _propTypes.default.string, | ||
icon: _propTypes.default.string, | ||
fas: _propTypes.default.bool, | ||
fab: _propTypes.default.bool, | ||
fa: _propTypes.default.bool, | ||
isSmall: _propTypes.default.bool, | ||
isMedium: _propTypes.default.bool, | ||
isLarge: _propTypes.default.bool, | ||
hasTextWhite: _propTypes.default.bool, | ||
hasTextBlack: _propTypes.default.bool, | ||
hasTextLight: _propTypes.default.bool, | ||
hasTextDark: _propTypes.default.bool, | ||
hasTextPrimary: _propTypes.default.bool, | ||
hasTextInfo: _propTypes.default.bool, | ||
hasTextLink: _propTypes.default.bool, | ||
hasTextSuccess: _propTypes.default.bool, | ||
hasTextWarning: _propTypes.default.bool, | ||
hasTextDanger: _propTypes.default.bool, | ||
hasTextBlackBis: _propTypes.default.bool, | ||
hasTextBlackTer: _propTypes.default.bool, | ||
hasTextGreyDarker: _propTypes.default.bool, | ||
hasTextGreyDark: _propTypes.default.bool, | ||
hasTextGrey: _propTypes.default.bool, | ||
hasTextGreyLight: _propTypes.default.bool, | ||
hasTextGreyLighter: _propTypes.default.bool, | ||
hasTextWhiteTer: _propTypes.default.bool, | ||
hasTextWhiteBis: _propTypes.default.bool, | ||
flipVertical: _propTypes.default.bool, | ||
flipHorizontal: _propTypes.default.bool, | ||
rotation: _propTypes.default.oneOf(['90', '180', '270']) | ||
}; | ||
MaterialIcon.defaultProps = { | ||
iconClassName: 'icon' | ||
}; |
@@ -24,2 +24,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "MaterialIcon", { | ||
enumerable: true, | ||
get: function get() { | ||
return _icon.MaterialIcon; | ||
} | ||
}); | ||
exports.default = void 0; | ||
@@ -26,0 +32,0 @@ |
@@ -22,2 +22,3 @@ "use strict"; | ||
var src = _ref.src, | ||
alt = _ref.alt, | ||
className = _ref.className, | ||
@@ -49,3 +50,3 @@ is = _ref.is, | ||
is128 = _ref.is128, | ||
props = _objectWithoutProperties(_ref, ["src", "className", "is", "isRounded", "isSquare", "is5by4", "is1by1", "is4by3", "is3by2", "is5by3", "is16by9", "is2by1", "is3by1", "is4by5", "is3by4", "is2by3", "is3by5", "is9by16", "is1by2", "is1by3", "is16", "is24", "is32", "is48", "is64", "is96", "is128"]); | ||
props = _objectWithoutProperties(_ref, ["src", "alt", "className", "is", "isRounded", "isSquare", "is5by4", "is1by1", "is4by3", "is3by2", "is5by3", "is16by9", "is2by1", "is3by1", "is4by5", "is3by4", "is2by3", "is3by5", "is9by16", "is1by2", "is1by3", "is16", "is24", "is32", "is48", "is64", "is96", "is128"]); | ||
@@ -82,6 +83,9 @@ var classes = { | ||
console.info('src', src); | ||
console.info('srpropdc', props); | ||
return _react.default.createElement("figure", { | ||
className: (0, _classnames.default)('image', className, classes) | ||
}, _react.default.createElement("img", _extends({ | ||
src: src | ||
src: src, | ||
alt: alt | ||
}, props, { | ||
@@ -88,0 +92,0 @@ className: (0, _classnames.default)({ |
@@ -168,2 +168,8 @@ "use strict"; | ||
}); | ||
Object.defineProperty(exports, "Header", { | ||
enumerable: true, | ||
get: function get() { | ||
return _header.Header; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Hero", { | ||
@@ -211,2 +217,8 @@ enumerable: true, | ||
}); | ||
Object.defineProperty(exports, "MaterialIcon", { | ||
enumerable: true, | ||
get: function get() { | ||
return _icon.MaterialIcon; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Image", { | ||
@@ -547,2 +559,4 @@ enumerable: true, | ||
var _header = require("./header"); | ||
var _hero = require("./hero"); | ||
@@ -549,0 +563,0 @@ |
{ | ||
"name": "@brightleaf/elements", | ||
"version": "0.16.0", | ||
"version": "0.17.0", | ||
"description": "UI elements", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
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
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
226451
96
5192