cf-component-card
Advanced tools
Comparing version 1.4.3 to 1.4.4
@@ -9,4 +9,6 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import React, { PropTypes } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
var Card = function (_React$Component) { | ||
@@ -22,7 +24,7 @@ _inherits(Card, _React$Component); | ||
_createClass(Card, [{ | ||
key: "render", | ||
key: 'render', | ||
value: function render() { | ||
return React.createElement( | ||
"section", | ||
{ className: "cf-card" }, | ||
'section', | ||
{ className: 'cf-card' }, | ||
this.props.children | ||
@@ -29,0 +31,0 @@ ); |
@@ -9,4 +9,6 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import React, { PropTypes } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
var CardBlock = function (_React$Component) { | ||
@@ -13,0 +15,0 @@ _inherits(CardBlock, _React$Component); |
@@ -9,4 +9,6 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import React, { PropTypes } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
var CardContent = function (_React$Component) { | ||
@@ -22,10 +24,10 @@ _inherits(CardContent, _React$Component); | ||
_createClass(CardContent, [{ | ||
key: "render", | ||
key: 'render', | ||
value: function render() { | ||
return React.createElement( | ||
"div", | ||
{ className: "cf-card__content" }, | ||
'div', | ||
{ className: 'cf-card__content' }, | ||
React.createElement( | ||
"h3", | ||
{ className: "cf-card__title" }, | ||
'h3', | ||
{ className: 'cf-card__title' }, | ||
this.props.title | ||
@@ -35,4 +37,4 @@ ), | ||
this.props.footerMessage ? React.createElement( | ||
"div", | ||
{ className: "cf-card__footer_message" }, | ||
'div', | ||
{ className: 'cf-card__footer_message' }, | ||
this.props.footerMessage | ||
@@ -39,0 +41,0 @@ ) : null |
@@ -9,4 +9,6 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import React, { PropTypes } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
var CardControl = function (_React$Component) { | ||
@@ -13,0 +15,0 @@ _inherits(CardControl, _React$Component); |
@@ -9,3 +9,4 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import React, { PropTypes } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import CardSection from './CardSection'; | ||
@@ -12,0 +13,0 @@ import CardToolbar from './CardToolbar'; |
@@ -9,4 +9,6 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import React, { PropTypes } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
var CardMessages = function (_React$Component) { | ||
@@ -22,13 +24,13 @@ _inherits(CardMessages, _React$Component); | ||
_createClass(CardMessages, [{ | ||
key: "render", | ||
key: 'render', | ||
value: function render() { | ||
return React.createElement( | ||
"div", | ||
{ className: "cf-card__messages" }, | ||
'div', | ||
{ className: 'cf-card__messages' }, | ||
this.props.messages.map(function (message, index) { | ||
return React.createElement( | ||
"div", | ||
'div', | ||
{ | ||
key: index, | ||
role: "alert", | ||
role: 'alert', | ||
className: 'cf-card__message cf-card__message--' + message.type | ||
@@ -35,0 +37,0 @@ }, |
@@ -1,3 +0,5 @@ | ||
import React, { PropTypes } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
var cardDrawer = PropTypes.shape({ | ||
@@ -4,0 +6,0 @@ id: PropTypes.string.isRequired, |
@@ -9,4 +9,6 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import React, { PropTypes } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
var CardSection = function (_React$Component) { | ||
@@ -13,0 +15,0 @@ _inherits(CardSection, _React$Component); |
@@ -9,4 +9,6 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import React, { PropTypes } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
var CardToolbar = function (_React$Component) { | ||
@@ -22,15 +24,15 @@ _inherits(CardToolbar, _React$Component); | ||
_createClass(CardToolbar, [{ | ||
key: "render", | ||
key: 'render', | ||
value: function render() { | ||
return React.createElement( | ||
"div", | ||
{ className: "cf-card__toolbar" }, | ||
'div', | ||
{ className: 'cf-card__toolbar' }, | ||
React.createElement( | ||
"div", | ||
{ className: "cf-card__toolbar_controls" }, | ||
'div', | ||
{ className: 'cf-card__toolbar_controls' }, | ||
this.props.controls | ||
), | ||
React.createElement( | ||
"div", | ||
{ className: "cf-card__toolbar_links", role: "tablist" }, | ||
'div', | ||
{ className: 'cf-card__toolbar_links', role: 'tablist' }, | ||
this.props.links | ||
@@ -37,0 +39,0 @@ ) |
@@ -9,3 +9,4 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import React, { PropTypes } from 'react'; | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import Link from 'cf-component-link'; | ||
@@ -12,0 +13,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -9,6 +9,10 @@ Object.defineProperty(exports, "__esModule", { | ||
var _react = require("react"); | ||
var _react = require('react'); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -32,7 +36,7 @@ | ||
_createClass(Card, [{ | ||
key: "render", | ||
key: 'render', | ||
value: function render() { | ||
return _react2.default.createElement( | ||
"section", | ||
{ className: "cf-card" }, | ||
'section', | ||
{ className: 'cf-card' }, | ||
this.props.children | ||
@@ -47,5 +51,5 @@ ); | ||
Card.propTypes = { | ||
children: _react.PropTypes.node | ||
children: _propTypes2.default.node | ||
}; | ||
exports.default = Card; |
@@ -13,2 +13,6 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -48,5 +52,5 @@ | ||
CardBlock.propTypes = { | ||
children: _react.PropTypes.node | ||
children: _propTypes2.default.node | ||
}; | ||
exports.default = CardBlock; |
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -9,6 +9,10 @@ Object.defineProperty(exports, "__esModule", { | ||
var _react = require("react"); | ||
var _react = require('react'); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -32,10 +36,10 @@ | ||
_createClass(CardContent, [{ | ||
key: "render", | ||
key: 'render', | ||
value: function render() { | ||
return _react2.default.createElement( | ||
"div", | ||
{ className: "cf-card__content" }, | ||
'div', | ||
{ className: 'cf-card__content' }, | ||
_react2.default.createElement( | ||
"h3", | ||
{ className: "cf-card__title" }, | ||
'h3', | ||
{ className: 'cf-card__title' }, | ||
this.props.title | ||
@@ -45,4 +49,4 @@ ), | ||
this.props.footerMessage ? _react2.default.createElement( | ||
"div", | ||
{ className: "cf-card__footer_message" }, | ||
'div', | ||
{ className: 'cf-card__footer_message' }, | ||
this.props.footerMessage | ||
@@ -58,7 +62,7 @@ ) : null | ||
CardContent.propTypes = { | ||
title: _react.PropTypes.any.isRequired, | ||
footerMessage: _react.PropTypes.string, | ||
children: _react.PropTypes.node | ||
title: _propTypes2.default.any.isRequired, | ||
footerMessage: _propTypes2.default.string, | ||
children: _propTypes2.default.node | ||
}; | ||
exports.default = CardContent; |
@@ -13,2 +13,6 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -48,6 +52,6 @@ | ||
CardControl.propTypes = { | ||
children: _react.PropTypes.node, | ||
wide: _react.PropTypes.bool | ||
children: _propTypes2.default.node, | ||
wide: _propTypes2.default.bool | ||
}; | ||
exports.default = CardControl; |
@@ -13,2 +13,6 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _CardSection = require('./CardSection'); | ||
@@ -136,11 +140,11 @@ | ||
CardDrawers.propTypes = { | ||
onClick: _react.PropTypes.func, | ||
onClick: _propTypes2.default.func, | ||
active: _react.PropTypes.string, | ||
active: _propTypes2.default.string, | ||
drawers: _CardPropTypes2.default.cardDrawers.isRequired, | ||
// for an optional control to put on the left side of the toolbar | ||
controls: _react.PropTypes.any | ||
controls: _propTypes2.default.any | ||
}; | ||
exports.default = CardDrawers; |
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -9,6 +9,10 @@ Object.defineProperty(exports, "__esModule", { | ||
var _react = require("react"); | ||
var _react = require('react'); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -32,13 +36,13 @@ | ||
_createClass(CardMessages, [{ | ||
key: "render", | ||
key: 'render', | ||
value: function render() { | ||
return _react2.default.createElement( | ||
"div", | ||
{ className: "cf-card__messages" }, | ||
'div', | ||
{ className: 'cf-card__messages' }, | ||
this.props.messages.map(function (message, index) { | ||
return _react2.default.createElement( | ||
"div", | ||
'div', | ||
{ | ||
key: index, | ||
role: "alert", | ||
role: 'alert', | ||
className: 'cf-card__message cf-card__message--' + message.type | ||
@@ -57,5 +61,5 @@ }, | ||
CardMessages.propTypes = { | ||
messages: _react.PropTypes.arrayOf(_react.PropTypes.shape({ | ||
type: _react.PropTypes.oneOf(['info', 'success', 'error', 'warning']), | ||
content: _react.PropTypes.any.isRequired | ||
messages: _propTypes2.default.arrayOf(_propTypes2.default.shape({ | ||
type: _propTypes2.default.oneOf(['info', 'success', 'error', 'warning']), | ||
content: _propTypes2.default.any.isRequired | ||
})).isRequired | ||
@@ -62,0 +66,0 @@ }; |
@@ -11,12 +11,16 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var cardDrawer = _react.PropTypes.shape({ | ||
id: _react.PropTypes.string.isRequired, | ||
name: _react.PropTypes.string.isRequired, | ||
content: _react.PropTypes.any.isRequired | ||
var cardDrawer = _propTypes2.default.shape({ | ||
id: _propTypes2.default.string.isRequired, | ||
name: _propTypes2.default.string.isRequired, | ||
content: _propTypes2.default.any.isRequired | ||
}); | ||
var cardDrawers = _react.PropTypes.arrayOf(cardDrawer); | ||
var cardDrawers = _propTypes2.default.arrayOf(cardDrawer); | ||
exports.default = { cardDrawer: cardDrawer, cardDrawers: cardDrawers }; |
@@ -13,2 +13,6 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -48,4 +52,4 @@ | ||
CardSection.propTypes = { | ||
status: _react.PropTypes.oneOf(['default', 'error']), | ||
children: _react.PropTypes.node | ||
status: _propTypes2.default.oneOf(['default', 'error']), | ||
children: _propTypes2.default.node | ||
}; | ||
@@ -52,0 +56,0 @@ |
@@ -1,2 +0,2 @@ | ||
"use strict"; | ||
'use strict'; | ||
@@ -9,6 +9,10 @@ Object.defineProperty(exports, "__esModule", { | ||
var _react = require("react"); | ||
var _react = require('react'); | ||
var _react2 = _interopRequireDefault(_react); | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -32,15 +36,15 @@ | ||
_createClass(CardToolbar, [{ | ||
key: "render", | ||
key: 'render', | ||
value: function render() { | ||
return _react2.default.createElement( | ||
"div", | ||
{ className: "cf-card__toolbar" }, | ||
'div', | ||
{ className: 'cf-card__toolbar' }, | ||
_react2.default.createElement( | ||
"div", | ||
{ className: "cf-card__toolbar_controls" }, | ||
'div', | ||
{ className: 'cf-card__toolbar_controls' }, | ||
this.props.controls | ||
), | ||
_react2.default.createElement( | ||
"div", | ||
{ className: "cf-card__toolbar_links", role: "tablist" }, | ||
'div', | ||
{ className: 'cf-card__toolbar_links', role: 'tablist' }, | ||
this.props.links | ||
@@ -56,6 +60,6 @@ ) | ||
CardToolbar.propTypes = { | ||
controls: _react.PropTypes.any, | ||
links: _react.PropTypes.any | ||
controls: _propTypes2.default.any, | ||
links: _propTypes2.default.any | ||
}; | ||
exports.default = CardToolbar; |
@@ -13,2 +13,6 @@ 'use strict'; | ||
var _propTypes = require('prop-types'); | ||
var _propTypes2 = _interopRequireDefault(_propTypes); | ||
var _cfComponentLink = require('cf-component-link'); | ||
@@ -70,8 +74,8 @@ | ||
CardToolbarLink.propTypes = { | ||
onClick: _react.PropTypes.func.isRequired, | ||
isActive: _react.PropTypes.bool.isRequired, | ||
id: _react.PropTypes.string, | ||
children: _react.PropTypes.node | ||
onClick: _propTypes2.default.func.isRequired, | ||
isActive: _propTypes2.default.bool.isRequired, | ||
id: _propTypes2.default.string, | ||
children: _propTypes2.default.node | ||
}; | ||
exports.default = CardToolbarLink; |
{ | ||
"name": "cf-component-card", | ||
"description": "Cloudflare Card Component", | ||
"version": "1.4.3", | ||
"version": "1.4.4", | ||
"main": "lib/index.js", | ||
@@ -14,7 +14,8 @@ "module": "es/index.js", | ||
"dependencies": { | ||
"cf-component-link": "^4.2.0" | ||
"cf-component-link": "^4.2.1", | ||
"prop-types": "^15.5.8" | ||
}, | ||
"peerDependencies": { | ||
"react": "^0.14.0 || ^15.0.0-0 || ^16.0.0-0" | ||
"react": "^0.14.9 || ^15.0.0-0 || ^16.0.0-0" | ||
} | ||
} |
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
121258
1749
3
+ Addedprop-types@^15.5.8
Updatedcf-component-link@^4.2.1