rettangoli-ui 0.0.7 → 0.0.8-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.
- package/dist/rettangoli-ui.min.js +274 -779
- package/package.json +9 -4
- package/dist/rettangoli-ui.min.js.map +0 -7
@@ -1,120 +1,24 @@
|
|
1
|
-
var
|
2
|
-
:host([
|
3
|
-
|
4
|
-
}
|
5
|
-
:host([
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
}
|
11
|
-
|
12
|
-
|
13
|
-
}
|
14
|
-
|
15
|
-
|
16
|
-
}
|
17
|
-
|
18
|
-
|
19
|
-
}
|
20
|
-
|
21
|
-
|
22
|
-
}
|
23
|
-
:host([mr="m"]) {
|
24
|
-
margin-right: var(--spacing-m);
|
25
|
-
}
|
26
|
-
:host([mr="l"]) {
|
27
|
-
margin-right: var(--spacing-l);
|
28
|
-
}
|
29
|
-
:host([mr="xl"]) {
|
30
|
-
margin-right: var(--spacing-xl);
|
31
|
-
}
|
32
|
-
:host([mb="xs"]) {
|
33
|
-
margin-bottom: var(--spacing-xs);
|
34
|
-
}
|
35
|
-
:host([mb="s"]) {
|
36
|
-
margin-bottom: var(--spacing-s);
|
37
|
-
}
|
38
|
-
:host([mb="m"]) {
|
39
|
-
margin-bottom: var(--spacing-m);
|
40
|
-
}
|
41
|
-
:host([mb="l"]) {
|
42
|
-
margin-bottom: var(--spacing-l);
|
43
|
-
}
|
44
|
-
:host([mb="xl"]) {
|
45
|
-
margin-bottom: var(--spacing-xl);
|
46
|
-
}
|
47
|
-
:host([ml="xs"]) {
|
48
|
-
margin-left: var(--spacing-xs);
|
49
|
-
}
|
50
|
-
:host([ml="s"]) {
|
51
|
-
margin-left: var(--spacing-s);
|
52
|
-
}
|
53
|
-
:host([ml="m"]) {
|
54
|
-
margin-left: var(--spacing-m);
|
55
|
-
}
|
56
|
-
:host([ml="l"]) {
|
57
|
-
margin-left: var(--spacing-l);
|
58
|
-
}
|
59
|
-
:host([ml="xl"]) {
|
60
|
-
margin-left: var(--spacing-xl);
|
61
|
-
}
|
62
|
-
:host([m="xs"]) {
|
63
|
-
margin: var(--spacing-xs);
|
64
|
-
}
|
65
|
-
:host([m="s"]) {
|
66
|
-
margin: var(--spacing-s);
|
67
|
-
}
|
68
|
-
:host([m="m"]) {
|
69
|
-
margin: var(--spacing-m);
|
70
|
-
}
|
71
|
-
:host([m="l"]) {
|
72
|
-
margin: var(--spacing-l);
|
73
|
-
}
|
74
|
-
:host([m="xl"]) {
|
75
|
-
margin: var(--spacing-xl);
|
76
|
-
}
|
77
|
-
:host([mh="xs"]) {
|
78
|
-
margin-left: var(--spacing-xs);
|
79
|
-
margin-right: var(--spacing-xs);
|
80
|
-
}
|
81
|
-
:host([mh="s"]) {
|
82
|
-
margin-left: var(--spacing-s);
|
83
|
-
margin-right: var(--spacing-s);
|
84
|
-
}
|
85
|
-
:host([mh="m"]) {
|
86
|
-
margin-left: var(--spacing-m);
|
87
|
-
margin-right: var(--spacing-m);
|
88
|
-
}
|
89
|
-
:host([mh="l"]) {
|
90
|
-
margin-left: var(--spacing-l);
|
91
|
-
margin-right: var(--spacing-l);
|
92
|
-
}
|
93
|
-
:host([mh="xl"]) {
|
94
|
-
margin-left: var(--spacing-xl);
|
95
|
-
margin-right: var(--spacing-xl);
|
96
|
-
}
|
97
|
-
:host([mv="xs"]) {
|
98
|
-
margin-top: var(--spacing-xs);
|
99
|
-
margin-bottom: var(--spacing-xs);
|
100
|
-
}
|
101
|
-
:host([mv="s"]) {
|
102
|
-
margin-top: var(--spacing-s);
|
103
|
-
margin-bottom: var(--spacing-s);
|
104
|
-
}
|
105
|
-
:host([mv="m"]) {
|
106
|
-
margin-top: var(--spacing-m);
|
107
|
-
margin-bottom: var(--spacing-m);
|
108
|
-
}
|
109
|
-
:host([mv="l"]) {
|
110
|
-
margin-top: var(--spacing-l);
|
111
|
-
margin-bottom: var(--spacing-l);
|
112
|
-
}
|
113
|
-
:host([mv="xl"]) {
|
114
|
-
margin-top: var(--spacing-xl);
|
115
|
-
margin-bottom: var(--spacing-xl);
|
116
|
-
}
|
117
|
-
`;var y=p`
|
1
|
+
var rettangoli=(()=>{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+=`
|
2
|
+
:host([${c}="${u}"])${p}{
|
3
|
+
${x}
|
4
|
+
}
|
5
|
+
:host([${f}="${u}"]:hover)${p}{
|
6
|
+
${x}
|
7
|
+
}
|
8
|
+
`}else s+=`
|
9
|
+
:host([${c}="${u}"])${p}{
|
10
|
+
${h}
|
11
|
+
}
|
12
|
+
:host([${f}="${u}"]:hover)${p}{
|
13
|
+
${h}
|
14
|
+
}
|
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};
|
17
|
+
`);t+=`:host {
|
18
|
+
${r.trim()}
|
19
|
+
}
|
20
|
+
`,o!=="default"&&(t+=`}
|
21
|
+
`)}return t}var j=b`
|
118
22
|
:host([flex="0"]) {
|
119
23
|
flex: 0;
|
120
24
|
}
|
@@ -154,88 +58,21 @@ var rettangoliUi=(()=>{var{isArray:at}=Array,{getPrototypeOf:Ot,getOwnPropertyDe
|
|
154
58
|
:host([flex="12"]) {
|
155
59
|
flex: 12;
|
156
60
|
}
|
157
|
-
:
|
158
|
-
align-self: stretch;
|
159
|
-
}
|
160
|
-
:host([as="s"]) {
|
161
|
-
align-self: start;
|
162
|
-
}
|
163
|
-
:host([as="c"]) {
|
164
|
-
align-self: center;
|
165
|
-
}
|
166
|
-
:host([as="e"]) {
|
167
|
-
align-self: end;
|
168
|
-
}
|
169
|
-
|
170
|
-
|
171
|
-
/*
|
172
|
-
:host([sha="s"]) {
|
173
|
-
margin-right: auto;
|
174
|
-
}
|
175
|
-
:host([sha="c"]) {
|
176
|
-
margin-left: auto;
|
177
|
-
margin-right: auto;
|
178
|
-
}
|
179
|
-
:host([sha="e"]) {
|
180
|
-
margin-left: auto;
|
181
|
-
}
|
182
|
-
|
183
|
-
:host([sva="s"]) {
|
184
|
-
margin-bottom: auto;
|
185
|
-
}
|
186
|
-
:host([sva="c"]) {
|
187
|
-
margin-top: auto;
|
188
|
-
margin-bottom: auto;
|
189
|
-
}
|
190
|
-
:host([sva="e"]) {
|
191
|
-
margin-top: auto;
|
192
|
-
} */
|
193
|
-
|
194
|
-
|
195
|
-
/*
|
196
|
-
:host([d="h"][sha="s"]) {
|
197
|
-
align-self: start;
|
198
|
-
}
|
199
|
-
:host([d="h"][sha="c"]) {
|
200
|
-
align-self: center;
|
201
|
-
}
|
202
|
-
:host([d="h"][sha="e"]) {
|
203
|
-
align-self: flex-end;
|
204
|
-
}
|
205
|
-
:host([d="v"][sha="s"]) {
|
206
|
-
}
|
207
|
-
:host([d="v"][sha="c"]) {
|
208
|
-
}
|
209
|
-
:host([d="v"][sha="e"]) {
|
210
|
-
}
|
211
|
-
|
212
|
-
:host([d="h"][sva="s"]) {
|
213
|
-
}
|
214
|
-
:host([d="h"][sva="c"]) {
|
215
|
-
}
|
216
|
-
:host([d="h"][sva="e"]) {
|
217
|
-
}
|
218
|
-
:host([d="v"][sva="s"]) {
|
219
|
-
}
|
220
|
-
:host([d="v"][sva="c"]) {
|
221
|
-
}
|
222
|
-
:host([d="v"][sva="e"]) {
|
223
|
-
}
|
224
|
-
*/
|
225
|
-
`;var ut=new CSSStyleSheet;ut.replaceSync(p`
|
61
|
+
`;var ne={mt:"margin-top",mr:"margin-right",mb:"margin-bottom",ml:"margin-left",m:"margin",mh:"margin-left margin-right",mv:"margin-top margin-bottom"},ie={mt:g,mr:g,mb:g,ml:g,m:g,mh:g,mv:g},ae={mt:"button",mr:"button",mb:"button",ml:"button",m:"button",mh:"button",mv:"button"},xt=w(ne,ie,ae);var St=new CSSStyleSheet;St.replaceSync(b`
|
226
62
|
:host {
|
227
|
-
display:
|
63
|
+
display: contents;
|
228
64
|
}
|
229
|
-
|
230
65
|
slot {
|
231
|
-
display:
|
232
|
-
flex: 1;
|
233
|
-
justify-content: center;
|
66
|
+
display: contents;
|
234
67
|
}
|
235
68
|
|
236
69
|
button {
|
237
|
-
flex: 1;
|
238
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);
|
239
76
|
}
|
240
77
|
|
241
78
|
button:hover {
|
@@ -334,42 +171,38 @@ var rettangoliUi=(()=>{var{isArray:at}=Array,{getPrototypeOf:Ot,getOwnPropertyDe
|
|
334
171
|
:host([t="ss"]) button,
|
335
172
|
:host([t="es"]) button,
|
336
173
|
:host([t="ns"]) button {
|
337
|
-
|
338
|
-
padding-
|
339
|
-
padding-
|
340
|
-
|
341
|
-
border-width: 2px;
|
342
|
-
border-radius: 1px;
|
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);
|
343
178
|
}
|
344
179
|
|
345
180
|
:host([t="p"]) button,
|
346
181
|
:host([t="s"]) button,
|
347
182
|
:host([t="e"]) button,
|
348
183
|
:host([t="n"]) button {
|
349
|
-
|
350
|
-
padding-
|
351
|
-
padding-
|
352
|
-
|
353
|
-
border-width: 4px;
|
354
|
-
border-radius: 2px;
|
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);
|
355
188
|
}
|
356
189
|
|
357
190
|
:host([t="pl"]) button,
|
358
191
|
:host([t="sl"]) button,
|
359
192
|
:host([t="el"]) button,
|
360
193
|
:host([t="nl"]) button {
|
361
|
-
|
362
|
-
padding-
|
363
|
-
padding-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
${
|
371
|
-
${
|
372
|
-
`);var
|
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
|
+
${xt}
|
204
|
+
${j}
|
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`
|
373
206
|
<a
|
374
207
|
href=${this.getAttribute("href")}
|
375
208
|
target=${this.getAttribute("target")}
|
@@ -378,585 +211,286 @@ var rettangoliUi=(()=>{var{isArray:at}=Array,{getPrototypeOf:Ot,getOwnPropertyDe
|
|
378
211
|
<slot></slot>
|
379
212
|
</button>
|
380
213
|
</a>
|
381
|
-
`:
|
382
|
-
<button>
|
214
|
+
`:S`
|
215
|
+
<button ref=${this._assingRef}>
|
383
216
|
<slot></slot>
|
384
217
|
</button>
|
385
|
-
`}
|
386
|
-
|
387
|
-
|
388
|
-
}
|
389
|
-
:host([g="s"]) slot {
|
390
|
-
gap: var(--spacing-s);
|
391
|
-
}
|
392
|
-
:host([g="m"]) slot {
|
393
|
-
gap: var(--spacing-m);
|
394
|
-
}
|
395
|
-
:host([g="l"]) slot {
|
396
|
-
gap: var(--spacing-l);
|
397
|
-
}
|
398
|
-
:host([g="xl"]) slot {
|
399
|
-
gap: var(--spacing-xl);
|
400
|
-
}
|
401
|
-
:host([gv="xs"]) slot {
|
402
|
-
row-gap: var(--spacing-xs);
|
403
|
-
}
|
404
|
-
:host([gv="s"]) slot {
|
405
|
-
row-gap: var(--spacing-s);
|
406
|
-
}
|
407
|
-
:host([gv="m"]) slot {
|
408
|
-
row-gap: var(--spacing-m);
|
409
|
-
}
|
410
|
-
:host([gv="l"]) slot {
|
411
|
-
row-gap: var(--spacing-l);
|
412
|
-
}
|
413
|
-
:host([gv="xl"]) slot {
|
414
|
-
row-gap: var(--spacing-xl);
|
415
|
-
}
|
416
|
-
:host([gh="xs"]) slot {
|
417
|
-
column-gap: var(--spacing-xs);
|
418
|
-
}
|
419
|
-
:host([gh="s"]) slot {
|
420
|
-
column-gap: var(--spacing-s);
|
421
|
-
}
|
422
|
-
:host([gh="m"]) slot {
|
423
|
-
column-gap: var(--spacing-m);
|
424
|
-
}
|
425
|
-
:host([gh="l"]) slot {
|
426
|
-
column-gap: var(--spacing-l);
|
427
|
-
}
|
428
|
-
:host([gh="xl"]) slot {
|
429
|
-
column-gap: var(--spacing-xl);
|
430
|
-
}
|
431
|
-
`;var xt=p`
|
432
|
-
:host([pt="xs"]) slot {
|
433
|
-
padding-top: var(--spacing-xs);
|
434
|
-
}
|
435
|
-
:host([pt="s"]) slot {
|
436
|
-
padding-top: var(--spacing-s);
|
437
|
-
}
|
438
|
-
:host([pt="m"]) slot {
|
439
|
-
padding-top: var(--spacing-m);
|
440
|
-
}
|
441
|
-
:host([pt="l"]) slot {
|
442
|
-
padding-top: var(--spacing-l);
|
443
|
-
}
|
444
|
-
:host([pt="xl"]) slot {
|
445
|
-
padding-top: var(--spacing-xl);
|
446
|
-
}
|
447
|
-
:host([pr="xs"]) slot {
|
448
|
-
padding-right: var(--spacing-xs);
|
449
|
-
}
|
450
|
-
:host([pr="s"]) slot {
|
451
|
-
padding-right: var(--spacing-s);
|
452
|
-
}
|
453
|
-
:host([pr="m"]) slot {
|
454
|
-
padding-right: var(--spacing-m);
|
455
|
-
}
|
456
|
-
:host([pr="l"]) slot {
|
457
|
-
padding-right: var(--spacing-l);
|
458
|
-
}
|
459
|
-
:host([pr="xl"]) slot {
|
460
|
-
padding-right: var(--spacing-xl);
|
461
|
-
}
|
462
|
-
:host([pb="xs"]) slot {
|
463
|
-
padding-bottom: var(--spacing-xs);
|
464
|
-
}
|
465
|
-
:host([pb="s"]) slot {
|
466
|
-
padding-bottom: var(--spacing-s);
|
467
|
-
}
|
468
|
-
:host([pb="m"]) slot {
|
469
|
-
padding-bottom: var(--spacing-m);
|
470
|
-
}
|
471
|
-
:host([pb="l"]) slot {
|
472
|
-
padding-bottom: var(--spacing-l);
|
473
|
-
}
|
474
|
-
:host([pb="xl"]) slot {
|
475
|
-
padding-bottom: var(--spacing-xl);
|
476
|
-
}
|
477
|
-
:host([pl="xs"]) slot {
|
478
|
-
padding-left: var(--spacing-xs);
|
479
|
-
}
|
480
|
-
:host([pl="s"]) slot {
|
481
|
-
padding-left: var(--spacing-s);
|
482
|
-
}
|
483
|
-
:host([pl="m"]) slot {
|
484
|
-
padding-left: var(--spacing-m);
|
485
|
-
}
|
486
|
-
:host([pl="l"]) slot {
|
487
|
-
padding-left: var(--spacing-l);
|
488
|
-
}
|
489
|
-
:host([pl="xl"]) slot {
|
490
|
-
padding-left: var(--spacing-xl);
|
491
|
-
}
|
492
|
-
:host([p="xs"]) slot {
|
493
|
-
padding: var(--spacing-xs);
|
494
|
-
}
|
495
|
-
:host([p="s"]) slot {
|
496
|
-
padding: var(--spacing-s);
|
497
|
-
}
|
498
|
-
:host([p="m"]) slot {
|
499
|
-
padding: var(--spacing-m);
|
500
|
-
}
|
501
|
-
:host([p="l"]) slot {
|
502
|
-
padding: var(--spacing-l);
|
503
|
-
}
|
504
|
-
:host([p="xl"]) slot {
|
505
|
-
padding: var(--spacing-xl);
|
506
|
-
}
|
507
|
-
:host([ph="xs"]) slot {
|
508
|
-
padding-left: var(--spacing-xs);
|
509
|
-
padding-right: var(--spacing-xs);
|
510
|
-
}
|
511
|
-
:host([ph="s"]) slot {
|
512
|
-
padding-left: var(--spacing-s);
|
513
|
-
padding-right: var(--spacing-s);
|
514
|
-
}
|
515
|
-
:host([ph="m"]) slot {
|
516
|
-
padding-left: var(--spacing-m);
|
517
|
-
padding-right: var(--spacing-m);
|
518
|
-
}
|
519
|
-
:host([ph="l"]) slot {
|
520
|
-
padding-left: var(--spacing-l);
|
521
|
-
padding-right: var(--spacing-l);
|
522
|
-
}
|
523
|
-
:host([ph="xl"]) slot {
|
524
|
-
padding-left: var(--spacing-xl);
|
525
|
-
padding-right: var(--spacing-xl);
|
526
|
-
}
|
527
|
-
:host([pv="xs"]) slot {
|
528
|
-
padding-top: var(--spacing-xs);
|
529
|
-
padding-bottom: var(--spacing-xs);
|
530
|
-
}
|
531
|
-
:host([pv="s"]) slot {
|
532
|
-
padding-top: var(--spacing-s);
|
533
|
-
padding-bottom: var(--spacing-s);
|
534
|
-
}
|
535
|
-
:host([pv="m"]) slot {
|
536
|
-
padding-top: var(--spacing-m);
|
537
|
-
padding-bottom: var(--spacing-m);
|
538
|
-
}
|
539
|
-
:host([pv="l"]) slot {
|
540
|
-
padding-top: var(--spacing-l);
|
541
|
-
padding-bottom: var(--spacing-l);
|
542
|
-
}
|
543
|
-
:host([pv="xl"]) slot {
|
544
|
-
padding-top: var(--spacing-xl);
|
545
|
-
padding-bottom: var(--spacing-xl);
|
546
|
-
}
|
547
|
-
`;var yt=p`
|
548
|
-
:host([d="h"]) slot {
|
218
|
+
`},$t=tt;var Ct=b`
|
219
|
+
|
220
|
+
:host([d="h"]) {
|
549
221
|
flex-direction: row;
|
550
222
|
}
|
551
|
-
:host([d
|
223
|
+
:host(:not([d])) {
|
552
224
|
flex-direction: column;
|
553
225
|
}
|
554
|
-
:host([d="h"][ah
|
226
|
+
:host([d="h"]:not([ah])) {
|
555
227
|
justify-content: flex-start;
|
556
228
|
}
|
557
|
-
:host([d="h"][ah="c"])
|
229
|
+
:host([d="h"][ah="c"]) {
|
558
230
|
justify-content: center;
|
231
|
+
/* align-content: center; */
|
559
232
|
}
|
560
|
-
:host([d="h"][ah="e"])
|
233
|
+
:host([d="h"][ah="e"]) {
|
561
234
|
justify-content: flex-end;
|
562
235
|
}
|
563
|
-
:host([d="h"][av
|
236
|
+
:host([d="h"]:not([av])) {
|
564
237
|
align-items: flex-start;
|
565
238
|
}
|
566
|
-
:host([d="h"][av="c"])
|
239
|
+
:host([d="h"][av="c"]) {
|
567
240
|
align-items: center;
|
241
|
+
align-content: center;
|
568
242
|
}
|
569
|
-
:host([d="h"][av="e"])
|
243
|
+
:host([d="h"][av="e"]) {
|
570
244
|
align-items: flex-end;
|
245
|
+
align-content: flex-end;
|
571
246
|
}
|
572
|
-
:host([d
|
247
|
+
:host(:not([d]):not([ah])) {
|
573
248
|
align-items: flex-start;
|
574
249
|
}
|
575
|
-
:host([d
|
250
|
+
:host(:not([d])[ah="c"]) {
|
576
251
|
align-items: center;
|
252
|
+
align-content: center;
|
577
253
|
}
|
578
|
-
:host([d
|
254
|
+
:host(:not([d])[ah="e"]) {
|
579
255
|
align-items: flex-end;
|
256
|
+
align-content: flex-end;
|
580
257
|
}
|
581
|
-
:host([d
|
258
|
+
:host(:not([d]):not([av])) {
|
582
259
|
justify-content: flex-start;
|
583
260
|
}
|
584
|
-
:host([d
|
261
|
+
:host(:not([d])[av="c"]) {
|
585
262
|
justify-content: center;
|
586
263
|
}
|
587
|
-
:host([d
|
264
|
+
:host(:not([d])[av="e"]) {
|
588
265
|
justify-content: flex-end;
|
589
266
|
}
|
590
|
-
|
591
|
-
:host([
|
267
|
+
@media screen and (max-width: 640px) {
|
268
|
+
:host([s-d="v"]) {
|
269
|
+
flex-direction: column;
|
270
|
+
}
|
271
|
+
:host([s-d="h"]) {
|
272
|
+
flex-direction: row;
|
273
|
+
}
|
274
|
+
:host([s-d="h"][s-av="c"]) {
|
275
|
+
align-items: center;
|
276
|
+
align-content: center;
|
277
|
+
}
|
278
|
+
:host([s-d="v"][s-av="c"]) {
|
279
|
+
justify-content: center;
|
280
|
+
}
|
281
|
+
}
|
282
|
+
`;var le={cur:"cursor"},he={cur:{p:"pointer",m:"move",grab:"grab",grabbing:"grabbing"}},C=w(le,he);var kt=b`
|
283
|
+
:host([sh]:not([sv])) {
|
284
|
+
overflow-x: scroll;
|
285
|
+
flex-wrap: nowrap;
|
286
|
+
}
|
287
|
+
:host([sv]:not([sh])) {
|
288
|
+
overflow-y: scroll;
|
289
|
+
flex-wrap: nowrap;
|
290
|
+
}
|
291
|
+
:host([sh][sv]) {
|
292
|
+
overflow: scroll;
|
293
|
+
flex-wrap: nowrap;
|
294
|
+
}
|
295
|
+
:host([overflow="hidden"]) {
|
296
|
+
overflow: hidden;
|
297
|
+
flex-wrap: nowrap;
|
298
|
+
}
|
299
|
+
|
300
|
+
`;var T={xs:"--border-width-xs",s:"--border-width-s",m:"--border-width-m",l:"--border-width-l",xl:"--border-width-xl"},ce={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"},de={bgc:{p:`
|
592
301
|
background-color: var(--color-primary);
|
593
|
-
|
594
|
-
|
302
|
+
color: var(--color-on-primary);
|
303
|
+
`,pc:`
|
595
304
|
background-color: var(--color-primary-container);
|
596
|
-
|
597
|
-
|
305
|
+
color: var(--color-on-primary-container);
|
306
|
+
`,s:`
|
598
307
|
background-color: var(--color-secondary);
|
599
|
-
|
600
|
-
|
308
|
+
color: var(--color-on-secondary);
|
309
|
+
`,sc:`
|
601
310
|
background-color: var(--color-secondary-container);
|
602
|
-
|
603
|
-
|
311
|
+
color: var(--color-on-secondary-container);
|
312
|
+
`,e:`
|
604
313
|
background-color: var(--color-error);
|
605
|
-
|
606
|
-
|
314
|
+
color: var(--color-on-error);
|
315
|
+
`,ec:`
|
607
316
|
background-color: var(--color-error-container);
|
608
|
-
|
609
|
-
|
317
|
+
color: var(--color-on-error-container);
|
318
|
+
`,su:`
|
610
319
|
background-color: var(--color-surface);
|
611
|
-
|
612
|
-
|
320
|
+
color: var(--color-on-surface);
|
321
|
+
`,sucl:`
|
613
322
|
background-color: var(--color-surface-container-low);
|
614
|
-
|
615
|
-
|
323
|
+
color: var(--color-on-surface);
|
324
|
+
`,suc:`
|
616
325
|
background-color: var(--color-surface-container);
|
617
|
-
|
618
|
-
|
326
|
+
color: var(--color-on-surface);
|
327
|
+
`,such:`
|
619
328
|
background-color: var(--color-surface-container-high);
|
620
|
-
|
621
|
-
|
329
|
+
color: var(--color-on-surface);
|
330
|
+
`,isu:`
|
622
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);
|
337
|
+
`},pos:{rel:"relative",abs:"absolute",fix:"fixed"},cor:{full:`
|
338
|
+
top: 0;
|
339
|
+
right: 0;
|
340
|
+
bottom: 0;
|
341
|
+
left: 0;
|
342
|
+
height: 100%;
|
343
|
+
`,top:`
|
344
|
+
top: 0;
|
345
|
+
right: 0;
|
346
|
+
left: 0;
|
347
|
+
`,right:`
|
348
|
+
top: 0;
|
349
|
+
right: 0;
|
350
|
+
bottom: 0;
|
351
|
+
height: 100%;
|
352
|
+
`,bottom:`
|
353
|
+
right: 0;
|
354
|
+
bottom: 0;
|
355
|
+
left: 0;
|
356
|
+
`,left:`
|
357
|
+
bottom: 0;
|
358
|
+
left: 0;
|
359
|
+
top: 0;
|
360
|
+
height: 100%;
|
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},M=w(pe,ge);var At=new CSSStyleSheet;At.replaceSync(b`
|
362
|
+
slot {
|
363
|
+
display: contents;
|
623
364
|
}
|
624
|
-
:host
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
}
|
633
|
-
:host([h-bgc="sc"]:hover) {
|
634
|
-
background-color: var(--color-secondary-container);
|
635
|
-
}
|
636
|
-
:host([h-bgc="e"]:hover) {
|
637
|
-
background-color: var(--color-error);
|
638
|
-
}
|
639
|
-
:host([h-bgc="ec"]:hover) {
|
640
|
-
background-color: var(--color-error-container);
|
641
|
-
}
|
642
|
-
:host([h-bgc="su"]:hover) {
|
643
|
-
background-color: var(--color-surface);
|
644
|
-
}
|
645
|
-
:host([h-bgc="sucl"]:hover) {
|
646
|
-
background-color: var(--color-surface-container-low);
|
647
|
-
}
|
648
|
-
:host([h-bgc="suc"]:hover) {
|
649
|
-
background-color: var(--color-surface-container);
|
650
|
-
}
|
651
|
-
:host([h-bgc="such"]:hover) {
|
652
|
-
background-color: var(--color-surface-container-high);
|
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;
|
653
373
|
}
|
654
|
-
:host([
|
655
|
-
|
374
|
+
:host([stretch]) {
|
375
|
+
align-self: stretch;
|
656
376
|
}
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
}
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
}
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
:
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
:
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
:
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
377
|
+
${j}
|
378
|
+
${kt}
|
379
|
+
${Ct}
|
380
|
+
${M}
|
381
|
+
${C}
|
382
|
+
${P}
|
383
|
+
`);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`
|
384
|
+
<style>
|
385
|
+
${D(this._styles)}
|
386
|
+
</style>
|
387
|
+
<slot></slot> `},_t=et;var ue={at:"text-align"},fe={at:{c:"center",e:"right",j:"justify"},s:{dm:`
|
388
|
+
font-size: var(--typography-display-m-font-size);
|
389
|
+
font-weight: var(--typography-display-m-font-weight);
|
390
|
+
line-height: var(--typography-display-m-line-height);
|
391
|
+
letter-spacing: var(--typography-display-m-letter-spacing);
|
392
|
+
`,hm:`
|
393
|
+
font-size: var(--typography-headline-m-font-size);
|
394
|
+
font-weight: var(--typography-headline-m-font-weight);
|
395
|
+
line-height: var(--typography-headline-m-line-height);
|
396
|
+
letter-spacing: var(--typography-headline-m-letter-spacing);
|
397
|
+
`,tl:`
|
398
|
+
font-size: var(--typography-title-l-font-size);
|
399
|
+
font-weight: var(--typography-title-l-font-weight);
|
400
|
+
line-height: var(--typography-title-l-line-height);
|
401
|
+
letter-spacing: var(--typography-title-l-letter-spacing);
|
402
|
+
`,tm:`
|
403
|
+
font-size: var(--typography-title-m-font-size);
|
404
|
+
font-weight: var(--typography-title-m-font-weight);
|
405
|
+
line-height: var(--typography-title-m-line-height);
|
406
|
+
letter-spacing: var(--typography-title-m-letter-spacing);
|
407
|
+
`,ts:`
|
408
|
+
font-size: var(--typography-title-s-font-size);
|
409
|
+
font-weight: var(--typography-title-s-font-weight);
|
410
|
+
line-height: var(--typography-title-s-line-height);
|
411
|
+
letter-spacing: var(--typography-title-s-letter-spacing);
|
412
|
+
`,bl:`
|
413
|
+
font-size: var(--typography-body-l-font-size);
|
414
|
+
font-weight: var(--typography-body-l-font-weight);
|
415
|
+
line-height: var(--typography-body-l-line-height);
|
416
|
+
letter-spacing: var(--typography-body-l-letter-spacing);
|
417
|
+
`,bm:`
|
418
|
+
font-size: var(--typography-body-m-font-size);
|
419
|
+
font-weight: var(--typography-body-m-font-weight);
|
420
|
+
line-height: var(--typography-body-m-line-height);
|
421
|
+
letter-spacing: var(--typography-body-m-letter-spacing);
|
422
|
+
`,bs:`
|
423
|
+
font-size: var(--typography-body-s-font-size);
|
424
|
+
font-weight: var(--typography-body-s-font-weight);
|
425
|
+
line-height: var(--typography-body-s-line-height);
|
426
|
+
letter-spacing: var(--typography-body-s-letter-spacing);
|
427
|
+
`,ll:`
|
428
|
+
font-size: var(--typography-label-l-font-size);
|
429
|
+
font-weight: var(--typography-label-l-font-weight);
|
430
|
+
line-height: var(--typography-label-l-line-height);
|
431
|
+
letter-spacing: var(--typography-label-l-letter-spacing);
|
432
|
+
`,lm:`
|
433
|
+
font-size: var(--typography-label-m-font-size);
|
434
|
+
font-weight: var(--typography-label-m-font-weight);
|
435
|
+
line-height: var(--typography-label-m-line-height);
|
436
|
+
letter-spacing: var(--typography-label-m-letter-spacing);
|
437
|
+
`}},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`
|
687
438
|
:host {
|
688
|
-
display:
|
439
|
+
display: block;
|
689
440
|
}
|
690
441
|
slot {
|
691
|
-
display:
|
692
|
-
flex: 1;
|
442
|
+
display: contents;
|
693
443
|
}
|
694
|
-
:host(
|
695
|
-
|
444
|
+
:host ::slotted(a) {
|
445
|
+
text-decoration: var(--anchor-text-decoration);
|
446
|
+
color: var(--anchor-color);
|
696
447
|
}
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
${D}
|
701
|
-
${xt}
|
702
|
-
${x}
|
703
|
-
${S}
|
704
|
-
${H}
|
705
|
-
`);function ro(o){let t=String(o);return/[0-9]$/.test(t)}var wt=o=>{if(o!==void 0)return ro(o)?`${o}px`:o},K=class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[St],b(this.shadow,this.render)}static get observedAttributes(){return["key","wh","w","h","hidden"]}connectedCallback(){this.hasAttribute("d")||this.setAttribute("d","h")}attributeChangedCallback(t,r,s){let e=this.getAttribute("wh"),a=wt(e===null?this.getAttribute("w"):e),i=wt(e===null?this.getAttribute("h"):e),n=a?`width: ${a}; min-width: ${a}; max-width: ${a};`:"",d=i?`height: ${i}; min-height: ${i}; max-height: ${i};`:"",f=this.hasAttribute("hidden")?"display: none;":"",c=`${n} ${d} ${f}`;this.style=c,this.hasAttribute("d")||this.setAttribute("d","h"),b(this.shadow,this.render)}render=()=>u`
|
706
|
-
<slot></slot>
|
707
|
-
`},$t=K;var kt=new CSSStyleSheet;kt.replaceSync(p`
|
708
|
-
|
709
|
-
:host([c="on-p"]) slot {
|
710
|
-
color: var(--color-on-primary);
|
448
|
+
:host ::slotted(a:hover) {
|
449
|
+
text-decoration: var(--anchor-text-decoration-hover);
|
450
|
+
color: var(--anchor-color-hover);
|
711
451
|
}
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
}
|
717
|
-
|
718
|
-
:host([c="on-pc"]) slot {
|
719
|
-
color: var(--color-on-primary-container);
|
720
|
-
}
|
721
|
-
:host([c="on-pc"]) ::slotted(a) {
|
722
|
-
color: var(--color-on-primary-container);
|
723
|
-
text-decoration: underline;
|
724
|
-
text-decoration-color: var(--color-on-primary-container);
|
725
|
-
}
|
726
|
-
|
727
|
-
:host([c="on-s"]) slot {
|
728
|
-
color: var(--color-on-secondary);
|
729
|
-
}
|
730
|
-
:host([c="on-s"]) ::slotted(a) {
|
731
|
-
color: var(--color-on-secondary);
|
732
|
-
text-decoration: underline;
|
733
|
-
text-decoration-color: var(--color-on-secondary);
|
734
|
-
}
|
735
|
-
|
736
|
-
:host([c="on-sc"]) slot {
|
737
|
-
color: var(--color-on-secondary-container);
|
738
|
-
}
|
739
|
-
:host([c="on-sc"]) ::slotted(a) {
|
740
|
-
color: var(--color-on-secondary-container);
|
741
|
-
text-decoration: underline;
|
742
|
-
text-decoration-color: var(--color-on-secondary-container);
|
743
|
-
}
|
744
|
-
|
745
|
-
:host([c="on-su"]) slot {
|
746
|
-
color: var(--color-on-surface);
|
747
|
-
}
|
748
|
-
:host([c="on-su"]) ::slotted(a) {
|
749
|
-
color: var(--color-on-surface);
|
750
|
-
text-decoration: underline;
|
751
|
-
text-decoration-color: var(--color-on-surface);
|
752
|
-
}
|
753
|
-
|
754
|
-
:host([c="on-suv"]) slot {
|
755
|
-
color: var(--color-on-surface-variant);
|
756
|
-
}
|
757
|
-
:host([c="on-suv"]) ::slotted(a) {
|
758
|
-
color: var(--color-on-surface-variant);
|
759
|
-
text-decoration: underline;
|
760
|
-
text-decoration-color: var(--color-on-surface-variant);
|
761
|
-
}
|
762
|
-
|
763
|
-
:host([c="i-on-su"]) slot {
|
764
|
-
color: var(--color-inverse-on-surface);
|
765
|
-
}
|
766
|
-
:host([c="i-on-su"]) ::slotted(a) {
|
767
|
-
color: var(--color-inverse-on-surface);
|
768
|
-
text-decoration: underline;
|
769
|
-
text-decoration-color: var(--color-inverse-on-surface);
|
770
|
-
}
|
771
|
-
|
772
|
-
:host([c="on-e"]) slot {
|
773
|
-
color: var(--color-on-error);
|
774
|
-
}
|
775
|
-
:host([c="on-e"]) ::slotted(a) {
|
776
|
-
color: var(--color-on-error);
|
777
|
-
text-decoration: underline;
|
778
|
-
text-decoration-color: var(--color-on-error);
|
779
|
-
}
|
780
|
-
|
781
|
-
:host([c="on-ec"]) slot {
|
782
|
-
color: var(--color-on-error-container);
|
783
|
-
}
|
784
|
-
:host([c="on-ec"]) ::slotted(a) {
|
785
|
-
color: var(--color-on-error-container);
|
786
|
-
text-decoration: underline;
|
787
|
-
text-decoration-color: var(--color-on-error-container);
|
788
|
-
}
|
789
|
-
|
790
|
-
:host([s="dm"]) slot {
|
791
|
-
font-size: var(--typography-display-m-font-size);
|
792
|
-
font-weight: var(--typography-display-m-font-weight);
|
793
|
-
line-height: var(--typography-display-m-line-height);
|
794
|
-
letter-spacing: var(--typography-display-m-letter-spacing);
|
795
|
-
}
|
796
|
-
|
797
|
-
:host([s="hm"]) slot {
|
798
|
-
font-size: var(--typography-headline-m-font-size);
|
799
|
-
font-weight: var(--typography-headline-m-font-weight);
|
800
|
-
line-height: var(--typography-headline-m-line-height);
|
801
|
-
letter-spacing: var(--typography-headline-m-letter-spacing);
|
802
|
-
}
|
803
|
-
|
804
|
-
:host([s="tl"]) slot {
|
805
|
-
font-size: var(--typography-title-l-font-size);
|
806
|
-
font-weight: var(--typography-title-l-font-weight);
|
807
|
-
line-height: var(--typography-title-l-line-height);
|
808
|
-
letter-spacing: var(--typography-title-l-letter-spacing);
|
809
|
-
}
|
810
|
-
|
811
|
-
:host([s="tm"]) slot {
|
812
|
-
font-size: var(--typography-title-m-font-size);
|
813
|
-
font-weight: var(--typography-title-m-font-weight);
|
814
|
-
line-height: var(--typography-title-m-line-height);
|
815
|
-
letter-spacing: var(--typography-title-m-letter-spacing);
|
816
|
-
}
|
817
|
-
|
818
|
-
:host([s="ts"]) slot {
|
819
|
-
font-size: var(--typography-title-s-font-size);
|
820
|
-
font-weight: var(--typography-title-s-font-weight);
|
821
|
-
line-height: var(--typography-title-s-line-height);
|
822
|
-
letter-spacing: var(--typography-title-s-letter-spacing);
|
823
|
-
}
|
824
|
-
|
825
|
-
:host([s="bl"]) slot {
|
826
|
-
font-size: var(--typography-body-l-font-size);
|
827
|
-
font-weight: var(--typography-body-l-font-weight);
|
828
|
-
line-height: var(--typography-body-l-line-height);
|
829
|
-
letter-spacing: var(--typography-body-l-letter-spacing);
|
830
|
-
}
|
831
|
-
|
832
|
-
:host([s="bm"]) slot {
|
833
|
-
font-size: var(--typography-body-m-font-size);
|
834
|
-
font-weight: var(--typography-body-m-font-weight);
|
835
|
-
line-height: var(--typography-body-m-line-height);
|
836
|
-
letter-spacing: var(--typography-body-m-letter-spacing);
|
837
|
-
}
|
838
|
-
|
839
|
-
:host([s="bs"]) slot {
|
840
|
-
font-size: var(--typography-body-s-font-size);
|
841
|
-
font-weight: var(--typography-body-s-font-weight);
|
842
|
-
line-height: var(--typography-body-s-line-height);
|
843
|
-
letter-spacing: var(--typography-body-s-letter-spacing);
|
844
|
-
}
|
845
|
-
|
846
|
-
:host([s="ll"]) slot {
|
847
|
-
font-size: var(--typography-label-l-font-size);
|
848
|
-
font-weight: var(--typography-label-l-font-weight);
|
849
|
-
line-height: var(--typography-label-l-line-height);
|
850
|
-
letter-spacing: var(--typography-label-l-letter-spacing);
|
851
|
-
}
|
852
|
-
|
853
|
-
:host([s="lm"]) slot {
|
854
|
-
font-size: var(--typography-label-m-font-size);
|
855
|
-
font-weight: var(--typography-label-m-font-weight);
|
856
|
-
line-height: var(--typography-label-m-line-height);
|
857
|
-
letter-spacing: var(--typography-label-m-letter-spacing);
|
858
|
-
}
|
859
|
-
${x}
|
860
|
-
${y}
|
861
|
-
${S}
|
862
|
-
`);var Q=class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[kt]}static get observedAttributes(){return["key"]}connectedCallback(){b(this.shadow,this.render)}attributeChangedCallback(t,r,s){b(this.shadow,this.render)}render=()=>u`
|
452
|
+
${Wt}
|
453
|
+
${U}
|
454
|
+
${M}
|
455
|
+
${C}
|
456
|
+
`);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`
|
863
457
|
<slot></slot>
|
864
|
-
`},
|
458
|
+
`},Mt=ot;var Ot=new CSSStyleSheet;Ot.replaceSync(b`
|
865
459
|
:host {
|
866
|
-
|
460
|
+
border-style: solid;
|
461
|
+
box-sizing: border-box;
|
462
|
+
overflow: hidden;
|
463
|
+
border-width: 0;
|
464
|
+
}
|
465
|
+
slot {
|
466
|
+
display: contents;
|
867
467
|
}
|
868
|
-
:host([of="
|
468
|
+
:host([of="con"]) img {
|
869
469
|
object-fit: contain;
|
870
470
|
}
|
871
|
-
:host([of="
|
471
|
+
:host([of="cov"]) img {
|
872
472
|
object-fit: cover;
|
873
473
|
}
|
874
|
-
img {
|
875
|
-
|
474
|
+
:host([of="none"]) img {
|
475
|
+
object-fit: none;
|
876
476
|
}
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
477
|
+
img {
|
478
|
+
height: 100%;
|
479
|
+
width: 100%;
|
480
|
+
}
|
481
|
+
${P}
|
482
|
+
${M}
|
483
|
+
${C}
|
484
|
+
`);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`
|
485
|
+
<style>
|
486
|
+
${D(this._styles)}
|
487
|
+
</style>
|
882
488
|
<img
|
883
489
|
src="${this.getAttribute("src")}"
|
884
|
-
width="${this.getAttribute("
|
885
|
-
height="${this.getAttribute("
|
490
|
+
width="${this.getAttribute("width")}"
|
491
|
+
height="${this.getAttribute("height")}"
|
886
492
|
>
|
887
|
-
`},
|
888
|
-
input[type="text"] {
|
889
|
-
height: 32px;
|
890
|
-
}
|
891
|
-
|
892
|
-
input[type="text"],
|
893
|
-
textarea {
|
894
|
-
padding: 8px 8px;
|
895
|
-
box-sizing: border-box;
|
896
|
-
border: 1px solid var(--color-outline-variant);
|
897
|
-
-webkit-transition: 0.3s;
|
898
|
-
transition: 0.3s;
|
899
|
-
outline: none;
|
900
|
-
|
901
|
-
font-family: Roboto, -apple-system, "Helvetica Neue", sans-serif;
|
902
|
-
font-size: var(--typography-body-m-font-size);
|
903
|
-
font-weight: var(--typography-body-m-font-weight);
|
904
|
-
line-height: var(--typography-body-m-line-height);
|
905
|
-
letter-spacing: var(--typography-body-m-letter-spacing);
|
906
|
-
}
|
907
|
-
|
908
|
-
input[type="text"]:focus,
|
909
|
-
textarea:focus {
|
910
|
-
border: 1px solid var(--color-primary);
|
911
|
-
}
|
912
|
-
textarea {
|
913
|
-
resize: none;
|
914
|
-
}
|
915
|
-
${y}
|
916
|
-
${D}
|
917
|
-
${x}
|
918
|
-
`);var Y=class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[Et],this._formRef={},setTimeout(()=>{b(this.shadow,this.render)})}static get observedAttributes(){return["key"]}attributeChangedCallback(t,r,s){b(this.shadow,this.render)}_handleRawSubmit=()=>{let t=new FormData(this._formRef.current),r={};for(let[s,e]of t.entries())r[s]=e;this.onClickSubmit&&this.onClickSubmit(r)};_renderTitles=()=>u`
|
919
|
-
${this.formSchema.title?u`<rtgl-text s="tl" c="on-su">${this.formSchema.title}</rtgl-text>`:null}
|
920
|
-
${this.formSchema.subtitle?u`<rtgl-text s="bm" c="on-su"
|
921
|
-
>${this.formSchema.subtitle}</rtgl-text
|
922
|
-
>`:null}
|
923
|
-
`;_renderFields=()=>this.formSchema.fields.map(t=>{let r=null,s=`width: ${this.getAttribute("width")}px;`;return t.type==="text"?r=u`<input
|
924
|
-
type="${t.type}"
|
925
|
-
name="${t.name}"
|
926
|
-
value="${t.value}"
|
927
|
-
placeholder="${t.options?.placeholder}"
|
928
|
-
style=${s}
|
929
|
-
/>`:t.type==="textarea"&&(r=u`<textarea
|
930
|
-
name="${t.name}"
|
931
|
-
value="${t.value}"
|
932
|
-
rows="${t.options?.rows}"
|
933
|
-
placeholder="${t.options?.placeholder}"
|
934
|
-
style=${s}
|
935
|
-
|
936
|
-
></textarea>`),u`
|
937
|
-
<rtgl-view d="v" g="s">
|
938
|
-
<rtgl-view d="v">
|
939
|
-
<rtgl-text s="ll" c="on-su">${t.label}</rtgl-text>
|
940
|
-
${t.subLabel?u`<rtgl-text s="lm" c="on-su">${t.subLabel}</rtgl-text>`:null}
|
941
|
-
</rtgl-view>
|
942
|
-
${r}
|
943
|
-
</rtgl-view>
|
944
|
-
`});render=()=>{let t={};return u`
|
945
|
-
<rtgl-view d="v" g="m" w="${this.getAttribute("width")}">
|
946
|
-
<rtgl-view d="v"> ${this._renderTitles()} </rtgl-view>
|
947
|
-
<form
|
948
|
-
ref=${this._formRef}
|
949
|
-
style="display: flex; flex-direction: column;"
|
950
|
-
>
|
951
|
-
<rtgl-view d="v" g="m">
|
952
|
-
${this._renderFields()}
|
953
|
-
<rtgl-button as="e" t="p" onclick=${this._handleRawSubmit}>
|
954
|
-
${this.formSchema.submit.label}
|
955
|
-
</rtgl-button>
|
956
|
-
</rtgl-view>
|
957
|
-
</form>
|
958
|
-
</rtgl-view>
|
959
|
-
`}},Mt=Y;var Tt=p`
|
493
|
+
`},zt=rt;var Et=b`
|
960
494
|
:host([pt="xs"]) svg {
|
961
495
|
padding-top: var(--spacing-xs);
|
962
496
|
}
|
@@ -1072,49 +606,10 @@ ${x}
|
|
1072
606
|
padding-top: var(--spacing-xl);
|
1073
607
|
padding-bottom: var(--spacing-xl);
|
1074
608
|
}
|
1075
|
-
`;var
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
}
|
1080
|
-
:
|
1081
|
-
fill: var(--color-secondary);
|
1082
|
-
}
|
1083
|
-
:host([f="e"]) path {
|
1084
|
-
fill: var(--color-error);
|
1085
|
-
}
|
1086
|
-
:host([f="on-p"]) path {
|
1087
|
-
fill: var(--color-on-primary);
|
1088
|
-
}
|
1089
|
-
:host([f="on-pc"]) path {
|
1090
|
-
fill: var(--color-on-primary-container);
|
1091
|
-
}
|
1092
|
-
:host([f="on-s"]) path {
|
1093
|
-
fill: var(--color-on-secondary);
|
1094
|
-
}
|
1095
|
-
:host([f="on-sc"]) path {
|
1096
|
-
fill: var(--color-on-secondary-container);
|
1097
|
-
}
|
1098
|
-
:host([f="on-su"]) path {
|
1099
|
-
fill: var(--color-on-surface);
|
1100
|
-
}
|
1101
|
-
:host([f="on-suv"]) path {
|
1102
|
-
fill: var(--color-on-surface-variant);
|
1103
|
-
}
|
1104
|
-
:host([f="i-on-su"]) path {
|
1105
|
-
fill: var(--color-inverse-on-surface);
|
1106
|
-
}
|
1107
|
-
:host([f="on-e"]) path {
|
1108
|
-
fill: var(--color-on-error);
|
1109
|
-
}
|
1110
|
-
:host([f="on-ec"]) path {
|
1111
|
-
fill: var(--color-on-error-container);
|
1112
|
-
}
|
1113
|
-
|
1114
|
-
${Tt}
|
1115
|
-
${x}
|
1116
|
-
${y}
|
1117
|
-
${S}
|
1118
|
-
`);function eo(o){let t=String(o);return/[0-9]$/.test(t)}var Wt=o=>{if(o!==void 0)return eo(o)?`${o}px`:o},tt=class o extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[jt]}static _icons={};static get observedAttributes(){return["key","svg","w","h","of","wh"]}static get icons(){return o._icons}static addIcon(t,r){o._icons[t]=r}connectedCallback(){this.render()}attributeChangedCallback(t,r,s){let e=this.getAttribute("wh"),a=Wt(e===null?this.getAttribute("w"):e),i=Wt(e===null?this.getAttribute("h"):e),n=a?`width: ${a}; min-width: ${a}; max-width: ${a};`:"",d=i?`height: ${i}; min-height: ${i}; max-height: ${i};`:"",f=this.hasAttribute("hidden")?"display: none;":"",c=`${n} ${d} ${f}`;this.style=c,this.render()}render=()=>{try{let t=this.getAttribute("svg"),r=o._icons[t]||(window.rtglIcons||{})[t];if(r){this.shadow.innerHTML=r;return}}catch(t){console.log("error in rtgl-svg render",t)}this.shadow.innerHTML=""}},Lt=tt;customElements.define("rtgl-button",ft);customElements.define("rtgl-view",$t);customElements.define("rtgl-text",Ct);customElements.define("rtgl-image",Nt);customElements.define("rtgl-form",Mt);customElements.define("rtgl-svg",Lt);})();
|
609
|
+
`;var Nt=new CSSStyleSheet;Nt.replaceSync(b`
|
610
|
+
${U}
|
611
|
+
${Et}
|
612
|
+
${j}
|
613
|
+
${C}
|
614
|
+
`);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);})();
|
1119
615
|
/*! (c) Andrea Giammarchi - MIT */
|
1120
|
-
//# sourceMappingURL=rettangoli-ui.min.js.map
|