rettangoli-ui 0.0.10 → 0.1.0-rc2

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=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(t[a]||"")}),i}var G=["xs","sm","md","lg","xl"],D={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"},S=Object.keys(D),_=e=>e.concat(G.flatMap(t=>e.map(i=>`${t}-${i}`))),T={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)"},p=(e,t={})=>{let i="";for(let[r,a]of Object.entries(T)){r!=="default"&&(i+=`${a} {`);for(let[s,l]of Object.entries(e)){let h=t[s]?` ${t[s]} `:" ";for(let[c,d]of Object.entries(l)){let m=D[s],u=d.startsWith("--")?`var(${d})`:d,v=r==="default"?s:`${r}-${s}`,O=r==="default"?`h-${s}`:`${r}-h-${s}`;if(m){let W=m.split(" ").map(R=>`${R}: ${u};`).join(" ");i+=`
2
+ :host([${v}="${c}"])${h}{
3
+ ${W}
4
4
  }
5
- :host([${f}="${p}"]:hover)${g}{
6
- ${w}
5
+ :host([${O}="${c}"]:hover)${h}{
6
+ ${W}
7
7
  }
8
- `}else n+=`
9
- :host([${d}="${p}"])${g}{
10
- ${h}
8
+ `}else i+=`
9
+ :host([${v}="${c}"])${h}{
10
+ ${d}
11
11
  }
12
- :host([${f}="${p}"]:hover)${g}{
13
- ${h}
12
+ :host([${O}="${c}"]:hover)${h}{
13
+ ${d}
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};
17
- `);t+=`:host {
15
+ `}}r!=="default"&&(i+="}")}return i};function q(e){if(e===null||e.includes("/"))return!1;let t=String(e);return/[0-9]$/.test(t)}var F=e=>/%$/.test(e),g=e=>{if(e!==void 0)return F(e)?e:q(e)?`${e}px`:Object.keys(o).includes(e)?`var(${o[e]})`:e},o={xs:"--spacing-xs",sm:"--spacing-sm",md:"--spacing-md",lg:"--spacing-lg",xl:"--spacing-xl"};function E(e,t=":host"){let i="";for(let[r,a]of Object.entries(T)){r!=="default"&&(i+=`${a} {
16
+ `);let s="";for(let[l,h]of Object.entries(e[r]))h!=null&&(s+=`${l}: ${h};
17
+ `);i+=`${t} {
18
18
  ${s.trim()}
19
19
  }
20
- `,o!=="default"&&(t+=`}
21
- `)}return t}var M=v`
20
+ `,r!=="default"&&(i+=`}
21
+ `)}return i}var b=n`
22
22
  :host([flex="0"]) {
23
23
  flex: 0;
24
24
  }
@@ -58,169 +58,190 @@ 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`
62
- :host {
63
- display: contents;
64
- }
65
- slot {
66
- display: contents;
67
- }
61
+ `;var J={mt:o,mr:o,mb:o,ml:o,m:o,mh:o,mv:o,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
+ `}},X={mt:"button",mr:"button",mb:"button",ml:"button",m:"button",mh:"button",mv:"button",s:"button",v:"button"},B=p(J,X);var y=n`
108
+ a, a:link, a:visited, a:hover, a:active {
109
+ color: inherit;
110
+ text-decoration: none;
111
+ background: none;
112
+ border: none;
113
+ padding: 0;
114
+ margin: 0;
115
+ font: inherit;
116
+ }
117
+ `;var A=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(n`
118
+ :host {
119
+ display: contents;
120
+ }
121
+ slot {
122
+ display: contents;
123
+ }
68
124
 
69
- button {
70
- border-style: solid;
71
- 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
+ button {
126
+ display: flex;
127
+ flex-direction: row;
128
+ align-items: center;
129
+ justify-content: center;
130
+ gap: var(--spacing-sm);
131
+ border-width: 0px;
132
+ border-style: solid;
133
+ border-color: var(--border);
134
+ padding: 0px;
135
+ height: 32px;
136
+ padding-left: 16px;
137
+ padding-right: 16px;
138
+ border-radius: 4px;
77
139
 
78
- button:hover {
79
- cursor: pointer;
80
- }
140
+ font-size: var(--sm-font-size);
141
+ font-weight: var(--sm-font-weight);
142
+ line-height: var(--sm-line-height);
143
+ letter-spacing: var(--sm-letter-spacing);
81
144
 
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);
88
- }
145
+ background-color: var(--primary);
146
+ color: var(--primary-foreground);
147
+ }
89
148
 
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
- }
149
+ button:hover {
150
+ cursor: pointer;
151
+ background-color: color-mix(
152
+ in srgb,
153
+ var(--primary) 85%,
154
+ white 15%
155
+ );
156
+ }
96
157
 
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);
102
- }
158
+ button:disabled {
159
+ cursor: not-allowed;
160
+ }
103
161
 
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);
110
- }
162
+ button:active {
163
+ cursor: pointer;
164
+ background-color: color-mix(
165
+ in srgb,
166
+ var(--primary) 80%,
167
+ white 20%
168
+ );
169
+ }
111
170
 
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);
117
- }
171
+ :host([v="pr"]) button:hover {
172
+ background-color: color-mix(
173
+ in srgb,
174
+ var(--primary) 85%,
175
+ white 15%
176
+ );
177
+ }
118
178
 
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);
124
- }
179
+ :host([v="pr"]) button:active {
180
+ background-color: color-mix(
181
+ in srgb,
182
+ var(--primary) 80%,
183
+ white 20%
184
+ );
185
+ }
125
186
 
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);
132
- }
187
+ :host([v="se"]) button:hover {
188
+ background-color: color-mix(
189
+ in srgb,
190
+ var(--secondary) 85%,
191
+ white 15%
192
+ );
193
+ }
133
194
 
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);
139
- }
195
+ :host([v="se"]) button:active {
196
+ background-color: color-mix(
197
+ in srgb,
198
+ var(--secondary) 80%,
199
+ white 20%
200
+ );
201
+ }
140
202
 
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);
146
- }
203
+ :host([v="de"]) button:hover {
204
+ background-color: color-mix(
205
+ in srgb,
206
+ var(--destructive) 85%,
207
+ white 15%
208
+ );
209
+ }
147
210
 
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);
154
- }
211
+ :host([v="de"]) button:active {
212
+ background-color: color-mix(
213
+ in srgb,
214
+ var(--destructive) 80%,
215
+ white 20%
216
+ );
217
+ }
155
218
 
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);
161
- }
219
+ :host([v="ol"]) button:hover {
220
+ background-color: var(--accent);
221
+ }
162
222
 
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);
168
- }
223
+ :host([v="gh"]) button:hover {
224
+ background-color: var(--accent);
225
+ }
169
226
 
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);
178
- }
227
+ :host([v="lk"]) button:hover {
228
+ text-decoration: underline;
229
+ }
179
230
 
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);
188
- }
231
+ ${y}
232
+
233
+ a {
234
+ display: contents;
235
+ }
189
236
 
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`
206
- <a
207
- href=${this.getAttribute("href")}
208
- target=${this.getAttribute("target")}
209
- >
210
- <button>
211
- <slot></slot>
212
- </button>
213
- </a>
214
- `:t`
215
- <button ref=${this._assingRef}>
216
- <slot></slot>
217
- </button>
218
- `}};var yt=v`
237
+ ${B}
238
+ ${b}
239
+ `))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._containerElement=null,this._buttonElement=document.createElement("button"),this._slotElement=document.createElement("slot"),this._iconElement=null,this._buttonElement.appendChild(this._slotElement)}static get observedAttributes(){return["key","href","target","w","t","icon","disabled","v","s"]}connectedCallback(){this._updateButton()}attributeChangedCallback(t,i,r){this._updateButton()}_updateButton(){this.shadow.innerHTML="",this._updateIcon(),this._updateWidth(),this.hasAttribute("disabled")?this._buttonElement.setAttribute("disabled",""):this._buttonElement.removeAttribute("disabled");let i=this.getAttribute("href");if(i){let r=document.createElement("a");r.setAttribute("href",i);let a=this.getAttribute("target");a&&r.setAttribute("target",a),r.appendChild(this._buttonElement),this.shadow.appendChild(r),this._containerElement=r}else this.shadow.appendChild(this._buttonElement),this._containerElement=this._buttonElement}_updateIcon(){this._iconElement&&(this._iconElement.remove(),this._iconElement=null);let t=this.getAttribute("icon");if(t){let i={pr:"pr-fg",se:"ac-fg",de:"pr-fg",ol:"ac-fg",gh:"ac-fg",lk:"ac-fg"},r={sm:14,md:18,lg:22},a=i[this.getAttribute("v")]||"pr-fg",s=r[this.getAttribute("t")]||18;this._iconElement=document.createElement("rtgl-svg"),this._iconElement.setAttribute("svg",t),this._iconElement.setAttribute("c",a),this._iconElement.setAttribute("wh",s.toString()),this._buttonElement.insertBefore(this._iconElement,this._slotElement)}}_updateWidth(){let t=g(this.getAttribute("w"));t==="f"?this._buttonElement.style.width="var(--width-stretch)":t!=null?(this._buttonElement.style.width=t,this._buttonElement.style.minWidth=t,this._buttonElement.style.maxWidth=t):(this._buttonElement.style.width="",this._buttonElement.style.minWidth="",this._buttonElement.style.maxWidth="")}},I=({render:e,html:t})=>A;var H=n`
219
240
 
220
241
  :host([d="h"]) {
221
242
  flex-direction: row;
222
243
  }
223
- :host(:not([d])) {
244
+ :host([d="v"]) {
224
245
  flex-direction: column;
225
246
  }
226
247
  :host([d="h"]:not([ah])) {
@@ -228,7 +249,6 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
228
249
  }
229
250
  :host([d="h"][ah="c"]) {
230
251
  justify-content: center;
231
- /* align-content: center; */
232
252
  }
233
253
  :host([d="h"][ah="e"]) {
234
254
  justify-content: flex-end;
@@ -244,26 +264,34 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
244
264
  align-items: flex-end;
245
265
  align-content: flex-end;
246
266
  }
247
- :host(:not([d]):not([ah])) {
267
+
268
+ /* Default/vertical direction - horizontal alignment */
269
+ :host(:not([d]):not([ah])),
270
+ :host([d="v"]:not([ah])) {
248
271
  align-items: flex-start;
249
272
  }
250
- :host(:not([d])[ah="c"]) {
273
+ :host(:not([d])[ah="c"]),
274
+ :host([d="v"][ah="c"]) {
251
275
  align-items: center;
252
- align-content: center;
253
276
  }
254
- :host(:not([d])[ah="e"]) {
277
+ :host(:not([d])[ah="e"]),
278
+ :host([d="v"][ah="e"]) {
255
279
  align-items: flex-end;
256
- align-content: flex-end;
257
280
  }
258
- :host(:not([d]):not([av])) {
281
+
282
+ :host(:not([d]):not([av])),
283
+ :host([d="v"]:not([av])) {
259
284
  justify-content: flex-start;
260
285
  }
261
- :host(:not([d])[av="c"]) {
286
+ :host(:not([d])[av="c"]),
287
+ :host([d="v"][av="c"]) {
262
288
  justify-content: center;
263
289
  }
264
- :host(:not([d])[av="e"]) {
290
+ :host(:not([d])[av="e"]),
291
+ :host([d="v"][av="e"]) {
265
292
  justify-content: flex-end;
266
293
  }
294
+
267
295
  @media screen and (max-width: 640px) {
268
296
  :host([s-d="v"]) {
269
297
  flex-direction: column;
@@ -279,7 +307,7 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
279
307
  justify-content: center;
280
308
  }
281
309
  }
282
- `;var Yt={cur:"cursor"},te={cur:{p:"pointer",m:"move",grab:"grab",grabbing:"grabbing"}},S=y(Yt,te);var wt=v`
310
+ `;var Y={cur:{p:"pointer",m:"move",grab:"grab",grabbing:"grabbing"}},f=p(Y);var L=n`
283
311
  :host([sh]:not([sv])) {
284
312
  overflow-x: scroll;
285
313
  flex-wrap: nowrap;
@@ -297,43 +325,22 @@ var rettangoli=(()=>{var{isArray:nt}=Array,{getPrototypeOf:_t,getOwnPropertyDesc
297
325
  flex-wrap: nowrap;
298
326
  }
299
327
 
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);
328
+ `;var w={xs:"--border-width-xs",sm:"--border-width-sm",md:"--border-width-md",lg:"--border-width-lg",xl:"--border-width-xl"},Z={bgc:{pr:`
329
+ background-color: var(--primary);
330
+ `,se:`
331
+ background-color: var(--secondary);
332
+ `,de:`
333
+ background-color: var(--destructive);
334
+ `,fg:`
335
+ background-color: var(--foreground);
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,149 +365,172 @@ 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`
362
- slot {
363
- display: contents;
364
- }
365
- :host {
366
- display: flex;
367
- align-self: auto;
368
- align-content: flex-start;
369
- flex-wrap: wrap;
370
- border-style: solid;
371
- border-width: 0;
372
- box-sizing: border-box;
373
- }
374
- :host([stretch]) {
375
- align-self: stretch;
376
- }
377
- ${M}
378
- ${wt}
379
- ${yt}
380
- ${R}
381
- ${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`
384
- <style>
385
- ${D(this._styles)}
386
- </style>
387
- <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`
439
- :host {
440
- display: block;
441
- }
442
- slot {
443
- display: contents;
444
- }
445
- :host ::slotted(a) {
446
- text-decoration: var(--anchor-text-decoration);
447
- color: var(--anchor-color);
448
- }
449
- :host ::slotted(a:hover) {
450
- text-decoration: var(--anchor-text-decoration-hover);
451
- color: var(--anchor-color-hover);
452
- }
453
- ${St}
454
- ${P}
455
- ${R}
456
- ${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`
458
- :host {
459
- border-style: solid;
460
- box-sizing: border-box;
461
- overflow: hidden;
462
- border-width: 0;
463
- }
464
- slot {
465
- display: contents;
466
- }
467
- :host([of="con"]) img {
468
- object-fit: contain;
469
- }
470
- :host([of="cov"]) img {
471
- object-fit: cover;
472
- }
473
- :host([of="none"]) img {
474
- object-fit: none;
475
- }
476
- img {
477
- height: 100%;
478
- width: 100%;
479
- }
480
- ${I}
481
- ${R}
482
- ${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`
484
- <style>
485
- ${D(this._styles)}
486
- </style>
487
- <img
488
- src="${this.getAttribute("src")}"
489
- width="${this.getAttribute("width")}"
490
- height="${this.getAttribute("height")}"
491
- />
492
- `}};var kt=v`
368
+ `},shadow:{sm:"--shadow-sm",md:"--shadow-md",lg:"--shadow-lg"},pt:o,pr:o,pb:o,pl:o,p:o,ph:o,pv:o,g:o,gv:o,gh:o,bw:w,bwt:w,bwr:w,bwb:w,bwl:w,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",sm:"--border-radius-sm",md:"--border-radius-md",lg:"--border-radius-lg",xl:"--border-radius-xl",f:"--border-radius-f"}},k=p(Z);var tt={mt:o,mr:o,mb:o,ml:o,m:o,mh:o,mv:o},x=p(tt);var C=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(n`
369
+ slot {
370
+ display: contents;
371
+ }
372
+ :host {
373
+ display: flex;
374
+ flex-direction: column;
375
+ align-self: auto;
376
+ align-content: flex-start;
377
+ border-style: solid;
378
+ border-width: 0;
379
+ box-sizing: border-box;
380
+ border-color: var(--border);
381
+ }
382
+
383
+ :host([fw="w"]) {
384
+ flex-wrap: wrap;
385
+ }
386
+
387
+ ${b}
388
+ ${L}
389
+ ${H}
390
+ ${x}
391
+ ${f}
392
+ ${k}
393
+ ${y}
394
+
395
+ :host([href]) {
396
+ cursor: pointer;
397
+ position: relative;
398
+ }
399
+
400
+ :host([href]) a {
401
+ position: absolute;
402
+ top: 0;
403
+ left: 0;
404
+ right: 0;
405
+ bottom: 0;
406
+ z-index: 1;
407
+ }
408
+ `))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._styleElement=document.createElement("style"),this._slotElement=document.createElement("slot"),this._linkElement=null,this.shadow.appendChild(this._styleElement),this._updateDOM()}static get observedAttributes(){return["href","target",..._([...S,"wh","w","h","hidden","sh","sv"])]}_styles={default:{},sm:{},md:{},lg:{},xl:{}};_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),i=this.getAttribute("target");this._slotElement.parentNode!==this.shadow&&this.shadow.appendChild(this._slotElement),t?(this._linkElement||(this._linkElement=document.createElement("a"),this.shadow.appendChild(this._linkElement)),this._linkElement.href=t,i?this._linkElement.target=i:this._linkElement.removeAttribute("target")):this._linkElement&&(this.shadow.removeChild(this._linkElement),this._linkElement=null)}attributeChangedCallback(t,i,r){if(t==="href"||t==="target"){this._updateDOM();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(s=>{let l=v=>`${s==="default"?"":`${s}-`}${v}`,h=this.getAttribute(l("wh")),c=g(h===null?this.getAttribute(l("w")):h),d=g(h===null?this.getAttribute(l("h")):h),m=this.getAttribute(l("op")),u=this.getAttribute(l("z"));u!==null&&(this._styles[s]["z-index"]=u),m!==null&&(this._styles[s].opacity=m),c==="f"?this._styles[s].width="var(--width-stretch)":c!==void 0&&(this._styles[s].width=c,this._styles[s]["min-width"]=c,this._styles[s]["max-width"]=c),d==="f"?this._styles[s].height="100%":d!==void 0&&(this._styles[s].height=d,this._styles[s]["min-height"]=d,this._styles[s]["max-height"]=d),this.hasAttribute(l("hidden"))&&(this._styles[s].display="none !important"),this.hasAttribute(l("visible"))&&(this._styles[s].display="flex !important")});let a=E(this._styles);a!==this._lastStyleString&&(this._styleElement.textContent=a,this._lastStyleString=a)}},V=({render:e,html:t})=>C;var et={ta:{s:"start",c:"center",e:"end",j:"justify"},s:{h1:`
409
+ font-size: var(--h1-font-size);
410
+ font-weight: var(--h1-font-weight);
411
+ line-height: var(--h1-line-height);
412
+ letter-spacing: var(--h1-letter-spacing);
413
+ `,h2:`
414
+ font-size: var(--h2-font-size);
415
+ font-weight: var(--h2-font-weight);
416
+ line-height: var(--h2-line-height);
417
+ letter-spacing: var(--h2-letter-spacing);
418
+ `,h3:`
419
+ font-size: var(--h3-font-size);
420
+ font-weight: var(--h3-font-weight);
421
+ line-height: var(--h3-line-height);
422
+ letter-spacing: var(--h3-letter-spacing);
423
+ `,h4:`
424
+ font-size: var(--h4-font-size);
425
+ font-weight: var(--h4-font-weight);
426
+ line-height: var(--h4-line-height);
427
+ letter-spacing: var(--h4-letter-spacing);
428
+ `,lg:`
429
+ font-size: var(--lg-font-size);
430
+ font-weight: var(--lg-font-weight);
431
+ line-height: var(--lg-line-height);
432
+ letter-spacing: var(--lg-letter-spacing);
433
+ `,md:`
434
+ font-size: var(--md-font-size);
435
+ font-weight: var(--md-font-weight);
436
+ line-height: var(--md-line-height);
437
+ letter-spacing: var(--md-letter-spacing);
438
+ `,sm:`
439
+ font-size: var(--sm-font-size);
440
+ font-weight: var(--sm-font-weight);
441
+ line-height: var(--sm-line-height);
442
+ letter-spacing: var(--sm-letter-spacing);
443
+ `,xs:`
444
+ font-size: var(--xs-font-size);
445
+ font-weight: var(--xs-font-weight);
446
+ line-height: var(--xs-line-height);
447
+ letter-spacing: var(--xs-letter-spacing);
448
+ `}},N=p(et);var it={c:{fg:"--foreground",de:"--destructive","pr-fg":"--primary-foreground","se-fg":"--secondary-foreground","mu-fg":"--muted-foreground","ac-fg":"--accent-foreground"}},$=p(it);var z=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(n`
449
+ :host {
450
+ display: block;
451
+ font-size: var(--md-font-size);
452
+ font-weight: var(--md-font-weight);
453
+ line-height: var(--md-line-height);
454
+ letter-spacing: var(--md-letter-spacing);
455
+ }
456
+ slot {
457
+ display: contents;
458
+ }
459
+ :host ::slotted(a) {
460
+ text-decoration: var(--anchor-text-decoration);
461
+ color: var(--anchor-color);
462
+ }
463
+ :host ::slotted(a:hover) {
464
+ text-decoration: var(--anchor-text-decoration-hover);
465
+ color: var(--anchor-color-hover);
466
+ }
467
+ :host([href]) {
468
+ cursor: pointer;
469
+ position: relative;
470
+ }
471
+ :host([href]) a {
472
+ position: absolute;
473
+ top: 0;
474
+ left: 0;
475
+ right: 0;
476
+ bottom: 0;
477
+ z-index: 1;
478
+ }
479
+ ${N}
480
+ ${$}
481
+ ${x}
482
+ ${f}
483
+ `))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._slotElement=document.createElement("slot"),this._linkElement=null,this._updateDOM()}static get observedAttributes(){return["key","w","ellipsis","href","target"]}connectedCallback(){this._updateStyling(),this._updateDOM()}attributeChangedCallback(t,i,r){t==="href"||t==="target"?this._updateDOM():this._updateStyling()}_updateStyling(){let t=g(this.getAttribute("w"));this.hasAttribute("ellipsis")?(this.style.overflow="hidden",this.style.textOverflow="ellipsis",this.style.whiteSpace="nowrap"):(this.style.overflow="",this.style.textOverflow="",this.style.whiteSpace=""),t==="f"?this.style.width="var(--width-stretch)":t!==void 0?this.style.width=t:this.style.width=""}_updateDOM(){let t=this.getAttribute("href"),i=this.getAttribute("target");this._slotElement.parentNode!==this.shadow&&this.shadow.appendChild(this._slotElement),t?(this._linkElement||(this._linkElement=document.createElement("a"),this.shadow.appendChild(this._linkElement)),this._linkElement.href=t,i?this._linkElement.target=i:this._linkElement.removeAttribute("target")):this._linkElement&&(this.shadow.removeChild(this._linkElement),this._linkElement=null)}},U=({render:e,html:t})=>z;var M=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(n`
484
+ :host {
485
+ border-style: solid;
486
+ box-sizing: border-box;
487
+ overflow: hidden;
488
+ border-width: 0;
489
+ }
490
+ slot {
491
+ display: contents;
492
+ }
493
+ :host([of="con"]) img {
494
+ object-fit: contain;
495
+ }
496
+ :host([of="cov"]) img {
497
+ object-fit: cover;
498
+ }
499
+ :host([of="none"]) img {
500
+ object-fit: none;
501
+ }
502
+ img {
503
+ height: 100%;
504
+ width: 100%;
505
+ }
506
+
507
+ ${y}
508
+
509
+ a {
510
+ display: block;
511
+ height: 100%;
512
+ width: 100%;
513
+ }
514
+
515
+ :host([href]) {
516
+ cursor: pointer;
517
+ }
518
+
519
+ ${k}
520
+ ${x}
521
+ ${f}
522
+ `))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._styleElement=document.createElement("style"),this._imgElement=document.createElement("img"),this._linkElement=null,this.shadow.appendChild(this._styleElement),this._updateDOM()}static get observedAttributes(){return _([...S,"key","src","href","target","wh","w","h","hidden","height","width"])}_styles={default:{},sm:{},md:{},lg:{},xl:{}};_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),i=this.getAttribute("target");t?(this._linkElement||(this._linkElement=document.createElement("a")),this._linkElement.href=t,i?this._linkElement.target=i:this._linkElement.removeAttribute("target"),this._linkElement.appendChild(this._imgElement),this._linkElement.parentNode!==this.shadow&&this.shadow.appendChild(this._linkElement)):this._linkElement?(this._imgElement.parentNode===this._linkElement&&this.shadow.appendChild(this._imgElement),this._linkElement.parentNode===this.shadow&&this.shadow.removeChild(this._linkElement),this._linkElement=null):this._imgElement.parentNode!==this.shadow&&this.shadow.appendChild(this._imgElement)}attributeChangedCallback(t,i,r){if(t==="href"||t==="target"){this._updateDOM();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(s=>{let l=v=>`${s==="default"?"":`${s}-`}${v}`,h=this.getAttribute(l("wh")),c=g(h===null?this.getAttribute(l("w")):h),d=g(h===null?this.getAttribute(l("h")):h),m=this.getAttribute(l("o")),u=this.getAttribute(l("z"));u!==null&&(this._styles[s]["z-index"]=u),m!==null&&(this._styles[s].opacity=m),c==="f"?this._styles[s].width="var(--width-stretch)":c!==void 0&&(this._styles[s].width=c,this._styles[s]["min-width"]=c,this._styles[s]["max-width"]=c),d==="f"?this._styles[s].height="100%":d!==void 0&&(this._styles[s].height=d,this._styles[s]["min-height"]=d,this._styles[s]["max-height"]=d),this.hasAttribute(l("hidden"))&&(this._styles[s].display="none !important"),this.hasAttribute(l("visible"))&&(this._styles[s].display="block !important")});let a=E(this._styles);a!==this._lastStyleString&&(this._styleElement.textContent=a,this._lastStyleString=a),this._updateImageAttributes()}_updateImageAttributes(){let t=this.getAttribute("src"),i=this.getAttribute("width"),r=this.getAttribute("height");t!==null&&this._imgElement.setAttribute("src",t),i!==null&&this._imgElement.setAttribute("width",i),r!==null&&this._imgElement.setAttribute("height",r)}connectedCallback(){this._updateImageAttributes()}},P=({render:e,html:t})=>M;var K=n`
493
523
  :host([pt="xs"]) svg {
494
524
  padding-top: var(--spacing-xs);
495
525
  }
496
- :host([pt="s"]) svg {
497
- padding-top: var(--spacing-s);
526
+ :host([pt="sm"]) svg {
527
+ padding-top: var(--spacing-sm);
498
528
  }
499
- :host([pt="m"]) svg {
500
- padding-top: var(--spacing-m);
529
+ :host([pt="md"]) svg {
530
+ padding-top: var(--spacing-md);
501
531
  }
502
- :host([pt="l"]) svg {
503
- padding-top: var(--spacing-l);
532
+ :host([pt="lg"]) svg {
533
+ padding-top: var(--spacing-lg);
504
534
  }
505
535
  :host([pt="xl"]) svg {
506
536
  padding-top: var(--spacing-xl);
@@ -508,14 +538,14 @@ ${S}
508
538
  :host([pr="xs"]) svg {
509
539
  padding-right: var(--spacing-xs);
510
540
  }
511
- :host([pr="s"]) svg {
512
- padding-right: var(--spacing-s);
541
+ :host([pr="sm"]) svg {
542
+ padding-right: var(--spacing-sm);
513
543
  }
514
- :host([pr="m"]) svg {
515
- padding-right: var(--spacing-m);
544
+ :host([pr="md"]) svg {
545
+ padding-right: var(--spacing-md);
516
546
  }
517
- :host([pr="l"]) svg {
518
- padding-right: var(--spacing-l);
547
+ :host([pr="lg"]) svg {
548
+ padding-right: var(--spacing-lg);
519
549
  }
520
550
  :host([pr="xl"]) svg {
521
551
  padding-right: var(--spacing-xl);
@@ -523,14 +553,14 @@ ${S}
523
553
  :host([pb="xs"]) svg {
524
554
  padding-bottom: var(--spacing-xs);
525
555
  }
526
- :host([pb="s"]) svg {
527
- padding-bottom: var(--spacing-s);
556
+ :host([pb="sm"]) svg {
557
+ padding-bottom: var(--spacing-sm);
528
558
  }
529
- :host([pb="m"]) svg {
530
- padding-bottom: var(--spacing-m);
559
+ :host([pb="md"]) svg {
560
+ padding-bottom: var(--spacing-md);
531
561
  }
532
- :host([pb="l"]) svg {
533
- padding-bottom: var(--spacing-l);
562
+ :host([pb="lg"]) svg {
563
+ padding-bottom: var(--spacing-lg);
534
564
  }
535
565
  :host([pb="xl"]) svg {
536
566
  padding-bottom: var(--spacing-xl);
@@ -538,14 +568,14 @@ ${S}
538
568
  :host([pl="xs"]) svg {
539
569
  padding-left: var(--spacing-xs);
540
570
  }
541
- :host([pl="s"]) svg {
542
- padding-left: var(--spacing-s);
571
+ :host([pl="sm"]) svg {
572
+ padding-left: var(--spacing-sm);
543
573
  }
544
- :host([pl="m"]) svg {
545
- padding-left: var(--spacing-m);
574
+ :host([pl="md"]) svg {
575
+ padding-left: var(--spacing-md);
546
576
  }
547
- :host([pl="l"]) svg {
548
- padding-left: var(--spacing-l);
577
+ :host([pl="lg"]) svg {
578
+ padding-left: var(--spacing-lg);
549
579
  }
550
580
  :host([pl="xl"]) svg {
551
581
  padding-left: var(--spacing-xl);
@@ -553,14 +583,14 @@ ${S}
553
583
  :host([p="xs"]) svg {
554
584
  padding: var(--spacing-xs);
555
585
  }
556
- :host([p="s"]) svg {
557
- padding: var(--spacing-s);
586
+ :host([p="sm"]) svg {
587
+ padding: var(--spacing-sm);
558
588
  }
559
- :host([p="m"]) svg {
560
- padding: var(--spacing-m);
589
+ :host([p="md"]) svg {
590
+ padding: var(--spacing-md);
561
591
  }
562
- :host([p="l"]) svg {
563
- padding: var(--spacing-l);
592
+ :host([p="lg"]) svg {
593
+ padding: var(--spacing-lg);
564
594
  }
565
595
  :host([p="xl"]) svg {
566
596
  padding: var(--spacing-xl);
@@ -569,17 +599,17 @@ ${S}
569
599
  padding-left: var(--spacing-xs);
570
600
  padding-right: var(--spacing-xs);
571
601
  }
572
- :host([ph="s"]) svg {
573
- padding-left: var(--spacing-s);
574
- padding-right: var(--spacing-s);
602
+ :host([ph="sm"]) svg {
603
+ padding-left: var(--spacing-sm);
604
+ padding-right: var(--spacing-sm);
575
605
  }
576
- :host([ph="m"]) svg {
577
- padding-left: var(--spacing-m);
578
- padding-right: var(--spacing-m);
606
+ :host([ph="md"]) svg {
607
+ padding-left: var(--spacing-md);
608
+ padding-right: var(--spacing-md);
579
609
  }
580
- :host([ph="l"]) svg {
581
- padding-left: var(--spacing-l);
582
- padding-right: var(--spacing-l);
610
+ :host([ph="lg"]) svg {
611
+ padding-left: var(--spacing-lg);
612
+ padding-right: var(--spacing-lg);
583
613
  }
584
614
  :host([ph="xl"]) svg {
585
615
  padding-left: var(--spacing-xl);
@@ -589,26 +619,28 @@ ${S}
589
619
  padding-top: var(--spacing-xs);
590
620
  padding-bottom: var(--spacing-xs);
591
621
  }
592
- :host([pv="s"]) svg {
593
- padding-top: var(--spacing-s);
594
- padding-bottom: var(--spacing-s);
622
+ :host([pv="sm"]) svg {
623
+ padding-top: var(--spacing-sm);
624
+ padding-bottom: var(--spacing-sm);
595
625
  }
596
- :host([pv="m"]) svg {
597
- padding-top: var(--spacing-m);
598
- padding-bottom: var(--spacing-m);
626
+ :host([pv="md"]) svg {
627
+ padding-top: var(--spacing-md);
628
+ padding-bottom: var(--spacing-md);
599
629
  }
600
- :host([pv="l"]) svg {
601
- padding-top: var(--spacing-l);
602
- padding-bottom: var(--spacing-l);
630
+ :host([pv="lg"]) svg {
631
+ padding-top: var(--spacing-lg);
632
+ padding-bottom: var(--spacing-lg);
603
633
  }
604
634
  :host([pv="xl"]) svg {
605
635
  padding-top: var(--spacing-xl);
606
636
  padding-bottom: var(--spacing-xl);
607
637
  }
608
- `;var At=({render:e,html:t})=>{let o=new CSSStyleSheet;return o.replaceSync(v`
609
- ${P}
610
- ${kt}
611
- ${M}
612
- ${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:_}));})();
614
- /*! (c) Andrea Giammarchi - MIT */
638
+ `;var j=class e extends HTMLElement{static styleSheet=null;static _icons={};static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(n`
639
+ :host {
640
+ color: var(--foreground);
641
+ }
642
+ ${$}
643
+ ${K}
644
+ ${b}
645
+ ${f}
646
+ `))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet]}static get observedAttributes(){return["key","svg","w","h","wh"]}static get icons(){return e._icons}static addIcon(t,i){e._icons[t]=i}connectedCallback(){this._updateSizing(),this._render()}attributeChangedCallback(t,i,r){this._updateSizing(),this._render()}_updateSizing(){let t=this.getAttribute("wh"),i=g(t===null?this.getAttribute("w"):t),r=g(t===null?this.getAttribute("h"):t);i&&(this.style.width=i),r&&(this.style.height=r)}_render(){try{let t=this.getAttribute("svg"),i=e._icons[t]||(window.rtglIcons||{})[t];if(i){this.shadow.innerHTML=i;return}}catch(t){console.log("error in rtgl-svg render",t)}this.shadow.innerHTML=""}},Q=({render:e,html:t})=>j;customElements.define("rtgl-button",I({}));customElements.define("rtgl-view",V({}));customElements.define("rtgl-text",U({}));customElements.define("rtgl-image",P({}));customElements.define("rtgl-svg",Q({}));})();