@cas-smartdesign/list-item 7.2.2

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.
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>
@@ -0,0 +1,25 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <meta http-equiv="X-UA-Compatible" content="ie=edge" />
7
+ <title>List item</title>
8
+ <style>
9
+ .markdown-body {
10
+ box-sizing: border-box;
11
+ min-width: 200px;
12
+ max-width: 980px;
13
+ margin: 0 auto !important;
14
+ padding-bottom: 45px;
15
+ }
16
+ </style>
17
+ <script type="module" crossorigin src="./doc.mjs"></script>
18
+ <link rel="stylesheet" crossorigin href="./doc.css">
19
+ </head>
20
+ <body>
21
+ <div class="markdown-body">
22
+ <div id="markdown-container"></div>
23
+ </div>
24
+ </body>
25
+ </html>
@@ -0,0 +1 @@
1
+ import"./doc.mjs";document.querySelectorAll("#long-content-examples *[show-missing-width]").forEach(r=>{const e=r.parentElement;new ResizeObserver(async()=>{let s,t=0;do s=e.missingWidthForTexts,r.innerText=`+${s}px`;while(s!=e.missingWidthForTexts&&t++<5)}).observe(e)});
@@ -0,0 +1 @@
1
+ import{g as n}from"./doc.mjs";const o="./icon.svg",a=document.querySelector("#dynamically-created-examples");function t(e,i){const c=n({caption:e==="text"?"caption":"<em>caption</em>",description:e==="text"?"text mode":"<em>html mode</em>",icon:o,iconBackgroundColor:i,contentMode:e});c.addEventListener("list-item-icon-click",()=>window.alert("Icon was clicked")),c.addEventListener("click",()=>window.alert("Item was clicked")),a.appendChild(c)}t("text");t("html");t("text","#BADA55");t("html","#808080");
@@ -0,0 +1 @@
1
+ import{g as s}from"./doc.mjs";const l="./icon.svg",i=document.querySelectorAll("#drag-and-drop-example-container .list");let r=null;function n(e,a,c=e==="text"?"List item":"<em>List item</em>",o=e=="text"?"text mode":"<em>html mode</em>"){const t=s({caption:c,description:o,icon:l,iconBackgroundColor:a,contentMode:e});return t.draggable=!0,t.addEventListener("click",()=>window.alert("Item was clicked")),t.addEventListener("dragstart",d=>{d.dataTransfer&&(d.dataTransfer.setData("text/plain",t.innerText),d.dataTransfer.effectAllowed="move",r=t)}),i[0].append(t),t}n("text");n("html");n("html","#808080");n("text","#BADA55","Clickable item","with separate icon click handler").addEventListener("list-item-icon-click",e=>{alert("Icon was clicked"),e.preventDefault()});i.forEach(e=>{e.addEventListener("dragleave",a=>{a.target==e&&e.classList.remove("droptarget")}),e.addEventListener("dragenter",()=>e.classList.toggle("droptarget",!e.contains(r)),!0),e.addEventListener("dragover",a=>{e.contains(r)||a.preventDefault()},!0),e.addEventListener("drop",a=>{e.classList.remove("droptarget"),e.appendChild(r)})});
@@ -0,0 +1,101 @@
1
+ var window;(window||={})["@cas-smartdesign/list-item"]=(()=>{var G=Object.defineProperty;var Mt=Object.getOwnPropertyDescriptor;var Nt=Object.getOwnPropertyNames;var Rt=Object.prototype.hasOwnProperty;var Ot=(s,t)=>{for(var e in t)G(s,e,{get:t[e],enumerable:!0})},It=(s,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Nt(t))!Rt.call(s,o)&&o!==e&&G(s,o,{get:()=>t[o],enumerable:!(i=Mt(t,o))||i.enumerable});return s};var Dt=s=>It(G({},"__esModule",{value:!0}),s);var Zt={};Ot(Zt,{default:()=>dt,generator:()=>Yt});var D=window,B=D.ShadowRoot&&(D.ShadyCSS===void 0||D.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,F=Symbol(),pt=new WeakMap,T=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==F)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(B&&t===void 0){let i=e!==void 0&&e.length===1;i&&(t=pt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&pt.set(e,t))}return t}toString(){return this.cssText}},z=s=>new T(typeof s=="string"?s:s+"",void 0,F),J=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((i,o,r)=>i+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+s[r+1],s[0]);return new T(e,s,F)},Y=(s,t)=>{B?s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet):t.forEach(e=>{let i=document.createElement("style"),o=D.litNonce;o!==void 0&&i.setAttribute("nonce",o),i.textContent=e.cssText,s.appendChild(i)})},j=B?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let i of t.cssRules)e+=i.cssText;return z(e)})(s):s;var Z,V=window,ut=V.trustedTypes,Bt=ut?ut.emptyScript:"",vt=V.reactiveElementPolyfillSupport,X={toAttribute(s,t){switch(t){case Boolean:s=s?Bt:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},ft=(s,t)=>t!==s&&(t==t||s==s),Q={attribute:!0,type:String,converter:X,reflect:!1,hasChanged:ft},tt="finalized",g=class extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this._$Eu()}static addInitializer(t){var e;this.finalize(),((e=this.h)!==null&&e!==void 0?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();let t=[];return this.elementProperties.forEach((e,i)=>{let o=this._$Ep(i,e);o!==void 0&&(this._$Ev.set(o,i),t.push(o))}),t}static createProperty(t,e=Q){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){let i=typeof t=="symbol"?Symbol():"__"+t,o=this.getPropertyDescriptor(t,i,e);o!==void 0&&Object.defineProperty(this.prototype,t,o)}}static getPropertyDescriptor(t,e,i){return{get(){return this[e]},set(o){let r=this[t];this[e]=o,this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||Q}static finalize(){if(this.hasOwnProperty(tt))return!1;this[tt]=!0;let t=Object.getPrototypeOf(this);if(t.finalize(),t.h!==void 0&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){let e=this.properties,i=[...Object.getOwnPropertyNames(e),...Object.getOwnPropertySymbols(e)];for(let o of i)this.createProperty(o,e[o])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let o of i)e.unshift(j(o))}else t!==void 0&&e.push(j(t));return e}static _$Ep(t,e){let i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}_$Eu(){var t;this._$E_=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$Eg(),this.requestUpdate(),(t=this.constructor.h)===null||t===void 0||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$ES)!==null&&e!==void 0?e:this._$ES=[]).push(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)===null||i===void 0||i.call(t))}removeController(t){var e;(e=this._$ES)===null||e===void 0||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])})}createRenderRoot(){var t;let e=(t=this.shadowRoot)!==null&&t!==void 0?t:this.attachShadow(this.constructor.shadowRootOptions);return Y(e,this.constructor.elementStyles),e}connectedCallback(){var t;this.renderRoot===void 0&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostConnected)===null||i===void 0?void 0:i.call(e)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$ES)===null||t===void 0||t.forEach(e=>{var i;return(i=e.hostDisconnected)===null||i===void 0?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EO(t,e,i=Q){var o;let r=this.constructor._$Ep(t,i);if(r!==void 0&&i.reflect===!0){let n=(((o=i.converter)===null||o===void 0?void 0:o.toAttribute)!==void 0?i.converter:X).toAttribute(e,i.type);this._$El=t,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$El=null}}_$AK(t,e){var i;let o=this.constructor,r=o._$Ev.get(t);if(r!==void 0&&this._$El!==r){let n=o.getPropertyOptions(r),c=typeof n.converter=="function"?{fromAttribute:n.converter}:((i=n.converter)===null||i===void 0?void 0:i.fromAttribute)!==void 0?n.converter:X;this._$El=r,this[r]=c.fromAttribute(e,n.type),this._$El=null}}requestUpdate(t,e,i){let o=!0;t!==void 0&&(((i=i||this.constructor.getPropertyOptions(t)).hasChanged||ft)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$El!==t&&(this._$EC===void 0&&(this._$EC=new Map),this._$EC.set(t,i))):o=!1),!this.isUpdatePending&&o&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach((o,r)=>this[r]=o),this._$Ei=void 0);let e=!1,i=this._$AL;try{e=this.shouldUpdate(i),e?(this.willUpdate(i),(t=this._$ES)===null||t===void 0||t.forEach(o=>{var r;return(r=o.hostUpdate)===null||r===void 0?void 0:r.call(o)}),this.update(i)):this._$Ek()}catch(o){throw e=!1,this._$Ek(),o}e&&this._$AE(i)}willUpdate(t){}_$AE(t){var e;(e=this._$ES)===null||e===void 0||e.forEach(i=>{var o;return(o=i.hostUpdated)===null||o===void 0?void 0:o.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){this._$EC!==void 0&&(this._$EC.forEach((e,i)=>this._$EO(i,this[i],e)),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}};g[tt]=!0,g.elementProperties=new Map,g.elementStyles=[],g.shadowRootOptions={mode:"open"},vt?.({ReactiveElement:g}),((Z=V.reactiveElementVersions)!==null&&Z!==void 0?Z:V.reactiveElementVersions=[]).push("1.6.3");var et,W=window,x=W.trustedTypes,$t=x?x.createPolicy("lit-html",{createHTML:s=>s}):void 0,st="$lit$",y=`lit$${(Math.random()+"").slice(9)}$`,St="?"+y,zt=`<${St}>`,E=document,U=()=>E.createComment(""),H=s=>s===null||typeof s!="object"&&typeof s!="function",Et=Array.isArray,jt=s=>Et(s)||typeof s?.[Symbol.iterator]=="function",it=`[
2
+ \f\r]`,k=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,mt=/-->/g,gt=/>/g,b=RegExp(`>|${it}(?:([^\\s"'>=/]+)(${it}*=${it}*(?:[^
3
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),_t=/'/g,yt=/"/g,wt=/^(?:script|style|textarea|title)$/i,xt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),N=xt(1),se=xt(2),_=Symbol.for("lit-noChange"),h=Symbol.for("lit-nothing"),At=new WeakMap,S=E.createTreeWalker(E,129,null,!1);function Ct(s,t){if(!Array.isArray(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return $t!==void 0?$t.createHTML(t):t}var Vt=(s,t)=>{let e=s.length-1,i=[],o,r=t===2?"<svg>":"",n=k;for(let c=0;c<e;c++){let l=s[c],a,d,p=-1,u=0;for(;u<l.length&&(n.lastIndex=u,d=n.exec(l),d!==null);)u=n.lastIndex,n===k?d[1]==="!--"?n=mt:d[1]!==void 0?n=gt:d[2]!==void 0?(wt.test(d[2])&&(o=RegExp("</"+d[2],"g")),n=b):d[3]!==void 0&&(n=b):n===b?d[0]===">"?(n=o??k,p=-1):d[1]===void 0?p=-2:(p=n.lastIndex-d[2].length,a=d[1],n=d[3]===void 0?b:d[3]==='"'?yt:_t):n===yt||n===_t?n=b:n===mt||n===gt?n=k:(n=b,o=void 0);let m=n===b&&s[c+1].startsWith("/>")?" ":"";r+=n===k?l+zt:p>=0?(i.push(a),l.slice(0,p)+st+l.slice(p)+y+m):l+y+(p===-2?(i.push(void 0),c):m)}return[Ct(s,r+(s[e]||"<?>")+(t===2?"</svg>":"")),i]},L=class s{constructor({strings:t,_$litType$:e},i){let o;this.parts=[];let r=0,n=0,c=t.length-1,l=this.parts,[a,d]=Vt(t,e);if(this.el=s.createElement(a,i),S.currentNode=this.el.content,e===2){let p=this.el.content,u=p.firstChild;u.remove(),p.append(...u.childNodes)}for(;(o=S.nextNode())!==null&&l.length<c;){if(o.nodeType===1){if(o.hasAttributes()){let p=[];for(let u of o.getAttributeNames())if(u.endsWith(st)||u.startsWith(y)){let m=d[n++];if(p.push(u),m!==void 0){let Lt=o.getAttribute(m.toLowerCase()+st).split(y),I=/([.?@])?(.*)/.exec(m);l.push({type:1,index:r,name:I[2],strings:Lt,ctor:I[1]==="."?nt:I[1]==="?"?rt:I[1]==="@"?lt:P})}else l.push({type:6,index:r})}for(let u of p)o.removeAttribute(u)}if(wt.test(o.tagName)){let p=o.textContent.split(y),u=p.length-1;if(u>0){o.textContent=x?x.emptyScript:"";for(let m=0;m<u;m++)o.append(p[m],U()),S.nextNode(),l.push({type:2,index:++r});o.append(p[u],U())}}}else if(o.nodeType===8)if(o.data===St)l.push({type:2,index:r});else{let p=-1;for(;(p=o.data.indexOf(y,p+1))!==-1;)l.push({type:7,index:r}),p+=y.length-1}r++}}static createElement(t,e){let i=E.createElement("template");return i.innerHTML=t,i}};function C(s,t,e=s,i){var o,r,n,c;if(t===_)return t;let l=i!==void 0?(o=e._$Co)===null||o===void 0?void 0:o[i]:e._$Cl,a=H(t)?void 0:t._$litDirective$;return l?.constructor!==a&&((r=l?._$AO)===null||r===void 0||r.call(l,!1),a===void 0?l=void 0:(l=new a(s),l._$AT(s,e,i)),i!==void 0?((n=(c=e)._$Co)!==null&&n!==void 0?n:c._$Co=[])[i]=l:e._$Cl=l),l!==void 0&&(t=C(s,l._$AS(s,t.values),l,i)),t}var ot=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;let{el:{content:i},parts:o}=this._$AD,r=((e=t?.creationScope)!==null&&e!==void 0?e:E).importNode(i,!0);S.currentNode=r;let n=S.nextNode(),c=0,l=0,a=o[0];for(;a!==void 0;){if(c===a.index){let d;a.type===2?d=new M(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new at(n,this,t)),this._$AV.push(d),a=o[++l]}c!==a?.index&&(n=S.nextNode(),c++)}return S.currentNode=E,r}v(t){let e=0;for(let i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(t,i,e),e+=i.strings.length-2):i._$AI(t[e])),e++}},M=class s{constructor(t,e,i,o){var r;this.type=2,this._$AH=h,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=i,this.options=o,this._$Cp=(r=o?.isConnected)===null||r===void 0||r}get _$AU(){var t,e;return(e=(t=this._$AM)===null||t===void 0?void 0:t._$AU)!==null&&e!==void 0?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=C(this,t,e),H(t)?t===h||t==null||t===""?(this._$AH!==h&&this._$AR(),this._$AH=h):t!==this._$AH&&t!==_&&this._(t):t._$litType$!==void 0?this.g(t):t.nodeType!==void 0?this.$(t):jt(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==h&&H(this._$AH)?this._$AA.nextSibling.data=t:this.$(E.createTextNode(t)),this._$AH=t}g(t){var e;let{values:i,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=L.createElement(Ct(o.h,o.h[0]),this.options)),o);if(((e=this._$AH)===null||e===void 0?void 0:e._$AD)===r)this._$AH.v(i);else{let n=new ot(r,this),c=n.u(this.options);n.v(i),this.$(c),this._$AH=n}}_$AC(t){let e=At.get(t.strings);return e===void 0&&At.set(t.strings,e=new L(t)),e}T(t){Et(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,i,o=0;for(let r of t)o===e.length?e.push(i=new s(this.k(U()),this.k(U()),this,this.options)):i=e[o],i._$AI(r),o++;o<e.length&&(this._$AR(i&&i._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){var i;for((i=this._$AP)===null||i===void 0||i.call(this,!1,!0,e);t&&t!==this._$AB;){let o=t.nextSibling;t.remove(),t=o}}setConnected(t){var e;this._$AM===void 0&&(this._$Cp=t,(e=this._$AP)===null||e===void 0||e.call(this,t))}},P=class{constructor(t,e,i,o,r){this.type=1,this._$AH=h,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=h}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,i,o){let r=this.strings,n=!1;if(r===void 0)t=C(this,t,e,0),n=!H(t)||t!==this._$AH&&t!==_,n&&(this._$AH=t);else{let c=t,l,a;for(t=r[0],l=0;l<r.length-1;l++)a=C(this,c[i+l],e,l),a===_&&(a=this._$AH[l]),n||(n=!H(a)||a!==this._$AH[l]),a===h?t=h:t!==h&&(t+=(a??"")+r[l+1]),this._$AH[l]=a}n&&!o&&this.j(t)}j(t){t===h?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},nt=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===h?void 0:t}},Wt=x?x.emptyScript:"",rt=class extends P{constructor(){super(...arguments),this.type=4}j(t){t&&t!==h?this.element.setAttribute(this.name,Wt):this.element.removeAttribute(this.name)}},lt=class extends P{constructor(t,e,i,o,r){super(t,e,i,o,r),this.type=5}_$AI(t,e=this){var i;if((t=(i=C(this,t,e,0))!==null&&i!==void 0?i:h)===_)return;let o=this._$AH,r=t===h&&o!==h||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,n=t!==h&&(o===h||r);r&&this.element.removeEventListener(this.name,this,o),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,i;typeof this._$AH=="function"?this._$AH.call((i=(e=this.options)===null||e===void 0?void 0:e.host)!==null&&i!==void 0?i:this.element,t):this._$AH.handleEvent(t)}},at=class{constructor(t,e,i){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(t){C(this,t)}};var bt=W.litHtmlPolyfillSupport;bt?.(L,M),((et=W.litHtmlVersions)!==null&&et!==void 0?et:W.litHtmlVersions=[]).push("2.8.0");var Pt=(s,t,e)=>{var i,o;let r=(i=e?.renderBefore)!==null&&i!==void 0?i:t,n=r._$litPart$;if(n===void 0){let c=(o=e?.renderBefore)!==null&&o!==void 0?o:null;r._$litPart$=n=new M(t.insertBefore(U(),c),c,void 0,e??{})}return n._$AI(s),n};var ct,ht;var A=class extends g{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;let i=super.createRenderRoot();return(t=(e=this.renderOptions).renderBefore)!==null&&t!==void 0||(e.renderBefore=i.firstChild),i}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Pt(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),(t=this._$Do)===null||t===void 0||t.setConnected(!1)}render(){return _}};A.finalized=!0,A._$litElement$=!0,(ct=globalThis.litElementHydrateSupport)===null||ct===void 0||ct.call(globalThis,{LitElement:A});var Tt=globalThis.litElementPolyfillSupport;Tt?.({LitElement:A});((ht=globalThis.litElementVersions)!==null&&ht!==void 0?ht:globalThis.litElementVersions=[]).push("3.3.3");var qt=(s,t)=>t.kind==="method"&&t.descriptor&&!("value"in t.descriptor)?{...t,finisher(e){e.createProperty(t.key,s)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:t.key,initializer(){typeof t.initializer=="function"&&(this[t.key]=t.initializer.call(this))},finisher(e){e.createProperty(t.key,s)}},Kt=(s,t,e)=>{t.constructor.createProperty(e,s)};function v(s){return(t,e)=>e!==void 0?Kt(s,t,e):qt(s,t)}var kt={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Ut=s=>(...t)=>({_$litDirective$:s,values:t}),q=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var R=class extends q{constructor(t){if(super(t),this.et=h,t.type!==kt.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===h||t==null)return this.ft=void 0,this.et=t;if(t===_)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;let e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}};R.directiveName="unsafeHTML",R.resultType=1;var Ht=Ut(R);var O=s=>s??h;var K=class{static showImage(t,e,i,o){let r;if(o||!(t instanceof HTMLImageElement)?r=n=>t.style.backgroundImage=this.prepareSrc(n):r=n=>t.src=n,r(i),e){let n=()=>{r(e)},c=new Image;c.addEventListener("load",n),c.src=e,c.complete&&(c.removeEventListener("load",n),n())}}static prepareSrc(t){return t?t.startsWith("url")?t:`url("${t}")`:null}};var Gt=':host{display:block;contain:strict;height:50px}:host([selected]){background-color:#d3e6fa}:host(:not([selected]):hover),:host(:not([selected])[focused]){background-color:#e7f1fa}@media (forced-colors: active){:host([selected]){outline:4px solid}:host(:not([selected]):hover){outline:4px dotted}:host(:not([selected])[focused]){outline:4px dashed}}:host([enable-line-clamp]) .labels>:only-child{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;white-space:normal;word-wrap:break-word}.container{display:flex;height:100%;box-sizing:border-box}.container .level-indicator{width:7px;height:100%}.container .level-indicator.level-0{background-color:#a0c3ef}.container .level-indicator.level-1{background-color:#e7c374}.container .level-indicator.level-2{background-color:#bfd596}.container .level-indicator.level-3{background-color:#fd998d}.container .level-indicator.level-4{background-color:#c6e8f5}.container .level-indicator.level-5{background-color:#fde3a4}.container .level-indicator.level-6{background-color:#dcbfe0}.side-content{display:flex;align-items:center;flex-grow:0}.labels{display:flex;flex-direction:column;justify-content:center;flex:1 1 0px;height:100%;line-height:normal;overflow:hidden;padding:var(--sd-list-item-label-content-padding, 0 8px)}.caption,.description{width:100%;font-family:var(--sd-list-item-font-family, "Segoe UI", "Lucida Sans", Arial, sans-serif);font-style:normal;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;-webkit-user-select:none;user-select:none;text-decoration:var(--sd-list-item-text-decoration, inherit)}.caption em,.description em{font-weight:bolder}.caption{font-size:var(--sd-list-item-caption-font-size, 16px);color:var(--sd-list-item-caption-text-color, #111);font-weight:var(--sd-list-item-caption-font-weight, normal)}.description{font-size:var(--sd-list-item-description-font-size, 13px);color:var(--sd-list-item-description-text-color, #767676);font-weight:var(--sd-list-item-description-font-weight, normal)}.icon-wrapper{width:var(--sd-list-item-icon-wrapper-width, 45px);height:100%;display:flex;align-items:center;justify-content:center}.icon-wrapper .icon{min-height:var(--sd-list-item-icon-size, 24px);min-width:var(--sd-list-item-icon-size, 24px);background-repeat:no-repeat;background-position:center;background-size:cover}',Ft=Object.defineProperty,Jt=Object.getOwnPropertyDescriptor,$=(s,t,e,i)=>{for(var o=i>1?void 0:i?Jt(t,e):t,r=s.length-1,n;r>=0;r--)(n=s[r])&&(o=(i?n(t,e,o):n(o))||o);return i&&o&&Ft(t,e,o),o},w,f=(w=class extends A{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[J`
4
+ ${z(Gt)}
5
+ `]}render(){return N`
6
+ <div class="container">
7
+ ${this.getLevelIndicators().map((s,t)=>N` <div class="level-indicator level-${t}"></div> `)}
8
+ <div class="side-content">
9
+ <slot name="left-content"></slot>
10
+ ${this.renderIcon()}
11
+ </div>
12
+ <div class="labels">
13
+ ${this.renderLabel("caption",this.caption,this.captionAttrTitle)}
14
+ ${this.renderLabel("description",this.description,this.descriptionAttrTitle)}
15
+ </div>
16
+ <div class="side-content">
17
+ <slot name="right-content"></slot>
18
+ </div>
19
+ </div>
20
+ `}renderIcon(){if(this.icon||this.iconPlaceholder){let s=this.iconBackgroundColor!=null?`background-color:${this.iconBackgroundColor}`:void 0;return N`
21
+ <div
22
+ class="icon-wrapper"
23
+ @pointerdown="${this.handleIconClick}"
24
+ style="${O(s)}"
25
+ role="img"
26
+ aria-label="${O(this.iconAttrAriaLabel)}"
27
+ title="${O(this.iconAttrTitle)}"
28
+ >
29
+ <div class="icon"></div>
30
+ </div>
31
+ `}return h}renderLabel(s,t,e){return t?N`
32
+ <div class="${s}" title="${O(e)}">
33
+ ${this.contentMode==="html"?Ht(t):t}
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({type:Boolean,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
+ /*! Bundled license information:
37
+
38
+ @lit/reactive-element/css-tag.js:
39
+ (**
40
+ * @license
41
+ * Copyright 2019 Google LLC
42
+ * SPDX-License-Identifier: BSD-3-Clause
43
+ *)
44
+
45
+ @lit/reactive-element/reactive-element.js:
46
+ (**
47
+ * @license
48
+ * Copyright 2017 Google LLC
49
+ * SPDX-License-Identifier: BSD-3-Clause
50
+ *)
51
+
52
+ lit-html/lit-html.js:
53
+ (**
54
+ * @license
55
+ * Copyright 2017 Google LLC
56
+ * SPDX-License-Identifier: BSD-3-Clause
57
+ *)
58
+
59
+ lit-element/lit-element.js:
60
+ (**
61
+ * @license
62
+ * Copyright 2017 Google LLC
63
+ * SPDX-License-Identifier: BSD-3-Clause
64
+ *)
65
+
66
+ lit-html/is-server.js:
67
+ (**
68
+ * @license
69
+ * Copyright 2022 Google LLC
70
+ * SPDX-License-Identifier: BSD-3-Clause
71
+ *)
72
+
73
+ @lit/reactive-element/decorators/property.js:
74
+ (**
75
+ * @license
76
+ * Copyright 2017 Google LLC
77
+ * SPDX-License-Identifier: BSD-3-Clause
78
+ *)
79
+
80
+ lit-html/directive.js:
81
+ (**
82
+ * @license
83
+ * Copyright 2017 Google LLC
84
+ * SPDX-License-Identifier: BSD-3-Clause
85
+ *)
86
+
87
+ lit-html/directives/unsafe-html.js:
88
+ (**
89
+ * @license
90
+ * Copyright 2017 Google LLC
91
+ * SPDX-License-Identifier: BSD-3-Clause
92
+ *)
93
+
94
+ lit-html/directives/if-defined.js:
95
+ (**
96
+ * @license
97
+ * Copyright 2018 Google LLC
98
+ * SPDX-License-Identifier: BSD-3-Clause
99
+ *)
100
+ */
101
+ //# sourceMappingURL=list-item-with-externals.js.map