@tds/core-decorative-icon
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -7,5 +7,5 @@ import React from 'react' | ||
/** | ||
* @version 1.0.0 | ||
* An icon used for visual aesthetics only. | ||
* | ||
* An icon used for visual aesthetics only. | ||
* @version ./package.json | ||
*/ | ||
@@ -12,0 +12,0 @@ const DecorativeIcon = ({ symbol, variant, size, ...rest }) => ( |
@@ -8,166 +8,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; | ||
}; | ||
} | ||
@@ -177,3 +66,4 @@ var safeRest = (function (_ref) { | ||
className = _ref.className, | ||
props = objectWithoutProperties(_ref, ["style", "className"]); | ||
props = _objectWithoutProperties(_ref, ["style", "className"]); | ||
return props; | ||
@@ -183,3 +73,3 @@ }); | ||
var joinClassNames = function joinClassNames() { | ||
for (var _len = arguments.length, classes = Array(_len), _key = 0; _key < _len; _key++) { | ||
for (var _len = arguments.length, classes = new Array(_len), _key = 0; _key < _len; _key++) { | ||
classes[_key] = arguments[_key]; | ||
@@ -194,6 +84,6 @@ } | ||
var capitalize = function capitalize(string) { | ||
return "" + string.charAt(0).toUpperCase() + string.slice(1); | ||
return "".concat(string.charAt(0).toUpperCase()).concat(string.slice(1)); | ||
}; | ||
var styles = { "primary": "TDS_Icon-modules__primary___2UY-N", "secondary": "TDS_Icon-modules__secondary___3Gtcp", "inverted": "TDS_Icon-modules__inverted___2mdlT", "error": "TDS_Icon-modules__error___yuB9x", "size16": "TDS_Icon-modules__size16___1pm12", "size24": "TDS_Icon-modules__size24___37pQ7", "size48": "TDS_Icon-modules__size48___22aDR", "icon": "TDS_Icon-modules__icon___13xYd", "iconCaretDown": "TDS_Icon-modules__iconCaretDown___3by8b TDS_Icon-modules__icon___13xYd", "iconCaretUp": "TDS_Icon-modules__iconCaretUp___3PL_K TDS_Icon-modules__icon___13xYd", "iconCheckmark": "TDS_Icon-modules__iconCheckmark___3cAol TDS_Icon-modules__icon___13xYd", "iconChevron": "TDS_Icon-modules__iconChevron___u32Fg TDS_Icon-modules__icon___13xYd", "iconLeftChevron": "TDS_Icon-modules__iconLeftChevron___37tW0 TDS_Icon-modules__icon___13xYd", "iconExclamationPointCircle": "TDS_Icon-modules__iconExclamationPointCircle___1HgRN TDS_Icon-modules__icon___13xYd", "iconExpander": "TDS_Icon-modules__iconExpander___3C8oT TDS_Icon-modules__icon___13xYd", "iconHamburger": "TDS_Icon-modules__iconHamburger___1NBce TDS_Icon-modules__icon___13xYd", "iconLocation": "TDS_Icon-modules__iconLocation___1T7VZ TDS_Icon-modules__icon___13xYd", "iconMinus": "TDS_Icon-modules__iconMinus___1NFqO TDS_Icon-modules__icon___13xYd", "iconPlus": "TDS_Icon-modules__iconPlus___1xFr9 TDS_Icon-modules__icon___13xYd", "iconQuestionMarkCircle": "TDS_Icon-modules__iconQuestionMarkCircle___2km-5 TDS_Icon-modules__icon___13xYd", "iconSpyglass": "TDS_Icon-modules__iconSpyglass___3BIow TDS_Icon-modules__icon___13xYd", "iconTimes": "TDS_Icon-modules__iconTimes___-9Po2 TDS_Icon-modules__icon___13xYd" }; | ||
var styles = {"primary":"TDS_Icon-modules__primary___2UY-N","secondary":"TDS_Icon-modules__secondary___3Gtcp","inverted":"TDS_Icon-modules__inverted___2mdlT","error":"TDS_Icon-modules__error___yuB9x","size16":"TDS_Icon-modules__size16___1pm12","size24":"TDS_Icon-modules__size24___37pQ7","size48":"TDS_Icon-modules__size48___22aDR","icon":"TDS_Icon-modules__icon___13xYd","iconCaretDown":"TDS_Icon-modules__iconCaretDown___3by8b TDS_Icon-modules__icon___13xYd","iconCaretUp":"TDS_Icon-modules__iconCaretUp___3PL_K TDS_Icon-modules__icon___13xYd","iconCheckmark":"TDS_Icon-modules__iconCheckmark___3cAol TDS_Icon-modules__icon___13xYd","iconChevron":"TDS_Icon-modules__iconChevron___u32Fg TDS_Icon-modules__icon___13xYd","iconLeftChevron":"TDS_Icon-modules__iconLeftChevron___37tW0 TDS_Icon-modules__icon___13xYd","iconExclamationPointCircle":"TDS_Icon-modules__iconExclamationPointCircle___1HgRN TDS_Icon-modules__icon___13xYd","iconExpander":"TDS_Icon-modules__iconExpander___3C8oT TDS_Icon-modules__icon___13xYd","iconHamburger":"TDS_Icon-modules__iconHamburger___1NBce TDS_Icon-modules__icon___13xYd","iconLocation":"TDS_Icon-modules__iconLocation___1T7VZ TDS_Icon-modules__icon___13xYd","iconMinus":"TDS_Icon-modules__iconMinus___1NFqO TDS_Icon-modules__icon___13xYd","iconPlus":"TDS_Icon-modules__iconPlus___1xFr9 TDS_Icon-modules__icon___13xYd","iconQuestionMarkCircle":"TDS_Icon-modules__iconQuestionMarkCircle___2km-5 TDS_Icon-modules__icon___13xYd","iconSpyglass":"TDS_Icon-modules__iconSpyglass___3BIow TDS_Icon-modules__icon___13xYd","iconTimes":"TDS_Icon-modules__iconTimes___-9Po2 TDS_Icon-modules__icon___13xYd"}; | ||
@@ -204,7 +94,8 @@ var Icon = function Icon(_ref) { | ||
size = _ref.size, | ||
rest = objectWithoutProperties(_ref, ['symbol', 'variant', 'size']); | ||
rest = _objectWithoutProperties(_ref, ["symbol", "variant", "size"]); | ||
var classes = joinClassNames(styles['icon' + capitalize(symbol)], variant && styles[variant], size && styles['size' + size]); | ||
return React.createElement('i', _extends({}, safeRest(rest), { className: classes })); | ||
var classes = joinClassNames(styles["icon".concat(capitalize(symbol))], variant && styles[variant], size && styles["size".concat(size)]); | ||
return React.createElement("i", _extends({}, safeRest(rest), { | ||
className: classes | ||
})); | ||
}; | ||
@@ -217,3 +108,2 @@ | ||
}; | ||
Icon.defaultProps = { | ||
@@ -225,6 +115,7 @@ variant: undefined, | ||
/** | ||
* @version 1.0.0 | ||
* An icon used for visual aesthetics only. | ||
* | ||
* An icon used for visual aesthetics only. | ||
* @version ./package.json | ||
*/ | ||
var DecorativeIcon = function DecorativeIcon(_ref) { | ||
@@ -234,4 +125,10 @@ var symbol = _ref.symbol, | ||
size = _ref.size, | ||
rest = objectWithoutProperties(_ref, ['symbol', 'variant', 'size']); | ||
return React.createElement(Icon, _extends({}, rest, { symbol: symbol, variant: variant, size: size, 'aria-hidden': 'true' })); | ||
rest = _objectWithoutProperties(_ref, ["symbol", "variant", "size"]); | ||
return React.createElement(Icon, _extends({}, rest, { | ||
symbol: symbol, | ||
variant: variant, | ||
size: size, | ||
"aria-hidden": "true" | ||
})); | ||
}; | ||
@@ -244,2 +141,3 @@ | ||
symbol: PropTypes.oneOf(['caretDown', 'caretUp', 'checkmark', 'chevron', 'leftChevron', 'exclamationPointCircle', 'expander', 'hamburger', 'location', 'minus', 'plus', 'questionMarkCircle', 'spyglass', 'times']).isRequired, | ||
/** | ||
@@ -249,2 +147,3 @@ * The appearance of the Icon. | ||
variant: PropTypes.oneOf(['primary', 'secondary', 'inverted', 'error']), | ||
/** | ||
@@ -255,3 +154,2 @@ * The icon size in pixels. | ||
}; | ||
DecorativeIcon.defaultProps = { | ||
@@ -263,2 +161,1 @@ variant: undefined, | ||
module.exports = DecorativeIcon; | ||
//# sourceMappingURL=index.cjs.js.map |
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
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; | ||
}; | ||
} | ||
@@ -172,3 +61,4 @@ var safeRest = (function (_ref) { | ||
className = _ref.className, | ||
props = objectWithoutProperties(_ref, ["style", "className"]); | ||
props = _objectWithoutProperties(_ref, ["style", "className"]); | ||
return props; | ||
@@ -178,3 +68,3 @@ }); | ||
var joinClassNames = function joinClassNames() { | ||
for (var _len = arguments.length, classes = Array(_len), _key = 0; _key < _len; _key++) { | ||
for (var _len = arguments.length, classes = new Array(_len), _key = 0; _key < _len; _key++) { | ||
classes[_key] = arguments[_key]; | ||
@@ -189,6 +79,6 @@ } | ||
var capitalize = function capitalize(string) { | ||
return "" + string.charAt(0).toUpperCase() + string.slice(1); | ||
return "".concat(string.charAt(0).toUpperCase()).concat(string.slice(1)); | ||
}; | ||
var styles = { "primary": "TDS_Icon-modules__primary___2UY-N", "secondary": "TDS_Icon-modules__secondary___3Gtcp", "inverted": "TDS_Icon-modules__inverted___2mdlT", "error": "TDS_Icon-modules__error___yuB9x", "size16": "TDS_Icon-modules__size16___1pm12", "size24": "TDS_Icon-modules__size24___37pQ7", "size48": "TDS_Icon-modules__size48___22aDR", "icon": "TDS_Icon-modules__icon___13xYd", "iconCaretDown": "TDS_Icon-modules__iconCaretDown___3by8b TDS_Icon-modules__icon___13xYd", "iconCaretUp": "TDS_Icon-modules__iconCaretUp___3PL_K TDS_Icon-modules__icon___13xYd", "iconCheckmark": "TDS_Icon-modules__iconCheckmark___3cAol TDS_Icon-modules__icon___13xYd", "iconChevron": "TDS_Icon-modules__iconChevron___u32Fg TDS_Icon-modules__icon___13xYd", "iconLeftChevron": "TDS_Icon-modules__iconLeftChevron___37tW0 TDS_Icon-modules__icon___13xYd", "iconExclamationPointCircle": "TDS_Icon-modules__iconExclamationPointCircle___1HgRN TDS_Icon-modules__icon___13xYd", "iconExpander": "TDS_Icon-modules__iconExpander___3C8oT TDS_Icon-modules__icon___13xYd", "iconHamburger": "TDS_Icon-modules__iconHamburger___1NBce TDS_Icon-modules__icon___13xYd", "iconLocation": "TDS_Icon-modules__iconLocation___1T7VZ TDS_Icon-modules__icon___13xYd", "iconMinus": "TDS_Icon-modules__iconMinus___1NFqO TDS_Icon-modules__icon___13xYd", "iconPlus": "TDS_Icon-modules__iconPlus___1xFr9 TDS_Icon-modules__icon___13xYd", "iconQuestionMarkCircle": "TDS_Icon-modules__iconQuestionMarkCircle___2km-5 TDS_Icon-modules__icon___13xYd", "iconSpyglass": "TDS_Icon-modules__iconSpyglass___3BIow TDS_Icon-modules__icon___13xYd", "iconTimes": "TDS_Icon-modules__iconTimes___-9Po2 TDS_Icon-modules__icon___13xYd" }; | ||
var styles = {"primary":"TDS_Icon-modules__primary___2UY-N","secondary":"TDS_Icon-modules__secondary___3Gtcp","inverted":"TDS_Icon-modules__inverted___2mdlT","error":"TDS_Icon-modules__error___yuB9x","size16":"TDS_Icon-modules__size16___1pm12","size24":"TDS_Icon-modules__size24___37pQ7","size48":"TDS_Icon-modules__size48___22aDR","icon":"TDS_Icon-modules__icon___13xYd","iconCaretDown":"TDS_Icon-modules__iconCaretDown___3by8b TDS_Icon-modules__icon___13xYd","iconCaretUp":"TDS_Icon-modules__iconCaretUp___3PL_K TDS_Icon-modules__icon___13xYd","iconCheckmark":"TDS_Icon-modules__iconCheckmark___3cAol TDS_Icon-modules__icon___13xYd","iconChevron":"TDS_Icon-modules__iconChevron___u32Fg TDS_Icon-modules__icon___13xYd","iconLeftChevron":"TDS_Icon-modules__iconLeftChevron___37tW0 TDS_Icon-modules__icon___13xYd","iconExclamationPointCircle":"TDS_Icon-modules__iconExclamationPointCircle___1HgRN TDS_Icon-modules__icon___13xYd","iconExpander":"TDS_Icon-modules__iconExpander___3C8oT TDS_Icon-modules__icon___13xYd","iconHamburger":"TDS_Icon-modules__iconHamburger___1NBce TDS_Icon-modules__icon___13xYd","iconLocation":"TDS_Icon-modules__iconLocation___1T7VZ TDS_Icon-modules__icon___13xYd","iconMinus":"TDS_Icon-modules__iconMinus___1NFqO TDS_Icon-modules__icon___13xYd","iconPlus":"TDS_Icon-modules__iconPlus___1xFr9 TDS_Icon-modules__icon___13xYd","iconQuestionMarkCircle":"TDS_Icon-modules__iconQuestionMarkCircle___2km-5 TDS_Icon-modules__icon___13xYd","iconSpyglass":"TDS_Icon-modules__iconSpyglass___3BIow TDS_Icon-modules__icon___13xYd","iconTimes":"TDS_Icon-modules__iconTimes___-9Po2 TDS_Icon-modules__icon___13xYd"}; | ||
@@ -199,7 +89,8 @@ var Icon = function Icon(_ref) { | ||
size = _ref.size, | ||
rest = objectWithoutProperties(_ref, ['symbol', 'variant', 'size']); | ||
rest = _objectWithoutProperties(_ref, ["symbol", "variant", "size"]); | ||
var classes = joinClassNames(styles['icon' + capitalize(symbol)], variant && styles[variant], size && styles['size' + size]); | ||
return React.createElement('i', _extends({}, safeRest(rest), { className: classes })); | ||
var classes = joinClassNames(styles["icon".concat(capitalize(symbol))], variant && styles[variant], size && styles["size".concat(size)]); | ||
return React.createElement("i", _extends({}, safeRest(rest), { | ||
className: classes | ||
})); | ||
}; | ||
@@ -212,3 +103,2 @@ | ||
}; | ||
Icon.defaultProps = { | ||
@@ -220,6 +110,7 @@ variant: undefined, | ||
/** | ||
* @version 1.0.0 | ||
* An icon used for visual aesthetics only. | ||
* | ||
* An icon used for visual aesthetics only. | ||
* @version ./package.json | ||
*/ | ||
var DecorativeIcon = function DecorativeIcon(_ref) { | ||
@@ -229,4 +120,10 @@ var symbol = _ref.symbol, | ||
size = _ref.size, | ||
rest = objectWithoutProperties(_ref, ['symbol', 'variant', 'size']); | ||
return React.createElement(Icon, _extends({}, rest, { symbol: symbol, variant: variant, size: size, 'aria-hidden': 'true' })); | ||
rest = _objectWithoutProperties(_ref, ["symbol", "variant", "size"]); | ||
return React.createElement(Icon, _extends({}, rest, { | ||
symbol: symbol, | ||
variant: variant, | ||
size: size, | ||
"aria-hidden": "true" | ||
})); | ||
}; | ||
@@ -239,2 +136,3 @@ | ||
symbol: PropTypes.oneOf(['caretDown', 'caretUp', 'checkmark', 'chevron', 'leftChevron', 'exclamationPointCircle', 'expander', 'hamburger', 'location', 'minus', 'plus', 'questionMarkCircle', 'spyglass', 'times']).isRequired, | ||
/** | ||
@@ -244,2 +142,3 @@ * The appearance of the Icon. | ||
variant: PropTypes.oneOf(['primary', 'secondary', 'inverted', 'error']), | ||
/** | ||
@@ -250,3 +149,2 @@ * The icon size in pixels. | ||
}; | ||
DecorativeIcon.defaultProps = { | ||
@@ -258,2 +156,1 @@ variant: undefined, | ||
export default DecorativeIcon; | ||
//# sourceMappingURL=index.es.js.map |
{ | ||
"name": "@tds/core-decorative-icon", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "An icon used for visual aesthetics only", | ||
@@ -31,4 +31,5 @@ "main": "index.cjs.js", | ||
"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
18761
14
400
1