Comparing version 0.3.1 to 0.4.0
@@ -1,6 +0,21 @@ | ||
<a name="0.3.0"></a> | ||
# 0.3.0 (2016-09-01) | ||
<a name="0.4.0"></a> | ||
# 0.4.0 (2016-09-01) | ||
<a name="ak-badge@0.4.0"></a> | ||
# ak-badge@0.4.0 (2016-09-01) | ||
<a name="ak-badge@0.3.1"></a> | ||
## ak-badge@0.3.1 (2016-09-01) | ||
### Bug Fixes | ||
* Bump skatejs to pull in a fix for how attributes are handled in components. ([bd9bb8f](https://bitbucket.org/atlassian/atlaskit/commits/bd9bb8f)) | ||
<a name="ak-badge@0.2.0"></a> | ||
@@ -7,0 +22,0 @@ # ak-badge@0.2.0 (2016-08-29) |
@@ -69,2 +69,8 @@ module.exports = /******/ | ||
"use strict"; | ||
function _interopRequireWildcard(obj) { | ||
if (obj && obj.__esModule) return obj; | ||
var newObj = {}; | ||
if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]); | ||
return newObj["default"] = obj, newObj; | ||
} | ||
function _interopRequireDefault(obj) { | ||
@@ -77,3 +83,3 @@ return obj && obj.__esModule ? obj : { | ||
value: !0 | ||
}); | ||
}), exports.events = void 0; | ||
var _hasOwn = Object.prototype.hasOwnProperty, _forOwn = function(object, iterator) { | ||
@@ -87,3 +93,3 @@ for (var prop in object) _hasOwn.call(object, prop) && iterator(object[prop], prop); | ||
__webpack_require__(3); | ||
var _skatejs = __webpack_require__(7), _shadow = __webpack_require__(8), _shadow2 = _interopRequireDefault(_shadow), _classnames = __webpack_require__(9), _classnames2 = _interopRequireDefault(_classnames), _akutilCommon = __webpack_require__(10), APPEARANCE_ENUM = { | ||
var _skatejs = __webpack_require__(7), _shadow = __webpack_require__(8), _shadow2 = _interopRequireDefault(_shadow), _classnames = __webpack_require__(9), _classnames2 = _interopRequireDefault(_classnames), _akutilCommon = __webpack_require__(10), _events = __webpack_require__(11), events = _interopRequireWildcard(_events), APPEARANCE_ENUM = { | ||
values: [ "default", "primary", "important", "added", "removed" ], | ||
@@ -103,3 +109,3 @@ missingDefault: "default", | ||
updated: function(elem, prev) { | ||
return prev && prev.value !== elem.value && (0, _skatejs.emit)(elem, "change", { | ||
return prev && prev.value !== elem.value && (0, _skatejs.emit)(elem, events.change, { | ||
detail: { | ||
@@ -148,3 +154,3 @@ oldValue: prev.value, | ||
}; | ||
exports["default"] = (0, _skatejs.define)("ak-badge", definition); | ||
exports["default"] = (0, _skatejs.define)("ak-badge", definition), exports.events = events; | ||
}, /* 1 */ | ||
@@ -387,2 +393,10 @@ , /* 2 */ | ||
module.exports = require("akutil-common"); | ||
}, /* 11 */ | ||
/***/ | ||
function(module, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: !0 | ||
}); | ||
exports.change = "change"; | ||
} ]); |
@@ -1,1 +0,1 @@ | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.prototype.hasOwnProperty,a=function(e,t){for(var n in e)o.call(e,n)&&t(e[n],n)},i=function m(e){var t=typeof e;"number"===t||"string"===t||"object"===t&&e instanceof String?u.vdom.text(e):"function"===t&&e.__jsxDOMWrapper?e():Array.isArray(e)?e.forEach(m):"object"===t&&"[object Object]"===String(e)&&a(e,m)};n(3);var u=n(7),l=n(8),s=r(l),c=n(9),f=r(c),d=n(10),p={values:["default","primary","important","added","removed"],missingDefault:"default",invalidDefault:"default"},v={render:function(e){var t=function(){return e.value<0?0:e.max>0&&e.value>e.max?e.max+"+":e.value===1/0?"∞":e.value}(),n=(0,f["default"])([s["default"].locals.value,s["default"].locals[e.appearance]]);return u.vdom.elementOpen("span",null,null,"class","container"),u.vdom.elementOpen("style"),i(s["default"].toString()),u.vdom.elementClose("style"),u.vdom.elementOpen("span",null,null,"class",n),i(t),u.vdom.elementClose("span"),u.vdom.elementClose("span")},updated:function(e,t){return t&&t.value!==e.value&&(0,u.emit)(e,"change",{detail:{oldValue:t.value,newValue:e.value}}),u.Component.updated(e,t)},props:{value:u.prop.number({attribute:!0,"default":0}),max:u.prop.number({attribute:!0,"default":99}),appearance:(0,d.enumeration)(p)({attribute:!0})}};t["default"]=(0,u.define)("ak-badge",v)},,,function(e,t,n){var r=n(4);"string"==typeof r&&(r=[[e.id,r,""]]),n(6)(r,{}),r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,"._1TERpbevS34KWFjItzQyc_,ak-badge{display:inline-block}._1TERpbevS34KWFjItzQyc_:not([defined]),ak-badge:not([defined]){display:none}",""]),t.locals={"ak-badge":"_1TERpbevS34KWFjItzQyc_",akBadge:"_1TERpbevS34KWFjItzQyc_"}},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(r[a]=!0)}for(o=0;o<t.length;o++){var i=t[o];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),e.push(i))}},e}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=p[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(s(r.parts[a],t))}else{for(var i=[],a=0;a<r.parts.length;a++)i.push(s(r.parts[a],t));p[r.id]={id:r.id,refs:1,parts:i}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],a=o[0],i=o[1],u=o[2],l=o[3],s={css:i,media:u,sourceMap:l};n[a]?n[a].parts.push(s):t.push(n[a]={id:a,parts:[s]})}return t}function a(e,t){var n=h(),r=g[g.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),g.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.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",a(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",a(e,t),t}function s(e,t){var n,r,o;if(t.singleton){var a=y++;n=b||(b=u(t)),r=c.bind(null,n,a,!1),o=c.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=d.bind(null,n),o=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=u(t),r=f.bind(null,n),o=function(){i(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function c(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(o),a&&URL.revokeObjectURL(a)}var p={},v=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=v(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=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var a=[],i=0;i<n.length;i++){var u=n[i],l=p[u.id];l.refs--,a.push(l)}if(e){var s=o(e);r(s,t)}for(var i=0;i<a.length;i++){var l=a[i];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete p[l.id]}}}};var x=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=require("skatejs")},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,".ijTcAcAZxkHj_XyMF7WOj{display:inline-block}._1XOjyz6nkYp0PwNm2_R5GN{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}.h4MwqeVnS3URyoNhqd_8p{background:#e5e8ec;color:#42526e}._3m6YegzVE32UQC6u2al8qi{background:#165ecc;color:#fff}.Ky0Y9zBAheCic3aMGGJ1W{background:#ed5451;color:#fff}._2HkxMzs0MGI9iWTzp7zpWq{background:#e2ffee;color:#008364}.VGziEGICtgeF8FIY3d0-f{background:#ffe1e4;color:#bf2117}",""]),t.locals={container:"ijTcAcAZxkHj_XyMF7WOj",container:"ijTcAcAZxkHj_XyMF7WOj",value:"_1XOjyz6nkYp0PwNm2_R5GN",value:"_1XOjyz6nkYp0PwNm2_R5GN","default":"h4MwqeVnS3URyoNhqd_8p","default":"h4MwqeVnS3URyoNhqd_8p",primary:"_3m6YegzVE32UQC6u2al8qi",primary:"_3m6YegzVE32UQC6u2al8qi",important:"Ky0Y9zBAheCic3aMGGJ1W",important:"Ky0Y9zBAheCic3aMGGJ1W",added:"_2HkxMzs0MGI9iWTzp7zpWq",added:"_2HkxMzs0MGI9iWTzp7zpWq",removed:"VGziEGICtgeF8FIY3d0-f",removed:"VGziEGICtgeF8FIY3d0-f"}},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("akutil-common")}]); | ||
module.exports=function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.events=void 0;var a=Object.prototype.hasOwnProperty,i=function(e,t){for(var n in e)a.call(e,n)&&t(e[n],n)},u=function b(e){var t=typeof e;"number"===t||"string"===t||"object"===t&&e instanceof String?l.vdom.text(e):"function"===t&&e.__jsxDOMWrapper?e():Array.isArray(e)?e.forEach(b):"object"===t&&"[object Object]"===String(e)&&i(e,b)};n(3);var l=n(7),s=n(8),c=o(s),f=n(9),d=o(f),p=n(10),v=n(11),m=r(v),h={values:["default","primary","important","added","removed"],missingDefault:"default",invalidDefault:"default"},y={render:function(e){var t=function(){return e.value<0?0:e.max>0&&e.value>e.max?e.max+"+":e.value===1/0?"∞":e.value}(),n=(0,d["default"])([c["default"].locals.value,c["default"].locals[e.appearance]]);return l.vdom.elementOpen("span",null,null,"class","container"),l.vdom.elementOpen("style"),u(c["default"].toString()),l.vdom.elementClose("style"),l.vdom.elementOpen("span",null,null,"class",n),u(t),l.vdom.elementClose("span"),l.vdom.elementClose("span")},updated:function(e,t){return t&&t.value!==e.value&&(0,l.emit)(e,m.change,{detail:{oldValue:t.value,newValue:e.value}}),l.Component.updated(e,t)},props:{value:l.prop.number({attribute:!0,"default":0}),max:l.prop.number({attribute:!0,"default":99}),appearance:(0,p.enumeration)(h)({attribute:!0})}};t["default"]=(0,l.define)("ak-badge",y),t.events=m},,,function(e,t,n){var r=n(4);"string"==typeof r&&(r=[[e.id,r,""]]),n(6)(r,{}),r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,"._1TERpbevS34KWFjItzQyc_,ak-badge{display:inline-block}._1TERpbevS34KWFjItzQyc_:not([defined]),ak-badge:not([defined]){display:none}",""]),t.locals={"ak-badge":"_1TERpbevS34KWFjItzQyc_",akBadge:"_1TERpbevS34KWFjItzQyc_"}},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(r[a]=!0)}for(o=0;o<t.length;o++){var i=t[o];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),e.push(i))}},e}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=p[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(s(r.parts[a],t))}else{for(var i=[],a=0;a<r.parts.length;a++)i.push(s(r.parts[a],t));p[r.id]={id:r.id,refs:1,parts:i}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],a=o[0],i=o[1],u=o[2],l=o[3],s={css:i,media:u,sourceMap:l};n[a]?n[a].parts.push(s):t.push(n[a]={id:a,parts:[s]})}return t}function a(e,t){var n=h(),r=g[g.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),g.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.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",a(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",a(e,t),t}function s(e,t){var n,r,o;if(t.singleton){var a=b++;n=y||(y=u(t)),r=c.bind(null,n,a,!1),o=c.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(t),r=d.bind(null,n),o=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=u(t),r=f.bind(null,n),o=function(){i(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function c(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(o),a&&URL.revokeObjectURL(a)}var p={},v=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},m=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=v(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,b=0,g=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=m()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var a=[],i=0;i<n.length;i++){var u=n[i],l=p[u.id];l.refs--,a.push(l)}if(e){var s=o(e);r(s,t)}for(var i=0;i<a.length;i++){var l=a[i];if(0===l.refs){for(var c=0;c<l.parts.length;c++)l.parts[c]();delete p[l.id]}}}};var x=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,t){e.exports=require("skatejs")},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,".ijTcAcAZxkHj_XyMF7WOj{display:inline-block}._1XOjyz6nkYp0PwNm2_R5GN{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}.h4MwqeVnS3URyoNhqd_8p{background:#e5e8ec;color:#42526e}._3m6YegzVE32UQC6u2al8qi{background:#165ecc;color:#fff}.Ky0Y9zBAheCic3aMGGJ1W{background:#ed5451;color:#fff}._2HkxMzs0MGI9iWTzp7zpWq{background:#e2ffee;color:#008364}.VGziEGICtgeF8FIY3d0-f{background:#ffe1e4;color:#bf2117}",""]),t.locals={container:"ijTcAcAZxkHj_XyMF7WOj",container:"ijTcAcAZxkHj_XyMF7WOj",value:"_1XOjyz6nkYp0PwNm2_R5GN",value:"_1XOjyz6nkYp0PwNm2_R5GN","default":"h4MwqeVnS3URyoNhqd_8p","default":"h4MwqeVnS3URyoNhqd_8p",primary:"_3m6YegzVE32UQC6u2al8qi",primary:"_3m6YegzVE32UQC6u2al8qi",important:"Ky0Y9zBAheCic3aMGGJ1W",important:"Ky0Y9zBAheCic3aMGGJ1W",added:"_2HkxMzs0MGI9iWTzp7zpWq",added:"_2HkxMzs0MGI9iWTzp7zpWq",removed:"VGziEGICtgeF8FIY3d0-f",removed:"VGziEGICtgeF8FIY3d0-f"}},function(e,t){e.exports=require("classnames")},function(e,t){e.exports=require("akutil-common")},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.change="change"}]); |
@@ -72,2 +72,8 @@ !function(root, factory) { | ||
"use strict"; | ||
function _interopRequireWildcard(obj) { | ||
if (obj && obj.__esModule) return obj; | ||
var newObj = {}; | ||
if (null != obj) for (var key in obj) Object.prototype.hasOwnProperty.call(obj, key) && (newObj[key] = obj[key]); | ||
return newObj["default"] = obj, newObj; | ||
} | ||
function _interopRequireDefault(obj) { | ||
@@ -80,3 +86,3 @@ return obj && obj.__esModule ? obj : { | ||
value: !0 | ||
}); | ||
}), exports.events = void 0; | ||
var _hasOwn = Object.prototype.hasOwnProperty, _forOwn = function(object, iterator) { | ||
@@ -90,3 +96,3 @@ for (var prop in object) _hasOwn.call(object, prop) && iterator(object[prop], prop); | ||
__webpack_require__(3); | ||
var _skatejs = __webpack_require__(7), _shadow = __webpack_require__(8), _shadow2 = _interopRequireDefault(_shadow), _classnames = __webpack_require__(9), _classnames2 = _interopRequireDefault(_classnames), _akutilCommon = __webpack_require__(10), APPEARANCE_ENUM = { | ||
var _skatejs = __webpack_require__(7), _shadow = __webpack_require__(8), _shadow2 = _interopRequireDefault(_shadow), _classnames = __webpack_require__(9), _classnames2 = _interopRequireDefault(_classnames), _akutilCommon = __webpack_require__(10), _events = __webpack_require__(11), events = _interopRequireWildcard(_events), APPEARANCE_ENUM = { | ||
values: [ "default", "primary", "important", "added", "removed" ], | ||
@@ -106,3 +112,3 @@ missingDefault: "default", | ||
updated: function(elem, prev) { | ||
return prev && prev.value !== elem.value && (0, _skatejs.emit)(elem, "change", { | ||
return prev && prev.value !== elem.value && (0, _skatejs.emit)(elem, events.change, { | ||
detail: { | ||
@@ -151,3 +157,3 @@ oldValue: prev.value, | ||
}; | ||
exports["default"] = (0, _skatejs.define)("ak-badge", definition); | ||
exports["default"] = (0, _skatejs.define)("ak-badge", definition), exports.events = events; | ||
}, /* 1 */ | ||
@@ -390,3 +396,11 @@ , /* 2 */ | ||
module.exports = __WEBPACK_EXTERNAL_MODULE_10__; | ||
}, /* 11 */ | ||
/***/ | ||
function(module, exports) { | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: !0 | ||
}); | ||
exports.change = "change"; | ||
} ]); | ||
}); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("skatejs"),require("classnames"),require("akutil-common")):"function"==typeof define&&define.amd?define(["skatejs","classnames","akutil-common"],t):"object"==typeof exports?exports.akBadge=t(require("skatejs"),require("classnames"),require("akutil-common")):e.akBadge=t(e.skatejs,e.classnames,e["akutil-common"])}(this,function(e,t,n){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var o=Object.prototype.hasOwnProperty,a=function(e,t){for(var n in e)o.call(e,n)&&t(e[n],n)},i=function v(e){var t=typeof e;"number"===t||"string"===t||"object"===t&&e instanceof String?s.vdom.text(e):"function"===t&&e.__jsxDOMWrapper?e():Array.isArray(e)?e.forEach(v):"object"===t&&"[object Object]"===String(e)&&a(e,v)};n(3);var s=n(7),u=n(8),l=r(u),c=n(9),f=r(c),d=n(10),p={values:["default","primary","important","added","removed"],missingDefault:"default",invalidDefault:"default"},m={render:function(e){var t=function(){return e.value<0?0:e.max>0&&e.value>e.max?e.max+"+":e.value===1/0?"∞":e.value}(),n=(0,f["default"])([l["default"].locals.value,l["default"].locals[e.appearance]]);return s.vdom.elementOpen("span",null,null,"class","container"),s.vdom.elementOpen("style"),i(l["default"].toString()),s.vdom.elementClose("style"),s.vdom.elementOpen("span",null,null,"class",n),i(t),s.vdom.elementClose("span"),s.vdom.elementClose("span")},updated:function(e,t){return t&&t.value!==e.value&&(0,s.emit)(e,"change",{detail:{oldValue:t.value,newValue:e.value}}),s.Component.updated(e,t)},props:{value:s.prop.number({attribute:!0,"default":0}),max:s.prop.number({attribute:!0,"default":99}),appearance:(0,d.enumeration)(p)({attribute:!0})}};t["default"]=(0,s.define)("ak-badge",m)},,,function(e,t,n){var r=n(4);"string"==typeof r&&(r=[[e.id,r,""]]),n(6)(r,{}),r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,"._1TERpbevS34KWFjItzQyc_,ak-badge{display:inline-block}._1TERpbevS34KWFjItzQyc_:not([defined]),ak-badge:not([defined]){display:none}",""]),t.locals={"ak-badge":"_1TERpbevS34KWFjItzQyc_",akBadge:"_1TERpbevS34KWFjItzQyc_"}},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(r[a]=!0)}for(o=0;o<t.length;o++){var i=t[o];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),e.push(i))}},e}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=p[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(l(r.parts[a],t))}else{for(var i=[],a=0;a<r.parts.length;a++)i.push(l(r.parts[a],t));p[r.id]={id:r.id,refs:1,parts:i}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],a=o[0],i=o[1],s=o[2],u=o[3],l={css:i,media:s,sourceMap:u};n[a]?n[a].parts.push(l):t.push(n[a]={id:a,parts:[l]})}return t}function a(e,t){var n=h(),r=g[g.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),g.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function i(e){e.parentNode.removeChild(e);var t=g.indexOf(e);t>=0&&g.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",a(e,t),t}function u(e){var t=document.createElement("link");return t.rel="stylesheet",a(e,t),t}function l(e,t){var n,r,o;if(t.singleton){var a=b++;n=y||(y=s(t)),r=c.bind(null,n,a,!1),o=c.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=u(t),r=d.bind(null,n),o=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=f.bind(null,n),o=function(){i(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function c(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(o),a&&URL.revokeObjectURL(a)}var p={},m=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},v=m(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=m(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,b=0,g=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=v()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var a=[],i=0;i<n.length;i++){var s=n[i],u=p[s.id];u.refs--,a.push(u)}if(e){var l=o(e);r(l,t)}for(var i=0;i<a.length;i++){var u=a[i];if(0===u.refs){for(var c=0;c<u.parts.length;c++)u.parts[c]();delete p[u.id]}}}};var x=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(t,n){t.exports=e},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,".ijTcAcAZxkHj_XyMF7WOj{display:inline-block}._1XOjyz6nkYp0PwNm2_R5GN{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}.h4MwqeVnS3URyoNhqd_8p{background:#e5e8ec;color:#42526e}._3m6YegzVE32UQC6u2al8qi{background:#165ecc;color:#fff}.Ky0Y9zBAheCic3aMGGJ1W{background:#ed5451;color:#fff}._2HkxMzs0MGI9iWTzp7zpWq{background:#e2ffee;color:#008364}.VGziEGICtgeF8FIY3d0-f{background:#ffe1e4;color:#bf2117}",""]),t.locals={container:"ijTcAcAZxkHj_XyMF7WOj",container:"ijTcAcAZxkHj_XyMF7WOj",value:"_1XOjyz6nkYp0PwNm2_R5GN",value:"_1XOjyz6nkYp0PwNm2_R5GN","default":"h4MwqeVnS3URyoNhqd_8p","default":"h4MwqeVnS3URyoNhqd_8p",primary:"_3m6YegzVE32UQC6u2al8qi",primary:"_3m6YegzVE32UQC6u2al8qi",important:"Ky0Y9zBAheCic3aMGGJ1W",important:"Ky0Y9zBAheCic3aMGGJ1W",added:"_2HkxMzs0MGI9iWTzp7zpWq",added:"_2HkxMzs0MGI9iWTzp7zpWq",removed:"VGziEGICtgeF8FIY3d0-f",removed:"VGziEGICtgeF8FIY3d0-f"}},function(e,n){e.exports=t},function(e,t){e.exports=n}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("skatejs"),require("classnames"),require("akutil-common")):"function"==typeof define&&define.amd?define(["skatejs","classnames","akutil-common"],t):"object"==typeof exports?exports.akBadge=t(require("skatejs"),require("classnames"),require("akutil-common")):e.akBadge=t(e.skatejs,e.classnames,e["akutil-common"])}(this,function(e,t,n){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0}),t.events=void 0;var a=Object.prototype.hasOwnProperty,i=function(e,t){for(var n in e)a.call(e,n)&&t(e[n],n)},u=function b(e){var t=typeof e;"number"===t||"string"===t||"object"===t&&e instanceof String?s.vdom.text(e):"function"===t&&e.__jsxDOMWrapper?e():Array.isArray(e)?e.forEach(b):"object"===t&&"[object Object]"===String(e)&&i(e,b)};n(3);var s=n(7),l=n(8),c=o(l),f=n(9),d=o(f),p=n(10),m=n(11),v=r(m),h={values:["default","primary","important","added","removed"],missingDefault:"default",invalidDefault:"default"},y={render:function(e){var t=function(){return e.value<0?0:e.max>0&&e.value>e.max?e.max+"+":e.value===1/0?"∞":e.value}(),n=(0,d["default"])([c["default"].locals.value,c["default"].locals[e.appearance]]);return s.vdom.elementOpen("span",null,null,"class","container"),s.vdom.elementOpen("style"),u(c["default"].toString()),s.vdom.elementClose("style"),s.vdom.elementOpen("span",null,null,"class",n),u(t),s.vdom.elementClose("span"),s.vdom.elementClose("span")},updated:function(e,t){return t&&t.value!==e.value&&(0,s.emit)(e,v.change,{detail:{oldValue:t.value,newValue:e.value}}),s.Component.updated(e,t)},props:{value:s.prop.number({attribute:!0,"default":0}),max:s.prop.number({attribute:!0,"default":99}),appearance:(0,p.enumeration)(h)({attribute:!0})}};t["default"]=(0,s.define)("ak-badge",y),t.events=v},,,function(e,t,n){var r=n(4);"string"==typeof r&&(r=[[e.id,r,""]]),n(6)(r,{}),r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,"._1TERpbevS34KWFjItzQyc_,ak-badge{display:inline-block}._1TERpbevS34KWFjItzQyc_:not([defined]),ak-badge:not([defined]){display:none}",""]),t.locals={"ak-badge":"_1TERpbevS34KWFjItzQyc_",akBadge:"_1TERpbevS34KWFjItzQyc_"}},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t];n[2]?e.push("@media "+n[2]+"{"+n[1]+"}"):e.push(n[1])}return e.join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o<this.length;o++){var a=this[o][0];"number"==typeof a&&(r[a]=!0)}for(o=0;o<t.length;o++){var i=t[o];"number"==typeof i[0]&&r[i[0]]||(n&&!i[2]?i[2]=n:n&&(i[2]="("+i[2]+") and ("+n+")"),e.push(i))}},e}},function(e,t,n){function r(e,t){for(var n=0;n<e.length;n++){var r=e[n],o=p[r.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](r.parts[a]);for(;a<r.parts.length;a++)o.parts.push(l(r.parts[a],t))}else{for(var i=[],a=0;a<r.parts.length;a++)i.push(l(r.parts[a],t));p[r.id]={id:r.id,refs:1,parts:i}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],a=o[0],i=o[1],u=o[2],s=o[3],l={css:i,media:u,sourceMap:s};n[a]?n[a].parts.push(l):t.push(n[a]={id:a,parts:[l]})}return t}function a(e,t){var n=h(),r=g[g.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),g.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.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",a(e,t),t}function s(e){var t=document.createElement("link");return t.rel="stylesheet",a(e,t),t}function l(e,t){var n,r,o;if(t.singleton){var a=b++;n=y||(y=u(t)),r=c.bind(null,n,a,!1),o=c.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(t),r=d.bind(null,n),o=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=u(t),r=f.bind(null,n),o=function(){i(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}function c(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var a=document.createTextNode(o),i=e.childNodes;i[t]&&e.removeChild(i[t]),i.length?e.insertBefore(a,i[t]):e.appendChild(a)}}function f(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function d(e,t){var n=t.css,r=t.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(o),a&&URL.revokeObjectURL(a)}var p={},m=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},v=m(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=m(function(){return document.head||document.getElementsByTagName("head")[0]}),y=null,b=0,g=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=v()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var a=[],i=0;i<n.length;i++){var u=n[i],s=p[u.id];s.refs--,a.push(s)}if(e){var l=o(e);r(l,t)}for(var i=0;i<a.length;i++){var s=a[i];if(0===s.refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete p[s.id]}}}};var x=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(t,n){t.exports=e},function(e,t,n){t=e.exports=n(5)(),t.push([e.id,".ijTcAcAZxkHj_XyMF7WOj{display:inline-block}._1XOjyz6nkYp0PwNm2_R5GN{border-radius:2em;display:inline-block;font-size:12px;font-weight:400;line-height:1;min-width:1px;padding:.16666667em .5em;text-align:center}.h4MwqeVnS3URyoNhqd_8p{background:#e5e8ec;color:#42526e}._3m6YegzVE32UQC6u2al8qi{background:#165ecc;color:#fff}.Ky0Y9zBAheCic3aMGGJ1W{background:#ed5451;color:#fff}._2HkxMzs0MGI9iWTzp7zpWq{background:#e2ffee;color:#008364}.VGziEGICtgeF8FIY3d0-f{background:#ffe1e4;color:#bf2117}",""]),t.locals={container:"ijTcAcAZxkHj_XyMF7WOj",container:"ijTcAcAZxkHj_XyMF7WOj",value:"_1XOjyz6nkYp0PwNm2_R5GN",value:"_1XOjyz6nkYp0PwNm2_R5GN","default":"h4MwqeVnS3URyoNhqd_8p","default":"h4MwqeVnS3URyoNhqd_8p",primary:"_3m6YegzVE32UQC6u2al8qi",primary:"_3m6YegzVE32UQC6u2al8qi",important:"Ky0Y9zBAheCic3aMGGJ1W",important:"Ky0Y9zBAheCic3aMGGJ1W",added:"_2HkxMzs0MGI9iWTzp7zpWq",added:"_2HkxMzs0MGI9iWTzp7zpWq",removed:"VGziEGICtgeF8FIY3d0-f",removed:"VGziEGICtgeF8FIY3d0-f"}},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.change="change"}])}); |
{ | ||
"name": "ak-badge", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"description": "ak-badge webcomponent", | ||
@@ -5,0 +5,0 @@ "main": "dist/bundle.js", |
57996
803