1import{i as r,x as d,n}from"./property-B5Pl7mtY.js";import{L as c,w as i}from"./chunk.GMYPQTFK-Bxz4nccB.js";import{S as p,r as a}from"./chunk.4GJTAPTW-DMRZYsfM.js";import{S as h,c as u,_ as l,e as f}from"./chunk.PFOQ5QRR-D5PzUM7v.js";import{a as v}from"./class-map--aFqFJmz.js";import"./directive-helpers-Cl9W1NAT.js";try{let t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="49346db5-7c6f-4ead-bcf8-d8cae3122328",t._sentryDebugIdIdentifier="sentry-dbid-49346db5-7c6f-4ead-bcf8-d8cae3122328")}catch{}var b=r` 2 :host { 3 display: block; 4 user-select: none; 5 -webkit-user-select: none; 6 } 7 8 :host(:focus) { 9 outline: none; 10 } 11 12 .option { 13 position: relative; 14 display: flex; 15 align-items: center; 16 font-family: var(--sl-font-sans); 17 font-size: var(--sl-font-size-medium); 18 font-weight: var(--sl-font-weight-normal); 19 line-height: var(--sl-line-height-normal); 20 letter-spacing: var(--sl-letter-spacing-normal); 21 color: var(--sl-color-neutral-700); 22 padding: var(--sl-spacing-x-small) var(--sl-spacing-medium) var(--sl-spacing-x-small) var(--sl-spacing-x-small); 23 transition: var(--sl-transition-fast) fill; 24 cursor: pointer; 25 } 26 27 .option--hover:not(.option--current):not(.option--disabled) { 28 background-color: var(--sl-color-neutral-100); 29 color: var(--sl-color-neutral-1000); 30 } 31 32 .option--current, 33 .option--current.option--disabled { 34 background-color: var(--sl-color-primary-600); 35 color: var(--sl-color-neutral-0); 36 opacity: 1; 37 } 38 39 .option--disabled { 40 outline: none; 41 opacity: 0.5; 42 cursor: not-allowed; 43 } 44 45 .option__label { 46 flex: 1 1 auto; 47 display: inline-block; 48 line-height: var(--sl-line-height-dense); 49 } 50 51 .option .option__check { 52 flex: 0 0 auto; 53 display: flex; 54 align-items: center; 55 justify-content: center; 56 visibility: hidden; 57 padding-inline-end: var(--sl-spacing-2x-small); 58 } 59 60 .option--selected .option__check { 61 visibility: visible; 62 } 63 64 .option__prefix, 65 .option__suffix { 66 flex: 0 0 auto; 67 display: flex; 68 align-items: center; 69 } 70 71 .option__prefix::slotted(*) { 72 margin-inline-end: var(--sl-spacing-x-small); 73 } 74 75 .option__suffix::slotted(*) { 76 margin-inline-start: var(--sl-spacing-x-small); 77 } 78 79 @media (forced-colors: active) { 80 :host(:hover:not([aria-disabled='true'])) .option { 81 outline: dashed 1px SelectedItem; 82 outline-offset: -1px; 83 } 84 } 85`,e=class extends h{constructor(){super(...arguments),this.localize=new c(this),this.isInitialized=!1,this.current=!1,this.selected=!1,this.hasHover=!1,this.value="",this.disabled=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","option"),this.setAttribute("aria-selected","false")}handleDefaultSlotChange(){this.isInitialized?customElements.whenDefined("sl-select").then(()=>{const t=this.closest("sl-select");t&&t.handleDefaultSlotChange()}):this.isInitialized=!0}handleMouseEnter(){this.hasHover=!0}handleMouseLeave(){this.hasHover=!1}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false")}handleSelectedChange(){this.setAttribute("aria-selected",this.selected?"true":"false")}handleValueChange(){typeof this.value!="string"&&(this.value=String(this.value)),this.value.includes(" ")&&(console.error("Option values cannot include a space. All spaces have been replaced with underscores.",this),this.value=this.value.replace(/ /g,"_"))}getTextLabel(){const t=this.childNodes;let s="";return[...t].forEach(o=>{o.nodeType===Node.ELEMENT_NODE&&(o.hasAttribute("slot")||(s+=o.textContent)),o.nodeType===Node.TEXT_NODE&&(s+=o.textContent)}),s.trim()}render(){return d` 86 <div 87 part="base" 88 class=${v({option:!0,"option--current":this.current,"option--disabled":this.disabled,"option--selected":this.selected,"option--hover":this.hasHover})} 89 @mouseenter=${this.handleMouseEnter} 90 @mouseleave=${this.handleMouseLeave} 91 > 92 <sl-icon part="checked-icon" class="option__check" name="check" library="system" aria-hidden="true"></sl-icon> 93 <slot part="prefix" name="prefix" class="option__prefix"></slot> 94 <slot part="label" class="option__label" @slotchange=${this.handleDefaultSlotChange}></slot> 95 <slot part="suffix" name="suffix" class="option__suffix"></slot> 96 </div> 97 `}};e.styles=[u,b];e.dependencies={"sl-icon":p};l([f(".option__label")],e.prototype,"defaultSlot",2);l([a()],e.prototype,"current",2);l([a()],e.prototype,"selected",2);l([a()],e.prototype,"hasHover",2);l([n({reflect:!0})],e.prototype,"value",2);l([n({type:Boolean,reflect:!0})],e.prototype,"disabled",2);l([i("disabled")],e.prototype,"handleDisabledChange",1);l([i("selected")],e.prototype,"handleSelectedChange",1);l([i("value")],e.prototype,"handleValueChange",1);var w=e;e.define("sl-option");export{w as default}; 98//# sourceMappingURL=option-Dd_Pah1x.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.