@cas-smartdesign/list-item 7.2.3 → 7.2.4
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.
|
@@ -32,7 +32,7 @@ var window;(window||={})["@cas-smartdesign/list-item"]=(()=>{var G=Object.define
|
|
|
32
32
|
<div class="${s}" title="${O(e)}">
|
|
33
33
|
${this.contentMode==="html"?Ht(t):t}
|
|
34
34
|
</div>
|
|
35
|
-
`:h}updated(s){super.updated(s),(s.has("icon")||s.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&K.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),s.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let s=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,e=this.shadowRoot.querySelector(".caption");e&&(t+=e.scrollWidth-e.clientWidth);let i=this.shadowRoot.querySelector(".description");return i&&(t=Math.max(t,i.scrollWidth-i.clientWidth)),t>0&&t++,s&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(s){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",s))&&s.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},w.ID="sd-list-item",w.ensureDefined=()=>{customElements.get(w.ID)||customElements.define(w.ID,w)},w);$([v({type:String})],f.prototype,"caption",2);$([v({type:String})],f.prototype,"description",2);$([v({type:Boolean})],f.prototype,"selected",2);$([v({type:String})],f.prototype,"icon",2);$([v({type:String})],f.prototype,"iconBackgroundColor",2);$([v({type:String})],f.prototype,"iconPlaceholder",2);$([v({type:Number})],f.prototype,"level",2);$([v()],f.prototype,"contentMode",2);$([v({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],f.prototype,"enableLineClamp",2);$([v({
|
|
35
|
+
`:h}updated(s){super.updated(s),(s.has("icon")||s.has("iconPlaceholder"))&&(this.icon||this.iconPlaceholder)&&K.showImage(this.shadowRoot.querySelector(".icon"),this.icon,this.iconPlaceholder),s.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let s=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,e=this.shadowRoot.querySelector(".caption");e&&(t+=e.scrollWidth-e.clientWidth);let i=this.shadowRoot.querySelector(".description");return i&&(t=Math.max(t,i.scrollWidth-i.clientWidth)),t>0&&t++,s&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(s){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",s))&&s.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},w.ID="sd-list-item",w.ensureDefined=()=>{customElements.get(w.ID)||customElements.define(w.ID,w)},w);$([v({type:String})],f.prototype,"caption",2);$([v({type:String})],f.prototype,"description",2);$([v({type:Boolean})],f.prototype,"selected",2);$([v({type:String})],f.prototype,"icon",2);$([v({type:String})],f.prototype,"iconBackgroundColor",2);$([v({type:String})],f.prototype,"iconPlaceholder",2);$([v({type:Number})],f.prototype,"level",2);$([v()],f.prototype,"contentMode",2);$([v({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],f.prototype,"enableLineClamp",2);$([v({converter:{fromAttribute:s=>s=="true",toAttribute:s=>s},reflect:!0,attribute:"aria-disabled"})],f.prototype,"disabled",2);$([v({type:String,attribute:"icon-attr-aria-label"})],f.prototype,"iconAttrAriaLabel",2);$([v({type:String,reflect:!0})],f.prototype,"role",2);$([v({type:String,attribute:"caption-attr-title"})],f.prototype,"captionAttrTitle",2);$([v({type:String,attribute:"description-attr-title"})],f.prototype,"descriptionAttrTitle",2);$([v({type:String,attribute:"icon-attr-title"})],f.prototype,"iconAttrTitle",2);var dt=f,Yt=(s,t)=>{let e=document.createElement(dt.ID);if(s){if(e.caption=s.caption,e.description=s.description,e.icon=s.icon,e.iconBackgroundColor=s.iconBackgroundColor,e.iconPlaceholder=s.iconPlaceholder,e.level=s.level,e.disabled=s.disabled,s.contentMode&&(e.contentMode=s.contentMode),s.leftContentGenerator){let i=s.leftContentGenerator(s,e);i&&(i.slot="left-content",e.appendChild(i))}if(s.rightContentGenerator){let i=s.rightContentGenerator(s,e);i&&(i.slot="right-content",e.appendChild(i))}}return e};dt.ensureDefined();return Dt(Zt);})();
|
|
36
36
|
/*! Bundled license information:
|
|
37
37
|
|
|
38
38
|
@lit/reactive-element/css-tag.js:
|