scb-wc-test 0.1.155 → 0.1.157
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-card/scb-card.js +3 -3
- package/mvc/components/scb-drawer/scb-drawer.js +3 -4
- package/mvc/components/scb-dropdown/scb-dropdown.js +76 -38
- package/mvc/components/scb-header/scb-header-tab.js +2 -2
- package/mvc/components/scb-header/scb-header.js +162 -60
- package/package.json +2 -2
- package/scb-card/scb-card.d.ts +4 -0
- package/scb-card/scb-card.js +8 -2
- package/scb-drawer/scb-drawer.js +19 -20
- package/scb-dropdown/scb-dropdown.d.ts +5 -0
- package/scb-dropdown/scb-dropdown.js +166 -90
- package/scb-header/scb-header-tab.d.ts +1 -1
- package/scb-header/scb-header-tab.js +20 -20
- package/scb-header/scb-header.d.ts +11 -3
- package/scb-header/scb-header.js +428 -246
- package/scb-wc-test.bundle.js +360 -221
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/vendor-material.js","../../vendor/vendor.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as f}from"../../vendor/preload-helper.js";import{a as $,n as r,i as k,x as s,t as _}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-list/scb-list.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-link/scb-link.js";import"../scb-avatar/scb-avatar.js";import"../scb-list/scb-list-item.js";import"../scb-tooltip/scb-tooltip.js";(function(){try{var i=typeof globalThis<"u"?globalThis:window;if(!i.__scb_ce_guard_installed__){i.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(o,n,c){try{customElements.get(o)||t(o,n,c)}catch(l){var d=String(l||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var z=Object.defineProperty,w=Object.getOwnPropertyDescriptor,x=i=>{throw TypeError(i)},a=(i,t,o,n)=>{for(var c=n>1?void 0:n?w(t,o):t,d=i.length-1,l;d>=0;d--)(l=i[d])&&(c=(n?l(t,o,c):l(c))||c);return n&&c&&z(t,o,c),c},S=(i,t,o)=>t.has(i)||x("Cannot "+o),T=(i,t,o)=>t.has(i)?x("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,o),y=(i,t,o)=>(S(i,t,"access private method"),o),b,g;let e=class extends k{constructor(){super(...arguments),T(this,b),this.type="",this.variant="",this.direction="",this.mediaType="",this.mediaHref="",this.mediaAlt="",this.mediaSrcset="",this.mediaSizes="",this.mediaLoading="auto",this.mediaDecoding="async",this.mediaFetchPriority="auto",this.mediaFit="cover",this.mediaPosition="center",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.mediaPlaceholder=!1,this.cardHref="",this.title="",this.subtitle="",this.supportingText="",this.commentsText="",this.comments=0,this.commentsHref="",this.likesText="",this.likes=0,this.hasLiked=!1,this.likesInteractive=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.spacing="",this.spacingTop="",this.spacingBottom="",this.__onImgLoad=i=>{const t=i.currentTarget.closest(".media");t&&t.classList.add("is-loaded")},this.__onKeyDown=i=>{(i.key==="Enter"||i.key===" ")&&this.cardHref&&(i.preventDefault(),window.open(this.cardHref,"_self"))},this.__handleHrefNavigation=i=>{this.cardHref&&(i.target.closest("a")||window.open(this.cardHref,"_self"))}}__calcAspectWH(i){const t=(i||"").trim();if(!t)return{w:640,h:360};const o=t.includes("/")?t.split("/"):t.includes(":")?t.split(":"):t.includes("x")?t.split("x"):null;if(o&&o.length===2){const c=Number(o[0]),d=Number(o[1]);if(c>0&&d>0)return{w:c,h:d}}const n=Number(t);return isFinite(n)&&n>0?{w:1e3,h:Math.round(1e3/n)}:{w:640,h:360}}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return s`
|
|
2
|
+
import{_ as f}from"../../vendor/preload-helper.js";import{a as $,n as r,i as k,x as s,t as _}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-list/scb-list.js";import"../scb-button/scb-button.js";import"../scb-icon-button/scb-icon-button.js";import"../scb-link/scb-link.js";import"../scb-avatar/scb-avatar.js";import"../scb-list/scb-list-item.js";import"../scb-tooltip/scb-tooltip.js";(function(){try{var i=typeof globalThis<"u"?globalThis:window;if(!i.__scb_ce_guard_installed__){i.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(o,n,c){try{customElements.get(o)||t(o,n,c)}catch(l){var d=String(l||"");if(d.indexOf("already been used")===-1&&d.indexOf("NotSupportedError")===-1)throw l}}}}catch{}})();var z=Object.defineProperty,w=Object.getOwnPropertyDescriptor,x=i=>{throw TypeError(i)},a=(i,t,o,n)=>{for(var c=n>1?void 0:n?w(t,o):t,d=i.length-1,l;d>=0;d--)(l=i[d])&&(c=(n?l(t,o,c):l(c))||c);return n&&c&&z(t,o,c),c},S=(i,t,o)=>t.has(i)||x("Cannot "+o),T=(i,t,o)=>t.has(i)?x("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,o),y=(i,t,o)=>(S(i,t,"access private method"),o),b,g;let e=class extends k{constructor(){super(...arguments),T(this,b),this.type="",this.variant="",this.direction="",this.mediaType="",this.mediaHref="",this.mediaAlt="",this.mediaSrcset="",this.mediaSizes="",this.mediaLoading="auto",this.mediaDecoding="async",this.mediaFetchPriority="auto",this.mediaFit="cover",this.mediaPosition="center",this.mediaWidth="",this.mediaHeight="",this.mediaAspect="",this.mediaPlaceholder=!1,this.cardHref="",this.title="",this.subtitle="",this.supportingText="",this.commentsText="",this.comments=0,this.commentsHref="",this.likesText="",this.likes=0,this.hasLiked=!1,this.likesInteractive=!1,this.sizing="stretch",this.width="",this.maxWidth="",this.height="",this.maxHeight="",this.spacing="",this.spacingTop="",this.spacingBottom="",this.__onImgLoad=i=>{const t=i.currentTarget.closest(".media");t&&t.classList.add("is-loaded")},this.__onKeyDown=i=>{(i.key==="Enter"||i.key===" ")&&this.cardHref&&(i.preventDefault(),window.open(this.cardHref,"_self"))},this.__handleHrefNavigation=i=>{this.cardHref&&(i.target.closest("a")||window.open(this.cardHref,"_self"))}}get likeButton(){return this.type!=="social"?null:this.renderRoot.querySelector(".likes scb-icon-button")}__calcAspectWH(i){const t=(i||"").trim();if(!t)return{w:640,h:360};const o=t.includes("/")?t.split("/"):t.includes(":")?t.split(":"):t.includes("x")?t.split("x"):null;if(o&&o.length===2){const c=Number(o[0]),d=Number(o[1]);if(c>0&&d>0)return{w:c,h:d}}const n=Number(t);return isFinite(n)&&n>0?{w:1e3,h:Math.round(1e3/n)}:{w:640,h:360}}__mediaTemplate(){if((this.mediaType||"").toLowerCase()==="avatar")return s`
|
|
3
3
|
<div class="media">
|
|
4
4
|
<slot name="media">
|
|
5
5
|
<scb-avatar variant="icon" label="${this.title}" icon-name="person"></scb-avatar>
|
|
@@ -75,7 +75,7 @@ import{_ as f}from"../../vendor/preload-helper.js";import{a as $,n as r,i as k,x
|
|
|
75
75
|
@mouseleave=${()=>u(!1)}
|
|
76
76
|
>
|
|
77
77
|
${h!==""?s`
|
|
78
|
-
<scb-icon-button href="${h}" tabindex="0" @click=${m} variant="standard" icon="comment" aria-label="Gå till kommentarer"
|
|
78
|
+
<scb-icon-button href="${h}" tabindex="0" @click=${m} variant="standard" icon="comment" aria-label="Gå till kommentarer"></scb-icon-button>
|
|
79
79
|
`:s`
|
|
80
80
|
<md-icon>comment</md-icon>
|
|
81
81
|
`}
|
|
@@ -86,7 +86,7 @@ import{_ as f}from"../../vendor/preload-helper.js";import{a as $,n as r,i as k,x
|
|
|
86
86
|
@mouseleave=${()=>u(!1)}
|
|
87
87
|
>
|
|
88
88
|
${this.likesInteractive?s`
|
|
89
|
-
<scb-icon-button variant="standard" icon="${this.hasLiked,"thumb_up"}" aria-label="${this.likesText||"Gilla"}"
|
|
89
|
+
<scb-icon-button id="like-button" variant="standard" icon="${this.hasLiked,"thumb_up"}" aria-label="${this.likesText||"Gilla"}"
|
|
90
90
|
@click=${p=>{p.stopPropagation(),this.dispatchEvent(new CustomEvent("like-click",{bubbles:!0,composed:!0}))}}
|
|
91
91
|
@keydown=${p=>{(p.key==="Enter"||p.key===" ")&&(p.preventDefault(),p.stopPropagation(),this.dispatchEvent(new CustomEvent("like-click",{bubbles:!0,composed:!0})))}}
|
|
92
92
|
@hover=${p=>{p.preventDefault(),p.stopPropagation(),this.dispatchEvent(new CustomEvent("like-hover",{bubbles:!0,composed:!0}))}}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./scb-drawer-item.js","../../vendor/preload-helper.js","../../vendor/vendor.js","./scb-drawer-section.js","../scb-divider/scb-divider.js","./scb-sub-drawer.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as d}from"../../vendor/preload-helper.js";import{a as
|
|
2
|
+
import{_ as d}from"../../vendor/preload-helper.js";import{a as f,n,i as p,E as _,x as u,t as h}from"../../vendor/vendor.js";import"../scb-divider/scb-divider.js";(function(){try{var t=typeof globalThis<"u"?globalThis:window;if(!t.__scb_ce_guard_installed__){t.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(o,a,s){try{customElements.get(o)||r(o,a,s)}catch(c){var i=String(c||"");if(i.indexOf("already been used")===-1&&i.indexOf("NotSupportedError")===-1)throw c}}}}catch{}})();var v=Object.defineProperty,y=Object.getOwnPropertyDescriptor,l=(t,r,o,a)=>{for(var s=a>1?void 0:a?y(r,o):r,i=t.length-1,c;i>=0;i--)(c=t[i])&&(s=(a?c(r,o,s):c(s))||s);return a&&s&&v(r,o,s),s};let e=class extends p{constructor(){super(...arguments),this.label="",this.subLabel="",this.floating=!1,this.left=!0,this.right=!1,this.open=!1,this.overlay=!1,this.lockScroll=!1,this.closeOnOverlay=!0,this.modal=!1,this.__lastTriggerEl=null,this._onGlobalSelect=t=>{const r=t;this.querySelectorAll("scb-drawer-item").forEach(a=>a.selected=!1),this.contains(r.detail.item)&&(r.detail.item.selected=!0)},this.__onDocumentClick=t=>{const r=this.__getActionFromEvent(t);if(r){r==="open"&&this.__setOpen(!0),r==="close"&&this.__setOpen(!1),r==="toggle"&&this.__setOpen(!this.open),t.stopPropagation();return}this.floating&&this.open&&!this.overlay&&(t.composedPath().includes(this)||this.__setOpen(!1))},this.__onDocumentKeydown=t=>{if(this.open){if(t.key==="Escape"){this.__setOpen(!1);return}if(this.overlay&&t.key==="Tab"){const r=this.__getFocusable();if(r.length===0)return;const o=r[0],a=r[r.length-1],s=this.renderRoot,i=s.activeElement||document.activeElement;t.shiftKey?(i===o||!s.contains(i))&&(t.preventDefault(),a.focus()):(i===a||!s.contains(i))&&(t.preventDefault(),o.focus())}}}}static async __ensureParts(){e.__partsReady||(e.__partsLoading||(e.__partsLoading=Promise.all([d(()=>import("./scb-drawer-item.js"),__vite__mapDeps([0,1,2]),import.meta.url),d(()=>import("./scb-drawer-section.js"),__vite__mapDeps([3,2,4]),import.meta.url),d(()=>import("./scb-sub-drawer.js"),__vite__mapDeps([5,2]),import.meta.url)]).then(()=>{e.__partsReady=!0})),await e.__partsLoading)}static __ensureOverlayStyles(){if(typeof document>"u"||document.getElementById("scb-drawer-overlay-styles"))return;const t=document.createElement("style");t.id="scb-drawer-overlay-styles",t.textContent=`
|
|
3
3
|
.scb-drawer-global-overlay {
|
|
4
4
|
position: fixed;
|
|
5
5
|
inset: 0;
|
|
@@ -38,12 +38,12 @@ import{_ as d}from"../../vendor/preload-helper.js";import{a as p,n,i as f,E as _
|
|
|
38
38
|
`}connectedCallback(){super.connectedCallback(),window.addEventListener("scb-drawer-select",this._onGlobalSelect),document.addEventListener("click",this.__onDocumentClick,!1)}disconnectedCallback(){window.removeEventListener("scb-drawer-select",this._onGlobalSelect),document.removeEventListener("click",this.__onDocumentClick,!1),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.overlay&&(e.__hideOverlay(this),this.lockScroll&&e.__lockScrollDisable()),super.disconnectedCallback()}__getActionFromEvent(t){if(!this.id)return null;const r=t.composedPath();for(const o of r)if(o instanceof Element){if(o.getAttribute("data-drawer-open")===this.id)return this.__lastTriggerEl=o,"open";if(o.getAttribute("data-drawer-close")===this.id)return this.__lastTriggerEl=o,"close";if(o.getAttribute("data-drawer-toggle")===this.id)return this.__lastTriggerEl=o,"toggle";if(o.getAttribute("aria-controls")===this.id)return this.__lastTriggerEl=o,"toggle"}return null}__getFocusable(){const t=this.renderRoot;return Array.from(t.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).filter(r=>!r.hasAttribute("disabled")&&r.tabIndex>=0)}__setOpen(t){this.open=t}updated(t){if(t.has("open")){const r=!!t.get("open");this.__applyOpenSideEffects(r,this.open)}t.has("right")&&this.right&&this.left&&(this.left=!1),t.has("left")&&this.left&&this.right&&(this.right=!1)}__applyOpenSideEffects(t,r){r&&!t?(this.floating&&this.overlay&&(e.__showOverlay(this),this.lockScroll&&e.__lockScrollEnable()),document.addEventListener("keydown",this.__onDocumentKeydown,!0),e.__ensureParts(),this.__updateTriggersExpanded(),this.updateComplete.then(()=>{this.__getFocusable()[0]?.focus?.()}),this.dispatchEvent(new CustomEvent("scb-drawer-opened",{bubbles:!0,composed:!0}))):!r&&t&&(this.floating&&this.overlay&&(e.__hideOverlay(this),this.lockScroll&&e.__lockScrollDisable()),document.removeEventListener("keydown",this.__onDocumentKeydown,!0),this.__updateTriggersExpanded(),this.__lastTriggerEl?.focus?.(),this.dispatchEvent(new CustomEvent("scb-drawer-closed",{bubbles:!0,composed:!0})))}__updateTriggersExpanded(){if(!this.id)return;document.querySelectorAll(`[aria-controls="${this.id}"],
|
|
39
39
|
[data-drawer-open="${this.id}"],
|
|
40
40
|
[data-drawer-close="${this.id}"],
|
|
41
|
-
[data-drawer-toggle="${this.id}"]`).forEach(r=>{r.hasAttribute("aria-controls")&&r.setAttribute("aria-expanded",String(this.open))})}};e.__overlayEl=null;e.__overlayStack=[];e.__lockedCount=0;e.__prevDocOverflow=null;e.__prevBodyOverflow=null;e.__partsReady=!1;e.__partsLoading=null;e.styles=
|
|
41
|
+
[data-drawer-toggle="${this.id}"]`).forEach(r=>{r.hasAttribute("aria-controls")&&r.setAttribute("aria-expanded",String(this.open))})}};e.__overlayEl=null;e.__overlayStack=[];e.__lockedCount=0;e.__prevDocOverflow=null;e.__prevBodyOverflow=null;e.__partsReady=!1;e.__partsLoading=null;e.styles=f`
|
|
42
42
|
:host {
|
|
43
43
|
display: block;
|
|
44
44
|
color: var(--md-sys-color-on-surface);
|
|
45
45
|
padding: var(--spacing-4, 12px);
|
|
46
|
-
background: var(--md-sys-color-surface-container
|
|
46
|
+
background: var(--md-sys-color-surface-container);
|
|
47
47
|
font-family: var(--brand-font);
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -142,7 +142,6 @@ import{_ as d}from"../../vendor/preload-helper.js";import{a as p,n,i as f,E as _
|
|
|
142
142
|
|
|
143
143
|
scb-divider {
|
|
144
144
|
margin-block: var(--spacing-2, 4px);
|
|
145
|
-
margin-inline: var(--spacing-4, 12px);
|
|
146
145
|
}
|
|
147
146
|
|
|
148
147
|
.panel {
|
|
@@ -1,12 +1,33 @@
|
|
|
1
|
-
import{a as m,n as p,e as u,i as f,x as b,t as _}from"../../vendor/vendor.js";import"../scb-button/scb-button.js";import"../scb-menu/scb-menu.js";import"../../vendor/vendor-material.js";import"../scb-menu/scb-menu-item.js";import"../scb-divider/scb-divider.js";import"../scb-menu/scb-sub-menu.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(n,s,i){try{customElements.get(n)||t(n,s,i)}catch(d){var l=String(d||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var y=Object.defineProperty,g=Object.getOwnPropertyDescriptor,o=(e,t,n,s)=>{for(var i=s>1?void 0:s?g(t,n):t,l=e.length-1,d;l>=0;l--)(d=e[l])&&(i=(s?d(t,n,i):d(i))||i);return s&&i&&y(t,n,i),i};let r=class extends f{constructor(){super(...arguments),this.label="Dropdown",this.variant="filled",this.open=!1,this.disabled=!1,this.menuGap="3",this.width=null,this.minWidth=null,this.maxWidth=null,this._slottedMenuEl=null,this._openSettledTimer=null,this._menuCloseTimer=null,this._panelResizeObserver=null,this._panelHeightSyncRaf=null,this._onDocumentClickBound=e=>{if(!this.open)return;const t=e.composedPath(),n=t.find(s=>s instanceof HTMLElement&&s.tagName.toLowerCase()==="scb-dropdown");if(n&&n!==this){this.open=!1;return}t.includes(this)||(this.open=!1)},this._onDocumentKeydownBound=e=>{this.open&&e.key==="Escape"&&(this.open=!1)},this._onSlottedMenuOpen=()=>{this.open||(this.open=!0)},this._onSlottedMenuClose=()=>{this.open&&(this.open=!1)},this._onSlotChange=()=>{this._syncSlottedMenu(),this._applyPanelSizing(),this._applyInertByOpen(),this.requestUpdate()},this._onTriggerClick=e=>{e.stopPropagation(),!this.disabled&&(this.open=!this.open)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onDocumentClickBound,!0),document.addEventListener("keydown",this._onDocumentKeydownBound)}disconnectedCallback(){document.removeEventListener("click",this._onDocumentClickBound,!0),document.removeEventListener("keydown",this._onDocumentKeydownBound),this._detachSlottedMenuListeners(),this._panelResizeObserver&&(this._panelResizeObserver.disconnect(),this._panelResizeObserver=null),this._panelHeightSyncRaf!==null&&(window.cancelAnimationFrame(this._panelHeightSyncRaf),this._panelHeightSyncRaf=null),this._openSettledTimer!==null&&(window.clearTimeout(this._openSettledTimer),this._openSettledTimer=null),this._menuCloseTimer!==null&&(window.clearTimeout(this._menuCloseTimer),this._menuCloseTimer=null),super.disconnectedCallback()}firstUpdated(e){super.firstUpdated(e),this._syncSlottedMenu(),this._applyPanelVars(),this._applyPanelSizing(),this._applyChevronState(),this._applyInertByOpen(),this._setupPanelResizeObserver(),this._syncPanelMaxHeightByOpen(),this._syncOverflowVisibilityByOpen()}updated(e){super.updated(e),e.has("menuGap")&&this._applyPanelVars(),(e.has("width")||e.has("minWidth")||e.has("maxWidth"))&&this._applyPanelSizing(),e.has("open")&&(this.open||this._closeAllSubMenus(),this._syncSlottedMenuOpen(),this._applyChevronState(),this._applyInertByOpen(),this._syncPanelMaxHeightByOpen(),this._syncOverflowVisibilityByOpen())}_applyPanelVars(){if(this.menuGap==null||String(this.menuGap).trim()===""){this.style.removeProperty("--scb-dropdown-panel-gap");return}this.style.setProperty("--scb-dropdown-panel-gap",this._mapSpacingToken(this.menuGap))}_applyPanelSizing(){const e=this.renderRoot.querySelector(".panel-surface");e&&(this.width&&String(this.width).trim()!==""?e.style.inlineSize=this.width:e.style.removeProperty("inline-size"),this.minWidth&&String(this.minWidth).trim()!==""?e.style.minInlineSize=this.minWidth:e.style.removeProperty("min-inline-size"),this.maxWidth&&String(this.maxWidth).trim()!==""?e.style.maxInlineSize=this.maxWidth:e.style.removeProperty("max-inline-size")),this._slottedMenuEl&&(this.width&&String(this.width).trim()!==""?this._slottedMenuEl.style.inlineSize=this.width:this._slottedMenuEl.style.removeProperty("inline-size"),this.minWidth&&String(this.minWidth).trim()!==""?this._slottedMenuEl.style.minInlineSize=this.minWidth:this._slottedMenuEl.style.removeProperty("min-inline-size"),this.maxWidth&&String(this.maxWidth).trim()!==""?this._slottedMenuEl.style.maxInlineSize=this.maxWidth:this._slottedMenuEl.style.removeProperty("max-inline-size")),this._schedulePanelHeightSync()}_setupPanelResizeObserver(){if(this._panelResizeObserver||typeof ResizeObserver>"u")return;const e=this._panelInnerEl;e&&(this._panelResizeObserver=new ResizeObserver(()=>{this._schedulePanelHeightSync()}),this._panelResizeObserver.observe(e))}_schedulePanelHeightSync(){this._panelHeightSyncRaf===null&&(this._panelHeightSyncRaf=window.requestAnimationFrame(()=>{this._panelHeightSyncRaf=null,this._syncPanelMaxHeightByOpen()}))}_syncPanelMaxHeightByOpen(){const e=this._panelSurfaceEl;if(!e)return;if(this._slottedMenuEl){e.style.removeProperty("--scb-dropdown-panel-current-max-height");return}if(!this.open){e.style.setProperty("--scb-dropdown-panel-current-max-height","0px");return}const t=this._panelInnerEl;if(!t)return;const n=`${Math.ceil(t.scrollHeight)}px`;e.style.getPropertyValue("--scb-dropdown-panel-current-max-height").trim()!==n&&e.style.setProperty("--scb-dropdown-panel-current-max-height",n)}_mapSpacingToken(e){const t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_syncSlottedMenu(){const t=(this._slotEl?.assignedElements({flatten:!0})??[]).find(n=>n.tagName.toLowerCase()==="scb-menu");if(t===this._slottedMenuEl){this._syncSlottedMenuOpen();return}this._detachSlottedMenuListeners(),this._slottedMenuEl=t??null,this._slottedMenuEl&&(this._slottedMenuEl.addEventListener("open",this._onSlottedMenuOpen),this._slottedMenuEl.addEventListener("close",this._onSlottedMenuClose),this._syncSlottedMenuOpen())}_detachSlottedMenuListeners(){this._slottedMenuEl&&(this._slottedMenuEl.removeEventListener("open",this._onSlottedMenuOpen),this._slottedMenuEl.removeEventListener("close",this._onSlottedMenuClose))}_syncSlottedMenuOpen(){if(!this._slottedMenuEl)return;if(this._menuCloseTimer!==null&&(window.clearTimeout(this._menuCloseTimer),this._menuCloseTimer=null),this.open){this._slottedMenuEl.open=!0;return}const e=this._getPanelTransitionMs();if(e<=0){this._slottedMenuEl.open=!1;return}this._menuCloseTimer=window.setTimeout(()=>{this._menuCloseTimer=null,!this.open&&this._slottedMenuEl&&(this._slottedMenuEl.open=!1)},e)}_syncOverflowVisibilityByOpen(){if(this._openSettledTimer!==null&&(window.clearTimeout(this._openSettledTimer),this._openSettledTimer=null),this.removeAttribute("data-open-settled"),!this.open)return;const e=this.renderRoot.querySelector(".panel-surface");if(!e){this.setAttribute("data-open-settled","");return}const t=this._getTransitionMs(e);if(t<=0){this.setAttribute("data-open-settled","");return}this._openSettledTimer=window.setTimeout(()=>{this._openSettledTimer=null,this.open&&this.setAttribute("data-open-settled","")},t)}_getPanelTransitionMs(){const e=this.renderRoot.querySelector(".panel-surface");return e?this._getTransitionMs(e):0}_getTransitionMs(e){const t=getComputedStyle(e),n=t.transitionDuration.split(",").map(a=>a.trim()),s=t.transitionDelay.split(",").map(a=>a.trim()),i=a=>{const h=parseFloat(a);return Number.isFinite(h)?a.endsWith("ms")?h:a.endsWith("s")?h*1e3:h:0},l=Math.max(n.length,s.length);let d=0;for(let a=0;a<l;a+=1){const h=i(n[a]??n[n.length-1]??"0s"),c=i(s[a]??s[s.length-1]??"0s");d=Math.max(d,h+c)}return Math.ceil(d)}_applyInertByOpen(){const e=this.renderRoot.querySelector(".panel");e&&(this.open?(e.removeAttribute("inert"),e.setAttribute("aria-hidden","false"),this._restoreTabIndexesIfNeeded()):(e.setAttribute("inert",""),e.setAttribute("aria-hidden","true"),this._removeTabIndexesIfNeeded()))}_supportsInert(){return"inert"in HTMLElement.prototype}_collectFocusableFromSlot(){const e=this._slotEl;if(!e)return[];const t=e.assignedElements({flatten:!0}),n=[],s=i=>{i instanceof HTMLElement&&i.matches("a,button,input,select,textarea,[tabindex]")&&n.push(i)};return t.forEach(i=>{s(i),i.querySelectorAll?.("a,button,input,select,textarea,[tabindex]").forEach(l=>s(l))}),n}_removeTabIndexesIfNeeded(){if(this._supportsInert())return;this._collectFocusableFromSlot().forEach(t=>{const n=t.getAttribute("tabindex");n!==null&&t.setAttribute("data-scb-prev-tabindex",n),t.setAttribute("tabindex","-1")})}_restoreTabIndexesIfNeeded(){if(this._supportsInert())return;this._collectFocusableFromSlot().forEach(t=>{const n=t.getAttribute("data-scb-prev-tabindex");n!==null?(t.setAttribute("tabindex",n),t.removeAttribute("data-scb-prev-tabindex")):t.removeAttribute("tabindex")})}_closeAllSubMenus(){const e=this.querySelectorAll("scb-sub-menu");for(const t of e)t.removeAttribute("open")}_applyChevronState(){const e=this._getChevronIconEl();e&&(e.style.transition="transform var(--motion-duration-medium, 200ms) var(--motion-easing-standard, ease)",e.style.transformOrigin="center",e.style.transform=this.open?"rotate(180deg)":"rotate(0deg)")}_getChevronIconEl(){const t=this._triggerEl?.shadowRoot;return t?t.querySelector('md-icon[slot="icon"]')??t.querySelector("md-icon"):null}render(){const e=!!this._slottedMenuEl;return b`
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import{a as f,n as p,e as c,i as _,E as m,x as u,t as g}from"../../vendor/vendor.js";import"../../vendor/vendor-material.js";import"../scb-button/scb-button.js";import"../scb-menu/scb-menu.js";import"../scb-menu/scb-menu-item.js";import"../scb-divider/scb-divider.js";import"../scb-menu/scb-sub-menu.js";(function(){try{var e=typeof globalThis<"u"?globalThis:window;if(!e.__scb_ce_guard_installed__){e.__scb_ce_guard_installed__=!0;var t=customElements.define.bind(customElements);customElements.define=function(n,s,i){try{customElements.get(n)||t(n,s,i)}catch(d){var a=String(d||"");if(a.indexOf("already been used")===-1&&a.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var y=Object.defineProperty,v=Object.getOwnPropertyDescriptor,o=(e,t,n,s)=>{for(var i=s>1?void 0:s?v(t,n):t,a=e.length-1,d;a>=0;a--)(d=e[a])&&(i=(s?d(t,n,i):d(i))||i);return s&&i&&y(t,n,i),i};let r=class extends _{constructor(){super(...arguments),this.label="Dropdown",this.variant="filled",this.open=!1,this.disabled=!1,this.menuGap="3",this.width=null,this.minWidth=null,this.maxWidth=null,this.dataIndex=null,this.ariaCurrent=null,this._slottedMenuEl=null,this._openSettledTimer=null,this._menuCloseTimer=null,this._panelResizeObserver=null,this._panelHeightSyncRaf=null,this._onDocumentClickBound=e=>{if(!this.open)return;const t=e.composedPath(),n=t.find(s=>s instanceof HTMLElement&&s.tagName.toLowerCase()==="scb-dropdown");if(n&&n!==this){this.open=!1;return}t.includes(this)||(this.open=!1)},this._onDocumentKeydownBound=e=>{this.open&&e.key==="Escape"&&(this.open=!1)},this._onDrawerSelectBound=e=>{if(!this.open)return;const n=e.detail?.item;if(!n||!!n.querySelector("scb-sub-drawer"))return;const i=n.getAttribute("item-href")?.trim()??"",a=n.getAttribute("href")?.trim()??"";(i!==""||a!=="")&&this._dispatchTabActivate(),this.open=!1},this._onSlottedMenuOpen=()=>{this.open||(this.open=!0)},this._onSlottedMenuClose=()=>{this.open&&(this.open=!1)},this._onSlotChange=()=>{this._syncSlottedMenu(),this._applyPanelSizing(),this._applyInertByOpen(),this.requestUpdate()},this._onTriggerClick=e=>{this.hasAttribute("as-tab")||e.stopPropagation(),!this.disabled&&(this.open=!this.open)}}connectedCallback(){super.connectedCallback(),document.addEventListener("click",this._onDocumentClickBound,!0),document.addEventListener("keydown",this._onDocumentKeydownBound),this.addEventListener("scb-drawer-select",this._onDrawerSelectBound)}disconnectedCallback(){document.removeEventListener("click",this._onDocumentClickBound,!0),document.removeEventListener("keydown",this._onDocumentKeydownBound),this.removeEventListener("scb-drawer-select",this._onDrawerSelectBound),this._detachSlottedMenuListeners(),this._panelResizeObserver&&(this._panelResizeObserver.disconnect(),this._panelResizeObserver=null),this._panelHeightSyncRaf!==null&&(window.cancelAnimationFrame(this._panelHeightSyncRaf),this._panelHeightSyncRaf=null),this._openSettledTimer!==null&&(window.clearTimeout(this._openSettledTimer),this._openSettledTimer=null),this._menuCloseTimer!==null&&(window.clearTimeout(this._menuCloseTimer),this._menuCloseTimer=null),super.disconnectedCallback()}firstUpdated(e){super.firstUpdated(e),this._syncSlottedMenu(),this._applyPanelVars(),this._applyPanelSizing(),this._applyChevronState(),this._applyInertByOpen(),this._setupPanelResizeObserver(),this._syncPanelMaxHeightByOpen(),this._syncOverflowVisibilityByOpen()}updated(e){super.updated(e),e.has("menuGap")&&this._applyPanelVars(),(e.has("width")||e.has("minWidth")||e.has("maxWidth"))&&this._applyPanelSizing(),e.has("open")&&(this.open||this._closeAllSubMenus(),this._syncSlottedMenuOpen(),this._applyChevronState(),this._applyInertByOpen(),this._syncPanelMaxHeightByOpen(),this._syncOverflowVisibilityByOpen())}_applyPanelVars(){if(this.menuGap==null||String(this.menuGap).trim()===""){this.style.removeProperty("--scb-dropdown-panel-gap");return}this.style.setProperty("--scb-dropdown-panel-gap",this._mapSpacingToken(this.menuGap))}_applyPanelSizing(){const e=this.renderRoot.querySelector(".panel-surface");e&&(this.width&&String(this.width).trim()!==""?e.style.inlineSize=this.width:e.style.removeProperty("inline-size"),this.minWidth&&String(this.minWidth).trim()!==""?e.style.minInlineSize=this.minWidth:e.style.removeProperty("min-inline-size"),this.maxWidth&&String(this.maxWidth).trim()!==""?e.style.maxInlineSize=this.maxWidth:e.style.removeProperty("max-inline-size")),this._slottedMenuEl&&(this.width&&String(this.width).trim()!==""?this._slottedMenuEl.style.inlineSize=this.width:this._slottedMenuEl.style.removeProperty("inline-size"),this.minWidth&&String(this.minWidth).trim()!==""?this._slottedMenuEl.style.minInlineSize=this.minWidth:this._slottedMenuEl.style.removeProperty("min-inline-size"),this.maxWidth&&String(this.maxWidth).trim()!==""?this._slottedMenuEl.style.maxInlineSize=this.maxWidth:this._slottedMenuEl.style.removeProperty("max-inline-size")),this._schedulePanelHeightSync()}_setupPanelResizeObserver(){if(this._panelResizeObserver||typeof ResizeObserver>"u")return;const e=this._panelInnerEl;e&&(this._panelResizeObserver=new ResizeObserver(()=>{this._schedulePanelHeightSync()}),this._panelResizeObserver.observe(e))}_schedulePanelHeightSync(){this._panelHeightSyncRaf===null&&(this._panelHeightSyncRaf=window.requestAnimationFrame(()=>{this._panelHeightSyncRaf=null,this._syncPanelMaxHeightByOpen()}))}_syncPanelMaxHeightByOpen(){const e=this._panelSurfaceEl;if(!e)return;if(this._slottedMenuEl){e.style.removeProperty("--scb-dropdown-panel-current-max-height");return}if(!this.open){e.style.setProperty("--scb-dropdown-panel-current-max-height","0px");return}const t=this._panelInnerEl;if(!t)return;const n=`${Math.ceil(t.scrollHeight)}px`;e.style.getPropertyValue("--scb-dropdown-panel-current-max-height").trim()!==n&&e.style.setProperty("--scb-dropdown-panel-current-max-height",n)}_mapSpacingToken(e){const t=String(e).trim();return/^\d+$/.test(t)?`var(--spacing-${Math.max(0,Math.min(14,parseInt(t,10)))})`:t}_syncSlottedMenu(){const t=(this._slotEl?.assignedElements({flatten:!0})??[]).find(n=>n.tagName.toLowerCase()==="scb-menu");if(t===this._slottedMenuEl){this._syncSlottedMenuOpen();return}this._detachSlottedMenuListeners(),this._slottedMenuEl=t??null,this._slottedMenuEl&&(this._slottedMenuEl.addEventListener("open",this._onSlottedMenuOpen),this._slottedMenuEl.addEventListener("close",this._onSlottedMenuClose),this._syncSlottedMenuOpen())}_detachSlottedMenuListeners(){this._slottedMenuEl&&(this._slottedMenuEl.removeEventListener("open",this._onSlottedMenuOpen),this._slottedMenuEl.removeEventListener("close",this._onSlottedMenuClose))}_syncSlottedMenuOpen(){if(!this._slottedMenuEl)return;if(this._menuCloseTimer!==null&&(window.clearTimeout(this._menuCloseTimer),this._menuCloseTimer=null),this.open){this._slottedMenuEl.open=!0;return}const e=this._getPanelTransitionMs();if(e<=0){this._slottedMenuEl.open=!1;return}this._menuCloseTimer=window.setTimeout(()=>{this._menuCloseTimer=null,!this.open&&this._slottedMenuEl&&(this._slottedMenuEl.open=!1)},e)}_syncOverflowVisibilityByOpen(){if(this._openSettledTimer!==null&&(window.clearTimeout(this._openSettledTimer),this._openSettledTimer=null),this.removeAttribute("data-open-settled"),!this.open)return;const e=this.renderRoot.querySelector(".panel-surface");if(!e){this.setAttribute("data-open-settled","");return}const t=this._getTransitionMs(e);if(t<=0){this.setAttribute("data-open-settled","");return}this._openSettledTimer=window.setTimeout(()=>{this._openSettledTimer=null,this.open&&this.setAttribute("data-open-settled","")},t)}_getPanelTransitionMs(){const e=this.renderRoot.querySelector(".panel-surface");return e?this._getTransitionMs(e):0}_getTransitionMs(e){const t=getComputedStyle(e),n=t.transitionDuration.split(",").map(l=>l.trim()),s=t.transitionDelay.split(",").map(l=>l.trim()),i=l=>{const h=parseFloat(l);return Number.isFinite(h)?l.endsWith("ms")?h:l.endsWith("s")?h*1e3:h:0},a=Math.max(n.length,s.length);let d=0;for(let l=0;l<a;l+=1){const h=i(n[l]??n[n.length-1]??"0s"),b=i(s[l]??s[s.length-1]??"0s");d=Math.max(d,h+b)}return Math.ceil(d)}_applyInertByOpen(){const e=this.renderRoot.querySelector(".panel");e&&(this.open?(e.removeAttribute("inert"),e.setAttribute("aria-hidden","false"),this._restoreTabIndexesIfNeeded()):(e.setAttribute("inert",""),e.setAttribute("aria-hidden","true"),this._removeTabIndexesIfNeeded()))}_supportsInert(){return"inert"in HTMLElement.prototype}_collectFocusableFromSlot(){const e=this._slotEl;if(!e)return[];const t=e.assignedElements({flatten:!0}),n=[],s=i=>{i instanceof HTMLElement&&i.matches("a,button,input,select,textarea,[tabindex]")&&n.push(i)};return t.forEach(i=>{s(i),i.querySelectorAll?.("a,button,input,select,textarea,[tabindex]").forEach(a=>s(a))}),n}_removeTabIndexesIfNeeded(){if(this._supportsInert())return;this._collectFocusableFromSlot().forEach(t=>{const n=t.getAttribute("tabindex");n!==null&&t.setAttribute("data-scb-prev-tabindex",n),t.setAttribute("tabindex","-1")})}_restoreTabIndexesIfNeeded(){if(this._supportsInert())return;this._collectFocusableFromSlot().forEach(t=>{const n=t.getAttribute("data-scb-prev-tabindex");n!==null?(t.setAttribute("tabindex",n),t.removeAttribute("data-scb-prev-tabindex")):t.removeAttribute("tabindex")})}_closeAllSubMenus(){const e=this.querySelectorAll("scb-sub-menu");for(const t of e)t.removeAttribute("open")}focus(e){const t=this._triggerEl;if(t?.focus){t.focus(e);return}super.focus(e)}_dispatchTabActivate(){this.hasAttribute("as-tab")&&this.dispatchEvent(new CustomEvent("scb-dropdown-tab-activate",{bubbles:!0,composed:!0,detail:{dataIndex:this.dataIndex}}))}_applyChevronState(){if(this.hasAttribute("as-tab"))return;const e=this._getChevronIconEl();e&&(e.style.transition="transform var(--motion-duration-medium, 200ms) var(--motion-easing-standard, ease)",e.style.transformOrigin="center",e.style.transform=this.open?"rotate(180deg)":"rotate(0deg)")}_getChevronIconEl(){const e=this._triggerEl;if(e?.tagName?.toLowerCase?.()!=="scb-button")return null;const t=e?.shadowRoot;return t?t.querySelector('md-icon[slot="icon"]')??t.querySelector("md-icon"):null}render(){const e=!!this._slottedMenuEl,t=this.hasAttribute("as-tab"),n=this.dataIndex,i=this.ariaCurrent==="page"?"page":m,a=t?u`
|
|
2
|
+
<div class="tab-wrap">
|
|
3
|
+
<button
|
|
4
|
+
type="button"
|
|
5
|
+
class="tab-link"
|
|
6
|
+
data-scb-dropdown-trigger
|
|
7
|
+
?disabled=${this.disabled}
|
|
8
|
+
aria-haspopup="menu"
|
|
9
|
+
aria-expanded=${String(this.open)}
|
|
10
|
+
data-index=${n??m}
|
|
11
|
+
aria-current=${i}
|
|
12
|
+
@click=${this._onTriggerClick}
|
|
13
|
+
>
|
|
14
|
+
${this.label}
|
|
15
|
+
<md-icon class="chevron" aria-hidden="true">keyboard_arrow_down</md-icon>
|
|
16
|
+
</button>
|
|
17
|
+
<md-focus-ring></md-focus-ring>
|
|
18
|
+
</div>
|
|
19
|
+
`:u`
|
|
20
|
+
<scb-button
|
|
21
|
+
data-scb-dropdown-trigger
|
|
22
|
+
label=${this.label}
|
|
23
|
+
variant=${this.variant}
|
|
24
|
+
icon="keyboard_arrow_down"
|
|
25
|
+
?trailing-icon=${!0}
|
|
26
|
+
?disabled=${this.disabled}
|
|
27
|
+
@click=${this._onTriggerClick}
|
|
28
|
+
></scb-button>
|
|
29
|
+
`;return u`
|
|
30
|
+
${a}
|
|
10
31
|
|
|
11
32
|
<div
|
|
12
33
|
class="panel ${e?"has-menu":""}"
|
|
@@ -19,7 +40,7 @@ import{a as m,n as p,e as u,i as f,x as b,t as _}from"../../vendor/vendor.js";im
|
|
|
19
40
|
</div>
|
|
20
41
|
</div>
|
|
21
42
|
</div>
|
|
22
|
-
`}};r.styles=
|
|
43
|
+
`}};r.styles=f`
|
|
23
44
|
:host {
|
|
24
45
|
display: inline-block;
|
|
25
46
|
position: relative;
|
|
@@ -54,10 +75,10 @@ import{a as m,n as p,e as u,i as f,x as b,t as _}from"../../vendor/vendor.js";im
|
|
|
54
75
|
.panel-surface {
|
|
55
76
|
width: 100%;
|
|
56
77
|
max-width: var(--scb-dropdown-panel-max-width, 600px);
|
|
57
|
-
background: var(--md-sys-color-surface
|
|
78
|
+
background: var(--md-sys-color-surface-container-lowest);
|
|
58
79
|
box-shadow: var(--elevation-2, 0px 2px 10px rgba(0, 0, 0, 0.12));
|
|
59
|
-
padding-right: var(--spacing-
|
|
60
|
-
padding-left: var(--spacing-
|
|
80
|
+
padding-right: var(--spacing-2, 4px);
|
|
81
|
+
padding-left: var(--spacing-2, 4px);
|
|
61
82
|
opacity: 0;
|
|
62
83
|
max-height: var(--scb-dropdown-panel-current-max-height, 0px);
|
|
63
84
|
transition:
|
|
@@ -66,33 +87,56 @@ import{a as m,n as p,e as u,i as f,x as b,t as _}from"../../vendor/vendor.js";im
|
|
|
66
87
|
overflow: hidden;
|
|
67
88
|
}
|
|
68
89
|
|
|
69
|
-
|
|
70
|
-
display:
|
|
90
|
+
:host([as-tab]) {
|
|
91
|
+
display: inline-flex;
|
|
92
|
+
align-items: stretch;
|
|
71
93
|
}
|
|
72
94
|
|
|
73
|
-
:host([as-tab]) .tab-
|
|
95
|
+
:host([as-tab]) .tab-wrap {
|
|
74
96
|
position: relative;
|
|
75
|
-
display:
|
|
97
|
+
display: inline-flex;
|
|
98
|
+
align-items: stretch;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
:host([as-tab]) .tab-wrap md-focus-ring {
|
|
102
|
+
position: absolute;
|
|
103
|
+
inset-block: var(--spacing-1, 2px);
|
|
104
|
+
inset-inline: var(--spacing-neg-2, -4px);
|
|
105
|
+
pointer-events: none;
|
|
106
|
+
display: none;
|
|
107
|
+
border-radius: 5px;
|
|
76
108
|
}
|
|
77
109
|
|
|
78
110
|
:host([as-tab]) .tab-link {
|
|
79
111
|
position: relative;
|
|
80
|
-
border: none;
|
|
81
|
-
background: transparent;
|
|
82
|
-
padding: var(--spacing-5, 16px) var(--spacing-5, 16px);
|
|
83
|
-
border-radius: var(--md-sys-shape-corner-extra-small)
|
|
84
|
-
var(--md-sys-shape-corner-extra-small) 0 0;
|
|
85
|
-
font-size: var(--md-sys-typescale-title-medium-size);
|
|
86
|
-
line-height: var(--md-sys-typescale-title-medium-line-height);
|
|
87
|
-
font-weight: var(--md-sys-typescale-title-medium-weight);
|
|
88
|
-
letter-spacing: var(--md-sys-typescale-title-medium-tracking);
|
|
89
|
-
color: var(--md-sys-color-on-surface);
|
|
90
|
-
cursor: pointer;
|
|
91
112
|
display: inline-flex;
|
|
92
113
|
align-items: center;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
padding-block: var(--spacing-4, 12px);
|
|
116
|
+
padding: 0;
|
|
117
|
+
border: none;
|
|
118
|
+
background: none;
|
|
119
|
+
text-decoration: none;
|
|
120
|
+
cursor: pointer;
|
|
121
|
+
font-family: var(
|
|
122
|
+
--md-sys-typescale-title-small-font,
|
|
123
|
+
var(--brand-font, Inter)
|
|
124
|
+
);
|
|
125
|
+
font-size: var(--md-sys-typescale-title-small-size, 1rem);
|
|
126
|
+
line-height: var(--md-sys-typescale-title-small-line-height, 1.5rem);
|
|
127
|
+
font-weight: var(--md-sys-typescale-title-small-weight, 500);
|
|
128
|
+
letter-spacing: var(--md-sys-typescale-title-small-tracking, 0);
|
|
129
|
+
color: var(--md-sys-color-on-surface);
|
|
130
|
+
white-space: nowrap;
|
|
131
|
+
border-radius: 0;
|
|
132
|
+
outline: none;
|
|
93
133
|
gap: var(--spacing-3, 8px);
|
|
94
134
|
}
|
|
95
135
|
|
|
136
|
+
:host([as-tab]) .tab-link[aria-current='page'] {
|
|
137
|
+
color: var(--md-sys-color-primary);
|
|
138
|
+
}
|
|
139
|
+
|
|
96
140
|
:host([as-tab]) .tab-link::after {
|
|
97
141
|
content: '';
|
|
98
142
|
position: absolute;
|
|
@@ -108,20 +152,13 @@ import{a as m,n as p,e as u,i as f,x as b,t as _}from"../../vendor/vendor.js";im
|
|
|
108
152
|
background-color: var(--md-sys-color-primary);
|
|
109
153
|
}
|
|
110
154
|
|
|
111
|
-
:host([as-tab]) md-focus-ring {
|
|
112
|
-
position: absolute;
|
|
113
|
-
inset: -4px;
|
|
114
|
-
border-radius: var(--md-sys-shape-corner-extra-small)
|
|
115
|
-
var(--md-sys-shape-corner-extra-small) 0 0;
|
|
116
|
-
display: none;
|
|
117
|
-
pointer-events: none;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
155
|
:host([as-tab]) .tab-link:focus-visible + md-focus-ring {
|
|
121
156
|
display: block;
|
|
122
157
|
}
|
|
123
158
|
|
|
124
159
|
:host([as-tab]) md-icon.chevron {
|
|
160
|
+
font-size: var(--icon-size-small, 20px);
|
|
161
|
+
line-height: 1;
|
|
125
162
|
transition:
|
|
126
163
|
transform var(--motion-duration-medium, 200ms)
|
|
127
164
|
var(--motion-easing-standard, ease);
|
|
@@ -172,6 +209,7 @@ import{a as m,n as p,e as u,i as f,x as b,t as _}from"../../vendor/vendor.js";im
|
|
|
172
209
|
|
|
173
210
|
::slotted(scb-drawer) {
|
|
174
211
|
padding: 0;
|
|
212
|
+
background: var(--md-sys-color-surface-container-lowest);
|
|
175
213
|
}
|
|
176
214
|
|
|
177
215
|
::slotted(scb-checkbox) {
|
|
@@ -189,4 +227,4 @@ import{a as m,n as p,e as u,i as f,x as b,t as _}from"../../vendor/vendor.js";im
|
|
|
189
227
|
transition: none;
|
|
190
228
|
}
|
|
191
229
|
}
|
|
192
|
-
`;o([p({type:String})],r.prototype,"label",2);o([p({type:String})],r.prototype,"variant",2);o([p({type:Boolean,reflect:!0})],r.prototype,"open",2);o([p({type:Boolean,reflect:!0})],r.prototype,"disabled",2);o([p({type:String,attribute:"menu-gap"})],r.prototype,"menuGap",2);o([p({type:String})],r.prototype,"width",2);o([p({type:String,attribute:"min-width"})],r.prototype,"minWidth",2);o([p({type:String,attribute:"max-width"})],r.prototype,"maxWidth",2);o([
|
|
230
|
+
`;o([p({type:String})],r.prototype,"label",2);o([p({type:String})],r.prototype,"variant",2);o([p({type:Boolean,reflect:!0})],r.prototype,"open",2);o([p({type:Boolean,reflect:!0})],r.prototype,"disabled",2);o([p({type:String,attribute:"menu-gap"})],r.prototype,"menuGap",2);o([p({type:String})],r.prototype,"width",2);o([p({type:String,attribute:"min-width"})],r.prototype,"minWidth",2);o([p({type:String,attribute:"max-width"})],r.prototype,"maxWidth",2);o([p({type:String,attribute:"data-index"})],r.prototype,"dataIndex",2);o([p({type:String,attribute:"aria-current"})],r.prototype,"ariaCurrent",2);o([c("[data-scb-dropdown-trigger]")],r.prototype,"_triggerEl",2);o([c("slot")],r.prototype,"_slotEl",2);o([c(".panel-surface")],r.prototype,"_panelSurfaceEl",2);o([c(".panel-inner")],r.prototype,"_panelInnerEl",2);r=o([g("scb-dropdown")],r);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{a as c,n as
|
|
1
|
+
import{a as c,n as d,i as p,x as _,t as f}from"../../vendor/vendor.js";(function(){try{var a=typeof globalThis<"u"?globalThis:window;if(!a.__scb_ce_guard_installed__){a.__scb_ce_guard_installed__=!0;var r=customElements.define.bind(customElements);customElements.define=function(t,s,e){try{customElements.get(t)||r(t,s,e)}catch(i){var n=String(i||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var u=Object.defineProperty,b=Object.getOwnPropertyDescriptor,l=(a,r,t,s)=>{for(var e=s>1?void 0:s?b(r,t):r,n=a.length-1,i;n>=0;n--)(i=a[n])&&(e=(s?i(r,t,e):i(e))||e);return s&&e&&u(r,t,e),e};let o=class extends p{constructor(){super(...arguments),this.label="",this.href="",this.drawerId=""}render(){return _`<slot></slot>`}};o.styles=c`
|
|
2
2
|
:host {
|
|
3
3
|
display: none !important;
|
|
4
4
|
}
|
|
5
|
-
`;l([
|
|
5
|
+
`;l([d({type:String})],o.prototype,"label",2);l([d({type:String})],o.prototype,"href",2);l([d({type:String,attribute:"drawer-id"})],o.prototype,"drawerId",2);o=l([f("scb-header-tab")],o);
|