and-component-library
Version:
Distribution of AND Web Components
3 lines (2 loc) • 8.17 kB
JavaScript
function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function o(t){return"function"==typeof t}function l(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function c(t,e){t.appendChild(e)}function s(t,e,n){t.insertBefore(e,n||null)}function i(t){t.parentNode.removeChild(t)}function a(t){return document.createElement(t)}function u(t){return document.createTextNode(t)}function d(){return u(" ")}function f(){return u("")}function p(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function h(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}let m;function b(t){m=t}const $=[],g=[],x=[],y=[],v=Promise.resolve();let _=!1;function k(t){x.push(t)}let w=!1;const C=new Set;function F(){if(!w){w=!0;do{for(let t=0;t<$.length;t+=1){const e=$[t];b(e),N(e.$$)}for(b(null),$.length=0;g.length;)g.pop()();for(let t=0;t<x.length;t+=1){const e=x[t];C.has(e)||(C.add(e),e())}x.length=0}while($.length);for(;y.length;)y.pop()();_=!1,w=!1,C.clear()}}function N(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(k)}}const E=new Set;function A(t,e){-1===t.$$.dirty[0]&&($.push(t),_||(_=!0,v.then(F)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function T(l,c,s,a,u,d,f=[-1]){const p=m;b(l);const h=c.props||{},$=l.$$={fragment:null,ctx:null,props:d,update:t,not_equal:u,bound:n(),on_mount:[],on_destroy:[],before_update:[],after_update:[],context:new Map(p?p.$$.context:[]),callbacks:n(),dirty:f,skip_bound:!1};let g=!1;if($.ctx=s?s(l,h,(t,e,...n)=>{const r=n.length?n[0]:e;return $.ctx&&u($.ctx[t],$.ctx[t]=r)&&(!$.skip_bound&&$.bound[t]&&$.bound[t](r),g&&A(l,t)),e}):[],$.update(),g=!0,r($.before_update),$.fragment=!!a&&a($.ctx),c.target){if(c.hydrate){const t=function(t){return Array.from(t.childNodes)}(c.target);$.fragment&&$.fragment.l(t),t.forEach(i)}else $.fragment&&$.fragment.c();c.intro&&((x=l.$$.fragment)&&x.i&&(E.delete(x),x.i(y))),function(t,n,l){const{fragment:c,on_mount:s,on_destroy:i,after_update:a}=t.$$;c&&c.m(n,l),k(()=>{const n=s.map(e).filter(o);i?i.push(...n):r(n),t.$$.on_mount=[]}),a.forEach(k)}(l,c.target,c.anchor),F()}var x,y;b(p)}let z;function M(t){let e,n,r,o="current"!=t[3]&&"active"!=t[3]&&P(t),l="current"===t[3]&&j(t),c="active"===t[3]&&H(t);return{c(){o&&o.c(),e=d(),l&&l.c(),n=d(),c&&c.c(),r=f()},m(t,i){o&&o.m(t,i),s(t,e,i),l&&l.m(t,i),s(t,n,i),c&&c.m(t,i),s(t,r,i)},p(t,s){"current"!=t[3]&&"active"!=t[3]?o?o.p(t,s):(o=P(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),"current"===t[3]?l?l.p(t,s):(l=j(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null),"active"===t[3]?c?c.p(t,s):(c=H(t),c.c(),c.m(r.parentNode,r)):c&&(c.d(1),c=null)},d(t){o&&o.d(t),t&&i(e),l&&l.d(t),t&&i(n),c&&c.d(t),t&&i(r)}}}function P(t){let e,n;return{c(){e=a("li"),n=u(t[2]),p(e,"class","step"),p(e,"id",t[0]),p(e,"label",t[1])},m(t,r){s(t,e,r),c(e,n)},p(t,r){4&r&&h(n,t[2]),1&r&&p(e,"id",t[0]),2&r&&p(e,"label",t[1])},d(t){t&&i(e)}}}function j(t){let e,n;return{c(){e=a("li"),n=u(t[2]),p(e,"class","step current"),p(e,"id",t[0]),p(e,"label",t[1])},m(t,r){s(t,e,r),c(e,n)},p(t,r){4&r&&h(n,t[2]),1&r&&p(e,"id",t[0]),2&r&&p(e,"label",t[1])},d(t){t&&i(e)}}}function H(t){let e,n;return{c(){e=a("li"),n=u(t[2]),p(e,"class","step active"),p(e,"id",t[0]),p(e,"label",t[1])},m(t,r){s(t,e,r),c(e,n)},p(t,r){4&r&&h(n,t[2]),1&r&&p(e,"id",t[0]),2&r&&p(e,"label",t[1])},d(t){t&&i(e)}}}function L(t){let e,n,r,o="current"!=t[3]&&"active"!=t[3]&&O(t),l="current"===t[3]&&S(t),c="active"===t[3]&&R(t);return{c(){o&&o.c(),e=d(),l&&l.c(),n=d(),c&&c.c(),r=f()},m(t,i){o&&o.m(t,i),s(t,e,i),l&&l.m(t,i),s(t,n,i),c&&c.m(t,i),s(t,r,i)},p(t,s){"current"!=t[3]&&"active"!=t[3]?o?o.p(t,s):(o=O(t),o.c(),o.m(e.parentNode,e)):o&&(o.d(1),o=null),"current"===t[3]?l?l.p(t,s):(l=S(t),l.c(),l.m(n.parentNode,n)):l&&(l.d(1),l=null),"active"===t[3]?c?c.p(t,s):(c=R(t),c.c(),c.m(r.parentNode,r)):c&&(c.d(1),c=null)},d(t){o&&o.d(t),t&&i(e),l&&l.d(t),t&&i(n),c&&c.d(t),t&&i(r)}}}function O(t){let e,n,r;return{c(){e=a("li"),n=a("a"),r=u(t[2]),p(n,"class","step"),p(n,"label",t[1]),p(n,"href",t[4]),p(e,"id",t[0])},m(t,o){s(t,e,o),c(e,n),c(n,r)},p(t,o){4&o&&h(r,t[2]),2&o&&p(n,"label",t[1]),16&o&&p(n,"href",t[4]),1&o&&p(e,"id",t[0])},d(t){t&&i(e)}}}function S(t){let e,n,r;return{c(){e=a("li"),n=a("a"),r=u(t[2]),p(n,"class","step current"),p(n,"label",t[1]),p(n,"href",t[4]),p(e,"id",t[0]),p(e,"class","current")},m(t,o){s(t,e,o),c(e,n),c(n,r)},p(t,o){4&o&&h(r,t[2]),2&o&&p(n,"label",t[1]),16&o&&p(n,"href",t[4]),1&o&&p(e,"id",t[0])},d(t){t&&i(e)}}}function R(t){let e,n,r;return{c(){e=a("li"),n=a("a"),r=u(t[2]),p(n,"class","step active"),p(n,"label",t[1]),p(n,"href",t[4]),p(e,"id",t[0]),p(e,"class","active")},m(t,o){s(t,e,o),c(e,n),c(n,r)},p(t,o){4&o&&h(r,t[2]),2&o&&p(n,"label",t[1]),16&o&&p(n,"href",t[4]),1&o&&p(e,"id",t[0])},d(t){t&&i(e)}}}function q(e){let n,r,o,l=!e[4]&&M(e),c=e[4]&&L(e);return{c(){var e,s,i;l&&l.c(),n=d(),c&&c.c(),r=d(),o=a("p"),this.c=t,e="display",s="none",o.style.setProperty(e,s,i?"important":""),p(o,"class","rmline")},m(t,e){l&&l.m(t,e),s(t,n,e),c&&c.m(t,e),s(t,r,e),s(t,o,e)},p(t,[e]){t[4]?l&&(l.d(1),l=null):l?l.p(t,e):(l=M(t),l.c(),l.m(n.parentNode,n)),t[4]?c?c.p(t,e):(c=L(t),c.c(),c.m(r.parentNode,r)):c&&(c.d(1),c=null)},i:t,o:t,d(t){l&&l.d(t),t&&i(n),c&&c.d(t),t&&i(r),t&&i(o)}}}function B(t,e,n){let{id:r=""}=e,{label:o=""}=e,{text:l=""}=e,{statusclass:c=""}=e,{url:s=""}=e;return t.$$set=t=>{"id"in t&&n(0,r=t.id),"label"in t&&n(1,o=t.label),"text"in t&&n(2,l=t.text),"statusclass"in t&&n(3,c=t.statusclass),"url"in t&&n(4,s=t.url)},[r,o,l,c,s]}"function"==typeof HTMLElement&&(z=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.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)}});class D extends z{constructor(t){super(),this.shadowRoot.innerHTML="<style>@import url(https://fonts.googleapis.com/css2?family=Poppins);:root{--step:50}li{list-style-type:none;margin-top:5%;float:left;width:100%}.step{font-size:12px;font-size:torem(12px);font-family:'Poppins', sans-serif;position:relative;text-align:center;text-transform:uppercase;color:grey;text-decoration:none}.step:before{width:1.875rem;height:1.875rem;content:attr(label);line-height:1.875rem;border:0.125rem solid;display:block;text-align:center;margin:0 auto 0.625rem auto;border-radius:50%;background-color:gainsboro}.step:after{width:100%;height:0.125rem;content:'';position:absolute;background-color:grey;top:0.9375rem;left:-50%;z-index:-1}.step.active{color:#FF323C}.step.active:before{background-color:#FF323C;color:white}.step.active:after{background-color:#FF323C}.step.current{color:#FF323C;font-weight:1000;font-size:0.78125rem}.step.current:before{background-color:white;color:#FF323C}.step.current:after{background-color:#FF323C}li:first-child a::after{content:none}li:first-child::after,.rmline::after{content:none}a{text-decoration:none;float:left;width:100%}</style>",T(this,{target:this.shadowRoot},B,q,l,{id:0,label:1,text:2,statusclass:3,url:4}),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),F()))}static get observedAttributes(){return["id","label","text","statusclass","url"]}get id(){return this.$$.ctx[0]}set id(t){this.$set({id:t}),F()}get label(){return this.$$.ctx[1]}set label(t){this.$set({label:t}),F()}get text(){return this.$$.ctx[2]}set text(t){this.$set({text:t}),F()}get statusclass(){return this.$$.ctx[3]}set statusclass(t){this.$set({statusclass:t}),F()}get url(){return this.$$.ctx[4]}set url(t){this.$set({url:t}),F()}}customElements.define("and-step-item",D);export default D;
//# sourceMappingURL=StepItem.js.map