@cas-smartdesign/list 6.5.1 → 6.5.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.
- package/dist/docs/doc.mjs +1 -1
- package/dist/list-with-externals.js +6 -6
- package/dist/list-with-externals.js.map +3 -3
- package/dist/list.d.ts +3 -1
- package/dist/list.mjs +48 -37
- package/dist/list.mjs.map +1 -1
- package/package.json +5 -5
package/dist/docs/doc.mjs
CHANGED
|
@@ -323,7 +323,7 @@ container.appendChild(list);
|
|
|
323
323
|
<slot name="items"></slot>
|
|
324
324
|
<slot id="default-slot"></slot>
|
|
325
325
|
</div>
|
|
326
|
-
`;let to=0;const be=class be extends br{constructor(){super(),this._items=[],this._selectedIndexes=[],this._itemGenerator=Yr,this.onDefaultSlotChange=()=>{let
|
|
326
|
+
`;let to=0;const be=class be extends br{constructor(){super(),this._items=[],this._selectedIndexes=[],this._itemGenerator=Yr,this._focusObserverCleanupTasks=[],this.onDefaultSlotChange=()=>{let t=0;this.defaultSlot.assignedElements().forEach(n=>{this.isSeparator(n)||this.initListItem(n,t++)}),this.updateFocusedElement()},this.handleKeyDown=t=>{let n=!0;const i=this.getListItems.length;switch(t.key){case"ArrowDown":case"Down":this.focusIndex=(this.focusIndex+1)%i;break;case"ArrowUp":case"Up":this.focusIndex=(this.focusIndex-1+i)%i;break;case"Enter":case"Space":case" ":this.handleSelection(this.focusIndex,t.metaKey||t.ctrlKey);break;case"End":case"PageDown":this.focusIndex=this.items.length-1;break;case"Home":case"PageUp":this.focusIndex=0;break;default:n=!1;break}n&&(t.preventDefault(),t.stopPropagation())},this._fallbackId=be.ID+"_"+to++,this.addEventListener("pointerup",t=>{this.focusIndex=this.getListItems.indexOf(t.target),this.updateFocusedElement()}),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndexes&&(this.focusIndex=this.selectedIndexes[0]),this.focusIndex==-1&&this.childElementCount>0&&(this.focusIndex=0)):this.updateFocusedElement())}),this.addEventListener("blur",()=>this.removeFocusedItemAttributes());const e={root:null,rootMargin:"0px",threshold:[0,1]};this._focusObserver=new IntersectionObserver(t=>this.focusIntersectionCallback(t,this),e)}get items(){return this._items}set items(e){this._items=e,this.render()}get itemGenerator(){return this._itemGenerator}set itemGenerator(e){this._itemGenerator=e,this.render()}get selectionType(){return this.getAttribute("selection-type")}set selectionType(e){e?this.setAttribute("selection-type",e):this.removeAttribute("selection-type")}get focusIndex(){return this.hasAttribute("focus-index")?Number(this.getAttribute("focus-index")):-1}set focusIndex(e){0<=e&&e<this.getListItems.length?this.setAttribute("focus-index",e.toString()):this.removeAttribute("focus-index")}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(e){this.toggleAttribute("focus-target",e)}getListItem(e){return this.shadowRoot?this.getListItems[e]:null}get getListItems(){return Array.prototype.slice.call(this.children).filter(e=>!this.isSeparator(e))}get selectedIndexes(){return this._selectedIndexes}set selectedIndexes(e){const t=this._selectedIndexes||[];this._selectedIndexes=e||[],t.filter(n=>!this._selectedIndexes.includes(n)).forEach(n=>{this.setSelectedAttr(this.getListItem(n),!1)}),this._selectedIndexes.filter(n=>!t.includes(n)).forEach(n=>{this.setSelectedAttr(this.getListItem(n),!0)})}static get observedAttributes(){return["focus-index","focus-target"]}is(){return be.ID}template(){const e=document.createElement("template");return e.innerHTML=eo,e}removeFocusedItemAttributes(){if(this.focusIndex!=-1){const e=this.getListItem(this.focusIndex);e&&(e.removeAttribute("focused"),this._focusObserverCleanupTasks.forEach(t=>t.call(this)),this._focusObserverCleanupTasks=[],this.removeAttribute("aria-activedescendant"))}}connectedCallback(){super.connectedCallback(),this.defaultSlot.addEventListener("slotchange",this.onDefaultSlotChange),this.hasAttribute("role")||this.setAttribute("role","listbox"),this.id||(this.id=this._fallbackId),this.render(),this.addEventListener("keydown",this.handleKeyDown),this.selectionType||(this.selectionType="trigger-only")}get defaultSlot(){return this.shadowRoot.querySelector("#default-slot")}isSeparator(e){return e.tagName=="HR"||e.getAttribute("role")=="separator"}attributeChangedCallback(e,t,n){if(e==="focus-index"){const i=this.getListItem(t);i&&i.removeAttribute("focused"),this.updateFocusedElement()}else e==="focus-target"&&(this.focusTarget?this.updateFocusedElement():document.activeElement!=this&&this.removeFocusedItemAttributes())}increaseWidthIfNeeded(){window.requestAnimationFrame(()=>{let e=Number.MAX_SAFE_INTEGER;const t=getComputedStyle(this).maxWidth,n=this.offsetWidth;t.endsWith("px")&&(e=Number.parseInt(t)-n);const i=this.style.width;if(e==0||i.endsWith("px")&&n<Number.parseInt(i))this.enableLineClampOnItemsIfNeeded();else{const c=[...Array.from(this.children).filter(p=>p.slot==="items")].map(p=>{if(p instanceof Je){p.enableLineClamp=!1;const b=p.missingWidthForTexts;return b>e&&(p.enableLineClamp=!0),b}}),a=Math.max(...c);if(a>0){const p=n+a;this.style.width=`${p}px`,this.offsetWidth<p&&this.enableLineClampOnItemsIfNeeded()}}})}enableLineClampOnItemsIfNeeded(){Array.from(this.children).filter(e=>e.slot==="items").forEach(e=>{e instanceof Je&&(e.enableLineClamp=e.enableLineClamp||e.missingWidthForTexts>0)})}render(){if(!this.isConnected||!this.items)return;Array.from(this.children).filter(n=>n.slot==="items").forEach(n=>n.remove());const e=document.createDocumentFragment();let t=0;this.items.forEach((n,i)=>{const c=this.itemGenerator(n,i);this.isSeparator(c)||this.initListItem(c,t++),c.slot="items",e.appendChild(c)}),this.appendChild(e),this.updateFocusedElement()}initListItem(e,t){this.setSelectedAttr(e,this.selectedIndexes.includes(t)),e.addEventListener("click",n=>{this.handleItemClick(n,t)}),e.addEventListener("mousedown",n=>{n.button==1&&n.preventDefault()}),e.addEventListener("auxclick",n=>{this.handleItemClick(n,t)}),(!e.id||e.id.startsWith(this.id+"_item_"))&&(e.id=this.id+"_item_"+t)}focusIntersectionCallback(e,t){e.forEach(n=>{const i=n.target;(!n.isIntersecting||n.intersectionRatio<1)&&(i.scrollIntoView({block:"nearest",inline:"nearest"}),t._focusObserver.unobserve(i))})}updateFocusedElement(){const e=this.getListItem(this.focusIndex);e&&(this.focusTarget||this.matches(":focus"))?(e.setAttribute("focused",""),this.setAttribute("aria-activedescendant",e.id),this._focusObserver.observe(e),this._focusObserverCleanupTasks.push(()=>{this._focusObserver.unobserve(e)})):(this._focusObserverCleanupTasks.forEach(t=>t.call(this)),this._focusObserverCleanupTasks=[],this.removeAttribute("aria-activedescendant"))}handleItemClick(e,t){if(e.button!==null){const n=e.type=="auxclick"&&e.button==1||e.metaKey||e.ctrlKey;(e.button==0||e.button==1)&&this.handleSelection(t,n)}}handleSelection(e,t){const n=this.getListItem(e);if(n.getAttribute("aria-disabled")=="true"||n.hasAttribute("disabled"))return;const i=this.isSelected(n);this.selectionType!=="trigger-only"&&(this.selectionType==="single"?this.selectedIndexes=i?[]:[e]:this.toggleSelection(n)?this._selectedIndexes.push(e):this.removeFromSelectedIndexes(e)),this.focusIndex=e,this.dispatchEvent(new CustomEvent("selection",{detail:{index:e,selected:this.selectionType=="trigger-only"||!i,hasModifier:t},bubbles:!0,composed:!0}))}removeFromSelectedIndexes(e){const t=this._selectedIndexes.indexOf(e);t!==-1&&this._selectedIndexes.splice(t,1)}toggleSelection(e){const t=!e.hasAttribute("selected");return this.setSelectedAttr(e,t),t}setSelectedAttr(e,t){e&&(t?e.setAttribute("selected",""):e.removeAttribute("selected"),e.setAttribute("aria-selected",String(t)))}isSelected(e){return e.hasAttribute("selected")}};be.ID="sd-list",be.ensureDefined=()=>{Je.ensureDefined(),customElements.get(be.ID)||customElements.define(be.ID,be)};let mi=be;mi.ensureDefined();function Vn(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function io(s){if(Object.prototype.hasOwnProperty.call(s,"__esModule"))return s;var e=s.default;if(typeof e=="function"){var t=function n(){var i=!1;try{i=this instanceof n}catch{}return i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(s).forEach(function(n){var i=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(t,n,i.get?i:{enumerable:!0,get:function(){return s[n]}})}),t}var ht={exports:{}},rn;function no(){if(rn)return ht.exports;rn=1;var s=String,e=function(){return{isColorSupported:!1,reset:s,bold:s,dim:s,italic:s,underline:s,inverse:s,hidden:s,strikethrough:s,black:s,red:s,green:s,yellow:s,blue:s,magenta:s,cyan:s,white:s,gray:s,bgBlack:s,bgRed:s,bgGreen:s,bgYellow:s,bgBlue:s,bgMagenta:s,bgCyan:s,bgWhite:s,blackBright:s,redBright:s,greenBright:s,yellowBright:s,blueBright:s,magentaBright:s,cyanBright:s,whiteBright:s,bgBlackBright:s,bgRedBright:s,bgGreenBright:s,bgYellowBright:s,bgBlueBright:s,bgMagentaBright:s,bgCyanBright:s,bgWhiteBright:s}};return ht.exports=e(),ht.exports.createColors=e,ht.exports}const so={},ro=Object.freeze(Object.defineProperty({__proto__:null,default:so},Symbol.toStringTag,{value:"Module"})),de=io(ro);var Bt,on;function Ei(){if(on)return Bt;on=1;let s=no(),e=de;class t extends Error{constructor(i,c,a,p,b,h){super(i),this.name="CssSyntaxError",this.reason=i,b&&(this.file=b),p&&(this.source=p),h&&(this.plugin=h),typeof c<"u"&&typeof a<"u"&&(typeof c=="number"?(this.line=c,this.column=a):(this.line=c.line,this.column=c.column,this.endLine=a.line,this.endColumn=a.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,t)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(i){if(!this.source)return"";let c=this.source;i==null&&(i=s.isColorSupported);let a=l=>l,p=l=>l,b=l=>l;if(i){let{bold:l,gray:f,red:m}=s.createColors(!0);p=g=>l(m(g)),a=g=>f(g),e&&(b=g=>e(g))}let h=c.split(/\r?\n/),r=Math.max(this.line-3,0),u=Math.min(this.line+2,h.length),o=String(u).length;return h.slice(r,u).map((l,f)=>{let m=r+1+f,g=" "+(" "+m).slice(-o)+" | ";if(m===this.line){if(l.length>160){let E=20,v=Math.max(0,this.column-E),w=Math.max(this.column+E,this.endColumn+E),y=l.slice(v,w),A=a(g.replace(/\d/g," "))+l.slice(0,Math.min(this.column-1,E-1)).replace(/[^\t]/g," ");return p(">")+a(g)+b(y)+`
|
|
327
327
|
`+A+p("^")}let _=a(g.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return p(">")+a(g)+b(l)+`
|
|
328
328
|
`+_+p("^")}return" "+a(g)+b(l)}).join(`
|
|
329
329
|
`)}toString(){let i=this.showSourceCode();return i&&(i=`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var window;(window||={})["@cas-smartdesign/list"]=(()=>{var
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,Tt=/"/g,Lt=/^(?:script|style|textarea|title)$/i,ft=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),T=ft(1),Ee=ft(2),Se=ft(3),A=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),Pt=new WeakMap,x=E.createTreeWalker(E,129);function Mt(i,t){if(!mt(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return St!==void 0?St.createHTML(t):t}var Dt=(i,t)=>{let e=i.length-1,s=[],o,n=t===2?"<svg>":t===3?"<math>":"",r=U;for(let l=0;l<e;l++){let a=i[l],d,m,h=-1,g=0;for(;g<a.length&&(r.lastIndex=g,m=r.exec(a),m!==null);)g=r.lastIndex,r===U?m[1]==="!--"?r=wt:m[1]!==void 0?r=Ct:m[2]!==void 0?(Lt.test(m[2])&&(o=RegExp("</"+m[2],"g")),r=b):m[3]!==void 0&&(r=b):r===b?m[0]===">"?(r=o??U,h=-1):m[1]===void 0?h=-2:(h=r.lastIndex-m[2].length,d=m[1],r=m[3]===void 0?b:m[3]==='"'?Tt:It):r===Tt||r===It?r=b:r===wt||r===Ct?r=U:(r=b,o=void 0);let v=r===b&&i[l+1].startsWith("/>")?" ":"";n+=r===U?a+oe:h>=0?(s.push(d),a.slice(0,h)+pt+a.slice(h)+_+v):a+_+(h===-2?l:v)}return[Mt(i,n+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},B=class i{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let n=0,r=0,l=t.length-1,a=this.parts,[d,m]=Dt(t,e);if(this.el=i.createElement(d,s),x.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=x.nextNode())!==null&&a.length<l;){if(o.nodeType===1){if(o.hasAttributes())for(let h of o.getAttributeNames())if(h.endsWith(pt)){let g=m[r++],v=o.getAttribute(h).split(_),V=/([.?@])?(.*)/.exec(g);a.push({type:1,index:n,name:V[2],strings:v,ctor:V[1]==="."?tt:V[1]==="?"?et:V[1]==="@"?st:w}),o.removeAttribute(h)}else h.startsWith(_)&&(a.push({type:6,index:n}),o.removeAttribute(h));if(Lt.test(o.tagName)){let h=o.textContent.split(_),g=h.length-1;if(g>0){o.textContent=X?X.emptyScript:"";for(let v=0;v<g;v++)o.append(h[v],R()),x.nextNode(),a.push({type:2,index:++n});o.append(h[g],R())}}}else if(o.nodeType===8)if(o.data===ut)a.push({type:2,index:n});else{let h=-1;for(;(h=o.data.indexOf(_,h+1))!==-1;)a.push({type:7,index:n}),h+=_.length-1}n++}}static createElement(t,e){let s=E.createElement("template");return s.innerHTML=t,s}};function S(i,t,e=i,s){if(t===A)return t;let o=s!==void 0?e._$Co?.[s]:e._$Cl,n=O(t)?void 0:t._$litDirective$;return o?.constructor!==n&&(o?._$AO?.(!1),n===void 0?o=void 0:(o=new n(i),o._$AT(i,e,s)),s!==void 0?(e._$Co??=[])[s]=o:e._$Cl=o),o!==void 0&&(t=S(i,o._$AS(i,t.values),o,s)),t}var Y=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){let{el:{content:e},parts:s}=this._$AD,o=(t?.creationScope??E).importNode(e,!0);x.currentNode=o;let n=x.nextNode(),r=0,l=0,a=s[0];for(;a!==void 0;){if(r===a.index){let d;a.type===2?d=new I(n,n.nextSibling,this,t):a.type===1?d=new a.ctor(n,a.name,a.strings,this,t):a.type===6&&(d=new it(n,this,t)),this._$AV.push(d),a=s[++l]}r!==a?.index&&(n=x.nextNode(),r++)}return x.currentNode=E,o}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},I=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cv=o?.isConnected??!0}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=S(this,t,e),O(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==A&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):kt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&O(this._$AH)?this._$AA.nextSibling.data=t:this.T(E.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=B.createElement(Mt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{let n=new Y(o,this),r=n.u(this.options);n.p(e),this.T(r),this._$AH=n}}_$AC(t){let e=Pt.get(t.strings);return e===void 0&&Pt.set(t.strings,e=new B(t)),e}k(t){mt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,o=0;for(let n of t)o===e.length?e.push(s=new i(this.O(R()),this.O(R()),this,this.options)):s=e[o],s._$AI(n),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},w=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,n){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=n,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=c}_$AI(t,e=this,s,o){let n=this.strings,r=!1;if(n===void 0)t=S(this,t,e,0),r=!O(t)||t!==this._$AH&&t!==A,r&&(this._$AH=t);else{let l=t,a,d;for(t=n[0],a=0;a<n.length-1;a++)d=S(this,l[s+a],e,a),d===A&&(d=this._$AH[a]),r||=!O(d)||d!==this._$AH[a],d===c?t=c:t!==c&&(t+=(d??"")+n[a+1]),this._$AH[a]=d}r&&!o&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},tt=class extends w{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},et=class extends w{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}},st=class extends w{constructor(t,e,s,o,n){super(t,e,s,o,n),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??c)===A)return;let s=this._$AH,o=t===c&&s!==c||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,n=t!==c&&(s===c||o);o&&this.element.removeEventListener(this.name,this,s),n&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Ht={M:pt,P:_,A:ut,C:1,L:Dt,R:Y,D:kt,V:S,I,H:w,N:et,U:st,B:tt,F:it},ne=dt.litHtmlPolyfillSupport;ne?.(B,I),(dt.litHtmlVersions??=[]).push("3.3.1");var Nt=(i,t,e)=>{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let n=e?.renderBefore??null;s._$litPart$=o=new I(t.insertBefore(R(),n),n,void 0,e??{})}return o._$AI(i),o};var gt=globalThis,y=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Nt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return A}};y._$litElement$=!0,y.finalized=!0,gt.litElementHydrateSupport?.({LitElement:y});var re=gt.litElementPolyfillSupport;re?.({LitElement:y});(gt.litElementVersions??=[]).push("4.2.1");var ae={attribute:!0,type:String,converter:N,reflect:!1,hasChanged:Q},le=(i=ae,t,e)=>{let{kind:s,metadata:o}=e,n=globalThis.litPropertyMetadata.get(o);if(n===void 0&&globalThis.litPropertyMetadata.set(o,n=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),n.set(e.name,i),s==="accessor"){let{name:r}=e;return{set(l){let a=t.get.call(this);t.set.call(this,l),this.requestUpdate(r,a,i)},init(l){return l!==void 0&&this.C(r,void 0,i,l),l}}}if(s==="setter"){let{name:r}=e;return function(l){let a=this[r];t.call(this,l),this.requestUpdate(r,a,i)}}throw Error("Unsupported decorator location: "+s)};function p(i){return(t,e)=>typeof e=="object"?le(i,t,e):((s,o,n)=>{let r=o.hasOwnProperty(n);return o.constructor.createProperty(n,s),r?Object.getOwnPropertyDescriptor(o,n):void 0})(i,t,e)}var k={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},z=i=>(...t)=>({_$litDirective$:i,values:t}),P=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var W=class extends P{constructor(t){if(super(t),this.it=c,t.type!==k.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===c||t==null)return this._t=void 0,this.it=t;if(t===A)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};W.directiveName="unsafeHTML",W.resultType=1;var Ut=z(W);var j=i=>i??c;var{I:Ye}=Ht;var Rt=i=>i.strings===void 0;var F=(i,t)=>{let e=i._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),F(s,t);return!0},ot=i=>{let t,e;do{if((t=i._$AM)===void 0)break;e=t._$AN,e.delete(i),i=t}while(e?.size===0)},Ot=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),de(t)}};function ce(i){this._$AN!==void 0?(ot(this),this._$AM=i,Ot(this)):this._$AM=i}function he(i,t=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let n=e;n<s.length;n++)F(s[n],!1),ot(s[n]);else s!=null&&(F(s,!1),ot(s));else F(this,i)}var de=i=>{i.type==k.CHILD&&(i._$AP??=he,i._$AQ??=ce)},nt=class extends P{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Ot(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(F(this,t),ot(this))}setValue(t){if(Rt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Bt=i=>i?i.startsWith("url")?i:`url("${i}")`:null,pe=(i,t)=>{if(i){let e=new Image;e.addEventListener("load",t),e.src=i,e.complete&&(e.removeEventListener("load",t),window.queueMicrotask(()=>t()))}};var $t=class extends nt{constructor(t){if(super(t),t.type!==k.ATTRIBUTE||t.name!=="src"&&t.name!=="style")throw new Error("The `placeholder` directive must be used in the `src` or `style` attributes")}update(t,[e,s]){return this.useCssBackground=t.name=="style",this.render(e,s)}render(t,e){this.loadingToken!=null&&(this.loadingToken.cancelled=!0);let s={cancelled:!1};return this.loadingToken=s,typeof t=="string"?this.preload(t,s):t?.then(o=>{this.preload(o,s)}),this.useCssBackground?Bt(e):e}preload(t,e){t!=null&&!e.cancelled&&pe(t,()=>{e.cancelled||this.setValue(this.useCssBackground?Bt(t):t)})}},zt=z($t);var ue=':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;overflow-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)}.description.with-icon{display:flex;align-items:center;gap:4px}.description.with-icon .description-icon{width:var(--sd-list-item-description-font-size, 13px);height:var(--sd-list-item-description-font-size, 13px);background-repeat:no-repeat;background-position:bottom;background-size:90%}.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}',me=Object.defineProperty,f=(i,t,e,s)=>{for(var o=void 0,n=i.length-1,r;n>=0;n--)(r=i[n])&&(o=r(t,e,o)||o);return o&&me(t,e,o),o},C,u=(C=class extends y{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[lt`
|
|
1
|
+
var window;(window||={})["@cas-smartdesign/list"]=(()=>{var nt=Object.defineProperty;var Ft=Object.getOwnPropertyDescriptor;var Vt=Object.getOwnPropertyNames;var qt=Object.prototype.hasOwnProperty;var Gt=(i,t)=>{for(var e in t)nt(i,e,{get:t[e],enumerable:!0})},Kt=(i,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Vt(t))!qt.call(i,o)&&o!==e&&nt(i,o,{get:()=>t[o],enumerable:!(s=Ft(t,o))||s.enumerable});return i};var Zt=i=>Kt(nt({},"__esModule",{value:!0}),i);var $e={};Gt($e,{default:()=>jt});var _t=class q extends HTMLElement{memoizedTemplate(){let t=this.is();if(q.TEMPLATE_CACHE[t])return q.TEMPLATE_CACHE[t];let e=this.template();return window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,this.is()),q.TEMPLATE_CACHE[t]=e,e}connectedCallback(){let t=this.memoizedTemplate();window.ShadyCSS&&window.ShadyCSS.styleElement(this),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(t.content,!0)),requestAnimationFrame(()=>this.dispatchEvent(new CustomEvent("ready"))))}whenReady(t){this.shadowRoot?t():this.addEventListener("ready",()=>t())}};_t.TEMPLATE_CACHE={};var At=_t;var G=globalThis,K=G.ShadowRoot&&(G.ShadyCSS===void 0||G.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,at=Symbol(),bt=new WeakMap,D=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==at)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(K&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=bt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&bt.set(e,t))}return t}toString(){return this.cssText}},Z=i=>new D(typeof i=="string"?i:i+"",void 0,at),lt=(i,...t)=>{let e=i.length===1?i[0]:t.reduce(((s,o,r)=>s+(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)+i[r+1]),i[0]);return new D(e,i,at)},yt=(i,t)=>{if(K)i.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),o=G.litNonce;o!==void 0&&s.setAttribute("nonce",o),s.textContent=e.cssText,i.appendChild(s)}},ct=K?i=>i:i=>i instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Z(e)})(i):i;var{is:Jt,defineProperty:Qt,getOwnPropertyDescriptor:Xt,getOwnPropertyNames:Yt,getOwnPropertySymbols:te,getPrototypeOf:ee}=Object,J=globalThis,Et=J.trustedTypes,se=Et?Et.emptyScript:"",ie=J.reactiveElementPolyfillSupport,O=(i,t)=>i,H={toAttribute(i,t){switch(t){case Boolean:i=i?se:null;break;case Object:case Array:i=i==null?i:JSON.stringify(i)}return i},fromAttribute(i,t){let e=i;switch(t){case Boolean:e=i!==null;break;case Number:e=i===null?null:Number(i);break;case Object:case Array:try{e=JSON.parse(i)}catch{e=null}}return e}},Q=(i,t)=>!Jt(i,t),xt={attribute:!0,type:String,converter:H,reflect:!1,useDefault:!1,hasChanged:Q};Symbol.metadata??=Symbol("metadata"),J.litPropertyMetadata??=new WeakMap;var $=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=xt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),o=this.getPropertyDescriptor(t,s,e);o!==void 0&&Qt(this.prototype,t,o)}}static getPropertyDescriptor(t,e,s){let{get:o,set:r}=Xt(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:o,set(n){let l=o?.call(this);r?.call(this,n),this.requestUpdate(t,l,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??xt}static _$Ei(){if(this.hasOwnProperty(O("elementProperties")))return;let t=ee(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(O("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(O("properties"))){let e=this.properties,s=[...Yt(e),...te(e)];for(let o of s)this.createProperty(o,e[o])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,o]of e)this.elementProperties.set(s,o)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let o=this._$Eu(e,s);o!==void 0&&this._$Eh.set(o,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let o of s)e.unshift(ct(o))}else t!==void 0&&e.push(ct(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return yt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,s);if(o!==void 0&&s.reflect===!0){let r=(s.converter?.toAttribute!==void 0?s.converter:H).toAttribute(e,s.type);this._$Em=t,r==null?this.removeAttribute(o):this.setAttribute(o,r),this._$Em=null}}_$AK(t,e){let s=this.constructor,o=s._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let r=s.getPropertyOptions(o),n=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:H;this._$Em=o;let l=n.fromAttribute(e,r.type);this[o]=l??this._$Ej?.get(o)??l,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let o=this.constructor,r=this[t];if(s??=o.getPropertyOptions(t),!((s.hasChanged??Q)(r,e)||s.useDefault&&s.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(o._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:o,wrapped:r},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),r!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),o===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,r]of this._$Ep)this[o]=r;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[o,r]of s){let{wrapped:n}=r,l=this[o];n!==!0||this._$AL.has(o)||l===void 0||this.C(o,void 0,r,l)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};$.elementStyles=[],$.shadowRootOptions={mode:"open"},$[O("elementProperties")]=new Map,$[O("finalized")]=new Map,ie?.({ReactiveElement:$}),(J.reactiveElementVersions??=[]).push("2.1.1");var dt=globalThis,X=dt.trustedTypes,St=X?X.createPolicy("lit-html",{createHTML:i=>i}):void 0,pt="$lit$",v=`lit$${Math.random().toFixed(9).slice(2)}$`,ut="?"+v,oe=`<${ut}>`,x=document,U=()=>x.createComment(""),R=i=>i===null||typeof i!="object"&&typeof i!="function",mt=Array.isArray,Pt=i=>mt(i)||typeof i?.[Symbol.iterator]=="function",ht=`[
|
|
2
|
+
\f\r]`,N=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ct=/-->/g,wt=/>/g,y=RegExp(`>|${ht}(?:([^\\s"'>=/]+)(${ht}*=${ht}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),It=/'/g,Tt=/"/g,Lt=/^(?:script|style|textarea|title)$/i,ft=i=>(t,...e)=>({_$litType$:i,strings:t,values:e}),T=ft(1),xe=ft(2),Se=ft(3),_=Symbol.for("lit-noChange"),c=Symbol.for("lit-nothing"),kt=new WeakMap,E=x.createTreeWalker(x,129);function Mt(i,t){if(!mt(i)||!i.hasOwnProperty("raw"))throw Error("invalid template strings array");return St!==void 0?St.createHTML(t):t}var Dt=(i,t)=>{let e=i.length-1,s=[],o,r=t===2?"<svg>":t===3?"<math>":"",n=N;for(let l=0;l<e;l++){let a=i[l],d,m,h=-1,g=0;for(;g<a.length&&(n.lastIndex=g,m=n.exec(a),m!==null);)g=n.lastIndex,n===N?m[1]==="!--"?n=Ct:m[1]!==void 0?n=wt:m[2]!==void 0?(Lt.test(m[2])&&(o=RegExp("</"+m[2],"g")),n=y):m[3]!==void 0&&(n=y):n===y?m[0]===">"?(n=o??N,h=-1):m[1]===void 0?h=-2:(h=n.lastIndex-m[2].length,d=m[1],n=m[3]===void 0?y:m[3]==='"'?Tt:It):n===Tt||n===It?n=y:n===Ct||n===wt?n=N:(n=y,o=void 0);let A=n===y&&i[l+1].startsWith("/>")?" ":"";r+=n===N?a+oe:h>=0?(s.push(d),a.slice(0,h)+pt+a.slice(h)+v+A):a+v+(h===-2?l:A)}return[Mt(i,r+(i[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},B=class i{constructor({strings:t,_$litType$:e},s){let o;this.parts=[];let r=0,n=0,l=t.length-1,a=this.parts,[d,m]=Dt(t,e);if(this.el=i.createElement(d,s),E.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(o=E.nextNode())!==null&&a.length<l;){if(o.nodeType===1){if(o.hasAttributes())for(let h of o.getAttributeNames())if(h.endsWith(pt)){let g=m[n++],A=o.getAttribute(h).split(v),V=/([.?@])?(.*)/.exec(g);a.push({type:1,index:r,name:V[2],strings:A,ctor:V[1]==="."?tt:V[1]==="?"?et:V[1]==="@"?st:C}),o.removeAttribute(h)}else h.startsWith(v)&&(a.push({type:6,index:r}),o.removeAttribute(h));if(Lt.test(o.tagName)){let h=o.textContent.split(v),g=h.length-1;if(g>0){o.textContent=X?X.emptyScript:"";for(let A=0;A<g;A++)o.append(h[A],U()),E.nextNode(),a.push({type:2,index:++r});o.append(h[g],U())}}}else if(o.nodeType===8)if(o.data===ut)a.push({type:2,index:r});else{let h=-1;for(;(h=o.data.indexOf(v,h+1))!==-1;)a.push({type:7,index:r}),h+=v.length-1}r++}}static createElement(t,e){let s=x.createElement("template");return s.innerHTML=t,s}};function S(i,t,e=i,s){if(t===_)return t;let o=s!==void 0?e._$Co?.[s]:e._$Cl,r=R(t)?void 0:t._$litDirective$;return o?.constructor!==r&&(o?._$AO?.(!1),r===void 0?o=void 0:(o=new r(i),o._$AT(i,e,s)),s!==void 0?(e._$Co??=[])[s]=o:e._$Cl=o),o!==void 0&&(t=S(i,o._$AS(i,t.values),o,s)),t}var Y=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){let{el:{content:e},parts:s}=this._$AD,o=(t?.creationScope??x).importNode(e,!0);E.currentNode=o;let r=E.nextNode(),n=0,l=0,a=s[0];for(;a!==void 0;){if(n===a.index){let d;a.type===2?d=new I(r,r.nextSibling,this,t):a.type===1?d=new a.ctor(r,a.name,a.strings,this,t):a.type===6&&(d=new it(r,this,t)),this._$AV.push(d),a=s[++l]}n!==a?.index&&(r=E.nextNode(),n++)}return E.currentNode=x,o}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},I=class i{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,o){this.type=2,this._$AH=c,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=o,this._$Cv=o?.isConnected??!0}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=S(this,t,e),R(t)?t===c||t==null||t===""?(this._$AH!==c&&this._$AR(),this._$AH=c):t!==this._$AH&&t!==_&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Pt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==c&&R(this._$AH)?this._$AA.nextSibling.data=t:this.T(x.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,o=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=B.createElement(Mt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===o)this._$AH.p(e);else{let r=new Y(o,this),n=r.u(this.options);r.p(e),this.T(n),this._$AH=r}}_$AC(t){let e=kt.get(t.strings);return e===void 0&&kt.set(t.strings,e=new B(t)),e}k(t){mt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,o=0;for(let r of t)o===e.length?e.push(s=new i(this.O(U()),this.O(U()),this,this.options)):s=e[o],s._$AI(r),o++;o<e.length&&(this._$AR(s&&s._$AB.nextSibling,o),e.length=o)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},C=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,o,r){this.type=1,this._$AH=c,this._$AN=void 0,this.element=t,this.name=e,this._$AM=o,this.options=r,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=c}_$AI(t,e=this,s,o){let r=this.strings,n=!1;if(r===void 0)t=S(this,t,e,0),n=!R(t)||t!==this._$AH&&t!==_,n&&(this._$AH=t);else{let l=t,a,d;for(t=r[0],a=0;a<r.length-1;a++)d=S(this,l[s+a],e,a),d===_&&(d=this._$AH[a]),n||=!R(d)||d!==this._$AH[a],d===c?t=c:t!==c&&(t+=(d??"")+r[a+1]),this._$AH[a]=d}n&&!o&&this.j(t)}j(t){t===c?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},tt=class extends C{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===c?void 0:t}},et=class extends C{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==c)}},st=class extends C{constructor(t,e,s,o,r){super(t,e,s,o,r),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??c)===_)return;let s=this._$AH,o=t===c&&s!==c||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==c&&(s===c||o);o&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Ot={M:pt,P:v,A:ut,C:1,L:Dt,R:Y,D:Pt,V:S,I,H:C,N:et,U:st,B:tt,F:it},re=dt.litHtmlPolyfillSupport;re?.(B,I),(dt.litHtmlVersions??=[]).push("3.3.1");var Ht=(i,t,e)=>{let s=e?.renderBefore??t,o=s._$litPart$;if(o===void 0){let r=e?.renderBefore??null;s._$litPart$=o=new I(t.insertBefore(U(),r),r,void 0,e??{})}return o._$AI(i),o};var gt=globalThis,b=class extends ${constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ht(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return _}};b._$litElement$=!0,b.finalized=!0,gt.litElementHydrateSupport?.({LitElement:b});var ne=gt.litElementPolyfillSupport;ne?.({LitElement:b});(gt.litElementVersions??=[]).push("4.2.1");var ae={attribute:!0,type:String,converter:H,reflect:!1,hasChanged:Q},le=(i=ae,t,e)=>{let{kind:s,metadata:o}=e,r=globalThis.litPropertyMetadata.get(o);if(r===void 0&&globalThis.litPropertyMetadata.set(o,r=new Map),s==="setter"&&((i=Object.create(i)).wrapped=!0),r.set(e.name,i),s==="accessor"){let{name:n}=e;return{set(l){let a=t.get.call(this);t.set.call(this,l),this.requestUpdate(n,a,i)},init(l){return l!==void 0&&this.C(n,void 0,i,l),l}}}if(s==="setter"){let{name:n}=e;return function(l){let a=this[n];t.call(this,l),this.requestUpdate(n,a,i)}}throw Error("Unsupported decorator location: "+s)};function p(i){return(t,e)=>typeof e=="object"?le(i,t,e):((s,o,r)=>{let n=o.hasOwnProperty(r);return o.constructor.createProperty(r,s),n?Object.getOwnPropertyDescriptor(o,r):void 0})(i,t,e)}var P={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},z=i=>(...t)=>({_$litDirective$:i,values:t}),k=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var W=class extends k{constructor(t){if(super(t),this.it=c,t.type!==P.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===c||t==null)return this._t=void 0,this.it=t;if(t===_)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};W.directiveName="unsafeHTML",W.resultType=1;var Nt=z(W);var j=i=>i??c;var{I:Ye}=Ot;var Ut=i=>i.strings===void 0;var F=(i,t)=>{let e=i._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),F(s,t);return!0},ot=i=>{let t,e;do{if((t=i._$AM)===void 0)break;e=t._$AN,e.delete(i),i=t}while(e?.size===0)},Rt=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(i))break;e.add(i),de(t)}};function ce(i){this._$AN!==void 0?(ot(this),this._$AM=i,Rt(this)):this._$AM=i}function he(i,t=!1,e=0){let s=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(t)if(Array.isArray(s))for(let r=e;r<s.length;r++)F(s[r],!1),ot(s[r]);else s!=null&&(F(s,!1),ot(s));else F(this,i)}var de=i=>{i.type==P.CHILD&&(i._$AP??=he,i._$AQ??=ce)},rt=class extends k{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),Rt(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(F(this,t),ot(this))}setValue(t){if(Ut(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Bt=i=>i?i.startsWith("url")?i:`url("${i}")`:null,pe=(i,t)=>{if(i){let e=new Image;e.addEventListener("load",t),e.src=i,e.complete&&(e.removeEventListener("load",t),window.queueMicrotask(()=>t()))}};var $t=class extends rt{constructor(t){if(super(t),t.type!==P.ATTRIBUTE||t.name!=="src"&&t.name!=="style")throw new Error("The `placeholder` directive must be used in the `src` or `style` attributes")}update(t,[e,s]){return this.useCssBackground=t.name=="style",this.render(e,s)}render(t,e){this.loadingToken!=null&&(this.loadingToken.cancelled=!0);let s={cancelled:!1};return this.loadingToken=s,typeof t=="string"?this.preload(t,s):t?.then(o=>{this.preload(o,s)}),this.useCssBackground?Bt(e):e}preload(t,e){t!=null&&!e.cancelled&&pe(t,()=>{e.cancelled||this.setValue(this.useCssBackground?Bt(t):t)})}},zt=z($t);var ue=':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;overflow-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)}.description.with-icon{display:flex;align-items:center;gap:4px}.description.with-icon .description-icon{width:var(--sd-list-item-description-font-size, 13px);height:var(--sd-list-item-description-font-size, 13px);background-repeat:no-repeat;background-position:bottom;background-size:90%}.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}',me=Object.defineProperty,f=(i,t,e,s)=>{for(var o=void 0,r=i.length-1,n;r>=0;r--)(n=i[r])&&(o=n(t,e,o)||o);return o&&me(t,e,o),o},w,u=(w=class extends b{constructor(){super(...arguments),this.contentMode="text",this.role="option"}static get styles(){return[lt`
|
|
4
4
|
${Z(ue)}
|
|
5
5
|
`]}render(){return T`
|
|
6
6
|
<div class="container">
|
|
@@ -29,9 +29,9 @@ var window;(window||={})["@cas-smartdesign/list"]=(()=>{var rt=Object.defineProp
|
|
|
29
29
|
</div> `:c}renderLabel(i,t,e,s){return t?T`
|
|
30
30
|
<div class="${i} ${s?"with-icon":""}" title="${j(e)}">
|
|
31
31
|
${s?T` <div class="${i}-icon" style="background-image:url('${s}')" aria-hidden="true"></div> `:c}
|
|
32
|
-
${this.contentMode==="html"?
|
|
32
|
+
${this.contentMode==="html"?Nt(t):t}
|
|
33
33
|
</div>
|
|
34
|
-
`:c}updated(i){super.updated(i),i.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let i=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,e=this.shadowRoot.querySelector(".caption");e&&(t+=e.scrollWidth-e.clientWidth);let s=this.shadowRoot.querySelector(".description");return s&&(t=Math.max(t,s.scrollWidth-s.clientWidth)),t>0&&t++,i&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(i){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",i))&&i.preventDefault()}getLevelIndicators(){return this.level?Array(Number(this.level)).fill(null):[]}},
|
|
34
|
+
`:c}updated(i){super.updated(i),i.has("selected")&&this.setAttribute("aria-selected",String(this.selected))}get missingWidthForTexts(){let i=this.enableLineClamp;this.removeAttribute("enable-line-clamp");let t=0,e=this.shadowRoot.querySelector(".caption");e&&(t+=e.scrollWidth-e.clientWidth);let s=this.shadowRoot.querySelector(".description");return s&&(t=Math.max(t,s.scrollWidth-s.clientWidth)),t>0&&t++,i&&this.setAttribute("enable-line-clamp",""),t}handleIconClick(i){!this.disabled&&!this.dispatchEvent(new PointerEvent("list-item-icon-click",i))&&i.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);f([p({type:String})],u.prototype,"caption");f([p({type:String})],u.prototype,"description");f([p({type:String})],u.prototype,"descriptionIcon");f([p({type:Boolean})],u.prototype,"selected");f([p({type:String})],u.prototype,"icon");f([p({type:String})],u.prototype,"iconBackgroundColor");f([p({type:String})],u.prototype,"iconPlaceholder");f([p({type:Number})],u.prototype,"level");f([p()],u.prototype,"contentMode");f([p({type:Boolean,reflect:!0,attribute:"enable-line-clamp"})],u.prototype,"enableLineClamp");f([p({converter:{fromAttribute:i=>i=="true",toAttribute:i=>i},reflect:!0,attribute:"aria-disabled"})],u.prototype,"disabled");f([p({type:String,attribute:"icon-attr-aria-label"})],u.prototype,"iconAttrAriaLabel");f([p({type:String,reflect:!0})],u.prototype,"role");f([p({type:String,attribute:"caption-attr-title"})],u.prototype,"captionAttrTitle");f([p({type:String,attribute:"description-attr-title"})],u.prototype,"descriptionAttrTitle");f([p({type:String,attribute:"icon-attr-title"})],u.prototype,"iconAttrTitle");var L=u,Wt=(i,t)=>{let e=document.createElement(L.ID);if(i){if(e.caption=i.caption,e.description=i.description,e.descriptionIcon=i.descriptionIcon,e.icon=i.icon,e.iconBackgroundColor=i.iconBackgroundColor,e.iconPlaceholder=i.iconPlaceholder,e.level=i.level,e.disabled=i.disabled,i.contentMode&&(e.contentMode=i.contentMode),i.leftContentGenerator){let s=i.leftContentGenerator(i,e);s&&(s.slot="left-content",e.appendChild(s))}if(i.rightContentGenerator){let s=i.rightContentGenerator(i,e);s&&(s.slot="right-content",e.appendChild(s))}}return e};L.ensureDefined();var fe=`<style>
|
|
35
35
|
:host {
|
|
36
36
|
background-color: var(--sd-list-base-background-color, white);
|
|
37
37
|
}
|
|
@@ -63,7 +63,7 @@ var window;(window||={})["@cas-smartdesign/list"]=(()=>{var rt=Object.defineProp
|
|
|
63
63
|
<slot name="items"></slot>
|
|
64
64
|
<slot id="default-slot"></slot>
|
|
65
65
|
</div>
|
|
66
|
-
`,ge=0,M=class
|
|
66
|
+
`,ge=0,M=class vt extends At{constructor(){super(),this._items=[],this._selectedIndexes=[],this._itemGenerator=Wt,this._focusObserverCleanupTasks=[],this.onDefaultSlotChange=()=>{let e=0;this.defaultSlot.assignedElements().forEach(s=>{this.isSeparator(s)||this.initListItem(s,e++)}),this.updateFocusedElement()},this.handleKeyDown=e=>{let s=!0,o=this.getListItems.length;switch(e.key){case"ArrowDown":case"Down":this.focusIndex=(this.focusIndex+1)%o;break;case"ArrowUp":case"Up":this.focusIndex=(this.focusIndex-1+o)%o;break;case"Enter":case"Space":case" ":this.handleSelection(this.focusIndex,e.metaKey||e.ctrlKey);break;case"End":case"PageDown":this.focusIndex=this.items.length-1;break;case"Home":case"PageUp":this.focusIndex=0;break;default:s=!1;break}s&&(e.preventDefault(),e.stopPropagation())},this._fallbackId=vt.ID+"_"+ge++,this.addEventListener("pointerup",e=>{this.focusIndex=this.getListItems.indexOf(e.target),this.updateFocusedElement()}),this.addEventListener("focus",()=>{this.matches(":focus-visible")&&(this.focusIndex==-1?(this.selectedIndexes&&(this.focusIndex=this.selectedIndexes[0]),this.focusIndex==-1&&this.childElementCount>0&&(this.focusIndex=0)):this.updateFocusedElement())}),this.addEventListener("blur",()=>this.removeFocusedItemAttributes());let t={root:null,rootMargin:"0px",threshold:[0,1]};this._focusObserver=new IntersectionObserver(e=>this.focusIntersectionCallback(e,this),t)}get items(){return this._items}set items(t){this._items=t,this.render()}get itemGenerator(){return this._itemGenerator}set itemGenerator(t){this._itemGenerator=t,this.render()}get selectionType(){return this.getAttribute("selection-type")}set selectionType(t){t?this.setAttribute("selection-type",t):this.removeAttribute("selection-type")}get focusIndex(){return this.hasAttribute("focus-index")?Number(this.getAttribute("focus-index")):-1}set focusIndex(t){0<=t&&t<this.getListItems.length?this.setAttribute("focus-index",t.toString()):this.removeAttribute("focus-index")}get focusTarget(){return this.hasAttribute("focus-target")}set focusTarget(t){this.toggleAttribute("focus-target",t)}getListItem(t){return this.shadowRoot?this.getListItems[t]:null}get getListItems(){return Array.prototype.slice.call(this.children).filter(t=>!this.isSeparator(t))}get selectedIndexes(){return this._selectedIndexes}set selectedIndexes(t){let e=this._selectedIndexes||[];this._selectedIndexes=t||[],e.filter(s=>!this._selectedIndexes.includes(s)).forEach(s=>{this.setSelectedAttr(this.getListItem(s),!1)}),this._selectedIndexes.filter(s=>!e.includes(s)).forEach(s=>{this.setSelectedAttr(this.getListItem(s),!0)})}static get observedAttributes(){return["focus-index","focus-target"]}is(){return vt.ID}template(){let t=document.createElement("template");return t.innerHTML=fe,t}removeFocusedItemAttributes(){if(this.focusIndex!=-1){let t=this.getListItem(this.focusIndex);t&&(t.removeAttribute("focused"),this._focusObserverCleanupTasks.forEach(e=>e.call(this)),this._focusObserverCleanupTasks=[],this.removeAttribute("aria-activedescendant"))}}connectedCallback(){super.connectedCallback(),this.defaultSlot.addEventListener("slotchange",this.onDefaultSlotChange),this.hasAttribute("role")||this.setAttribute("role","listbox"),this.id||(this.id=this._fallbackId),this.render(),this.addEventListener("keydown",this.handleKeyDown),this.selectionType||(this.selectionType="trigger-only")}get defaultSlot(){return this.shadowRoot.querySelector("#default-slot")}isSeparator(t){return t.tagName=="HR"||t.getAttribute("role")=="separator"}attributeChangedCallback(t,e,s){if(t==="focus-index"){let o=this.getListItem(e);o&&o.removeAttribute("focused"),this.updateFocusedElement()}else t==="focus-target"&&(this.focusTarget?this.updateFocusedElement():document.activeElement!=this&&this.removeFocusedItemAttributes())}increaseWidthIfNeeded(){window.requestAnimationFrame(()=>{let t=Number.MAX_SAFE_INTEGER,e=getComputedStyle(this).maxWidth,s=this.offsetWidth;e.endsWith("px")&&(t=Number.parseInt(e)-s);let o=this.style.width;if(t==0||o.endsWith("px")&&s<Number.parseInt(o))this.enableLineClampOnItemsIfNeeded();else{let r=[...Array.from(this.children).filter(l=>l.slot==="items")].map(l=>{if(l instanceof L){l.enableLineClamp=!1;let a=l.missingWidthForTexts;return a>t&&(l.enableLineClamp=!0),a}}),n=Math.max(...r);if(n>0){let l=s+n;this.style.width=`${l}px`,this.offsetWidth<l&&this.enableLineClampOnItemsIfNeeded()}}})}enableLineClampOnItemsIfNeeded(){Array.from(this.children).filter(t=>t.slot==="items").forEach(t=>{t instanceof L&&(t.enableLineClamp=t.enableLineClamp||t.missingWidthForTexts>0)})}render(){if(!this.isConnected||!this.items)return;Array.from(this.children).filter(s=>s.slot==="items").forEach(s=>s.remove());let t=document.createDocumentFragment(),e=0;this.items.forEach((s,o)=>{let r=this.itemGenerator(s,o);this.isSeparator(r)||this.initListItem(r,e++),r.slot="items",t.appendChild(r)}),this.appendChild(t),this.updateFocusedElement()}initListItem(t,e){this.setSelectedAttr(t,this.selectedIndexes.includes(e)),t.addEventListener("click",s=>{this.handleItemClick(s,e)}),t.addEventListener("mousedown",s=>{s.button==1&&s.preventDefault()}),t.addEventListener("auxclick",s=>{this.handleItemClick(s,e)}),(!t.id||t.id.startsWith(this.id+"_item_"))&&(t.id=this.id+"_item_"+e)}focusIntersectionCallback(t,e){t.forEach(s=>{let o=s.target;(!s.isIntersecting||s.intersectionRatio<1)&&(o.scrollIntoView({block:"nearest",inline:"nearest"}),e._focusObserver.unobserve(o))})}updateFocusedElement(){let t=this.getListItem(this.focusIndex);t&&(this.focusTarget||this.matches(":focus"))?(t.setAttribute("focused",""),this.setAttribute("aria-activedescendant",t.id),this._focusObserver.observe(t),this._focusObserverCleanupTasks.push(()=>{this._focusObserver.unobserve(t)})):(this._focusObserverCleanupTasks.forEach(e=>e.call(this)),this._focusObserverCleanupTasks=[],this.removeAttribute("aria-activedescendant"))}handleItemClick(t,e){if(t.button!==null){let s=t.type=="auxclick"&&t.button==1||t.metaKey||t.ctrlKey;(t.button==0||t.button==1)&&this.handleSelection(e,s)}}handleSelection(t,e){let s=this.getListItem(t);if(s.getAttribute("aria-disabled")=="true"||s.hasAttribute("disabled"))return;let o=this.isSelected(s);this.selectionType!=="trigger-only"&&(this.selectionType==="single"?this.selectedIndexes=o?[]:[t]:this.toggleSelection(s)?this._selectedIndexes.push(t):this.removeFromSelectedIndexes(t)),this.focusIndex=t,this.dispatchEvent(new CustomEvent("selection",{detail:{index:t,selected:this.selectionType=="trigger-only"||!o,hasModifier:e},bubbles:!0,composed:!0}))}removeFromSelectedIndexes(t){let e=this._selectedIndexes.indexOf(t);e!==-1&&this._selectedIndexes.splice(e,1)}toggleSelection(t){let e=!t.hasAttribute("selected");return this.setSelectedAttr(t,e),e}setSelectedAttr(t,e){t&&(e?t.setAttribute("selected",""):t.removeAttribute("selected"),t.setAttribute("aria-selected",String(e)))}isSelected(t){return t.hasAttribute("selected")}};M.ID="sd-list",M.ensureDefined=()=>{L.ensureDefined(),customElements.get(M.ID)||customElements.define(M.ID,M)};var jt=M;jt.ensureDefined();return Zt($e);})();
|
|
67
67
|
/*! Bundled license information:
|
|
68
68
|
|
|
69
69
|
@lit/reactive-element/css-tag.js:
|