1import{r as a,c as s,h as t,a as e}from"./p-9add63ef.js";import{i}from"./p-b0d8cd6e.js";const c=":host{display:block}.tab{font-family:var(--sc-font-sans);color:var(--sc-color-gray-600);display:flex;align-items:center;justify-content:flex-start;line-height:1;padding:var(--sc-spacing-small) var(--sc-spacing-small);font-size:var(--sc-font-size-medium);font-weight:var(--sc-font-weight-semibold);border-radius:var(--sc-border-radius-small);cursor:pointer;transition:color 0.35s ease, background-color 0.35s ease;user-select:none;text-decoration:none}.tab.tab--active,.tab:hover{color:var(--sc-tab-active-color, var(--sc-color-gray-900));background-color:var(--sc-tab-active-background, var(--sc-color-gray-100))}.tab.tab--disabled{cursor:not-allowed;color:var(--sc-color-gray-400)}.tab__content{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:var(--sc-line-height-dense)}.tab__prefix,.tab__suffix{flex:0 0 auto;display:flex;align-items:center}.tab__suffix{margin-left:auto}.tab__counter{background:var(--sc-color-gray-200);display:inline-block;padding:var(--sc-spacing-xx-small) var(--sc-spacing-small);border-radius:var(--sc-border-radius-pill);font-size:var(--sc-font-size-small);text-align:center;line-height:1;transition:color 0.35s ease, background-color 0.35s ease}.tab.tab--active .tab__counter,.tab:hover .tab__counter{background:var(--sc-color-white)}.tab--has-prefix{padding-left:var(--sc-spacing-small)}.tab--has-prefix .tab__content{padding-left:var(--sc-spacing-small)}.tab--has-suffix{padding-right:var(--sc-spacing-small)}.tab--has-suffix .tab__label{padding-right:var(--sc-spacing-small)}.tab--is-rtl.tab--has-prefix .tab__content{padding-left:0;padding-right:var(--sc-spacing-small)}";const r=c;let o=0;const l=class{constructor(t){a(this,t);this.scClose=s(this,"scClose",7);this.componentId=`tab-${++o}`;this.panel="";this.href=undefined;this.active=false;this.disabled=false;this.count=undefined;this.hasPrefix=false;this.hasSuffix=false}async triggerFocus(a){this.tab.focus(a)}async triggerBlur(){this.tab.blur()}handleSlotChange(){this.hasPrefix=!!this.el.querySelector('[slot="prefix"]');this.hasSuffix=!!this.el.querySelector('[slot="suffix"]')}render(){this.el.id=this.el.id||this.componentId;const a=this.href?"a":"div";return t(a,{key:"706c74223bcc9979bca5ff9d46251eb6c02ebc8f",part:`base ${this.active?`active`:``}`,href:this.href,class:{tab:true,"tab--active":this.active,"tab--disabled":this.disabled,"tab--has-prefix":this.hasPrefix,"tab--has-suffix":this.hasSuffix,"tab--is-rtl":i()},ref:a=>this.tab=a,role:"tab","aria-disabled":this.disabled?"true":"false","aria-selected":this.active?"true":"false",tabindex:this.disabled?"-1":"0"},t("span",{key:"e5101de0f1cfc5eee953b7d015920711d2ae34bf",part:"prefix",class:"tab__prefix"},t("slot",{key:"6a55a56db86bcff5a348a23c8c7c8033061263cb",onSlotchange:()=>this.handleSlotChange(),name:"prefix"})),t("div",{key:"359bce49958b10bd6e070bd203ca4dfac566f52c",class:"tab__content",part:"content"},t("slot",{key:"abee6484070f538ab0d9c9624f35ed1c1b07d641"})),t("span",{key:"f5a7ede55f3c9b287acc26514325649f97e114f7",part:"suffix",class:"tab__suffix"},t("slot",{key:"2443967be5a5c8a6c3b98c4420aed0250310b4d9",onSlotchange:()=>this.handleSlotChange(),name:"suffix"})),t("slot",{key:"349177850bd7439caab8a8378cf27beabdb2b38a",name:"suffix"},!!this.count&&t("div",{key:"4726ab7206f54b9cb4fbd8acf86b5624d62f1b86",class:"tab__counter",part:"counter"},this.count)))}get el(){return e(this)}};l.style=r;export{l as sc_tab}; 2//# sourceMappingURL=p-473d122e.entry.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.