@rettangoli/ui 0.1.2-rc3 → 0.1.2-rc31

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 (56) hide show
  1. package/dist/rettangoli-iife-layout.min.js +115 -43
  2. package/dist/rettangoli-iife-ui.min.js +187 -67
  3. package/package.json +5 -3
  4. package/src/cli/buildSvg.js +86 -0
  5. package/src/cli/index.js +1 -0
  6. package/src/common.js +19 -0
  7. package/src/components/breadcrumb/breadcrumb.handlers.js +9 -0
  8. package/src/components/breadcrumb/breadcrumb.store.js +29 -0
  9. package/src/components/breadcrumb/breadcrumb.view.yaml +64 -0
  10. package/src/components/dropdownMenu/dropdownMenu.handlers.js +4 -4
  11. package/src/components/dropdownMenu/dropdownMenu.store.js +5 -17
  12. package/src/components/dropdownMenu/dropdownMenu.view.yaml +15 -13
  13. package/src/components/form/form.handlers.js +173 -25
  14. package/src/components/form/form.store.js +176 -22
  15. package/src/components/form/form.view.yaml +217 -33
  16. package/src/components/pageOutline/pageOutline.handlers.js +57 -17
  17. package/src/components/pageOutline/pageOutline.store.js +46 -1
  18. package/src/components/pageOutline/pageOutline.view.yaml +7 -5
  19. package/src/components/popoverInput/popoverInput.handlers.js +99 -0
  20. package/src/components/popoverInput/popoverInput.store.js +48 -0
  21. package/src/components/popoverInput/popoverInput.view.yaml +55 -0
  22. package/src/components/select/select.handlers.js +116 -11
  23. package/src/components/select/select.store.js +84 -18
  24. package/src/components/select/select.view.yaml +40 -10
  25. package/src/components/sidebar/sidebar.view.yaml +1 -1
  26. package/src/components/sliderInput/sliderInput.handlers.js +41 -0
  27. package/src/components/sliderInput/sliderInput.store.js +18 -0
  28. package/src/components/sliderInput/sliderInput.view.yaml +42 -0
  29. package/src/components/table/table.handlers.js +1 -1
  30. package/src/components/tabs/tabs.handlers.js +10 -0
  31. package/src/components/tabs/tabs.store.js +29 -0
  32. package/src/components/tabs/tabs.view.yaml +64 -0
  33. package/src/components/tooltip/tooltip.handlers.js +0 -0
  34. package/src/components/tooltip/tooltip.store.js +12 -0
  35. package/src/components/tooltip/tooltip.view.yaml +27 -0
  36. package/src/components/waveform/waveform.handlers.js +92 -0
  37. package/src/components/waveform/waveform.store.js +17 -0
  38. package/src/components/waveform/waveform.view.yaml +38 -0
  39. package/src/entry-iife-layout.js +3 -0
  40. package/src/entry-iife-ui.js +4 -0
  41. package/src/index.js +5 -1
  42. package/src/primitives/button.js +10 -0
  43. package/src/primitives/colorPicker.js +9 -0
  44. package/src/primitives/dialog.js +254 -0
  45. package/src/primitives/input.js +41 -11
  46. package/src/primitives/popover.js +280 -0
  47. package/src/primitives/slider.js +18 -9
  48. package/src/primitives/svg.js +2 -0
  49. package/src/primitives/textarea.js +25 -1
  50. package/src/styles/cursorStyles.js +38 -2
  51. package/src/components/dialog/dialog.handlers.js +0 -5
  52. package/src/components/dialog/dialog.store.js +0 -25
  53. package/src/components/dialog/dialog.view.yaml +0 -44
  54. package/src/components/popover/popover.handlers.js +0 -5
  55. package/src/components/popover/popover.store.js +0 -12
  56. package/src/components/popover/popover.view.yaml +0 -57
@@ -1,24 +1,24 @@
1
- var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(t[g]||"")}),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,g]of Object.entries(V)){r!=="default"&&(s+=`${g} {`);for(let[i,o]of Object.entries(e)){let l=t[i]?` ${t[i]} `:" ";for(let[a,d]of Object.entries(o)){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}
1
+ var rettangoli=(()=>{function a(e,...t){let s="";return e.forEach((n,r)=>{s+=n+(t[r]||"")}),s}var Z=["xs","sm","md","lg","xl"],L={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(L),w=e=>e.concat(Z.flatMap(t=>e.map(s=>`${t}-${s}`))),H={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[n,r]of Object.entries(H)){n!=="default"&&(s+=`${r} {`);for(let[i,l]of Object.entries(e)){let h=t[i]?` ${t[i]} `:" ";for(let[d,g]of Object.entries(l)){let f=L[i],v=g.startsWith("--")?`var(${g})`:g,b=n==="default"?i:`${n}-${i}`,D=n==="default"?`h-${i}`:`${n}-h-${i}`;if(f){let B=f.split(" ").map(Y=>`${Y}: ${v};`).join(" ");s+=`
2
+ :host([${b}="${d}"])${h}{
3
+ ${B}
4
4
  }
5
- :host([${T}="${a}"]:hover)${l}{
6
- ${D}
5
+ :host([${D}="${d}"]:hover)${h}{
6
+ ${B}
7
7
  }
8
8
  `}else s+=`
9
- :host([${v}="${a}"])${l}{
10
- ${d}
9
+ :host([${b}="${d}"])${h}{
10
+ ${g}
11
11
  }
12
- :host([${T}="${a}"]:hover)${l}{
13
- ${d}
12
+ :host([${D}="${d}"]:hover)${h}{
13
+ ${g}
14
14
  }
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),c=e=>{if(e!==void 0)return Z(e)?e:Y(e)?`${e}px`:Object.keys(n).includes(e)?`var(${n[e]})`:e},n={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,g]of Object.entries(V)){r!=="default"&&(s+=`${g} {
16
- `);let i="";for(let[o,l]of Object.entries(e[r]))l!=null&&(i+=`${o}: ${l};
15
+ `}}n!=="default"&&(s+="}")}return s};function tt(e){if(e===null||e.includes("/"))return!1;let t=String(e);return/[0-9]$/.test(t)}var et=e=>/%$/.test(e),c=e=>{if(e!==void 0)return et(e)?e:tt(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 x(e,t=":host"){let s="";for(let[n,r]of Object.entries(H)){n!=="default"&&(s+=`${r} {
16
+ `);let i="";for(let[l,h]of Object.entries(e[n]))h!=null&&(i+=`${l}: ${h};
17
17
  `);s+=`${t} {
18
18
  ${i.trim()}
19
19
  }
20
- `,r!=="default"&&(s+=`}
21
- `)}return s}var S=h`
20
+ `,n!=="default"&&(s+=`}
21
+ `)}return s}var _=a`
22
22
  :host([flex="0"]) {
23
23
  flex: 0;
24
24
  }
@@ -58,7 +58,7 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
58
58
  :host([flex="12"]) {
59
59
  flex: 12;
60
60
  }
61
- `;var tt={mt:n,mr:n,mb:n,ml:n,m:n,mh:n,mv:n,s:{sm:`
61
+ `;var it={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 h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
104
104
  `,lk:`
105
105
  background-color: transparent;
106
106
  color: var(--foreground);
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`
107
+ `}},st={mt:"button",mr:"button",mb:"button",ml:"button",m:"button",mh:"button",mv:"button",s:"button",v:"button"},I=p(it,st);var S=a`
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 h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
114
114
  margin: 0;
115
115
  font: inherit;
116
116
  }
117
- `;var $=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(h`
117
+ `;var C=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(a`
118
118
  :host {
119
119
  display: contents;
120
120
  }
@@ -250,15 +250,15 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
250
250
  gap: 0;
251
251
  }
252
252
 
253
- ${_}
253
+ ${S}
254
254
 
255
255
  a {
256
256
  display: contents;
257
257
  }
258
258
 
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 g=this.getAttribute("target");g&&r.setAttribute("target",g),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},g=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",g),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=c(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`
259
+ ${I}
260
+ ${_}
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,n){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 n=document.createElement("a");n.setAttribute("href",s);let r=this.getAttribute("target");r&&n.setAttribute("target",r),n.appendChild(this._buttonElement),this.shadow.appendChild(n),this._containerElement=n}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"},n={sm:14,md:18,lg:22},r=s[this.getAttribute("v")]||"pr-fg",i=18;if(this.hasAttribute("sq")){let h={sm:14,lg:22},d=this.getAttribute("s");i=h[d]||18}else i=n[this.getAttribute("t")]||18;this._iconElement=document.createElement("rtgl-svg"),this._iconElement.setAttribute("svg",t),this._iconElement.setAttribute("c",r),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=c(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="")}getBoundingClientRect(){return this._buttonElement?this._buttonElement.getBoundingClientRect():super.getBoundingClientRect()}},q=({render:e,html:t})=>C;var U=a`
262
262
 
263
263
  :host([d="h"]) {
264
264
  flex-direction: row;
@@ -329,7 +329,7 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
329
329
  justify-content: center;
330
330
  }
331
331
  }
332
- `;var it={cur:{p:"pointer",m:"move",grab:"grab",grabbing:"grabbing"}},m=p(it);var U=h`
332
+ `;var nt={cur:{alias:"alias","all-scroll":"all-scroll",auto:"auto",cell:"cell","col-resize":"col-resize","context-menu":"context-menu",copy:"copy",crosshair:"crosshair",default:"default","e-resize":"e-resize","ew-resize":"ew-resize",grab:"grab",grabbing:"grabbing",help:"help",move:"move","n-resize":"n-resize","ne-resize":"ne-resize","nesw-resize":"nesw-resize","ns-resize":"ns-resize","nw-resize":"nw-resize","nwse-resize":"nwse-resize","no-drop":"no-drop",none:"none","not-allowed":"not-allowed",pointer:"pointer",progress:"progress","row-resize":"row-resize","s-resize":"s-resize","se-resize":"se-resize","sw-resize":"sw-resize",text:"text",url:"url","w-resize":"w-resize",wait:"wait","zoom-in":"zoom-in","zoom-out":"zoom-out",p:"pointer",m:"move"}},m=p(nt);var V=a`
333
333
  :host([sh]:not([sv])) {
334
334
  overflow-x: scroll;
335
335
  flex-wrap: nowrap;
@@ -347,7 +347,7 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
347
347
  flex-wrap: nowrap;
348
348
  }
349
349
 
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:`
350
+ `;var E={xs:"--border-width-xs",sm:"--border-width-sm",md:"--border-width-md",lg:"--border-width-lg",xl:"--border-width-xl"},rt={bgc:{pr:`
351
351
  background-color: var(--primary);
352
352
  `,se:`
353
353
  background-color: var(--secondary);
@@ -387,7 +387,7 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
387
387
  left: 0;
388
388
  top: 0;
389
389
  height: 100%;
390
- `},shadow:{sm:"--shadow-sm",md:"--shadow-md",lg:"--shadow-lg"},pt:n,pr:n,pb:n,pl:n,p:n,ph:n,pv:n,g:n,gv:n,gh:n,bw:E,bwt:E,bwr:E,bwb:E,bwl:E,bc:{pr:"--primary",se:"--secondary",de:"--destructive",fg:"--foreground",bg:"--background",mu:"--muted",ac:"--accent",bo:"--border",tr:"transparent"},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:n,mr:n,mb:n,ml:n,m:n,mh:n,mv:n},b=p(rt);var C=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(h`
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:{pr:"--primary",se:"--secondary",de:"--destructive",fg:"--foreground",bg:"--background",mu:"--muted",ac:"--accent",bo:"--border",tr:"transparent"},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(rt);var ot={mt:o,mr:o,mb:o,ml:o,m:o,mh:o,mv:o},u=p(ot);var $=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(a`
391
391
  slot {
392
392
  display: contents;
393
393
  }
@@ -406,13 +406,13 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
406
406
  flex-wrap: wrap;
407
407
  }
408
408
 
409
- ${S}
409
+ ${_}
410
+ ${V}
410
411
  ${U}
411
- ${H}
412
- ${b}
412
+ ${u}
413
413
  ${m}
414
414
  ${k}
415
- ${_}
415
+ ${S}
416
416
 
417
417
  :host([href]) {
418
418
  cursor: pointer;
@@ -427,7 +427,7 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
427
427
  bottom: 0;
428
428
  z-index: 1;
429
429
  }
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","z"])]}_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 o=v=>`${i==="default"?"":`${i}-`}${v}`,l=this.getAttribute(o("wh")),a=c(l===null?this.getAttribute(o("w")):l),d=c(l===null?this.getAttribute(o("h")):l),u=this.getAttribute(o("op")),f=this.getAttribute(o("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(o("hidden"))&&(this._styles[i].display="none !important"),this.hasAttribute(o("visible"))&&(this._styles[i].display="flex !important")});let g=w(this._styles);g!==this._lastStyleString&&(this._styleElement.textContent=g,this._lastStyleString=g)}},q=({render:e,html:t})=>C;var nt={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",...w([...y,"wh","w","h","hidden","sh","sv","z"])]}_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,n){if(t==="href"||t==="target"){this._updateDOM();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(i=>{let l=b=>`${i==="default"?"":`${i}-`}${b}`,h=this.getAttribute(l("wh")),d=c(h===null?this.getAttribute(l("w")):h),g=c(h===null?this.getAttribute(l("h")):h),f=this.getAttribute(l("op")),v=this.getAttribute(l("z"));v!==null&&(this._styles[i]["z-index"]=v),f!==null&&(this._styles[i].opacity=f),d==="f"?this._styles[i].width="var(--width-stretch)":d!==void 0&&(this._styles[i].width=d,this._styles[i]["min-width"]=d,this._styles[i]["max-width"]=d),g==="f"?this._styles[i].height="100%":g!==void 0&&(this._styles[i].height=g,this._styles[i]["min-height"]=g,this._styles[i]["max-height"]=g),this.hasAttribute(l("hidden"))&&(this._styles[i].display="none !important"),this.hasAttribute(l("visible"))&&(this._styles[i].display="flex !important")});let r=x(this._styles);r!==this._lastStyleString&&(this._styleElement.textContent=r,this._lastStyleString=r)}},N=({render:e,html:t})=>$;var lt={ta:{s:"start",c:"center",e:"end",j:"justify"},s:{h1:`
431
431
  font-size: var(--h1-font-size);
432
432
  font-weight: var(--h1-font-weight);
433
433
  line-height: var(--h1-line-height);
@@ -467,7 +467,7 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
467
467
  font-weight: var(--xs-font-weight);
468
468
  line-height: var(--xs-line-height);
469
469
  letter-spacing: var(--xs-letter-spacing);
470
- `}},N=p(nt);var ot={c:{fg:"--foreground",de:"--destructive","pr-fg":"--primary-foreground","se-fg":"--secondary-foreground","mu-fg":"--muted-foreground","ac-fg":"--accent-foreground"}},A=p(ot);var z=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(h`
470
+ `}},P=p(lt);var at={c:{fg:"--foreground",de:"--destructive","pr-fg":"--primary-foreground","se-fg":"--secondary-foreground","mu-fg":"--muted-foreground","ac-fg":"--accent-foreground"}},A=p(at);var z=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(a`
471
471
  :host {
472
472
  display: block;
473
473
  font-size: var(--md-font-size);
@@ -498,11 +498,11 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
498
498
  bottom: 0;
499
499
  z-index: 1;
500
500
  }
501
- ${N}
501
+ ${P}
502
502
  ${A}
503
- ${b}
503
+ ${u}
504
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=c(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`
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,n){t==="href"||t==="target"?this._updateDOM():this._updateStyling()}_updateStyling(){let t=c(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)}},R=({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(a`
506
506
  :host {
507
507
  border-style: solid;
508
508
  box-sizing: border-box;
@@ -526,7 +526,7 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
526
526
  width: 100%;
527
527
  }
528
528
 
529
- ${_}
529
+ ${S}
530
530
 
531
531
  a {
532
532
  display: block;
@@ -539,9 +539,9 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
539
539
  }
540
540
 
541
541
  ${k}
542
- ${b}
542
+ ${u}
543
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","z"])}_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 o=v=>`${i==="default"?"":`${i}-`}${v}`,l=this.getAttribute(o("wh")),a=c(l===null?this.getAttribute(o("w")):l),d=c(l===null?this.getAttribute(o("h")):l),u=this.getAttribute(o("o")),f=this.getAttribute(o("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(o("hidden"))&&(this._styles[i].display="none !important"),this.hasAttribute(o("visible"))&&(this._styles[i].display="block !important")});let g=w(this._styles);g!==this._lastStyleString&&(this._styleElement.textContent=g,this._lastStyleString=g),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`
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 w([...y,"key","src","href","target","wh","w","h","hidden","height","width","z"])}_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,n){if(t==="href"||t==="target"){this._updateDOM();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(i=>{let l=b=>`${i==="default"?"":`${i}-`}${b}`,h=this.getAttribute(l("wh")),d=c(h===null?this.getAttribute(l("w")):h),g=c(h===null?this.getAttribute(l("h")):h),f=this.getAttribute(l("o")),v=this.getAttribute(l("z"));v!==null&&(this._styles[i]["z-index"]=v),f!==null&&(this._styles[i].opacity=f),d==="f"?this._styles[i].width="var(--width-stretch)":d!==void 0&&(this._styles[i].width=d,this._styles[i]["min-width"]=d,this._styles[i]["max-width"]=d),g==="f"?this._styles[i].height="100%":g!==void 0&&(this._styles[i].height=g,this._styles[i]["min-height"]=g,this._styles[i]["max-height"]=g),this.hasAttribute(l("hidden"))&&(this._styles[i].display="none !important"),this.hasAttribute(l("visible"))&&(this._styles[i].display="block !important")});let r=x(this._styles);r!==this._lastStyleString&&(this._styleElement.textContent=r,this._lastStyleString=r),this._updateImageAttributes()}_updateImageAttributes(){let t=this.getAttribute("src"),s=this.getAttribute("width"),n=this.getAttribute("height");t!==null&&this._imgElement.setAttribute("src",t),s!==null&&this._imgElement.setAttribute("width",s),n!==null&&this._imgElement.setAttribute("height",n)}connectedCallback(){this._updateImageAttributes()}},K=({render:e,html:t})=>M;var F=a`
545
545
  :host([pt="xs"]) svg {
546
546
  padding-top: var(--spacing-xs);
547
547
  }
@@ -657,15 +657,16 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
657
657
  padding-top: var(--spacing-xl);
658
658
  padding-bottom: var(--spacing-xl);
659
659
  }
660
- `;var j=class e extends HTMLElement{static styleSheet=null;static _icons={};static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(h`
660
+ `;var j=class e extends HTMLElement{static styleSheet=null;static _icons={};static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(a`
661
661
  :host {
662
662
  color: var(--foreground);
663
663
  }
664
664
  ${A}
665
- ${Q}
666
- ${S}
665
+ ${F}
666
+ ${u}
667
+ ${_}
667
668
  ${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=c(t===null?this.getAttribute("w"):t),r=c(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
+ `))}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,n){this._updateSizing(),this._render()}_updateSizing(){let t=this.getAttribute("wh"),s=c(t===null?this.getAttribute("w"):t),n=c(t===null?this.getAttribute("h"):t);s&&(this.style.width=s),n&&(this.style.height=n)}_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=""}},Q=({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(a`
669
670
  :host {
670
671
  display: contents;
671
672
  }
@@ -698,9 +699,9 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
698
699
  input:disabled {
699
700
  cursor: not-allowed;
700
701
  }
701
- ${b}
702
+ ${u}
702
703
  ${m}
703
- `))}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("input",this._onChange)}static get observedAttributes(){return["key","type","placeholder","disabled","s",...x([...y,"wh","w","h","hidden","visible","op","z"])]}get value(){return this._inputElement.value}_onChange=t=>{this.dispatchEvent(new CustomEvent("input-change",{detail:{value:this._inputElement.value}}))};attributeChangedCallback(t,s,r){if(["type","placeholder","disabled","s"].includes(t)){this._updateInputAttributes();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(i=>{let o=v=>`${i==="default"?"":`${i}-`}${v}`,l=this.getAttribute(o("wh")),a=c(l===null?this.getAttribute(o("w")):l),d=c(l===null?this.getAttribute(o("h")):l),u=this.getAttribute(o("op")),f=this.getAttribute(o("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(o("hidden"))&&(this._styles[i].display="none !important"),this.hasAttribute(o("visible"))&&(this._styles[i].display="block !important")});let g=w(this._styles,"input");g!==this._lastStyleString&&(this._styleElement.textContent=g,this._lastStyleString=g)}_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`
704
+ `))}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("input",this._onChange)}static get observedAttributes(){return["key","type","placeholder","disabled","value","s",...w([...y,"wh","w","h","hidden","visible","op","z"])]}get value(){return this._inputElement.value}set value(t){this._inputElement.value=t}focus(){this._inputElement.focus()}_onChange=t=>{this.dispatchEvent(new CustomEvent("input-change",{detail:{value:this._inputElement.value}}))};attributeChangedCallback(t,s,n){if(t==="key"&&s!==n){requestAnimationFrame(()=>{let i=this.getAttribute("value");this._inputElement.value=i??""});return}if(["type","placeholder","disabled","value","step","s"].includes(t)){this._updateInputAttributes();return}this._styles={default:{},sm:{},md:{},lg:{},xl:{}},["default","sm","md","lg","xl"].forEach(i=>{let l=b=>`${i==="default"?"":`${i}-`}${b}`,h=this.getAttribute(l("wh")),d=c(h===null?this.getAttribute(l("w")):h),g=c(h===null?this.getAttribute(l("h")):h),f=this.getAttribute(l("op")),v=this.getAttribute(l("z"));v!==null&&(this._styles[i]["z-index"]=v),f!==null&&(this._styles[i].opacity=f),d==="f"?this._styles[i].width="var(--width-stretch)":d!==void 0&&(this._styles[i].width=d,this._styles[i]["min-width"]=d,this._styles[i]["max-width"]=d),g==="f"?this._styles[i].height="100%":g!==void 0&&(this._styles[i].height=g,this._styles[i]["min-height"]=g,this._styles[i]["max-height"]=g),this.hasAttribute(l("hidden"))&&(this._styles[i].display="none !important"),this.hasAttribute(l("visible"))&&(this._styles[i].display="block !important")});let r=x(this._styles,"input");r!==this._lastStyleString&&(this._styleElement.textContent=r,this._lastStyleString=r)}_updateInputAttributes(){let t=this.getAttribute("type")||"text",s=this.getAttribute("placeholder"),n=this.getAttribute("value"),r=this.getAttribute("step"),i=this.hasAttribute("disabled");this._inputElement.setAttribute("type",t),s!==null?this._inputElement.setAttribute("placeholder",s):this._inputElement.removeAttribute("placeholder"),n!==null&&(this._inputElement.value=n),r!==null?this._inputElement.setAttribute("step",r):this._inputElement.removeAttribute("step"),i?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(a`
704
705
  :host {
705
706
  display: contents;
706
707
  }
@@ -723,6 +724,77 @@ var rettangoli=(()=>{function h(e,...t){let s="";return e.forEach((r,g)=>{s+=r+(
723
724
  textarea:focus {
724
725
  border-color: var(--foreground);
725
726
  }
726
- ${b}
727
+ ${u}
727
728
  ${m}
728
- `))}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({}));})();
729
+ `))}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),this._textareaElement.addEventListener("input",this._onChange)}_onChange=t=>{this.dispatchEvent(new CustomEvent("textarea-change",{detail:{value:this._textareaElement.value}}))};static get observedAttributes(){return["key","w","ellipsis","cols","rows","placeholder","value"]}get value(){return this._textareaElement.value}set value(t){this._textareaElement.value=t}connectedCallback(){this._updateTextareaAttributes()}attributeChangedCallback(t,s,n){if(t==="key"&&s!==n){requestAnimationFrame(()=>{let r=this.getAttribute("value");this._textareaElement.value=r??""});return}this._updateTextareaAttributes()}_updateTextareaAttributes(){let t=this.getAttribute("cols"),s=this.getAttribute("rows"),n=this.getAttribute("placeholder"),r=this.getAttribute("value");t!==null?this._textareaElement.setAttribute("cols",t):this._textareaElement.removeAttribute("cols"),s!==null?this._textareaElement.setAttribute("rows",s):this._textareaElement.removeAttribute("rows"),n!==null?this._textareaElement.setAttribute("placeholder",n):this._textareaElement.removeAttribute("placeholder"),r!==null&&(this._textareaElement.value=r)}},J=({render:e,html:t})=>W;var T=class e extends HTMLElement{static styleSheet=null;static initializeStyleSheet(){e.styleSheet||(e.styleSheet=new CSSStyleSheet,e.styleSheet.replaceSync(a`
730
+ :host {
731
+ display: contents;
732
+ }
733
+
734
+ dialog {
735
+ padding: 0;
736
+ border: none;
737
+ background: transparent;
738
+ margin: auto;
739
+ overflow-y: scroll;
740
+ color: inherit;
741
+ max-height: 100vh;
742
+ height: 100vh;
743
+ max-width: 100vw;
744
+ scrollbar-width: none;
745
+ outline: none;
746
+ }
747
+
748
+ dialog::backdrop {
749
+ background-color: rgba(0, 0, 0, 0.5);
750
+ }
751
+
752
+ slot[name="content"] {
753
+ background-color: var(--background) !important;
754
+ display: block;
755
+ padding: var(--spacing-lg);
756
+ border: 1px solid var(--border);
757
+ border-radius: var(--border-radius-md);
758
+ margin-left: var(--spacing-lg);
759
+ margin-right: var(--spacing-lg);
760
+ width: fit-content;
761
+ max-width: calc(100vw - 2 * var(--spacing-lg));
762
+ /* Default margins will be set dynamically via JavaScript for adaptive centering */
763
+ margin-top: 40px;
764
+ margin-bottom: 40px;
765
+ }
766
+
767
+ /* Size attribute styles */
768
+ :host([s="sm"]) slot[name="content"] {
769
+ width: 33vw;
770
+ }
771
+
772
+ :host([s="md"]) slot[name="content"] {
773
+ width: 50vw;
774
+ }
775
+
776
+ :host([s="lg"]) slot[name="content"] {
777
+ width: 80vw;
778
+ }
779
+
780
+ :host([s="f"]) slot[name="content"] {
781
+ width: 100vw;
782
+ margin-left: 0;
783
+ margin-right: 0;
784
+ }
785
+
786
+ @keyframes dialog-in {
787
+ from {
788
+ opacity: 0;
789
+ transform: scale(0.95);
790
+ }
791
+ to {
792
+ opacity: 1;
793
+ transform: scale(1);
794
+ }
795
+ }
796
+
797
+ dialog[open] slot[name="content"] {
798
+ animation: dialog-in 150ms cubic-bezier(0.16, 1, 0.3, 1);
799
+ }
800
+ `))}constructor(){super(),e.initializeStyleSheet(),this.shadow=this.attachShadow({mode:"open"}),this.shadow.adoptedStyleSheets=[e.styleSheet],this._dialogElement=document.createElement("dialog"),this.shadow.appendChild(this._dialogElement),this._slotElement=null,this._isConnected=!1,this._dialogElement.addEventListener("click",t=>{t.target===this._dialogElement&&this.dispatchEvent(new CustomEvent("close",{detail:{}}))}),this._dialogElement.addEventListener("contextmenu",t=>{t.target===this._dialogElement&&(t.preventDefault(),this.dispatchEvent(new CustomEvent("close",{detail:{}})))}),this._dialogElement.addEventListener("cancel",t=>{t.preventDefault(),this.dispatchEvent(new CustomEvent("close",{detail:{}}))})}static get observedAttributes(){return["open","w","s"]}connectedCallback(){this._updateDialog(),this._isConnected=!0,this.hasAttribute("open")&&this._showModal()}attributeChangedCallback(t,s,n){t==="open"?n!==null&&!this._dialogElement.open&&this._isConnected?this._showModal():n===null&&this._dialogElement.open&&this._hideModal():t==="w"&&this._updateWidth()}_updateDialog(){this._updateWidth()}_updateWidth(){let t=this.getAttribute("w");t?this._dialogElement.style.width=t:this._dialogElement.style.width=""}_showModal(){this._dialogElement.open||(this._slotElement||(this._slotElement=document.createElement("slot"),this._slotElement.setAttribute("name","content"),this._dialogElement.appendChild(this._slotElement)),this._dialogElement.showModal(),this._dialogElement.scrollTop=0,this._applyAdaptiveCentering())}_hideModal(){this._dialogElement.open&&(this._dialogElement.close(),this._slotElement&&(this._slotElement.style.marginTop="",this._slotElement.style.marginBottom="",this._dialogElement.removeChild(this._slotElement),this._slotElement=null),this._dialogElement.style.height="")}_applyAdaptiveCentering(){this._slotElement&&requestAnimationFrame(()=>{if(!this._slotElement)return;let t=this._slotElement.offsetHeight,s=window.innerHeight,n=40;if(t>=s-2*n)this._slotElement.style.marginTop=`${n}px`,this._slotElement.style.marginBottom=`${n}px`,this._dialogElement.style.height="100vh";else{let r=s-t,i=Math.floor(r/2);this._slotElement.style.marginTop=`${i}px`,this._slotElement.style.marginBottom=`${i}px`,this._dialogElement.style.height="auto"}})}get dialog(){return this._dialogElement}},X=({render:e,html:t})=>T;customElements.define("rtgl-button",q({}));customElements.define("rtgl-view",N({}));customElements.define("rtgl-text",R({}));customElements.define("rtgl-image",K({}));customElements.define("rtgl-svg",Q({}));customElements.define("rtgl-input",G({}));customElements.define("rtgl-textarea",J({}));customElements.define("rtgl-dialog",X({}));})();