@kubex/zinc 1.1.36 → 1.1.37

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.
@@ -39898,7 +39898,7 @@
39898
39898
  "package": {
39899
39899
  "name": "@kubex/zinc",
39900
39900
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
39901
- "version": "1.1.36",
39901
+ "version": "1.1.37",
39902
39902
  "author": "",
39903
39903
  "license": "MIT"
39904
39904
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@kubex/zinc",
4
- "version": "1.1.36",
4
+ "version": "1.1.37",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
package/dist/zn.min.js CHANGED
@@ -1337,7 +1337,7 @@ import{a as _n,b as D1,c as nr,d as c,e as B}from"./chunks/zn.UBLZO6CI.js";var J
1337
1337
  </div>
1338
1338
  <slot name="bottom"></slot>
1339
1339
  </div>
1340
- `}};$t.styles=T(rv),c([p({attribute:"master-id",reflect:!0})],$t.prototype,"masterId",2),c([p({attribute:"default-uri",reflect:!0})],$t.prototype,"defaultUri",2),c([p({attribute:"active",reflect:!0})],$t.prototype,"_current",2),c([p({attribute:"split",type:Number,reflect:!0})],$t.prototype,"_split",2),c([p({attribute:"split-min",type:Number,reflect:!0})],$t.prototype,"_splitMin",2),c([p({attribute:"split-min-secondary",type:Number,reflect:!0})],$t.prototype,"_splitMinSecondary",2),c([p({attribute:"split-max",type:Number,reflect:!0})],$t.prototype,"_splitMax",2),c([p({attribute:"primary-caption",reflect:!0})],$t.prototype,"primaryCaption",2),c([p({attribute:"secondary-caption",reflect:!0})],$t.prototype,"secondaryCaption",2),c([p({attribute:"no-prefetch",type:Boolean,reflect:!0})],$t.prototype,"noPrefetch",2),c([p({attribute:"no-cache",type:Boolean,reflect:!0})],$t.prototype,"noCache",2),c([p({attribute:"local-storage",type:Boolean,reflect:!0})],$t.prototype,"localStorage",2),c([p({attribute:"store-key"})],$t.prototype,"storeKey",2),c([p({attribute:"store-ttl",type:Number,reflect:!0})],$t.prototype,"storeTtl",2),c([p({attribute:"padded",type:Boolean,reflect:!0})],$t.prototype,"padded",2),c([p({attribute:"fetch-style",type:String,reflect:!0})],$t.prototype,"fetchStyle",2),c([p({attribute:"full-width",type:Boolean,reflect:!0})],$t.prototype,"fullWidth",2),c([p({attribute:"padded-right",type:Boolean,reflect:!0})],$t.prototype,"paddedRight",2),c([p()],$t.prototype,"monitor",2),c([p()],$t.prototype,"caption",2),c([p()],$t.prototype,"description",2);var qn=$t;$t.define("zn-tabs");var ov=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}@container (width > 1024px){:host{--zn-gutter:16px}}@container (width > 1400px){:host{--zn-gutter:24px}}@container (width > 1500px){:host{--zn-gutter:32px}}:host{display:block;width:100%;height:100%;min-height:0;container-type:inline-size;--zn-page-content-background:var(--zn-body);--zn-page-header-background:var(--zn-page-surface-background,var(--zn-page-background,var(--zn-body)))}:host([panel]){--zn-page-content-background:var(--zn-panel)}:host([panel-head]){--zn-page-header-background:var(--zn-panel)}:host([panel-nav]){--zn-active-nav-background:var(--zn-panel)}.page__header{flex:0 0 auto;position:sticky;top:0;z-index:2;box-sizing:border-box;background:rgba(var(--zn-page-header-background),95%)}.page__header::after{content:"";position:absolute;right:var(--zn-base-gap);bottom:0;left:var(--zn-base-gap);height:1px;background:rgb(var(--zn-border-color));opacity:0;transition:opacity 180ms ease-in-out;pointer-events:none}.page__header--scrolled-no-navigation::after{opacity:1}.header{display:flex;flex-direction:column;position:relative;margin:0;padding:calc(var(--zn-base-px) * 3) var(--zn-base-gap) calc(var(--zn-base-px) * 3 - var(--zn-base-gap)) var(--zn-base-gap)}.header.header--has-navigation{padding:calc(var(--zn-base-px) * 3) var(--zn-base-gap)}.header .content{display:flex;flex-wrap:wrap;position:relative;width:100%;max-width:100%;height:-moz-fit-content;height:fit-content;gap:var(--zn-base-gap);margin:0 auto;padding:0;box-sizing:border-box}.header--has-navigation .content{min-height:36px}.header .caption{flex-grow:1;display:flex;align-items:flex-start;justify-content:space-between;gap:2px;max-width:100%;min-height:36px}.header .caption a{display:flex;align-items:center;color:inherit;text-decoration:none}.header__left{display:flex;justify-content:flex-start;flex-direction:column;gap:var(--zn-spacing-x-small);min-height:36px;flex-shrink:1;max-width:100%}.header__right{flex-grow:1;flex-shrink:1;overflow:hidden;min-width:20px}.header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);color:rgba(var(--zn-text-panel-title),100%);line-height:18px;margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;gap:var(--zn-spacing-x-small);align-items:center;text-wrap:auto}.header__description{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-font-size);font-weight:var(--zn-text-subheading-font-weight);line-height:var(--zn-text-subheading-line-height);color:var(--zn-text-subheading-color);text-transform:var(--zn-text-subheading-transform);display:block}.header .breadcrumb{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font:inherit;color:inherit}.header .breadcrumb::slotted(a){font:inherit;color:inherit;text-decoration:inherit}.header .breadcrumb::slotted(a:hover){color:rgb(var(--zn-primary))}.header .breadcrumb::slotted([data-breadcrumb-separator]){color:rgb(var(--zn-text-muted))}.header .breadcrumb__separator{color:rgb(var(--zn-text-muted))}.header slot{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-x-small);word-break:break-word}.header slot[name=actions]{justify-content:end;flex-wrap:nowrap}.header slot[name=actions]::slotted(zn-button-menu){flex-grow:1;flex-shrink:1}.caption__back{display:flex;justify-content:center;align-items:center;color:inherit}.alt-overlay{display:none}.alt-overlay--visible{display:flex}:host(.alt-pressed) .alt-overlay:empty{display:none !important}:host(.alt-pressed) .alt-overlay{display:flex}.alt-overlay{gap:10px;align-items:flex-end;position:absolute;left:0;top:0;padding:6px 15px;background:rgba(var(--zn-panel),0.95);z-index:10}.alt-overlay a{display:flex}.alt-overlay zn-icon:hover{color:rgb(var(--zn-primary));cursor:pointer}.page{display:flex;flex-direction:column;position:relative;height:100%;min-height:0;max-height:100%;width:100%;max-width:100%;overflow:auto;box-sizing:border-box;padding:0}.page__tabs{flex-grow:1;display:flex;flex-direction:column;min-height:0;width:100%;overflow:visible;box-sizing:border-box;padding:0 var(--zn-base-gap) var(--zn-base-gap);background:rgb(var(--zn-page-content-background,var(--zn-body)))}.page__tabs .page__content{display:flex;flex-direction:column;flex-grow:1;min-height:0;max-width:100%;width:100%;overflow:visible;box-sizing:border-box}.page__tabs #content ::slotted(zn-tab){display:block !important}:host([flush]) .page__tabs,:host([flush]) .page__tabs .page__content#content{padding:0}zn-navbar::part(navbar){height:40px;min-height:40px;max-height:40px;padding-left:var(--zn-base-gap);margin:0}zn-navbar::part(navbar-item){height:40px;box-sizing:border-box;font-size:var(--zn-font-size-medium);line-height:16px}:host .page__header{padding-inline:0}:host .header{padding-inline:calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}:host zn-navbar::part(navbar){padding-inline:calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}:host .page__tabs{padding:0}:host .page__tabs #content.page__content{padding:0 var(--zn-gutter,0)}`;var ze=class extends qn{constructor(){super(...arguments);this.pageSlotController=new J(this,"breadcrumb","actions","caption");this.modal=!1;this.nested=!1;this.primary=!1;this.scrolled=!1;this.tabDefinitions=[];this.hasExpandingActions=!1;this.actionObserver=null;this.tabObserver=null;this.handleAltPress=()=>{this.classList.toggle("alt-pressed",!0)};this.handleAltUp=()=>{this.classList.toggle("alt-pressed",!1)};this.handleBreadcrumbSlotChange=t=>{let n=t.target.assignedElements(),a=n.filter(s=>s.tagName==="A");n.forEach(s=>{if(!s.hasAttribute("data-breadcrumb-separator"))return;let l=s.previousElementSibling;l?.tagName==="A"&&a.indexOf(l)<a.length-1||s.remove()}),a.forEach((s,l)=>{if(l===a.length-1||s.nextElementSibling?.hasAttribute("data-breadcrumb-separator"))return;let h=document.createElement("zn-icon");h.setAttribute("src","arrow-right@lu"),h.setAttribute("size","16"),h.setAttribute("slot","breadcrumb"),h.setAttribute("data-breadcrumb-separator",""),s.after(h)})};this._registerTabs=()=>{this.registerPageNavigationTabs()}}async connectedCallback(){let t=super.connectedCallback();window.addEventListener("alt-press",this.handleAltPress),window.addEventListener("alt-up",this.handleAltUp),this.prepareTabs(),this.refreshExpandingActionsState(),this.tabObserver=new MutationObserver(r=>{r.some(n=>n.type==="childList")&&this.prepareTabs()}),this.tabObserver.observe(this,{childList:!0}),this.actionObserver=new MutationObserver(r=>{r.some(n=>n.type==="childList")&&(this.refreshExpandingActionsState(),this.syncExpandingActionsToNavbar())}),this.actionObserver.observe(this,{childList:!0,subtree:!0}),await t}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("alt-press",this.handleAltPress),window.removeEventListener("alt-up",this.handleAltUp),this.tabObserver?.disconnect(),this.tabObserver=null,this.actionObserver?.disconnect(),this.actionObserver=null}firstUpdated(t){super.firstUpdated(t),this.registerPagePanels(),this.syncExpandingActionsToNavbar(),setTimeout(()=>this.activateInitialPageTab(),20)}getOwnExpandingActions(){return Array.from(this.querySelectorAll("zn-expanding-action")).filter(t=>t.closest("zn-page")===this)}getNavbar(){return this.shadowRoot?.querySelector("zn-navbar")||null}refreshExpandingActionsState(){let t=this.getNavbar(),r=!!(t?.querySelector("zn-expanding-action")||t?.shadowRoot?.querySelector("zn-expanding-action")),n=this.getOwnExpandingActions().length>0||r;this.hasExpandingActions!==n&&(this.hasExpandingActions=n)}syncExpandingActionsToNavbar(){let t=this.getNavbar();t&&(this.getOwnExpandingActions().forEach(r=>t.addExpandingAction(r)),this.refreshExpandingActionsState())}prepareTabs(){let t=[],r=new Set;Array.from(this.children).filter(a=>a.tagName==="ZN-TAB").forEach((a,s)=>{let l=a.getAttribute("caption")||"Tab",d=a.getAttribute("id"),h=this.uniqueId(d!==null?d:this.captionToId(l),r),m=this.parsePriority(a.getAttribute("priority")),f=a.getAttribute("uri"),g=f?null:`page-tab-${s}`,b=a.hasAttribute("selected");a.id=h,f||(a.slot=g),t.push({id:h,caption:l,priority:m,sourceIndex:s,uri:f,slotName:g,selected:b})}),this.tabDefinitions=t.sort((a,s)=>this.compareTabs(a,s))}parsePriority(t){if(t===null||t.trim()==="")return null;let r=Number(t);return Number.isFinite(r)?r:null}compareTabs(t,r){return t.id===""&&r.id!==""?-1:t.id!==""&&r.id===""?1:t.priority!==null&&r.priority!==null&&t.priority!==r.priority?t.priority-r.priority:t.priority!==null&&r.priority===null?-1:t.priority===null&&r.priority!==null?1:t.sourceIndex-r.sourceIndex}captionToId(t){return t.trim().toLowerCase()==="overview"?"":t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"tab"}uniqueId(t,r){let n=t,a=2;for(;r.has(n);)n=t===""?`tab-${a}`:`${t}-${a}`,a+=1;return r.add(n),n}handlePageScroll(t){let r=t.currentTarget.scrollTop>24;this.scrolled!==r&&(this.scrolled=r)}updated(t){super.updated(t),t.has("tabDefinitions")&&this.registerPagePanels(),(t.has("tabDefinitions")||t.has("hasExpandingActions"))&&this.syncExpandingActionsToNavbar()}handleNavigationSelect(t){let r=t.detail.item,n=r.getAttribute("tab-uri"),a=r.getAttribute("tab");if(n){this.clickTab(r,!1),this.syncNavigationActive(r);return}a!==null&&this.activateTab(a,!0)}activateTab(t,r){this.setActiveTab(t,r,!1);let n=this.shadowRoot?.querySelector(`zn-navbar li[tab="${CSS.escape(t)}"]`);n&&this.syncNavigationActive(n)}activateInitialPageTab(){let t=this.tabDefinitions.find(a=>a.selected);if(t){this.activateTabDefinition(t);return}let r=this.shadowRoot?.querySelector("#content > div[selected]"),n=this.tabDefinitions[0];!r&&n&&this.activateTab(n.id,!1)}activateTabDefinition(t){if(t.uri){let r=this.findNavItemForUri(t.uri);if(r){this.clickTab(r,!1),this.syncNavigationActive(r);return}}this.activateTab(t.id,!1)}findNavItemForUri(t){let r=this.shadowRoot?.querySelectorAll("zn-navbar li[tab-uri]")??[];for(let n of Array.from(r))if(n.getAttribute("tab-uri")===t)return n;return null}registerPagePanels(){this.shadowRoot?.querySelectorAll("#content > div[id]").forEach(t=>{this._addPanel(t)}),this.registerPageNavigationTabs(),setTimeout(()=>this.registerPageNavigationTabs())}registerPageNavigationTabs(){this.shadowRoot?.querySelectorAll("zn-navbar li[tab], zn-navbar li[tab-uri]").forEach(t=>this._addTab(t)),this.shadowRoot?.querySelectorAll("zn-navbar").forEach(t=>{t.shadowRoot?.querySelectorAll("li[tab], li[tab-uri]").forEach(r=>this._addTab(r))})}syncNavigationActive(t){(this.shadowRoot?.querySelectorAll("zn-navbar li[tab], zn-navbar li[tab-uri]")||[]).forEach(n=>{let a=n===t;n.classList.toggle("active",a),n.classList.toggle("zn-tb-active",a)})}render(){let t=!this.modal&&!this.nested&&this.pageSlotController.test("breadcrumb"),r=this.tabDefinitions.length>1||this.hasExpandingActions,n=this.entityId,a=this.fullLocation,s=this.previousPath;return u`
1340
+ `}};$t.styles=T(rv),c([p({attribute:"master-id",reflect:!0})],$t.prototype,"masterId",2),c([p({attribute:"default-uri",reflect:!0})],$t.prototype,"defaultUri",2),c([p({attribute:"active",reflect:!0})],$t.prototype,"_current",2),c([p({attribute:"split",type:Number,reflect:!0})],$t.prototype,"_split",2),c([p({attribute:"split-min",type:Number,reflect:!0})],$t.prototype,"_splitMin",2),c([p({attribute:"split-min-secondary",type:Number,reflect:!0})],$t.prototype,"_splitMinSecondary",2),c([p({attribute:"split-max",type:Number,reflect:!0})],$t.prototype,"_splitMax",2),c([p({attribute:"primary-caption",reflect:!0})],$t.prototype,"primaryCaption",2),c([p({attribute:"secondary-caption",reflect:!0})],$t.prototype,"secondaryCaption",2),c([p({attribute:"no-prefetch",type:Boolean,reflect:!0})],$t.prototype,"noPrefetch",2),c([p({attribute:"no-cache",type:Boolean,reflect:!0})],$t.prototype,"noCache",2),c([p({attribute:"local-storage",type:Boolean,reflect:!0})],$t.prototype,"localStorage",2),c([p({attribute:"store-key"})],$t.prototype,"storeKey",2),c([p({attribute:"store-ttl",type:Number,reflect:!0})],$t.prototype,"storeTtl",2),c([p({attribute:"padded",type:Boolean,reflect:!0})],$t.prototype,"padded",2),c([p({attribute:"fetch-style",type:String,reflect:!0})],$t.prototype,"fetchStyle",2),c([p({attribute:"full-width",type:Boolean,reflect:!0})],$t.prototype,"fullWidth",2),c([p({attribute:"padded-right",type:Boolean,reflect:!0})],$t.prototype,"paddedRight",2),c([p()],$t.prototype,"monitor",2),c([p()],$t.prototype,"caption",2),c([p()],$t.prototype,"description",2);var qn=$t;$t.define("zn-tabs");var ov=A`@keyframes rotate-gradient{from{--rotate:0deg}to{--rotate:360deg}}:host{text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-transform:none}:host *,:host *::before,:host *::after{box-sizing:border-box;border-width:0;border-style:solid;border-color:rgb(var(--zn-border-color))}[hidden]{display:none !important}.width-container,.form-container,.wide-form-container{height:100%;width:100%;margin:var(--zn-default-margin,0 auto)}.width-container{max-width:var(--zn-container)}.form-container{max-width:var(--zn-container-ph)}.wide-form-container{max-width:var(--zn-container-lg)}@container (width > 1024px){:host{--zn-gutter:16px}}@container (width > 1400px){:host{--zn-gutter:24px}}@container (width > 1500px){:host{--zn-gutter:32px}}:host{display:block;width:100%;height:100%;min-height:0;container-type:inline-size;--zn-page-content-background:var(--zn-body);--zn-page-header-background:var(--zn-page-surface-background,var(--zn-page-background,var(--zn-body)))}:host([panel]){--zn-page-content-background:var(--zn-panel)}:host([panel-head]){--zn-page-header-background:var(--zn-panel)}:host([panel-nav]){--zn-active-nav-background:var(--zn-panel)}.page__header{flex:0 0 auto;position:sticky;top:0;z-index:2;box-sizing:border-box;background:rgba(var(--zn-page-header-background),95%)}.page__header::after{content:"";position:absolute;right:var(--zn-base-gap);bottom:0;left:var(--zn-base-gap);height:1px;background:rgb(var(--zn-border-color));opacity:0;transition:opacity 180ms ease-in-out;pointer-events:none}.page__header--scrolled-no-navigation::after{opacity:1}.header{display:flex;flex-direction:column;position:relative;margin:0;padding:calc(var(--zn-base-px) * 3) var(--zn-base-gap) calc(var(--zn-base-px) * 3 - var(--zn-base-gap)) var(--zn-base-gap)}.header.header--has-navigation{padding:calc(var(--zn-base-px) * 3) var(--zn-base-gap)}.header .content{display:flex;flex-wrap:wrap;position:relative;width:100%;max-width:100%;height:-moz-fit-content;height:fit-content;gap:var(--zn-base-gap);margin:0 auto;padding:0;box-sizing:border-box}.header--has-navigation .content{min-height:36px}.header .caption{flex-grow:1;display:flex;align-items:flex-start;justify-content:space-between;gap:2px;max-width:100%;min-height:36px}.header .caption a{display:flex;align-items:center;color:inherit;text-decoration:none}.header__left{display:flex;justify-content:flex-start;flex-direction:column;gap:var(--zn-spacing-x-small);min-height:36px;flex-shrink:1;max-width:100%}.header__right{flex-grow:1;flex-shrink:1;overflow:hidden;min-width:20px}.header__caption{font-weight:var(--zn-text-h1-font-weight);font-size:var(--zn-text-h1-font-size);color:rgba(var(--zn-text-panel-title),100%);line-height:var(--zn-spacing-medium);margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;display:flex;gap:var(--zn-spacing-x-small);align-items:center;text-wrap:auto}.header__description{font-family:var(--zn-font-sans);font-size:var(--zn-text-subheading-font-size);font-weight:var(--zn-text-subheading-font-weight);line-height:var(--zn-text-subheading-line-height);color:var(--zn-text-subheading-color);text-transform:var(--zn-text-subheading-transform);display:block}.header .breadcrumb{display:inline-flex;align-items:center;gap:var(--zn-spacing-2x-small);font:inherit;color:inherit}.header .breadcrumb::slotted(a){font:inherit;color:inherit;text-decoration:inherit}.header .breadcrumb::slotted(a:hover){color:rgb(var(--zn-primary))}.header .breadcrumb::slotted([data-breadcrumb-separator]){color:rgb(var(--zn-text-muted))}.header .breadcrumb__separator{color:rgb(var(--zn-text-muted))}.header slot{display:flex;align-items:center;flex-wrap:wrap;gap:var(--zn-spacing-x-small);word-break:break-word}.header slot[name=actions]{justify-content:end;flex-wrap:nowrap}.header slot[name=actions]::slotted(zn-button-menu){flex-grow:1;flex-shrink:1}.caption__back{display:flex;justify-content:center;align-items:center;color:inherit}.alt-overlay{display:none}.alt-overlay--visible{display:flex}:host(.alt-pressed) .alt-overlay:empty{display:none !important}:host(.alt-pressed) .alt-overlay{display:flex}.alt-overlay{gap:10px;align-items:flex-end;position:absolute;left:0;top:0;padding:6px 15px;background:rgba(var(--zn-panel),0.95);z-index:10}.alt-overlay a{display:flex}.alt-overlay zn-icon:hover{color:rgb(var(--zn-primary));cursor:pointer}.page{display:flex;flex-direction:column;position:relative;height:100%;min-height:0;max-height:100%;width:100%;max-width:100%;overflow:auto;box-sizing:border-box;padding:0}.page__tabs{flex-grow:1;display:flex;flex-direction:column;min-height:0;width:100%;overflow:visible;box-sizing:border-box;padding:0 var(--zn-base-gap) var(--zn-base-gap);background:rgb(var(--zn-page-content-background,var(--zn-body)))}.page__tabs .page__content{display:flex;flex-direction:column;flex-grow:1;min-height:0;max-width:100%;width:100%;overflow:visible;box-sizing:border-box}.page__tabs #content ::slotted(zn-tab){display:block !important}:host([flush]) .page__tabs,:host([flush]) .page__tabs .page__content#content{padding:0}zn-navbar::part(navbar){height:40px;min-height:40px;max-height:40px;padding-left:var(--zn-base-gap);margin:0}zn-navbar::part(navbar-item){height:40px;box-sizing:border-box;font-size:var(--zn-font-size-medium);line-height:16px}:host .page__header{padding-inline:0}:host .header{padding-inline:calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}:host zn-navbar::part(navbar){padding-inline:calc(var(--zn-gutter,0) + var(--zn-base-gap,0))}:host .page__tabs{padding:0}:host .page__tabs #content.page__content{padding:0 var(--zn-gutter,0)}`;var ze=class extends qn{constructor(){super(...arguments);this.pageSlotController=new J(this,"breadcrumb","actions","caption");this.modal=!1;this.nested=!1;this.primary=!1;this.scrolled=!1;this.tabDefinitions=[];this.hasExpandingActions=!1;this.actionObserver=null;this.tabObserver=null;this.handleAltPress=()=>{this.classList.toggle("alt-pressed",!0)};this.handleAltUp=()=>{this.classList.toggle("alt-pressed",!1)};this.handleBreadcrumbSlotChange=t=>{let n=t.target.assignedElements(),a=n.filter(s=>s.tagName==="A");n.forEach(s=>{if(!s.hasAttribute("data-breadcrumb-separator"))return;let l=s.previousElementSibling;l?.tagName==="A"&&a.indexOf(l)<a.length-1||s.remove()}),a.forEach((s,l)=>{if(l===a.length-1||s.nextElementSibling?.hasAttribute("data-breadcrumb-separator"))return;let h=document.createElement("zn-icon");h.setAttribute("src","arrow-right@lu"),h.setAttribute("size","16"),h.setAttribute("slot","breadcrumb"),h.setAttribute("data-breadcrumb-separator",""),s.after(h)})};this._registerTabs=()=>{this.registerPageNavigationTabs()}}async connectedCallback(){let t=super.connectedCallback();window.addEventListener("alt-press",this.handleAltPress),window.addEventListener("alt-up",this.handleAltUp),this.prepareTabs(),this.refreshExpandingActionsState(),this.tabObserver=new MutationObserver(r=>{r.some(n=>n.type==="childList")&&this.prepareTabs()}),this.tabObserver.observe(this,{childList:!0}),this.actionObserver=new MutationObserver(r=>{r.some(n=>n.type==="childList")&&(this.refreshExpandingActionsState(),this.syncExpandingActionsToNavbar())}),this.actionObserver.observe(this,{childList:!0,subtree:!0}),await t}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("alt-press",this.handleAltPress),window.removeEventListener("alt-up",this.handleAltUp),this.tabObserver?.disconnect(),this.tabObserver=null,this.actionObserver?.disconnect(),this.actionObserver=null}firstUpdated(t){super.firstUpdated(t),this.registerPagePanels(),this.syncExpandingActionsToNavbar(),setTimeout(()=>this.activateInitialPageTab(),20)}getOwnExpandingActions(){return Array.from(this.querySelectorAll("zn-expanding-action")).filter(t=>t.closest("zn-page")===this)}getNavbar(){return this.shadowRoot?.querySelector("zn-navbar")||null}refreshExpandingActionsState(){let t=this.getNavbar(),r=!!(t?.querySelector("zn-expanding-action")||t?.shadowRoot?.querySelector("zn-expanding-action")),n=this.getOwnExpandingActions().length>0||r;this.hasExpandingActions!==n&&(this.hasExpandingActions=n)}syncExpandingActionsToNavbar(){let t=this.getNavbar();t&&(this.getOwnExpandingActions().forEach(r=>t.addExpandingAction(r)),this.refreshExpandingActionsState())}prepareTabs(){let t=[],r=new Set;Array.from(this.children).filter(a=>a.tagName==="ZN-TAB").forEach((a,s)=>{let l=a.getAttribute("caption")||"Tab",d=a.getAttribute("id"),h=this.uniqueId(d!==null?d:this.captionToId(l),r),m=this.parsePriority(a.getAttribute("priority")),f=a.getAttribute("uri"),g=f?null:`page-tab-${s}`,b=a.hasAttribute("selected");a.id=h,f||(a.slot=g),t.push({id:h,caption:l,priority:m,sourceIndex:s,uri:f,slotName:g,selected:b})}),this.tabDefinitions=t.sort((a,s)=>this.compareTabs(a,s))}parsePriority(t){if(t===null||t.trim()==="")return null;let r=Number(t);return Number.isFinite(r)?r:null}compareTabs(t,r){return t.id===""&&r.id!==""?-1:t.id!==""&&r.id===""?1:t.priority!==null&&r.priority!==null&&t.priority!==r.priority?t.priority-r.priority:t.priority!==null&&r.priority===null?-1:t.priority===null&&r.priority!==null?1:t.sourceIndex-r.sourceIndex}captionToId(t){return t.trim().toLowerCase()==="overview"?"":t.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"tab"}uniqueId(t,r){let n=t,a=2;for(;r.has(n);)n=t===""?`tab-${a}`:`${t}-${a}`,a+=1;return r.add(n),n}handlePageScroll(t){let r=t.currentTarget.scrollTop>24;this.scrolled!==r&&(this.scrolled=r)}updated(t){super.updated(t),t.has("tabDefinitions")&&this.registerPagePanels(),(t.has("tabDefinitions")||t.has("hasExpandingActions"))&&this.syncExpandingActionsToNavbar()}handleNavigationSelect(t){let r=t.detail.item,n=r.getAttribute("tab-uri"),a=r.getAttribute("tab");if(n){this.clickTab(r,!1),this.syncNavigationActive(r);return}a!==null&&this.activateTab(a,!0)}activateTab(t,r){this.setActiveTab(t,r,!1);let n=this.shadowRoot?.querySelector(`zn-navbar li[tab="${CSS.escape(t)}"]`);n&&this.syncNavigationActive(n)}activateInitialPageTab(){let t=this.tabDefinitions.find(a=>a.selected);if(t){this.activateTabDefinition(t);return}let r=this.shadowRoot?.querySelector("#content > div[selected]"),n=this.tabDefinitions[0];!r&&n&&this.activateTab(n.id,!1)}activateTabDefinition(t){if(t.uri){let r=this.findNavItemForUri(t.uri);if(r){this.clickTab(r,!1),this.syncNavigationActive(r);return}}this.activateTab(t.id,!1)}findNavItemForUri(t){let r=this.shadowRoot?.querySelectorAll("zn-navbar li[tab-uri]")??[];for(let n of Array.from(r))if(n.getAttribute("tab-uri")===t)return n;return null}registerPagePanels(){this.shadowRoot?.querySelectorAll("#content > div[id]").forEach(t=>{this._addPanel(t)}),this.registerPageNavigationTabs(),setTimeout(()=>this.registerPageNavigationTabs())}registerPageNavigationTabs(){this.shadowRoot?.querySelectorAll("zn-navbar li[tab], zn-navbar li[tab-uri]").forEach(t=>this._addTab(t)),this.shadowRoot?.querySelectorAll("zn-navbar").forEach(t=>{t.shadowRoot?.querySelectorAll("li[tab], li[tab-uri]").forEach(r=>this._addTab(r))})}syncNavigationActive(t){(this.shadowRoot?.querySelectorAll("zn-navbar li[tab], zn-navbar li[tab-uri]")||[]).forEach(n=>{let a=n===t;n.classList.toggle("active",a),n.classList.toggle("zn-tb-active",a)})}render(){let t=!this.modal&&!this.nested&&this.pageSlotController.test("breadcrumb"),r=this.tabDefinitions.length>1||this.hasExpandingActions,n=this.entityId,a=this.fullLocation,s=this.previousPath;return u`
1341
1341
  <div class="page" part="base" @scroll="${this.handlePageScroll}">
1342
1342
  <div class="${N({page__header:!0,"page__header--scrolled-no-navigation":this.scrolled&&!r})}" part="header">
1343
1343
  <div class="${N({header:!0,"header--has-breadcrumb":t,"header--has-entity-id":n,"header--has-full-location":a,"header--has-navigation":r,"header--has-previous":s})}">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubex/zinc",
3
- "version": "1.1.36",
3
+ "version": "1.1.37",
4
4
  "description": "A collection of web components for building web applications based off of @shoelace-style/Shoelace",
5
5
  "keywords": [
6
6
  "web components",
@@ -116,7 +116,7 @@
116
116
  font-weight: var(--zn-text-h1-font-weight);
117
117
  font-size: var(--zn-text-h1-font-size);
118
118
  color: rgba(var(--zn-text-panel-title), 100%);
119
- line-height: 18px;
119
+ line-height: var(--zn-spacing-medium);
120
120
  margin: 0;
121
121
  overflow: hidden;
122
122
  white-space: nowrap;