@vandeurenglenn/lite-elements 0.3.80 → 0.3.81

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- import{_ as t,a as e}from"./tslib.es6-B87RQr7F.js";import{s,r as a,x as o}from"./dark-mode-m29sAj4H.js";import{e as l}from"./custom-element-B_TPyPQO.js";import"./elevation.js";import c from"./button.css.js";let r=(()=>{let r,i,n,h,b,m,u=[l("custom-button")],g=[],d=s,_=[],p=[],y=[],f=[],v=[],L=[],I=[],j=[];return class extends d{static{i=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;n=[a({attribute:"has-icon",reflect:!0})],h=[a({attribute:"type",reflect:!0})],b=[a({attribute:!0})],m=[a({attribute:"has-label",reflect:!0})],t(this,null,n,{kind:"accessor",name:"hasIcon",static:!1,private:!1,access:{has:t=>"hasIcon"in t,get:t=>t.hasIcon,set:(t,e)=>{t.hasIcon=e}},metadata:e},_,p),t(this,null,h,{kind:"accessor",name:"type",static:!1,private:!1,access:{has:t=>"type"in t,get:t=>t.type,set:(t,e)=>{t.type=e}},metadata:e},y,f),t(this,null,b,{kind:"accessor",name:"label",static:!1,private:!1,access:{has:t=>"label"in t,get:t=>t.label,set:(t,e)=>{t.label=e}},metadata:e},v,L),t(this,null,m,{kind:"accessor",name:"hasLabel",static:!1,private:!1,access:{has:t=>"hasLabel"in t,get:t=>t.hasLabel,set:(t,e)=>{t.hasLabel=e}},metadata:e},I,j),t(null,r={value:i},u,{kind:"class",name:i.name,metadata:e},null,g),i=r.value,e&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#t=e(this,_,void 0);get hasIcon(){return this.#t}set hasIcon(t){this.#t=t}#e=(e(this,p),e(this,y,"text"));get type(){return this.#e}set type(t){this.#e=t}#s=(e(this,f),e(this,v,void 0));get label(){return this.#s}set label(t){this.#s=t}#a=(e(this,L),e(this,I,void 0));get hasLabel(){return this.#a}set hasLabel(t){this.#a=t}static styles=[c];firstRender(){const t=Array.from(this.shadowRoot.querySelectorAll("slot"));for(const e of t)e.addEventListener("slotchange",(()=>this.#o(e)));if(t?.length>0)for(const e of t)this.#o(e)}onChange(t,e){"label"===t&&(this.hasLabel=!!e)}#o=(e(this,j),t=>{"icon"===t.getAttribute("name")&&(this.hasIcon=0!==Array.from(t?.assignedNodes()||[]).length)});render(){return o`
1
+ import{_ as t,a as e}from"./tslib.es6-B87RQr7F.js";import{s,r as a,x as o}from"./dark-mode-m29sAj4H.js";import{e as l}from"./custom-element-B_TPyPQO.js";import"./elevation.js";import c from"./button.css.js";let r=(()=>{let r,i,n,h,b,m,u=[l("custom-button")],g=[],d=s,p=[],_=[],y=[],f=[],v=[],L=[],I=[],j=[];return class extends d{static{i=this}static{const e="function"==typeof Symbol&&Symbol.metadata?Object.create(d[Symbol.metadata]??null):void 0;n=[a({attribute:"has-icon",reflect:!0})],h=[a({attribute:"type",reflect:!0})],b=[a({attribute:!0})],m=[a({attribute:"has-label",reflect:!0})],t(this,null,n,{kind:"accessor",name:"hasIcon",static:!1,private:!1,access:{has:t=>"hasIcon"in t,get:t=>t.hasIcon,set:(t,e)=>{t.hasIcon=e}},metadata:e},p,_),t(this,null,h,{kind:"accessor",name:"type",static:!1,private:!1,access:{has:t=>"type"in t,get:t=>t.type,set:(t,e)=>{t.type=e}},metadata:e},y,f),t(this,null,b,{kind:"accessor",name:"label",static:!1,private:!1,access:{has:t=>"label"in t,get:t=>t.label,set:(t,e)=>{t.label=e}},metadata:e},v,L),t(this,null,m,{kind:"accessor",name:"hasLabel",static:!1,private:!1,access:{has:t=>"hasLabel"in t,get:t=>t.hasLabel,set:(t,e)=>{t.hasLabel=e}},metadata:e},I,j),t(null,r={value:i},u,{kind:"class",name:i.name,metadata:e},null,g),i=r.value,e&&Object.defineProperty(i,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:e})}#t=e(this,p,void 0);get hasIcon(){return this.#t}set hasIcon(t){this.#t=t}#e=(e(this,_),e(this,y,"text"));get type(){return this.#e}set type(t){this.#e=t}#s=(e(this,f),e(this,v,void 0));get label(){return this.#s}set label(t){this.#s=t}#a=(e(this,L),e(this,I,void 0));get hasLabel(){return this.#a}set hasLabel(t){this.#a=t}static styles=[c];firstRender(){const t=Array.from(this.shadowRoot.querySelectorAll("slot"));for(const e of t)e.addEventListener("slotchange",(()=>this.#o(e)));if(t?.length>0)for(const e of t)this.#o(e)}onChange(t,e){"label"===t&&(this.hasLabel=!!e)}#o=(e(this,j),t=>{"icon"===t.getAttribute("name")&&(this.hasIcon=0!==Array.from(t?.assignedNodes()||[]).length)});render(){return o`
2
2
  <button label=${this.label}>
3
3
  <custom-elevation></custom-elevation>
4
4
  <slot name="icon"></slot>
5
- ${this.label}
5
+ <span class="label">${this.label}</span>
6
6
  <span class="hover"></span>
7
7
  </button>
8
8
  `}static{e(i,g)}},i})();export{r as CustomButton};
package/exports/button.js CHANGED
@@ -77,7 +77,7 @@ let CustomButton = (() => {
77
77
  <button label=${this.label}>
78
78
  <custom-elevation></custom-elevation>
79
79
  <slot name="icon"></slot>
80
- ${this.label}
80
+ <span class="label">${this.label}</span>
81
81
  <span class="hover"></span>
82
82
  </button>
83
83
  `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vandeurenglenn/lite-elements",
3
- "version": "0.3.80",
3
+ "version": "0.3.81",
4
4
  "description": "set of lite elements following Material Design 3 spec",
5
5
  "type": "module",
6
6
  "scripts": {