scb-wc 0.1.213 → 0.1.214

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.
@@ -1,28 +1,25 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../../vendor/ripple.js","../../vendor/rolldown-runtime.js","../../vendor/vendor.js","../../vendor/vendor-lit.js","../../vendor/attachable-controller.js","../../vendor/md-focus-ring.js","../../vendor/icon.js"])))=>i.map(i=>d[i]);
2
- import{f as g,g as r,h as v,m as _,p as a,v as u,y as f}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as b}from"../../vendor/preload-helper.js";import{t as s}from"../../vendor/decorate.js";import"../scb-chevron/scb-chevron.js";(function(){try{var l=typeof globalThis<"u"?globalThis:window;if(!l.__scb_ce_guard_installed__){l.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,i,c){try{customElements.get(t)||e(t,i,c)}catch(h){var o=String(h||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var m,d,p={fromAttribute:l=>l==null?!1:!/^(false|0|off|no)$/i.test(l),toAttribute:l=>l?"":null},n=(m=class extends v{constructor(...e){super(...e),this.label="",this.selected=!1,this.noHighlightSelected=!1,this.leadingIcon="",this.itemHref="",this.hasChildren=!1,this.loading=!1,this.showSubmenuLabel="Visa undermeny för",this.hideSubmenuLabel="Dölj undermeny för",this.loadingLabel="Laddar…",this.hasSlotContent=!1,this.expanded=!1,this.__submenuId=`sub-${Math.random().toString(36).slice(2)}`,this.__focusId=`f-${Math.random().toString(36).slice(2)}`,this._toggleExpand=t=>{t&&t.stopPropagation(),this.__isExpandable&&this.__setExpanded(!this.expanded)},this._onButtonClick=t=>{t.stopPropagation(),this._dispatchSelect(),this._toggleExpand()},this._onLinkClick=()=>{this._dispatchSelect()},this._onKeyDown=t=>{const i=this.__keyboardItems(),c=i.indexOf(this);switch(t.key){case"ArrowDown":{t.preventDefault();const o=i[c+1]||i[0];this.__focusMenuItem(o);break}case"ArrowUp":{t.preventDefault();const o=i[c-1]||i[i.length-1];this.__focusMenuItem(o);break}case"Home":{t.preventDefault();const o=i[0];this.__focusMenuItem(o);break}case"End":{t.preventDefault();const o=i[i.length-1];this.__focusMenuItem(o);break}case"ArrowRight":if(!this.__isExpandable)break;t.preventDefault(),this.expanded||this.__setExpanded(!0);break;case"ArrowLeft":if(!this.__isExpandable)break;t.preventDefault(),this.expanded&&this.__setExpanded(!1);break}}}get __submenuEl(){return this.renderRoot.querySelector(`#${this.__submenuId}`)}get __isExpandable(){return this.hasSlotContent||this.hasChildren}__submenuButtonLabel(){const e=this.expanded?this.hideSubmenuLabel:this.showSubmenuLabel;return this.label?`${e} ${this.label}`:e}async __ensureDepsLoaded(){d.__rippleLoaded||(await b(()=>import("../../vendor/ripple.js").then(e=>e.t),__vite__mapDeps([0,1,2,3,4]),import.meta.url),d.__rippleLoaded=!0),d.__focusRingLoaded||(await b(()=>import("../../vendor/md-focus-ring.js").then(e=>e.t),__vite__mapDeps([5,1,2,3,4]),import.meta.url),d.__focusRingLoaded=!0),this.leadingIcon&&!d.__iconLoaded&&(await b(()=>import("../../vendor/icon.js").then(e=>e.t),__vite__mapDeps([6,1,2,3]),import.meta.url),d.__iconLoaded=!0)}__syncHasSlotContentFromLightDom(){const e=Array.from(this.children);this.hasSlotContent=e.some(t=>t.tagName==="SCB-SUB-MENU")}connectedCallback(){super.connectedCallback(),this.__syncHasSlotContentFromLightDom()}_onSlotChange(e){const t=e.target.assignedElements({flatten:!0});this.hasSlotContent=t.some(i=>i.tagName==="SCB-SUB-MENU")}__setExpanded(e){if(!this.__isExpandable)return;this.expanded=e;const t={item:this,expanded:e,hasChildren:this.hasChildren,hasSlotContent:this.hasSlotContent,loading:this.loading,lazy:this.hasChildren&&!this.hasSlotContent};this.dispatchEvent(new CustomEvent("scb-menu-expand",{bubbles:!0,composed:!0,detail:t})),this.dispatchEvent(new CustomEvent("scbmenuexpand",{bubbles:!0,composed:!0,detail:t}))}_dispatchSelect(){this.dispatchEvent(new CustomEvent("scb-menu-select",{bubbles:!0,composed:!0,detail:{item:this}})),this.dispatchEvent(new CustomEvent("scbmenuselect",{bubbles:!0,composed:!0,detail:{item:this}}))}async firstUpdated(){await this.__ensureDepsLoaded(),this.__applyInert()}updated(e){e.has("leadingIcon")&&this.leadingIcon&&this.__ensureDepsLoaded(),(e.has("hasSlotContent")&&this.hasSlotContent||e.has("hasChildren")&&this.hasChildren||e.has("loading")&&this.loading)&&this.__ensureDepsLoaded(),(e.has("expanded")||e.has("hasChildren")||e.has("loading"))&&this.__applyInert()}__applyInert(){const e=this.__submenuEl;e&&(this.loading?e.setAttribute("aria-busy","true"):e.removeAttribute("aria-busy"),this.expanded?(e.removeAttribute("inert"),e.setAttribute("aria-hidden","false")):(e.setAttribute("inert",""),e.setAttribute("aria-hidden","true")))}render(){const e=!!this.leadingIcon,t=!!this.itemHref,i=this.__isExpandable;return u`
2
+ import{f as g,g as r,h as v,m as _,p as a,v as d,y as f}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import{t as b}from"../../vendor/preload-helper.js";import{t as s}from"../../vendor/decorate.js";import"../scb-chevron/scb-chevron.js";(function(){try{var l=typeof globalThis<"u"?globalThis:window;if(!l.__scb_ce_guard_installed__){l.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(t,i,u){try{customElements.get(t)||e(t,i,u)}catch(h){var o=String(h||"");if(o.indexOf("already been used")===-1&&o.indexOf("NotSupportedError")===-1)throw h}}}}catch{}})();var m,c,p={fromAttribute:l=>l==null?!1:!/^(false|0|off|no)$/i.test(l),toAttribute:l=>l?"":null},n=(m=class extends v{constructor(...e){super(...e),this.label="",this.selected=!1,this.noHighlightSelected=!1,this.leadingIcon="",this.itemHref="",this.hasChildren=!1,this.loading=!1,this.showSubmenuLabel="Visa undermeny för",this.hideSubmenuLabel="Dölj undermeny för",this.loadingLabel="Laddar…",this.hasSlotContent=!1,this.expanded=!1,this.__submenuId=`sub-${Math.random().toString(36).slice(2)}`,this.__focusId=`f-${Math.random().toString(36).slice(2)}`,this._toggleExpand=t=>{t&&t.stopPropagation(),this.__isExpandable&&this.__setExpanded(!this.expanded)},this._onButtonClick=t=>{t.stopPropagation(),this._dispatchSelect(),this._toggleExpand()},this._onLinkClick=()=>{this._dispatchSelect()},this._onKeyDown=t=>{const i=this.__keyboardItems(),u=i.indexOf(this);switch(t.key){case"ArrowDown":{t.preventDefault();const o=i[u+1]||i[0];this.__focusMenuItem(o);break}case"ArrowUp":{t.preventDefault();const o=i[u-1]||i[i.length-1];this.__focusMenuItem(o);break}case"Home":{t.preventDefault();const o=i[0];this.__focusMenuItem(o);break}case"End":{t.preventDefault();const o=i[i.length-1];this.__focusMenuItem(o);break}case"ArrowRight":if(!this.__isExpandable)break;t.preventDefault(),this.expanded||this.__setExpanded(!0);break;case"ArrowLeft":if(!this.__isExpandable)break;t.preventDefault(),this.expanded&&this.__setExpanded(!1);break}}}get __submenuEl(){return this.renderRoot.querySelector(`#${this.__submenuId}`)}get __isExpandable(){return this.hasSlotContent||this.hasChildren}__submenuButtonLabel(){const e=this.expanded?this.hideSubmenuLabel:this.showSubmenuLabel;return this.label?`${e} ${this.label}`:e}async __ensureDepsLoaded(){c.__rippleLoaded||(await b(()=>import("../../vendor/ripple.js").then(e=>e.t),__vite__mapDeps([0,1,2,3,4]),import.meta.url),c.__rippleLoaded=!0),c.__focusRingLoaded||(await b(()=>import("../../vendor/md-focus-ring.js").then(e=>e.t),__vite__mapDeps([5,1,2,3,4]),import.meta.url),c.__focusRingLoaded=!0),this.leadingIcon&&!c.__iconLoaded&&(await b(()=>import("../../vendor/icon.js").then(e=>e.t),__vite__mapDeps([6,1,2,3]),import.meta.url),c.__iconLoaded=!0)}__syncHasSlotContentFromLightDom(){const e=Array.from(this.children);this.hasSlotContent=e.some(t=>t.tagName==="SCB-SUB-MENU")}connectedCallback(){super.connectedCallback(),this.__syncHasSlotContentFromLightDom()}_onSlotChange(e){const t=e.target.assignedElements({flatten:!0});this.hasSlotContent=t.some(i=>i.tagName==="SCB-SUB-MENU")}__setExpanded(e){if(!this.__isExpandable)return;this.expanded=e;const t={item:this,expanded:e,hasChildren:this.hasChildren,hasSlotContent:this.hasSlotContent,loading:this.loading,lazy:this.hasChildren&&!this.hasSlotContent};this.dispatchEvent(new CustomEvent("scb-menu-expand",{bubbles:!0,composed:!0,detail:t})),this.dispatchEvent(new CustomEvent("scbmenuexpand",{bubbles:!0,composed:!0,detail:t}))}_dispatchSelect(){this.dispatchEvent(new CustomEvent("scb-menu-select",{bubbles:!0,composed:!0,detail:{item:this}})),this.dispatchEvent(new CustomEvent("scbmenuselect",{bubbles:!0,composed:!0,detail:{item:this}}))}async firstUpdated(){await this.__ensureDepsLoaded(),this.__applyInert()}updated(e){e.has("leadingIcon")&&this.leadingIcon&&this.__ensureDepsLoaded(),(e.has("hasSlotContent")&&this.hasSlotContent||e.has("hasChildren")&&this.hasChildren||e.has("loading")&&this.loading)&&this.__ensureDepsLoaded(),(e.has("expanded")||e.has("hasChildren")||e.has("loading"))&&this.__applyInert()}__applyInert(){const e=this.__submenuEl;e&&(this.loading?e.setAttribute("aria-busy","true"):e.removeAttribute("aria-busy"),this.expanded?(e.removeAttribute("inert"),e.setAttribute("aria-hidden","false")):(e.setAttribute("inert",""),e.setAttribute("aria-hidden","true")))}render(){const e=!!this.leadingIcon,t=!!this.itemHref,i=this.__isExpandable;return d`
3
3
  <div class="scb-menu-item">
4
4
  <div class="scb-menu-item-label" ?selected=${this.selected} ?no-highlight-selected=${this.noHighlightSelected}>
5
- ${t?u`
5
+ ${t?d`
6
6
  <a
7
7
  id=${this.__focusId}
8
8
  class="scb-menu-label-text"
9
9
  aria-label="${this.label}"
10
10
  href="${this.itemHref}"
11
11
  aria-current=${this.selected?"page":r}
12
- aria-expanded=${i?String(this.expanded):r}
13
- aria-controls=${i?this.__submenuId:r}
14
- aria-busy=${i&&this.loading?"true":r}
15
12
  @click=${this._onLinkClick}
16
13
  @keydown=${this._onKeyDown}
17
14
  >
18
15
  <span class="scb-menu-click ${e?"has-icon":""}">
19
16
  <md-ripple></md-ripple>
20
- ${e?u`<md-icon>${this.leadingIcon}</md-icon>`:""}
17
+ ${e?d`<md-icon>${this.leadingIcon}</md-icon>`:""}
21
18
  ${this.label}
22
19
  </span>
23
20
  </a>
24
21
  <md-focus-ring for=${this.__focusId} inward></md-focus-ring>
25
- `:u`
22
+ `:d`
26
23
  <button
27
24
  id=${this.__focusId}
28
25
  type="button"
@@ -35,24 +32,26 @@ import{f as g,g as r,h as v,m as _,p as a,v as u,y as f}from"../../vendor/vendor
35
32
  >
36
33
  <span class="scb-menu-click ${e?"has-icon":""}">
37
34
  <md-ripple></md-ripple>
38
- ${e?u`<md-icon>${this.leadingIcon}</md-icon>`:""}
35
+ ${e?d`<md-icon>${this.leadingIcon}</md-icon>`:""}
39
36
  ${this.label}
40
37
  </span>
41
38
  </button>
42
39
  <md-focus-ring for=${this.__focusId} inward></md-focus-ring>
43
40
  `}
44
- ${i?u`
41
+ ${i?d`
45
42
  <button
46
43
  class="menu-chevron-button"
47
44
  type="button"
48
45
  aria-label=${this.__submenuButtonLabel()}
49
46
  aria-expanded=${String(this.expanded)}
50
47
  aria-controls=${this.__submenuId}
51
- tabindex="-1"
52
- @click=${c=>{c.stopPropagation(),this._toggleExpand(c)}}
48
+ aria-busy=${this.loading?"true":r}
49
+ tabindex=${t?r:"-1"}
50
+ @click=${u=>{u.stopPropagation(),this._toggleExpand(u)}}
53
51
  >
54
52
  <md-ripple></md-ripple>
55
53
  <scb-chevron class="menu-chevron" .open=${this.expanded}></scb-chevron>
54
+ ${t?d`<md-focus-ring inward></md-focus-ring>`:r}
56
55
  </button>
57
56
  `:""}
58
57
  </div>
@@ -66,11 +65,11 @@ import{f as g,g as r,h as v,m as _,p as a,v as u,y as f}from"../../vendor/vendor
66
65
  >
67
66
  <div class="submenu__inner">
68
67
  <slot @slotchange=${this._onSlotChange}></slot>
69
- ${this.loading?u`<div class="submenu-loading" role="status">${this.loadingLabel}</div>`:r}
68
+ ${this.loading?d`<div class="submenu-loading" role="status">${this.loadingLabel}</div>`:r}
70
69
  </div>
71
70
  </div>
72
71
  </div>
73
- `}__isHiddenByCollapsedAncestor(e,t){let i=e.parentElement;for(;i&&i!==t;){if(i.localName==="scb-menu-item"&&!i.expanded)return!0;i=i.parentElement}return!1}__keyboardItems(){const e=this.closest("scb-sub-menu, scb-menu");return e?Array.from(e.querySelectorAll("scb-menu-item")).filter(t=>!this.__isHiddenByCollapsedAncestor(t,e)):[this]}__focusMenuItem(e){e?.shadowRoot?.querySelector(".scb-menu-label-text")?.focus()}},d=m,m.__rippleLoaded=!1,m.__iconLoaded=!1,m.__focusRingLoaded=!1,m.styles=f`@keyframes scb-menu-loading-spin{to{transform:rotate(1turn)}}:host{--scb-menu-sub-transition-duration:var(--scb-motion-duration-quick, 150ms);--scb-menu-sub-transition-easing:var(--scb-motion-easing-standard, cubic-bezier(.69,.16,.2,.98));--scb-menu-chevron-transition-duration:var(--motion-duration-medium, 150ms);--scb-menu-chevron-transition-easing:var(
72
+ `}__isHiddenByCollapsedAncestor(e,t){let i=e.parentElement;for(;i&&i!==t;){if(i.localName==="scb-menu-item"&&!i.expanded)return!0;i=i.parentElement}return!1}__keyboardItems(){const e=this.closest("scb-sub-menu, scb-menu");return e?Array.from(e.querySelectorAll("scb-menu-item")).filter(t=>!this.__isHiddenByCollapsedAncestor(t,e)):[this]}__focusMenuItem(e){e?.shadowRoot?.querySelector(".scb-menu-label-text")?.focus()}},c=m,m.__rippleLoaded=!1,m.__iconLoaded=!1,m.__focusRingLoaded=!1,m.styles=f`@keyframes scb-menu-loading-spin{to{transform:rotate(1turn)}}:host{--scb-menu-sub-transition-duration:var(--scb-motion-duration-quick, 150ms);--scb-menu-sub-transition-easing:var(--scb-motion-easing-standard, cubic-bezier(.69,.16,.2,.98));--scb-menu-chevron-transition-duration:var(--motion-duration-medium, 150ms);--scb-menu-chevron-transition-easing:var(
74
73
  --motion-easing-emphasized-accelerate,
75
74
  var(--motion-easing-emphasized, cubic-bezier(.69,.16,.2,.98))
76
75
  );--scb-menu-item-padding-y:var(--scb-navigation-item-padding-block, var(--scale-02, 14px));--scb-menu-item-padding-x:var(--scb-navigation-item-padding-inline, var(--scale-05, 20px));--scb-menu-item-padding-x-has-icon:var(--scb-navigation-item-padding-inline-with-icon, var(--spacing-4, 12px));--scb-menu-item-radius:var(--scb-navigation-item-radius, 28px);--scb-menu-item-gap:var(--scb-navigation-item-gap, var(--spacing-4, 12px));--scb-menu-item-text-font-family:var(--scb-navigation-text-font, var(--scb-typography-body-medium-font, var(--md-sys-typescale-body-medium-font)));--scb-menu-item-text-font-size:var(--scb-navigation-text-size, var(--scb-typography-body-medium-size, var(--md-sys-typescale-body-medium-size)));--scb-menu-item-text-line-height:var(--scb-navigation-text-line-height, var(--scb-typography-body-medium-line-height, var(--md-sys-typescale-body-medium-line-height)));--scb-menu-item-text-letter-spacing:var(--scb-navigation-text-letter-spacing, var(--scb-typography-body-medium-tracking, var(--md-sys-typescale-body-medium-tracking)));--scb-menu-item-text-font-weight:var(--scb-navigation-text-font-weight, var(--scb-typography-body-medium-weight, var(--md-sys-typescale-body-medium-weight, var(--weight-regular, 400))))}:host([expanded]){--scb-menu-chevron-transition-easing:var(
@@ -78,4 +77,4 @@ import{f as g,g as r,h as v,m as _,p as a,v as u,y as f}from"../../vendor/vendor
78
77
  var(--motion-easing-emphasized, cubic-bezier(.69,.16,.2,.98))
79
78
  )}.scb-menu-item-label{display:flex;align-items:center;position:relative}.scb-menu-label-text{width:100%;display:block;background:0 0;border:0;text-align:left;font-family:var(--scb-menu-item-text-font-family, var(--brand-font, var(--brand, "Inter"), sans-serif));font-size:var(--scb-menu-item-text-font-size);line-height:var(--scb-menu-item-text-line-height);font-weight:var(--scb-menu-item-text-font-weight);letter-spacing:var(--scb-menu-item-text-letter-spacing);color:inherit;text-decoration:none;cursor:pointer;padding:0;margin:0;appearance:none;-webkit-appearance:none;box-sizing:border-box;outline:0;-webkit-tap-highlight-color:transparent}.scb-menu-label-text:focus,.scb-menu-label-text:focus-visible{outline:0}.scb-menu-label-text:-moz-focusring{outline:0}.scb-menu-click,.scb-menu-click.has-icon{padding-block:var(--scb-menu-item-padding-y)}.scb-menu-click{display:flex;align-items:center;gap:var(--scb-menu-item-gap);padding-inline:var(--scb-menu-item-padding-x);border-radius:var(--scb-menu-item-radius);position:relative;overflow:hidden;color:var(--scb-menu-panel-content-color, var(--md-sys-color-on-surface))}.scb-menu-click.has-icon{padding-inline:var(--scb-menu-item-padding-x-has-icon)}.scb-menu-click md-icon{--md-icon-size:var(--scb-menu-leading-icon-size, var(--scb-navigation-icon-size, var(--icon-size-medium, 24px)))}.scb-menu-click md-ripple{--md-ripple-focus-opacity:0}.scb-menu-item-label[selected]:not([no-highlight-selected]) .scb-menu-click,:host([selected]):not([no-highlight-selected]) .scb-menu-click{color:var(--scb-menu-selected-content-color, var(--md-sys-color-on-secondary-container));background:var(--scb-menu-selected-container-color, var(--md-sys-color-secondary-container))}.scb-menu-item-label[selected]:not([no-highlight-selected]) .scb-menu-label-text,:host([selected]):not([no-highlight-selected]) .scb-menu-label-text{font-weight:var(--scb-menu-item-selected-font-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight, var(--weight-semibold, 600))))}.menu-chevron-button{margin-left:auto;flex:0 0 auto;position:relative;display:inline-flex;align-items:center;justify-content:center;inline-size:var(--scb-menu-chevron-button-size, var(--scb-navigation-chevron-button-size, 48px));block-size:var(--scb-menu-chevron-button-size, var(--scb-navigation-chevron-button-size, 48px));padding:0;border:0;border-radius:var(--radius-full, 1000px);background:0 0;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}.menu-chevron-button:focus{outline:0}.menu-chevron-button md-ripple{border-radius:inherit}.menu-chevron{--scb-chevron-size:var(--scb-menu-chevron-size, var(--scb-navigation-chevron-size, var(--icon-size-medium, 24px)))}:host([loading]) .menu-chevron-button{cursor:progress}:host([loading]) .menu-chevron{opacity:.7}.submenu{display:grid;grid-template-rows:0fr;transition:grid-template-rows var(--scb-menu-sub-transition-duration) var(--scb-menu-sub-transition-easing),opacity var(--scb-menu-sub-transition-duration) var(--scb-menu-sub-transition-easing);opacity:0;padding-left:var(--scb-navigation-submenu-padding-inline, var(--spacing-5, 16px))}.submenu.expanded{grid-template-rows:1fr;opacity:1}.submenu,.submenu__inner{overflow:hidden}.submenu-loading{display:flex;align-items:center;gap:var(--scb-menu-submenu-loading-gap, var(--spacing-3, 8px));padding-block:var(--scb-menu-submenu-loading-padding-block, var(--spacing-3, 8px));padding-inline:var(--scb-navigation-submenu-padding-inline, var(--spacing-5, 16px));color:var(--scb-menu-loading-color,
80
79
  var(--md-sys-color-on-surface-variant, currentColor)
81
- );font-size:var(--scb-typography-body-small-size, var(--md-sys-typescale-body-small-size, 0.875rem));line-height:var(--scb-typography-body-small-line-height, var(--md-sys-typescale-body-small-line-height, 1.25rem))}.submenu-loading::before{content:"";inline-size:.75rem;block-size:.75rem;border-radius:var(--radius-full, 1000px);border:2px solid currentColor;border-inline-end-color:transparent;animation:scb-menu-loading-spin 700ms linear infinite}@media (prefers-reduced-motion:reduce){.submenu{transition:none}.submenu-loading::before{animation:none}}`,m);s([a({type:String})],n.prototype,"label",void 0);s([a({type:Boolean,reflect:!0})],n.prototype,"selected",void 0);s([a({type:Boolean,attribute:"no-highlight-selected",reflect:!0})],n.prototype,"noHighlightSelected",void 0);s([a({type:String,attribute:"leading-icon"})],n.prototype,"leadingIcon",void 0);s([a({type:String,attribute:"item-href"})],n.prototype,"itemHref",void 0);s([a({type:Boolean,attribute:"has-children",reflect:!0,converter:p})],n.prototype,"hasChildren",void 0);s([a({type:Boolean,reflect:!0,converter:p})],n.prototype,"loading",void 0);s([a({type:String,attribute:"show-submenu-label"})],n.prototype,"showSubmenuLabel",void 0);s([a({type:String,attribute:"hide-submenu-label"})],n.prototype,"hideSubmenuLabel",void 0);s([a({type:String,attribute:"loading-label"})],n.prototype,"loadingLabel",void 0);s([g()],n.prototype,"hasSlotContent",void 0);s([a({type:Boolean,reflect:!0})],n.prototype,"expanded",void 0);n=d=s([_("scb-menu-item")],n);
80
+ );font-size:var(--scb-typography-body-small-size, var(--md-sys-typescale-body-small-size, 0.875rem));line-height:var(--scb-typography-body-small-line-height, var(--md-sys-typescale-body-small-line-height, 1.25rem))}.submenu-loading::before{content:"";inline-size:.75rem;block-size:.75rem;border-radius:var(--radius-full, 1000px);border:2px solid currentColor;border-inline-end-color:transparent;animation:scb-menu-loading-spin 700ms linear infinite}@media (prefers-reduced-motion:reduce){.submenu{transition:none}.submenu-loading::before{animation:none}}`,m);s([a({type:String})],n.prototype,"label",void 0);s([a({type:Boolean,reflect:!0})],n.prototype,"selected",void 0);s([a({type:Boolean,attribute:"no-highlight-selected",reflect:!0})],n.prototype,"noHighlightSelected",void 0);s([a({type:String,attribute:"leading-icon"})],n.prototype,"leadingIcon",void 0);s([a({type:String,attribute:"item-href"})],n.prototype,"itemHref",void 0);s([a({type:Boolean,attribute:"has-children",reflect:!0,converter:p})],n.prototype,"hasChildren",void 0);s([a({type:Boolean,reflect:!0,converter:p})],n.prototype,"loading",void 0);s([a({type:String,attribute:"show-submenu-label"})],n.prototype,"showSubmenuLabel",void 0);s([a({type:String,attribute:"hide-submenu-label"})],n.prototype,"hideSubmenuLabel",void 0);s([a({type:String,attribute:"loading-label"})],n.prototype,"loadingLabel",void 0);s([g()],n.prototype,"hasSlotContent",void 0);s([a({type:Boolean,reflect:!0})],n.prototype,"expanded",void 0);n=c=s([_("scb-menu-item")],n);
@@ -1,2 +1,2 @@
1
- import{m as p,p as i,s as d,y}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import{t as o}from"../../vendor/decorate.js";import{r as h,t as u}from"../../vendor/tab-styles.js";(function(){try{var s=typeof globalThis<"u"?globalThis:window;if(!s.__scb_ce_guard_installed__){s.__scb_ce_guard_installed__=!0;var a=customElements.define.bind(customElements);customElements.define=function(t,c,v){try{customElements.get(t)||a(t,c,v)}catch(m){var n=String(m||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw m}}}}catch{}})();var b=class extends h{constructor(){super(...arguments),this.inlineIcon=!1}getContentClasses(){return{...super.getContentClasses(),stacked:!this.inlineIcon}}};d([i({type:Boolean,attribute:"inline-icon"})],b.prototype,"inlineIcon",void 0);var f=y`:host{--_active-indicator-color: var(--md-primary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-primary-tab-active-indicator-height, 3px);--_active-indicator-shape: var(--md-primary-tab-active-indicator-shape, 3px 3px 0px 0px);--_active-hover-state-layer-color: var(--md-primary-tab-active-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-hover-state-layer-opacity: var(--md-primary-tab-active-hover-state-layer-opacity, 0.08);--_active-pressed-state-layer-color: var(--md-primary-tab-active-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-state-layer-opacity: var(--md-primary-tab-active-pressed-state-layer-opacity, 0.12);--_container-color: var(--md-primary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-primary-tab-container-elevation, 0);--_container-height: var(--md-primary-tab-container-height, 48px);--_with-icon-and-label-text-container-height: var(--md-primary-tab-with-icon-and-label-text-container-height, 64px);--_hover-state-layer-color: var(--md-primary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-primary-tab-hover-state-layer-opacity, 0.08);--_pressed-state-layer-color: var(--md-primary-tab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-primary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-primary-tab-active-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_active-hover-icon-color: var(--md-primary-tab-active-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_active-icon-color: var(--md-primary-tab-active-icon-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-icon-color: var(--md-primary-tab-active-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-primary-tab-icon-size, 24px);--_focus-icon-color: var(--md-primary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-primary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-color: var(--md-primary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-primary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-primary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-primary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-primary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-primary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_active-focus-label-text-color: var(--md-primary-tab-active-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-hover-label-text-color: var(--md-primary-tab-active-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-label-text-color: var(--md-primary-tab-active-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-label-text-color: var(--md-primary-tab-active-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-label-text-color: var(--md-primary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-primary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-color: var(--md-primary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-primary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-primary-tab-container-shape-start-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-primary-tab-container-shape-start-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-primary-tab-container-shape-end-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-primary-tab-container-shape-end-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))}.content.stacked{flex-direction:column;gap:2px}.content.stacked.has-icon.has-label{height:var(--_with-icon-and-label-text-container-height)}
2
- `,r=class extends b{};r.styles=[u,f];r=d([p("md-primary-tab")],r);var l,e=(l=class extends r{constructor(...a){super(...a),this.iconOnly=!1,this.inlineIcon=!1,this.href="",this._onActivate=t=>{const c=this.textContent?.trim()??"";this.href&&(t.preventDefault(),t.stopPropagation()),this.dispatchEvent(new CustomEvent("activate",{detail:{label:c,href:this.href},bubbles:!0,composed:!0})),this.href&&window.location.assign(this.href)}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}get icon(){return this._icon}set icon(a){const t=this._icon;t!==a&&(this._icon=a,this.requestUpdate("icon",t),this.updateIconSlot())}firstUpdated(a){super.firstUpdated(a),this.addEventListener("click",this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.setAttribute("aria-selected",this.active?"true":"false"),this.iconOnly&&!this.hasAttribute("aria-label")){const a=this.textContent?.trim()??"";a&&this.setAttribute("aria-label",a)}}updateIconSlot(){const a=this.querySelector('md-icon[slot="icon"]');if(!this._icon){a?.remove();return}if(a)a.textContent=this._icon;else{const t=document.createElement("md-icon");t.setAttribute("slot","icon"),t.textContent=this._icon,this.appendChild(t)}}},l.styles=[...r.styles,y`:host{--md-primary-tab-container-height:var(--scb-tabs-height, var(--scale-11, 48px));--md-primary-tab-with-icon-and-label-text-container-height:var(--scb-tabs-primary-with-icon-height, 64px);--md-primary-tab-icon-size:var(--scb-tabs-icon-size, var(--icon-size-medium, 24px));--md-primary-tab-label-text-font:var(--scb-tabs-label-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--md-primary-tab-label-text-size:var(--scb-tabs-label-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--md-primary-tab-label-text-line-height:var(--scb-tabs-label-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--md-primary-tab-label-text-weight:var(--scb-tabs-label-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight, var(--weight-semibold))))}.content{gap:var(--scb-tabs-icon-gap, var(--spacing-3, 8px));letter-spacing:var(--scb-tabs-label-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}.content.stacked{gap:var(--scb-tabs-stacked-icon-gap, var(--spacing-1, 2px))}:host([inline-icon]) .content.stacked{flex-direction:row;gap:var(--scb-tabs-icon-gap, var(--spacing-3, 8px))}:host([inline-icon]) .content.stacked.has-icon.has-label{height:var(--scb-tabs-height, var(--scale-11, 48px))}:host([icon-only]) slot:not([name=icon]){display:none}`],l);o([i({type:String})],e.prototype,"icon",null);o([i({type:Boolean,reflect:!0,attribute:"icon-only"})],e.prototype,"iconOnly",void 0);o([i({type:Boolean,reflect:!0,attribute:"inline-icon"})],e.prototype,"inlineIcon",void 0);o([i({type:String,reflect:!0})],e.prototype,"href",void 0);e=o([p("scb-primary-tab")],e);
1
+ import{m,p as o,s as d,y as p}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import{t as s}from"../../vendor/decorate.js";import{r as h,t as u}from"../../vendor/tab-styles.js";(function(){try{var i=typeof globalThis<"u"?globalThis:window;if(!i.__scb_ce_guard_installed__){i.__scb_ce_guard_installed__=!0;var a=customElements.define.bind(customElements);customElements.define=function(t,b,v){try{customElements.get(t)||a(t,b,v)}catch(n){var l=String(n||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw n}}}}catch{}})();var y=class extends h{constructor(){super(...arguments),this.inlineIcon=!1}getContentClasses(){return{...super.getContentClasses(),stacked:!this.inlineIcon}}};d([o({type:Boolean,attribute:"inline-icon"})],y.prototype,"inlineIcon",void 0);var _=p`:host{--_active-indicator-color: var(--md-primary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-primary-tab-active-indicator-height, 3px);--_active-indicator-shape: var(--md-primary-tab-active-indicator-shape, 3px 3px 0px 0px);--_active-hover-state-layer-color: var(--md-primary-tab-active-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-hover-state-layer-opacity: var(--md-primary-tab-active-hover-state-layer-opacity, 0.08);--_active-pressed-state-layer-color: var(--md-primary-tab-active-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-state-layer-opacity: var(--md-primary-tab-active-pressed-state-layer-opacity, 0.12);--_container-color: var(--md-primary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-primary-tab-container-elevation, 0);--_container-height: var(--md-primary-tab-container-height, 48px);--_with-icon-and-label-text-container-height: var(--md-primary-tab-with-icon-and-label-text-container-height, 64px);--_hover-state-layer-color: var(--md-primary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-primary-tab-hover-state-layer-opacity, 0.08);--_pressed-state-layer-color: var(--md-primary-tab-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-primary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-primary-tab-active-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_active-hover-icon-color: var(--md-primary-tab-active-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_active-icon-color: var(--md-primary-tab-active-icon-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-icon-color: var(--md-primary-tab-active-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-primary-tab-icon-size, 24px);--_focus-icon-color: var(--md-primary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-primary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-color: var(--md-primary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-primary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-font: var(--md-primary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-primary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-primary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-primary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_active-focus-label-text-color: var(--md-primary-tab-active-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-hover-label-text-color: var(--md-primary-tab-active-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-label-text-color: var(--md-primary-tab-active-label-text-color, var(--md-sys-color-primary, #6750a4));--_active-pressed-label-text-color: var(--md-primary-tab-active-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_focus-label-text-color: var(--md-primary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-primary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_label-text-color: var(--md-primary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-label-text-color: var(--md-primary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-primary-tab-container-shape-start-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-primary-tab-container-shape-start-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-primary-tab-container-shape-end-end, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-primary-tab-container-shape-end-start, var(--md-primary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))}.content.stacked{flex-direction:column;gap:2px}.content.stacked.has-icon.has-label{height:var(--_with-icon-and-label-text-container-height)}
2
+ `,e=class extends y{};e.styles=[u,_];e=d([m("md-primary-tab")],e);var c,r=(c=class extends e{constructor(...a){super(...a),this.iconOnly=!1,this.inlineIcon=!1,this._onActivate=()=>{const t=this.textContent?.trim()??"";this.dispatchEvent(new CustomEvent("activate",{detail:{label:t},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}get icon(){return this._icon}set icon(a){const t=this._icon;t!==a&&(this._icon=a,this.requestUpdate("icon",t),this.updateIconSlot())}firstUpdated(a){super.firstUpdated(a),this.addEventListener("click",this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.setAttribute("aria-selected",this.active?"true":"false"),this.iconOnly&&!this.hasAttribute("aria-label")){const a=this.textContent?.trim()??"";a&&this.setAttribute("aria-label",a)}}updateIconSlot(){const a=this.querySelector('md-icon[slot="icon"]');if(!this._icon){a?.remove();return}if(a)a.textContent=this._icon;else{const t=document.createElement("md-icon");t.setAttribute("slot","icon"),t.textContent=this._icon,this.appendChild(t)}}},c.styles=[...e.styles,p`:host{--md-primary-tab-container-height:var(--scb-tabs-height, var(--scale-11, 48px));--md-primary-tab-with-icon-and-label-text-container-height:var(--scb-tabs-primary-with-icon-height, 64px);--md-primary-tab-icon-size:var(--scb-tabs-icon-size, var(--icon-size-medium, 24px));--md-primary-tab-label-text-font:var(--scb-tabs-label-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--md-primary-tab-label-text-size:var(--scb-tabs-label-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--md-primary-tab-label-text-line-height:var(--scb-tabs-label-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--md-primary-tab-label-text-weight:var(--scb-tabs-label-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight, var(--weight-semibold))))}.content{gap:var(--scb-tabs-icon-gap, var(--spacing-3, 8px));letter-spacing:var(--scb-tabs-label-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}.content.stacked{gap:var(--scb-tabs-stacked-icon-gap, var(--spacing-1, 2px))}:host([inline-icon]) .content.stacked{flex-direction:row;gap:var(--scb-tabs-icon-gap, var(--spacing-3, 8px))}:host([inline-icon]) .content.stacked.has-icon.has-label{height:var(--scb-tabs-height, var(--scale-11, 48px))}:host([icon-only]) slot:not([name=icon]){display:none}`],c);s([o({type:String})],r.prototype,"icon",null);s([o({type:Boolean,reflect:!0,attribute:"icon-only"})],r.prototype,"iconOnly",void 0);s([o({type:Boolean,reflect:!0,attribute:"inline-icon"})],r.prototype,"inlineIcon",void 0);r=s([m("scb-primary-tab")],r);
@@ -1,2 +1,2 @@
1
- import{m as b,p as i,s as m,y as v}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import{t as s}from"../../vendor/decorate.js";import{r as h,t as p}from"../../vendor/tab-styles.js";(function(){try{var o=typeof globalThis<"u"?globalThis:window;if(!o.__scb_ce_guard_installed__){o.__scb_ce_guard_installed__=!0;var a=customElements.define.bind(customElements);customElements.define=function(e,c,y){try{customElements.get(e)||a(e,c,y)}catch(d){var l=String(d||"");if(l.indexOf("already been used")===-1&&l.indexOf("NotSupportedError")===-1)throw d}}}}catch{}})();var u=class extends h{constructor(){super(...arguments),this.fullWidthIndicator=!0}},f=v`:host{--_active-indicator-color: var(--md-secondary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-secondary-tab-active-indicator-height, 2px);--_active-label-text-color: var(--md-secondary-tab-active-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-color: var(--md-secondary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-secondary-tab-container-elevation, 0);--_container-height: var(--md-secondary-tab-container-height, 48px);--_focus-label-text-color: var(--md-secondary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-secondary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-secondary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-secondary-tab-hover-state-layer-opacity, 0.08);--_label-text-font: var(--md-secondary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-secondary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-secondary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-secondary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-secondary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-secondary-tab-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-secondary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-secondary-tab-active-focus-icon-color, );--_active-focus-label-text-color: var(--md-secondary-tab-active-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--md-secondary-tab-active-hover-icon-color, );--_active-hover-label-text-color: var(--md-secondary-tab-active-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--md-secondary-tab-active-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-opacity: var(--md-secondary-tab-active-hover-state-layer-opacity, 0.08);--_active-icon-color: var(--md-secondary-tab-active-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_active-indicator-shape: var(--md-secondary-tab-active-indicator-shape, 0);--_active-pressed-icon-color: var(--md-secondary-tab-active-pressed-icon-color, );--_active-pressed-label-text-color: var(--md-secondary-tab-active-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--md-secondary-tab-active-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-opacity: var(--md-secondary-tab-active-pressed-state-layer-opacity, 0.12);--_label-text-color: var(--md-secondary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-icon-color: var(--md-secondary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-secondary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-size: var(--md-secondary-tab-icon-size, 24px);--_icon-color: var(--md-secondary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-secondary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-secondary-tab-container-shape-start-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-secondary-tab-container-shape-start-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-secondary-tab-container-shape-end-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-secondary-tab-container-shape-end-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))}
2
- `,t=class extends u{};t.styles=[p,f];t=m([b("md-secondary-tab")],t);var n,r=(n=class extends t{constructor(...a){super(...a),this.iconOnly=!1,this.href="",this._onActivate=e=>{const c=this.textContent?.trim()??"";this.href&&(e.preventDefault(),e.stopPropagation()),this.dispatchEvent(new CustomEvent("activate",{detail:{label:c,href:this.href},bubbles:!0,composed:!0})),this.href&&window.location.assign(this.href)}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}get icon(){return this._icon}set icon(a){const e=this._icon;e!==a&&(this._icon=a,this.requestUpdate("icon",e),this.updateIconSlot())}firstUpdated(a){if(super.firstUpdated(a),this.iconOnly&&!this.hasAttribute("aria-label")){const e=this.textContent?.trim()??"";e&&this.setAttribute("aria-label",e)}this.addEventListener("click",this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.iconOnly&&!this.hasAttribute("aria-label")){const a=this.textContent?.trim()??"";a&&this.setAttribute("aria-label",a)}}updateIconSlot(){const a=this.querySelector('md-icon[slot="icon"]');if(!this._icon){a?.remove();return}if(a)a.textContent=this._icon;else{const e=document.createElement("md-icon");e.setAttribute("slot","icon"),e.textContent=this._icon,this.appendChild(e)}}},n.styles=[...t.styles,v`:host{--md-secondary-tab-container-height:var(--scb-tabs-height, var(--scale-11, 48px));--md-secondary-tab-icon-size:var(--scb-tabs-icon-size, var(--icon-size-medium, 24px));--md-secondary-tab-label-text-font:var(--scb-tabs-label-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--md-secondary-tab-label-text-size:var(--scb-tabs-label-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--md-secondary-tab-label-text-line-height:var(--scb-tabs-label-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--md-secondary-tab-label-text-weight:var(--scb-tabs-label-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight, var(--weight-semibold))))}.content{gap:var(--scb-tabs-icon-gap, var(--spacing-3, 8px));letter-spacing:var(--scb-tabs-label-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}:host([icon-only]) slot:not([name=icon]){display:none}`],n);s([i({type:String})],r.prototype,"icon",null);s([i({type:Boolean,reflect:!0,attribute:"icon-only"})],r.prototype,"iconOnly",void 0);s([i({type:String,reflect:!0})],r.prototype,"href",void 0);r=s([b("scb-secondary-tab")],r);
1
+ import{m as l,p as d,s as m,y as b}from"../../vendor/vendor.js";import"../../vendor/vendor-lit.js";import"../../vendor/icon.js";import{t as c}from"../../vendor/decorate.js";import{r as h,t as p}from"../../vendor/tab-styles.js";(function(){try{var r=typeof globalThis<"u"?globalThis:window;if(!r.__scb_ce_guard_installed__){r.__scb_ce_guard_installed__=!0;var e=customElements.define.bind(customElements);customElements.define=function(a,v,y){try{customElements.get(a)||e(a,v,y)}catch(i){var n=String(i||"");if(n.indexOf("already been used")===-1&&n.indexOf("NotSupportedError")===-1)throw i}}}}catch{}})();var u=class extends h{constructor(){super(...arguments),this.fullWidthIndicator=!0}},f=b`:host{--_active-indicator-color: var(--md-secondary-tab-active-indicator-color, var(--md-sys-color-primary, #6750a4));--_active-indicator-height: var(--md-secondary-tab-active-indicator-height, 2px);--_active-label-text-color: var(--md-secondary-tab-active-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_container-color: var(--md-secondary-tab-container-color, var(--md-sys-color-surface, #fef7ff));--_container-elevation: var(--md-secondary-tab-container-elevation, 0);--_container-height: var(--md-secondary-tab-container-height, 48px);--_focus-label-text-color: var(--md-secondary-tab-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-label-text-color: var(--md-secondary-tab-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-color: var(--md-secondary-tab-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-state-layer-opacity: var(--md-secondary-tab-hover-state-layer-opacity, 0.08);--_label-text-font: var(--md-secondary-tab-label-text-font, var(--md-sys-typescale-title-small-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-secondary-tab-label-text-line-height, var(--md-sys-typescale-title-small-line-height, 1.25rem));--_label-text-size: var(--md-secondary-tab-label-text-size, var(--md-sys-typescale-title-small-size, 0.875rem));--_label-text-weight: var(--md-secondary-tab-label-text-weight, var(--md-sys-typescale-title-small-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-secondary-tab-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-color: var(--md-secondary-tab-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_pressed-state-layer-opacity: var(--md-secondary-tab-pressed-state-layer-opacity, 0.12);--_active-focus-icon-color: var(--md-secondary-tab-active-focus-icon-color, );--_active-focus-label-text-color: var(--md-secondary-tab-active-focus-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-icon-color: var(--md-secondary-tab-active-hover-icon-color, );--_active-hover-label-text-color: var(--md-secondary-tab-active-hover-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-color: var(--md-secondary-tab-active-hover-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-hover-state-layer-opacity: var(--md-secondary-tab-active-hover-state-layer-opacity, 0.08);--_active-icon-color: var(--md-secondary-tab-active-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_active-indicator-shape: var(--md-secondary-tab-active-indicator-shape, 0);--_active-pressed-icon-color: var(--md-secondary-tab-active-pressed-icon-color, );--_active-pressed-label-text-color: var(--md-secondary-tab-active-pressed-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-color: var(--md-secondary-tab-active-pressed-state-layer-color, var(--md-sys-color-on-surface, #1d1b20));--_active-pressed-state-layer-opacity: var(--md-secondary-tab-active-pressed-state-layer-opacity, 0.12);--_label-text-color: var(--md-secondary-tab-label-text-color, var(--md-sys-color-on-surface-variant, #49454f));--_focus-icon-color: var(--md-secondary-tab-focus-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_hover-icon-color: var(--md-secondary-tab-hover-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_icon-size: var(--md-secondary-tab-icon-size, 24px);--_icon-color: var(--md-secondary-tab-icon-color, var(--md-sys-color-on-surface-variant, #49454f));--_pressed-icon-color: var(--md-secondary-tab-pressed-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_container-shape-start-start: var(--md-secondary-tab-container-shape-start-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-start-end: var(--md-secondary-tab-container-shape-start-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-end: var(--md-secondary-tab-container-shape-end-end, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)));--_container-shape-end-start: var(--md-secondary-tab-container-shape-end-start, var(--md-secondary-tab-container-shape, var(--md-sys-shape-corner-none, 0px)))}
2
+ `,t=class extends u{};t.styles=[p,f];t=m([l("md-secondary-tab")],t);var s,o=(s=class extends t{constructor(...e){super(...e),this.iconOnly=!1,this._onActivate=()=>{const a=this.textContent?.trim()??"";this.dispatchEvent(new CustomEvent("activate",{detail:{label:a},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}get icon(){return this._icon}set icon(e){const a=this._icon;a!==e&&(this._icon=e,this.requestUpdate("icon",a),this.updateIconSlot())}firstUpdated(e){if(super.firstUpdated(e),this.iconOnly&&!this.hasAttribute("aria-label")){const a=this.textContent?.trim()??"";a&&this.setAttribute("aria-label",a)}this.addEventListener("click",this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.iconOnly&&!this.hasAttribute("aria-label")){const e=this.textContent?.trim()??"";e&&this.setAttribute("aria-label",e)}}updateIconSlot(){const e=this.querySelector('md-icon[slot="icon"]');if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{const a=document.createElement("md-icon");a.setAttribute("slot","icon"),a.textContent=this._icon,this.appendChild(a)}}},s.styles=[...t.styles,b`:host{--md-secondary-tab-container-height:var(--scb-tabs-height, var(--scale-11, 48px));--md-secondary-tab-icon-size:var(--scb-tabs-icon-size, var(--icon-size-medium, 24px));--md-secondary-tab-label-text-font:var(--scb-tabs-label-font, var(--scb-typography-label-medium-font, var(--md-sys-typescale-label-medium-font)));--md-secondary-tab-label-text-size:var(--scb-tabs-label-size, var(--scb-typography-label-medium-size, var(--md-sys-typescale-label-medium-size)));--md-secondary-tab-label-text-line-height:var(--scb-tabs-label-line-height, var(--scb-typography-label-medium-line-height, var(--md-sys-typescale-label-medium-line-height)));--md-secondary-tab-label-text-weight:var(--scb-tabs-label-weight, var(--scb-typography-label-medium-weight, var(--md-sys-typescale-label-medium-weight, var(--weight-semibold))))}.content{gap:var(--scb-tabs-icon-gap, var(--spacing-3, 8px));letter-spacing:var(--scb-tabs-label-tracking, var(--scb-typography-label-medium-tracking, var(--md-sys-typescale-label-medium-tracking)))}:host([icon-only]) slot:not([name=icon]){display:none}`],s);c([d({type:String})],o.prototype,"icon",null);c([d({type:Boolean,reflect:!0,attribute:"icon-only"})],o.prototype,"iconOnly",void 0);o=c([l("scb-secondary-tab")],o);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "scb-wc",
3
- "version": "0.1.213",
3
+ "version": "0.1.214",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
@@ -455,5 +455,5 @@
455
455
  "./scb-viz/*": null,
456
456
  "./mvc/*": "./mvc/*"
457
457
  },
458
- "buildHash": "D3E18D6D0D573416EDAEF12CF1C5134E63CE1D25759B6A851C6CFA24E8B197F3"
458
+ "buildHash": "BBF591A94331F2072570FC81C22EDE0A94F269C924904C4DF65E828587234FC6"
459
459
  }
@@ -7,7 +7,6 @@ export declare class ScbPrimaryTab extends MdPrimaryTab {
7
7
  set icon(value: string | undefined);
8
8
  iconOnly: boolean;
9
9
  inlineIcon: boolean;
10
- href: string;
11
10
  protected firstUpdated(changed: PropertyValues): void;
12
11
  private _onActivate;
13
12
  protected updated(): void;
@@ -7,7 +7,6 @@ export declare class ScbSecondaryTab extends MdSecondaryTab {
7
7
  get icon(): string | undefined;
8
8
  set icon(value: string | undefined);
9
9
  iconOnly: boolean;
10
- href: string;
11
10
  protected firstUpdated(changed: PropertyValues): void;
12
11
  protected updated(): void;
13
12
  private _onActivate;
@@ -349,9 +349,6 @@ var c, l = {
349
349
  aria-label="${this.label}"
350
350
  href="${this.itemHref}"
351
351
  aria-current=${this.selected ? "page" : i}
352
- aria-expanded=${n ? String(this.expanded) : i}
353
- aria-controls=${n ? this.__submenuId : i}
354
- aria-busy=${n && this.loading ? "true" : i}
355
352
  @click=${this._onLinkClick}
356
353
  @keydown=${this._onKeyDown}
357
354
  >
@@ -388,13 +385,15 @@ var c, l = {
388
385
  aria-label=${this.__submenuButtonLabel()}
389
386
  aria-expanded=${String(this.expanded)}
390
387
  aria-controls=${this.__submenuId}
391
- tabindex="-1"
388
+ aria-busy=${this.loading ? "true" : i}
389
+ tabindex=${t ? i : "-1"}
392
390
  @click=${(e) => {
393
391
  e.stopPropagation(), this._toggleExpand(e);
394
392
  }}
395
393
  >
396
394
  <md-ripple></md-ripple>
397
395
  <scb-chevron class="menu-chevron" .open=${this.expanded}></scb-chevron>
396
+ ${t ? r`<md-focus-ring inward></md-focus-ring>` : i}
398
397
  </button>
399
398
  ` : ""}
400
399
  </div>
@@ -6,16 +6,13 @@ import { MdPrimaryTab as i } from "@material/web/tabs/primary-tab.js";
6
6
  //#region src/scb-components/scb-tabs/scb-primary-tab.ts
7
7
  var a = class extends i {
8
8
  constructor(...e) {
9
- super(...e), this.iconOnly = !1, this.inlineIcon = !1, this.href = "", this._onActivate = (e) => {
10
- let t = this.textContent?.trim() ?? "";
11
- this.href && (e.preventDefault(), e.stopPropagation()), this.dispatchEvent(new CustomEvent("activate", {
12
- detail: {
13
- label: t,
14
- href: this.href
15
- },
9
+ super(...e), this.iconOnly = !1, this.inlineIcon = !1, this._onActivate = () => {
10
+ let e = this.textContent?.trim() ?? "";
11
+ this.dispatchEvent(new CustomEvent("activate", {
12
+ detail: { label: e },
16
13
  bubbles: !0,
17
14
  composed: !0
18
- })), this.href && window.location.assign(this.href);
15
+ }));
19
16
  };
20
17
  }
21
18
  connectedCallback() {
@@ -95,9 +92,6 @@ e([r({ type: String })], a.prototype, "icon", null), e([r({
95
92
  type: Boolean,
96
93
  reflect: !0,
97
94
  attribute: "inline-icon"
98
- })], a.prototype, "inlineIcon", void 0), e([r({
99
- type: String,
100
- reflect: !0
101
- })], a.prototype, "href", void 0), a = e([n("scb-primary-tab")], a);
95
+ })], a.prototype, "inlineIcon", void 0), a = e([n("scb-primary-tab")], a);
102
96
  //#endregion
103
97
  export { a as ScbPrimaryTab };
@@ -6,16 +6,13 @@ import { MdSecondaryTab as i } from "@material/web/tabs/secondary-tab.js";
6
6
  //#region src/scb-components/scb-tabs/scb-secondary-tab.ts
7
7
  var a = class extends i {
8
8
  constructor(...e) {
9
- super(...e), this.iconOnly = !1, this.href = "", this._onActivate = (e) => {
10
- let t = this.textContent?.trim() ?? "";
11
- this.href && (e.preventDefault(), e.stopPropagation()), this.dispatchEvent(new CustomEvent("activate", {
12
- detail: {
13
- label: t,
14
- href: this.href
15
- },
9
+ super(...e), this.iconOnly = !1, this._onActivate = () => {
10
+ let e = this.textContent?.trim() ?? "";
11
+ this.dispatchEvent(new CustomEvent("activate", {
12
+ detail: { label: e },
16
13
  bubbles: !0,
17
14
  composed: !0
18
- })), this.href && window.location.assign(this.href);
15
+ }));
19
16
  };
20
17
  }
21
18
  connectedCallback() {
@@ -81,9 +78,6 @@ e([r({ type: String })], a.prototype, "icon", null), e([r({
81
78
  type: Boolean,
82
79
  reflect: !0,
83
80
  attribute: "icon-only"
84
- })], a.prototype, "iconOnly", void 0), e([r({
85
- type: String,
86
- reflect: !0
87
- })], a.prototype, "href", void 0), a = e([n("scb-secondary-tab")], a);
81
+ })], a.prototype, "iconOnly", void 0), a = e([n("scb-secondary-tab")], a);
88
82
  //#endregion
89
83
  export { a as ScbSecondaryTab };
package/scb-wc.bundle.js CHANGED
@@ -11692,9 +11692,6 @@
11692
11692
  aria-label="${this.label}"
11693
11693
  href="${this.itemHref}"
11694
11694
  aria-current=${this.selected?`page`:S}
11695
- aria-expanded=${n?String(this.expanded):S}
11696
- aria-controls=${n?this.__submenuId:S}
11697
- aria-busy=${n&&this.loading?`true`:S}
11698
11695
  @click=${this._onLinkClick}
11699
11696
  @keydown=${this._onKeyDown}
11700
11697
  >
@@ -11731,11 +11728,13 @@
11731
11728
  aria-label=${this.__submenuButtonLabel()}
11732
11729
  aria-expanded=${String(this.expanded)}
11733
11730
  aria-controls=${this.__submenuId}
11734
- tabindex="-1"
11731
+ aria-busy=${this.loading?`true`:S}
11732
+ tabindex=${t?S:`-1`}
11735
11733
  @click=${e=>{e.stopPropagation(),this._toggleExpand(e)}}
11736
11734
  >
11737
11735
  <md-ripple></md-ripple>
11738
11736
  <scb-chevron class="menu-chevron" .open=${this.expanded}></scb-chevron>
11737
+ ${t?x`<md-focus-ring inward></md-focus-ring>`:S}
11739
11738
  </button>
11740
11739
  `:``}
11741
11740
  </div>
@@ -16878,7 +16877,7 @@
16878
16877
  ></scb-pagination>
16879
16878
  `:``}
16880
16879
  </div>
16881
- `}_onSearchInput(e){let t=e.target.value;this.searchTerm=t,this._filterTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0}))}_filterTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r=n,i=this._getTopLevelRows(r),a=this.searchTerm.trim().toLowerCase();if(!a)this._filteredRows=null,i.forEach(e=>e.style.display=``),this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this.pagination&&this._paginateTable(),this._sortedColumn!==null&&this._sortTable(this._sortedColumn,this._sortDirection);else{this._filteredRows=i.filter(e=>this._getRowSearchText(e).toLowerCase().includes(a)),i.forEach(e=>e.style.display=`none`);let e=this._filteredRows;this._sortedColumn!==null&&(e=[...e],e.sort((e,t)=>{let n=this._getCellSortableValue(e.children[this._sortedColumn]),r=this._getCellSortableValue(t.children[this._sortedColumn]);return this._compareCellValues(n,r,this._sortDirection)}),this._filteredRows=e),this.totalRows=this._filteredRows.length,this._ensureCurrentPageWithinBounds(),this.pagination?this._paginateTable():this._filteredRows.forEach(e=>e.style.display=``)}}firstUpdated(){let e=this.shadowRoot.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>this._attachThListeners()),this._attachThListeners(),this._attachTbodyObserver(),this._initialTableRefreshFrame=requestAnimationFrame(()=>{this._initialTableRefreshFrame=0,this.isConnected&&this._refreshFromTableContent()}))}updated(e){super.updated(e),e.has(`disableSorting`)&&this._sortedColumn!==null&&!this._isColumnSortable(this._sortedColumn)&&(this._sortedColumn=null,this._sortDirection=`asc`),(e.has(`searchTerm`)||e.has(`currentPage`)||e.has(`pageSize`)||e.has(`filteringSearch`)||e.has(`pagination`)||e.has(`disableSorting`))&&this.updateComplete.then(()=>{this.isConnected&&this._refreshFromTableContent()}),this.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>{e.setAttribute(`size`,M(this,`--scb-table-advanced-sort-icon-button-size`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`))})}_disconnectTbodyObserver(){this._tbodyObserver&&=(this._tbodyObserver.disconnect(),null),this._observedTbody=null}_attachTbodyObserver(){let e=this._getTbody();if(!e){this._disconnectTbodyObserver();return}this._observedTbody!==e&&(this._disconnectTbodyObserver(),this._observedTbody=e,this._tbodyObserver=new MutationObserver(()=>{this._suppressTbodyObserver||this._scheduleTableRefresh()}),this._tbodyObserver.observe(e,{childList:!0,subtree:!0,characterData:!0}))}_scheduleTableRefresh(){this._pendingTableRefresh||(this._pendingTableRefresh=!0,queueMicrotask(()=>{this._pendingTableRefresh=!1,this._refreshFromTableContent()}))}_refreshFromTableContent(){if(this._attachTbodyObserver(),this.filteringSearch){this._filterTable();return}if(this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this._sortedColumn!==null){this._sortTable(this._sortedColumn,this._sortDirection);return}this.pagination&&this._paginateTable()}_ensureCurrentPageWithinBounds(){let e=Math.max(1,Math.ceil(this.totalRows/this.pageSize)),t=Math.min(Math.max(1,this.currentPage),e);t!==this.currentPage&&(this.currentPage=t)}_getTbody(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return null;let t=e.assignedNodes({flatten:!0});for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);if(t)return t}return null}_getTopLevelRows(e){return Array.from(e.children).filter(e=>e instanceof HTMLTableRowElement)}_attachThListeners(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=[],r=[],i=[],a=[];t.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(Array.from(e.querySelectorAll(`thead`)).forEach(e=>{n.push(...Array.from(e.querySelectorAll(`th`)))}),r.push(...e.querySelectorAll(`th`)),i.push(...e.querySelectorAll(`td`)),a.push(...e.querySelectorAll(`tr`)))}),r.forEach(e=>{let t=n.indexOf(e),r=t!==-1;e.style.textAlign=`left`,e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline-end) var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.position=`relative`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-header-font)`,e.style.fontSize=`var(--scb-table-header-font-size)`,e.style.lineHeight=`var(--scb-table-header-line-height)`,e.style.fontWeight=`var(--scb-table-header-font-weight)`,e.style.letterSpacing=`var(--scb-table-header-letter-spacing)`,e.style.verticalAlign=`middle`,this._removeGeneratedSortMarkup(e),e.hasAttribute(`scope`)||(r?e.setAttribute(`scope`,`col`):e.closest(`tbody`)&&e.setAttribute(`scope`,`row`));let i=this._getOrCreateHeaderLabel(e,t);if((i instanceof HTMLParagraphElement||i.getAttribute(`data-scb-generated-label`)===`true`)&&this._applyGeneratedCellTextReset(i),!r){e.removeAttribute(`aria-sort`);return}if(!this._isColumnSortable(t)){e.removeAttribute(`aria-sort`);return}e.setAttribute(`aria-sort`,this._getHeaderAriaSort(t));let a=this._getNormalizedText(i.textContent)||`kolumn ${Math.max(t,0)+1}`,o=document.createElement(`scb-icon-button`);o.className=`scb-sort-icon`,o.onclick=()=>this._onThClick(t),o.setAttribute(`variant`,`standard`),o.setAttribute(`size`,M(this,`--scb-table-advanced-sort-icon-button-size`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`)),o.setAttribute(`aria-label`,this._getSortButtonLabel(a,t)),o.style.alignSelf=`center`,this._sortedColumn===t?(o.setAttribute(`variant`,`filled-tonal`),o.setAttribute(`icon`,this._sortDirection===`asc`?`arrow_downward`:`arrow_upward`)):(o.setAttribute(`icon`,`swap_horiz`),o.style.transform+=` rotate(90deg)`),this._wrapHeaderWithSortControl(e,i,o)}),i.forEach(e=>{e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline-end) var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.textAlign=`left`,e.style.borderTop=`1px solid var(--scb-tables-outline-color, var(--md-sys-color-outline-variant))`,e.style.verticalAlign=`text-top`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-cell-font)`,e.style.fontSize=`var(--scb-table-cell-font-size)`,e.style.lineHeight=`var(--scb-table-cell-line-height)`,e.style.fontWeight=`var(--scb-table-cell-font-weight)`,e.style.letterSpacing=`var(--scb-table-cell-letter-spacing)`}),a.forEach((e,t)=>{t%2==1&&e.querySelectorAll(`td`).forEach(e=>{e.style.backgroundColor=`var(--scb-background-row)`});let n=e.querySelectorAll(`th`);n.length>0&&n.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`var(--scb-table-cell-edge-padding-inline)`),t===n.length-1?e.style.paddingRight=`var(--scb-table-cell-edge-padding-inline)`:e.style.paddingRight=``});let r=e.querySelectorAll(`td`);r.length>0&&r.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`var(--scb-table-cell-edge-padding-inline)`),t===r.length-1?e.style.paddingRight=`var(--scb-table-cell-edge-padding-inline)`:e.style.paddingRight=``})}),this.pagination&&this._paginateTable()}_applyGeneratedCellTextReset(e){e.style.margin=`0`,e.style.color=`inherit`,e.style.fontFamily=`inherit`,e.style.fontSize=`inherit`,e.style.lineHeight=`inherit`,e.style.fontWeight=`inherit`,e.style.letterSpacing=`inherit`}_removeGeneratedSortMarkup(e){e.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>e.remove());let t=e.querySelector(`:scope > [data-scb-sort-header="true"]`);if(!(t instanceof HTMLElement))return;let n=t.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement){t.replaceWith(n);return}t.remove()}_getOrCreateHeaderLabel(e,t){let n=e.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement)return n;let r=e.querySelector(`:scope > p`);if(r instanceof HTMLParagraphElement)return r.setAttribute(`data-scb-sort-label`,`true`),r;let i=Array.from(e.children).find(e=>e instanceof HTMLElement&&!e.matches(`scb-icon-button.scb-sort-icon`));if(i)return i.setAttribute(`data-scb-sort-label`,`true`),i;let a=document.createElement(`p`);return a.setAttribute(`data-scb-sort-label`,`true`),a.setAttribute(`data-scb-generated-label`,`true`),a.textContent=this._getNormalizedText(e.textContent)||`kolumn ${Math.max(t,0)+1}`,e.textContent=``,e.appendChild(a),a}_wrapHeaderWithSortControl(e,t,n){let r=document.createElement(`div`);r.setAttribute(`data-scb-sort-header`,`true`),r.style.display=`flex`,r.style.gap=`8px`,r.style.flexWrap=`nowrap`,r.style.alignItems=`center`,r.appendChild(t),r.appendChild(n),e.appendChild(r)}_getNormalizedText(e){return(e??``).replace(/\s+/g,` `).trim()}_onThClick(e){this._isColumnSortable(e)&&(this._sortedColumn===e?this._sortDirection=this._sortDirection===`asc`?`desc`:`asc`:(this._sortedColumn=e,this._sortDirection=`asc`),this._sortTable(e,this._sortDirection),this._attachThListeners())}_getHeaderAriaSort(e){return this._sortedColumn===e?this._sortDirection===`asc`?`ascending`:`descending`:`none`}_getSortButtonLabel(e,t){return`Sortera ${e||`kolumn ${t+1}`} ${this._sortedColumn===t&&this._sortDirection===`asc`?`fallande`:`stigande`}`}_isColumnSortable(e){return!(Array.isArray(this.disableSorting)?this.disableSorting:[]).some(t=>Number(t)===e)}_sortTable(e,t){if(!this._isColumnSortable(e))return;let n=this.shadowRoot.querySelector(`slot`);if(!n)return;let r=n.assignedNodes({flatten:!0}),i=null;if(r.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(i=t)}}),!i)return;let a;a=this._filteredRows?[...this._filteredRows]:this._getTopLevelRows(i),a.sort((n,r)=>{let i=this._getCellSortableValue(n.children[e]),a=this._getCellSortableValue(r.children[e]);return this._compareCellValues(i,a,t)});let o=this._tbodyObserver!==null;o&&this._disconnectTbodyObserver();try{a.forEach(e=>i.appendChild(e))}finally{o&&this._attachTbodyObserver()}this._filteredRows&&(this._filteredRows=a,this.totalRows=this._filteredRows.length),this.pagination&&this._paginateTable()}_getRowSearchText(e){return Array.from(e.cells).map(e=>this._getCellSortableValue(e)).join(` `)}_getCellSortableValue(e){if(!e)return``;let t=e,n=this._getSortableAttributeValue(t);if(n)return n;let r=[],i=t.textContent?.replace(/\s+/g,` `).trim();return i&&r.push(i),t.querySelectorAll(`[data-sort-value], [data-sort], [aria-label], [label], [value], [title]`).forEach(e=>{let t=this._getSortableAttributeValue(e);t&&!r.includes(t)&&r.push(t)}),r.join(` `).trim()}_getSortableAttributeValue(e){return(e.getAttribute(`data-sort-value`)??e.getAttribute(`data-sort`)??e.getAttribute(`aria-label`)??e.getAttribute(`label`)??e.getAttribute(`value`)??e.getAttribute(`title`)??``).replace(/\s+/g,` `).trim()}_compareCellValues(e,t,n){let r=this._parseSortableNumber(e),i=this._parseSortableNumber(t);if(r!==null&&i!==null)return n===`asc`?r-i:i-r;let a=Date.parse(e.replace(/\s+/g,` `)),o=Date.parse(t.replace(/\s+/g,` `));if(!isNaN(a)&&!isNaN(o))return n===`asc`?a-o:o-a;let s=e.localeCompare(t,`sv`);return n===`asc`?s:-s}_parseSortableNumber(e){let t=e.trim();if(!/^[+-]?(?:\d+|\d{1,3}(?:[\s\u00a0\u202f]\d{3})+)(?:[,.]\d+)?$/.test(t))return null;let n=Number(t.replace(/[\s\u00a0\u202f]/g,``).replace(`,`,`.`));return Number.isNaN(n)?null:n}_updateTotalRows(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),n&&(this.totalRows=this._getTopLevelRows(n).length,this._ensureCurrentPageWithinBounds())}_paginateTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r;r=this._filteredRows?this._filteredRows:this._getTopLevelRows(n),this._getTopLevelRows(n).forEach(e=>e.style.display=`none`);let i=(this.currentPage-1)*this.pageSize,a=i+this.pageSize;r.slice(i,a).forEach(e=>e.style.display=``)}_changePage(e){let t=Math.ceil(this.totalRows/this.pageSize);e<1||e>t||(this.currentPage=e,this._paginateTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0})),this.requestUpdate())}};N([_({type:String})],ep.prototype,`searchTerm`,void 0),N([_({type:Boolean,attribute:`with-pagination`})],ep.prototype,`pagination`,void 0),N([_({type:Boolean,attribute:`with-filtering-search`})],ep.prototype,`filteringSearch`,void 0),N([_({type:Boolean,attribute:`no-scroll`})],ep.prototype,`noScroll`,void 0),N([_({type:Number,attribute:`page-size`})],ep.prototype,`pageSize`,void 0),N([_({type:Array,attribute:`disable-sorting`})],ep.prototype,`disableSorting`,void 0),N([_({type:Number})],ep.prototype,`currentPage`,void 0),N([_({type:Number})],ep.prototype,`totalRows`,void 0),ep=N([a(`scb-table-advanced`)],ep),b(),w(),D(),P();var tp=class extends Ms{constructor(...e){super(...e),this.iconOnly=!1,this.inlineIcon=!1,this.href=``,this._onActivate=e=>{let t=this.textContent?.trim()??``;this.href&&(e.preventDefault(),e.stopPropagation()),this.dispatchEvent(new CustomEvent(`activate`,{detail:{label:t,href:this.href},bubbles:!0,composed:!0})),this.href&&window.location.assign(this.href)}}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tab`)}get icon(){return this._icon}set icon(e){let t=this._icon;t!==e&&(this._icon=e,this.requestUpdate(`icon`,t),this.updateIconSlot())}firstUpdated(e){super.firstUpdated(e),this.addEventListener(`click`,this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.setAttribute(`aria-selected`,this.active?`true`:`false`),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}}static{this.styles=[...Ms.styles,p`
16880
+ `}_onSearchInput(e){let t=e.target.value;this.searchTerm=t,this._filterTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0}))}_filterTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r=n,i=this._getTopLevelRows(r),a=this.searchTerm.trim().toLowerCase();if(!a)this._filteredRows=null,i.forEach(e=>e.style.display=``),this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this.pagination&&this._paginateTable(),this._sortedColumn!==null&&this._sortTable(this._sortedColumn,this._sortDirection);else{this._filteredRows=i.filter(e=>this._getRowSearchText(e).toLowerCase().includes(a)),i.forEach(e=>e.style.display=`none`);let e=this._filteredRows;this._sortedColumn!==null&&(e=[...e],e.sort((e,t)=>{let n=this._getCellSortableValue(e.children[this._sortedColumn]),r=this._getCellSortableValue(t.children[this._sortedColumn]);return this._compareCellValues(n,r,this._sortDirection)}),this._filteredRows=e),this.totalRows=this._filteredRows.length,this._ensureCurrentPageWithinBounds(),this.pagination?this._paginateTable():this._filteredRows.forEach(e=>e.style.display=``)}}firstUpdated(){let e=this.shadowRoot.querySelector(`slot`);e&&(e.addEventListener(`slotchange`,()=>this._attachThListeners()),this._attachThListeners(),this._attachTbodyObserver(),this._initialTableRefreshFrame=requestAnimationFrame(()=>{this._initialTableRefreshFrame=0,this.isConnected&&this._refreshFromTableContent()}))}updated(e){super.updated(e),e.has(`disableSorting`)&&this._sortedColumn!==null&&!this._isColumnSortable(this._sortedColumn)&&(this._sortedColumn=null,this._sortDirection=`asc`),(e.has(`searchTerm`)||e.has(`currentPage`)||e.has(`pageSize`)||e.has(`filteringSearch`)||e.has(`pagination`)||e.has(`disableSorting`))&&this.updateComplete.then(()=>{this.isConnected&&this._refreshFromTableContent()}),this.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>{e.setAttribute(`size`,M(this,`--scb-table-advanced-sort-icon-button-size`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`))})}_disconnectTbodyObserver(){this._tbodyObserver&&=(this._tbodyObserver.disconnect(),null),this._observedTbody=null}_attachTbodyObserver(){let e=this._getTbody();if(!e){this._disconnectTbodyObserver();return}this._observedTbody!==e&&(this._disconnectTbodyObserver(),this._observedTbody=e,this._tbodyObserver=new MutationObserver(()=>{this._suppressTbodyObserver||this._scheduleTableRefresh()}),this._tbodyObserver.observe(e,{childList:!0,subtree:!0,characterData:!0}))}_scheduleTableRefresh(){this._pendingTableRefresh||(this._pendingTableRefresh=!0,queueMicrotask(()=>{this._pendingTableRefresh=!1,this._refreshFromTableContent()}))}_refreshFromTableContent(){if(this._attachTbodyObserver(),this.filteringSearch){this._filterTable();return}if(this._updateTotalRows(),this._ensureCurrentPageWithinBounds(),this._sortedColumn!==null){this._sortTable(this._sortedColumn,this._sortDirection);return}this.pagination&&this._paginateTable()}_ensureCurrentPageWithinBounds(){let e=Math.max(1,Math.ceil(this.totalRows/this.pageSize)),t=Math.min(Math.max(1,this.currentPage),e);t!==this.currentPage&&(this.currentPage=t)}_getTbody(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return null;let t=e.assignedNodes({flatten:!0});for(let e of t)if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);if(t)return t}return null}_getTopLevelRows(e){return Array.from(e.children).filter(e=>e instanceof HTMLTableRowElement)}_attachThListeners(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=[],r=[],i=[],a=[];t.forEach(e=>{e.nodeType===Node.ELEMENT_NODE&&(Array.from(e.querySelectorAll(`thead`)).forEach(e=>{n.push(...Array.from(e.querySelectorAll(`th`)))}),r.push(...e.querySelectorAll(`th`)),i.push(...e.querySelectorAll(`td`)),a.push(...e.querySelectorAll(`tr`)))}),r.forEach(e=>{let t=n.indexOf(e),r=t!==-1;e.style.textAlign=`left`,e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline-end) var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.position=`relative`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-header-font)`,e.style.fontSize=`var(--scb-table-header-font-size)`,e.style.lineHeight=`var(--scb-table-header-line-height)`,e.style.fontWeight=`var(--scb-table-header-font-weight)`,e.style.letterSpacing=`var(--scb-table-header-letter-spacing)`,e.style.verticalAlign=`middle`,this._removeGeneratedSortMarkup(e),e.hasAttribute(`scope`)||(r?e.setAttribute(`scope`,`col`):e.closest(`tbody`)&&e.setAttribute(`scope`,`row`));let i=this._getOrCreateHeaderLabel(e,t);if((i instanceof HTMLParagraphElement||i.getAttribute(`data-scb-generated-label`)===`true`)&&this._applyGeneratedCellTextReset(i),!r){e.removeAttribute(`aria-sort`);return}if(!this._isColumnSortable(t)){e.removeAttribute(`aria-sort`);return}e.setAttribute(`aria-sort`,this._getHeaderAriaSort(t));let a=this._getNormalizedText(i.textContent)||`kolumn ${Math.max(t,0)+1}`,o=document.createElement(`scb-icon-button`);o.className=`scb-sort-icon`,o.onclick=()=>this._onThClick(t),o.setAttribute(`variant`,`standard`),o.setAttribute(`size`,M(this,`--scb-table-advanced-sort-icon-button-size`,[`tiny`,`extra-small`,`small`,`medium`,`large`],`small`)),o.setAttribute(`aria-label`,this._getSortButtonLabel(a,t)),o.style.alignSelf=`center`,this._sortedColumn===t?(o.setAttribute(`variant`,`filled-tonal`),o.setAttribute(`icon`,this._sortDirection===`asc`?`arrow_downward`:`arrow_upward`)):(o.setAttribute(`icon`,`swap_horiz`),o.style.transform+=` rotate(90deg)`),this._wrapHeaderWithSortControl(e,i,o)}),i.forEach(e=>{e.style.padding=`var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline-end) var(--scb-table-cell-padding-block) var(--scb-table-cell-padding-inline)`,e.style.textAlign=`left`,e.style.borderTop=`1px solid var(--scb-tables-outline-color, var(--md-sys-color-outline-variant))`,e.style.verticalAlign=`text-top`,e.style.backgroundColor=`var(--scb-tables-surface-color, var(--md-sys-color-surface))`,e.style.fontFamily=`var(--scb-table-cell-font)`,e.style.fontSize=`var(--scb-table-cell-font-size)`,e.style.lineHeight=`var(--scb-table-cell-line-height)`,e.style.fontWeight=`var(--scb-table-cell-font-weight)`,e.style.letterSpacing=`var(--scb-table-cell-letter-spacing)`}),a.forEach((e,t)=>{t%2==1&&e.querySelectorAll(`td`).forEach(e=>{e.style.backgroundColor=`var(--scb-background-row)`});let n=e.querySelectorAll(`th`);n.length>0&&n.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`var(--scb-table-cell-edge-padding-inline)`),t===n.length-1?e.style.paddingRight=`var(--scb-table-cell-edge-padding-inline)`:e.style.paddingRight=``});let r=e.querySelectorAll(`td`);r.length>0&&r.forEach((e,t)=>{t===0&&(e.style.paddingLeft=`var(--scb-table-cell-edge-padding-inline)`),t===r.length-1?e.style.paddingRight=`var(--scb-table-cell-edge-padding-inline)`:e.style.paddingRight=``})}),this.pagination&&this._paginateTable()}_applyGeneratedCellTextReset(e){e.style.margin=`0`,e.style.color=`inherit`,e.style.fontFamily=`inherit`,e.style.fontSize=`inherit`,e.style.lineHeight=`inherit`,e.style.fontWeight=`inherit`,e.style.letterSpacing=`inherit`}_removeGeneratedSortMarkup(e){e.querySelectorAll(`scb-icon-button.scb-sort-icon`).forEach(e=>e.remove());let t=e.querySelector(`:scope > [data-scb-sort-header="true"]`);if(!(t instanceof HTMLElement))return;let n=t.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement){t.replaceWith(n);return}t.remove()}_getOrCreateHeaderLabel(e,t){let n=e.querySelector(`:scope > [data-scb-sort-label="true"]`);if(n instanceof HTMLElement)return n;let r=e.querySelector(`:scope > p`);if(r instanceof HTMLParagraphElement)return r.setAttribute(`data-scb-sort-label`,`true`),r;let i=Array.from(e.children).find(e=>e instanceof HTMLElement&&!e.matches(`scb-icon-button.scb-sort-icon`));if(i)return i.setAttribute(`data-scb-sort-label`,`true`),i;let a=document.createElement(`p`);return a.setAttribute(`data-scb-sort-label`,`true`),a.setAttribute(`data-scb-generated-label`,`true`),a.textContent=this._getNormalizedText(e.textContent)||`kolumn ${Math.max(t,0)+1}`,e.textContent=``,e.appendChild(a),a}_wrapHeaderWithSortControl(e,t,n){let r=document.createElement(`div`);r.setAttribute(`data-scb-sort-header`,`true`),r.style.display=`flex`,r.style.gap=`8px`,r.style.flexWrap=`nowrap`,r.style.alignItems=`center`,r.appendChild(t),r.appendChild(n),e.appendChild(r)}_getNormalizedText(e){return(e??``).replace(/\s+/g,` `).trim()}_onThClick(e){this._isColumnSortable(e)&&(this._sortedColumn===e?this._sortDirection=this._sortDirection===`asc`?`desc`:`asc`:(this._sortedColumn=e,this._sortDirection=`asc`),this._sortTable(e,this._sortDirection),this._attachThListeners())}_getHeaderAriaSort(e){return this._sortedColumn===e?this._sortDirection===`asc`?`ascending`:`descending`:`none`}_getSortButtonLabel(e,t){return`Sortera ${e||`kolumn ${t+1}`} ${this._sortedColumn===t&&this._sortDirection===`asc`?`fallande`:`stigande`}`}_isColumnSortable(e){return!(Array.isArray(this.disableSorting)?this.disableSorting:[]).some(t=>Number(t)===e)}_sortTable(e,t){if(!this._isColumnSortable(e))return;let n=this.shadowRoot.querySelector(`slot`);if(!n)return;let r=n.assignedNodes({flatten:!0}),i=null;if(r.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(i=t)}}),!i)return;let a;a=this._filteredRows?[...this._filteredRows]:this._getTopLevelRows(i),a.sort((n,r)=>{let i=this._getCellSortableValue(n.children[e]),a=this._getCellSortableValue(r.children[e]);return this._compareCellValues(i,a,t)});let o=this._tbodyObserver!==null;o&&this._disconnectTbodyObserver();try{a.forEach(e=>i.appendChild(e))}finally{o&&this._attachTbodyObserver()}this._filteredRows&&(this._filteredRows=a,this.totalRows=this._filteredRows.length),this.pagination&&this._paginateTable()}_getRowSearchText(e){return Array.from(e.cells).map(e=>this._getCellSortableValue(e)).join(` `)}_getCellSortableValue(e){if(!e)return``;let t=e,n=this._getSortableAttributeValue(t);if(n)return n;let r=[],i=t.textContent?.replace(/\s+/g,` `).trim();return i&&r.push(i),t.querySelectorAll(`[data-sort-value], [data-sort], [aria-label], [label], [value], [title]`).forEach(e=>{let t=this._getSortableAttributeValue(e);t&&!r.includes(t)&&r.push(t)}),r.join(` `).trim()}_getSortableAttributeValue(e){return(e.getAttribute(`data-sort-value`)??e.getAttribute(`data-sort`)??e.getAttribute(`aria-label`)??e.getAttribute(`label`)??e.getAttribute(`value`)??e.getAttribute(`title`)??``).replace(/\s+/g,` `).trim()}_compareCellValues(e,t,n){let r=this._parseSortableNumber(e),i=this._parseSortableNumber(t);if(r!==null&&i!==null)return n===`asc`?r-i:i-r;let a=Date.parse(e.replace(/\s+/g,` `)),o=Date.parse(t.replace(/\s+/g,` `));if(!isNaN(a)&&!isNaN(o))return n===`asc`?a-o:o-a;let s=e.localeCompare(t,`sv`);return n===`asc`?s:-s}_parseSortableNumber(e){let t=e.trim();if(!/^[+-]?(?:\d+|\d{1,3}(?:[\s\u00a0\u202f]\d{3})+)(?:[,.]\d+)?$/.test(t))return null;let n=Number(t.replace(/[\s\u00a0\u202f]/g,``).replace(`,`,`.`));return Number.isNaN(n)?null:n}_updateTotalRows(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),n&&(this.totalRows=this._getTopLevelRows(n).length,this._ensureCurrentPageWithinBounds())}_paginateTable(){let e=this.shadowRoot.querySelector(`slot`);if(!e)return;let t=e.assignedNodes({flatten:!0}),n=null;if(t.forEach(e=>{if(e.nodeType===Node.ELEMENT_NODE){let t=e.querySelector(`tbody`);t&&(n=t)}}),!n)return;let r;r=this._filteredRows?this._filteredRows:this._getTopLevelRows(n),this._getTopLevelRows(n).forEach(e=>e.style.display=`none`);let i=(this.currentPage-1)*this.pageSize,a=i+this.pageSize;r.slice(i,a).forEach(e=>e.style.display=``)}_changePage(e){let t=Math.ceil(this.totalRows/this.pageSize);e<1||e>t||(this.currentPage=e,this._paginateTable(),this.dispatchEvent(new CustomEvent(`tableadvancedchange`,{detail:{searchTerm:this.searchTerm,currentPage:this.currentPage},bubbles:!0,composed:!0})),this.requestUpdate())}};N([_({type:String})],ep.prototype,`searchTerm`,void 0),N([_({type:Boolean,attribute:`with-pagination`})],ep.prototype,`pagination`,void 0),N([_({type:Boolean,attribute:`with-filtering-search`})],ep.prototype,`filteringSearch`,void 0),N([_({type:Boolean,attribute:`no-scroll`})],ep.prototype,`noScroll`,void 0),N([_({type:Number,attribute:`page-size`})],ep.prototype,`pageSize`,void 0),N([_({type:Array,attribute:`disable-sorting`})],ep.prototype,`disableSorting`,void 0),N([_({type:Number})],ep.prototype,`currentPage`,void 0),N([_({type:Number})],ep.prototype,`totalRows`,void 0),ep=N([a(`scb-table-advanced`)],ep),b(),w(),D(),P();var tp=class extends Ms{constructor(...e){super(...e),this.iconOnly=!1,this.inlineIcon=!1,this._onActivate=()=>{let e=this.textContent?.trim()??``;this.dispatchEvent(new CustomEvent(`activate`,{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tab`)}get icon(){return this._icon}set icon(e){let t=this._icon;t!==e&&(this._icon=e,this.requestUpdate(`icon`,t),this.updateIconSlot())}firstUpdated(e){super.firstUpdated(e),this.addEventListener(`click`,this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.setAttribute(`aria-selected`,this.active?`true`:`false`),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}}static{this.styles=[...Ms.styles,p`
16882
16881
  :host {
16883
16882
  /* Storlek och text styrs via tabs i src/tokens/source/component-size-model.json. */
16884
16883
  --md-primary-tab-container-height: var(--scb-tabs-height, var(--scale-11, 48px));
@@ -16912,7 +16911,7 @@
16912
16911
  :host([icon-only]) slot:not([name='icon']) {
16913
16912
  display: none;
16914
16913
  }
16915
- `]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};N([_({type:String})],tp.prototype,`icon`,null),N([_({type:Boolean,reflect:!0,attribute:`icon-only`})],tp.prototype,`iconOnly`,void 0),N([_({type:Boolean,reflect:!0,attribute:`inline-icon`})],tp.prototype,`inlineIcon`,void 0),N([_({type:String,reflect:!0})],tp.prototype,`href`,void 0),tp=N([a(`scb-primary-tab`)],tp),b(),w(),D(),P();var np=class extends Fs{constructor(...e){super(...e),this.iconOnly=!1,this.href=``,this._onActivate=e=>{let t=this.textContent?.trim()??``;this.href&&(e.preventDefault(),e.stopPropagation()),this.dispatchEvent(new CustomEvent(`activate`,{detail:{label:t,href:this.href},bubbles:!0,composed:!0})),this.href&&window.location.assign(this.href)}}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tab`)}get icon(){return this._icon}set icon(e){let t=this._icon;t!==e&&(this._icon=e,this.requestUpdate(`icon`,t),this.updateIconSlot())}firstUpdated(e){if(super.firstUpdated(e),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}this.addEventListener(`click`,this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}}static{this.styles=[...Fs.styles,p`
16914
+ `]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};N([_({type:String})],tp.prototype,`icon`,null),N([_({type:Boolean,reflect:!0,attribute:`icon-only`})],tp.prototype,`iconOnly`,void 0),N([_({type:Boolean,reflect:!0,attribute:`inline-icon`})],tp.prototype,`inlineIcon`,void 0),tp=N([a(`scb-primary-tab`)],tp),b(),w(),D(),P();var np=class extends Fs{constructor(...e){super(...e),this.iconOnly=!1,this._onActivate=()=>{let e=this.textContent?.trim()??``;this.dispatchEvent(new CustomEvent(`activate`,{detail:{label:e},bubbles:!0,composed:!0}))}}connectedCallback(){super.connectedCallback(),this.setAttribute(`role`,`tab`)}get icon(){return this._icon}set icon(e){let t=this._icon;t!==e&&(this._icon=e,this.requestUpdate(`icon`,t),this.updateIconSlot())}firstUpdated(e){if(super.firstUpdated(e),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}this.addEventListener(`click`,this._onActivate),this._icon&&this.updateIconSlot()}updated(){if(super.updated(),this.iconOnly&&!this.hasAttribute(`aria-label`)){let e=this.textContent?.trim()??``;e&&this.setAttribute(`aria-label`,e)}}static{this.styles=[...Fs.styles,p`
16916
16915
  :host {
16917
16916
  /* Storlek och text styrs via tabs i src/tokens/source/component-size-model.json. */
16918
16917
  --md-secondary-tab-container-height: var(--scb-tabs-height, var(--scale-11, 48px));
@@ -16932,7 +16931,7 @@
16932
16931
  :host([icon-only]) slot:not([name='icon']) {
16933
16932
  display: none;
16934
16933
  }
16935
- `]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};N([_({type:String})],np.prototype,`icon`,null),N([_({type:Boolean,reflect:!0,attribute:`icon-only`})],np.prototype,`iconOnly`,void 0),N([_({type:String,reflect:!0})],np.prototype,`href`,void 0),np=N([a(`scb-secondary-tab`)],np),b(),w(),P();var rp=class extends zs{constructor(...e){super(...e),this.ariaLabel=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._isDispatching=!1,this._onChange=e=>{if(!e.composed&&!this._isDispatching){e.stopPropagation(),this._isDispatching=!0;let t=e.target.activeTabIndex;this.dispatchEvent(new CustomEvent(`change`,{detail:{activeTabIndex:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`tabschange`,{detail:{activeTabIndex:t},bubbles:!0,composed:!0})),this._isDispatching=!1}}}static{this.styles=[...zs.styles,p`
16934
+ `]}updateIconSlot(){let e=this.querySelector(`md-icon[slot="icon"]`);if(!this._icon){e?.remove();return}if(e)e.textContent=this._icon;else{let e=document.createElement(`md-icon`);e.setAttribute(`slot`,`icon`),e.textContent=this._icon,this.appendChild(e)}}};N([_({type:String})],np.prototype,`icon`,null),N([_({type:Boolean,reflect:!0,attribute:`icon-only`})],np.prototype,`iconOnly`,void 0),np=N([a(`scb-secondary-tab`)],np),b(),w(),P();var rp=class extends zs{constructor(...e){super(...e),this.ariaLabel=``,this.spacing=void 0,this.spacingTop=void 0,this.spacingBottom=void 0,this.spacingLeft=void 0,this.spacingRight=void 0,this._isDispatching=!1,this._onChange=e=>{if(!e.composed&&!this._isDispatching){e.stopPropagation(),this._isDispatching=!0;let t=e.target.activeTabIndex;this.dispatchEvent(new CustomEvent(`change`,{detail:{activeTabIndex:t},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent(`tabschange`,{detail:{activeTabIndex:t},bubbles:!0,composed:!0})),this._isDispatching=!1}}}static{this.styles=[...zs.styles,p`
16936
16935
  :host {
16937
16936
  /* Storlek och text styrs via tabs i src/tokens/source/component-size-model.json. */
16938
16937
  --md-primary-tab-container-height: var(--scb-tabs-height, var(--scale-11, 48px));