ak-blanket
Advanced tools
Comparing version 1.3.0 to 2.0.0
@@ -1,6 +0,16 @@ | ||
<a name="1.1.0"></a> | ||
# 1.1.0 (2016-08-26) | ||
<a name="1.3.0"></a> | ||
# 1.3.0 (2016-08-31) | ||
<a name="ak-blanket@1.2.0"></a> | ||
# ak-blanket@1.2.0 (2016-08-29) | ||
### Features | ||
* Make babel-runtime part of the package, so it can be de-duplicated on build by the consumer ([9863540](https://bitbucket.org/atlassian/atlaskit/commits/9863540)) | ||
<a name="ak-blanket@1.1.0"></a> | ||
@@ -7,0 +17,0 @@ # ak-blanket@1.1.0 (2016-08-26) |
@@ -74,5 +74,5 @@ module.exports = /******/ | ||
} | ||
function handleBlur(elem) { | ||
function handleActivation(elem) { | ||
return function() { | ||
elem.clickable && (0, _skatejs.emit)(elem, "ak-blanket-click"); | ||
elem.clickable && (0, _skatejs.emit)(elem, EVENTS.ACTIVATE); | ||
}; | ||
@@ -82,3 +82,3 @@ } | ||
value: !0 | ||
}); | ||
}), exports.EVENTS = void 0; | ||
var _defineProperty2 = __webpack_require__(3), _defineProperty3 = _interopRequireDefault(_defineProperty2), _hasOwn = Object.prototype.hasOwnProperty, _forOwn = function(object, iterator) { | ||
@@ -92,3 +92,5 @@ for (var prop in object) _hasOwn.call(object, prop) && iterator(object[prop], prop); | ||
__webpack_require__(4); | ||
var _skatejs = __webpack_require__(8), _shadow = __webpack_require__(9), _shadow2 = _interopRequireDefault(_shadow), _classnames = __webpack_require__(10), _classnames2 = _interopRequireDefault(_classnames); | ||
var _skatejs = __webpack_require__(8), _shadow = __webpack_require__(9), _shadow2 = _interopRequireDefault(_shadow), _classnames = __webpack_require__(10), _classnames2 = _interopRequireDefault(_classnames), EVENTS = { | ||
ACTIVATE: "activate" | ||
}; | ||
/** | ||
@@ -105,3 +107,3 @@ * @description Create instances of the component programmatically, or using markup. | ||
return _skatejs.vdom.elementOpen("div"), _skatejs.vdom.elementOpen("style"), _renderArbitrary(_shadow2["default"].toString()), | ||
_skatejs.vdom.elementClose("style"), _skatejs.vdom.elementOpen("div", null, null, "onClick", handleBlur(elem), "onTouch", handleBlur(elem), "className", classes), | ||
_skatejs.vdom.elementClose("style"), _skatejs.vdom.elementOpen("div", null, null, "onClick", handleActivation(elem), "onTouch", handleActivation(elem), "className", classes), | ||
_skatejs.vdom.elementClose("div"), _skatejs.vdom.elementClose("div"); | ||
@@ -135,3 +137,3 @@ }, | ||
} | ||
}); | ||
}), exports.EVENTS = EVENTS; | ||
}, /* 1 */ | ||
@@ -138,0 +140,0 @@ , /* 2 */ |
@@ -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}}function o(e){return function(){e.clickable&&(0,f.emit)(e,"ak-blanket-click")}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),a=r(i),s=Object.prototype.hasOwnProperty,l=function(e,t){for(var n in e)s.call(e,n)&&t(e[n],n)},u=function h(e){var t=typeof e;"number"===t||"string"===t||"object"===t&&e instanceof String?f.vdom.text(e):"function"===t&&e.__jsxDOMWrapper?e():Array.isArray(e)?e.forEach(h):"object"===t&&"[object Object]"===String(e)&&l(e,h)};n(4);var f=n(8),c=n(9),d=r(c),p=n(10),v=r(p);t["default"]=(0,f.define)("ak-blanket",{render:function(e){var t=(0,v["default"])([d["default"].locals.blanket,(0,a["default"])({},""+d["default"].locals.tinted,e.tinted)]);return f.vdom.elementOpen("div"),f.vdom.elementOpen("style"),u(d["default"].toString()),f.vdom.elementClose("style"),f.vdom.elementOpen("div",null,null,"onClick",o(e),"onTouch",o(e),"className",t),f.vdom.elementClose("div"),f.vdom.elementClose("div")},props:{tinted:f.prop["boolean"]({attribute:!0}),clickable:f.prop["boolean"]({attribute:!0})}})},,,function(e,t){e.exports=require("babel-runtime/helpers/defineProperty")},function(e,t,n){var r=n(5);"string"==typeof r&&(r=[[e.id,r,""]]),n(7)(r,{}),r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,"._1xMiJAodBrAKhL8WEHwdrW,ak-blanket{display:block}._1xMiJAodBrAKhL8WEHwdrW:not([defined]),ak-blanket:not([defined]){display:none}",""]),t.locals={"ak-blanket":"_1xMiJAodBrAKhL8WEHwdrW",akBlanket:"_1xMiJAodBrAKhL8WEHwdrW"}},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 i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},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 i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(u(r.parts[i],t))}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(u(r.parts[i],t));p[r.id]={id:r.id,refs:1,parts:a}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],i=o[0],a=o[1],s=o[2],l=o[3],u={css:a,media:s,sourceMap:l};n[i]?n[i].parts.push(u):t.push(n[i]={id:i,parts:[u]})}return t}function i(e,t){var n=b(),r=y[y.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),y.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=y.indexOf(e);t>=0&&y.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",i(e,t),t}function u(e,t){var n,r,o;if(t.singleton){var i=g++;n=m||(m=s(t)),r=f.bind(null,n,i,!1),o=f.bind(null,n,i,!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(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=c.bind(null,n),o=function(){a(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 f(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function c(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"}),i=e.href;e.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var p={},v=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},h=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),b=v(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,g=0,y=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=h()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var i=[],a=0;a<n.length;a++){var s=n[a],l=p[s.id];l.refs--,i.push(l)}if(e){var u=o(e);r(u,t)}for(var a=0;a<i.length;a++){var l=i[a];if(0===l.refs){for(var f=0;f<l.parts.length;f++)l.parts[f]();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(6)(),t.push([e.id,"._1W1Nqrropv0xHevXc01L9b{bottom:0;left:0;position:fixed;right:0;top:0}._2jkUido-eka0FjtgtzHfhf{background:#091e42;opacity:.5}",""]),t.locals={blanket:"_1W1Nqrropv0xHevXc01L9b",blanket:"_1W1Nqrropv0xHevXc01L9b",tinted:"_2jkUido-eka0FjtgtzHfhf",tinted:"_2jkUido-eka0FjtgtzHfhf"}},function(e,t){e.exports=require("classnames")}]); | ||
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}}function o(e){return function(){e.clickable&&(0,f.emit)(e,h.ACTIVATE)}}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENTS=void 0;var i=n(3),a=r(i),s=Object.prototype.hasOwnProperty,l=function(e,t){for(var n in e)s.call(e,n)&&t(e[n],n)},u=function b(e){var t=typeof e;"number"===t||"string"===t||"object"===t&&e instanceof String?f.vdom.text(e):"function"===t&&e.__jsxDOMWrapper?e():Array.isArray(e)?e.forEach(b):"object"===t&&"[object Object]"===String(e)&&l(e,b)};n(4);var f=n(8),c=n(9),d=r(c),p=n(10),v=r(p),h={ACTIVATE:"activate"};t["default"]=(0,f.define)("ak-blanket",{render:function(e){var t=(0,v["default"])([d["default"].locals.blanket,(0,a["default"])({},""+d["default"].locals.tinted,e.tinted)]);return f.vdom.elementOpen("div"),f.vdom.elementOpen("style"),u(d["default"].toString()),f.vdom.elementClose("style"),f.vdom.elementOpen("div",null,null,"onClick",o(e),"onTouch",o(e),"className",t),f.vdom.elementClose("div"),f.vdom.elementClose("div")},props:{tinted:f.prop["boolean"]({attribute:!0}),clickable:f.prop["boolean"]({attribute:!0})}}),t.EVENTS=h},,,function(e,t){e.exports=require("babel-runtime/helpers/defineProperty")},function(e,t,n){var r=n(5);"string"==typeof r&&(r=[[e.id,r,""]]),n(7)(r,{}),r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,"._1xMiJAodBrAKhL8WEHwdrW,ak-blanket{display:block}._1xMiJAodBrAKhL8WEHwdrW:not([defined]),ak-blanket:not([defined]){display:none}",""]),t.locals={"ak-blanket":"_1xMiJAodBrAKhL8WEHwdrW",akBlanket:"_1xMiJAodBrAKhL8WEHwdrW"}},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 i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},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 i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(u(r.parts[i],t))}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(u(r.parts[i],t));p[r.id]={id:r.id,refs:1,parts:a}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],i=o[0],a=o[1],s=o[2],l=o[3],u={css:a,media:s,sourceMap:l};n[i]?n[i].parts.push(u):t.push(n[i]={id:i,parts:[u]})}return t}function i(e,t){var n=b(),r=y[y.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),y.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=y.indexOf(e);t>=0&&y.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",i(e,t),t}function u(e,t){var n,r,o;if(t.singleton){var i=g++;n=m||(m=s(t)),r=f.bind(null,n,i,!1),o=f.bind(null,n,i,!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(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=c.bind(null,n),o=function(){a(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 f(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=x(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function c(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"}),i=e.href;e.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var p={},v=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},h=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),b=v(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,g=0,y=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=h()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var i=[],a=0;a<n.length;a++){var s=n[a],l=p[s.id];l.refs--,i.push(l)}if(e){var u=o(e);r(u,t)}for(var a=0;a<i.length;a++){var l=i[a];if(0===l.refs){for(var f=0;f<l.parts.length;f++)l.parts[f]();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(6)(),t.push([e.id,"._1W1Nqrropv0xHevXc01L9b{bottom:0;left:0;position:fixed;right:0;top:0}._2jkUido-eka0FjtgtzHfhf{background:#091e42;opacity:.5}",""]),t.locals={blanket:"_1W1Nqrropv0xHevXc01L9b",blanket:"_1W1Nqrropv0xHevXc01L9b",tinted:"_2jkUido-eka0FjtgtzHfhf",tinted:"_2jkUido-eka0FjtgtzHfhf"}},function(e,t){e.exports=require("classnames")}]); |
@@ -77,5 +77,5 @@ !function(root, factory) { | ||
} | ||
function handleBlur(elem) { | ||
function handleActivation(elem) { | ||
return function() { | ||
elem.clickable && (0, _skatejs.emit)(elem, "ak-blanket-click"); | ||
elem.clickable && (0, _skatejs.emit)(elem, EVENTS.ACTIVATE); | ||
}; | ||
@@ -85,3 +85,3 @@ } | ||
value: !0 | ||
}); | ||
}), exports.EVENTS = void 0; | ||
var _defineProperty2 = __webpack_require__(3), _defineProperty3 = _interopRequireDefault(_defineProperty2), _hasOwn = Object.prototype.hasOwnProperty, _forOwn = function(object, iterator) { | ||
@@ -95,3 +95,5 @@ for (var prop in object) _hasOwn.call(object, prop) && iterator(object[prop], prop); | ||
__webpack_require__(4); | ||
var _skatejs = __webpack_require__(8), _shadow = __webpack_require__(9), _shadow2 = _interopRequireDefault(_shadow), _classnames = __webpack_require__(10), _classnames2 = _interopRequireDefault(_classnames); | ||
var _skatejs = __webpack_require__(8), _shadow = __webpack_require__(9), _shadow2 = _interopRequireDefault(_shadow), _classnames = __webpack_require__(10), _classnames2 = _interopRequireDefault(_classnames), EVENTS = { | ||
ACTIVATE: "activate" | ||
}; | ||
/** | ||
@@ -108,3 +110,3 @@ * @description Create instances of the component programmatically, or using markup. | ||
return _skatejs.vdom.elementOpen("div"), _skatejs.vdom.elementOpen("style"), _renderArbitrary(_shadow2["default"].toString()), | ||
_skatejs.vdom.elementClose("style"), _skatejs.vdom.elementOpen("div", null, null, "onClick", handleBlur(elem), "onTouch", handleBlur(elem), "className", classes), | ||
_skatejs.vdom.elementClose("style"), _skatejs.vdom.elementOpen("div", null, null, "onClick", handleActivation(elem), "onTouch", handleActivation(elem), "className", classes), | ||
_skatejs.vdom.elementClose("div"), _skatejs.vdom.elementClose("div"); | ||
@@ -138,3 +140,3 @@ }, | ||
} | ||
}); | ||
}), exports.EVENTS = EVENTS; | ||
}, /* 1 */ | ||
@@ -141,0 +143,0 @@ , /* 2 */ |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/defineProperty"),require("skatejs"),require("classnames")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/defineProperty","skatejs","classnames"],t):"object"==typeof exports?exports.akBlanket=t(require("babel-runtime/helpers/defineProperty"),require("skatejs"),require("classnames")):e.akBlanket=t(e["babel-runtime/helpers/defineProperty"],e.skatejs,e.classnames)}(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}}function o(e){return function(){e.clickable&&(0,u.emit)(e,"ak-blanket-click")}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),a=r(i),s=Object.prototype.hasOwnProperty,l=function(e,t){for(var n in e)s.call(e,n)&&t(e[n],n)},f=function h(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(h):"object"===t&&"[object Object]"===String(e)&&l(e,h)};n(4);var u=n(8),c=n(9),d=r(c),p=n(10),v=r(p);t["default"]=(0,u.define)("ak-blanket",{render:function(e){var t=(0,v["default"])([d["default"].locals.blanket,(0,a["default"])({},""+d["default"].locals.tinted,e.tinted)]);return u.vdom.elementOpen("div"),u.vdom.elementOpen("style"),f(d["default"].toString()),u.vdom.elementClose("style"),u.vdom.elementOpen("div",null,null,"onClick",o(e),"onTouch",o(e),"className",t),u.vdom.elementClose("div"),u.vdom.elementClose("div")},props:{tinted:u.prop["boolean"]({attribute:!0}),clickable:u.prop["boolean"]({attribute:!0})}})},,,function(t,n){t.exports=e},function(e,t,n){var r=n(5);"string"==typeof r&&(r=[[e.id,r,""]]),n(7)(r,{}),r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,"._1xMiJAodBrAKhL8WEHwdrW,ak-blanket{display:block}._1xMiJAodBrAKhL8WEHwdrW:not([defined]),ak-blanket:not([defined]){display:none}",""]),t.locals={"ak-blanket":"_1xMiJAodBrAKhL8WEHwdrW",akBlanket:"_1xMiJAodBrAKhL8WEHwdrW"}},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 i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},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 i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(f(r.parts[i],t))}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(f(r.parts[i],t));p[r.id]={id:r.id,refs:1,parts:a}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],i=o[0],a=o[1],s=o[2],l=o[3],f={css:a,media:s,sourceMap:l};n[i]?n[i].parts.push(f):t.push(n[i]={id:i,parts:[f]})}return t}function i(e,t){var n=b(),r=k[k.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),k.push(t);else{if("bottom"!==e.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(t)}}function a(e){e.parentNode.removeChild(e);var t=k.indexOf(e);t>=0&&k.splice(t,1)}function s(e){var t=document.createElement("style");return t.type="text/css",i(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",i(e,t),t}function f(e,t){var n,r,o;if(t.singleton){var i=y++;n=m||(m=s(t)),r=u.bind(null,n,i,!1),o=u.bind(null,n,i,!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(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=c.bind(null,n),o=function(){a(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 u(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=g(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function c(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"}),i=e.href;e.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var p={},v=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},h=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),b=v(function(){return document.head||document.getElementsByTagName("head")[0]}),m=null,y=0,k=[];e.exports=function(e,t){t=t||{},"undefined"==typeof t.singleton&&(t.singleton=h()),"undefined"==typeof t.insertAt&&(t.insertAt="bottom");var n=o(e);return r(n,t),function(e){for(var i=[],a=0;a<n.length;a++){var s=n[a],l=p[s.id];l.refs--,i.push(l)}if(e){var f=o(e);r(f,t)}for(var a=0;a<i.length;a++){var l=i[a];if(0===l.refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete p[l.id]}}}};var g=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,n){e.exports=t},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,"._1W1Nqrropv0xHevXc01L9b{bottom:0;left:0;position:fixed;right:0;top:0}._2jkUido-eka0FjtgtzHfhf{background:#091e42;opacity:.5}",""]),t.locals={blanket:"_1W1Nqrropv0xHevXc01L9b",blanket:"_1W1Nqrropv0xHevXc01L9b",tinted:"_2jkUido-eka0FjtgtzHfhf",tinted:"_2jkUido-eka0FjtgtzHfhf"}},function(e,t){e.exports=n}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babel-runtime/helpers/defineProperty"),require("skatejs"),require("classnames")):"function"==typeof define&&define.amd?define(["babel-runtime/helpers/defineProperty","skatejs","classnames"],t):"object"==typeof exports?exports.akBlanket=t(require("babel-runtime/helpers/defineProperty"),require("skatejs"),require("classnames")):e.akBlanket=t(e["babel-runtime/helpers/defineProperty"],e.skatejs,e.classnames)}(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}}function o(e){return function(){e.clickable&&(0,u.emit)(e,h.ACTIVATE)}}Object.defineProperty(t,"__esModule",{value:!0}),t.EVENTS=void 0;var i=n(3),a=r(i),s=Object.prototype.hasOwnProperty,l=function(e,t){for(var n in e)s.call(e,n)&&t(e[n],n)},f=function b(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(b):"object"===t&&"[object Object]"===String(e)&&l(e,b)};n(4);var u=n(8),c=n(9),d=r(c),p=n(10),v=r(p),h={ACTIVATE:"activate"};t["default"]=(0,u.define)("ak-blanket",{render:function(e){var t=(0,v["default"])([d["default"].locals.blanket,(0,a["default"])({},""+d["default"].locals.tinted,e.tinted)]);return u.vdom.elementOpen("div"),u.vdom.elementOpen("style"),f(d["default"].toString()),u.vdom.elementClose("style"),u.vdom.elementOpen("div",null,null,"onClick",o(e),"onTouch",o(e),"className",t),u.vdom.elementClose("div"),u.vdom.elementClose("div")},props:{tinted:u.prop["boolean"]({attribute:!0}),clickable:u.prop["boolean"]({attribute:!0})}}),t.EVENTS=h},,,function(t,n){t.exports=e},function(e,t,n){var r=n(5);"string"==typeof r&&(r=[[e.id,r,""]]),n(7)(r,{}),r.locals&&(e.exports=r.locals)},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,"._1xMiJAodBrAKhL8WEHwdrW,ak-blanket{display:block}._1xMiJAodBrAKhL8WEHwdrW:not([defined]),ak-blanket:not([defined]){display:none}",""]),t.locals={"ak-blanket":"_1xMiJAodBrAKhL8WEHwdrW",akBlanket:"_1xMiJAodBrAKhL8WEHwdrW"}},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 i=this[o][0];"number"==typeof i&&(r[i]=!0)}for(o=0;o<t.length;o++){var a=t[o];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},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 i=0;i<o.parts.length;i++)o.parts[i](r.parts[i]);for(;i<r.parts.length;i++)o.parts.push(f(r.parts[i],t))}else{for(var a=[],i=0;i<r.parts.length;i++)a.push(f(r.parts[i],t));p[r.id]={id:r.id,refs:1,parts:a}}}}function o(e){for(var t=[],n={},r=0;r<e.length;r++){var o=e[r],i=o[0],a=o[1],s=o[2],l=o[3],f={css:a,media:s,sourceMap:l};n[i]?n[i].parts.push(f):t.push(n[i]={id:i,parts:[f]})}return t}function i(e,t){var n=b(),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 a(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",i(e,t),t}function l(e){var t=document.createElement("link");return t.rel="stylesheet",i(e,t),t}function f(e,t){var n,r,o;if(t.singleton){var i=y++;n=m||(m=s(t)),r=u.bind(null,n,i,!1),o=u.bind(null,n,i,!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(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(t),r=c.bind(null,n),o=function(){a(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 u(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=k(t,o);else{var i=document.createTextNode(o),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}function c(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"}),i=e.href;e.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var p={},v=function(e){var t;return function(){return"undefined"==typeof t&&(t=e.apply(this,arguments)),t}},h=v(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),b=v(function(){return document.head||document.getElementsByTagName("head")[0]}),m=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 n=o(e);return r(n,t),function(e){for(var i=[],a=0;a<n.length;a++){var s=n[a],l=p[s.id];l.refs--,i.push(l)}if(e){var f=o(e);r(f,t)}for(var a=0;a<i.length;a++){var l=i[a];if(0===l.refs){for(var u=0;u<l.parts.length;u++)l.parts[u]();delete p[l.id]}}}};var k=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}()},function(e,n){e.exports=t},function(e,t,n){t=e.exports=n(6)(),t.push([e.id,"._1W1Nqrropv0xHevXc01L9b{bottom:0;left:0;position:fixed;right:0;top:0}._2jkUido-eka0FjtgtzHfhf{background:#091e42;opacity:.5}",""]),t.locals={blanket:"_1W1Nqrropv0xHevXc01L9b",blanket:"_1W1Nqrropv0xHevXc01L9b",tinted:"_2jkUido-eka0FjtgtzHfhf",tinted:"_2jkUido-eka0FjtgtzHfhf"}},function(e,t){e.exports=n}])}); |
{ | ||
"name": "ak-blanket", | ||
"version": "1.3.0", | ||
"version": "2.0.0", | ||
"description": "ak-blanket webcomponent", | ||
@@ -5,0 +5,0 @@ "main": "dist/bundle.js", |
@@ -16,3 +16,3 @@ # Blanket | ||
Import the component in your JS resource: | ||
#### bundle.js | ||
@@ -46,6 +46,6 @@ | ||
attached(elem) { | ||
window.addEventListener('ak-blanket-blur', doSomethingWhenBlanketClicked(elem)); | ||
window.addEventListener('activate', doSomethingWhenBlanketClicked(elem)); | ||
}, | ||
detached(elem) { | ||
window.removeEventListener('ak-blanket-blur', doSomethingWhenBlanketClicked(elem)); | ||
window.removeEventListener('activate', doSomethingWhenBlanketClicked(elem)); | ||
}, | ||
@@ -62,3 +62,3 @@ render(elem) { | ||
It emits the 'ak-blanket-blur' event when clicked/touched. | ||
It emits the 'activate' event when clicked/touched. | ||
Blanket component doesn't have the z-index style, so make sure you put it into an appropriate DOM position. | ||
@@ -65,0 +65,0 @@ For the purpose of simplicity blanket doesn't have any `show/hide` functionality. Since the main use of it suppose to be inside `popup` elements it would appear/disapper with the parent element. |
51353
728