Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ak-badge

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ak-badge - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

14

CHANGELOG.md

@@ -1,6 +0,16 @@

<a name="2.1.0"></a>
# 2.1.0 (2017-01-13)
<a name="2.1.1"></a>
## 2.1.1 (2017-01-25)
<a name="ak-badge@2.1.1"></a>
## ak-badge@2.1.1 (2017-01-25)
### Bug Fixes
* **component:** Fixes default theme prop value in ak-badge ([1e892f2](https://bitbucket.org/atlassian/atlaskit/commits/1e892f2))
<a name="ak-badge@2.1.0"></a>

@@ -7,0 +17,0 @@ # ak-badge@2.1.0 (2017-01-13)

66

dist/bundle-cjs.js

@@ -129,34 +129,5 @@ module.exports = /******/

Badge.propTypes = {
/**
* @description The value displayed within the badge.
* @memberof AkBadge
* @instance
* @type {number}
* @default 0
*/
value: _react.PropTypes.number,
/**
* @description The max value to display.
* If value is 100, and max is 50, "50+" will be displayed
* @memberof AkBadge
* @instance
* @type {number}
* @default 99
*/
max: _react.PropTypes.number,
/**
* @description Affects the visual style of the badge.
* Allowed values are: 'default', 'primary', 'important', 'added', 'removed'.
* @memberof AkBadge
* @instance
* @type {string}
* @default default
*/
appearance: _react.PropTypes.oneOf(APPEARANCE_ENUM.values),
/**
* @description Handler function to be called when the 'updated' prop is changed.
* @memberof AkBadge
* @instance
* @type {function}
*/
onValueUpdated: _react.PropTypes.func,

@@ -167,3 +138,4 @@ theme: _react.PropTypes.oneOf(THEME_ENUM.values)

max: 99,
appearance: APPEARANCE_ENUM.defaultValue
appearance: APPEARANCE_ENUM.defaultValue,
theme: THEME_ENUM.defaultValue
}, exports.default = Badge;

@@ -217,21 +189,21 @@ }, /* 4 */

// module
exports.push([ module.id, "._2qTZGmtj4AxOHeidN8avga{display:inline-block}._3_CGDfAxSErT7tF7tN9b3U{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}._3V8DyAQzmHrhctSgaUZKSM{background:#ebecf0;color:#42526e}._1oMmFoERDN67JIMOzPa7oQ{background:#0052cc;color:#fff}.v0lCjoOIjdmxV-w9aCGFI{background:#ff5630;color:#fff}._3TlkhPcriKbHl6IszcmET9{background:#e3fcef;color:#064}._1QhK-vHp2YUFrLQ6mp3XxW{background:#ffebe6;color:#bf2600}._1oMmFoERDN67JIMOzPa7oQ._2W8zQgtY7jNDzgUjbnXiKE,._1QhK-vHp2YUFrLQ6mp3XxW._2W8zQgtY7jNDzgUjbnXiKE,._3TlkhPcriKbHl6IszcmET9._2W8zQgtY7jNDzgUjbnXiKE,._3V8DyAQzmHrhctSgaUZKSM._2W8zQgtY7jNDzgUjbnXiKE,.v0lCjoOIjdmxV-w9aCGFI._2W8zQgtY7jNDzgUjbnXiKE{background:#fff;color:#0049b0}", "" ]),
exports.push([ module.id, ".zxRnnRJ8P15b4o5kiMcwf{display:inline-block}._1SVhmJoDNXI1EOyTXgG5bs{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}._1UEHtLKYd8fvfkuJ8NoQLO{background:#ebecf0;color:#42526e}._2MggNLxNlJzIEQExWI_qzk{background:#0052cc;color:#fff}._2yVHLpAMInq3zCgtDUCjv9{background:#ff5630;color:#fff}._1GS4lWlzue1mbHO8irQVMI{background:#e3fcef;color:#064}._1zc87yNqI3G3FDOrk1qUD1{background:#ffebe6;color:#bf2600}._1GS4lWlzue1mbHO8irQVMI._10aXYmZsb7QuRLehCAUhPQ,._1UEHtLKYd8fvfkuJ8NoQLO._10aXYmZsb7QuRLehCAUhPQ,._1zc87yNqI3G3FDOrk1qUD1._10aXYmZsb7QuRLehCAUhPQ,._2MggNLxNlJzIEQExWI_qzk._10aXYmZsb7QuRLehCAUhPQ,._2yVHLpAMInq3zCgtDUCjv9._10aXYmZsb7QuRLehCAUhPQ{background:#fff;color:#0049b0}", "" ]),
// exports
exports.locals = {
container: "_2qTZGmtj4AxOHeidN8avga",
container: "_2qTZGmtj4AxOHeidN8avga",
value: "_3_CGDfAxSErT7tF7tN9b3U",
value: "_3_CGDfAxSErT7tF7tN9b3U",
default: "_3V8DyAQzmHrhctSgaUZKSM",
default: "_3V8DyAQzmHrhctSgaUZKSM",
primary: "_1oMmFoERDN67JIMOzPa7oQ",
primary: "_1oMmFoERDN67JIMOzPa7oQ",
important: "v0lCjoOIjdmxV-w9aCGFI",
important: "v0lCjoOIjdmxV-w9aCGFI",
added: "_3TlkhPcriKbHl6IszcmET9",
added: "_3TlkhPcriKbHl6IszcmET9",
removed: "_1QhK-vHp2YUFrLQ6mp3XxW",
removed: "_1QhK-vHp2YUFrLQ6mp3XxW",
isDarkTheme: "_2W8zQgtY7jNDzgUjbnXiKE",
isDarkTheme: "_2W8zQgtY7jNDzgUjbnXiKE"
container: "zxRnnRJ8P15b4o5kiMcwf",
container: "zxRnnRJ8P15b4o5kiMcwf",
value: "_1SVhmJoDNXI1EOyTXgG5bs",
value: "_1SVhmJoDNXI1EOyTXgG5bs",
default: "_1UEHtLKYd8fvfkuJ8NoQLO",
default: "_1UEHtLKYd8fvfkuJ8NoQLO",
primary: "_2MggNLxNlJzIEQExWI_qzk",
primary: "_2MggNLxNlJzIEQExWI_qzk",
important: "_2yVHLpAMInq3zCgtDUCjv9",
important: "_2yVHLpAMInq3zCgtDUCjv9",
added: "_1GS4lWlzue1mbHO8irQVMI",
added: "_1GS4lWlzue1mbHO8irQVMI",
removed: "_1zc87yNqI3G3FDOrk1qUD1",
removed: "_1zc87yNqI3G3FDOrk1qUD1",
isDarkTheme: "_10aXYmZsb7QuRLehCAUhPQ",
isDarkTheme: "_10aXYmZsb7QuRLehCAUhPQ"
};

@@ -238,0 +210,0 @@ }, /* 14 */

@@ -1,1 +0,1 @@

module.exports=function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(3)},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),o=n(a),i=r(5),u=n(i),l=r(6),s=n(l),f=r(7),p=n(f),c=r(8),d=n(c),h=r(9),m=n(h),v=r(10),b=n(v),g=r(11),x=n(g),y=r(12),_=n(y),j={values:["default","primary","important","added","removed"],defaultValue:"default"},U={values:["default","dark"],defaultValue:"default"},C=function(e){function t(){return(0,s.default)(this,t),(0,d.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,p.default)(t,[{key:"componentWillUpdate",value:function(e){var t=this.props,r=t.onValueUpdated,n=t.value,a=e.value;r&&a!==n&&r({oldValue:n,newValue:a})}},{key:"displayValue",value:function(){var e=this.props,t=e.value,r=e.max;return t<0?0:r>0&&t>r?r+"+":t===1/0?"∞":t}},{key:"validAppearance",value:function(){var e=this.props.appearance,t=j.values,r=j.defaultValue;return t.indexOf(e)!==-1?e:r}},{key:"render",value:function(){return x.default.createElement("span",{className:_.default.root},x.default.createElement("span",{className:(0,b.default)([_.default.value,_.default[this.validAppearance()]],(0,o.default)({},_.default.isDarkTheme,"dark"===this.props.theme))},this.displayValue().toString()))}}]),t}(g.PureComponent);C.propTypes={value:g.PropTypes.number,max:g.PropTypes.number,appearance:g.PropTypes.oneOf(j.values),onValueUpdated:g.PropTypes.func,theme:g.PropTypes.oneOf(U.values)},C.defaultProps={value:0,max:99,appearance:j.defaultValue},t.default=C},function(e,t){e.exports=require("babel-runtime/helpers/defineProperty")},function(e,t){e.exports=require("babel-runtime/core-js/object/get-prototype-of")},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/createClass")},function(e,t){e.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(e,t){e.exports=require("babel-runtime/helpers/inherits")},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,r){var n=r(13);"string"==typeof n&&(n=[[e.id,n,""]]),r(15)(n,{}),n.locals&&(e.exports=n.locals)},function(e,t,r){t=e.exports=r(14)(),t.push([e.id,"._2qTZGmtj4AxOHeidN8avga{display:inline-block}._3_CGDfAxSErT7tF7tN9b3U{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}._3V8DyAQzmHrhctSgaUZKSM{background:#ebecf0;color:#42526e}._1oMmFoERDN67JIMOzPa7oQ{background:#0052cc;color:#fff}.v0lCjoOIjdmxV-w9aCGFI{background:#ff5630;color:#fff}._3TlkhPcriKbHl6IszcmET9{background:#e3fcef;color:#064}._1QhK-vHp2YUFrLQ6mp3XxW{background:#ffebe6;color:#bf2600}._1oMmFoERDN67JIMOzPa7oQ._2W8zQgtY7jNDzgUjbnXiKE,._1QhK-vHp2YUFrLQ6mp3XxW._2W8zQgtY7jNDzgUjbnXiKE,._3TlkhPcriKbHl6IszcmET9._2W8zQgtY7jNDzgUjbnXiKE,._3V8DyAQzmHrhctSgaUZKSM._2W8zQgtY7jNDzgUjbnXiKE,.v0lCjoOIjdmxV-w9aCGFI._2W8zQgtY7jNDzgUjbnXiKE{background:#fff;color:#0049b0}",""]),t.locals={container:"_2qTZGmtj4AxOHeidN8avga",container:"_2qTZGmtj4AxOHeidN8avga",value:"_3_CGDfAxSErT7tF7tN9b3U",value:"_3_CGDfAxSErT7tF7tN9b3U",default:"_3V8DyAQzmHrhctSgaUZKSM",default:"_3V8DyAQzmHrhctSgaUZKSM",primary:"_1oMmFoERDN67JIMOzPa7oQ",primary:"_1oMmFoERDN67JIMOzPa7oQ",important:"v0lCjoOIjdmxV-w9aCGFI",important:"v0lCjoOIjdmxV-w9aCGFI",added:"_3TlkhPcriKbHl6IszcmET9",added:"_3TlkhPcriKbHl6IszcmET9",removed:"_1QhK-vHp2YUFrLQ6mp3XxW",removed:"_1QhK-vHp2YUFrLQ6mp3XxW",isDarkTheme:"_2W8zQgtY7jNDzgUjbnXiKE",isDarkTheme:"_2W8zQgtY7jNDzgUjbnXiKE"}},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var r=this[t];r[2]?e.push("@media "+r[2]+"{"+r[1]+"}"):e.push(r[1])}return e.join("")},e.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},a=0;a<this.length;a++){var o=this[a][0];"number"==typeof o&&(n[o]=!0)}for(a=0;a<t.length;a++){var i=t[a];"number"==typeof i[0]&&n[i[0]]||(r&&!i[2]?i[2]=r:r&&(i[2]="("+i[2]+") and ("+r+")"),e.push(i))}},e}},function(e,t,r){function n(e,t){for(var r=0;r<e.length;r++){var n=e[r],a=d[n.id];if(a){a.refs++;for(var o=0;o<a.parts.length;o++)a.parts[o](n.parts[o]);for(;o<n.parts.length;o++)a.parts.push(s(n.parts[o],t))}else{for(var i=[],o=0;o<n.parts.length;o++)i.push(s(n.parts[o],t));d[n.id]={id:n.id,refs:1,parts:i}}}}function a(e){for(var t=[],r={},n=0;n<e.length;n++){var a=e[n],o=a[0],i=a[1],u=a[2],l=a[3],s={css:i,media:u,sourceMap:l};r[o]?r[o].parts.push(s):t.push(r[o]={id:o,parts:[s]})}return t}function o(e,t){var r=v(),n=x[x.length-1];if("top"===e.insertAt)n?n.nextSibling?r.insertBefore(t,n.nextSibling):r.appendChild(t):r.insertBefore(t,r.firstChild),x.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");r.appendChild(t)}}function i(e){e.parentNode.removeChild(e);var t=x.indexOf(e);t>=0&&x.splice(t,1)}function u(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function s(e,t){var r,n,a;if(t.singleton){var o=g++;r=b||(b=u(t)),n=f.bind(null,r,o,!1),a=f.bind(null,r,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=l(t),n=c.bind(null,r),a=function(){i(r),r.href&&URL.revokeObjectURL(r.href)}):(r=u(t),n=p.bind(null,r),a=function(){i(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}function f(e,t,r,n){var a=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=y(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function p(e,t){var r=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function c(e,t){var r=t.css,n=t.sourceMap;n&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var a=new Blob([r],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(a),o&&URL.revokeObjectURL(o)}var d={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),v=h(function(){return document.head||document.getElementsByTagName("head")[0]}),b=null,g=0,x=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var r=a(e);return n(r,t),function(e){for(var o=[],i=0;i<r.length;i++){var u=r[i],l=d[u.id];l.refs--,o.push(l)}if(e){var s=a(e);n(s,t)}for(var i=0;i<o.length;i++){var l=o[i];if(0===l.refs){for(var f=0;f<l.parts.length;f++)l.parts[f]();delete d[l.id]}}}};var y=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}()}]);
module.exports=function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(3)},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),o=n(a),u=r(5),i=n(u),s=r(6),l=n(s),f=r(7),p=n(f),c=r(8),d=n(c),h=r(9),v=n(h),m=r(10),b=n(m),y=r(11),g=n(y),x=r(12),_=n(x),k={values:["default","primary","important","added","removed"],defaultValue:"default"},L={values:["default","dark"],defaultValue:"default"},U=function(e){function t(){return(0,l.default)(this,t),(0,d.default)(this,(t.__proto__||(0,i.default)(t)).apply(this,arguments))}return(0,v.default)(t,e),(0,p.default)(t,[{key:"componentWillUpdate",value:function(e){var t=this.props,r=t.onValueUpdated,n=t.value,a=e.value;r&&a!==n&&r({oldValue:n,newValue:a})}},{key:"displayValue",value:function(){var e=this.props,t=e.value,r=e.max;return t<0?0:r>0&&t>r?r+"+":t===1/0?"∞":t}},{key:"validAppearance",value:function(){var e=this.props.appearance,t=k.values,r=k.defaultValue;return t.indexOf(e)!==-1?e:r}},{key:"render",value:function(){return g.default.createElement("span",{className:_.default.root},g.default.createElement("span",{className:(0,b.default)([_.default.value,_.default[this.validAppearance()]],(0,o.default)({},_.default.isDarkTheme,"dark"===this.props.theme))},this.displayValue().toString()))}}]),t}(y.PureComponent);U.propTypes={value:y.PropTypes.number,max:y.PropTypes.number,appearance:y.PropTypes.oneOf(k.values),onValueUpdated:y.PropTypes.func,theme:y.PropTypes.oneOf(L.values)},U.defaultProps={value:0,max:99,appearance:k.defaultValue,theme:L.defaultValue},t.default=U},function(e,t){e.exports=require("babel-runtime/helpers/defineProperty")},function(e,t){e.exports=require("babel-runtime/core-js/object/get-prototype-of")},function(e,t){e.exports=require("babel-runtime/helpers/classCallCheck")},function(e,t){e.exports=require("babel-runtime/helpers/createClass")},function(e,t){e.exports=require("babel-runtime/helpers/possibleConstructorReturn")},function(e,t){e.exports=require("babel-runtime/helpers/inherits")},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("react")},function(e,t,r){var n=r(13);"string"==typeof n&&(n=[[e.id,n,""]]),r(15)(n,{}),n.locals&&(e.exports=n.locals)},function(e,t,r){t=e.exports=r(14)(),t.push([e.id,".zxRnnRJ8P15b4o5kiMcwf{display:inline-block}._1SVhmJoDNXI1EOyTXgG5bs{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}._1UEHtLKYd8fvfkuJ8NoQLO{background:#ebecf0;color:#42526e}._2MggNLxNlJzIEQExWI_qzk{background:#0052cc;color:#fff}._2yVHLpAMInq3zCgtDUCjv9{background:#ff5630;color:#fff}._1GS4lWlzue1mbHO8irQVMI{background:#e3fcef;color:#064}._1zc87yNqI3G3FDOrk1qUD1{background:#ffebe6;color:#bf2600}._1GS4lWlzue1mbHO8irQVMI._10aXYmZsb7QuRLehCAUhPQ,._1UEHtLKYd8fvfkuJ8NoQLO._10aXYmZsb7QuRLehCAUhPQ,._1zc87yNqI3G3FDOrk1qUD1._10aXYmZsb7QuRLehCAUhPQ,._2MggNLxNlJzIEQExWI_qzk._10aXYmZsb7QuRLehCAUhPQ,._2yVHLpAMInq3zCgtDUCjv9._10aXYmZsb7QuRLehCAUhPQ{background:#fff;color:#0049b0}",""]),t.locals={container:"zxRnnRJ8P15b4o5kiMcwf",container:"zxRnnRJ8P15b4o5kiMcwf",value:"_1SVhmJoDNXI1EOyTXgG5bs",value:"_1SVhmJoDNXI1EOyTXgG5bs",default:"_1UEHtLKYd8fvfkuJ8NoQLO",default:"_1UEHtLKYd8fvfkuJ8NoQLO",primary:"_2MggNLxNlJzIEQExWI_qzk",primary:"_2MggNLxNlJzIEQExWI_qzk",important:"_2yVHLpAMInq3zCgtDUCjv9",important:"_2yVHLpAMInq3zCgtDUCjv9",added:"_1GS4lWlzue1mbHO8irQVMI",added:"_1GS4lWlzue1mbHO8irQVMI",removed:"_1zc87yNqI3G3FDOrk1qUD1",removed:"_1zc87yNqI3G3FDOrk1qUD1",isDarkTheme:"_10aXYmZsb7QuRLehCAUhPQ",isDarkTheme:"_10aXYmZsb7QuRLehCAUhPQ"}},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var r=this[t];r[2]?e.push("@media "+r[2]+"{"+r[1]+"}"):e.push(r[1])}return e.join("")},e.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},a=0;a<this.length;a++){var o=this[a][0];"number"==typeof o&&(n[o]=!0)}for(a=0;a<t.length;a++){var u=t[a];"number"==typeof u[0]&&n[u[0]]||(r&&!u[2]?u[2]=r:r&&(u[2]="("+u[2]+") and ("+r+")"),e.push(u))}},e}},function(e,t,r){function n(e,t){for(var r=0;r<e.length;r++){var n=e[r],a=d[n.id];if(a){a.refs++;for(var o=0;o<a.parts.length;o++)a.parts[o](n.parts[o]);for(;o<n.parts.length;o++)a.parts.push(l(n.parts[o],t))}else{for(var u=[],o=0;o<n.parts.length;o++)u.push(l(n.parts[o],t));d[n.id]={id:n.id,refs:1,parts:u}}}}function a(e){for(var t=[],r={},n=0;n<e.length;n++){var a=e[n],o=a[0],u=a[1],i=a[2],s=a[3],l={css:u,media:i,sourceMap:s};r[o]?r[o].parts.push(l):t.push(r[o]={id:o,parts:[l]})}return t}function o(e,t){var r=m(),n=g[g.length-1];if("top"===e.insertAt)n?n.nextSibling?r.insertBefore(t,n.nextSibling):r.appendChild(t):r.insertBefore(t,r.firstChild),g.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");r.appendChild(t)}}function u(e){e.parentNode.removeChild(e);var t=g.indexOf(e);t>=0&&g.splice(t,1)}function i(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function s(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function l(e,t){var r,n,a;if(t.singleton){var o=y++;r=b||(b=i(t)),n=f.bind(null,r,o,!1),a=f.bind(null,r,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=s(t),n=c.bind(null,r),a=function(){u(r),r.href&&URL.revokeObjectURL(r.href)}):(r=i(t),n=p.bind(null,r),a=function(){u(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}function f(e,t,r,n){var a=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=x(t,a);else{var o=document.createTextNode(a),u=e.childNodes;u[t]&&e.removeChild(u[t]),u.length?e.insertBefore(o,u[t]):e.appendChild(o)}}function p(e,t){var r=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function c(e,t){var r=t.css,n=t.sourceMap;n&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var a=new Blob([r],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(a),o&&URL.revokeObjectURL(o)}var d={},h=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},v=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=h(function(){return document.head||document.getElementsByTagName("head")[0]}),b=null,y=0,g=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=v()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var r=a(e);return n(r,t),function(e){for(var o=[],u=0;u<r.length;u++){var i=r[u],s=d[i.id];s.refs--,o.push(s)}if(e){var l=a(e);n(l,t)}for(var u=0;u<o.length;u++){var s=o[u];if(0===s.refs){for(var f=0;f<s.parts.length;f++)s.parts[f]();delete d[s.id]}}}};var x=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}()}]);

@@ -132,34 +132,5 @@ !function(root, factory) {

Badge.propTypes = {
/**
* @description The value displayed within the badge.
* @memberof AkBadge
* @instance
* @type {number}
* @default 0
*/
value: _react.PropTypes.number,
/**
* @description The max value to display.
* If value is 100, and max is 50, "50+" will be displayed
* @memberof AkBadge
* @instance
* @type {number}
* @default 99
*/
max: _react.PropTypes.number,
/**
* @description Affects the visual style of the badge.
* Allowed values are: 'default', 'primary', 'important', 'added', 'removed'.
* @memberof AkBadge
* @instance
* @type {string}
* @default default
*/
appearance: _react.PropTypes.oneOf(APPEARANCE_ENUM.values),
/**
* @description Handler function to be called when the 'updated' prop is changed.
* @memberof AkBadge
* @instance
* @type {function}
*/
onValueUpdated: _react.PropTypes.func,

@@ -170,3 +141,4 @@ theme: _react.PropTypes.oneOf(THEME_ENUM.values)

max: 99,
appearance: APPEARANCE_ENUM.defaultValue
appearance: APPEARANCE_ENUM.defaultValue,
theme: THEME_ENUM.defaultValue
}, exports.default = Badge;

@@ -220,21 +192,21 @@ }, /* 4 */

// module
exports.push([ module.id, "._2qTZGmtj4AxOHeidN8avga{display:inline-block}._3_CGDfAxSErT7tF7tN9b3U{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}._3V8DyAQzmHrhctSgaUZKSM{background:#ebecf0;color:#42526e}._1oMmFoERDN67JIMOzPa7oQ{background:#0052cc;color:#fff}.v0lCjoOIjdmxV-w9aCGFI{background:#ff5630;color:#fff}._3TlkhPcriKbHl6IszcmET9{background:#e3fcef;color:#064}._1QhK-vHp2YUFrLQ6mp3XxW{background:#ffebe6;color:#bf2600}._1oMmFoERDN67JIMOzPa7oQ._2W8zQgtY7jNDzgUjbnXiKE,._1QhK-vHp2YUFrLQ6mp3XxW._2W8zQgtY7jNDzgUjbnXiKE,._3TlkhPcriKbHl6IszcmET9._2W8zQgtY7jNDzgUjbnXiKE,._3V8DyAQzmHrhctSgaUZKSM._2W8zQgtY7jNDzgUjbnXiKE,.v0lCjoOIjdmxV-w9aCGFI._2W8zQgtY7jNDzgUjbnXiKE{background:#fff;color:#0049b0}", "" ]),
exports.push([ module.id, ".zxRnnRJ8P15b4o5kiMcwf{display:inline-block}._1SVhmJoDNXI1EOyTXgG5bs{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}._1UEHtLKYd8fvfkuJ8NoQLO{background:#ebecf0;color:#42526e}._2MggNLxNlJzIEQExWI_qzk{background:#0052cc;color:#fff}._2yVHLpAMInq3zCgtDUCjv9{background:#ff5630;color:#fff}._1GS4lWlzue1mbHO8irQVMI{background:#e3fcef;color:#064}._1zc87yNqI3G3FDOrk1qUD1{background:#ffebe6;color:#bf2600}._1GS4lWlzue1mbHO8irQVMI._10aXYmZsb7QuRLehCAUhPQ,._1UEHtLKYd8fvfkuJ8NoQLO._10aXYmZsb7QuRLehCAUhPQ,._1zc87yNqI3G3FDOrk1qUD1._10aXYmZsb7QuRLehCAUhPQ,._2MggNLxNlJzIEQExWI_qzk._10aXYmZsb7QuRLehCAUhPQ,._2yVHLpAMInq3zCgtDUCjv9._10aXYmZsb7QuRLehCAUhPQ{background:#fff;color:#0049b0}", "" ]),
// exports
exports.locals = {
container: "_2qTZGmtj4AxOHeidN8avga",
container: "_2qTZGmtj4AxOHeidN8avga",
value: "_3_CGDfAxSErT7tF7tN9b3U",
value: "_3_CGDfAxSErT7tF7tN9b3U",
default: "_3V8DyAQzmHrhctSgaUZKSM",
default: "_3V8DyAQzmHrhctSgaUZKSM",
primary: "_1oMmFoERDN67JIMOzPa7oQ",
primary: "_1oMmFoERDN67JIMOzPa7oQ",
important: "v0lCjoOIjdmxV-w9aCGFI",
important: "v0lCjoOIjdmxV-w9aCGFI",
added: "_3TlkhPcriKbHl6IszcmET9",
added: "_3TlkhPcriKbHl6IszcmET9",
removed: "_1QhK-vHp2YUFrLQ6mp3XxW",
removed: "_1QhK-vHp2YUFrLQ6mp3XxW",
isDarkTheme: "_2W8zQgtY7jNDzgUjbnXiKE",
isDarkTheme: "_2W8zQgtY7jNDzgUjbnXiKE"
container: "zxRnnRJ8P15b4o5kiMcwf",
container: "zxRnnRJ8P15b4o5kiMcwf",
value: "_1SVhmJoDNXI1EOyTXgG5bs",
value: "_1SVhmJoDNXI1EOyTXgG5bs",
default: "_1UEHtLKYd8fvfkuJ8NoQLO",
default: "_1UEHtLKYd8fvfkuJ8NoQLO",
primary: "_2MggNLxNlJzIEQExWI_qzk",
primary: "_2MggNLxNlJzIEQExWI_qzk",
important: "_2yVHLpAMInq3zCgtDUCjv9",
important: "_2yVHLpAMInq3zCgtDUCjv9",
added: "_1GS4lWlzue1mbHO8irQVMI",
added: "_1GS4lWlzue1mbHO8irQVMI",
removed: "_1zc87yNqI3G3FDOrk1qUD1",
removed: "_1zc87yNqI3G3FDOrk1qUD1",
isDarkTheme: "_10aXYmZsb7QuRLehCAUhPQ",
isDarkTheme: "_10aXYmZsb7QuRLehCAUhPQ"
};

@@ -241,0 +213,0 @@ }, /* 14 */

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/defineProperty"),require("babel-runtime/core-js/object/get-prototype-of"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("classnames"),require("react")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/defineProperty","babel-runtime/core-js/object/get-prototype-of","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/createClass","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","classnames","react"],t):"object"==typeof exports?exports.akBadge=t(require("babel-runtime/helpers/defineProperty"),require("babel-runtime/core-js/object/get-prototype-of"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("classnames"),require("react")):e.akBadge=t(e["babel-runtime/helpers/defineProperty"],e["babel-runtime/core-js/object/get-prototype-of"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/createClass"],e["babel-runtime/helpers/possibleConstructorReturn"],e["babel-runtime/helpers/inherits"],e.classnames,e.react)}(this,function(e,t,r,n,a,o,i,l){return function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(3)},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),o=n(a),i=r(5),l=n(i),s=r(6),u=n(s),p=r(7),c=n(p),f=r(8),d=n(f),b=r(9),m=n(b),h=r(10),v=n(h),g=r(11),y=n(g),x=r(12),j=n(x),C={values:["default","primary","important","added","removed"],defaultValue:"default"},_={values:["default","dark"],defaultValue:"default"},U=function(e){function t(){return(0,u.default)(this,t),(0,d.default)(this,(t.__proto__||(0,l.default)(t)).apply(this,arguments))}return(0,m.default)(t,e),(0,c.default)(t,[{key:"componentWillUpdate",value:function(e){var t=this.props,r=t.onValueUpdated,n=t.value,a=e.value;r&&a!==n&&r({oldValue:n,newValue:a})}},{key:"displayValue",value:function(){var e=this.props,t=e.value,r=e.max;return t<0?0:r>0&&t>r?r+"+":t===1/0?"∞":t}},{key:"validAppearance",value:function(){var e=this.props.appearance,t=C.values,r=C.defaultValue;return t.indexOf(e)!==-1?e:r}},{key:"render",value:function(){return y.default.createElement("span",{className:j.default.root},y.default.createElement("span",{className:(0,v.default)([j.default.value,j.default[this.validAppearance()]],(0,o.default)({},j.default.isDarkTheme,"dark"===this.props.theme))},this.displayValue().toString()))}}]),t}(g.PureComponent);U.propTypes={value:g.PropTypes.number,max:g.PropTypes.number,appearance:g.PropTypes.oneOf(C.values),onValueUpdated:g.PropTypes.func,theme:g.PropTypes.oneOf(_.values)},U.defaultProps={value:0,max:99,appearance:C.defaultValue},t.default=U},function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t){e.exports=a},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t){e.exports=l},function(e,t,r){var n=r(13);"string"==typeof n&&(n=[[e.id,n,""]]),r(15)(n,{}),n.locals&&(e.exports=n.locals)},function(e,t,r){t=e.exports=r(14)(),t.push([e.id,"._2qTZGmtj4AxOHeidN8avga{display:inline-block}._3_CGDfAxSErT7tF7tN9b3U{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}._3V8DyAQzmHrhctSgaUZKSM{background:#ebecf0;color:#42526e}._1oMmFoERDN67JIMOzPa7oQ{background:#0052cc;color:#fff}.v0lCjoOIjdmxV-w9aCGFI{background:#ff5630;color:#fff}._3TlkhPcriKbHl6IszcmET9{background:#e3fcef;color:#064}._1QhK-vHp2YUFrLQ6mp3XxW{background:#ffebe6;color:#bf2600}._1oMmFoERDN67JIMOzPa7oQ._2W8zQgtY7jNDzgUjbnXiKE,._1QhK-vHp2YUFrLQ6mp3XxW._2W8zQgtY7jNDzgUjbnXiKE,._3TlkhPcriKbHl6IszcmET9._2W8zQgtY7jNDzgUjbnXiKE,._3V8DyAQzmHrhctSgaUZKSM._2W8zQgtY7jNDzgUjbnXiKE,.v0lCjoOIjdmxV-w9aCGFI._2W8zQgtY7jNDzgUjbnXiKE{background:#fff;color:#0049b0}",""]),t.locals={container:"_2qTZGmtj4AxOHeidN8avga",container:"_2qTZGmtj4AxOHeidN8avga",value:"_3_CGDfAxSErT7tF7tN9b3U",value:"_3_CGDfAxSErT7tF7tN9b3U",default:"_3V8DyAQzmHrhctSgaUZKSM",default:"_3V8DyAQzmHrhctSgaUZKSM",primary:"_1oMmFoERDN67JIMOzPa7oQ",primary:"_1oMmFoERDN67JIMOzPa7oQ",important:"v0lCjoOIjdmxV-w9aCGFI",important:"v0lCjoOIjdmxV-w9aCGFI",added:"_3TlkhPcriKbHl6IszcmET9",added:"_3TlkhPcriKbHl6IszcmET9",removed:"_1QhK-vHp2YUFrLQ6mp3XxW",removed:"_1QhK-vHp2YUFrLQ6mp3XxW",isDarkTheme:"_2W8zQgtY7jNDzgUjbnXiKE",isDarkTheme:"_2W8zQgtY7jNDzgUjbnXiKE"}},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var r=this[t];r[2]?e.push("@media "+r[2]+"{"+r[1]+"}"):e.push(r[1])}return e.join("")},e.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},a=0;a<this.length;a++){var o=this[a][0];"number"==typeof o&&(n[o]=!0)}for(a=0;a<t.length;a++){var i=t[a];"number"==typeof i[0]&&n[i[0]]||(r&&!i[2]?i[2]=r:r&&(i[2]="("+i[2]+") and ("+r+")"),e.push(i))}},e}},function(e,t,r){function n(e,t){for(var r=0;r<e.length;r++){var n=e[r],a=d[n.id];if(a){a.refs++;for(var o=0;o<a.parts.length;o++)a.parts[o](n.parts[o]);for(;o<n.parts.length;o++)a.parts.push(u(n.parts[o],t))}else{for(var i=[],o=0;o<n.parts.length;o++)i.push(u(n.parts[o],t));d[n.id]={id:n.id,refs:1,parts:i}}}}function a(e){for(var t=[],r={},n=0;n<e.length;n++){var a=e[n],o=a[0],i=a[1],l=a[2],s=a[3],u={css:i,media:l,sourceMap:s};r[o]?r[o].parts.push(u):t.push(r[o]={id:o,parts:[u]})}return t}function o(e,t){var r=h(),n=y[y.length-1];if("top"===e.insertAt)n?n.nextSibling?r.insertBefore(t,n.nextSibling):r.appendChild(t):r.insertBefore(t,r.firstChild),y.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");r.appendChild(t)}}function i(e){e.parentNode.removeChild(e);var t=y.indexOf(e);t>=0&&y.splice(t,1)}function l(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function s(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function u(e,t){var r,n,a;if(t.singleton){var o=g++;r=v||(v=l(t)),n=p.bind(null,r,o,!1),a=p.bind(null,r,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=s(t),n=f.bind(null,r),a=function(){i(r),r.href&&URL.revokeObjectURL(r.href)}):(r=l(t),n=c.bind(null,r),a=function(){i(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}function p(e,t,r,n){var a=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=x(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function c(e,t){var r=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function f(e,t){var r=t.css,n=t.sourceMap;n&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var a=new Blob([r],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(a),o&&URL.revokeObjectURL(o)}var d={},b=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=b(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=b(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,g=0,y=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var r=a(e);return n(r,t),function(e){for(var o=[],i=0;i<r.length;i++){var l=r[i],s=d[l.id];s.refs--,o.push(s)}if(e){var u=a(e);n(u,t)}for(var i=0;i<o.length;i++){var s=o[i];if(0===s.refs){for(var p=0;p<s.parts.length;p++)s.parts[p]();delete d[s.id]}}}};var x=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}()}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/defineProperty"),require("babel-runtime/core-js/object/get-prototype-of"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("classnames"),require("react")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/defineProperty","babel-runtime/core-js/object/get-prototype-of","babel-runtime/helpers/classCallCheck","babel-runtime/helpers/createClass","babel-runtime/helpers/possibleConstructorReturn","babel-runtime/helpers/inherits","classnames","react"],t):"object"==typeof exports?exports.akBadge=t(require("babel-runtime/helpers/defineProperty"),require("babel-runtime/core-js/object/get-prototype-of"),require("babel-runtime/helpers/classCallCheck"),require("babel-runtime/helpers/createClass"),require("babel-runtime/helpers/possibleConstructorReturn"),require("babel-runtime/helpers/inherits"),require("classnames"),require("react")):e.akBadge=t(e["babel-runtime/helpers/defineProperty"],e["babel-runtime/core-js/object/get-prototype-of"],e["babel-runtime/helpers/classCallCheck"],e["babel-runtime/helpers/createClass"],e["babel-runtime/helpers/possibleConstructorReturn"],e["babel-runtime/helpers/inherits"],e.classnames,e.react)}(this,function(e,t,r,n,a,o,i,u){return function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var r={};return t.m=e,t.c=r,t.p="",t(0)}([function(e,t,r){e.exports=r(3)},,,function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var a=r(4),o=n(a),i=r(5),u=n(i),s=r(6),l=n(s),f=r(7),p=n(f),c=r(8),d=n(c),b=r(9),h=n(b),m=r(10),v=n(m),y=r(11),g=n(y),x=r(12),C=n(x),k={values:["default","primary","important","added","removed"],defaultValue:"default"},_={values:["default","dark"],defaultValue:"default"},L=function(e){function t(){return(0,l.default)(this,t),(0,d.default)(this,(t.__proto__||(0,u.default)(t)).apply(this,arguments))}return(0,h.default)(t,e),(0,p.default)(t,[{key:"componentWillUpdate",value:function(e){var t=this.props,r=t.onValueUpdated,n=t.value,a=e.value;r&&a!==n&&r({oldValue:n,newValue:a})}},{key:"displayValue",value:function(){var e=this.props,t=e.value,r=e.max;return t<0?0:r>0&&t>r?r+"+":t===1/0?"∞":t}},{key:"validAppearance",value:function(){var e=this.props.appearance,t=k.values,r=k.defaultValue;return t.indexOf(e)!==-1?e:r}},{key:"render",value:function(){return g.default.createElement("span",{className:C.default.root},g.default.createElement("span",{className:(0,v.default)([C.default.value,C.default[this.validAppearance()]],(0,o.default)({},C.default.isDarkTheme,"dark"===this.props.theme))},this.displayValue().toString()))}}]),t}(y.PureComponent);L.propTypes={value:y.PropTypes.number,max:y.PropTypes.number,appearance:y.PropTypes.oneOf(k.values),onValueUpdated:y.PropTypes.func,theme:y.PropTypes.oneOf(_.values)},L.defaultProps={value:0,max:99,appearance:k.defaultValue,theme:_.defaultValue},t.default=L},function(t,r){t.exports=e},function(e,r){e.exports=t},function(e,t){e.exports=r},function(e,t){e.exports=n},function(e,t){e.exports=a},function(e,t){e.exports=o},function(e,t){e.exports=i},function(e,t){e.exports=u},function(e,t,r){var n=r(13);"string"==typeof n&&(n=[[e.id,n,""]]),r(15)(n,{}),n.locals&&(e.exports=n.locals)},function(e,t,r){t=e.exports=r(14)(),t.push([e.id,".zxRnnRJ8P15b4o5kiMcwf{display:inline-block}._1SVhmJoDNXI1EOyTXgG5bs{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}._1UEHtLKYd8fvfkuJ8NoQLO{background:#ebecf0;color:#42526e}._2MggNLxNlJzIEQExWI_qzk{background:#0052cc;color:#fff}._2yVHLpAMInq3zCgtDUCjv9{background:#ff5630;color:#fff}._1GS4lWlzue1mbHO8irQVMI{background:#e3fcef;color:#064}._1zc87yNqI3G3FDOrk1qUD1{background:#ffebe6;color:#bf2600}._1GS4lWlzue1mbHO8irQVMI._10aXYmZsb7QuRLehCAUhPQ,._1UEHtLKYd8fvfkuJ8NoQLO._10aXYmZsb7QuRLehCAUhPQ,._1zc87yNqI3G3FDOrk1qUD1._10aXYmZsb7QuRLehCAUhPQ,._2MggNLxNlJzIEQExWI_qzk._10aXYmZsb7QuRLehCAUhPQ,._2yVHLpAMInq3zCgtDUCjv9._10aXYmZsb7QuRLehCAUhPQ{background:#fff;color:#0049b0}",""]),t.locals={container:"zxRnnRJ8P15b4o5kiMcwf",container:"zxRnnRJ8P15b4o5kiMcwf",value:"_1SVhmJoDNXI1EOyTXgG5bs",value:"_1SVhmJoDNXI1EOyTXgG5bs",default:"_1UEHtLKYd8fvfkuJ8NoQLO",default:"_1UEHtLKYd8fvfkuJ8NoQLO",primary:"_2MggNLxNlJzIEQExWI_qzk",primary:"_2MggNLxNlJzIEQExWI_qzk",important:"_2yVHLpAMInq3zCgtDUCjv9",important:"_2yVHLpAMInq3zCgtDUCjv9",added:"_1GS4lWlzue1mbHO8irQVMI",added:"_1GS4lWlzue1mbHO8irQVMI",removed:"_1zc87yNqI3G3FDOrk1qUD1",removed:"_1zc87yNqI3G3FDOrk1qUD1",isDarkTheme:"_10aXYmZsb7QuRLehCAUhPQ",isDarkTheme:"_10aXYmZsb7QuRLehCAUhPQ"}},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var r=this[t];r[2]?e.push("@media "+r[2]+"{"+r[1]+"}"):e.push(r[1])}return e.join("")},e.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},a=0;a<this.length;a++){var o=this[a][0];"number"==typeof o&&(n[o]=!0)}for(a=0;a<t.length;a++){var i=t[a];"number"==typeof i[0]&&n[i[0]]||(r&&!i[2]?i[2]=r:r&&(i[2]="("+i[2]+") and ("+r+")"),e.push(i))}},e}},function(e,t,r){function n(e,t){for(var r=0;r<e.length;r++){var n=e[r],a=d[n.id];if(a){a.refs++;for(var o=0;o<a.parts.length;o++)a.parts[o](n.parts[o]);for(;o<n.parts.length;o++)a.parts.push(l(n.parts[o],t))}else{for(var i=[],o=0;o<n.parts.length;o++)i.push(l(n.parts[o],t));d[n.id]={id:n.id,refs:1,parts:i}}}}function a(e){for(var t=[],r={},n=0;n<e.length;n++){var a=e[n],o=a[0],i=a[1],u=a[2],s=a[3],l={css:i,media:u,sourceMap:s};r[o]?r[o].parts.push(l):t.push(r[o]={id:o,parts:[l]})}return t}function o(e,t){var r=m(),n=g[g.length-1];if("top"===e.insertAt)n?n.nextSibling?r.insertBefore(t,n.nextSibling):r.appendChild(t):r.insertBefore(t,r.firstChild),g.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");r.appendChild(t)}}function i(e){e.parentNode.removeChild(e);var t=g.indexOf(e);t>=0&&g.splice(t,1)}function u(e){var t=document.createElement("style");return t.type="text/css",o(e,t),t}function s(e){var t=document.createElement("link");return t.rel="stylesheet",o(e,t),t}function l(e,t){var r,n,a;if(t.singleton){var o=y++;r=v||(v=u(t)),n=f.bind(null,r,o,!1),a=f.bind(null,r,o,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=s(t),n=c.bind(null,r),a=function(){i(r),r.href&&URL.revokeObjectURL(r.href)}):(r=u(t),n=p.bind(null,r),a=function(){i(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else a()}}function f(e,t,r,n){var a=r?"":n.css;if(e.styleSheet)e.styleSheet.cssText=x(t,a);else{var o=document.createTextNode(a),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(o,i[t]):e.appendChild(o)}}function p(e,t){var r=t.css,n=t.media;if(n&&e.setAttribute("media",n),e.styleSheet)e.styleSheet.cssText=r;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(r))}}function c(e,t){var r=t.css,n=t.sourceMap;n&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var a=new Blob([r],{type:"text/css"}),o=e.href;e.href=URL.createObjectURL(a),o&&URL.revokeObjectURL(o)}var d={},b=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},h=b(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),m=b(function(){return document.head||document.getElementsByTagName("head")[0]}),v=null,y=0,g=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=h()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var r=a(e);return n(r,t),function(e){for(var o=[],i=0;i<r.length;i++){var u=r[i],s=d[u.id];s.refs--,o.push(s)}if(e){var l=a(e);n(l,t)}for(var i=0;i<o.length;i++){var s=o[i];if(0===s.refs){for(var f=0;f<s.parts.length;f++)s.parts[f]();delete d[s.id]}}}};var x=function(){var e=[];return function(t,r){return e[t]=r,e.filter(Boolean).join("\n")}}()}])});
{
"name": "ak-badge",
"version": "2.1.0",
"version": "2.1.1",
"description": "A React component that indicates values",

@@ -19,2 +19,6 @@ "main": "dist/bundle.js",

},
"devDependencies": {
"ak-badge": "*",
"akutil-readme": "^1.1.0"
},
"author": "Atlassian Pty Ltd",

@@ -21,0 +25,0 @@ "license": "Apache-2.0",

@@ -5,3 +5,3 @@ [![AtlasKit component registry](https://img.shields.io/badge/AtlasKit-components-FF5230.svg)](http://aui-cdn.atlassian.com/atlaskit/registry/)

[![Report an issue](https://img.shields.io/badge/Report-an_issue-6554C0.svg)](https://ecosystem.atlassian.net/browse/AK)
[![Ask in our forum](https://img.shields.io/badge/Ask-in_our_forum-6554C0.svg)](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-badge,ak-badge@2.1.0)
[![Ask in our forum](https://img.shields.io/badge/Ask-in_our_forum-6554C0.svg)](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-badge,ak-badge@2.1.1)

@@ -17,78 +17,10 @@ # Badge

![Example badge](https://bytebucket.org/atlassian/atlaskit/raw/28897e5e3f2bcb06f164ec90518e1a09d84d70f2/packages/ak-badge/docs/badge.png)
![Example badge](http://i.imgur.com/ZQHLeGg.png)
## Try it out
Interact with a [live demo of the ak-badge component with code examples](https://aui-cdn.atlassian.com/atlaskit/stories/ak-badge/2.1.0/).
Interact with a [live demo of the ak-badge component with code examples](https://aui-cdn.atlassian.com/atlaskit/stories/ak-badge/2.1.1/).
## Installation
```sh
npm install ak-badge
```
## Using the component
### HTML
The `ak-badge` package exports the Badge React component.
Import the component in your React app as follows:
```javascript
import Badge from 'ak-badge';
ReactDOM.render(<Badge />, container);
```
<a name="AkBadge"></a>
## AkBadge
**Kind**: global class
* Properties
* [akBadge.value](#AkBadge+value) : <code>number</code>
* [akBadge.max](#AkBadge+max) : <code>number</code>
* [akBadge.appearance](#AkBadge+appearance) : <code>string</code>
* [akBadge.onValueUpdated](#AkBadge+onValueUpdated) : <code>function</code>
<a name="new_AkBadge_new"></a>
### new AkBadge()
Return React class reference for the Badge component.
**JS Example**
```js
import AkBadge from 'ak-badge';
ReactDOM.render(<AkBadge />, container);
```
<a name="AkBadge+value"></a>
### akBadge.value : <code>number</code>
The value displayed within the badge.
**Kind**: instance property of <code>[AkBadge](#AkBadge)</code>
**Default**: <code>0</code>
<a name="AkBadge+max"></a>
### akBadge.max : <code>number</code>
The max value to display.
If value is 100, and max is 50, "50+" will be displayed
**Kind**: instance property of <code>[AkBadge](#AkBadge)</code>
**Default**: <code>99</code>
<a name="AkBadge+appearance"></a>
### akBadge.appearance : <code>string</code>
Affects the visual style of the badge.
Allowed values are: 'default', 'primary', 'important', 'added', 'removed'.
**Kind**: instance property of <code>[AkBadge](#AkBadge)</code>
**Default**: <code>&quot;default&quot;</code>
<a name="AkBadge+onValueUpdated"></a>
### akBadge.onValueUpdated : <code>function</code>
Handler function to be called when the 'updated' prop is changed.
**Kind**: instance property of <code>[AkBadge](#AkBadge)</code>
## Support and feedback

@@ -102,3 +34,3 @@

Ask a question in our [forum](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-badge,ak-badge@2.1.0).
Ask a question in our [forum](https://answers.atlassian.com/questions/ask?title=AtlasKit%3A%20&topics=atlaskit,ak-badge,ak-badge@2.1.1).

@@ -105,0 +37,0 @@ Check [if someone has already asked the same question before](https://answers.atlassian.com/questions/topics/42926171/atlaskit).

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc