scb-wc 0.1.14 → 0.1.16
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/mvc/components/scb-scrollspy/scb-scrollspy.js +5 -5
- package/mvc/scb-logo.svg +20 -20
- package/mvc/scb.svg +13 -13
- package/package.json +2 -2
- package/scb-scrollspy/scb-scrollspy.js +3 -3
- package/scb-wc.bundle.js +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as w,b as R,g as M,y as g}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as O}from"../../vendor/decorate.js";(function(){try{var h=typeof globalThis<"u"?globalThis:window;if(!h.__scb_ce_guard_installed__){h.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,s,i){try{customElements.get(e)||t(e,s,i)}catch(o){var n=String(o||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var m,E=(m=class extends w{constructor(...t){super(...t),this.navSelector="",this.offsetTop=0,this.offsetBottom=0,this.updateHash=!0,this.activeId="",this.layout="",this.sidebarNavWidth="320px",this.sidebarHeight="560px",this.stackHeight="",this.sidebarNavTop="0px",this.contentPadding="0px",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__navEl=null,this.__contentEl=null,this.__contentShellEl=null,this.__links=[],this.__observer=null,this.__fallbackScrollRoot=null,this.__entries=new Map,this.__rafId=null,this.__scrollRafId=null,this.__hashAllowUpdates=!1,this.__hashBaselineReady=!1,this.__hashBaselinePos=0,this.__hashBaselineRafId=null,this.__hashScrollRoot=null,this.__hashSuspend=!1,this.__hashInitialApplied=!1,this.__onHashScrollBound=()=>this.__onHashScroll(),this.__scrollAnimSeq=0,this.__syncingActiveId=!1,this.__slotsResolvedOnce=!1,this.__motionMeasureEl=null,this.__focusableRafId=null,this.__autoOffsetTop=0,this.__autoOffsetRafId=null,this.__navResizeObserver=null,this.__onNavClickBound=e=>this.__onNavClick(e),this.__onScrollFallbackBound=()=>this.__updateActiveFromRects(),this.__onResizeBound=()=>{this.__requestActiveRecalc(),this.__requestAutoOffsetMeasure()},this.__onSlotChange=()=>{const e=this.__navEl;this.__teardown(),this.__resolveSlots(),this.__requestEnsureContentFocusable(),this.__navEl&&this.__navEl.addEventListener("click",this.__onNavClickBound,!0),(e!==this.__navEl||!this.__links.length)&&this.__collectLinks(),this.__requestAutoOffsetMeasure(),this.__rebuildObserver(),this.__attachHashScrollRoot(),this.__applyInitialHashIfAny(),!this.__hashInitialApplied&&this.activeId&&this.__applyActiveId(this.activeId,{updateHash:!1,scrollToTarget:!1}),this.__slotsResolvedOnce=!0}}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.__onResizeBound,{passive:!0})}firstUpdated(){this.__ensureMotionMeasureEl(),this.__resolveInternals(),this.__requestEnsureContentFocusable(),this.__requestAutoOffsetMeasure(),this.__applySpacing()}disconnectedCallback(){window.removeEventListener("resize",this.__onResizeBound),this.__teardown(),super.disconnectedCallback()}updated(t){if((t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing(),t.has("navSelector")){this.__onSlotChange();return}if(t.has("layout")){this.__onSlotChange();return}(t.has("offsetTop")||t.has("offsetBottom"))&&(this.__rebuildObserver(),this.__attachHashScrollRoot()),(t.has("sidebarNavWidth")||t.has("sidebarHeight")||t.has("stackHeight")||t.has("sidebarNavTop")||t.has("contentPadding"))&&(this.__resolveInternals(),this.__requestEnsureContentFocusable(),this.__rebuildObserver()),t.has("activeId")&&(this.__syncingActiveId?this.__syncingActiveId=!1:this.__applyExternalActiveId())}__mapSpacingToken(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}__applySpacing(){const t=this.__mapSpacingToken(this.spacing),e=this.__mapSpacingToken(this.spacingTop)??t,s=this.__mapSpacingToken(this.spacingBottom)??t,i=this.__mapSpacingToken(this.spacingLeft),n=this.__mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-scrollspy-spacing-block-start",e):this.style.removeProperty("--scb-scrollspy-spacing-block-start"),s?this.style.setProperty("--scb-scrollspy-spacing-block-end",s):this.style.removeProperty("--scb-scrollspy-spacing-block-end"),i?this.style.setProperty("--scb-scrollspy-spacing-inline-start",i):this.style.removeProperty("--scb-scrollspy-spacing-inline-start"),n?this.style.setProperty("--scb-scrollspy-spacing-inline-end",n):this.style.removeProperty("--scb-scrollspy-spacing-inline-end")}__teardown(){this.__cancelScrollAnimation(),this.__cancelEnsureContentFocusable(),this.__cancelAutoOffsetMeasure(),this.__disconnectAutoOffsetObserver(),this.__disconnectObserver(),this.__navEl&&this.__navEl.removeEventListener("click",this.__onNavClickBound,!0),this.__fallbackScrollRoot&&this.__fallbackScrollRoot.removeEventListener?.("scroll",this.__onScrollFallbackBound),this.__fallbackScrollRoot=null,this.__entries.clear(),this.__links=[],this.__detachHashScrollRoot(),this.__cancelHashBaseline()}__cancelScrollAnimation(){this.__scrollAnimSeq++,this.__scrollRafId!==null&&(window.cancelAnimationFrame(this.__scrollRafId),this.__scrollRafId=null)}__cancelEnsureContentFocusable(){this.__focusableRafId!==null&&(window.cancelAnimationFrame(this.__focusableRafId),this.__focusableRafId=null)}__requestEnsureContentFocusable(){typeof window>"u"||(this.__cancelEnsureContentFocusable(),this.__focusableRafId=window.requestAnimationFrame(()=>{this.__focusableRafId=null,this.__ensureScrollableContentFocusable()}))}__ensureScrollableContentFocusable(){const t=this.__getScrollContainerEl();t instanceof HTMLElement&&(t.hasAttribute("tabindex")||(t.scrollHeight>t.clientHeight+1||t.scrollWidth>t.clientWidth+1)&&(t.querySelector('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"]), [contenteditable=""], [contenteditable="true"]')||t.setAttribute("tabindex","0")))}__ensureMotionMeasureEl(){if(this.__motionMeasureEl)return;const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.style.position="fixed",t.style.width="0",t.style.height="0",t.style.overflow="hidden",t.style.pointerEvents="none",t.style.visibility="hidden",this.__motionMeasureEl=t,this.renderRoot.appendChild(t)}__disconnectObserver(){this.__observer&&(this.__observer.disconnect(),this.__observer=null)}__resolveInternals(){this.__contentShellEl=this.layout==="sidebar"?this.renderRoot.querySelector(".sidebar-content"):this.layout==="stack"?this.renderRoot.querySelector(".stack-shell"):null}__resolveSlots(){const t=this.renderRoot.querySelector('slot[name="nav"]'),e=this.renderRoot.querySelector('slot[name="content"]'),s=t?.assignedElements({flatten:!0})??[],i=e?.assignedElements({flatten:!0})??[],n=(this.navSelector||"").trim(),o=n?this.__queryExternalNav(n):s[0],r=i[0];this.__navEl=o instanceof HTMLElement?o:null,this.__contentEl=r instanceof HTMLElement?r:null,this.__resolveInternals()}__queryExternalNav(t){try{return this.getRootNode?.()?.querySelector?.(t)??document.querySelector(t)}catch{return null}}__getScrollContainerEl(){return this.layout==="sidebar"||this.layout==="stack"?this.__contentShellEl:this.__contentEl}__isOffsetTopExplicit(){return this.hasAttribute("offset-top")}__getEffectiveOffsetTop(){const t=this.__isOffsetTopExplicit()?this.offsetTop:this.__autoOffsetTop;return Math.max(0,t)}__cancelAutoOffsetMeasure(){this.__autoOffsetRafId!==null&&(window.cancelAnimationFrame(this.__autoOffsetRafId),this.__autoOffsetRafId=null)}__disconnectAutoOffsetObserver(){this.__navResizeObserver&&(this.__navResizeObserver.disconnect(),this.__navResizeObserver=null)}__requestAutoOffsetMeasure(){if(!(typeof window>"u")){if(this.__isOffsetTopExplicit()){this.__setAutoOffsetTop(0),this.__disconnectAutoOffsetObserver();return}this.__autoOffsetRafId===null&&(this.__autoOffsetRafId=window.requestAnimationFrame(()=>{this.__autoOffsetRafId=null,this.__measureAutoOffset()}))}}__measureAutoOffset(){const t=this.__navEl;if(this.__isOffsetTopExplicit()){this.__setAutoOffsetTop(0),this.__disconnectAutoOffsetObserver();return}if(!(t?.tagName==="SCB-NAV"&&(t.hasAttribute("sticky")||t.sticky===!0))){this.__setAutoOffsetTop(0),this.__disconnectAutoOffsetObserver();return}const e=Math.max(0,Math.round(t.getBoundingClientRect().height));this.__setAutoOffsetTop(e),!this.__navResizeObserver&&"ResizeObserver"in window&&(this.__navResizeObserver=new ResizeObserver(()=>{this.__requestAutoOffsetMeasure()}),this.__navResizeObserver.observe(t))}__setAutoOffsetTop(t){const e=Math.max(0,t);Math.abs(e-this.__autoOffsetTop)<1||(this.__autoOffsetTop=e,this.__rebuildObserver(),this.__requestActiveRecalc())}__rebuildObserver(){this.__disconnectObserver(),this.__entries.clear();const t=this.__getObserverRoot(),e=`-${Math.max(0,this.__getEffectiveOffsetTop())}px 0px -${Math.max(0,this.offsetBottom)}px 0px`;if(!(typeof window>"u")){if("IntersectionObserver"in window){this.__observer=new IntersectionObserver(s=>this.__onIntersect(s),{root:t,rootMargin:e,threshold:[0,.1,.25,.5,.75,1]});for(const s of this.__links)this.__observer.observe(s.targetEl);this.__requestActiveRecalc();return}this.__enableFallbackScrollSpy()}}__enableFallbackScrollSpy(){const t=this.__getObserverRoot()??window;this.__fallbackScrollRoot=t,t.addEventListener?.("scroll",this.__onScrollFallbackBound,{passive:!0}),this.__requestActiveRecalc()}__getObserverRoot(){const t=this.__getScrollContainerEl();return t instanceof HTMLElement&&(t.scrollHeight>t.clientHeight+1||t.scrollWidth>t.clientWidth+1)?t:null}__collectLinks(){const t=this.__navEl,e=this.__contentEl;if(!t||!e){this.__links=[];return}const s=Array.from(t.querySelectorAll('scb-menu-item[item-href^="#"], scb-nav-item[href^="#"], scb-nav-item[data-href^="#"], a[href^="#"], button[data-href^="#"]')),i=[];for(const n of s){const o=this.__getHref(n);if(!o||!o.startsWith("#"))continue;const r=o.slice(1);if(!r)continue;const a=e.querySelector(`#${CSS.escape(r)}`);a&&i.push({id:r,navEl:n,targetEl:a})}this.__links=i}__getHref(t){return t.tagName==="A"?t.getAttribute("href")??"":t.tagName==="SCB-MENU-ITEM"?t.itemHref??t.getAttribute("item-href")??"":t.tagName==="BUTTON"?t.getAttribute("data-href")??"":t.tagName==="SCB-NAV-ITEM"?t.href||t.dataHref||t.getAttribute("href")||t.getAttribute("data-href")||"":t.getAttribute("href")??""}__onIntersect(t){for(const e of t){const s=e.target.id;s&&this.__entries.set(s,{id:s,isIntersecting:e.isIntersecting,top:e.boundingClientRect.top,ratio:e.intersectionRatio})}this.__requestActiveRecalc()}__requestActiveRecalc(){this.__rafId===null&&(this.__rafId=window.requestAnimationFrame(()=>{this.__rafId=null,this.__updateActiveFromEntries()}))}__updateActiveFromEntries(){if(this.__entries.size===0){this.__updateActiveFromRects();return}const t=Array.from(this.__entries.values()).filter(n=>n.isIntersecting);if(t.length===0)return;const e=this.__getObserverRoot(),s=((e?e.getBoundingClientRect():null)?.top??0)+Math.max(0,this.__getEffectiveOffsetTop()),i=t.filter(n=>n.top>=s).sort((n,o)=>n.top-o.top)[0]??t.sort((n,o)=>o.top-n.top)[0];i?.id&&this.__setActiveId(i.id,{updateHash:this.updateHash})}__updateActiveFromRects(){if(!this.__contentEl)return;const t=this.__getObserverRoot(),e=((t?t.getBoundingClientRect():null)?.top??0)+Math.max(0,this.__getEffectiveOffsetTop()),s=this.__links.map(n=>{const o=n.targetEl.getBoundingClientRect();return{id:n.id,top:o.top-e}}).filter(n=>Number.isFinite(n.top));if(s.length===0)return;const i=s.filter(n=>n.top>=0).sort((n,o)=>n.top-o.top)[0]??s.sort((n,o)=>o.top-n.top)[0];i?.id&&this.__setActiveId(i.id,{updateHash:this.updateHash})}__applyActiveId(t,e){const s=this.__links.find(i=>i.id===t);if(this.__navEl?.tagName==="SCB-NAV"?this.__navEl.activeHref=`#${t}`:s&&(this.__applyActiveToNav(s.navEl),this.__expandAncestors(s.navEl)),e.scrollToTarget){let i=s?.targetEl??null;if(!i){const n=this.__contentEl??this;try{i=n.querySelector(`#${CSS.escape(t)}`)}catch{i=n.querySelector(`[id="${t}"]`)}!i&&typeof document<"u"&&(i=document.getElementById(t))}i&&this.__scrollToTarget(i)}if(e.updateHash&&this.__hashAllowUpdates&&typeof history<"u")try{history.replaceState(null,"",`#${encodeURIComponent(t)}`)}catch{}this.dispatchEvent(new CustomEvent("scb-scrollspy-active-changed",{bubbles:!0,composed:!0,detail:{id:t}})),this.dispatchEvent(new CustomEvent("scbscrollspyactivechanged",{bubbles:!0,composed:!0,detail:{id:t}}))}__applyExternalActiveId(){const t=(this.activeId||"").trim();t&&(this.__links.length||this.__collectLinks(),this.__applyActiveId(t,{updateHash:this.updateHash,scrollToTarget:this.__slotsResolvedOnce}))}__setActiveId(t,e){!t||t===this.activeId||(this.__syncingActiveId=!0,this.activeId=t,this.__applyActiveId(t,{updateHash:e.updateHash,scrollToTarget:!1}))}__applyActiveToNav(t){const e=this.__navEl;if(!e)return;const s=Array.from(e.querySelectorAll('scb-menu-item[item-href^="#"], scb-nav-item[href^="#"], scb-nav-item[data-href^="#"], a[href^="#"], button[data-href^="#"]'));for(const i of s){const n=i===t;if(i.tagName==="SCB-MENU-ITEM"){const o=i;typeof o.selected=="boolean"&&(o.selected=n),n&&i.dispatchEvent(new CustomEvent("scb-menu-select",{bubbles:!0,composed:!0,detail:{item:i}}))}else i.tagName==="A"||i.tagName==="BUTTON"?n?i.setAttribute("aria-current","location"):i.removeAttribute("aria-current"):i.tagName==="SCB-NAV-ITEM"&&(n?(i.setAttribute("aria-current","location"),i.setAttribute("data-active","true")):(i.removeAttribute("aria-current"),i.removeAttribute("data-active")))}}__expandAncestors(t){let e=t;for(;e;){if(e.tagName==="SCB-MENU-ITEM"){const s=e;typeof s.expanded=="boolean"&&(s.expanded=!0)}e=e.parentElement}}__scrollToTarget(t){const e=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches,s=this.__getScrollContainerEl();if(s instanceof HTMLElement&&s.scrollHeight>s.clientHeight+1){const l=this.__getScrollTopInContainer(t,s)-this.__getEffectiveOffsetTop(),d=Math.max(0,s.scrollHeight-s.clientHeight),u=Math.min(d,Math.max(0,l));if(e){s.scrollTop=u;return}this.__animateScroll({get:()=>s.scrollTop,set:f=>{s.scrollTop=f},max:d,to:u});return}if(!(t instanceof HTMLElement))return;const i=t.getBoundingClientRect(),n=(window.scrollY||window.pageYOffset||0)+i.top-this.__getEffectiveOffsetTop(),o=document.documentElement,r=Math.max(0,o.scrollHeight-window.innerHeight),a=Math.min(r,Math.max(0,n));if(e){window.scrollTo(0,a);return}this.__animateScroll({get:()=>window.scrollY||window.pageYOffset||0,set:l=>window.scrollTo(0,l),max:r,to:a})}__getScrollTopInContainer(t,e){const s=e.getBoundingClientRect(),i=t.getBoundingClientRect();return e.scrollTop+(i.top-s.top)}__animateScroll(t){const e=t.get(),s=Math.min(t.max,Math.max(0,t.to));if(!Number.isFinite(e)||!Number.isFinite(s))return;if(Math.abs(s-e)<1){t.set(s);return}this.__cancelScrollAnimation(),this.__ensureMotionMeasureEl();const i=++this.__scrollAnimSeq,n=Math.abs(s-e),o=this.__getScrollDurationMs(n),r=this.__getScrollEasingFn(),a=performance.now(),l=d=>{if(i!==this.__scrollAnimSeq)return;const u=o<=0?1:Math.min(1,(d-a)/o),f=r(u);t.set(e+(s-e)*f),u<1?this.__scrollRafId=window.requestAnimationFrame(l):this.__scrollRafId=null};this.__scrollRafId=window.requestAnimationFrame(l)}__getScrollDurationMs(t){const e=this.__resolveTimeMs("var(--motion-duration-medium, 300ms)")??300,s=this.__resolveTimeMs("var(--motion-duration-long, 500ms)")??500,i=this.__resolveTimeMs("var(--motion-duration-extra-long, 700ms)")??700,n=Math.min(1,Math.max(0,t/1800)),o=e+(s-e)*n;return Math.min(i,Math.max(e,o))}__getScrollEasingFn(){const t=this.__resolveTimingFunction("var(--motion-easing-emphasized-decelerate, var(--motion-easing-emphasized, cubic-bezier(.69,.16,.2,.98)))")??"cubic-bezier(0.05, 0.7, 0.1, 1)";return this.__parseEasingFunction(t)??(e=>e)}__resolveTimeMs(t){const e=this.__motionMeasureEl;if(!e)return null;e.style.transitionDuration=t;const s=getComputedStyle(e).transitionDuration.split(",")[0]?.trim()??"";return this.__parseTimeToMs(s)}__resolveTimingFunction(t){const e=this.__motionMeasureEl;return e?(e.style.transitionTimingFunction=t,getComputedStyle(e).transitionTimingFunction.split(",")[0]?.trim()??null):null}__parseTimeToMs(t){const e=t.trim();if(!e)return null;const s=parseFloat(e);return Number.isFinite(s)?e.endsWith("ms")?s:e.endsWith("s")?s*1e3:null:null}__parseEasingFunction(t){const e=t.trim();if(!e)return null;if(e==="linear")return l=>l;const s=e.match(/cubic-bezier\(([^)]+)\)/i);if(!s)return null;const i=s[1].split(",").map(l=>parseFloat(l.trim())).filter(l=>Number.isFinite(l));if(i.length!==4)return null;const[n,o,r,a]=i;return this.__cubicBezier(n,o,r,a)}__cubicBezier(t,e,s,i){const n=3*t,o=3*(s-t)-n,r=1-n-o,a=3*e,l=3*(i-e)-a,d=1-a-l,u=c=>((r*c+o)*c+n)*c,f=c=>((d*c+l)*c+a)*c,A=c=>(3*r*c+2*o)*c+n,T=c=>{let _=c;for(let p=0;p<8;p++){const y=u(_)-c;if(Math.abs(y)<1e-6)return _;const S=A(_);if(Math.abs(S)<1e-6)break;_=_-y/S}let b=0,v=1;for(_=c;b<v;){const p=u(_)-c;if(Math.abs(p)<1e-6)return _;p>0?v=_:b=_,_=(v+b)/2}return _};return c=>f(T(Math.min(1,Math.max(0,c))))}__detachHashScrollRoot(){if(!this.__hashScrollRoot)return;const t=this.__hashScrollRoot;try{t instanceof Window?t.removeEventListener("scroll",this.__onHashScrollBound):t.removeEventListener("scroll",this.__onHashScrollBound)}catch{}this.__hashScrollRoot=null}__cancelHashBaseline(){this.__hashBaselineRafId!==null&&(window.cancelAnimationFrame(this.__hashBaselineRafId),this.__hashBaselineRafId=null),this.__hashBaselineReady=!1}__attachHashScrollRoot(){this.__detachHashScrollRoot();const t=this.__getObserverRoot()??window;this.__hashScrollRoot=t;try{t.addEventListener("scroll",this.__onHashScrollBound,{passive:!0})}catch{}this.__hashAllowUpdates=!1,this.__scheduleHashBaseline()}__scheduleHashBaseline(){this.__cancelHashBaseline();const t=()=>{this.__hashBaselinePos=this.__getHashScrollPos(),this.__hashBaselineReady=!0,this.__hashBaselineRafId=null};this.__hashBaselineRafId=window.requestAnimationFrame(()=>{this.__hashBaselineRafId=window.requestAnimationFrame(t)})}__getHashScrollPos(){const t=this.__hashScrollRoot;if(t instanceof Window)return t.scrollY||t.pageYOffset||0;if(t&&"scrollTop"in t){const e=t;return typeof e.scrollTop=="number"?e.scrollTop:0}return 0}__onHashScroll(){if(!this.updateHash||this.__hashSuspend||this.__hashAllowUpdates||!this.__hashBaselineReady)return;const t=this.__getHashScrollPos();Math.abs(t-this.__hashBaselinePos)>2&&(this.__hashAllowUpdates=!0)}__jumpToTarget(t){const e=this.__getScrollContainerEl();if(e instanceof HTMLElement&&e.scrollHeight>e.clientHeight+1){const a=this.__getScrollTopInContainer(t,e)-this.__getEffectiveOffsetTop(),l=Math.max(0,e.scrollHeight-e.clientHeight);e.scrollTop=Math.min(l,Math.max(0,a));return}if(!(t instanceof HTMLElement))return;const s=t.getBoundingClientRect(),i=(window.scrollY||window.pageYOffset||0)+s.top-this.__getEffectiveOffsetTop(),n=document.documentElement,o=Math.max(0,n.scrollHeight-window.innerHeight),r=Math.min(o,Math.max(0,i));window.scrollTo(0,r)}__applyInitialHashIfAny(){if(this.__hashInitialApplied)return;const t=typeof window<"u"?window.location.hash:"";if(!t||t.length<2)return;let e="";try{e=decodeURIComponent(t.slice(1))}catch{e=t.slice(1)}if(!e)return;const s=this.__links.find(i=>i.id===e);if(s?.targetEl){this.__hashInitialApplied=!0,this.__hashSuspend=!0;try{this.__jumpToTarget(s.targetEl),this.__setActiveId(e,{updateHash:!1})}finally{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this.__hashSuspend=!1})})}}}__onNavClick(t){const e=this.__navEl,s=this.__contentEl;if(!e||!s)return;const i=t.composedPath().find(a=>a instanceof Element&&(a.tagName==="SCB-MENU-ITEM"||a.tagName==="SCB-NAV-ITEM"||a.tagName==="A"||a.tagName==="BUTTON"));if(!i)return;const n=this.__getHref(i);if(!n||!n.startsWith("#"))return;const o=n.slice(1);if(!o)return;const r=s.querySelector(`#${CSS.escape(o)}`);r&&(t.preventDefault(),this.__hashAllowUpdates=!0,this.__scrollToTarget(r),this.__setActiveId(o,{updateHash:this.updateHash}))}render(){if(this.layout==="sidebar")return g`
|
|
1
|
+
import{_ as w,b as R,g as M,y as g}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as O}from"../../vendor/decorate.js";(function(){try{var h=typeof globalThis<"u"?globalThis:window;if(!h.__scb_ce_guard_installed__){h.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(e,s,i){try{customElements.get(e)||t(e,s,i)}catch(o){var n=String(o||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw o}}}}catch{}})();var b,E=(b=class extends w{constructor(...t){super(...t),this.navSelector="",this.offsetTop=0,this.offsetBottom=0,this.updateHash=!0,this.activeId="",this.layout="",this.sidebarNavWidth="320px",this.sidebarHeight="560px",this.stackHeight="",this.sidebarNavTop="0px",this.contentPadding="0px",this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this.__navEl=null,this.__contentEl=null,this.__contentShellEl=null,this.__links=[],this.__observer=null,this.__fallbackScrollRoot=null,this.__entries=new Map,this.__rafId=null,this.__scrollRafId=null,this.__hashAllowUpdates=!1,this.__hashBaselineReady=!1,this.__hashBaselinePos=0,this.__hashBaselineRafId=null,this.__hashScrollRoot=null,this.__hashSuspend=!1,this.__hashInitialApplied=!1,this.__onHashScrollBound=()=>this.__onHashScroll(),this.__scrollAnimSeq=0,this.__syncingActiveId=!1,this.__slotsResolvedOnce=!1,this.__motionMeasureEl=null,this.__focusableRafId=null,this.__autoOffsetTop=0,this.__autoOffsetRafId=null,this.__navResizeObserver=null,this.__onNavClickBound=e=>this.__onNavClick(e),this.__onScrollFallbackBound=()=>this.__updateActiveFromRects(),this.__onResizeBound=()=>{this.__requestActiveRecalc(),this.__requestAutoOffsetMeasure()},this.__onSlotChange=()=>{const e=this.__navEl;this.__teardown(),this.__resolveSlots(),this.__requestEnsureContentFocusable(),this.__navEl&&this.__navEl.addEventListener("click",this.__onNavClickBound,!0),(e!==this.__navEl||!this.__links.length)&&this.__collectLinks(),this.__requestAutoOffsetMeasure(),this.__rebuildObserver(),this.__attachHashScrollRoot(),this.__applyInitialHashIfAny(),!this.__hashInitialApplied&&this.activeId&&this.__applyActiveId(this.activeId,{updateHash:!1,scrollToTarget:!1}),this.__slotsResolvedOnce=!0}}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.__onResizeBound,{passive:!0})}firstUpdated(){this.__ensureMotionMeasureEl(),this.__resolveInternals(),this.__requestEnsureContentFocusable(),this.__requestAutoOffsetMeasure(),this.__applySpacing()}disconnectedCallback(){window.removeEventListener("resize",this.__onResizeBound),this.__teardown(),super.disconnectedCallback()}updated(t){if((t.has("spacing")||t.has("spacingTop")||t.has("spacingBottom")||t.has("spacingLeft")||t.has("spacingRight"))&&this.__applySpacing(),t.has("navSelector")){this.__onSlotChange();return}if(t.has("layout")){this.__onSlotChange();return}(t.has("offsetTop")||t.has("offsetBottom"))&&(this.__rebuildObserver(),this.__attachHashScrollRoot()),(t.has("sidebarNavWidth")||t.has("sidebarHeight")||t.has("stackHeight")||t.has("sidebarNavTop")||t.has("contentPadding"))&&(this.__resolveInternals(),this.__requestEnsureContentFocusable(),this.__rebuildObserver()),t.has("activeId")&&(this.__syncingActiveId?this.__syncingActiveId=!1:this.__applyExternalActiveId())}__mapSpacingToken(t){if(!t)return;const e=String(t).trim();if(e)return/^\d+$/.test(e)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(e,10)))})`:e}__applySpacing(){const t=this.__mapSpacingToken(this.spacing),e=this.__mapSpacingToken(this.spacingTop)??t,s=this.__mapSpacingToken(this.spacingBottom)??t,i=this.__mapSpacingToken(this.spacingLeft),n=this.__mapSpacingToken(this.spacingRight);e?this.style.setProperty("--scb-scrollspy-spacing-block-start",e):this.style.removeProperty("--scb-scrollspy-spacing-block-start"),s?this.style.setProperty("--scb-scrollspy-spacing-block-end",s):this.style.removeProperty("--scb-scrollspy-spacing-block-end"),i?this.style.setProperty("--scb-scrollspy-spacing-inline-start",i):this.style.removeProperty("--scb-scrollspy-spacing-inline-start"),n?this.style.setProperty("--scb-scrollspy-spacing-inline-end",n):this.style.removeProperty("--scb-scrollspy-spacing-inline-end")}__teardown(){this.__cancelScrollAnimation(),this.__cancelEnsureContentFocusable(),this.__cancelAutoOffsetMeasure(),this.__disconnectAutoOffsetObserver(),this.__disconnectObserver(),this.__navEl&&this.__navEl.removeEventListener("click",this.__onNavClickBound,!0),this.__fallbackScrollRoot&&this.__fallbackScrollRoot.removeEventListener?.("scroll",this.__onScrollFallbackBound),this.__fallbackScrollRoot=null,this.__entries.clear(),this.__links=[],this.__detachHashScrollRoot(),this.__cancelHashBaseline()}__cancelScrollAnimation(){this.__scrollAnimSeq++,this.__scrollRafId!==null&&(window.cancelAnimationFrame(this.__scrollRafId),this.__scrollRafId=null)}__cancelEnsureContentFocusable(){this.__focusableRafId!==null&&(window.cancelAnimationFrame(this.__focusableRafId),this.__focusableRafId=null)}__requestEnsureContentFocusable(){typeof window>"u"||(this.__cancelEnsureContentFocusable(),this.__focusableRafId=window.requestAnimationFrame(()=>{this.__focusableRafId=null,this.__ensureScrollableContentFocusable()}))}__ensureScrollableContentFocusable(){const t=this.__getScrollContainerEl();t instanceof HTMLElement&&(t.hasAttribute("tabindex")||(t.scrollHeight>t.clientHeight+1||t.scrollWidth>t.clientWidth+1)&&(t.querySelector('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), summary, [tabindex]:not([tabindex="-1"]), [contenteditable=""], [contenteditable="true"]')||t.setAttribute("tabindex","0")))}__ensureMotionMeasureEl(){if(this.__motionMeasureEl)return;const t=document.createElement("span");t.setAttribute("aria-hidden","true"),t.style.position="fixed",t.style.width="0",t.style.height="0",t.style.overflow="hidden",t.style.pointerEvents="none",t.style.visibility="hidden",this.__motionMeasureEl=t,this.renderRoot.appendChild(t)}__disconnectObserver(){this.__observer&&(this.__observer.disconnect(),this.__observer=null)}__resolveInternals(){this.__contentShellEl=this.layout==="sidebar"?this.renderRoot.querySelector(".sidebar-content"):this.layout==="stack"?this.renderRoot.querySelector(".stack-shell"):null}__resolveSlots(){const t=this.renderRoot.querySelector('slot[name="nav"]'),e=this.renderRoot.querySelector('slot[name="content"]'),s=t?.assignedElements({flatten:!0})??[],i=e?.assignedElements({flatten:!0})??[],n=(this.navSelector||"").trim(),o=n?this.__queryExternalNav(n):s[0],r=i[0];this.__navEl=o instanceof HTMLElement?o:null,this.__contentEl=r instanceof HTMLElement?r:null,this.__resolveInternals()}__queryExternalNav(t){try{return this.getRootNode?.()?.querySelector?.(t)??document.querySelector(t)}catch{return null}}__getScrollContainerEl(){return this.layout==="sidebar"||this.layout==="stack"?this.__contentShellEl:this.__contentEl}__isOffsetTopExplicit(){return this.hasAttribute("offset-top")}__getEffectiveOffsetTop(){const t=this.__isOffsetTopExplicit()?this.offsetTop:this.__autoOffsetTop;return Math.max(0,t)}__cancelAutoOffsetMeasure(){this.__autoOffsetRafId!==null&&(window.cancelAnimationFrame(this.__autoOffsetRafId),this.__autoOffsetRafId=null)}__disconnectAutoOffsetObserver(){this.__navResizeObserver&&(this.__navResizeObserver.disconnect(),this.__navResizeObserver=null)}__requestAutoOffsetMeasure(){if(!(typeof window>"u")){if(this.__isOffsetTopExplicit()){this.__setAutoOffsetTop(0),this.__disconnectAutoOffsetObserver();return}this.__autoOffsetRafId===null&&(this.__autoOffsetRafId=window.requestAnimationFrame(()=>{this.__autoOffsetRafId=null,this.__measureAutoOffset()}))}}__measureAutoOffset(){const t=this.__navEl;if(this.__isOffsetTopExplicit()){this.__setAutoOffsetTop(0),this.__disconnectAutoOffsetObserver();return}if(!(t?.tagName==="SCB-NAV"&&(t.hasAttribute("sticky")||t.sticky===!0))){this.__setAutoOffsetTop(0),this.__disconnectAutoOffsetObserver();return}const e=Math.max(0,Math.round(t.getBoundingClientRect().height));this.__setAutoOffsetTop(e),!this.__navResizeObserver&&"ResizeObserver"in window&&(this.__navResizeObserver=new ResizeObserver(()=>{this.__requestAutoOffsetMeasure()}),this.__navResizeObserver.observe(t))}__setAutoOffsetTop(t){const e=Math.max(0,t);Math.abs(e-this.__autoOffsetTop)<1||(this.__autoOffsetTop=e,this.__rebuildObserver(),this.__requestActiveRecalc())}__rebuildObserver(){this.__disconnectObserver(),this.__entries.clear();const t=this.__getObserverRoot(),e=`-${Math.max(0,this.__getEffectiveOffsetTop())}px 0px -${Math.max(0,this.offsetBottom)}px 0px`;if(!(typeof window>"u")){if("IntersectionObserver"in window){this.__observer=new IntersectionObserver(s=>this.__onIntersect(s),{root:t,rootMargin:e,threshold:[0,.1,.25,.5,.75,1]});for(const s of this.__links)this.__observer.observe(s.targetEl);this.__requestActiveRecalc();return}this.__enableFallbackScrollSpy()}}__enableFallbackScrollSpy(){const t=this.__getObserverRoot()??window;this.__fallbackScrollRoot=t,t.addEventListener?.("scroll",this.__onScrollFallbackBound,{passive:!0}),this.__requestActiveRecalc()}__getObserverRoot(){const t=this.__getScrollContainerEl();return t instanceof HTMLElement&&(t.scrollHeight>t.clientHeight+1||t.scrollWidth>t.clientWidth+1)?t:null}__collectLinks(){const t=this.__navEl,e=this.__contentEl;if(!t||!e){this.__links=[];return}const s=Array.from(t.querySelectorAll('scb-menu-item[item-href^="#"], scb-nav-item[href^="#"], scb-nav-item[data-href^="#"], a[href^="#"], button[data-href^="#"]')),i=[];for(const n of s){const o=this.__getHref(n);if(!o||!o.startsWith("#"))continue;const r=o.slice(1);if(!r)continue;const a=e.querySelector(`#${CSS.escape(r)}`);a&&i.push({id:r,navEl:n,targetEl:a})}this.__links=i}__getHref(t){return t.tagName==="A"?t.getAttribute("href")??"":t.tagName==="SCB-MENU-ITEM"?t.itemHref??t.getAttribute("item-href")??"":t.tagName==="BUTTON"?t.getAttribute("data-href")??"":t.tagName==="SCB-NAV-ITEM"?t.href||t.dataHref||t.getAttribute("href")||t.getAttribute("data-href")||"":t.getAttribute("href")??""}__onIntersect(t){for(const e of t){const s=e.target.id;s&&this.__entries.set(s,{id:s,isIntersecting:e.isIntersecting,top:e.boundingClientRect.top,ratio:e.intersectionRatio})}this.__requestActiveRecalc()}__requestActiveRecalc(){this.__rafId===null&&(this.__rafId=window.requestAnimationFrame(()=>{this.__rafId=null,this.__updateActiveFromEntries()}))}__updateActiveFromEntries(){if(this.__entries.size===0){this.__updateActiveFromRects();return}const t=Array.from(this.__entries.values()).filter(n=>n.isIntersecting);if(t.length===0)return;const e=this.__getObserverRoot(),s=((e?e.getBoundingClientRect():null)?.top??0)+Math.max(0,this.__getEffectiveOffsetTop()),i=t.filter(n=>n.top>=s).sort((n,o)=>n.top-o.top)[0]??t.sort((n,o)=>o.top-n.top)[0];i?.id&&this.__setActiveId(i.id,{updateHash:this.updateHash})}__updateActiveFromRects(){if(!this.__contentEl)return;const t=this.__getObserverRoot(),e=((t?t.getBoundingClientRect():null)?.top??0)+Math.max(0,this.__getEffectiveOffsetTop()),s=this.__links.map(n=>{const o=n.targetEl.getBoundingClientRect();return{id:n.id,top:o.top-e}}).filter(n=>Number.isFinite(n.top));if(s.length===0)return;const i=s.filter(n=>n.top>=0).sort((n,o)=>n.top-o.top)[0]??s.sort((n,o)=>o.top-n.top)[0];i?.id&&this.__setActiveId(i.id,{updateHash:this.updateHash})}__applyActiveId(t,e){const s=this.__links.find(i=>i.id===t);if(this.__navEl?.tagName==="SCB-NAV"?this.__navEl.activeHref=`#${t}`:s&&(this.__applyActiveToNav(s.navEl),this.__expandAncestors(s.navEl)),e.scrollToTarget){let i=s?.targetEl??null;if(!i){const n=this.__contentEl??this;try{i=n.querySelector(`#${CSS.escape(t)}`)}catch{i=n.querySelector(`[id="${t}"]`)}!i&&typeof document<"u"&&(i=document.getElementById(t))}i&&this.__scrollToTarget(i)}if(e.updateHash&&this.__hashAllowUpdates&&typeof history<"u")try{history.replaceState(null,"",`#${encodeURIComponent(t)}`)}catch{}this.dispatchEvent(new CustomEvent("scb-scrollspy-active-changed",{bubbles:!0,composed:!0,detail:{id:t}})),this.dispatchEvent(new CustomEvent("scbscrollspyactivechanged",{bubbles:!0,composed:!0,detail:{id:t}}))}__applyExternalActiveId(){const t=(this.activeId||"").trim();t&&(this.__links.length||this.__collectLinks(),this.__applyActiveId(t,{updateHash:this.updateHash,scrollToTarget:this.__slotsResolvedOnce}))}__setActiveId(t,e){!t||t===this.activeId||(this.__syncingActiveId=!0,this.activeId=t,this.__applyActiveId(t,{updateHash:e.updateHash,scrollToTarget:!1}))}__applyActiveToNav(t){const e=this.__navEl;if(!e)return;const s=Array.from(e.querySelectorAll('scb-menu-item[item-href^="#"], scb-nav-item[href^="#"], scb-nav-item[data-href^="#"], a[href^="#"], button[data-href^="#"]'));for(const i of s){const n=i===t;if(i.tagName==="SCB-MENU-ITEM"){const o=i;typeof o.selected=="boolean"&&(o.selected=n),n&&i.dispatchEvent(new CustomEvent("scb-menu-select",{bubbles:!0,composed:!0,detail:{item:i}}))}else i.tagName==="A"||i.tagName==="BUTTON"?n?i.setAttribute("aria-current","location"):i.removeAttribute("aria-current"):i.tagName==="SCB-NAV-ITEM"&&(n?(i.setAttribute("aria-current","location"),i.setAttribute("data-active","true")):(i.removeAttribute("aria-current"),i.removeAttribute("data-active")))}}__expandAncestors(t){let e=t;for(;e;){if(e.tagName==="SCB-MENU-ITEM"){const s=e;typeof s.expanded=="boolean"&&(s.expanded=!0)}e=e.parentElement}}__scrollToTarget(t){const e=typeof window<"u"&&window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches,s=this.__getScrollContainerEl();if(s instanceof HTMLElement&&s.scrollHeight>s.clientHeight+1){const l=this.__getScrollTopInContainer(t,s)-this.__getEffectiveOffsetTop(),d=Math.max(0,s.scrollHeight-s.clientHeight),u=Math.min(d,Math.max(0,l));if(e){s.scrollTop=u;return}this.__animateScroll({get:()=>s.scrollTop,set:f=>{s.scrollTop=f},max:d,to:u});return}if(!(t instanceof HTMLElement))return;const i=t.getBoundingClientRect(),n=(window.scrollY||window.pageYOffset||0)+i.top-this.__getEffectiveOffsetTop(),o=document.documentElement,r=Math.max(0,o.scrollHeight-window.innerHeight),a=Math.min(r,Math.max(0,n));if(e){window.scrollTo(0,a);return}this.__animateScroll({get:()=>window.scrollY||window.pageYOffset||0,set:l=>window.scrollTo(0,l),max:r,to:a})}__getScrollTopInContainer(t,e){const s=e.getBoundingClientRect(),i=t.getBoundingClientRect();return e.scrollTop+(i.top-s.top)}__animateScroll(t){const e=t.get(),s=Math.min(t.max,Math.max(0,t.to));if(!Number.isFinite(e)||!Number.isFinite(s))return;if(Math.abs(s-e)<1){t.set(s);return}this.__cancelScrollAnimation(),this.__ensureMotionMeasureEl();const i=++this.__scrollAnimSeq,n=Math.abs(s-e),o=this.__getScrollDurationMs(n),r=this.__getScrollEasingFn(),a=performance.now(),l=d=>{if(i!==this.__scrollAnimSeq)return;const u=o<=0?1:Math.min(1,(d-a)/o),f=r(u);t.set(e+(s-e)*f),u<1?this.__scrollRafId=window.requestAnimationFrame(l):this.__scrollRafId=null};this.__scrollRafId=window.requestAnimationFrame(l)}__getScrollDurationMs(t){const e=this.__resolveTimeMs("var(--motion-duration-medium, 300ms)")??300,s=this.__resolveTimeMs("var(--motion-duration-long, 500ms)")??500,i=this.__resolveTimeMs("var(--motion-duration-extra-long, 700ms)")??700,n=Math.min(1,Math.max(0,t/1800)),o=e+(s-e)*n;return Math.min(i,Math.max(e,o))}__getScrollEasingFn(){const t=this.__resolveTimingFunction("var(--motion-easing-emphasized-decelerate, var(--motion-easing-emphasized, cubic-bezier(.69,.16,.2,.98)))")??"cubic-bezier(0.05, 0.7, 0.1, 1)";return this.__parseEasingFunction(t)??(e=>e)}__resolveTimeMs(t){const e=this.__motionMeasureEl;if(!e)return null;e.style.transitionDuration=t;const s=getComputedStyle(e).transitionDuration.split(",")[0]?.trim()??"";return this.__parseTimeToMs(s)}__resolveTimingFunction(t){const e=this.__motionMeasureEl;return e?(e.style.transitionTimingFunction=t,getComputedStyle(e).transitionTimingFunction.split(",")[0]?.trim()??null):null}__parseTimeToMs(t){const e=t.trim();if(!e)return null;const s=parseFloat(e);return Number.isFinite(s)?e.endsWith("ms")?s:e.endsWith("s")?s*1e3:null:null}__parseEasingFunction(t){const e=t.trim();if(!e)return null;if(e==="linear")return l=>l;const s=e.match(/cubic-bezier\(([^)]+)\)/i);if(!s)return null;const i=s[1].split(",").map(l=>parseFloat(l.trim())).filter(l=>Number.isFinite(l));if(i.length!==4)return null;const[n,o,r,a]=i;return this.__cubicBezier(n,o,r,a)}__cubicBezier(t,e,s,i){const n=3*t,o=3*(s-t)-n,r=1-n-o,a=3*e,l=3*(i-e)-a,d=1-a-l,u=c=>((r*c+o)*c+n)*c,f=c=>((d*c+l)*c+a)*c,A=c=>(3*r*c+2*o)*c+n,T=c=>{let _=c;for(let p=0;p<8;p++){const y=u(_)-c;if(Math.abs(y)<1e-6)return _;const S=A(_);if(Math.abs(S)<1e-6)break;_=_-y/S}let m=0,v=1;for(_=c;m<v;){const p=u(_)-c;if(Math.abs(p)<1e-6)return _;p>0?v=_:m=_,_=(v+m)/2}return _};return c=>f(T(Math.min(1,Math.max(0,c))))}__detachHashScrollRoot(){if(!this.__hashScrollRoot)return;const t=this.__hashScrollRoot;try{t instanceof Window?t.removeEventListener("scroll",this.__onHashScrollBound):t.removeEventListener("scroll",this.__onHashScrollBound)}catch{}this.__hashScrollRoot=null}__cancelHashBaseline(){this.__hashBaselineRafId!==null&&(window.cancelAnimationFrame(this.__hashBaselineRafId),this.__hashBaselineRafId=null),this.__hashBaselineReady=!1}__attachHashScrollRoot(){this.__detachHashScrollRoot();const t=this.__getObserverRoot()??window;this.__hashScrollRoot=t;try{t.addEventListener("scroll",this.__onHashScrollBound,{passive:!0})}catch{}this.__hashAllowUpdates=!1,this.__scheduleHashBaseline()}__scheduleHashBaseline(){this.__cancelHashBaseline();const t=()=>{this.__hashBaselinePos=this.__getHashScrollPos(),this.__hashBaselineReady=!0,this.__hashBaselineRafId=null};this.__hashBaselineRafId=window.requestAnimationFrame(()=>{this.__hashBaselineRafId=window.requestAnimationFrame(t)})}__getHashScrollPos(){const t=this.__hashScrollRoot;if(t instanceof Window)return t.scrollY||t.pageYOffset||0;if(t&&"scrollTop"in t){const e=t;return typeof e.scrollTop=="number"?e.scrollTop:0}return 0}__onHashScroll(){if(!this.updateHash||this.__hashSuspend||this.__hashAllowUpdates||!this.__hashBaselineReady)return;const t=this.__getHashScrollPos();Math.abs(t-this.__hashBaselinePos)>2&&(this.__hashAllowUpdates=!0)}__jumpToTarget(t){const e=this.__getScrollContainerEl();if(e instanceof HTMLElement&&e.scrollHeight>e.clientHeight+1){const a=this.__getScrollTopInContainer(t,e)-this.__getEffectiveOffsetTop(),l=Math.max(0,e.scrollHeight-e.clientHeight);e.scrollTop=Math.min(l,Math.max(0,a));return}if(!(t instanceof HTMLElement))return;const s=t.getBoundingClientRect(),i=(window.scrollY||window.pageYOffset||0)+s.top-this.__getEffectiveOffsetTop(),n=document.documentElement,o=Math.max(0,n.scrollHeight-window.innerHeight),r=Math.min(o,Math.max(0,i));window.scrollTo(0,r)}__applyInitialHashIfAny(){if(this.__hashInitialApplied)return;const t=typeof window<"u"?window.location.hash:"";if(!t||t.length<2)return;let e="";try{e=decodeURIComponent(t.slice(1))}catch{e=t.slice(1)}if(!e)return;const s=this.__links.find(i=>i.id===e);if(s?.targetEl){this.__hashInitialApplied=!0,this.__hashSuspend=!0;try{this.__jumpToTarget(s.targetEl),this.__setActiveId(e,{updateHash:!1})}finally{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{this.__hashSuspend=!1})})}}}__onNavClick(t){const e=this.__navEl,s=this.__contentEl;if(!e||!s)return;const i=t.composedPath().find(a=>a instanceof Element&&(a.tagName==="SCB-MENU-ITEM"||a.tagName==="SCB-NAV-ITEM"||a.tagName==="A"||a.tagName==="BUTTON"));if(!i)return;const n=this.__getHref(i);if(!n||!n.startsWith("#"))return;const o=n.slice(1);if(!o)return;const r=s.querySelector(`#${CSS.escape(o)}`);r&&(t.preventDefault(),this.__hashAllowUpdates=!0,this.__scrollToTarget(r),this.__setActiveId(o,{updateHash:this.updateHash}))}render(){if(this.layout==="sidebar")return g`
|
|
2
2
|
<div class="sidebar-layout" style=${[`--_scb-scrollspy-sidebar-nav-width: ${this.sidebarNavWidth}`,`--_scb-scrollspy-sidebar-height: ${this.sidebarHeight}`,`--_scb-scrollspy-sidebar-nav-top: ${this.sidebarNavTop}`,`--_scb-scrollspy-content-padding: ${this.contentPadding}`].join("; ")}>
|
|
3
3
|
<div class="sidebar-nav">
|
|
4
4
|
<slot name="nav" @slotchange=${this.__onSlotChange}></slot>
|
|
@@ -7,7 +7,7 @@ import{_ as w,b as R,g as M,y as g}from"../../vendor/vendor.js";import"../../ven
|
|
|
7
7
|
<slot name="content" @slotchange=${this.__onSlotChange}></slot>
|
|
8
8
|
</div>
|
|
9
9
|
</div>
|
|
10
|
-
`;if(this.layout==="stack"){const t=[`--_scb-scrollspy-content-padding: ${this.contentPadding}
|
|
10
|
+
`;if(this.layout==="stack"){const t=[`--_scb-scrollspy-content-padding: ${this.contentPadding}`,"--_scb-scrollspy-stack-overflow: visible"],e=(this.stackHeight||"").trim();return e&&(t.unshift(`--_scb-scrollspy-stack-height: ${e}`),t.push("--_scb-scrollspy-stack-overflow: auto")),g`
|
|
11
11
|
<div class="stack-shell" style=${t.join("; ")}>
|
|
12
12
|
<slot name="nav" @slotchange=${this.__onSlotChange}></slot>
|
|
13
13
|
<div class="stack-content">
|
|
@@ -17,7 +17,7 @@ import{_ as w,b as R,g as M,y as g}from"../../vendor/vendor.js";import"../../ven
|
|
|
17
17
|
`}return g`
|
|
18
18
|
<slot name="nav" @slotchange=${this.__onSlotChange}></slot>
|
|
19
19
|
<slot name="content" @slotchange=${this.__onSlotChange}></slot>
|
|
20
|
-
`}},
|
|
20
|
+
`}},b.properties={navSelector:{type:String,attribute:"nav-selector"},offsetTop:{type:Number,attribute:"offset-top"},offsetBottom:{type:Number,attribute:"offset-bottom"},updateHash:{type:Boolean,attribute:"update-hash",converter:{fromAttribute:h=>{if(h===null)return!0;const t=h.trim().toLowerCase();return!(t==="false"||t==="0"||t==="no")},toAttribute:h=>h?"":null}},activeId:{type:String,attribute:"active-id",reflect:!0},layout:{type:String,reflect:!0},sidebarNavWidth:{type:String,attribute:"sidebar-nav-width"},sidebarHeight:{type:String,attribute:"sidebar-height"},stackHeight:{type:String,attribute:"stack-height"},sidebarNavTop:{type:String,attribute:"sidebar-nav-top"},contentPadding:{type:String,attribute:"content-padding"},spacing:{type:String,reflect:!0},spacingTop:{type:String,attribute:"spacing-top",reflect:!0},spacingBottom:{type:String,attribute:"spacing-bottom",reflect:!0},spacingLeft:{type:String,attribute:"spacing-left",reflect:!0},spacingRight:{type:String,attribute:"spacing-right",reflect:!0}},b.styles=R`
|
|
21
21
|
:host {
|
|
22
22
|
display: contents;
|
|
23
23
|
}
|
|
@@ -40,7 +40,7 @@ import{_ as w,b as R,g as M,y as g}from"../../vendor/vendor.js";import"../../ven
|
|
|
40
40
|
|
|
41
41
|
.stack-shell {
|
|
42
42
|
max-height: var(--_scb-scrollspy-stack-height, none);
|
|
43
|
-
overflow:
|
|
43
|
+
overflow: var(--_scb-scrollspy-stack-overflow, visible);
|
|
44
44
|
border-radius: 16px;
|
|
45
45
|
font-family: var(--brand-font);
|
|
46
46
|
box-sizing: border-box;
|
|
@@ -76,4 +76,4 @@ import{_ as w,b as R,g as M,y as g}from"../../vendor/vendor.js";import"../../ven
|
|
|
76
76
|
:host([layout='sidebar']) ::slotted(scb-menu) {
|
|
77
77
|
border-radius: var(--scb-menu-surface-radius, 16px);
|
|
78
78
|
}
|
|
79
|
-
`,
|
|
79
|
+
`,b);E=O([M("scb-scrollspy")],E);
|
package/mvc/scb-logo.svg
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
-
<svg viewBox="-0.0002 -0.0066 1344.9076 377.9532" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
-
<defs>
|
|
4
|
-
<style type="text/css">
|
|
5
|
-
g {
|
|
6
|
-
fill: #100f0d;
|
|
7
|
-
}
|
|
8
|
-
g:target {
|
|
9
|
-
fill: #fff;
|
|
10
|
-
}
|
|
11
|
-
</style>
|
|
12
|
-
</defs>
|
|
13
|
-
<g transform="matrix(1.3333330154418945, 0, 0, -1.3333330154418945, 0, 377.9466552734375)" id="g10">
|
|
14
|
-
<g transform="scale(0.1)" id="inverted">
|
|
15
|
-
<path id="path14" d="m 1346.6,2515.59 c 0,48.24 -39.11,87.31 -87.4,87.31 -48.29,0 -87.4,-39.07 -87.4,-87.31 V 312.898 c 0,-48.339 39.11,-87.5 87.4,-87.5 48.29,0 87.4,39.161 87.4,87.5 V 1106.8 c 0,5.77 4.79,10.45 10.51,10.45 h 287.22 c 5.76,0 10.5,-4.68 10.5,-10.45 V 305.969 C 1654.83,137.02 1477.67,0 1259.2,0 1040.63,0 863.523,137.02 863.523,305.969 V 2528.77 c 0,168.86 177.107,305.88 395.677,305.88 218.47,0 395.63,-137.02 395.63,-305.88 V 1738.1 c 0,-5.86 -4.74,-10.45 -10.5,-10.45 h -287.22 c -5.72,0 -10.51,4.59 -10.51,10.45 v 777.49"/>
|
|
16
|
-
<path id="path16" d="M 10.4414,2265.38 C -8.01563,2136.85 -1.52734,1926.1 26.1172,1807.73 56.4922,1678.71 231.645,1417.96 310.555,1296.86 389.566,1175.85 494.949,1049.49 493.375,880.922 V 477.18 c 0,-48.25 -39.109,-87.41 -87.406,-87.41 -48.145,0 -87.254,39.16 -87.254,87.41 v 618.79 c 0,5.76 -4.785,10.55 -10.645,10.55 H 20.9453 c -5.8711,0 -10.5039,-4.79 -10.5039,-10.55 V 458.719 c 0,-168.957 177.1056,-305.969 395.5276,-305.969 218.574,0 395.683,137.012 395.683,305.969 v 422.203 c -1.324,289.568 -80.332,331.748 -182.867,505.398 -73.445,124.71 -254.121,381.95 -284.398,510.97 -27.735,118.36 -26.516,255.39 -15.672,379.9 0,48.25 39.109,87.41 87.254,87.41 48.297,0 87.406,-39.16 87.406,-87.41 v -550.32 c 0,-5.77 4.746,-10.45 10.645,-10.45 h 287.085 c 5.911,0 10.547,4.68 10.547,10.45 v 538.51 c 0,169.06 -177.109,305.97 -395.683,305.97 -218.422,0 -395.5276,-136.91 -395.5276,-305.97"/>
|
|
17
|
-
<path id="path18" d="m 1726.57,2547.82 h 440.8 c 182.04,0 329.61,-147.57 329.61,-329.52 v -462.24 c 0,-129.59 -84.97,-238.98 -202.16,-276.48 v -6.24 c 117.19,-37.4 202.16,-146.89 202.16,-276.58 V 491.148 c 0,-160.367 -130.2,-290.457 -290.45,-290.457 l -479.96,-0.293 c -5.91,0 -10.6,4.793 -10.6,10.454 V 2537.37 c 0,5.66 4.69,10.45 10.6,10.45 m 308.27,-229.22 c -5.97,0 -10.65,-4.78 -10.65,-10.55 v -729.33 c 0,-5.97 4.68,-10.65 10.65,-10.65 h 43.36 c 58.01,0 105.08,47.16 105.08,105.18 v 540.18 c 0,58 -47.07,105.17 -105.08,105.17 z m 0,-982.29 c -5.97,0 -10.65,-4.69 -10.65,-10.45 V 430.59 c 0,-5.86 4.68,-10.649 10.65,-10.649 h 51.85 c 58.12,0 105.09,47.18 105.09,105.188 v 706.011 c 0,58.19 -46.97,105.17 -105.09,105.17 h -51.85"/>
|
|
18
|
-
</g>
|
|
19
|
-
</g>
|
|
20
|
-
<text style="fill: rgb(1, 1, 1); font-family: Roboto; font-size: 139.2px; font-weight: 500; stroke: rgb(0, 0, 0); white-space: pre;" x="455.182" y="234.25">Designsystem</text>
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
|
2
|
+
<svg viewBox="-0.0002 -0.0066 1344.9076 377.9532" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<defs>
|
|
4
|
+
<style type="text/css">
|
|
5
|
+
g {
|
|
6
|
+
fill: #100f0d;
|
|
7
|
+
}
|
|
8
|
+
g:target {
|
|
9
|
+
fill: #fff;
|
|
10
|
+
}
|
|
11
|
+
</style>
|
|
12
|
+
</defs>
|
|
13
|
+
<g transform="matrix(1.3333330154418945, 0, 0, -1.3333330154418945, 0, 377.9466552734375)" id="g10">
|
|
14
|
+
<g transform="scale(0.1)" id="inverted">
|
|
15
|
+
<path id="path14" d="m 1346.6,2515.59 c 0,48.24 -39.11,87.31 -87.4,87.31 -48.29,0 -87.4,-39.07 -87.4,-87.31 V 312.898 c 0,-48.339 39.11,-87.5 87.4,-87.5 48.29,0 87.4,39.161 87.4,87.5 V 1106.8 c 0,5.77 4.79,10.45 10.51,10.45 h 287.22 c 5.76,0 10.5,-4.68 10.5,-10.45 V 305.969 C 1654.83,137.02 1477.67,0 1259.2,0 1040.63,0 863.523,137.02 863.523,305.969 V 2528.77 c 0,168.86 177.107,305.88 395.677,305.88 218.47,0 395.63,-137.02 395.63,-305.88 V 1738.1 c 0,-5.86 -4.74,-10.45 -10.5,-10.45 h -287.22 c -5.72,0 -10.51,4.59 -10.51,10.45 v 777.49"/>
|
|
16
|
+
<path id="path16" d="M 10.4414,2265.38 C -8.01563,2136.85 -1.52734,1926.1 26.1172,1807.73 56.4922,1678.71 231.645,1417.96 310.555,1296.86 389.566,1175.85 494.949,1049.49 493.375,880.922 V 477.18 c 0,-48.25 -39.109,-87.41 -87.406,-87.41 -48.145,0 -87.254,39.16 -87.254,87.41 v 618.79 c 0,5.76 -4.785,10.55 -10.645,10.55 H 20.9453 c -5.8711,0 -10.5039,-4.79 -10.5039,-10.55 V 458.719 c 0,-168.957 177.1056,-305.969 395.5276,-305.969 218.574,0 395.683,137.012 395.683,305.969 v 422.203 c -1.324,289.568 -80.332,331.748 -182.867,505.398 -73.445,124.71 -254.121,381.95 -284.398,510.97 -27.735,118.36 -26.516,255.39 -15.672,379.9 0,48.25 39.109,87.41 87.254,87.41 48.297,0 87.406,-39.16 87.406,-87.41 v -550.32 c 0,-5.77 4.746,-10.45 10.645,-10.45 h 287.085 c 5.911,0 10.547,4.68 10.547,10.45 v 538.51 c 0,169.06 -177.109,305.97 -395.683,305.97 -218.422,0 -395.5276,-136.91 -395.5276,-305.97"/>
|
|
17
|
+
<path id="path18" d="m 1726.57,2547.82 h 440.8 c 182.04,0 329.61,-147.57 329.61,-329.52 v -462.24 c 0,-129.59 -84.97,-238.98 -202.16,-276.48 v -6.24 c 117.19,-37.4 202.16,-146.89 202.16,-276.58 V 491.148 c 0,-160.367 -130.2,-290.457 -290.45,-290.457 l -479.96,-0.293 c -5.91,0 -10.6,4.793 -10.6,10.454 V 2537.37 c 0,5.66 4.69,10.45 10.6,10.45 m 308.27,-229.22 c -5.97,0 -10.65,-4.78 -10.65,-10.55 v -729.33 c 0,-5.97 4.68,-10.65 10.65,-10.65 h 43.36 c 58.01,0 105.08,47.16 105.08,105.18 v 540.18 c 0,58 -47.07,105.17 -105.08,105.17 z m 0,-982.29 c -5.97,0 -10.65,-4.69 -10.65,-10.45 V 430.59 c 0,-5.86 4.68,-10.649 10.65,-10.649 h 51.85 c 58.12,0 105.09,47.18 105.09,105.188 v 706.011 c 0,58.19 -46.97,105.17 -105.09,105.17 h -51.85"/>
|
|
18
|
+
</g>
|
|
19
|
+
</g>
|
|
20
|
+
<text style="fill: rgb(1, 1, 1); font-family: Roboto; font-size: 139.2px; font-weight: 500; stroke: rgb(0, 0, 0); white-space: pre;" x="455.182" y="234.25">Designsystem</text>
|
|
21
21
|
</svg>
|
package/mvc/scb.svg
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
-
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
4
|
-
aria-hidden="true"
|
|
5
|
-
role="img"
|
|
6
|
-
width="48"
|
|
7
|
-
height="48"
|
|
8
|
-
preserveAspectRatio="xMidYMid meet"
|
|
9
|
-
viewBox="0 0 1300 1300"
|
|
10
|
-
>
|
|
11
|
-
<path d="M539.3,128.2c0-19.3-15.7-35-35-35c-19.3,0-35,15.6-35,35v882.1c0,19.4,15.7,35,35,35c19.3,0,35-15.7,35-35V692.4 c0-2.3,1.9-4.2,4.2-4.2h115c2.3,0,4.2,1.9,4.2,4.2v320.7c0,67.7-71,122.5-158.4,122.5c-87.5,0-158.5-54.9-158.5-122.5V122.9 c0-67.6,70.9-122.5,158.5-122.5c87.5,0,158.4,54.9,158.4,122.5v316.6c0,2.3-1.9,4.2-4.2,4.2h-115c-2.3,0-4.2-1.8-4.2-4.2V128.2z" />
|
|
12
|
-
<path d="M4.2,228.4c-7.4,51.5-4.8,135.9,6.3,183.3c12.2,51.7,82.3,156.1,113.9,204.6c31.6,48.5,73.8,99.1,73.2,166.6v161.7 c0,19.3-15.7,35-35,35c-19.3,0-34.9-15.7-34.9-35V696.7c0-2.3-1.9-4.2-4.3-4.2H8.4c-2.4,0-4.2,1.9-4.2,4.2v255.2 c0,67.7,70.9,122.5,158.4,122.5c87.5,0,158.5-54.9,158.5-122.5V782.8c-0.5-116-32.2-132.9-73.2-202.4 c-29.4-49.9-101.8-153-113.9-204.6c-11.1-47.4-10.6-102.3-6.3-152.1c0-19.3,15.7-35,34.9-35c19.3,0,35,15.7,35,35V444 c0,2.3,1.9,4.2,4.3,4.2h115c2.4,0,4.2-1.9,4.2-4.2V228.4c0-67.7-70.9-122.5-158.5-122.5C75.1,105.8,4.2,160.7,4.2,228.4" />
|
|
13
|
-
<path d="M814.9,600.4c-2.4,0-4.3,1.9-4.3,4.2v358.5c0,2.3,1.9,4.3,4.3,4.3h20.8c23.3,0,42.1-18.9,42.1-42.1V642.6 c0-23.3-18.8-42.1-42.1-42.1H814.9z M814.9,207.1c-2.4,0-4.3,1.9-4.3,4.2v292.1c0,2.4,1.9,4.3,4.3,4.3h17.4 c23.2,0,42.1-18.9,42.1-42.1V249.2c0-23.2-18.9-42.1-42.1-42.1H814.9z M691.5,115.3H868c72.9,0,132,59.1,132,132v185.1 c0,51.9-34,95.7-81,110.7v2.5c46.9,15,81,58.8,81,110.8v282.6c0,64.2-52.1,116.3-116.3,116.3l-192.2,0.1c-2.4,0-4.2-1.9-4.2-4.2 V119.4C687.2,117.2,689.1,115.3,691.5,115.3" />
|
|
1
|
+
<svg
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
4
|
+
aria-hidden="true"
|
|
5
|
+
role="img"
|
|
6
|
+
width="48"
|
|
7
|
+
height="48"
|
|
8
|
+
preserveAspectRatio="xMidYMid meet"
|
|
9
|
+
viewBox="0 0 1300 1300"
|
|
10
|
+
>
|
|
11
|
+
<path d="M539.3,128.2c0-19.3-15.7-35-35-35c-19.3,0-35,15.6-35,35v882.1c0,19.4,15.7,35,35,35c19.3,0,35-15.7,35-35V692.4 c0-2.3,1.9-4.2,4.2-4.2h115c2.3,0,4.2,1.9,4.2,4.2v320.7c0,67.7-71,122.5-158.4,122.5c-87.5,0-158.5-54.9-158.5-122.5V122.9 c0-67.6,70.9-122.5,158.5-122.5c87.5,0,158.4,54.9,158.4,122.5v316.6c0,2.3-1.9,4.2-4.2,4.2h-115c-2.3,0-4.2-1.8-4.2-4.2V128.2z" />
|
|
12
|
+
<path d="M4.2,228.4c-7.4,51.5-4.8,135.9,6.3,183.3c12.2,51.7,82.3,156.1,113.9,204.6c31.6,48.5,73.8,99.1,73.2,166.6v161.7 c0,19.3-15.7,35-35,35c-19.3,0-34.9-15.7-34.9-35V696.7c0-2.3-1.9-4.2-4.3-4.2H8.4c-2.4,0-4.2,1.9-4.2,4.2v255.2 c0,67.7,70.9,122.5,158.4,122.5c87.5,0,158.5-54.9,158.5-122.5V782.8c-0.5-116-32.2-132.9-73.2-202.4 c-29.4-49.9-101.8-153-113.9-204.6c-11.1-47.4-10.6-102.3-6.3-152.1c0-19.3,15.7-35,34.9-35c19.3,0,35,15.7,35,35V444 c0,2.3,1.9,4.2,4.3,4.2h115c2.4,0,4.2-1.9,4.2-4.2V228.4c0-67.7-70.9-122.5-158.5-122.5C75.1,105.8,4.2,160.7,4.2,228.4" />
|
|
13
|
+
<path d="M814.9,600.4c-2.4,0-4.3,1.9-4.3,4.2v358.5c0,2.3,1.9,4.3,4.3,4.3h20.8c23.3,0,42.1-18.9,42.1-42.1V642.6 c0-23.3-18.8-42.1-42.1-42.1H814.9z M814.9,207.1c-2.4,0-4.3,1.9-4.3,4.2v292.1c0,2.4,1.9,4.3,4.3,4.3h17.4 c23.2,0,42.1-18.9,42.1-42.1V249.2c0-23.2-18.9-42.1-42.1-42.1H814.9z M691.5,115.3H868c72.9,0,132,59.1,132,132v185.1 c0,51.9-34,95.7-81,110.7v2.5c46.9,15,81,58.8,81,110.8v282.6c0,64.2-52.1,116.3-116.3,116.3l-192.2,0.1c-2.4,0-4.2-1.9-4.2-4.2 V119.4C687.2,117.2,689.1,115.3,691.5,115.3" />
|
|
14
14
|
</svg>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "scb-wc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.16",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.js",
|
|
@@ -458,5 +458,5 @@
|
|
|
458
458
|
},
|
|
459
459
|
"./mvc/*": "./mvc/*"
|
|
460
460
|
},
|
|
461
|
-
"buildHash": "
|
|
461
|
+
"buildHash": "BAE784627CB6C8E42A1D9FDD62696E585EBB3B019A646539BED17F1088ED2D98"
|
|
462
462
|
}
|
|
@@ -119,7 +119,7 @@ var a = class extends t {
|
|
|
119
119
|
|
|
120
120
|
.stack-shell {
|
|
121
121
|
max-height: var(--_scb-scrollspy-stack-height, none);
|
|
122
|
-
overflow:
|
|
122
|
+
overflow: var(--_scb-scrollspy-stack-overflow, visible);
|
|
123
123
|
border-radius: 16px;
|
|
124
124
|
font-family: var(--brand-font);
|
|
125
125
|
box-sizing: border-box;
|
|
@@ -649,8 +649,8 @@ var a = class extends t {
|
|
|
649
649
|
</div>
|
|
650
650
|
`;
|
|
651
651
|
if (this.layout === "stack") {
|
|
652
|
-
let e = [`--_scb-scrollspy-content-padding: ${this.contentPadding}
|
|
653
|
-
return t && e.unshift(`--_scb-scrollspy-stack-height: ${t}`), r`
|
|
652
|
+
let e = [`--_scb-scrollspy-content-padding: ${this.contentPadding}`, "--_scb-scrollspy-stack-overflow: visible"], t = (this.stackHeight || "").trim();
|
|
653
|
+
return t && (e.unshift(`--_scb-scrollspy-stack-height: ${t}`), e.push("--_scb-scrollspy-stack-overflow: auto")), r`
|
|
654
654
|
<div class="stack-shell" style=${e.join("; ")}>
|
|
655
655
|
<slot name="nav" @slotchange=${this.__onSlotChange}></slot>
|
|
656
656
|
<div class="stack-content">
|
package/scb-wc.bundle.js
CHANGED
|
@@ -10667,7 +10667,7 @@ var ScbWc=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module
|
|
|
10667
10667
|
|
|
10668
10668
|
.stack-shell {
|
|
10669
10669
|
max-height: var(--_scb-scrollspy-stack-height, none);
|
|
10670
|
-
overflow:
|
|
10670
|
+
overflow: var(--_scb-scrollspy-stack-overflow, visible);
|
|
10671
10671
|
border-radius: 16px;
|
|
10672
10672
|
font-family: var(--brand-font);
|
|
10673
10673
|
box-sizing: border-box;
|
|
@@ -10712,7 +10712,7 @@ var ScbWc=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module
|
|
|
10712
10712
|
<slot name="content" @slotchange=${this.__onSlotChange}></slot>
|
|
10713
10713
|
</div>
|
|
10714
10714
|
</div>
|
|
10715
|
-
`;if(this.layout===`stack`){let e=[`--_scb-scrollspy-content-padding: ${this.contentPadding}`],t=(this.stackHeight||``).trim();return t&&e.unshift(`--_scb-scrollspy-stack-height: ${t}`),x`
|
|
10715
|
+
`;if(this.layout===`stack`){let e=[`--_scb-scrollspy-content-padding: ${this.contentPadding}`,`--_scb-scrollspy-stack-overflow: visible`],t=(this.stackHeight||``).trim();return t&&(e.unshift(`--_scb-scrollspy-stack-height: ${t}`),e.push(`--_scb-scrollspy-stack-overflow: auto`)),x`
|
|
10716
10716
|
<div class="stack-shell" style=${e.join(`; `)}>
|
|
10717
10717
|
<slot name="nav" @slotchange=${this.__onSlotChange}></slot>
|
|
10718
10718
|
<div class="stack-content">
|