@kodaris/krubble-app-components 1.0.127 → 1.0.128

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.
@@ -4245,7 +4245,7 @@ function ge(e,t){return(t,i,s)=>((e,t,i)=>(i.configurable=!0,i.enumerable=!0,Ref
4245
4245
  transform: scaleX(0.08);
4246
4246
  }
4247
4247
  }
4248
- `,Zt([pe({type:String})],Jt.prototype,"logo",void 0),Zt([pe({type:String})],Jt.prototype,"label",void 0),Zt([pe({type:String,attribute:"home-url"})],Jt.prototype,"homeUrl",void 0),Zt([pe({type:String,reflect:!0})],Jt.prototype,"scheme",void 0),Zt([pe({type:Array})],Jt.prototype,"nav",void 0),Zt([pe({type:Boolean,attribute:"nav-icons-displayed",reflect:!0})],Jt.prototype,"navIconsDisplayed",void 0),Zt([pe({type:Boolean,attribute:"nav-expanded"})],Jt.prototype,"navExpanded",void 0),Zt([pe({type:Object})],Jt.prototype,"user",void 0),Zt([pe({type:Boolean})],Jt.prototype,"subbar",void 0),Zt([pe({type:Boolean,attribute:"nav-enabled"})],Jt.prototype,"navEnabled",void 0),Zt([pe({type:String,attribute:"user-type"})],Jt.prototype,"userType",void 0),Zt([pe({type:Array})],Jt.prototype,"breadcrumbs",void 0),Zt([ue()],Jt.prototype,"isDev",void 0),Zt([ue()],Jt.prototype,"navItemsExpanded",void 0),Zt([ue()],Jt.prototype,"navQuery",void 0),Zt([ue()],Jt.prototype,"activeNavItemId",void 0),Zt([ue()],Jt.prototype,"isNavScrolled",void 0),Zt([ue()],Jt.prototype,"isNavOpened",void 0),Zt([ue()],Jt.prototype,"isEditing",void 0),Zt([ue()],Jt.prototype,"isUserMenuOpen",void 0),Zt([ue()],Jt.prototype,"pref",void 0),Zt([ue()],Jt.prototype,"draggedNavItemId",void 0),Zt([ue()],Jt.prototype,"navItemDropTargetId",void 0),Zt([ue()],Jt.prototype,"navItemDropPosition",void 0),Zt([ue()],Jt.prototype,"pendingRequests",void 0),customElements.get("kr-scaffold")||customElements.define("kr-scaffold",Jt);var Gt=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class ei extends le{constructor(){super(...arguments),this.label="",this.subLabel="",this.items=[],this.activeId="",this.handlePopstate=()=>{this.syncActiveFromUrl()}}connectedCallback(){super.connectedCallback(),requestAnimationFrame((()=>this.syncActiveFromUrl())),window.addEventListener("popstate",this.handlePopstate)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this.handlePopstate)}handleNavItemClick(e,t){const i=new CustomEvent("nav-item-click",{detail:{item:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(i),i.defaultPrevented&&e.preventDefault(),this.activeId=t.id}syncActiveFromUrl(){const e=window.location.pathname,t=this.items.find((t=>!!t.url&&(t.url.startsWith("/")?e===t.url:e.endsWith("/"+t.url))));t&&(this.activeId=t.id)}render(){return q`
4248
+ `,Zt([pe({type:String})],Jt.prototype,"logo",void 0),Zt([pe({type:String})],Jt.prototype,"label",void 0),Zt([pe({type:String,attribute:"home-url"})],Jt.prototype,"homeUrl",void 0),Zt([pe({type:String,reflect:!0})],Jt.prototype,"scheme",void 0),Zt([pe({type:Array})],Jt.prototype,"nav",void 0),Zt([pe({type:Boolean,attribute:"nav-icons-displayed",reflect:!0})],Jt.prototype,"navIconsDisplayed",void 0),Zt([pe({type:Boolean,attribute:"nav-expanded"})],Jt.prototype,"navExpanded",void 0),Zt([pe({type:Object})],Jt.prototype,"user",void 0),Zt([pe({type:Boolean})],Jt.prototype,"subbar",void 0),Zt([pe({type:Boolean,attribute:"nav-enabled"})],Jt.prototype,"navEnabled",void 0),Zt([pe({type:String,attribute:"user-type"})],Jt.prototype,"userType",void 0),Zt([pe({type:Array})],Jt.prototype,"breadcrumbs",void 0),Zt([ue()],Jt.prototype,"isDev",void 0),Zt([ue()],Jt.prototype,"navItemsExpanded",void 0),Zt([ue()],Jt.prototype,"navQuery",void 0),Zt([ue()],Jt.prototype,"activeNavItemId",void 0),Zt([ue()],Jt.prototype,"isNavScrolled",void 0),Zt([ue()],Jt.prototype,"isNavOpened",void 0),Zt([ue()],Jt.prototype,"isEditing",void 0),Zt([ue()],Jt.prototype,"isUserMenuOpen",void 0),Zt([ue()],Jt.prototype,"pref",void 0),Zt([ue()],Jt.prototype,"draggedNavItemId",void 0),Zt([ue()],Jt.prototype,"navItemDropTargetId",void 0),Zt([ue()],Jt.prototype,"navItemDropPosition",void 0),Zt([ue()],Jt.prototype,"pendingRequests",void 0),customElements.get("kr-scaffold")||customElements.define("kr-scaffold",Jt);var Gt=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class ei extends le{constructor(){super(...arguments),this.label="",this.subLabel="",this.items=[],this.activeId="",this.actions=[],this.maxVisibleActions=3,this.handlePopstate=()=>{this.syncActiveFromUrl()}}connectedCallback(){super.connectedCallback(),requestAnimationFrame((()=>this.syncActiveFromUrl())),window.addEventListener("popstate",this.handlePopstate)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("popstate",this.handlePopstate)}handleNavItemClick(e,t){const i=new CustomEvent("nav-item-click",{detail:{item:t},bubbles:!0,composed:!0,cancelable:!0});this.dispatchEvent(i),i.defaultPrevented&&e.preventDefault(),this.activeId=t.id}syncActiveFromUrl(){const e=window.location.pathname,t=this.items.find((t=>!!t.url&&(t.url.startsWith("/")?e===t.url:e.endsWith("/"+t.url))));t&&(this.activeId=t.id)}handleActionClick(e,t){this.dispatchEvent(new CustomEvent("action-click",{detail:{action:t.id},bubbles:!0,composed:!0}))}handleMoreSelect(e){this.dispatchEvent(new CustomEvent("action-click",{detail:{action:e.detail.id},bubbles:!0,composed:!0}))}render(){const e=this.actions.length>this.maxVisibleActions;let t=this.actions,i=[];return e&&(t=this.actions.slice(0,this.maxVisibleActions-1),i=this.actions.slice(this.maxVisibleActions-1).map((e=>({id:e.id,label:e.label})))),q`
4249
4249
  <nav class="nav">
4250
4250
  ${this.label?q`
4251
4251
  <div class="nav-header">
@@ -4268,6 +4268,31 @@ function ge(e,t){return(t,i,s)=>((e,t,i)=>(i.configurable=!0,i.enumerable=!0,Ref
4268
4268
  `))}
4269
4269
  </div>
4270
4270
  </div>
4271
+ ${this.actions.length?q`
4272
+ <div class="nav-actions">
4273
+ ${t.map((e=>q`
4274
+ <kr-button
4275
+ class="nav-actions__button"
4276
+ variant=${e.variant||"outline"}
4277
+ size="small"
4278
+ @click=${t=>this.handleActionClick(t,e)}
4279
+ >
4280
+ ${e.label}
4281
+ </kr-button>
4282
+ `))}
4283
+ ${e?q`
4284
+ <kr-button
4285
+ class="nav-actions__button"
4286
+ variant="outline"
4287
+ size="small"
4288
+ .options=${i}
4289
+ @option-select=${this.handleMoreSelect}
4290
+ >
4291
+ More
4292
+ </kr-button>
4293
+ `:V}
4294
+ </div>
4295
+ `:V}
4271
4296
  </nav>
4272
4297
  <main class="content">
4273
4298
  <div class="content__main">
@@ -4353,6 +4378,19 @@ function ge(e,t){return(t,i,s)=>((e,t,i)=>(i.configurable=!0,i.enumerable=!0,Ref
4353
4378
  font-weight: 700;
4354
4379
  }
4355
4380
 
4381
+ .nav-actions {
4382
+ display: flex;
4383
+ flex-direction: column;
4384
+ gap: 8px;
4385
+ padding: 12px 16px;
4386
+ border-top: 1px solid rgba(0, 0, 0, 0.08);
4387
+ flex-shrink: 0;
4388
+ }
4389
+
4390
+ .nav-actions__button {
4391
+ width: 100%;
4392
+ }
4393
+
4356
4394
  .content {
4357
4395
  flex: 1;
4358
4396
  min-width: 0;
@@ -4364,7 +4402,7 @@ function ge(e,t){return(t,i,s)=>((e,t,i)=>(i.configurable=!0,i.enumerable=!0,Ref
4364
4402
  flex: 1;
4365
4403
  overflow-y: auto;
4366
4404
  }
4367
- `,Gt([pe({type:String})],ei.prototype,"label",void 0),Gt([pe({type:String})],ei.prototype,"subLabel",void 0),Gt([pe({type:Array})],ei.prototype,"items",void 0),Gt([pe({type:String})],ei.prototype,"activeId",void 0),customElements.get("kr-screen-nav")||customElements.define("kr-screen-nav",ei);var ti=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class ii extends le{constructor(){super(...arguments),this.title=""}render(){return q`
4405
+ `,Gt([pe({type:String})],ei.prototype,"label",void 0),Gt([pe({type:String})],ei.prototype,"subLabel",void 0),Gt([pe({type:Array})],ei.prototype,"items",void 0),Gt([pe({type:String})],ei.prototype,"activeId",void 0),Gt([pe({type:Array})],ei.prototype,"actions",void 0),Gt([pe({type:Number})],ei.prototype,"maxVisibleActions",void 0),customElements.get("kr-screen-nav")||customElements.define("kr-screen-nav",ei);var ti=function(e,t,i,s){var n,o=arguments.length,r=o<3?t:null===s?s=Object.getOwnPropertyDescriptor(t,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(e,t,i,s);else for(var a=e.length-1;a>=0;a--)(n=e[a])&&(r=(o<3?n(r):o>3?n(t,i,r):n(t,i))||r);return o>3&&r&&Object.defineProperty(t,i,r),r};class ii extends le{constructor(){super(...arguments),this.title=""}render(){return q`
4368
4406
  <div class="header">
4369
4407
  <h2 class="header__title">${this.title}</h2>
4370
4408
  <div class="header__actions">