rettangoli-ui 0.0.10 → 0.1.0-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,24 +1,24 @@
1
- var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDescriptor:jt}=Object,x=[],it=()=>document.createRange(),z=(e,t,o)=>(e.set(t,o),o),Mt=(e,t)=>t.reduceRight(Rt,e),Rt=(e,t)=>e.childNodes[t],{setPrototypeOf:Wt}=Object,k,at=(e,t,o)=>(k||(k=it()),o?k.setStartAfter(e):k.setStartBefore(e),k.setEndAfter(t),k.deleteContents(),e),K=({firstChild:e,lastChild:t},o)=>at(e,t,o),lt=!1,Q=(e,t)=>lt&&e.nodeType===11?1/t<0?t?K(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,et=e=>document.createComment(e),X=class extends(t=>{function o(n){return Wt(n,new.target.prototype)}return o.prototype=t.prototype,o})(DocumentFragment){#e=et("<>");#o=et("</>");#t=x;constructor(t){super(t),this.replaceChildren(this.#e,...t.childNodes,this.#o),lt=!0}get firstChild(){return this.#e}get lastChild(){return this.#o}get parentNode(){return this.#e.parentNode}remove(){K(this,!1)}replaceWith(t){K(this,!0).replaceWith(t)}valueOf(){let{parentNode:t}=this;if(t===this)this.#t===x&&(this.#t=[...this.childNodes]);else{if(t){let{firstChild:o,lastChild:n}=this;for(this.#t=[o];o!==n;)this.#t.push(o=o.nextSibling)}this.replaceChildren(...this.#t)}return this}},ht=(e,t,o)=>e.setAttribute(t,o),B=(e,t)=>e.removeAttribute(t),T,Ot=(e,t,o)=>{o=o.slice(1),T||(T=new WeakMap);let n=T.get(e)||z(T,e,{}),s=n[o];return s&&s[0]&&e.removeEventListener(o,...s),s=nt(t)?t:[t,!1],n[o]=s,s[0]&&e.addEventListener(o,...s),t},E=(e,t)=>{let{t:o,n}=e,s=!1;switch(typeof t){case"object":if(t!==null){(n||o).replaceWith(e.n=t.valueOf());break}case"undefined":s=!0;default:o.data=s?"":t,n&&(e.n=null,n.replaceWith(o))}return t},H=(e,t,o)=>e[o]=t,zt=(e,t,o)=>H(e,t,o.slice(1)),Y=(e,t,o)=>t==null?(B(e,o),t):H(e,t,o),ct=(e,t)=>(typeof t=="function"?t(e):t.current=e,t),G=(e,t,o)=>(t==null?B(e,o):ht(e,o,t),t),Et=(e,t,o)=>(e.toggleAttribute(o.slice(1),t),t),L=(e,t,o)=>{let{length:n}=t;if(e.data=`[${n}]`,n)return((s,i,a,r,g)=>{let p=a.length,h=i.length,c=p,l=0,d=0,f=null;for(;l<h||d<c;)if(h===l){let m=c<p?d?r(a[d-1],-0).nextSibling:r(a[c],0):g;for(;d<c;)s.insertBefore(r(a[d++],1),m)}else if(c===d)for(;l<h;)f&&f.has(i[l])||s.removeChild(r(i[l],-1)),l++;else if(i[l]===a[d])l++,d++;else if(i[h-1]===a[c-1])h--,c--;else if(i[l]===a[c-1]&&a[d]===i[h-1]){let m=r(i[--h],-0).nextSibling;s.insertBefore(r(a[d++],1),r(i[l++],-0).nextSibling),s.insertBefore(r(a[--c],1),m),i[h]=a[c]}else{if(!f){f=new Map;let m=d;for(;m<c;)f.set(a[m],m++)}if(f.has(i[l])){let m=f.get(i[l]);if(d<m&&m<c){let w=l,$=1;for(;++w<h&&w<c&&f.get(i[w])===m+$;)$++;if($>m-d){let F=r(i[l],0);for(;d<m;)s.insertBefore(r(a[d++],1),F)}else s.replaceChild(r(a[d++],1),r(i[l++],-1))}else l++}else s.removeChild(r(i[l++],-1))}return a})(e.parentNode,o,t,Q,e);switch(o.length){case 1:o[0].remove();case 0:break;default:at(Q(o[0],0),Q(o.at(-1),-0),!1)}return x},Nt=new Map([["aria",(e,t)=>{for(let o in t){let n=t[o],s=o==="role"?o:`aria-${o}`;n==null?B(e,s):ht(e,s,n)}return t}],["class",(e,t)=>Y(e,t,t==null?"class":"className")],["data",(e,t)=>{let{dataset:o}=e;for(let n in t)t[n]==null?delete o[n]:o[n]=t[n];return t}],["ref",ct],["style",(e,t)=>t==null?Y(e,t,"style"):H(e.style,t,"cssText")]]),Tt=(e,t,o)=>{switch(t[0]){case".":return zt;case"?":return Et;case"@":return Ot;default:return o||"ownerSVGElement"in e?t==="ref"?ct:G:Nt.get(t)||(t in e?t.startsWith("on")?H:((n,s)=>{let i;do i=jt(n,s);while(!i&&(n=_t(n)));return i})(e,t)?.set?Y:G:G)}},Vt=(e,t)=>(e.textContent=t??"",t),O=(e,t,o)=>({a:e,b:t,c:o}),A=()=>O(null,null,x),dt=e=>(t,o)=>{let{a:n,b:s,c:i}=e(t,o),a=document.importNode(n,!0),r=x;if(s!==x){r=[];for(let l,d,f=0;f<s.length;f++){let{a:m,b:w,c:$}=s[f],F=m===d?l:l=Mt(a,d=m);r[f]=(g=w,p=F,h=$,c=w===L?[]:w===E?A():null,{v:x,u:g,t:p,n:h,c})}}var g,p,h,c;return((l,d)=>({b:l,c:d}))(i?a.firstChild:new X(a),r)},Lt=/^(?:plaintext|script|style|textarea|title|xmp)$/i,Bt=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,Ht=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,Dt=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,It=/[\x01\x02]/g,Z,q,V=document.createElement("template"),Pt=(e,t)=>{if(t)return Z||(Z=document.createElementNS("http://www.w3.org/2000/svg","svg"),q=it(),q.selectNodeContents(Z)),q.createContextualFragment(e);V.innerHTML=e;let{content:o}=V;return V=V.cloneNode(!1),o},J=e=>{let t=[],o;for(;o=e.parentNode;)t.push(t.indexOf.call(o.childNodes,e)),e=o;return t},ot=()=>document.createTextNode(""),Ut=(e,t,o)=>{let n=Pt(((g,p,h)=>{let c=0;return g.join("").trim().replace(Ht,(l,d,f,m)=>`<${d}${f.replace(Dt,"=$2$1").trimEnd()}${m?h||Bt.test(d)?" /":`></${d}`:""}>`).replace(It,l=>l===""?`<!--${p+c++}-->`:p+c++)})(e,W,o),o),{length:s}=e,i=x;if(s>1){let g=[],p=document.createTreeWalker(n,129),h=0,c=`${W}${h++}`;for(i=[];h<s;){let l=p.nextNode();if(l.nodeType===8){if(l.data===c){let d=nt(t[h-1])?L:E;d===E&&g.push(l),i.push(O(J(l),d,null)),c=`${W}${h++}`}}else{let d;for(;l.hasAttribute(c);){d||(d=J(l));let f=l.getAttribute(c);i.push(O(d,Tt(l,f,o),f)),B(l,c),c=`${W}${h++}`}!o&&Lt.test(l.localName)&&l.textContent.trim()===`<!--${c}-->`&&(i.push(O(d||J(l),Vt,null)),c=`${W}${h++}`)}}for(h=0;h<g.length;h++)g[h].replaceWith(ot())}let{childNodes:a}=n,{length:r}=a;return r<1?(r=1,n.appendChild(ot())):r===1&&s!==1&&a[0].nodeType!==1&&(r=0),z(gt,e,O(n,i,r===1))},gt=new WeakMap,W="is\xB5",pt=e=>(t,o)=>gt.get(t)||Ut(t,o,e),Ft=dt(pt(!1)),Qt=dt(pt(!0)),tt=(e,{s:t,t:o,v:n})=>{if(e.a!==o){let{b:s,c:i}=(t?Qt:Ft)(o,n);e.a=o,e.b=s,e.c=i}for(let{c:s}=e,i=0;i<s.length;i++){let a=n[i],r=s[i];switch(r.u){case L:r.v=L(r.t,Gt(r.c,a),r.v);break;case E:let g=a instanceof C?tt(r.c||(r.c=A()),a):(r.c=null,a);g!==r.v&&(r.v=E(r,g));break;default:a!==r.v&&(r.v=r.u(r.t,a,r.n,r.v))}}return e.b},Gt=(e,t)=>{let o=0,{length:n}=t;for(n<e.length&&e.splice(n);o<n;o++){let s=t[o];s instanceof C?t[o]=tt(e[o]||(e[o]=A()),s):e[o]=null}return t},C=class{constructor(t,o,n){this.s=t,this.t=o,this.v=n}toDOM(t=A()){return tt(t,this)}};var ut=e=>(t,...o)=>new C(e,t,o),_=ut(!1),he=ut(!0),rt=new WeakMap,j=(e,t)=>((o,n)=>{let s=rt.get(o)||z(rt,o,A()),{b:i}=s,a=typeof n=="function"?n():n,r=a instanceof C?a.toDOM(s):a;return i!==r&&o.replaceChildren((s.b=r).valueOf()),o})(e,t),st=new WeakMap,ft=e=>(t,o)=>{let n=st.get(t)||z(st,t,new Map);return n.get(o)||z(n,o,function(s,...i){return new C(e,s,i).toDOM(this)}.bind(A()))},ce=ft(!1),de=ft(!0);function v(e,...t){let o="";return e.forEach((n,s)=>{o+=n+(t[s]||"")}),o}var mt={default:void 0,xl:"@media only screen and (max-width: 1280px)",lg:"@media only screen and (max-width: 1024px)",md:"@media only screen and (max-width: 768px)",sm:"@media only screen and (max-width: 640px)"},y=(e,t,o={})=>{let n="";for(let[s,i]of Object.entries(mt)){s!=="default"&&(n+=`${i} {`);for(let[a,r]of Object.entries(t)){let g=o[a]?` ${o[a]} `:" ";for(let[p,h]of Object.entries(r)){let c=e[a],l=h.startsWith("--")?`var(${h})`:h,d=s==="default"?a:`${s}-${a}`,f=s==="default"?`h-${a}`:`${s}-h-${a}`;if(c){let w=c.split(" ").map($=>`${$}: ${l};`).join(" ");n+=`
2
- :host([${d}="${p}"])${g}{
3
- ${w}
1
+ var rettangoli=(()=>{var{isArray:it}=Array,{getPrototypeOf:Rt,getOwnPropertyDescriptor:Wt}=Object,y=[],nt=()=>document.createRange(),E=(e,t,r)=>(e.set(t,r),r),Ot=(e,t)=>t.reduceRight(Et,e),Et=(e,t)=>e.childNodes[t],{setPrototypeOf:zt}=Object,k,at=(e,t,r)=>(k||(k=nt()),r?k.setStartAfter(e):k.setStartBefore(e),k.setEndAfter(t),k.deleteContents(),e),J=({firstChild:e,lastChild:t},r)=>at(e,t,r),lt=!1,Q=(e,t)=>lt&&e.nodeType===11?1/t<0?t?J(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,et=e=>document.createComment(e),X=class extends(t=>{function r(n){return zt(n,new.target.prototype)}return r.prototype=t.prototype,r})(DocumentFragment){#e=et("<>");#r=et("</>");#t=y;constructor(t){super(t),this.replaceChildren(this.#e,...t.childNodes,this.#r),lt=!0}get firstChild(){return this.#e}get lastChild(){return this.#r}get parentNode(){return this.#e.parentNode}remove(){J(this,!1)}replaceWith(t){J(this,!0).replaceWith(t)}valueOf(){let{parentNode:t}=this;if(t===this)this.#t===y&&(this.#t=[...this.childNodes]);else{if(t){let{firstChild:r,lastChild:n}=this;for(this.#t=[r];r!==n;)this.#t.push(r=r.nextSibling)}this.replaceChildren(...this.#t)}return this}},ht=(e,t,r)=>e.setAttribute(t,r),I=(e,t)=>e.removeAttribute(t),T,Nt=(e,t,r)=>{r=r.slice(1),T||(T=new WeakMap);let n=T.get(e)||E(T,e,{}),o=n[r];return o&&o[0]&&e.removeEventListener(r,...o),o=it(t)?t:[t,!1],n[r]=o,o[0]&&e.addEventListener(r,...o),t},z=(e,t)=>{let{t:r,n}=e,o=!1;switch(typeof t){case"object":if(t!==null){(n||r).replaceWith(e.n=t.valueOf());break}case"undefined":o=!0;default:r.data=o?"":t,n&&(e.n=null,n.replaceWith(r))}return t},L=(e,t,r)=>e[r]=t,Tt=(e,t,r)=>L(e,t,r.slice(1)),Y=(e,t,r)=>t==null?(I(e,r),t):L(e,t,r),ct=(e,t)=>(typeof t=="function"?t(e):t.current=e,t),G=(e,t,r)=>(t==null?I(e,r):ht(e,r,t),t),Bt=(e,t,r)=>(e.toggleAttribute(r.slice(1),t),t),V=(e,t,r)=>{let{length:n}=t;if(e.data=`[${n}]`,n)return((o,i,l,s,d)=>{let p=l.length,g=i.length,h=p,a=0,c=0,u=null;for(;a<g||c<h;)if(g===a){let m=h<p?c?s(l[c-1],-0).nextSibling:s(l[h],0):d;for(;c<h;)o.insertBefore(s(l[c++],1),m)}else if(h===c)for(;a<g;)u&&u.has(i[a])||o.removeChild(s(i[a],-1)),a++;else if(i[a]===l[c])a++,c++;else if(i[g-1]===l[h-1])g--,h--;else if(i[a]===l[h-1]&&l[c]===i[g-1]){let m=s(i[--g],-0).nextSibling;o.insertBefore(s(l[c++],1),s(i[a++],-0).nextSibling),o.insertBefore(s(l[--h],1),m),i[g]=l[h]}else{if(!u){u=new Map;let m=c;for(;m<h;)u.set(l[m],m++)}if(u.has(i[a])){let m=u.get(i[a]);if(c<m&&m<h){let w=a,R=1;for(;++w<g&&w<h&&u.get(i[w])===m+R;)R++;if(R>m-c){let F=s(i[a],0);for(;c<m;)o.insertBefore(s(l[c++],1),F)}else o.replaceChild(s(l[c++],1),s(i[a++],-1))}else a++}else o.removeChild(s(i[a++],-1))}return l})(e.parentNode,r,t,Q,e);switch(r.length){case 1:r[0].remove();case 0:break;default:at(Q(r[0],0),Q(r.at(-1),-0),!1)}return y},Vt=new Map([["aria",(e,t)=>{for(let r in t){let n=t[r],o=r==="role"?r:`aria-${r}`;n==null?I(e,o):ht(e,o,n)}return t}],["class",(e,t)=>Y(e,t,t==null?"class":"className")],["data",(e,t)=>{let{dataset:r}=e;for(let n in t)t[n]==null?delete r[n]:r[n]=t[n];return t}],["ref",ct],["style",(e,t)=>t==null?Y(e,t,"style"):L(e.style,t,"cssText")]]),It=(e,t,r)=>{switch(t[0]){case".":return Tt;case"?":return Bt;case"@":return Nt;default:return r||"ownerSVGElement"in e?t==="ref"?ct:G:Vt.get(t)||(t in e?t.startsWith("on")?L:((n,o)=>{let i;do i=Wt(n,o);while(!i&&(n=Rt(n)));return i})(e,t)?.set?Y:G:G)}},Lt=(e,t)=>(e.textContent=t??"",t),O=(e,t,r)=>({a:e,b:t,c:r}),C=()=>O(null,null,y),dt=e=>(t,r)=>{let{a:n,b:o,c:i}=e(t,r),l=document.importNode(n,!0),s=y;if(o!==y){s=[];for(let a,c,u=0;u<o.length;u++){let{a:m,b:w,c:R}=o[u],F=m===c?a:a=Ot(l,c=m);s[u]=(d=w,p=F,g=R,h=w===V?[]:w===z?C():null,{v:y,u:d,t:p,n:g,c:h})}}var d,p,g,h;return((a,c)=>({b:a,c}))(i?l.firstChild:new X(l),s)},Dt=/^(?:plaintext|script|style|textarea|title|xmp)$/i,Ht=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,Pt=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,Ut=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,Ft=/[\x01\x02]/g,K,Z,B=document.createElement("template"),Qt=(e,t)=>{if(t)return K||(K=document.createElementNS("http://www.w3.org/2000/svg","svg"),Z=nt(),Z.selectNodeContents(K)),Z.createContextualFragment(e);B.innerHTML=e;let{content:r}=B;return B=B.cloneNode(!1),r},q=e=>{let t=[],r;for(;r=e.parentNode;)t.push(t.indexOf.call(r.childNodes,e)),e=r;return t},rt=()=>document.createTextNode(""),Gt=(e,t,r)=>{let n=Qt(((d,p,g)=>{let h=0;return d.join("").trim().replace(Pt,(a,c,u,m)=>`<${c}${u.replace(Ut,"=$2$1").trimEnd()}${m?g||Ht.test(c)?" /":`></${c}`:""}>`).replace(Ft,a=>a===""?`<!--${p+h++}-->`:p+h++)})(e,W,r),r),{length:o}=e,i=y;if(o>1){let d=[],p=document.createTreeWalker(n,129),g=0,h=`${W}${g++}`;for(i=[];g<o;){let a=p.nextNode();if(a.nodeType===8){if(a.data===h){let c=it(t[g-1])?V:z;c===z&&d.push(a),i.push(O(q(a),c,null)),h=`${W}${g++}`}}else{let c;for(;a.hasAttribute(h);){c||(c=q(a));let u=a.getAttribute(h);i.push(O(c,It(a,u,r),u)),I(a,h),h=`${W}${g++}`}!r&&Dt.test(a.localName)&&a.textContent.trim()===`<!--${h}-->`&&(i.push(O(c||q(a),Lt,null)),h=`${W}${g++}`)}}for(g=0;g<d.length;g++)d[g].replaceWith(rt())}let{childNodes:l}=n,{length:s}=l;return s<1?(s=1,n.appendChild(rt())):s===1&&o!==1&&l[0].nodeType!==1&&(s=0),E(gt,e,O(n,i,s===1))},gt=new WeakMap,W="is\xB5",pt=e=>(t,r)=>gt.get(t)||Gt(t,r,e),Kt=dt(pt(!1)),Zt=dt(pt(!0)),tt=(e,{s:t,t:r,v:n})=>{if(e.a!==r){let{b:o,c:i}=(t?Zt:Kt)(r,n);e.a=r,e.b=o,e.c=i}for(let{c:o}=e,i=0;i<o.length;i++){let l=n[i],s=o[i];switch(s.u){case V:s.v=V(s.t,qt(s.c,l),s.v);break;case z:let d=l instanceof $?tt(s.c||(s.c=C()),l):(s.c=null,l);d!==s.v&&(s.v=z(s,d));break;default:l!==s.v&&(s.v=s.u(s.t,l,s.n,s.v))}}return e.b},qt=(e,t)=>{let r=0,{length:n}=t;for(n<e.length&&e.splice(n);r<n;r++){let o=t[r];o instanceof $?t[r]=tt(e[r]||(e[r]=C()),o):e[r]=null}return t},$=class{constructor(t,r,n){this.s=t,this.t=r,this.v=n}toDOM(t=C()){return tt(t,this)}};var ft=e=>(t,...r)=>new $(e,t,r),A=ft(!1),ae=ft(!0),st=new WeakMap,_=(e,t)=>((r,n)=>{let o=st.get(r)||E(st,r,C()),{b:i}=o,l=typeof n=="function"?n():n,s=l instanceof $?l.toDOM(o):l;return i!==s&&r.replaceChildren((o.b=s).valueOf()),r})(e,t),ot=new WeakMap,ut=e=>(t,r)=>{let n=ot.get(t)||E(ot,t,new Map);return n.get(r)||E(n,r,function(o,...i){return new $(e,o,i).toDOM(this)}.bind(C()))},le=ut(!1),he=ut(!0);function v(e,...t){let r="";return e.forEach((n,o)=>{r+=n+(t[o]||"")}),r}var Jt=["xs","sm","md","lg","xl"],mt={mt:"margin-top",mr:"margin-right",mb:"margin-bottom",ml:"margin-left",m:"margin",mh:"margin-left margin-right",mv:"margin-top margin-bottom",pt:"padding-top",pr:"padding-right",pb:"padding-bottom",pl:"padding-left",p:"padding",ph:"padding-left padding-right",pv:"padding-top padding-bottom",g:"gap",gv:"row-gap",gh:"column-gap",bw:"border-width",bwt:"border-top-width",bwr:"border-right-width",bwb:"border-bottom-width",bwl:"border-left-width",bc:"border-color",br:"border-radius",pos:"position",shadow:"box-shadow",ta:"text-align",c:"color",cur:"cursor"},vt=Object.keys(mt),bt=e=>e.concat(Jt.flatMap(t=>e.map(r=>`${t}-${r}`))),xt={default:void 0,xl:"@media only screen and (max-width: 1280px)",lg:"@media only screen and (max-width: 1024px)",md:"@media only screen and (max-width: 768px)",sm:"@media only screen and (max-width: 640px)"},x=(e,t={})=>{let r="";for(let[n,o]of Object.entries(xt)){n!=="default"&&(r+=`${o} {`);for(let[i,l]of Object.entries(e)){let s=t[i]?` ${t[i]} `:" ";for(let[d,p]of Object.entries(l)){let g=mt[i],h=p.startsWith("--")?`var(${p})`:p,a=n==="default"?i:`${n}-${i}`,c=n==="default"?`h-${i}`:`${n}-h-${i}`;if(g){let m=g.split(" ").map(w=>`${w}: ${h};`).join(" ");r+=`
2
+ :host([${a}="${d}"])${s}{
3
+ ${m}
4
4
  }
5
- :host([${f}="${p}"]:hover)${g}{
6
- ${w}
5
+ :host([${c}="${d}"]:hover)${s}{
6
+ ${m}
7
7
  }
8
- `}else n+=`
9
- :host([${d}="${p}"])${g}{
10
- ${h}
8
+ `}else r+=`
9
+ :host([${a}="${d}"])${s}{
10
+ ${p}
11
11
  }
12
- :host([${f}="${p}"]:hover)${g}{
13
- ${h}
12
+ :host([${c}="${d}"]:hover)${s}{
13
+ ${p}
14
14
  }
15
- `}}s!=="default"&&(n+="}")}return n};function Zt(e){if(e===null||e.includes("/"))return!1;let t=String(e);return/[0-9]$/.test(t)}var qt=e=>/%$/.test(e),b=e=>{if(e!==void 0)return qt(e)?e:Zt(e)?`${e}px`:e},u={xs:"--spacing-xs",s:"--spacing-s",m:"--spacing-m",l:"--spacing-l",xl:"--spacing-xl"};function D(e){let t="";for(let[o,n]of Object.entries(mt)){o!=="default"&&(t+=`${n} {
16
- `);let s="";for(let[i,a]of Object.entries(e[o]))a!=null&&(s+=`${i}: ${a};
15
+ `}}n!=="default"&&(r+="}")}return r};function Xt(e){if(e===null||e.includes("/"))return!1;let t=String(e);return/[0-9]$/.test(t)}var Yt=e=>/%$/.test(e),b=e=>{if(e!==void 0)return Yt(e)?e:Xt(e)?`${e}px`:Object.keys(f).includes(e)?`var(${f[e]})`:e},f={xs:"--spacing-xs",s:"--spacing-s",m:"--spacing-m",l:"--spacing-l",xl:"--spacing-xl"};function D(e){let t="";for(let[r,n]of Object.entries(xt)){r!=="default"&&(t+=`${n} {
16
+ `);let o="";for(let[i,l]of Object.entries(e[r]))l!=null&&(o+=`${i}: ${l};
17
17
  `);t+=`:host {
18
- ${s.trim()}
18
+ ${o.trim()}
19
19
  }
20
- `,o!=="default"&&(t+=`}
21
- `)}return t}var M=v`
20
+ `,r!=="default"&&(t+=`}
21
+ `)}return t}var j=v`
22
22
  :host([flex="0"]) {
23
23
  flex: 0;
24
24
  }
@@ -58,7 +58,53 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
58
58
  :host([flex="12"]) {
59
59
  flex: 12;
60
60
  }
61
- `;var Jt={mt:"margin-top",mr:"margin-right",mb:"margin-bottom",ml:"margin-left",m:"margin",mh:"margin-left margin-right",mv:"margin-top margin-bottom"},Kt={mt:u,mr:u,mb:u,ml:u,m:u,mh:u,mv:u},Xt={mt:"button",mr:"button",mb:"button",ml:"button",m:"button",mh:"button",mv:"button"},vt=y(Jt,Kt,Xt);var bt=({render:e,html:t})=>{let o=new CSSStyleSheet;return o.replaceSync(v`
61
+ `;var te={mt:f,mr:f,mb:f,ml:f,m:f,mh:f,mv:f,s:{sm:`
62
+ height: 28px;
63
+ padding-left: 12px;
64
+ padding-right: 12px;
65
+ border-radius: 4px;
66
+ font-size: var(--xs-font-size);
67
+ font-weight: var(--xs-font-weight);
68
+ line-height: var(--xs-line-height);
69
+ letter-spacing: var(--xs-letter-spacing);
70
+ `,md:`
71
+ height: 32px;
72
+ padding-left: 16px;
73
+ padding-right: 16px;
74
+ border-radius: 4px;
75
+ font-size: var(--sm-font-size);
76
+ font-weight: var(--sm-font-weight);
77
+ line-height: var(--sm-line-height);
78
+ letter-spacing: var(--sm-letter-spacing);
79
+ `,lg:`
80
+ height: 40px;
81
+ padding-left: 20px;
82
+ padding-right: 20px;
83
+ border-radius: 4px;
84
+ font-size: var(--md-font-size);
85
+ font-weight: var(--md-font-weight);
86
+ line-height: var(--md-line-height);
87
+ letter-spacing: var(--md-letter-spacing);
88
+ `},v:{pr:`
89
+ background-color: var(--primary);
90
+ color: var(--primary-foreground);
91
+ `,se:`
92
+ background-color: var(--secondary);
93
+ color: var(--secondary-foreground);
94
+ `,de:`
95
+ background-color: var(--destructive);
96
+ color: var(--primary-foreground);
97
+ `,ol:`
98
+ background-color: transparent;
99
+ color: var(--foreground);
100
+ border-width: 1px;
101
+ `,gh:`
102
+ background-color: transparent;
103
+ color: var(--foreground);
104
+ `,lk:`
105
+ background-color: transparent;
106
+ color: var(--foreground);
107
+ `}},ee={mt:"button",mr:"button",mb:"button",ml:"button",m:"button",mh:"button",mv:"button",s:"button",v:"button"},wt=x(te,ee);var yt=({render:e,html:t})=>{let r=new CSSStyleSheet;return r.replaceSync(v`
62
108
  :host {
63
109
  display: contents;
64
110
  }
@@ -67,160 +113,137 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
67
113
  }
68
114
 
69
115
  button {
116
+ display: flex;
117
+ flex-direction: row;
118
+ align-items: center;
119
+ justify-content: center;
120
+ gap: var(--spacing-s);
121
+ border-width: 0px;
70
122
  border-style: solid;
123
+ border-color: var(--border);
71
124
  padding: 0px;
72
- font-size: var(--typography-body-s-font-size);
73
- font-weight: var(--typography-body-s-font-weight);
74
- line-height: var(--typography-body-s-line-height);
75
- letter-spacing: var(--typography-body-s-letter-spacing);
76
- }
125
+ height: 32px;
126
+ padding-left: 16px;
127
+ padding-right: 16px;
128
+ border-radius: 4px;
77
129
 
78
- button:hover {
79
- cursor: pointer;
80
- }
130
+ font-size: var(--sm-font-size);
131
+ font-weight: var(--sm-font-weight);
132
+ line-height: var(--sm-line-height);
133
+ letter-spacing: var(--sm-letter-spacing);
81
134
 
82
- :host([t="ps"]) button,
83
- :host([t="p"]) button,
84
- :host([t="pl"]) button {
85
- color: var(--color-on-primary);
86
- border-color: var(--color-primary);
87
- background-color: var(--color-primary);
135
+ background-color: var(--primary);
136
+ color: var(--primary-foreground);
88
137
  }
89
138
 
90
- :host([t="ps"]) button:hover,
91
- :host([t="p"]) button:hover,
92
- :host([t="pl"]) button:hover {
93
- border-color: var(--color-primary-hover);
94
- background-color: var(--color-primary-hover);
95
- }
96
-
97
- :host([t="ps"]) button:active,
98
- :host([t="p"]) button:active,
99
- :host([t="pl"]) button:active {
100
- border-color: var(--color-primary-active);
101
- background-color: var(--color-primary-active);
139
+ button:hover {
140
+ cursor: pointer;
141
+ background-color: color-mix(
142
+ in srgb,
143
+ var(--primary) 85%,
144
+ white 15%
145
+ );
102
146
  }
103
147
 
104
- :host([t="ss"]) button,
105
- :host([t="s"]) button,
106
- :host([t="sl"]) button {
107
- color: var(--color-on-secondary);
108
- border-color: var(--color-secondary);
109
- background-color: var(--color-secondary);
148
+ button:disabled {
149
+ cursor: not-allowed;
110
150
  }
111
151
 
112
- :host([t="ss"]) button:hover,
113
- :host([t="s"]) button:hover,
114
- :host([t="sl"]) button:hover {
115
- background-color: var(--color-secondary-hover);
116
- border-color: var(--color-secondary-hover);
152
+ button:active {
153
+ cursor: pointer;
154
+ background-color: color-mix(
155
+ in srgb,
156
+ var(--primary) 80%,
157
+ white 20%
158
+ );
117
159
  }
118
160
 
119
- :host([t="ss"]) button:active,
120
- :host([t="s"]) button:active,
121
- :host([t="sl"]) button:active {
122
- background-color: var(--color-secondary-active);
123
- border-color: var(--color-secondary-active);
161
+ :host([v="pr"]) button:hover {
162
+ background-color: color-mix(
163
+ in srgb,
164
+ var(--primary) 85%,
165
+ white 15%
166
+ );
124
167
  }
125
168
 
126
- :host([t="es"]) button,
127
- :host([t="e"]) button,
128
- :host([t="el"]) button {
129
- color: var(--color-on-error);
130
- border-color: var(--color-error);
131
- background-color: var(--color-error);
169
+ :host([v="pr"]) button:active {
170
+ background-color: color-mix(
171
+ in srgb,
172
+ var(--primary) 80%,
173
+ white 20%
174
+ );
132
175
  }
133
176
 
134
- :host([t="es"]) button:hover,
135
- :host([t="e"]) button:hover,
136
- :host([t="el"]) button:hover {
137
- background-color: var(--color-error-hover);
138
- border-color: var(--color-error-hover);
177
+ :host([v="se"]) button:hover {
178
+ background-color: color-mix(
179
+ in srgb,
180
+ var(--secondary) 85%,
181
+ white 15%
182
+ );
139
183
  }
140
184
 
141
- :host([t="es"]) button:active,
142
- :host([t="e"]) button:active,
143
- :host([t="el"]) button:active {
144
- background-color: var(--color-error-active);
145
- border-color: var(--color-error-active);
185
+ :host([v="se"]) button:active {
186
+ background-color: color-mix(
187
+ in srgb,
188
+ var(--secondary) 80%,
189
+ white 20%
190
+ );
146
191
  }
147
192
 
148
- :host([t="ns"]) button,
149
- :host([t="n"]) button,
150
- :host([t="nl"]) button {
151
- color: var(--color-on-surface);
152
- border-color: var(--color-surface-container);
153
- background-color: var(--color-surface-container);
193
+ :host([v="de"]) button:hover {
194
+ background-color: color-mix(
195
+ in srgb,
196
+ var(--destructive) 85%,
197
+ white 15%
198
+ );
154
199
  }
155
200
 
156
- :host([t="ns"]) button:hover,
157
- :host([t="n"]) button:hover,
158
- :host([t="nl"]) button:hover {
159
- background-color: var(--color-surface-container-high);
160
- border-color: var(--color-surface-container-high);
201
+ :host([v="de"]) button:active {
202
+ background-color: color-mix(
203
+ in srgb,
204
+ var(--destructive) 80%,
205
+ white 20%
206
+ );
161
207
  }
162
208
 
163
- :host([t="ns"]) button:active,
164
- :host([t="n"]) button:active,
165
- :host([t="nl"]) button:active {
166
- background-color: var(--color-surface-container-high);
167
- border-color: var(--color-surface-container-high);
209
+ :host([v="ol"]) button:hover {
210
+ background-color: var(--accent);
168
211
  }
169
212
 
170
- :host([t="ps"]) button,
171
- :host([t="ss"]) button,
172
- :host([t="es"]) button,
173
- :host([t="ns"]) button {
174
- height: var(--button-height-s);
175
- padding-left: var(--button-padding-horizontal-s);
176
- padding-right: var(--button-padding-horizontal-s);
177
- border-radius: var(--button-border-radius-s);
213
+ :host([v="gh"]) button:hover {
214
+ background-color: var(--accent);
178
215
  }
179
216
 
180
- :host([t="p"]) button,
181
- :host([t="s"]) button,
182
- :host([t="e"]) button,
183
- :host([t="n"]) button {
184
- height: var(--button-height-m);
185
- padding-left: var(--button-padding-horizontal-m);
186
- padding-right: var(--button-padding-horizontal-m);
187
- border-radius: var(--button-border-radius-m);
217
+ :host([v="lk"]) button:hover {
218
+ text-decoration: underline;
188
219
  }
189
220
 
190
- :host([t="pl"]) button,
191
- :host([t="sl"]) button,
192
- :host([t="el"]) button,
193
- :host([t="nl"]) button {
194
- height: var(--button-height-l);
195
- padding-left: var(--button-padding-horizontal-l);
196
- padding-right: var(--button-padding-horizontal-l);
197
- border-radius: var(--button-border-radius-l);
198
- font-size: var(--typography-label-l-font-size);
199
- font-weight: var(--typography-label-l-font-weight);
200
- line-height: var(--typography-label-l-line-height);
201
- letter-spacing: var(--typography-label-l-letter-spacing);
202
- }
203
- ${vt}
204
- ${M}
205
- `),class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[o],e(this.shadow,this.render)}static get observedAttributes(){return["key","href","target","w","t"]}_buttonRef={};_assingRef=s=>{this._buttonRef.current=s;let i=b(this.getAttribute("w"));i==="f"?this._buttonRef.current.style.width="100%":i!=null&&(this._buttonRef.current.style.width=i)};attributeChangedCallback(s,i,a){if(!this._buttonRef.current)return;let r=b(this.getAttribute("w"));r==="f"?this._buttonRef.current.style.width="100%":r!=null&&(this._buttonRef.current.style.width=r,this._buttonRef.current.style.minWidth=r,this._buttonRef.current.style.maxWidth=r),e(this.shadow,this.render)}render=()=>this.getAttribute("href")?t`
221
+ ${wt}
222
+ ${j}
223
+ `),class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[r],e(this.shadow,this.render)}static get observedAttributes(){return["key","href","target","w","t","icon","disabled"]}_buttonRef={};_assingRef=o=>{this._buttonRef.current=o;let i=b(this.getAttribute("w"));i==="f"?this._buttonRef.current.style.width="100%":i!=null&&(this._buttonRef.current.style.width=i)};attributeChangedCallback(o,i,l){if(!this._buttonRef.current)return;let s=b(this.getAttribute("w"));s==="f"?this._buttonRef.current.style.width="var(--width-stretch)":s!=null&&(this._buttonRef.current.style.width=s,this._buttonRef.current.style.minWidth=s,this._buttonRef.current.style.maxWidth=s),e(this.shadow,this.render)}renderIcon=()=>{let o=this.getAttribute("icon"),i={pr:"pr-fg",se:"ac-fg",de:"pr-fg",ol:"ac-fg",gh:"ac-fg",lk:"ac-fg"},l={sm:14,md:18,lg:22},s=i[this.getAttribute("v")]||"pr-fg",d=l[this.getAttribute("t")]||18;return o?t`
224
+ <rtgl-svg svg="${o}" c="${s}" wh="${d}"></rtgl-svg>
225
+ `:t``};render=()=>{let o=this.hasAttribute("disabled");return this.getAttribute("href")?t`
206
226
  <a
207
227
  href=${this.getAttribute("href")}
208
228
  target=${this.getAttribute("target")}
229
+ style="text-decoration: none; display: contents; color: inherit;"
209
230
  >
210
- <button>
231
+ <button disabled="${o}">
232
+ ${this.renderIcon()}
211
233
  <slot></slot>
212
234
  </button>
213
235
  </a>
214
236
  `:t`
215
- <button ref=${this._assingRef}>
237
+ <button ref=${this._assingRef} disabled="${o}">
238
+ ${this.renderIcon()}
216
239
  <slot></slot>
217
240
  </button>
218
- `}};var yt=v`
241
+ `}}};var St=v`
219
242
 
220
243
  :host([d="h"]) {
221
244
  flex-direction: row;
222
245
  }
223
- :host(:not([d])) {
246
+ :host([d="v"]) {
224
247
  flex-direction: column;
225
248
  }
226
249
  :host([d="h"]:not([ah])) {
@@ -228,7 +251,6 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
228
251
  }
229
252
  :host([d="h"][ah="c"]) {
230
253
  justify-content: center;
231
- /* align-content: center; */
232
254
  }
233
255
  :host([d="h"][ah="e"]) {
234
256
  justify-content: flex-end;
@@ -244,26 +266,34 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
244
266
  align-items: flex-end;
245
267
  align-content: flex-end;
246
268
  }
247
- :host(:not([d]):not([ah])) {
269
+
270
+ /* Default/vertical direction - horizontal alignment */
271
+ :host(:not([d]):not([ah])),
272
+ :host([d="v"]:not([ah])) {
248
273
  align-items: flex-start;
249
274
  }
250
- :host(:not([d])[ah="c"]) {
275
+ :host(:not([d])[ah="c"]),
276
+ :host([d="v"][ah="c"]) {
251
277
  align-items: center;
252
- align-content: center;
253
278
  }
254
- :host(:not([d])[ah="e"]) {
279
+ :host(:not([d])[ah="e"]),
280
+ :host([d="v"][ah="e"]) {
255
281
  align-items: flex-end;
256
- align-content: flex-end;
257
282
  }
258
- :host(:not([d]):not([av])) {
283
+
284
+ :host(:not([d]):not([av])),
285
+ :host([d="v"]:not([av])) {
259
286
  justify-content: flex-start;
260
287
  }
261
- :host(:not([d])[av="c"]) {
288
+ :host(:not([d])[av="c"]),
289
+ :host([d="v"][av="c"]) {
262
290
  justify-content: center;
263
291
  }
264
- :host(:not([d])[av="e"]) {
292
+ :host(:not([d])[av="e"]),
293
+ :host([d="v"][av="e"]) {
265
294
  justify-content: flex-end;
266
295
  }
296
+
267
297
  @media screen and (max-width: 640px) {
268
298
  :host([s-d="v"]) {
269
299
  flex-direction: column;
@@ -279,7 +309,7 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
279
309
  justify-content: center;
280
310
  }
281
311
  }
282
- `;var Yt={cur:"cursor"},te={cur:{p:"pointer",m:"move",grab:"grab",grabbing:"grabbing"}},S=y(Yt,te);var wt=v`
312
+ `;var re={cur:{p:"pointer",m:"move",grab:"grab",grabbing:"grabbing"}},S=x(re);var $t=v`
283
313
  :host([sh]:not([sv])) {
284
314
  overflow-x: scroll;
285
315
  flex-wrap: nowrap;
@@ -297,43 +327,20 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
297
327
  flex-wrap: nowrap;
298
328
  }
299
329
 
300
- `;var N={xs:"--border-width-xs",s:"--border-width-s",m:"--border-width-m",l:"--border-width-l",xl:"--border-width-xl"},ee={pos:"position",shadow:"box-shadow",pt:"padding-top",pr:"padding-right",pb:"padding-bottom",pl:"padding-left",p:"padding",ph:"padding-left padding-right",pv:"padding-top padding-bottom",g:"gap",gv:"row-gap",gh:"column-gap",bw:"border-width",bwt:"border-top-width",bwr:"border-right-width",bwb:"border-bottom-width",bwl:"border-left-width",bc:"border-color",br:"border-radius"},oe={bgc:{p:`
301
- background-color: var(--color-primary);
302
- color: var(--color-on-primary);
303
- `,pc:`
304
- background-color: var(--color-primary-container);
305
- color: var(--color-on-primary-container);
306
- `,s:`
307
- background-color: var(--color-secondary);
308
- color: var(--color-on-secondary);
309
- `,sc:`
310
- background-color: var(--color-secondary-container);
311
- color: var(--color-on-secondary-container);
312
- `,e:`
313
- background-color: var(--color-error);
314
- color: var(--color-on-error);
315
- `,ec:`
316
- background-color: var(--color-error-container);
317
- color: var(--color-on-error-container);
318
- `,su:`
319
- background-color: var(--color-surface);
320
- color: var(--color-on-surface);
321
- `,sucl:`
322
- background-color: var(--color-surface-container-low);
323
- color: var(--color-on-surface);
324
- `,suc:`
325
- background-color: var(--color-surface-container);
326
- color: var(--color-on-surface);
327
- `,such:`
328
- background-color: var(--color-surface-container-high);
329
- color: var(--color-on-surface);
330
- `,isu:`
331
- background-color: var(--color-inverse-surface);
332
- color: var(--color-inverse-on-surface);
333
- `,o:`
334
- background-color: var(--color-outline);
335
- `,ov:`
336
- background-color: var(--color-outline-variant);
330
+ `;var N={xs:"--border-width-xs",s:"--border-width-s",m:"--border-width-m",l:"--border-width-l",xl:"--border-width-xl"},se={bgc:{pr:`
331
+ background-color: var(--primary);
332
+ `,se:`
333
+ background-color: var(--secondary);
334
+ `,de:`
335
+ background-color: var(--destructive);
336
+ `,bg:`
337
+ background-color: var(--background);
338
+ `,mu:`
339
+ background-color: var(--muted);
340
+ `,ac:`
341
+ background-color: var(--accent);
342
+ `,bo:`
343
+ background-color: var(--border);
337
344
  `},pos:{rel:"relative",abs:"absolute",fix:"fixed"},cor:{full:`
338
345
  top: 0;
339
346
  right: 0;
@@ -358,86 +365,83 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
358
365
  left: 0;
359
366
  top: 0;
360
367
  height: 100%;
361
- `},shadow:{s:"--shadow-s",m:"--shadow-m",l:"--shadow-l"},pt:u,pr:u,pb:u,pl:u,p:u,ph:u,pv:u,g:u,gv:u,gh:u,bw:N,bwt:N,bwr:N,bwb:N,bwl:N,bc:{p:"--color-primary",pc:"--color-primary-container",s:"--color-secondary",sc:"--color-secondary-container",e:"--color-error",ec:"--color-error-container",su:"--color-surface",sucl:"--color-surface-container-low",suc:"--color-surface-container",such:"--color-surface-container-high",isu:"--color-inverse-surface",o:"--color-outline",ov:"--color-outline-variant"},br:{xs:"--border-radius-xs",s:"--border-radius-s",m:"--border-radius-m",l:"--border-radius-l",xl:"--border-radius-xl",f:"50%"}},I=y(ee,oe);var re={mt:"margin-top",mr:"margin-right",mb:"margin-bottom",ml:"margin-left",m:"margin",mh:"margin-left margin-right",mv:"margin-top margin-bottom"},se={mt:u,mr:u,mb:u,ml:u,m:u,mh:u,mv:u},R=y(re,se);var xt=({render:e,html:t})=>{let o=new CSSStyleSheet;return o.replaceSync(v`
368
+ `},shadow:{s:"--shadow-s",m:"--shadow-m",l:"--shadow-l"},pt:f,pr:f,pb:f,pl:f,p:f,ph:f,pv:f,g:f,gv:f,gh:f,bw:N,bwt:N,bwr:N,bwb:N,bwl:N,bc:{p:"--color-primary",pc:"--color-primary-container",s:"--color-secondary",sc:"--color-secondary-container",e:"--color-error",ec:"--color-error-container",su:"--color-surface",sucl:"--color-surface-container-low",suc:"--color-surface-container",such:"--color-surface-container-high",isu:"--color-inverse-surface",o:"--color-outline",ov:"--color-outline-variant"},br:{xs:"--border-radius-xs",s:"--border-radius-s",m:"--border-radius-m",l:"--border-radius-l",xl:"--border-radius-xl",f:"--border-radius-f"}},H=x(se);var oe={mt:f,mr:f,mb:f,ml:f,m:f,mh:f,mv:f},M=x(oe);var kt=({render:e,html:t})=>{let r=new CSSStyleSheet;return r.replaceSync(v`
362
369
  slot {
363
370
  display: contents;
364
371
  }
365
372
  :host {
366
373
  display: flex;
374
+ flex-direction: column;
367
375
  align-self: auto;
368
376
  align-content: flex-start;
369
- flex-wrap: wrap;
370
377
  border-style: solid;
371
378
  border-width: 0;
372
379
  box-sizing: border-box;
380
+ border-color: var(--border);
373
381
  }
374
- :host([stretch]) {
375
- align-self: stretch;
382
+
383
+ :host([fw="w"]) {
384
+ flex-wrap: wrap;
376
385
  }
377
- ${M}
378
- ${wt}
379
- ${yt}
380
- ${R}
386
+
387
+ ${j}
388
+ ${$t}
389
+ ${St}
390
+ ${M}
381
391
  ${S}
382
- ${I}
383
- `),class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[o],e(this.shadow,this.render)}static get observedAttributes(){return["key","wh","w","h","hidden","s-w","s-h","s-d"]}_styles={default:{},sm:{},md:{},lg:{},xl:{}};attributeChangedCallback(s,i,a){["default","sm","md","lg","xl"].forEach(r=>{let g=f=>`${r==="default"?"":`${r}-`}${f}`,p=this.getAttribute(g("wh")),h=b(p===null?this.getAttribute(g("w")):p),c=b(p===null?this.getAttribute(g("h")):p),l=this.getAttribute(g("o")),d=this.getAttribute(g("z"));d!==null&&(this._styles[r]["z-index"]=d),l!==null&&(this._styles[r].opacity=l),h==="f"?this._styles[r].width="100%":h!==void 0&&(this._styles[r].width=h,this._styles[r]["min-width"]=h,this._styles[r]["max-width"]=h),c==="f"?this._styles[r].height="100%":c!==void 0&&(this._styles[r].height=c,this._styles[r]["min-height"]=c,this._styles[r]["max-height"]=c),this.hasAttribute(g("hidden"))&&(this._styles[r].display="none !important"),this.hasAttribute(g("visible"))&&(this._styles[r].display="flex !important")}),e(this.shadow,this.render)}render=()=>t`
392
+ ${H}
393
+ `),class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[r],e(this.shadow,this.render)}static get observedAttributes(){return bt([...vt,"wh","w","h","hidden","sh","sv"])}_styles={default:{},sm:{},md:{},lg:{},xl:{}};attributeChangedCallback(o,i,l){["default","sm","md","lg","xl"].forEach(s=>{let d=u=>`${s==="default"?"":`${s}-`}${u}`,p=this.getAttribute(d("wh")),g=b(p===null?this.getAttribute(d("w")):p),h=b(p===null?this.getAttribute(d("h")):p),a=this.getAttribute(d("o")),c=this.getAttribute(d("z"));c!==null&&(this._styles[s]["z-index"]=c),a!==null&&(this._styles[s].opacity=a),g==="f"?this._styles[s].width="var(--width-stretch)":g!==void 0&&(this._styles[s].width=g,this._styles[s]["min-width"]=g,this._styles[s]["max-width"]=g),h==="f"?this._styles[s].height="100%":h!==void 0&&(this._styles[s].height=h,this._styles[s]["min-height"]=h,this._styles[s]["max-height"]=h),this.hasAttribute(d("hidden"))&&(this._styles[s].display="none !important"),this.hasAttribute(d("visible"))&&(this._styles[s].display="flex !important")}),e(this.shadow,this.render)}render=()=>t`
384
394
  <style>
385
395
  ${D(this._styles)}
386
396
  </style>
387
397
  <slot></slot>
388
- `}};var ne={at:"text-align"},ie={at:{c:"center",e:"right",j:"justify"},s:{dm:`
389
- font-size: var(--typography-display-m-font-size);
390
- font-weight: var(--typography-display-m-font-weight);
391
- line-height: var(--typography-display-m-line-height);
392
- letter-spacing: var(--typography-display-m-letter-spacing);
393
- `,hm:`
394
- font-size: var(--typography-headline-m-font-size);
395
- font-weight: var(--typography-headline-m-font-weight);
396
- line-height: var(--typography-headline-m-line-height);
397
- letter-spacing: var(--typography-headline-m-letter-spacing);
398
- `,tl:`
399
- font-size: var(--typography-title-l-font-size);
400
- font-weight: var(--typography-title-l-font-weight);
401
- line-height: var(--typography-title-l-line-height);
402
- letter-spacing: var(--typography-title-l-letter-spacing);
403
- `,tm:`
404
- font-size: var(--typography-title-m-font-size);
405
- font-weight: var(--typography-title-m-font-weight);
406
- line-height: var(--typography-title-m-line-height);
407
- letter-spacing: var(--typography-title-m-letter-spacing);
408
- `,ts:`
409
- font-size: var(--typography-title-s-font-size);
410
- font-weight: var(--typography-title-s-font-weight);
411
- line-height: var(--typography-title-s-line-height);
412
- letter-spacing: var(--typography-title-s-letter-spacing);
413
- `,bl:`
414
- font-size: var(--typography-body-l-font-size);
415
- font-weight: var(--typography-body-l-font-weight);
416
- line-height: var(--typography-body-l-line-height);
417
- letter-spacing: var(--typography-body-l-letter-spacing);
418
- `,bm:`
419
- font-size: var(--typography-body-m-font-size);
420
- font-weight: var(--typography-body-m-font-weight);
421
- line-height: var(--typography-body-m-line-height);
422
- letter-spacing: var(--typography-body-m-letter-spacing);
423
- `,bs:`
424
- font-size: var(--typography-body-s-font-size);
425
- font-weight: var(--typography-body-s-font-weight);
426
- line-height: var(--typography-body-s-line-height);
427
- letter-spacing: var(--typography-body-s-letter-spacing);
428
- `,ll:`
429
- font-size: var(--typography-label-l-font-size);
430
- font-weight: var(--typography-label-l-font-weight);
431
- line-height: var(--typography-label-l-line-height);
432
- letter-spacing: var(--typography-label-l-letter-spacing);
433
- `,lm:`
434
- font-size: var(--typography-label-m-font-size);
435
- font-weight: var(--typography-label-m-font-weight);
436
- line-height: var(--typography-label-m-line-height);
437
- letter-spacing: var(--typography-label-m-letter-spacing);
438
- `}},St=y(ne,ie);var ae={c:"color"},le={c:{"on-p":"--color-on-primary","on-pc":"--color-on-primary-container","on-s":"--color-on-secondary","on-sc":"--color-on-secondary-container","on-su":"--color-on-surface","on-su-v":"--color-on-surface-variant","i-on-su":"--color-inverse-on-surface","on-e":"--color-on-error","on-ec":"--color-on-error-container"}},P=y(ae,le);var $t=({render:e,html:t})=>{let o=new CSSStyleSheet;o.replaceSync(v`
398
+ `}};var ie={ta:{s:"start",c:"center",e:"end",j:"justify"},s:{h1:`
399
+ font-size: var(--h1-font-size);
400
+ font-weight: var(--h1-font-weight);
401
+ line-height: var(--h1-line-height);
402
+ letter-spacing: var(--h1-letter-spacing);
403
+ `,h2:`
404
+ font-size: var(--h2-font-size);
405
+ font-weight: var(--h2-font-weight);
406
+ line-height: var(--h2-line-height);
407
+ letter-spacing: var(--h2-letter-spacing);
408
+ `,h3:`
409
+ font-size: var(--h3-font-size);
410
+ font-weight: var(--h3-font-weight);
411
+ line-height: var(--h3-line-height);
412
+ letter-spacing: var(--h3-letter-spacing);
413
+ `,h4:`
414
+ font-size: var(--h4-font-size);
415
+ font-weight: var(--h4-font-weight);
416
+ line-height: var(--h4-line-height);
417
+ letter-spacing: var(--h4-letter-spacing);
418
+ `,lg:`
419
+ font-size: var(--lg-font-size);
420
+ font-weight: var(--lg-font-weight);
421
+ line-height: var(--lg-line-height);
422
+ letter-spacing: var(--lg-letter-spacing);
423
+ `,md:`
424
+ font-size: var(--md-font-size);
425
+ font-weight: var(--md-font-weight);
426
+ line-height: var(--md-line-height);
427
+ letter-spacing: var(--md-letter-spacing);
428
+ `,sm:`
429
+ font-size: var(--sm-font-size);
430
+ font-weight: var(--sm-font-weight);
431
+ line-height: var(--sm-line-height);
432
+ letter-spacing: var(--sm-letter-spacing);
433
+ `,xs:`
434
+ font-size: var(--xs-font-size);
435
+ font-weight: var(--xs-font-weight);
436
+ line-height: var(--xs-line-height);
437
+ letter-spacing: var(--xs-letter-spacing);
438
+ `}},Ct=x(ie);var ne={c:{fg:"--foreground",de:"--destructive","pr-fg":"--primary-foreground","se-fg":"--secondary-foreground","mu-fg":"--muted-foreground","ac-fg":"--accent-foreground"}},P=x(ne);var At=({render:e,html:t})=>{let r=new CSSStyleSheet;r.replaceSync(v`
439
439
  :host {
440
440
  display: block;
441
+ font-size: var(--md-font-size);
442
+ font-weight: var(--md-font-weight);
443
+ line-height: var(--md-line-height);
444
+ letter-spacing: var(--md-letter-spacing);
441
445
  }
442
446
  slot {
443
447
  display: contents;
@@ -450,11 +454,11 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
450
454
  text-decoration: var(--anchor-text-decoration-hover);
451
455
  color: var(--anchor-color-hover);
452
456
  }
453
- ${St}
457
+ ${Ct}
454
458
  ${P}
455
- ${R}
459
+ ${M}
456
460
  ${S}
457
- `);class n extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[o]}static get observedAttributes(){return["key","w","ellipsis"]}connectedCallback(){e(this.shadow,this.render)}attributeChangedCallback(i,a,r){let g=b(this.getAttribute("w"));this.hasAttribute("ellipsis")&&(this.style.overflow="hidden",this.style.textOverflow="ellipsis",this.style.whiteSpace="nowrap"),g==="f"?this.style.width="100%":g!==void 0&&(this.style.width=g),e(this.shadow,this.render)}render=()=>t` <slot></slot> `}return n};var Ct=({render:e,html:t})=>{let o=new CSSStyleSheet;return o.replaceSync(v`
461
+ `);class n extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[r]}static get observedAttributes(){return["key","w","ellipsis"]}connectedCallback(){e(this.shadow,this.render)}attributeChangedCallback(i,l,s){let d=b(this.getAttribute("w"));this.hasAttribute("ellipsis")&&(this.style.overflow="hidden",this.style.textOverflow="ellipsis",this.style.whiteSpace="nowrap"),d==="f"?this.style.width="var(--width-stretch)":d!==void 0&&(this.style.width=d),e(this.shadow,this.render)}render=()=>t` <slot></slot> `}return n};var _t=({render:e,html:t})=>{let r=new CSSStyleSheet;return r.replaceSync(v`
458
462
  :host {
459
463
  border-style: solid;
460
464
  box-sizing: border-box;
@@ -477,10 +481,10 @@ ${S}
477
481
  height: 100%;
478
482
  width: 100%;
479
483
  }
480
- ${I}
481
- ${R}
484
+ ${H}
485
+ ${M}
482
486
  ${S}
483
- `),class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[o]}_styles={default:{},sm:{},md:{},lg:{},xl:{}};static get observedAttributes(){return["key","src","wh","w","h","hidden","height","width","s-wh","s-w","s-h"]}connectedCallback(){e(this.shadow,this.render)}attributeChangedCallback(s,i,a){["default","sm","md","lg","xl"].forEach(r=>{let g=f=>`${r==="default"?"":`${r}-`}${f}`,p=this.getAttribute(g("wh")),h=b(p===null?this.getAttribute(g("w")):p),c=b(p===null?this.getAttribute(g("h")):p),l=this.getAttribute(g("o")),d=this.getAttribute(g("z"));d!==null&&(this._styles[r].zIndex=d),l!==null&&(this._styles[r].opacity=l),h==="f"?this._styles[r].width="100%":h!==void 0&&(this._styles[r].width=h,this._styles[r]["min-width"]=h,this._styles[r]["max-width"]=h),c==="f"?this._styles[r].height="100%":c!==void 0&&(this._styles[r].height=c,this._styles[r]["min-height"]=c,this._styles[r]["max-height"]=c)}),e(this.shadow,this.render)}render=()=>t`
487
+ `),class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[r]}_styles={default:{},sm:{},md:{},lg:{},xl:{}};static get observedAttributes(){return["key","src","wh","w","h","hidden","height","width","s-wh","s-w","s-h"]}connectedCallback(){e(this.shadow,this.render)}attributeChangedCallback(o,i,l){["default","sm","md","lg","xl"].forEach(s=>{let d=u=>`${s==="default"?"":`${s}-`}${u}`,p=this.getAttribute(d("wh")),g=b(p===null?this.getAttribute(d("w")):p),h=b(p===null?this.getAttribute(d("h")):p),a=this.getAttribute(d("o")),c=this.getAttribute(d("z"));c!==null&&(this._styles[s].zIndex=c),a!==null&&(this._styles[s].opacity=a),g==="f"?this._styles[s].width="var(--width-stretch)":g!==void 0&&(this._styles[s].width=g,this._styles[s]["min-width"]=g,this._styles[s]["max-width"]=g),h==="f"?this._styles[s].height="100%":h!==void 0&&(this._styles[s].height=h,this._styles[s]["min-height"]=h,this._styles[s]["max-height"]=h)}),e(this.shadow,this.render)}render=()=>t`
484
488
  <style>
485
489
  ${D(this._styles)}
486
490
  </style>
@@ -489,7 +493,7 @@ ${S}
489
493
  width="${this.getAttribute("width")}"
490
494
  height="${this.getAttribute("height")}"
491
495
  />
492
- `}};var kt=v`
496
+ `}};var jt=v`
493
497
  :host([pt="xs"]) svg {
494
498
  padding-top: var(--spacing-xs);
495
499
  }
@@ -605,10 +609,13 @@ ${S}
605
609
  padding-top: var(--spacing-xl);
606
610
  padding-bottom: var(--spacing-xl);
607
611
  }
608
- `;var At=({render:e,html:t})=>{let o=new CSSStyleSheet;return o.replaceSync(v`
612
+ `;var Mt=({render:e,html:t})=>{let r=new CSSStyleSheet;return r.replaceSync(v`
613
+ :host {
614
+ color: var(--foreground);
615
+ }
609
616
  ${P}
610
- ${kt}
611
- ${M}
617
+ ${jt}
618
+ ${j}
612
619
  ${S}
613
- `),class U extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[o]}static _icons={};static get observedAttributes(){return["key","svg","w","h","wh"]}static get icons(){return U._icons}static addIcon(s,i){U._icons[s]=i}connectedCallback(){this.render()}attributeChangedCallback(s,i,a){let r=this.getAttribute("wh"),g=b(r===null?this.getAttribute("w"):r),p=b(r===null?this.getAttribute("h"):r);g&&(this.style.width=g),p&&(this.style.height=p),this.render()}render=()=>{try{let s=this.getAttribute("svg"),i=U._icons[s]||(window.rtglIcons||{})[s];if(i){this.shadow.innerHTML=i;return}}catch(s){console.log("error in rtgl-svg render",s)}this.shadow.innerHTML=""}}};customElements.define("rtgl-button",bt({render:j,html:_}));customElements.define("rtgl-view",xt({render:j,html:_}));customElements.define("rtgl-text",$t({render:j,html:_}));customElements.define("rtgl-image",Ct({render:j,html:_}));customElements.define("rtgl-svg",At({render:j,html:_}));})();
620
+ `),class U extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[r]}static _icons={};static get observedAttributes(){return["key","svg","w","h","wh"]}static get icons(){return U._icons}static addIcon(o,i){U._icons[o]=i}connectedCallback(){this.render()}attributeChangedCallback(o,i,l){let s=this.getAttribute("wh"),d=b(s===null?this.getAttribute("w"):s),p=b(s===null?this.getAttribute("h"):s);d&&(this.style.width=d),p&&(this.style.height=p),this.render()}render=()=>{try{let o=this.getAttribute("svg"),i=U._icons[o]||(window.rtglIcons||{})[o];if(i){this.shadow.innerHTML=i;return}}catch(o){console.log("error in rtgl-svg render",o)}this.shadow.innerHTML=""}}};customElements.define("rtgl-button",yt({render:_,html:A}));customElements.define("rtgl-view",kt({render:_,html:A}));customElements.define("rtgl-text",At({render:_,html:A}));customElements.define("rtgl-image",_t({render:_,html:A}));customElements.define("rtgl-svg",Mt({render:_,html:A}));})();
614
621
  /*! (c) Andrea Giammarchi - MIT */