and-component-library
Version:
Distribution of AND Web Components
3 lines (2 loc) • 5.3 kB
JavaScript
function t(){}function e(t){return t()}function o(){return Object.create(null)}function n(t){t.forEach(e)}function l(t){return"function"==typeof t}function r(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e,o){t.insertBefore(e,o||null)}function s(t){t.parentNode.removeChild(t)}function i(t){return document.createElement(t)}function u(t,e,o){null==o?t.removeAttribute(e):t.getAttribute(e)!==o&&t.setAttribute(e,o)}let a;function d(t){a=t}function m(t){(function(){if(!a)throw new Error("Function called outside component initialization");return a})().$$.on_mount.push(t)}const f=[],h=[],p=[],$=[],g=Promise.resolve();let b=!1;function x(){b||(b=!0,g.then(N))}function _(t){p.push(t)}let y=!1;const k=new Set;function N(){if(!y){y=!0;do{for(let t=0;t<f.length;t+=1){const e=f[t];d(e),w(e.$$)}for(d(null),f.length=0;h.length;)h.pop()();for(let t=0;t<p.length;t+=1){const e=p[t];k.has(e)||(k.add(e),e())}p.length=0}while(f.length);for(;$.length;)$.pop()();b=!1,y=!1,k.clear()}}function w(t){if(null!==t.fragment){t.update(),n(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(_)}}const v=new Set;function E(r,c,i,u,m,h,p=[-1]){const $=a;d(r);const g=c.props||{},b=r.$$={fragment:null,ctx:null,props:h,update:t,not_equal:m,bound:o(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map($?$.$$.context:[]),callbacks:o(),dirty:p,skip_bound:!1};let y=!1;if(b.ctx=i?i(r,g,(t,e,...o)=>{const n=o.length?o[0]:e;return b.ctx&&m(b.ctx[t],b.ctx[t]=n)&&(!b.skip_bound&&b.bound[t]&&b.bound[t](n),y&&function(t,e){-1===t.$$.dirty[0]&&(f.push(t),x(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(r,t)),e}):[],b.update(),y=!0,n(b.before_update),b.fragment=!!u&&u(b.ctx),c.target){if(c.hydrate){const t=function(t){return Array.from(t.childNodes)}(c.target);b.fragment&&b.fragment.l(t),t.forEach(s)}else b.fragment&&b.fragment.c();c.intro&&((k=r.$$.fragment)&&k.i&&(v.delete(k),k.i(w))),function(t,o,r){const{fragment:c,on_mount:s,on_destroy:i,after_update:u}=t.$$;c&&c.m(o,r),_(()=>{const o=s.map(e).filter(l);i?i.push(...o):n(o),t.$$.on_mount=[]}),u.forEach(_)}(r,c.target,c.anchor),N()}var k,w;d($)}let P;function C(e){let o,n;return{c(){o=i("ul"),n=i("slot"),this.c=t,u(o,"id",e[0]),u(o,"data-testid","links"),u(o,"class","footer__links")},m(t,l){c(t,o,l),function(t,e){t.appendChild(e)}(o,n),e[7](o)},p(t,[e]){1&e&&u(o,"id",t[0])},i:t,o:t,d(t){t&&s(o),e[7](null)}}}"function"==typeof HTMLElement&&(P=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,o){this[t]=o}$destroy(){!function(t,e){const o=t.$$;null!==o.fragment&&(n(o.on_destroy),o.fragment&&o.fragment.d(e),o.on_destroy=o.fragment=null,o.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const o=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return o.push(e),()=>{const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});function A(t,e,o){let n,{id:l="links-list"}=e,{col:r}=e,{colsm:c}=e,{colmd:s}=e,{collg:i}=e,{colxl:u}=e;return m(async()=>{await(x(),g),o(2,r=Number(r)?Number(r):Number(1)),o(3,c=Number(c)?Number(c):Number(r)),o(4,s=Number(s)?Number(s):Number(c)),o(5,i=Number(i)?Number(i):Number(s)),o(6,u=Number(u)?Number(u):Number(i)),n&&(n.style.setProperty("--col",r),n.style.setProperty("--col-sm",c),n.style.setProperty("--col-md",s),n.style.setProperty("--col-lg",i),n.style.setProperty("--col-xl",u))}),t.$$set=t=>{"id"in t&&o(0,l=t.id),"col"in t&&o(2,r=t.col),"colsm"in t&&o(3,c=t.colsm),"colmd"in t&&o(4,s=t.colmd),"collg"in t&&o(5,i=t.collg),"colxl"in t&&o(6,u=t.colxl)},[l,n,r,c,s,i,u,function(t){h[t?"unshift":"push"](()=>{n=t,o(1,n)})}]}class M extends P{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import url(https://fonts.googleapis.com/css2?family=Poppins);:root{--step:50}:root{--col:2;--col-sm:2;--col-md:2;--col-lg:2;--col-xl:2}.footer__links{list-style:none;padding:0;column-gap:2rem;column-count:var(--col)}@media(min-width: 576px){.footer__links{column-count:var(--col-sm)}}@media(min-width: 768px){.footer__links{column-count:var(--col-md)}}@media(min-width: 992px){.footer__links{column-count:var(--col-lg)}}@media(min-width: 1200px){.footer__links{column-count:var(--col-xl)}}.footer__links{margin-top:1rem}@media(min-width: 992px){.footer__links{margin-top:0;margin-left:3rem}}</style>",E(this,{target:this.shadowRoot},A,C,r,{id:0,col:2,colsm:3,colmd:4,collg:5,colxl:6}),t&&(t.target&&c(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["id","col","colsm","colmd","collg","colxl"]}get id(){return this.$$.ctx[0]}set id(t){this.$set({id:t}),N()}get col(){return this.$$.ctx[2]}set col(t){this.$set({col:t}),N()}get colsm(){return this.$$.ctx[3]}set colsm(t){this.$set({colsm:t}),N()}get colmd(){return this.$$.ctx[4]}set colmd(t){this.$set({colmd:t}),N()}get collg(){return this.$$.ctx[5]}set collg(t){this.$set({collg:t}),N()}get colxl(){return this.$$.ctx[6]}set colxl(t){this.$set({colxl:t}),N()}}customElements.define("and-links",M);export default M;
//# sourceMappingURL=Links.js.map