UNPKG

nodality

Version:

A lightweight library for declarative UI elements.

2 lines 1.53 kB
/*! For license information please see stacker.esm.js.LICENSE.txt */ var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,o(n.key),n)}}function o(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}e.d(t,{A:()=>i});var i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.res=document.createElement("div"),this.res.style.display="flex",this.res.style.flexDirection="column"},(t=[{key:"add",value:function(e){for(var t=0;t<e.length;t++){var r=e[t].render();0===t&&(r.style.zIndex=1),this.res.appendChild(r)}return this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}])&&n(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),a=t.A;export{a as Stacker};