rettangoli-ui 0.0.8-rc1 → 0.0.9-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,4 +1,4 @@
1
- var rettangoliUi=(()=>{var{isArray:ht}=Array,{getPrototypeOf:Rt,getOwnPropertyDescriptor:Ht}=Object,$=[],ct=()=>document.createRange(),E=(e,t,o)=>(e.set(t,o),o),Lt=(e,t)=>t.reduceRight(Vt,e),Vt=(e,t)=>e.childNodes[t],{setPrototypeOf:Bt}=Object,_,dt=(e,t,o)=>(_||(_=ct()),o?_.setStartAfter(e):_.setStartBefore(e),_.setEndAfter(t),_.deleteContents(),e),J=({firstChild:e,lastChild:t},o)=>dt(e,t,o),pt=!1,F=(e,t)=>pt&&e.nodeType===11?1/t<0?t?J(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,nt=e=>document.createComment(e),K=class extends(t=>{function o(s){return Bt(s,new.target.prototype)}return o.prototype=t.prototype,o})(DocumentFragment){#e=nt("<>");#o=nt("</>");#t=$;constructor(t){super(t),this.replaceChildren(this.#e,...t.childNodes,this.#o),pt=!0}get firstChild(){return this.#e}get lastChild(){return this.#o}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===$&&(this.#t=[...this.childNodes]);else{if(t){let{firstChild:o,lastChild:s}=this;for(this.#t=[o];o!==s;)this.#t.push(o=o.nextSibling)}this.replaceChildren(...this.#t)}return this}},gt=(e,t,o)=>e.setAttribute(t,o),V=(e,t)=>e.removeAttribute(t),R,Dt=(e,t,o)=>{o=o.slice(1),R||(R=new WeakMap);let s=R.get(e)||E(R,e,{}),r=s[o];return r&&r[0]&&e.removeEventListener(o,...r),r=ht(t)?t:[t,!1],s[o]=r,r[0]&&e.addEventListener(o,...r),t},N=(e,t)=>{let{t:o,n:s}=e,r=!1;switch(typeof t){case"object":if(t!==null){(s||o).replaceWith(e.n=t.valueOf());break}case"undefined":r=!0;default:o.data=r?"":t,s&&(e.n=null,s.replaceWith(o))}return t},B=(e,t,o)=>e[o]=t,Pt=(e,t,o)=>B(e,t,o.slice(1)),X=(e,t,o)=>t==null?(V(e,o),t):B(e,t,o),ut=(e,t)=>(typeof t=="function"?t(e):t.current=e,t),Q=(e,t,o)=>(t==null?V(e,o):gt(e,o,t),t),Ut=(e,t,o)=>(e.toggleAttribute(o.slice(1),t),t),L=(e,t,o)=>{let{length:s}=t;if(e.data=`[${s}]`,s)return((r,n,a,i,p)=>{let u=a.length,h=n.length,d=u,l=0,c=0,f=null;for(;l<h||c<d;)if(h===l){let v=d<u?c?i(a[c-1],-0).nextSibling:i(a[d-c],0):p;for(;c<d;)r.insertBefore(i(a[c++],1),v)}else if(d===c)for(;l<h;)f&&f.has(n[l])||r.removeChild(i(n[l],-1)),l++;else if(n[l]===a[c])l++,c++;else if(n[h-1]===a[d-1])h--,d--;else if(n[l]===a[d-1]&&a[c]===n[h-1]){let v=i(n[--h],-1).nextSibling;r.insertBefore(i(a[c++],1),i(n[l++],-1).nextSibling),r.insertBefore(i(a[--d],1),v),n[h]=a[d]}else{if(!f){f=new Map;let v=c;for(;v<d;)f.set(a[v],v++)}if(f.has(n[l])){let v=f.get(n[l]);if(c<v&&v<d){let x=l,k=1;for(;++x<h&&x<d&&f.get(n[x])===v+k;)k++;if(k>v-c){let I=i(n[l],0);for(;c<v;)r.insertBefore(i(a[c++],1),I)}else r.replaceChild(i(a[c++],1),i(n[l++],-1))}else l++}else r.removeChild(i(n[l++],-1))}return a})(e.parentNode,o,t,F,e);switch(o.length){case 1:o[0].remove();case 0:break;default:dt(F(o[0],0),F(o.at(-1),-0),!1)}return $},It=new Map([["aria",(e,t)=>{for(let o in t){let s=t[o],r=o==="role"?o:`aria-${o}`;s==null?V(e,r):gt(e,r,s)}return t}],["class",(e,t)=>X(e,t,t==null?"class":"className")],["data",(e,t)=>{let{dataset:o}=e;for(let s in t)t[s]==null?delete o[s]:o[s]=t[s];return t}],["ref",ut],["style",(e,t)=>t==null?X(e,t,"style"):B(e.style,t,"cssText")]]),Ft=(e,t,o)=>{switch(t[0]){case".":return Pt;case"?":return Ut;case"@":return Dt;default:return o||"ownerSVGElement"in e?t==="ref"?ut:Q:It.get(t)||(t in e?t.startsWith("on")?B:((s,r)=>{let n;do n=Ht(s,r);while(!n&&(s=Rt(s)));return n})(e,t)?.set?X:Q:Q)}},Qt=(e,t)=>(e.textContent=t??"",t),z=(e,t,o)=>({a:e,b:t,c:o}),W=()=>z(null,null,$),ft=e=>(t,o)=>{let{a:s,b:r,c:n}=e(t,o),a=document.importNode(s,!0),i=$;if(r!==$){i=[];for(let l,c,f=0;f<r.length;f++){let{a:v,b:x,c:k}=r[f],I=v===c?l:l=Lt(a,c=v);i[f]=(p=x,u=I,h=k,d=x===L?[]:x===N?W():null,{v:$,u:p,t:u,n:h,c:d})}}var p,u,h,d;return((l,c)=>({b:l,c}))(n?a.firstChild:new K(a),i)},Gt=/^(?:plaintext|script|style|textarea|title|xmp)$/i,Zt=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,qt=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,Jt=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,Kt=/[\x01\x02]/g,G,Z,H=document.createElement("template"),Xt=(e,t)=>{if(t)return G||(G=document.createElementNS("http://www.w3.org/2000/svg","svg"),Z=ct(),Z.selectNodeContents(G)),Z.createContextualFragment(e);H.innerHTML=e;let{content:o}=H;return H=H.cloneNode(!1),o},q=e=>{let t=[],o;for(;o=e.parentNode;)t.push(t.indexOf.call(o.childNodes,e)),e=o;return t},it=()=>document.createTextNode(""),Yt=(e,t,o)=>{let s=Xt(((p,u,h)=>{let d=0;return p.join("").trim().replace(qt,(l,c,f,v)=>`<${c}${f.replace(Jt,"=$2$1").trimEnd()}${v?h||Zt.test(c)?" /":`></${c}`:""}>`).replace(Kt,l=>l===""?`<!--${u+d++}-->`:u+d++)})(e,O,o),o),{length:r}=e,n=$;if(r>1){let p=[],u=document.createTreeWalker(s,129),h=0,d=`${O}${h++}`;for(n=[];h<r;){let l=u.nextNode();if(l.nodeType===8){if(l.data===d){let c=ht(t[h-1])?L:N;c===N&&p.push(l),n.push(z(q(l),c,null)),d=`${O}${h++}`}}else{let c;for(;l.hasAttribute(d);){c||(c=q(l));let f=l.getAttribute(d);n.push(z(c,Ft(l,f,o),f)),V(l,d),d=`${O}${h++}`}!o&&Gt.test(l.localName)&&l.textContent.trim()===`<!--${d}-->`&&(n.push(z(c||q(l),Qt,null)),d=`${O}${h++}`)}}for(h=0;h<p.length;h++)p[h].replaceWith(it())}let{childNodes:a}=s,{length:i}=a;return i<1?(i=1,s.appendChild(it())):i===1&&r!==1&&a[0].nodeType!==1&&(i=0),E(vt,e,z(s,n,i===1))},vt=new WeakMap,O="is\xB5",bt=e=>(t,o)=>vt.get(t)||Yt(t,o,e),te=ft(bt(!1)),ee=ft(bt(!0)),Y=(e,{s:t,t:o,v:s})=>{if(e.a!==o){let{b:r,c:n}=(t?ee:te)(o,s);e.a=o,e.b=r,e.c=n}for(let{c:r}=e,n=0;n<r.length;n++){let a=s[n],i=r[n];switch(i.u){case L:i.v=L(i.t,oe(i.c,a),i.v);break;case N:let p=a instanceof A?Y(i.c||(i.c=W()),a):(i.c=null,a);p!==i.v&&(i.v=N(i,p));break;default:a!==i.v&&(i.v=i.u(i.t,a,i.n,i.v))}}return e.b},oe=(e,t)=>{let o=0,{length:s}=t;for(s<e.length&&e.splice(s);o<s;o++){let r=t[o];r instanceof A?t[o]=Y(e[o]||(e[o]=W()),r):e[o]=null}return t},A=class{constructor(t,o,s){this.s=t,this.t=o,this.v=s}toDOM(t=W()){return Y(t,this)}};var mt=e=>(t,...o)=>new A(e,t,o),S=mt(!1),me=mt(!0),at=new WeakMap,y=(e,t)=>((o,s,r)=>{let n=at.get(o)||E(at,o,W()),{b:a}=n,i=typeof s=="function"?s():s,p=i instanceof A?i.toDOM(n):i;return a!==p&&o.replaceChildren((n.b=p).valueOf()),o})(e,t),lt=new WeakMap,yt=e=>(t,o)=>{let s=lt.get(t)||E(lt,t,new Map);return s.get(o)||E(s,o,function(r,...n){return new A(e,r,n).toDOM(this)}.bind(W()))},ye=yt(!1),we=yt(!0);function b(e,...t){let o="";return e.forEach((s,r)=>{o+=s+(t[r]||"")}),o}var wt={default:void 0,s:"@media only screen and (max-width: 640px)"},w=(e,t,o={})=>{let s="";for(let[r,n]of Object.entries(wt)){r!=="default"&&(s+=`${n} {`);for(let[a,i]of Object.entries(t)){let p=o[a]?` ${o[a]} `:" ";for(let[u,h]of Object.entries(i)){let d=e[a],l=h.startsWith("--")?`var(${h})`:h,c=r==="default"?a:`${r}-${a}`,f=r==="default"?`h-${a}`:`${r}-h-${a}`;if(d){let x=d.split(" ").map(k=>`${k}: ${l};`).join(" ");s+=`
1
+ var rettangoli=(()=>{var{isArray:ht}=Array,{getPrototypeOf:Rt,getOwnPropertyDescriptor:Lt}=Object,$=[],ct=()=>document.createRange(),E=(e,t,o)=>(e.set(t,o),o),Ht=(e,t)=>t.reduceRight(Vt,e),Vt=(e,t)=>e.childNodes[t],{setPrototypeOf:Bt}=Object,_,dt=(e,t,o)=>(_||(_=ct()),o?_.setStartAfter(e):_.setStartBefore(e),_.setEndAfter(t),_.deleteContents(),e),J=({firstChild:e,lastChild:t},o)=>dt(e,t,o),pt=!1,F=(e,t)=>pt&&e.nodeType===11?1/t<0?t?J(e,!0):e.lastChild:t?e.valueOf():e.firstChild:e,nt=e=>document.createComment(e),K=class extends(t=>{function o(s){return Bt(s,new.target.prototype)}return o.prototype=t.prototype,o})(DocumentFragment){#e=nt("<>");#o=nt("</>");#t=$;constructor(t){super(t),this.replaceChildren(this.#e,...t.childNodes,this.#o),pt=!0}get firstChild(){return this.#e}get lastChild(){return this.#o}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===$&&(this.#t=[...this.childNodes]);else{if(t){let{firstChild:o,lastChild:s}=this;for(this.#t=[o];o!==s;)this.#t.push(o=o.nextSibling)}this.replaceChildren(...this.#t)}return this}},gt=(e,t,o)=>e.setAttribute(t,o),V=(e,t)=>e.removeAttribute(t),R,Dt=(e,t,o)=>{o=o.slice(1),R||(R=new WeakMap);let s=R.get(e)||E(R,e,{}),r=s[o];return r&&r[0]&&e.removeEventListener(o,...r),r=ht(t)?t:[t,!1],s[o]=r,r[0]&&e.addEventListener(o,...r),t},N=(e,t)=>{let{t:o,n:s}=e,r=!1;switch(typeof t){case"object":if(t!==null){(s||o).replaceWith(e.n=t.valueOf());break}case"undefined":r=!0;default:o.data=r?"":t,s&&(e.n=null,s.replaceWith(o))}return t},B=(e,t,o)=>e[o]=t,Pt=(e,t,o)=>B(e,t,o.slice(1)),X=(e,t,o)=>t==null?(V(e,o),t):B(e,t,o),ut=(e,t)=>(typeof t=="function"?t(e):t.current=e,t),Q=(e,t,o)=>(t==null?V(e,o):gt(e,o,t),t),Ut=(e,t,o)=>(e.toggleAttribute(o.slice(1),t),t),H=(e,t,o)=>{let{length:s}=t;if(e.data=`[${s}]`,s)return((r,n,i,a,p)=>{let u=i.length,h=n.length,d=u,l=0,c=0,f=null;for(;l<h||c<d;)if(h===l){let v=d<u?c?a(i[c-1],-0).nextSibling:a(i[d],0):p;for(;c<d;)r.insertBefore(a(i[c++],1),v)}else if(d===c)for(;l<h;)f&&f.has(n[l])||r.removeChild(a(n[l],-1)),l++;else if(n[l]===i[c])l++,c++;else if(n[h-1]===i[d-1])h--,d--;else if(n[l]===i[d-1]&&i[c]===n[h-1]){let v=a(n[--h],-0).nextSibling;r.insertBefore(a(i[c++],1),a(n[l++],-0).nextSibling),r.insertBefore(a(i[--d],1),v),n[h]=i[d]}else{if(!f){f=new Map;let v=c;for(;v<d;)f.set(i[v],v++)}if(f.has(n[l])){let v=f.get(n[l]);if(c<v&&v<d){let x=l,k=1;for(;++x<h&&x<d&&f.get(n[x])===v+k;)k++;if(k>v-c){let I=a(n[l],0);for(;c<v;)r.insertBefore(a(i[c++],1),I)}else r.replaceChild(a(i[c++],1),a(n[l++],-1))}else l++}else r.removeChild(a(n[l++],-1))}return i})(e.parentNode,o,t,F,e);switch(o.length){case 1:o[0].remove();case 0:break;default:dt(F(o[0],0),F(o.at(-1),-0),!1)}return $},It=new Map([["aria",(e,t)=>{for(let o in t){let s=t[o],r=o==="role"?o:`aria-${o}`;s==null?V(e,r):gt(e,r,s)}return t}],["class",(e,t)=>X(e,t,t==null?"class":"className")],["data",(e,t)=>{let{dataset:o}=e;for(let s in t)t[s]==null?delete o[s]:o[s]=t[s];return t}],["ref",ut],["style",(e,t)=>t==null?X(e,t,"style"):B(e.style,t,"cssText")]]),Ft=(e,t,o)=>{switch(t[0]){case".":return Pt;case"?":return Ut;case"@":return Dt;default:return o||"ownerSVGElement"in e?t==="ref"?ut:Q:It.get(t)||(t in e?t.startsWith("on")?B:((s,r)=>{let n;do n=Lt(s,r);while(!n&&(s=Rt(s)));return n})(e,t)?.set?X:Q:Q)}},Qt=(e,t)=>(e.textContent=t??"",t),z=(e,t,o)=>({a:e,b:t,c:o}),j=()=>z(null,null,$),ft=e=>(t,o)=>{let{a:s,b:r,c:n}=e(t,o),i=document.importNode(s,!0),a=$;if(r!==$){a=[];for(let l,c,f=0;f<r.length;f++){let{a:v,b:x,c:k}=r[f],I=v===c?l:l=Ht(i,c=v);a[f]=(p=x,u=I,h=k,d=x===H?[]:x===N?j():null,{v:$,u:p,t:u,n:h,c:d})}}var p,u,h,d;return((l,c)=>({b:l,c}))(n?i.firstChild:new K(i),a)},Gt=/^(?:plaintext|script|style|textarea|title|xmp)$/i,Zt=/^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i,qt=/<([a-zA-Z0-9]+[a-zA-Z0-9:._-]*)([^>]*?)(\/?)>/g,Jt=/([^\s\\>"'=]+)\s*=\s*(['"]?)\x01/g,Kt=/[\x01\x02]/g,G,Z,L=document.createElement("template"),Xt=(e,t)=>{if(t)return G||(G=document.createElementNS("http://www.w3.org/2000/svg","svg"),Z=ct(),Z.selectNodeContents(G)),Z.createContextualFragment(e);L.innerHTML=e;let{content:o}=L;return L=L.cloneNode(!1),o},q=e=>{let t=[],o;for(;o=e.parentNode;)t.push(t.indexOf.call(o.childNodes,e)),e=o;return t},it=()=>document.createTextNode(""),Yt=(e,t,o)=>{let s=Xt(((p,u,h)=>{let d=0;return p.join("").trim().replace(qt,(l,c,f,v)=>`<${c}${f.replace(Jt,"=$2$1").trimEnd()}${v?h||Zt.test(c)?" /":`></${c}`:""}>`).replace(Kt,l=>l===""?`<!--${u+d++}-->`:u+d++)})(e,O,o),o),{length:r}=e,n=$;if(r>1){let p=[],u=document.createTreeWalker(s,129),h=0,d=`${O}${h++}`;for(n=[];h<r;){let l=u.nextNode();if(l.nodeType===8){if(l.data===d){let c=ht(t[h-1])?H:N;c===N&&p.push(l),n.push(z(q(l),c,null)),d=`${O}${h++}`}}else{let c;for(;l.hasAttribute(d);){c||(c=q(l));let f=l.getAttribute(d);n.push(z(c,Ft(l,f,o),f)),V(l,d),d=`${O}${h++}`}!o&&Gt.test(l.localName)&&l.textContent.trim()===`<!--${d}-->`&&(n.push(z(c||q(l),Qt,null)),d=`${O}${h++}`)}}for(h=0;h<p.length;h++)p[h].replaceWith(it())}let{childNodes:i}=s,{length:a}=i;return a<1?(a=1,s.appendChild(it())):a===1&&r!==1&&i[0].nodeType!==1&&(a=0),E(vt,e,z(s,n,a===1))},vt=new WeakMap,O="is\xB5",bt=e=>(t,o)=>vt.get(t)||Yt(t,o,e),te=ft(bt(!1)),ee=ft(bt(!0)),Y=(e,{s:t,t:o,v:s})=>{if(e.a!==o){let{b:r,c:n}=(t?ee:te)(o,s);e.a=o,e.b=r,e.c=n}for(let{c:r}=e,n=0;n<r.length;n++){let i=s[n],a=r[n];switch(a.u){case H:a.v=H(a.t,oe(a.c,i),a.v);break;case N:let p=i instanceof A?Y(a.c||(a.c=j()),i):(a.c=null,i);p!==a.v&&(a.v=N(a,p));break;default:i!==a.v&&(a.v=a.u(a.t,i,a.n,a.v))}}return e.b},oe=(e,t)=>{let o=0,{length:s}=t;for(s<e.length&&e.splice(s);o<s;o++){let r=t[o];r instanceof A?t[o]=Y(e[o]||(e[o]=j()),r):e[o]=null}return t},A=class{constructor(t,o,s){this.s=t,this.t=o,this.v=s}toDOM(t=j()){return Y(t,this)}};var mt=e=>(t,...o)=>new A(e,t,o),S=mt(!1),me=mt(!0),at=new WeakMap,y=(e,t)=>((o,s)=>{let r=at.get(o)||E(at,o,j()),{b:n}=r,i=typeof s=="function"?s():s,a=i instanceof A?i.toDOM(r):i;return n!==a&&o.replaceChildren((r.b=a).valueOf()),o})(e,t),lt=new WeakMap,yt=e=>(t,o)=>{let s=lt.get(t)||E(lt,t,new Map);return s.get(o)||E(s,o,function(r,...n){return new A(e,r,n).toDOM(this)}.bind(j()))},ye=yt(!1),we=yt(!0);function b(e,...t){let o="";return e.forEach((s,r)=>{o+=s+(t[r]||"")}),o}var wt={default:void 0,s:"@media only screen and (max-width: 640px)"},w=(e,t,o={})=>{let s="";for(let[r,n]of Object.entries(wt)){r!=="default"&&(s+=`${n} {`);for(let[i,a]of Object.entries(t)){let p=o[i]?` ${o[i]} `:" ";for(let[u,h]of Object.entries(a)){let d=e[i],l=h.startsWith("--")?`var(${h})`:h,c=r==="default"?i:`${r}-${i}`,f=r==="default"?`h-${i}`:`${r}-h-${i}`;if(d){let x=d.split(" ").map(k=>`${k}: ${l};`).join(" ");s+=`
2
2
  :host([${c}="${u}"])${p}{
3
3
  ${x}
4
4
  }
@@ -13,12 +13,12 @@ var rettangoliUi=(()=>{var{isArray:ht}=Array,{getPrototypeOf:Rt,getOwnPropertyDe
13
13
  ${h}
14
14
  }
15
15
  `}}r!=="default"&&(s+="}")}return s};function re(e){if(e===null||e.includes("/"))return!1;let t=String(e);return/[0-9]$/.test(t)}var se=e=>/%$/.test(e),m=e=>{if(e!==void 0)return se(e)?e:re(e)?`${e}px`:e},g={xs:"--spacing-xs",s:"--spacing-s",m:"--spacing-m",l:"--spacing-l",xl:"--spacing-xl"};function D(e){let t="";for(let[o,s]of Object.entries(wt)){o!=="default"&&(t+=`${s} {
16
- `);let r="";for(let[n,a]of Object.entries(e[o]))a!=null&&(r+=`${n}: ${a};
16
+ `);let r="";for(let[n,i]of Object.entries(e[o]))i!=null&&(r+=`${n}: ${i};
17
17
  `);t+=`:host {
18
18
  ${r.trim()}
19
19
  }
20
20
  `,o!=="default"&&(t+=`}
21
- `)}return t}var j=b`
21
+ `)}return t}var M=b`
22
22
  :host([flex="0"]) {
23
23
  flex: 0;
24
24
  }
@@ -201,7 +201,7 @@ var rettangoliUi=(()=>{var{isArray:ht}=Array,{getPrototypeOf:Rt,getOwnPropertyDe
201
201
  letter-spacing: var(--typography-label-l-letter-spacing);
202
202
  }
203
203
  ${xt}
204
- ${j}
204
+ ${M}
205
205
  `);var tt=class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[St],y(this.shadow,this.render)}static get observedAttributes(){return["key","href","target","w","t"]}_buttonRef={};_assingRef=t=>{this._buttonRef.current=t;let o=m(this.getAttribute("w"));o==="f"?this._buttonRef.current.style.width="100%":o!=null&&(this._buttonRef.current.style.width=o)};attributeChangedCallback(t,o,s){if(!this._buttonRef.current)return;let r=m(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),y(this.shadow,this.render)}render=()=>this.getAttribute("href")?S`
206
206
  <a
207
207
  href=${this.getAttribute("href")}
@@ -253,6 +253,7 @@ var rettangoliUi=(()=>{var{isArray:ht}=Array,{getPrototypeOf:Rt,getOwnPropertyDe
253
253
  }
254
254
  :host(:not([d])[ah="e"]) {
255
255
  align-items: flex-end;
256
+ align-content: flex-end;
256
257
  }
257
258
  :host(:not([d]):not([av])) {
258
259
  justify-content: flex-start;
@@ -357,10 +358,13 @@ var rettangoliUi=(()=>{var{isArray:ht}=Array,{getPrototypeOf:Rt,getOwnPropertyDe
357
358
  left: 0;
358
359
  top: 0;
359
360
  height: 100%;
360
- `},shadow:{s:"--shadow-s",m:"--shadow-m",l:"--shadow-l"},pt:g,pr:g,pb:g,pl:g,p:g,ph:g,pv:g,g,gv:g,gh:g,bw:T,bwt:T,bwr:T,bwb:T,bwl:T,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%"}},P=w(ce,de);var pe={mt:"margin-top",mr:"margin-right",mb:"margin-bottom",ml:"margin-left",m:"margin",mh:"margin-left margin-right",mv:"margin-top margin-bottom"},ge={mt:g,mr:g,mb:g,ml:g,m:g,mh:g,mv:g},M=w(pe,ge);var At=new CSSStyleSheet;At.replaceSync(b`
361
+ `},shadow:{s:"--shadow-s",m:"--shadow-m",l:"--shadow-l"},pt:g,pr:g,pb:g,pl:g,p:g,ph:g,pv:g,g,gv:g,gh:g,bw:T,bwt:T,bwr:T,bwb:T,bwl:T,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%"}},P=w(ce,de);var pe={mt:"margin-top",mr:"margin-right",mb:"margin-bottom",ml:"margin-left",m:"margin",mh:"margin-left margin-right",mv:"margin-top margin-bottom"},ge={mt:g,mr:g,mb:g,ml:g,m:g,mh:g,mv:g},W=w(pe,ge);var At=new CSSStyleSheet;At.replaceSync(b`
361
362
  slot {
362
363
  display: contents;
363
364
  }
365
+ :host([hidden]) {
366
+ display: none;
367
+ }
364
368
  :host {
365
369
  display: flex;
366
370
  align-self: auto;
@@ -373,13 +377,13 @@ var rettangoliUi=(()=>{var{isArray:ht}=Array,{getPrototypeOf:Rt,getOwnPropertyDe
373
377
  :host([stretch]) {
374
378
  align-self: stretch;
375
379
  }
376
- ${j}
380
+ ${M}
377
381
  ${kt}
378
382
  ${Ct}
379
- ${M}
383
+ ${W}
380
384
  ${C}
381
385
  ${P}
382
- `);var et=class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[At],y(this.shadow,this.render)}static get observedAttributes(){return["key","wh","w","h","hidden","s-w","s-h","s-d"]}_styles={default:{},s:{}};attributeChangedCallback(t,o,s){["default","s"].forEach(r=>{let n=d=>`${r==="default"?"":`${r}-`}${d}`,a=this.getAttribute(n("wh")),i=m(a===null?this.getAttribute(n("w")):a),p=m(a===null?this.getAttribute(n("h")):a),u=this.getAttribute(n("o")),h=this.getAttribute(n("z"));h!==null&&(this._styles[r]["z-index"]=h),u!==null&&(this._styles[r].opacity=u),i==="f"?this._styles[r].width="100%":i!==void 0&&(this._styles[r].width=i,this._styles[r]["min-width"]=i,this._styles[r]["max-width"]=i),p==="f"?this._styles[r].height="100%":p!==void 0&&(this._styles[r].height=p,this._styles[r]["min-height"]=p,this._styles[r]["max-height"]=p),this.hasAttribute("hidden")&&(this._styles[r].display="none")}),y(this.shadow,this.render)}render=()=>S`
386
+ `);var et=class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[At],y(this.shadow,this.render)}static get observedAttributes(){return["key","wh","w","h","hidden","s-w","s-h","s-d"]}_styles={default:{},s:{}};attributeChangedCallback(t,o,s){["default","s"].forEach(r=>{let n=d=>`${r==="default"?"":`${r}-`}${d}`,i=this.getAttribute(n("wh")),a=m(i===null?this.getAttribute(n("w")):i),p=m(i===null?this.getAttribute(n("h")):i),u=this.getAttribute(n("o")),h=this.getAttribute(n("z"));h!==null&&(this._styles[r]["z-index"]=h),u!==null&&(this._styles[r].opacity=u),a==="f"?this._styles[r].width="100%":a!==void 0&&(this._styles[r].width=a,this._styles[r]["min-width"]=a,this._styles[r]["max-width"]=a),p==="f"?this._styles[r].height="100%":p!==void 0&&(this._styles[r].height=p,this._styles[r]["min-height"]=p,this._styles[r]["max-height"]=p),this.hasAttribute("hidden")&&(this._styles[r].display="none")}),y(this.shadow,this.render)}render=()=>S`
383
387
  <style>
384
388
  ${D(this._styles)}
385
389
  </style>
@@ -433,7 +437,7 @@ var rettangoliUi=(()=>{var{isArray:ht}=Array,{getPrototypeOf:Rt,getOwnPropertyDe
433
437
  font-weight: var(--typography-label-m-font-weight);
434
438
  line-height: var(--typography-label-m-line-height);
435
439
  letter-spacing: var(--typography-label-m-letter-spacing);
436
- `}},Wt=w(ue,fe);var ve={c:"color"},be={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"}},U=w(ve,be);var jt=new CSSStyleSheet;jt.replaceSync(b`
440
+ `}},jt=w(ue,fe);var ve={c:"color"},be={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"}},U=w(ve,be);var Mt=new CSSStyleSheet;Mt.replaceSync(b`
437
441
  :host {
438
442
  display: block;
439
443
  }
@@ -448,13 +452,13 @@ slot {
448
452
  text-decoration: var(--anchor-text-decoration-hover);
449
453
  color: var(--anchor-color-hover);
450
454
  }
451
- ${Wt}
455
+ ${jt}
452
456
  ${U}
453
- ${M}
457
+ ${W}
454
458
  ${C}
455
- `);var ot=class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[jt]}static get observedAttributes(){return["key","w","ellipsis"]}connectedCallback(){y(this.shadow,this.render)}attributeChangedCallback(t,o,s){let r=m(this.getAttribute("w"));this.hasAttribute("ellipsis")&&(this.style.overflow="hidden",this.style.textOverflow="ellipsis",this.style.whiteSpace="nowrap"),r==="f"?this.style.width="100%":r!==void 0&&(this.style.width=r),y(this.shadow,this.render)}render=()=>S`
459
+ `);var ot=class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[Mt]}static get observedAttributes(){return["key","w","ellipsis"]}connectedCallback(){y(this.shadow,this.render)}attributeChangedCallback(t,o,s){let r=m(this.getAttribute("w"));this.hasAttribute("ellipsis")&&(this.style.overflow="hidden",this.style.textOverflow="ellipsis",this.style.whiteSpace="nowrap"),r==="f"?this.style.width="100%":r!==void 0&&(this.style.width=r),y(this.shadow,this.render)}render=()=>S`
456
460
  <slot></slot>
457
- `},Mt=ot;var Ot=new CSSStyleSheet;Ot.replaceSync(b`
461
+ `},Wt=ot;var Ot=new CSSStyleSheet;Ot.replaceSync(b`
458
462
  :host {
459
463
  border-style: solid;
460
464
  box-sizing: border-box;
@@ -478,9 +482,9 @@ img {
478
482
  width: 100%;
479
483
  }
480
484
  ${P}
481
- ${M}
485
+ ${W}
482
486
  ${C}
483
- `);var rt=class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[Ot]}_styles={default:{},s:{}};static get observedAttributes(){return["key","src","wh","w","h","hidden","height","width","s-wh","s-w","s-h"]}connectedCallback(){y(this.shadow,this.render)}attributeChangedCallback(t,o,s){["default","s"].forEach(r=>{let n=d=>`${r==="default"?"":`${r}-`}${d}`,a=this.getAttribute(n("wh")),i=m(a===null?this.getAttribute(n("w")):a),p=m(a===null?this.getAttribute(n("h")):a),u=this.getAttribute(n("o")),h=this.getAttribute(n("z"));h!==null&&(this._styles[r].zIndex=h),u!==null&&(this._styles[r].opacity=u),i==="f"?this._styles[r].width="100%":i!==void 0&&(this._styles[r].width=i,this._styles[r].minWidth=i,this._styles[r].maxWidth=i),p==="f"?this._styles[r].height="100%":p!==void 0&&(this._styles[r].height=p,this._styles[r].minHeight=p,this._styles[r].maxHeight=p)}),y(this.shadow,this.render)}render=()=>S`
487
+ `);var rt=class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[Ot]}_styles={default:{},s:{}};static get observedAttributes(){return["key","src","wh","w","h","hidden","height","width","s-wh","s-w","s-h"]}connectedCallback(){y(this.shadow,this.render)}attributeChangedCallback(t,o,s){["default","s"].forEach(r=>{let n=d=>`${r==="default"?"":`${r}-`}${d}`,i=this.getAttribute(n("wh")),a=m(i===null?this.getAttribute(n("w")):i),p=m(i===null?this.getAttribute(n("h")):i),u=this.getAttribute(n("o")),h=this.getAttribute(n("z"));h!==null&&(this._styles[r].zIndex=h),u!==null&&(this._styles[r].opacity=u),a==="f"?this._styles[r].width="100%":a!==void 0&&(this._styles[r].width=a,this._styles[r]["min-width"]=a,this._styles[r]["max-width"]=a),p==="f"?this._styles[r].height="100%":p!==void 0&&(this._styles[r].height=p,this._styles[r]["min-height"]=p,this._styles[r]["max-height"]=p)}),y(this.shadow,this.render)}render=()=>S`
484
488
  <style>
485
489
  ${D(this._styles)}
486
490
  </style>
@@ -608,8 +612,7 @@ ${C}
608
612
  `;var Nt=new CSSStyleSheet;Nt.replaceSync(b`
609
613
  ${U}
610
614
  ${Et}
611
- ${j}
615
+ ${M}
612
616
  ${C}
613
- `);var st=class e extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[Nt]}static _icons={};static get observedAttributes(){return["key","svg","w","h","wh"]}static get icons(){return e._icons}static addIcon(t,o){e._icons[t]=o}connectedCallback(){this.render()}attributeChangedCallback(t,o,s){let r=this.getAttribute("wh"),n=m(r===null?this.getAttribute("w"):r),a=m(r===null?this.getAttribute("h"):r);n&&(this.style.width=n),a&&(this.style.height=a),this.render()}render=()=>{try{let t=this.getAttribute("svg"),o=e._icons[t]||(window.rtglIcons||{})[t];if(o){this.shadow.innerHTML=o;return}}catch(t){console.log("error in rtgl-svg render",t)}this.shadow.innerHTML=""}},Tt=st;customElements.define("rtgl-button",$t);customElements.define("rtgl-view",_t);customElements.define("rtgl-text",Mt);customElements.define("rtgl-image",zt);customElements.define("rtgl-svg",Tt);})();
617
+ `);var st=class e extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[Nt]}static _icons={};static get observedAttributes(){return["key","svg","w","h","wh"]}static get icons(){return e._icons}static addIcon(t,o){e._icons[t]=o}connectedCallback(){this.render()}attributeChangedCallback(t,o,s){let r=this.getAttribute("wh"),n=m(r===null?this.getAttribute("w"):r),i=m(r===null?this.getAttribute("h"):r);n&&(this.style.width=n),i&&(this.style.height=i),this.render()}render=()=>{try{let t=this.getAttribute("svg"),o=e._icons[t]||(window.rtglIcons||{})[t];if(o){this.shadow.innerHTML=o;return}}catch(t){console.log("error in rtgl-svg render",t)}this.shadow.innerHTML=""}},Tt=st;customElements.define("rtgl-button",$t);customElements.define("rtgl-view",_t);customElements.define("rtgl-text",Wt);customElements.define("rtgl-image",zt);customElements.define("rtgl-svg",Tt);})();
614
618
  /*! (c) Andrea Giammarchi - MIT */
615
- //# sourceMappingURL=rettangoli-ui.min.js.map