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.
- package/README.md +28 -599
- package/dist/rettangoli-iife-layout.min.js +423 -391
- package/dist/rettangoli-iife-ui.min.js +500 -424
- package/package.json +12 -6
- package/LICENSE +0 -21
- package/dist/rettangoli-esm.min.js +0 -645
@@ -1,24 +1,24 @@
|
|
1
|
-
var rettangoli=(()=>{
|
2
|
-
:host([${
|
3
|
-
${
|
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([${
|
6
|
-
${
|
5
|
+
:host([${O}="${c}"]:hover)${h}{
|
6
|
+
${W}
|
7
7
|
}
|
8
|
-
`}else
|
9
|
-
:host([${
|
10
|
-
${
|
8
|
+
`}else i+=`
|
9
|
+
:host([${v}="${c}"])${h}{
|
10
|
+
${d}
|
11
11
|
}
|
12
|
-
:host([${
|
13
|
-
${
|
12
|
+
:host([${O}="${c}"]:hover)${h}{
|
13
|
+
${d}
|
14
14
|
}
|
15
|
-
`}}
|
16
|
-
`);let s="";for(let[
|
17
|
-
`);t
|
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
|
-
`,
|
21
|
-
`)}return
|
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
|
62
|
-
:
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
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
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
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
|
-
|
79
|
-
|
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
|
-
|
83
|
-
|
84
|
-
|
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
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
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
|
-
|
98
|
-
|
99
|
-
|
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
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
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
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
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
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
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
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
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
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
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
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
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
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
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
|
-
|
157
|
-
|
158
|
-
|
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
|
-
|
164
|
-
|
165
|
-
|
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
|
-
|
171
|
-
|
172
|
-
|
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
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
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
|
-
|
191
|
-
|
192
|
-
|
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(
|
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
|
-
|
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
|
-
|
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
|
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
|
301
|
-
background-color: var(--
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
color: var(--
|
306
|
-
`,
|
307
|
-
background-color: var(--
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
color: var(--
|
312
|
-
`,
|
313
|
-
background-color: var(--
|
314
|
-
|
315
|
-
|
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:{
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
}
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
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="
|
497
|
-
padding-top: var(--spacing-
|
526
|
+
:host([pt="sm"]) svg {
|
527
|
+
padding-top: var(--spacing-sm);
|
498
528
|
}
|
499
|
-
:host([pt="
|
500
|
-
padding-top: var(--spacing-
|
529
|
+
:host([pt="md"]) svg {
|
530
|
+
padding-top: var(--spacing-md);
|
501
531
|
}
|
502
|
-
:host([pt="
|
503
|
-
padding-top: var(--spacing-
|
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="
|
512
|
-
padding-right: var(--spacing-
|
541
|
+
:host([pr="sm"]) svg {
|
542
|
+
padding-right: var(--spacing-sm);
|
513
543
|
}
|
514
|
-
:host([pr="
|
515
|
-
padding-right: var(--spacing-
|
544
|
+
:host([pr="md"]) svg {
|
545
|
+
padding-right: var(--spacing-md);
|
516
546
|
}
|
517
|
-
:host([pr="
|
518
|
-
padding-right: var(--spacing-
|
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="
|
527
|
-
padding-bottom: var(--spacing-
|
556
|
+
:host([pb="sm"]) svg {
|
557
|
+
padding-bottom: var(--spacing-sm);
|
528
558
|
}
|
529
|
-
:host([pb="
|
530
|
-
padding-bottom: var(--spacing-
|
559
|
+
:host([pb="md"]) svg {
|
560
|
+
padding-bottom: var(--spacing-md);
|
531
561
|
}
|
532
|
-
:host([pb="
|
533
|
-
padding-bottom: var(--spacing-
|
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="
|
542
|
-
padding-left: var(--spacing-
|
571
|
+
:host([pl="sm"]) svg {
|
572
|
+
padding-left: var(--spacing-sm);
|
543
573
|
}
|
544
|
-
:host([pl="
|
545
|
-
padding-left: var(--spacing-
|
574
|
+
:host([pl="md"]) svg {
|
575
|
+
padding-left: var(--spacing-md);
|
546
576
|
}
|
547
|
-
:host([pl="
|
548
|
-
padding-left: var(--spacing-
|
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="
|
557
|
-
padding: var(--spacing-
|
586
|
+
:host([p="sm"]) svg {
|
587
|
+
padding: var(--spacing-sm);
|
558
588
|
}
|
559
|
-
:host([p="
|
560
|
-
padding: var(--spacing-
|
589
|
+
:host([p="md"]) svg {
|
590
|
+
padding: var(--spacing-md);
|
561
591
|
}
|
562
|
-
:host([p="
|
563
|
-
padding: var(--spacing-
|
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="
|
573
|
-
padding-left: var(--spacing-
|
574
|
-
padding-right: var(--spacing-
|
602
|
+
:host([ph="sm"]) svg {
|
603
|
+
padding-left: var(--spacing-sm);
|
604
|
+
padding-right: var(--spacing-sm);
|
575
605
|
}
|
576
|
-
:host([ph="
|
577
|
-
padding-left: var(--spacing-
|
578
|
-
padding-right: var(--spacing-
|
606
|
+
:host([ph="md"]) svg {
|
607
|
+
padding-left: var(--spacing-md);
|
608
|
+
padding-right: var(--spacing-md);
|
579
609
|
}
|
580
|
-
:host([ph="
|
581
|
-
padding-left: var(--spacing-
|
582
|
-
padding-right: var(--spacing-
|
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="
|
593
|
-
padding-top: var(--spacing-
|
594
|
-
padding-bottom: var(--spacing-
|
622
|
+
:host([pv="sm"]) svg {
|
623
|
+
padding-top: var(--spacing-sm);
|
624
|
+
padding-bottom: var(--spacing-sm);
|
595
625
|
}
|
596
|
-
:host([pv="
|
597
|
-
padding-top: var(--spacing-
|
598
|
-
padding-bottom: var(--spacing-
|
626
|
+
:host([pv="md"]) svg {
|
627
|
+
padding-top: var(--spacing-md);
|
628
|
+
padding-bottom: var(--spacing-md);
|
599
629
|
}
|
600
|
-
:host([pv="
|
601
|
-
padding-top: var(--spacing-
|
602
|
-
padding-bottom: var(--spacing-
|
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
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
${
|
613
|
-
|
614
|
-
|
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({}));})();
|