rettangoli-ui 0.0.10-rc4 → 0.1.0-rc1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,645 +0,0 @@
1
- function d(o,...l){let s="";return o.forEach((u,r)=>{s+=u+(l[r]||"")}),s}var M={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)"},f=(o,l,s={})=>{let u="";for(let[r,h]of Object.entries(M)){r!=="default"&&(u+=`${h} {`);for(let[g,t]of Object.entries(l)){let e=s[g]?` ${s[g]} `:" ";for(let[n,a]of Object.entries(t)){let c=o[g],b=a.startsWith("--")?`var(${a})`:a,m=r==="default"?g:`${r}-${g}`,v=r==="default"?`h-${g}`:`${r}-h-${g}`;if(c){let j=c.split(" ").map(z=>`${z}: ${b};`).join(" ");u+=`
2
- :host([${m}="${n}"])${e}{
3
- ${j}
4
- }
5
- :host([${v}="${n}"]:hover)${e}{
6
- ${j}
7
- }
8
- `}else u+=`
9
- :host([${m}="${n}"])${e}{
10
- ${a}
11
- }
12
- :host([${v}="${n}"]:hover)${e}{
13
- ${a}
14
- }
15
- `}}r!=="default"&&(u+="}")}return u};function E(o){if(o===null||o.includes("/"))return!1;let l=String(o);return/[0-9]$/.test(l)}var L=o=>/%$/.test(o),p=o=>{if(o!==void 0)return L(o)?o:E(o)?`${o}px`:o},i={xs:"--spacing-xs",s:"--spacing-s",m:"--spacing-m",l:"--spacing-l",xl:"--spacing-xl"};function S(o){let l="";for(let[s,u]of Object.entries(M)){s!=="default"&&(l+=`${u} {
16
- `);let r="";for(let[h,g]of Object.entries(o[s]))g!=null&&(r+=`${h}: ${g};
17
- `);l+=`:host {
18
- ${r.trim()}
19
- }
20
- `,s!=="default"&&(l+=`}
21
- `)}return l}var w=d`
22
- :host([flex="0"]) {
23
- flex: 0;
24
- }
25
- :host([flex="1"]) {
26
- flex: 1;
27
- }
28
- :host([flex="2"]) {
29
- flex: 2;
30
- }
31
- :host([flex="3"]) {
32
- flex: 3;
33
- }
34
- :host([flex="4"]) {
35
- flex: 4;
36
- }
37
- :host([flex="5"]) {
38
- flex: 5;
39
- }
40
- :host([flex="6"]) {
41
- flex: 6;
42
- }
43
- :host([flex="7"]) {
44
- flex: 7;
45
- }
46
- :host([flex="8"]) {
47
- flex: 8;
48
- }
49
- :host([flex="9"]) {
50
- flex: 9;
51
- }
52
- :host([flex="10"]) {
53
- flex: 10;
54
- }
55
- :host([flex="11"]) {
56
- flex: 11;
57
- }
58
- :host([flex="12"]) {
59
- flex: 12;
60
- }
61
- `;var O={mt:"margin-top",mr:"margin-right",mb:"margin-bottom",ml:"margin-left",m:"margin",mh:"margin-left margin-right",mv:"margin-top margin-bottom"},H={mt:i,mr:i,mb:i,ml:i,m:i,mh:i,mv:i},I={mt:"button",mr:"button",mb:"button",ml:"button",m:"button",mh:"button",mv:"button"},T=f(O,H,I);var U=({render:o,html:l})=>{let s=new CSSStyleSheet;return s.replaceSync(d`
62
- :host {
63
- display: contents;
64
- }
65
- slot {
66
- display: contents;
67
- }
68
-
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
- }
77
-
78
- button:hover {
79
- cursor: pointer;
80
- }
81
-
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
- }
89
-
90
- :host([t="ps"]) button:hover,
91
- :host([t="p"]) button:hover,
92
- :host([t="pl"]) button:hover {
93
- border-color: var(--color-primary-hover);
94
- background-color: var(--color-primary-hover);
95
- }
96
-
97
- :host([t="ps"]) button:active,
98
- :host([t="p"]) button:active,
99
- :host([t="pl"]) button:active {
100
- border-color: var(--color-primary-active);
101
- background-color: var(--color-primary-active);
102
- }
103
-
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
- }
111
-
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
- }
118
-
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
- }
125
-
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
- }
133
-
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
- }
140
-
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
- }
147
-
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
- }
155
-
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
- }
162
-
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
- }
169
-
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
- }
179
-
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
- }
189
-
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
- ${T}
204
- ${w}
205
- `),class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[s],o(this.shadow,this.render)}static get observedAttributes(){return["key","href","target","w","t"]}_buttonRef={};_assingRef=r=>{this._buttonRef.current=r;let h=p(this.getAttribute("w"));h==="f"?this._buttonRef.current.style.width="100%":h!=null&&(this._buttonRef.current.style.width=h)};attributeChangedCallback(r,h,g){if(!this._buttonRef.current)return;let t=p(this.getAttribute("w"));t==="f"?this._buttonRef.current.style.width="100%":t!=null&&(this._buttonRef.current.style.width=t,this._buttonRef.current.style.minWidth=t,this._buttonRef.current.style.maxWidth=t),o(this.shadow,this.render)}render=()=>this.getAttribute("href")?l`
206
- <a
207
- href=${this.getAttribute("href")}
208
- target=${this.getAttribute("target")}
209
- >
210
- <button>
211
- <slot></slot>
212
- </button>
213
- </a>
214
- `:l`
215
- <button ref=${this._assingRef}>
216
- <slot></slot>
217
- </button>
218
- `}};var k=d`
219
-
220
- :host([d="h"]) {
221
- flex-direction: row;
222
- }
223
- :host(:not([d])) {
224
- flex-direction: column;
225
- }
226
- :host([d="h"]:not([ah])) {
227
- justify-content: flex-start;
228
- }
229
- :host([d="h"][ah="c"]) {
230
- justify-content: center;
231
- /* align-content: center; */
232
- }
233
- :host([d="h"][ah="e"]) {
234
- justify-content: flex-end;
235
- }
236
- :host([d="h"]:not([av])) {
237
- align-items: flex-start;
238
- }
239
- :host([d="h"][av="c"]) {
240
- align-items: center;
241
- align-content: center;
242
- }
243
- :host([d="h"][av="e"]) {
244
- align-items: flex-end;
245
- align-content: flex-end;
246
- }
247
- :host(:not([d]):not([ah])) {
248
- align-items: flex-start;
249
- }
250
- :host(:not([d])[ah="c"]) {
251
- align-items: center;
252
- align-content: center;
253
- }
254
- :host(:not([d])[ah="e"]) {
255
- align-items: flex-end;
256
- align-content: flex-end;
257
- }
258
- :host(:not([d]):not([av])) {
259
- justify-content: flex-start;
260
- }
261
- :host(:not([d])[av="c"]) {
262
- justify-content: center;
263
- }
264
- :host(:not([d])[av="e"]) {
265
- justify-content: flex-end;
266
- }
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 P={cur:"cursor"},B={cur:{p:"pointer",m:"move",grab:"grab",grabbing:"grabbing"}},y=f(P,B);var C=d`
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 _={xs:"--border-width-xs",s:"--border-width-s",m:"--border-width-m",l:"--border-width-l",xl:"--border-width-xl"},D={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"},Q={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);
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:i,pr:i,pb:i,pl:i,p:i,ph:i,pv:i,g:i,gv:i,gh:i,bw:_,bwt:_,bwr:_,bwb:_,bwl:_,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%"}},$=f(D,Q);var F={mt:"margin-top",mr:"margin-right",mb:"margin-bottom",ml:"margin-left",m:"margin",mh:"margin-left margin-right",mv:"margin-top margin-bottom"},G={mt:i,mr:i,mb:i,ml:i,m:i,mh:i,mv:i},x=f(F,G);var N=({render:o,html:l})=>{let s=new CSSStyleSheet;return s.replaceSync(d`
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
- ${w}
378
- ${C}
379
- ${k}
380
- ${x}
381
- ${y}
382
- ${$}
383
- `),class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[s],o(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(r,h,g){["default","sm","md","lg","xl"].forEach(t=>{let e=v=>`${t==="default"?"":`${t}-`}${v}`,n=this.getAttribute(e("wh")),a=p(n===null?this.getAttribute(e("w")):n),c=p(n===null?this.getAttribute(e("h")):n),b=this.getAttribute(e("o")),m=this.getAttribute(e("z"));m!==null&&(this._styles[t]["z-index"]=m),b!==null&&(this._styles[t].opacity=b),a==="f"?this._styles[t].width="100%":a!==void 0&&(this._styles[t].width=a,this._styles[t]["min-width"]=a,this._styles[t]["max-width"]=a),c==="f"?this._styles[t].height="100%":c!==void 0&&(this._styles[t].height=c,this._styles[t]["min-height"]=c,this._styles[t]["max-height"]=c),this.hasAttribute(e("hidden"))&&(this._styles[t].display="none !important"),this.hasAttribute(e("visible"))&&(this._styles[t].display="flex !important")}),o(this.shadow,this.render)}render=()=>l`
384
- <style>
385
- ${S(this._styles)}
386
- </style>
387
- <slot></slot>
388
- `}};var q={at:"text-align"},J={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
- `}},W=f(q,J);var K={c:"color"},X={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"}},A=f(K,X);var Y=({render:o,html:l})=>{let s=new CSSStyleSheet;s.replaceSync(d`
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
- ${W}
454
- ${A}
455
- ${x}
456
- ${y}
457
- `);class u extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[s]}static get observedAttributes(){return["key","w","ellipsis"]}connectedCallback(){o(this.shadow,this.render)}attributeChangedCallback(h,g,t){let e=p(this.getAttribute("w"));this.hasAttribute("ellipsis")&&(this.style.overflow="hidden",this.style.textOverflow="ellipsis",this.style.whiteSpace="nowrap"),e==="f"?this.style.width="100%":e!==void 0&&(this.style.width=e),o(this.shadow,this.render)}render=()=>l` <slot></slot> `}return u};var Z=({render:o,html:l})=>{let s=new CSSStyleSheet;return s.replaceSync(d`
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
- ${$}
481
- ${x}
482
- ${y}
483
- `),class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[s]}_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(){o(this.shadow,this.render)}attributeChangedCallback(r,h,g){["default","sm","md","lg","xl"].forEach(t=>{let e=v=>`${t==="default"?"":`${t}-`}${v}`,n=this.getAttribute(e("wh")),a=p(n===null?this.getAttribute(e("w")):n),c=p(n===null?this.getAttribute(e("h")):n),b=this.getAttribute(e("o")),m=this.getAttribute(e("z"));m!==null&&(this._styles[t].zIndex=m),b!==null&&(this._styles[t].opacity=b),a==="f"?this._styles[t].width="100%":a!==void 0&&(this._styles[t].width=a,this._styles[t]["min-width"]=a,this._styles[t]["max-width"]=a),c==="f"?this._styles[t].height="100%":c!==void 0&&(this._styles[t].height=c,this._styles[t]["min-height"]=c,this._styles[t]["max-height"]=c)}),o(this.shadow,this.render)}render=()=>l`
484
- <style>
485
- ${S(this._styles)}
486
- </style>
487
- <img
488
- src="${this.getAttribute("src")}"
489
- width="${this.getAttribute("width")}"
490
- height="${this.getAttribute("height")}"
491
- />
492
- `}};var V=d`
493
- :host([pt="xs"]) svg {
494
- padding-top: var(--spacing-xs);
495
- }
496
- :host([pt="s"]) svg {
497
- padding-top: var(--spacing-s);
498
- }
499
- :host([pt="m"]) svg {
500
- padding-top: var(--spacing-m);
501
- }
502
- :host([pt="l"]) svg {
503
- padding-top: var(--spacing-l);
504
- }
505
- :host([pt="xl"]) svg {
506
- padding-top: var(--spacing-xl);
507
- }
508
- :host([pr="xs"]) svg {
509
- padding-right: var(--spacing-xs);
510
- }
511
- :host([pr="s"]) svg {
512
- padding-right: var(--spacing-s);
513
- }
514
- :host([pr="m"]) svg {
515
- padding-right: var(--spacing-m);
516
- }
517
- :host([pr="l"]) svg {
518
- padding-right: var(--spacing-l);
519
- }
520
- :host([pr="xl"]) svg {
521
- padding-right: var(--spacing-xl);
522
- }
523
- :host([pb="xs"]) svg {
524
- padding-bottom: var(--spacing-xs);
525
- }
526
- :host([pb="s"]) svg {
527
- padding-bottom: var(--spacing-s);
528
- }
529
- :host([pb="m"]) svg {
530
- padding-bottom: var(--spacing-m);
531
- }
532
- :host([pb="l"]) svg {
533
- padding-bottom: var(--spacing-l);
534
- }
535
- :host([pb="xl"]) svg {
536
- padding-bottom: var(--spacing-xl);
537
- }
538
- :host([pl="xs"]) svg {
539
- padding-left: var(--spacing-xs);
540
- }
541
- :host([pl="s"]) svg {
542
- padding-left: var(--spacing-s);
543
- }
544
- :host([pl="m"]) svg {
545
- padding-left: var(--spacing-m);
546
- }
547
- :host([pl="l"]) svg {
548
- padding-left: var(--spacing-l);
549
- }
550
- :host([pl="xl"]) svg {
551
- padding-left: var(--spacing-xl);
552
- }
553
- :host([p="xs"]) svg {
554
- padding: var(--spacing-xs);
555
- }
556
- :host([p="s"]) svg {
557
- padding: var(--spacing-s);
558
- }
559
- :host([p="m"]) svg {
560
- padding: var(--spacing-m);
561
- }
562
- :host([p="l"]) svg {
563
- padding: var(--spacing-l);
564
- }
565
- :host([p="xl"]) svg {
566
- padding: var(--spacing-xl);
567
- }
568
- :host([ph="xs"]) svg {
569
- padding-left: var(--spacing-xs);
570
- padding-right: var(--spacing-xs);
571
- }
572
- :host([ph="s"]) svg {
573
- padding-left: var(--spacing-s);
574
- padding-right: var(--spacing-s);
575
- }
576
- :host([ph="m"]) svg {
577
- padding-left: var(--spacing-m);
578
- padding-right: var(--spacing-m);
579
- }
580
- :host([ph="l"]) svg {
581
- padding-left: var(--spacing-l);
582
- padding-right: var(--spacing-l);
583
- }
584
- :host([ph="xl"]) svg {
585
- padding-left: var(--spacing-xl);
586
- padding-right: var(--spacing-xl);
587
- }
588
- :host([pv="xs"]) svg {
589
- padding-top: var(--spacing-xs);
590
- padding-bottom: var(--spacing-xs);
591
- }
592
- :host([pv="s"]) svg {
593
- padding-top: var(--spacing-s);
594
- padding-bottom: var(--spacing-s);
595
- }
596
- :host([pv="m"]) svg {
597
- padding-top: var(--spacing-m);
598
- padding-bottom: var(--spacing-m);
599
- }
600
- :host([pv="l"]) svg {
601
- padding-top: var(--spacing-l);
602
- padding-bottom: var(--spacing-l);
603
- }
604
- :host([pv="xl"]) svg {
605
- padding-top: var(--spacing-xl);
606
- padding-bottom: var(--spacing-xl);
607
- }
608
- `;var tt=({render:o,html:l})=>{let s=new CSSStyleSheet;return s.replaceSync(d`
609
- ${A}
610
- ${V}
611
- ${w}
612
- ${y}
613
- `),class R extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[s]}static _icons={};static get observedAttributes(){return["key","svg","w","h","wh"]}static get icons(){return R._icons}static addIcon(r,h){R._icons[r]=h}connectedCallback(){this.render()}attributeChangedCallback(r,h,g){let t=this.getAttribute("wh"),e=p(t===null?this.getAttribute("w"):t),n=p(t===null?this.getAttribute("h"):t);e&&(this.style.width=e),n&&(this.style.height=n),this.render()}render=()=>{try{let r=this.getAttribute("svg"),h=R._icons[r]||(window.rtglIcons||{})[r];if(h){this.shadow.innerHTML=h;return}}catch(r){console.log("error in rtgl-svg render",r)}this.shadow.innerHTML=""}}};var ot=({render:o,html:l})=>{let s=new CSSStyleSheet;return s.replaceSync(d`
614
- slot {
615
- display: contents;
616
- }
617
- :host([hidden]) {
618
- display: none;
619
- }
620
- :host {
621
- display: flex;
622
- align-self: auto;
623
- align-content: flex-start;
624
- flex-wrap: wrap;
625
- border-style: solid;
626
- border-width: 0;
627
- box-sizing: border-box;
628
- }
629
- :host([stretch]) {
630
- align-self: stretch;
631
- }
632
- ${w}
633
- ${C}
634
- ${k}
635
- ${x}
636
- ${y}
637
- ${$}
638
- `),class extends HTMLElement{constructor(){super(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[s]}connectedCallback(){o(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(r,h,g){["default","sm","md","lg","xl"].forEach(t=>{let e=v=>`${t==="default"?"":`${t}-`}${v}`,n=this.getAttribute(e("wh")),a=p(n===null?this.getAttribute(e("w")):n),c=p(n===null?this.getAttribute(e("h")):n),b=this.getAttribute(e("o")),m=this.getAttribute(e("z"));m!==null&&(this._styles[t]["z-index"]=m),b!==null&&(this._styles[t].opacity=b),a==="f"?this._styles[t].width="100%":a!==void 0&&(this._styles[t].width=a,this._styles[t]["min-width"]=a,this._styles[t]["max-width"]=a),c==="f"?this._styles[t].height="100%":c!==void 0&&(this._styles[t].height=c,this._styles[t]["min-height"]=c,this._styles[t]["max-height"]=c),this.hasAttribute("hidden")&&(this._styles[t].display="none")}),setTimeout(()=>{o(this.shadow,this.render)},0)}render=()=>l`
639
- <style>
640
- ${S(this._styles)}
641
- </style>
642
- <slot name="top"></slot>
643
- ${this.items?.map((r,h)=>(typeof this.itemsRenderer=="function"?this.itemsRenderer:this.itemsRenderer.maps[r[this.itemsRenderer.key]])(r,h))}
644
- <slot name="bottom"></slot>
645
- `}};export{U as RettangoliButton,Z as RettangoliImage,ot as RettangoliListView,tt as RettangoliSvg,Y as RettangoliText,N as RettangoliView};