rettangoli-ui 0.1.0-rc2 → 0.1.0-rc4

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.
Files changed (54) hide show
  1. package/README.md +16 -27
  2. package/dist/rettangoli-iife-layout.min.js +118 -45
  3. package/dist/rettangoli-iife-ui.min.js +86 -65
  4. package/package.json +11 -4
  5. package/src/common/BaseElement.js +182 -0
  6. package/src/common.js +190 -0
  7. package/src/components/dialog/dialog.handlers.js +5 -0
  8. package/src/components/dialog/dialog.store.js +24 -0
  9. package/src/components/dialog/dialog.view.yaml +41 -0
  10. package/src/components/dropdownMenu/dropdownMenu.handlers.js +5 -0
  11. package/src/components/dropdownMenu/dropdownMenu.store.js +25 -0
  12. package/src/components/dropdownMenu/dropdownMenu.view.yaml +52 -0
  13. package/src/components/form/form.handlers.js +30 -0
  14. package/src/components/form/form.store.js +45 -0
  15. package/src/components/form/form.view.yaml +47 -0
  16. package/src/components/navbar/navbar.examples.yaml +86 -0
  17. package/src/components/navbar/navbar.handlers.js +10 -0
  18. package/src/components/navbar/navbar.store.js +46 -0
  19. package/src/components/navbar/navbar.view.yaml +74 -0
  20. package/src/components/pageOutline/pageOutline.handlers.js +69 -0
  21. package/src/components/pageOutline/pageOutline.store.js +40 -0
  22. package/src/components/pageOutline/pageOutline.view.yaml +34 -0
  23. package/src/components/popover/popover.handlers.js +5 -0
  24. package/src/components/popover/popover.store.js +12 -0
  25. package/src/components/popover/popover.view.yaml +57 -0
  26. package/src/components/select/select.handlers.js +46 -0
  27. package/src/components/select/select.store.js +65 -0
  28. package/src/components/select/select.view.yaml +50 -0
  29. package/src/components/sidebar/sidebar.handlers.js +36 -0
  30. package/src/components/sidebar/sidebar.store.js +139 -0
  31. package/src/components/sidebar/sidebar.view.yaml +190 -0
  32. package/src/entry-iife-layout.js +15 -0
  33. package/src/entry-iife-ui.js +18 -0
  34. package/src/index.js +17 -0
  35. package/src/lib/uhtml.js +9 -0
  36. package/src/primitives/button.js +306 -0
  37. package/src/primitives/image.js +234 -0
  38. package/src/primitives/input.js +208 -0
  39. package/src/primitives/svg.js +95 -0
  40. package/src/primitives/text.js +141 -0
  41. package/src/primitives/textarea.js +103 -0
  42. package/src/primitives/view.js +217 -0
  43. package/src/setup.js +16 -0
  44. package/src/styles/anchorStyles.js +13 -0
  45. package/src/styles/buttonMarginStyles.js +84 -0
  46. package/src/styles/cursorStyles.js +12 -0
  47. package/src/styles/flexChildStyles.js +43 -0
  48. package/src/styles/flexDirectionStyles.js +74 -0
  49. package/src/styles/marginStyles.js +13 -0
  50. package/src/styles/paddingSvgStyles.js +120 -0
  51. package/src/styles/scrollStyles.js +22 -0
  52. package/src/styles/textColorStyles.js +14 -0
  53. package/src/styles/textStyles.js +62 -0
  54. package/src/styles/viewStyles.js +119 -0
package/README.md CHANGED
@@ -9,6 +9,8 @@ The following:
9
9
  * rtgl-image
10
10
  * rtgl-svg
11
11
  * rtgl-button
12
+ * rtgl-input
13
+ * rtgl-textarea
12
14
 
13
15
  All UI components should be able to be built from the above primitives
14
16
 
@@ -17,44 +19,31 @@ All UI components should be able to be built from the above primitives
17
19
 
18
20
  ### Install dependencies
19
21
 
20
- ```
21
- bun install
22
- ```
23
-
24
- ### Generate test screens
25
22
 
26
- Generate all test screens
27
23
 
24
+ ```bash
25
+ bun install
28
26
  ```
29
- bun run esbuild
30
- bun run ./viz/cli.js generate
31
- bunx serve ./viz/_site
32
- ```
33
-
34
- Visit your browser at http://localhost:3000/view
35
27
 
36
- It should show you all the test cases for View compoenent, and can navigate to other components on the left sidebar
37
28
 
38
- ### Report
39
29
 
40
- Make sure the run `generate` first
41
- ```
42
- bun run ./viz/cli.js report
43
- ```
44
-
45
- Visit your browser at http://localhost:3000/report (make sure you're still serving the `./viz/_site` folder)
46
30
 
47
- This will compare any changes between current version and the `gold` version screenshots
31
+ ### Generate test screens
48
32
 
49
- ### Accept
33
+ Bundles the code to be used for `rettangoli-vt`
50
34
 
51
- ```
52
- bun run ./viz/cli.js accept
35
+ ```bash
36
+ bun run build:dev
53
37
  ```
54
38
 
55
- Updates the `gold` version screenshots with the current version.
56
-
57
- Run this after you have made sure that the report is what you expect
39
+ Uses `rettangoli-vt` to generates test screens
58
40
 
41
+ ```bash
42
+ bun run ../rettangoli-cli/cli.js vt generate --skip-screenshots
43
+ ```
59
44
 
45
+ You can then access the generates screens
60
46
 
47
+ ```bash
48
+ bunx serve ./viz/_site
49
+ ```
@@ -1,24 +1,24 @@
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}
1
+ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,c)=>{s+=r+(t[c]||"")}),s}var X=["xs","sm","md","lg","xl"],I={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"},y=Object.keys(I),x=e=>e.concat(X.flatMap(t=>e.map(s=>`${t}-${s}`))),V={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 s="";for(let[r,c]of Object.entries(V)){r!=="default"&&(s+=`${c} {`);for(let[i,n]of Object.entries(e)){let l=t[i]?` ${t[i]} `:" ";for(let[a,d]of Object.entries(n)){let u=I[i],f=d.startsWith("--")?`var(${d})`:d,v=r==="default"?i:`${r}-${i}`,T=r==="default"?`h-${i}`:`${r}-h-${i}`;if(u){let D=u.split(" ").map(J=>`${J}: ${f};`).join(" ");s+=`
2
+ :host([${v}="${a}"])${l}{
3
+ ${D}
4
4
  }
5
- :host([${O}="${c}"]:hover)${h}{
6
- ${W}
5
+ :host([${T}="${a}"]:hover)${l}{
6
+ ${D}
7
7
  }
8
- `}else i+=`
9
- :host([${v}="${c}"])${h}{
8
+ `}else s+=`
9
+ :host([${v}="${a}"])${l}{
10
10
  ${d}
11
11
  }
12
- :host([${O}="${c}"]:hover)${h}{
12
+ :host([${T}="${a}"]:hover)${l}{
13
13
  ${d}
14
14
  }
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
- ${s.trim()}
15
+ `}}r!=="default"&&(s+="}")}return s};function Y(e){if(e===null||e.includes("/"))return!1;let t=String(e);return/[0-9]$/.test(t)}var Z=e=>/%$/.test(e),g=e=>{if(e!==void 0)return Z(e)?e:Y(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 w(e,t=":host"){let s="";for(let[r,c]of Object.entries(V)){r!=="default"&&(s+=`${c} {
16
+ `);let i="";for(let[n,l]of Object.entries(e[r]))l!=null&&(i+=`${n}: ${l};
17
+ `);s+=`${t} {
18
+ ${i.trim()}
19
19
  }
20
- `,r!=="default"&&(i+=`}
21
- `)}return i}var b=n`
20
+ `,r!=="default"&&(s+=`}
21
+ `)}return s}var S=h`
22
22
  :host([flex="0"]) {
23
23
  flex: 0;
24
24
  }
@@ -58,7 +58,7 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
58
58
  :host([flex="12"]) {
59
59
  flex: 12;
60
60
  }
61
- `;var J={mt:o,mr:o,mb:o,ml:o,m:o,mh:o,mv:o,s:{sm:`
61
+ `;var tt={mt:o,mr:o,mb:o,ml:o,m:o,mh:o,mv:o,s:{sm:`
62
62
  height: 28px;
63
63
  padding-left: 12px;
64
64
  padding-right: 12px;
@@ -104,7 +104,7 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
104
104
  `,lk:`
105
105
  background-color: transparent;
106
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`
107
+ `}},et={mt:"button",mr:"button",mb:"button",ml:"button",m:"button",mh:"button",mv:"button",s:"button",v:"button"},L=p(tt,et);var _=h`
108
108
  a, a:link, a:visited, a:hover, a:active {
109
109
  color: inherit;
110
110
  text-decoration: none;
@@ -114,7 +114,7 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
114
114
  margin: 0;
115
115
  font: inherit;
116
116
  }
117
- `;var A=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(n`
117
+ `;var $=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(h`
118
118
  :host {
119
119
  display: contents;
120
120
  }
@@ -127,7 +127,7 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
127
127
  flex-direction: row;
128
128
  align-items: center;
129
129
  justify-content: center;
130
- gap: var(--spacing-sm);
130
+ gap: var(--spacing-lg);
131
131
  border-width: 0px;
132
132
  border-style: solid;
133
133
  border-color: var(--border);
@@ -228,15 +228,37 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
228
228
  text-decoration: underline;
229
229
  }
230
230
 
231
- ${y}
231
+ /* Square button styles */
232
+ :host([sq]) button {
233
+ width: 32px;
234
+ height: 32px;
235
+ padding: 0;
236
+ gap: 0;
237
+ }
238
+
239
+ :host([sq][s="sm"]) button {
240
+ width: 24px;
241
+ height: 24px;
242
+ padding: 0;
243
+ gap: 0;
244
+ }
245
+
246
+ :host([sq][s="lg"]) button {
247
+ width: 40px;
248
+ height: 40px;
249
+ padding: 0;
250
+ gap: 0;
251
+ }
252
+
253
+ ${_}
232
254
 
233
255
  a {
234
256
  display: contents;
235
257
  }
236
258
 
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`
259
+ ${L}
260
+ ${S}
261
+ `))}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","sq","ip"]}connectedCallback(){this._updateButton()}attributeChangedCallback(t,s,r){this._updateButton()}_updateButton(){this.shadow.innerHTML="",this._updateIcon(),this.hasAttribute("sq")||this._updateWidth(),this.hasAttribute("disabled")?this._buttonElement.setAttribute("disabled",""):this._buttonElement.removeAttribute("disabled");let s=this.getAttribute("href");if(s){let r=document.createElement("a");r.setAttribute("href",s);let c=this.getAttribute("target");c&&r.setAttribute("target",c),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 s={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},c=s[this.getAttribute("v")]||"pr-fg",i=18;if(this.hasAttribute("sq")){let l={sm:14,lg:22},a=this.getAttribute("s");i=l[a]||18}else i=r[this.getAttribute("t")]||18;this._iconElement=document.createElement("rtgl-svg"),this._iconElement.setAttribute("svg",t),this._iconElement.setAttribute("c",c),this._iconElement.setAttribute("wh",i.toString()),this.getAttribute("ip")==="s"?this._buttonElement.insertBefore(this._iconElement,this._slotElement):this._buttonElement.appendChild(this._iconElement)}}_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="")}},B=({render:e,html:t})=>$;var H=h`
240
262
 
241
263
  :host([d="h"]) {
242
264
  flex-direction: row;
@@ -307,7 +329,7 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
307
329
  justify-content: center;
308
330
  }
309
331
  }
310
- `;var Y={cur:{p:"pointer",m:"move",grab:"grab",grabbing:"grabbing"}},f=p(Y);var L=n`
332
+ `;var it={cur:{p:"pointer",m:"move",grab:"grab",grabbing:"grabbing"}},m=p(it);var U=h`
311
333
  :host([sh]:not([sv])) {
312
334
  overflow-x: scroll;
313
335
  flex-wrap: nowrap;
@@ -325,7 +347,7 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
325
347
  flex-wrap: nowrap;
326
348
  }
327
349
 
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:`
350
+ `;var E={xs:"--border-width-xs",sm:"--border-width-sm",md:"--border-width-md",lg:"--border-width-lg",xl:"--border-width-xl"},st={bgc:{pr:`
329
351
  background-color: var(--primary);
330
352
  `,se:`
331
353
  background-color: var(--secondary);
@@ -365,7 +387,7 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
365
387
  left: 0;
366
388
  top: 0;
367
389
  height: 100%;
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`
390
+ `},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:E,bwt:E,bwr:E,bwb:E,bwl:E,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(st);var rt={mt:o,mr:o,mb:o,ml:o,m:o,mh:o,mv:o},b=p(rt);var C=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(h`
369
391
  slot {
370
392
  display: contents;
371
393
  }
@@ -384,13 +406,13 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
384
406
  flex-wrap: wrap;
385
407
  }
386
408
 
387
- ${b}
388
- ${L}
409
+ ${S}
410
+ ${U}
389
411
  ${H}
390
- ${x}
391
- ${f}
412
+ ${b}
413
+ ${m}
392
414
  ${k}
393
- ${y}
415
+ ${_}
394
416
 
395
417
  :host([href]) {
396
418
  cursor: pointer;
@@ -405,7 +427,7 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
405
427
  bottom: 0;
406
428
  z-index: 1;
407
429
  }
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:`
430
+ `))}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","op",...x([...y,"wh","w","h","hidden","sh","sv"])]}_styles={default:{},sm:{},md:{},lg:{},xl:{}};_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),s=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,s?this._linkElement.target=s:this._linkElement.removeAttribute("target")):this._linkElement&&(this.shadow.removeChild(this._linkElement),this._linkElement=null)}attributeChangedCallback(t,s,r){if(t==="href"||t==="target"){this._updateDOM();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(i=>{let n=v=>`${i==="default"?"":`${i}-`}${v}`,l=this.getAttribute(n("wh")),a=g(l===null?this.getAttribute(n("w")):l),d=g(l===null?this.getAttribute(n("h")):l),u=this.getAttribute(n("op")),f=this.getAttribute(n("z"));f!==null&&(this._styles[i]["z-index"]=f),u!==null&&(this._styles[i].opacity=u),a==="f"?this._styles[i].width="var(--width-stretch)":a!==void 0&&(this._styles[i].width=a,this._styles[i]["min-width"]=a,this._styles[i]["max-width"]=a),d==="f"?this._styles[i].height="100%":d!==void 0&&(this._styles[i].height=d,this._styles[i]["min-height"]=d,this._styles[i]["max-height"]=d),this.hasAttribute(n("hidden"))&&(this._styles[i].display="none !important"),this.hasAttribute(n("visible"))&&(this._styles[i].display="flex !important")});let c=w(this._styles);c!==this._lastStyleString&&(this._styleElement.textContent=c,this._lastStyleString=c)}},q=({render:e,html:t})=>C;var ot={ta:{s:"start",c:"center",e:"end",j:"justify"},s:{h1:`
409
431
  font-size: var(--h1-font-size);
410
432
  font-weight: var(--h1-font-weight);
411
433
  line-height: var(--h1-line-height);
@@ -445,7 +467,7 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
445
467
  font-weight: var(--xs-font-weight);
446
468
  line-height: var(--xs-line-height);
447
469
  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`
470
+ `}},N=p(ot);var nt={c:{fg:"--foreground",de:"--destructive","pr-fg":"--primary-foreground","se-fg":"--secondary-foreground","mu-fg":"--muted-foreground","ac-fg":"--accent-foreground"}},A=p(nt);var z=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(h`
449
471
  :host {
450
472
  display: block;
451
473
  font-size: var(--md-font-size);
@@ -477,10 +499,10 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
477
499
  z-index: 1;
478
500
  }
479
501
  ${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`
502
+ ${A}
503
+ ${b}
504
+ ${m}
505
+ `))}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,s,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"),s=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,s?this._linkElement.target=s:this._linkElement.removeAttribute("target")):this._linkElement&&(this.shadow.removeChild(this._linkElement),this._linkElement=null)}},P=({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(h`
484
506
  :host {
485
507
  border-style: solid;
486
508
  box-sizing: border-box;
@@ -504,7 +526,7 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
504
526
  width: 100%;
505
527
  }
506
528
 
507
- ${y}
529
+ ${_}
508
530
 
509
531
  a {
510
532
  display: block;
@@ -517,9 +539,9 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
517
539
  }
518
540
 
519
541
  ${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`
542
+ ${b}
543
+ ${m}
544
+ `))}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 x([...y,"key","src","href","target","wh","w","h","hidden","height","width"])}_styles={default:{},sm:{},md:{},lg:{},xl:{}};_lastStyleString="";_updateDOM(){let t=this.getAttribute("href"),s=this.getAttribute("target");t?(this._linkElement||(this._linkElement=document.createElement("a")),this._linkElement.href=t,s?this._linkElement.target=s: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,s,r){if(t==="href"||t==="target"){this._updateDOM();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(i=>{let n=v=>`${i==="default"?"":`${i}-`}${v}`,l=this.getAttribute(n("wh")),a=g(l===null?this.getAttribute(n("w")):l),d=g(l===null?this.getAttribute(n("h")):l),u=this.getAttribute(n("o")),f=this.getAttribute(n("z"));f!==null&&(this._styles[i]["z-index"]=f),u!==null&&(this._styles[i].opacity=u),a==="f"?this._styles[i].width="var(--width-stretch)":a!==void 0&&(this._styles[i].width=a,this._styles[i]["min-width"]=a,this._styles[i]["max-width"]=a),d==="f"?this._styles[i].height="100%":d!==void 0&&(this._styles[i].height=d,this._styles[i]["min-height"]=d,this._styles[i]["max-height"]=d),this.hasAttribute(n("hidden"))&&(this._styles[i].display="none !important"),this.hasAttribute(n("visible"))&&(this._styles[i].display="block !important")});let c=w(this._styles);c!==this._lastStyleString&&(this._styleElement.textContent=c,this._lastStyleString=c),this._updateImageAttributes()}_updateImageAttributes(){let t=this.getAttribute("src"),s=this.getAttribute("width"),r=this.getAttribute("height");t!==null&&this._imgElement.setAttribute("src",t),s!==null&&this._imgElement.setAttribute("width",s),r!==null&&this._imgElement.setAttribute("height",r)}connectedCallback(){this._updateImageAttributes()}},K=({render:e,html:t})=>M;var Q=h`
523
545
  :host([pt="xs"]) svg {
524
546
  padding-top: var(--spacing-xs);
525
547
  }
@@ -635,12 +657,63 @@ var rettangoli=(()=>{function n(e,...t){let i="";return e.forEach((r,a)=>{i+=r+(
635
657
  padding-top: var(--spacing-xl);
636
658
  padding-bottom: var(--spacing-xl);
637
659
  }
638
- `;var j=class e extends HTMLElement{static styleSheet=null;static _icons={};static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(n`
660
+ `;var j=class e extends HTMLElement{static styleSheet=null;static _icons={};static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(h`
661
+ :host {
662
+ color: var(--foreground);
663
+ }
664
+ ${A}
665
+ ${Q}
666
+ ${S}
667
+ ${m}
668
+ `))}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,s){e._icons[t]=s}connectedCallback(){this._updateSizing(),this._render()}attributeChangedCallback(t,s,r){this._updateSizing(),this._render()}_updateSizing(){let t=this.getAttribute("wh"),s=g(t===null?this.getAttribute("w"):t),r=g(t===null?this.getAttribute("h"):t);s&&(this.style.width=s),r&&(this.style.height=r)}_render(){try{let t=this.getAttribute("svg"),s=e._icons[t]||(window.rtglIcons||{})[t];if(s){this.shadow.innerHTML=s;return}}catch(t){console.log("error in rtgl-svg render",t)}this.shadow.innerHTML=""}},R=({render:e,html:t})=>j;var O=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(h`
669
+ :host {
670
+ display: contents;
671
+ }
672
+ input {
673
+ background-color: var(--background);
674
+ font-size: var(--sm-font-size);
675
+ font-weight: var(--sm-font-weight);
676
+ line-height: var(--sm-line-height);
677
+ letter-spacing: var(--sm-letter-spacing);
678
+ border: 1px solid var(--ring);
679
+ border-radius: var(--border-radius-lg);
680
+ padding-left: var(--spacing-md);
681
+ padding-right: var(--spacing-md);
682
+ height: 32px;
683
+ color: var(--foreground);
684
+ outline: none;
685
+ }
686
+ input:focus {
687
+ border-color: var(--foreground);
688
+ }
689
+ input:disabled {
690
+ cursor: not-allowed;
691
+ }
692
+ ${b}
693
+ ${m}
694
+ `))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._styles={default:{},sm:{},md:{},lg:{},xl:{}},this._lastStyleString="",this._inputElement=document.createElement("input"),this._styleElement=document.createElement("style"),this.shadow.appendChild(this._styleElement),this.shadow.appendChild(this._inputElement),this._inputElement.addEventListener("keydown",this._onChange)}static get observedAttributes(){return["key","type","placeholder","disabled",...x([...y,"wh","w","h","hidden","visible","op","z"])]}get value(){return this._inputElement.value}_onChange=t=>{this.dispatchEvent(new CustomEvent("input-keydown",{detail:{value:this._inputElement.value}}))};attributeChangedCallback(t,s,r){if(["type","placeholder","disabled"].includes(t)){this._updateInputAttributes();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(i=>{let n=v=>`${i==="default"?"":`${i}-`}${v}`,l=this.getAttribute(n("wh")),a=g(l===null?this.getAttribute(n("w")):l),d=g(l===null?this.getAttribute(n("h")):l),u=this.getAttribute(n("op")),f=this.getAttribute(n("z"));f!==null&&(this._styles[i]["z-index"]=f),u!==null&&(this._styles[i].opacity=u),a==="f"?this._styles[i].width="var(--width-stretch)":a!==void 0&&(this._styles[i].width=a,this._styles[i]["min-width"]=a,this._styles[i]["max-width"]=a),d==="f"?this._styles[i].height="100%":d!==void 0&&(this._styles[i].height=d,this._styles[i]["min-height"]=d,this._styles[i]["max-height"]=d),this.hasAttribute(n("hidden"))&&(this._styles[i].display="none !important"),this.hasAttribute(n("visible"))&&(this._styles[i].display="block !important")});let c=w(this._styles,"input");c!==this._lastStyleString&&(this._styleElement.textContent=c,this._lastStyleString=c)}_updateInputAttributes(){let t=this.getAttribute("type")||"text",s=this.getAttribute("placeholder"),r=this.hasAttribute("disabled");this._inputElement.setAttribute("type",t),s!==null?this._inputElement.setAttribute("placeholder",s):this._inputElement.removeAttribute("placeholder"),r?this._inputElement.setAttribute("disabled",""):this._inputElement.removeAttribute("disabled")}connectedCallback(){this._updateInputAttributes()}},G=({render:e,html:t})=>O;var W=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(h`
639
695
  :host {
696
+ display: contents;
697
+ }
698
+ textarea {
699
+ font-family: inherit;
700
+ background-color: var(--background);
701
+ font-size: var(--sm-font-size);
702
+ font-weight: var(--sm-font-weight);
703
+ line-height: var(--sm-line-height);
704
+ letter-spacing: var(--sm-letter-spacing);
705
+ border: 1px solid var(--ring);
706
+ border-radius: var(--border-radius-lg);
707
+ padding-top: var(--spacing-md);
708
+ padding-bottom: var(--spacing-md);
709
+ padding-left: var(--spacing-md);
710
+ padding-right: var(--spacing-md);
640
711
  color: var(--foreground);
712
+ outline: none;
713
+ }
714
+ textarea:focus {
715
+ border-color: var(--foreground);
641
716
  }
642
- ${$}
643
- ${K}
644
717
  ${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({}));})();
718
+ ${m}
719
+ `))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"closed"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._textareaElement=document.createElement("textarea"),this._textareaElement.setAttribute("type","text"),this.shadow.appendChild(this._textareaElement)}static get observedAttributes(){return["key","w","ellipsis","cols","rows","placeholder"]}get value(){return this._textareaElement.value}set value(t){this._textareaElement.value=t}connectedCallback(){this._updateTextareaAttributes()}attributeChangedCallback(t,s,r){this._updateTextareaAttributes()}_updateTextareaAttributes(){let t=this.getAttribute("cols"),s=this.getAttribute("rows"),r=this.getAttribute("placeholder");t!==null?this._textareaElement.setAttribute("cols",t):this._textareaElement.removeAttribute("cols"),s!==null?this._textareaElement.setAttribute("rows",s):this._textareaElement.removeAttribute("rows"),r!==null?this._textareaElement.setAttribute("placeholder",r):this._textareaElement.removeAttribute("placeholder")}},F=({render:e,html:t})=>W;customElements.define("rtgl-button",B({}));customElements.define("rtgl-view",q({}));customElements.define("rtgl-text",P({}));customElements.define("rtgl-image",K({}));customElements.define("rtgl-svg",R({}));customElements.define("rtgl-input",G({}));customElements.define("rtgl-textarea",F({}));})();