@desktalk/ui 0.1.0-alpha.2 → 0.1.0-alpha.3

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.
@@ -860,7 +860,7 @@
860
860
  width: 1em;
861
861
  height: 1em;
862
862
  }
863
- `;var It="dt-button-inner",C=class extends HTMLElement{static get observedAttributes(){return["variant","size","disabled","fullwidth","type"]}_button;_slot;get variant(){let t=this.getAttribute("variant");return t==="secondary"||t==="ghost"||t==="danger"?t:"primary"}set variant(t){this.setAttribute("variant",t)}get size(){let t=this.getAttribute("size");return t==="sm"||t==="lg"?t:"md"}set size(t){this.setAttribute("size",t)}get disabled(){return this.hasAttribute("disabled")}set disabled(t){t?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get fullwidth(){return this.hasAttribute("fullwidth")}set fullwidth(t){t?this.setAttribute("fullwidth",""):this.removeAttribute("fullwidth")}get type(){let t=this.getAttribute("type");return t==="submit"||t==="reset"?t:"button"}set type(t){this.setAttribute("type",t)}constructor(){super();let t=this.attachShadow({mode:"open"}),e=document.createElement("style");e.textContent=nt,t.appendChild(e),this._button=document.createElement("button"),this._button.className=It,this._button.type=this.type,this._button.disabled=this.disabled,this._slot=document.createElement("slot"),this._button.appendChild(this._slot),t.appendChild(this._button)}attributeChangedCallback(t,e,n){switch(t){case"disabled":this._button.disabled=this.disabled;break;case"type":this._button.type=this.type;break}}};var rt=`:host {
863
+ `;var It="dt-button-inner",C=class extends HTMLElement{static get observedAttributes(){return["variant","size","disabled","fullwidth","type"]}_button;_slot;get variant(){let t=this.getAttribute("variant");return t==="secondary"||t==="ghost"||t==="danger"?t:"primary"}set variant(t){this.setAttribute("variant",t)}get size(){let t=this.getAttribute("size");return t==="sm"||t==="lg"?t:"md"}set size(t){this.setAttribute("size",t)}get disabled(){return this.hasAttribute("disabled")}set disabled(t){t?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get fullwidth(){return this.hasAttribute("fullwidth")}set fullwidth(t){t?this.setAttribute("fullwidth",""):this.removeAttribute("fullwidth")}get type(){let t=this.getAttribute("type");return t==="submit"||t==="reset"?t:"button"}set type(t){this.setAttribute("type",t)}constructor(){super();let t=this.attachShadow({mode:"open"}),e=document.createElement("style");e.textContent=nt,t.appendChild(e),this._button=document.createElement("button"),this._button.className=It,this._button.type=this.type,this._button.disabled=this.disabled,this._slot=document.createElement("slot"),this._button.appendChild(this._slot),this._button.addEventListener("click",()=>{if(this.type==="submit"&&!this.disabled){let n=this.closest("form");n&&n.requestSubmit()}}),t.appendChild(this._button)}attributeChangedCallback(t,e,n){switch(t){case"disabled":this._button.disabled=this.disabled;break;case"type":this._button.type=this.type;break}}};var rt=`:host {
864
864
  display: block;
865
865
  }
866
866