@tds/core-card
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -10,5 +10,5 @@ import React from 'react' | ||
/** | ||
* @version 1.0.1 | ||
* A content container. | ||
* | ||
* A content container. | ||
* @version ./package.json | ||
*/ | ||
@@ -15,0 +15,0 @@ const Card = ({ variant, children, ...rest }) => ( |
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.0.2](https://github.com/telusdigital/tds/compare/@tds/core-card@1.0.1...@tds/core-card@1.0.2) (2019-02-06) | ||
**Note:** Version bump only for package @tds/core-card | ||
<a name="1.0.1"></a> | ||
@@ -8,0 +16,0 @@ ## [1.0.1](https://github.com/telusdigital/tds/compare/@tds/core-card@1.0.0...@tds/core-card@1.0.1) (2018-04-02) |
@@ -9,166 +9,55 @@ 'use strict'; | ||
var asyncGenerator = function () { | ||
function AwaitValue(value) { | ||
this.value = value; | ||
} | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
function AsyncGenerator(gen) { | ||
var front, back; | ||
function send(key, arg) { | ||
return new Promise(function (resolve, reject) { | ||
var request = { | ||
key: key, | ||
arg: arg, | ||
resolve: resolve, | ||
reject: reject, | ||
next: null | ||
}; | ||
if (back) { | ||
back = back.next = request; | ||
} else { | ||
front = back = request; | ||
resume(key, arg); | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
}); | ||
} | ||
function resume(key, arg) { | ||
try { | ||
var result = gen[key](arg); | ||
var value = result.value; | ||
if (value instanceof AwaitValue) { | ||
Promise.resolve(value.value).then(function (arg) { | ||
resume("next", arg); | ||
}, function (arg) { | ||
resume("throw", arg); | ||
}); | ||
} else { | ||
settle(result.done ? "return" : "normal", result.value); | ||
} | ||
} catch (err) { | ||
settle("throw", err); | ||
} | ||
} | ||
function settle(type, value) { | ||
switch (type) { | ||
case "return": | ||
front.resolve({ | ||
value: value, | ||
done: true | ||
}); | ||
break; | ||
case "throw": | ||
front.reject(value); | ||
break; | ||
default: | ||
front.resolve({ | ||
value: value, | ||
done: false | ||
}); | ||
break; | ||
} | ||
front = front.next; | ||
if (front) { | ||
resume(front.key, front.arg); | ||
} else { | ||
back = null; | ||
} | ||
} | ||
this._invoke = send; | ||
if (typeof gen.return !== "function") { | ||
this.return = undefined; | ||
} | ||
} | ||
if (typeof Symbol === "function" && Symbol.asyncIterator) { | ||
AsyncGenerator.prototype[Symbol.asyncIterator] = function () { | ||
return this; | ||
}; | ||
} | ||
AsyncGenerator.prototype.next = function (arg) { | ||
return this._invoke("next", arg); | ||
return target; | ||
}; | ||
AsyncGenerator.prototype.throw = function (arg) { | ||
return this._invoke("throw", arg); | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
AsyncGenerator.prototype.return = function (arg) { | ||
return this._invoke("return", arg); | ||
}; | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
return { | ||
wrap: function (fn) { | ||
return function () { | ||
return new AsyncGenerator(fn.apply(this, arguments)); | ||
}; | ||
}, | ||
await: function (value) { | ||
return new AwaitValue(value); | ||
} | ||
}; | ||
}(); | ||
var _extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
}; | ||
} | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var key, i; | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
var objectWithoutProperties = function (obj, keys) { | ||
var target = {}; | ||
for (var i in obj) { | ||
if (keys.indexOf(i) >= 0) continue; | ||
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; | ||
target[i] = obj[i]; | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
} | ||
} | ||
return target; | ||
}; | ||
} | ||
@@ -178,22 +67,25 @@ var safeRest = (function (_ref) { | ||
className = _ref.className, | ||
props = objectWithoutProperties(_ref, ["style", "className"]); | ||
props = _objectWithoutProperties(_ref, ["style", "className"]); | ||
return props; | ||
}); | ||
var styles = { "card": "TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q", "white": "TDS_Card-modules__white___22Bka TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q", "lavender": "TDS_Card-modules__lavender___cLepG TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q", "grey": "TDS_Card-modules__grey___-upGZ TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q" }; | ||
var styles = {"card":"TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q","white":"TDS_Card-modules__white___22Bka TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q","lavender":"TDS_Card-modules__lavender___cLepG TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q","grey":"TDS_Card-modules__grey___-upGZ TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q"}; | ||
/** | ||
* @version 1.0.1 | ||
* A content container. | ||
* | ||
* A content container. | ||
* @version ./package.json | ||
*/ | ||
var Card = function Card(_ref) { | ||
var variant = _ref.variant, | ||
children = _ref.children, | ||
rest = objectWithoutProperties(_ref, ['variant', 'children']); | ||
return React.createElement( | ||
Box, | ||
_extends({}, safeRest(rest), { horizontal: 4, vertical: 5, dangerouslyAddClassName: styles[variant] }), | ||
children | ||
); | ||
rest = _objectWithoutProperties(_ref, ["variant", "children"]); | ||
return React.createElement(Box, _extends({}, safeRest(rest), { | ||
horizontal: 4, | ||
vertical: 5, | ||
dangerouslyAddClassName: styles[variant] | ||
}), children); | ||
}; | ||
@@ -206,2 +98,3 @@ | ||
variant: PropTypes.oneOf(['white', 'lavender', 'grey']), | ||
/** | ||
@@ -212,3 +105,2 @@ * The content. Can be text, any HTML element, or any component. | ||
}; | ||
Card.defaultProps = { | ||
@@ -219,2 +111,1 @@ variant: 'white' | ||
module.exports = Card; | ||
//# sourceMappingURL=index.cjs.js.map |
@@ -5,166 +5,55 @@ import React from 'react'; | ||
var asyncGenerator = function () { | ||
function AwaitValue(value) { | ||
this.value = value; | ||
} | ||
function _extends() { | ||
_extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
function AsyncGenerator(gen) { | ||
var front, back; | ||
function send(key, arg) { | ||
return new Promise(function (resolve, reject) { | ||
var request = { | ||
key: key, | ||
arg: arg, | ||
resolve: resolve, | ||
reject: reject, | ||
next: null | ||
}; | ||
if (back) { | ||
back = back.next = request; | ||
} else { | ||
front = back = request; | ||
resume(key, arg); | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
}); | ||
} | ||
function resume(key, arg) { | ||
try { | ||
var result = gen[key](arg); | ||
var value = result.value; | ||
if (value instanceof AwaitValue) { | ||
Promise.resolve(value.value).then(function (arg) { | ||
resume("next", arg); | ||
}, function (arg) { | ||
resume("throw", arg); | ||
}); | ||
} else { | ||
settle(result.done ? "return" : "normal", result.value); | ||
} | ||
} catch (err) { | ||
settle("throw", err); | ||
} | ||
} | ||
function settle(type, value) { | ||
switch (type) { | ||
case "return": | ||
front.resolve({ | ||
value: value, | ||
done: true | ||
}); | ||
break; | ||
case "throw": | ||
front.reject(value); | ||
break; | ||
default: | ||
front.resolve({ | ||
value: value, | ||
done: false | ||
}); | ||
break; | ||
} | ||
front = front.next; | ||
if (front) { | ||
resume(front.key, front.arg); | ||
} else { | ||
back = null; | ||
} | ||
} | ||
this._invoke = send; | ||
if (typeof gen.return !== "function") { | ||
this.return = undefined; | ||
} | ||
} | ||
if (typeof Symbol === "function" && Symbol.asyncIterator) { | ||
AsyncGenerator.prototype[Symbol.asyncIterator] = function () { | ||
return this; | ||
}; | ||
} | ||
AsyncGenerator.prototype.next = function (arg) { | ||
return this._invoke("next", arg); | ||
return target; | ||
}; | ||
AsyncGenerator.prototype.throw = function (arg) { | ||
return this._invoke("throw", arg); | ||
}; | ||
return _extends.apply(this, arguments); | ||
} | ||
AsyncGenerator.prototype.return = function (arg) { | ||
return this._invoke("return", arg); | ||
}; | ||
function _objectWithoutPropertiesLoose(source, excluded) { | ||
if (source == null) return {}; | ||
var target = {}; | ||
var sourceKeys = Object.keys(source); | ||
var key, i; | ||
return { | ||
wrap: function (fn) { | ||
return function () { | ||
return new AsyncGenerator(fn.apply(this, arguments)); | ||
}; | ||
}, | ||
await: function (value) { | ||
return new AwaitValue(value); | ||
} | ||
}; | ||
}(); | ||
var _extends = Object.assign || function (target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i]; | ||
for (var key in source) { | ||
if (Object.prototype.hasOwnProperty.call(source, key)) { | ||
target[key] = source[key]; | ||
} | ||
} | ||
for (i = 0; i < sourceKeys.length; i++) { | ||
key = sourceKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
target[key] = source[key]; | ||
} | ||
return target; | ||
}; | ||
} | ||
function _objectWithoutProperties(source, excluded) { | ||
if (source == null) return {}; | ||
var target = _objectWithoutPropertiesLoose(source, excluded); | ||
var key, i; | ||
if (Object.getOwnPropertySymbols) { | ||
var sourceSymbolKeys = Object.getOwnPropertySymbols(source); | ||
var objectWithoutProperties = function (obj, keys) { | ||
var target = {}; | ||
for (var i in obj) { | ||
if (keys.indexOf(i) >= 0) continue; | ||
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; | ||
target[i] = obj[i]; | ||
for (i = 0; i < sourceSymbolKeys.length; i++) { | ||
key = sourceSymbolKeys[i]; | ||
if (excluded.indexOf(key) >= 0) continue; | ||
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; | ||
target[key] = source[key]; | ||
} | ||
} | ||
return target; | ||
}; | ||
} | ||
@@ -174,22 +63,25 @@ var safeRest = (function (_ref) { | ||
className = _ref.className, | ||
props = objectWithoutProperties(_ref, ["style", "className"]); | ||
props = _objectWithoutProperties(_ref, ["style", "className"]); | ||
return props; | ||
}); | ||
var styles = { "card": "TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q", "white": "TDS_Card-modules__white___22Bka TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q", "lavender": "TDS_Card-modules__lavender___cLepG TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q", "grey": "TDS_Card-modules__grey___-upGZ TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q" }; | ||
var styles = {"card":"TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q","white":"TDS_Card-modules__white___22Bka TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q","lavender":"TDS_Card-modules__lavender___cLepG TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q","grey":"TDS_Card-modules__grey___-upGZ TDS_Card-modules__card___1uX0J TDS_Borders-modules__none___1fCjZ TDS_Borders-modules__rounded___3df1Q"}; | ||
/** | ||
* @version 1.0.1 | ||
* A content container. | ||
* | ||
* A content container. | ||
* @version ./package.json | ||
*/ | ||
var Card = function Card(_ref) { | ||
var variant = _ref.variant, | ||
children = _ref.children, | ||
rest = objectWithoutProperties(_ref, ['variant', 'children']); | ||
return React.createElement( | ||
Box, | ||
_extends({}, safeRest(rest), { horizontal: 4, vertical: 5, dangerouslyAddClassName: styles[variant] }), | ||
children | ||
); | ||
rest = _objectWithoutProperties(_ref, ["variant", "children"]); | ||
return React.createElement(Box, _extends({}, safeRest(rest), { | ||
horizontal: 4, | ||
vertical: 5, | ||
dangerouslyAddClassName: styles[variant] | ||
}), children); | ||
}; | ||
@@ -202,2 +94,3 @@ | ||
variant: PropTypes.oneOf(['white', 'lavender', 'grey']), | ||
/** | ||
@@ -208,3 +101,2 @@ * The content. Can be text, any HTML element, or any component. | ||
}; | ||
Card.defaultProps = { | ||
@@ -215,2 +107,1 @@ variant: 'white' | ||
export default Card; | ||
//# sourceMappingURL=index.es.js.map |
{ | ||
"name": "@tds/core-card", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A content container", | ||
@@ -28,8 +28,9 @@ "main": "index.cjs.js", | ||
"dependencies": { | ||
"@tds/core-box": "^1.0.1", | ||
"@tds/core-box": "^1.0.2", | ||
"prop-types": "^15.5.10" | ||
}, | ||
"devDependencies": { | ||
"@tds/core-colours": "^1.0.0" | ||
} | ||
"@tds/core-colours": "^1.0.1" | ||
}, | ||
"gitHead": "79839daf9cc90e531bdfe4e5202edfd4b7348342" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
13381
15
252
1
Updated@tds/core-box@^1.0.2