@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.
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/krubble-app.bundled.js +97 -0
- package/dist/krubble-app.bundled.js.map +1 -1
- package/dist/krubble-app.bundled.min.js +40 -2
- package/dist/krubble-app.bundled.min.js.map +1 -1
- package/dist/krubble-app.umd.js +97 -0
- package/dist/krubble-app.umd.js.map +1 -1
- package/dist/krubble-app.umd.min.js +40 -2
- package/dist/krubble-app.umd.min.js.map +1 -1
- package/dist/screen-nav.d.ts +40 -0
- package/dist/screen-nav.d.ts.map +1 -1
- package/dist/screen-nav.js +97 -0
- package/dist/screen-nav.js.map +1 -1
- package/package.json +1 -1
|
@@ -4245,7 +4245,7 @@ function fe(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
|
-
`,Gt([ge({type:String})],ei.prototype,"logo",void 0),Gt([ge({type:String})],ei.prototype,"label",void 0),Gt([ge({type:String,attribute:"home-url"})],ei.prototype,"homeUrl",void 0),Gt([ge({type:String,reflect:!0})],ei.prototype,"scheme",void 0),Gt([ge({type:Array})],ei.prototype,"nav",void 0),Gt([ge({type:Boolean,attribute:"nav-icons-displayed",reflect:!0})],ei.prototype,"navIconsDisplayed",void 0),Gt([ge({type:Boolean,attribute:"nav-expanded"})],ei.prototype,"navExpanded",void 0),Gt([ge({type:Object})],ei.prototype,"user",void 0),Gt([ge({type:Boolean})],ei.prototype,"subbar",void 0),Gt([ge({type:Boolean,attribute:"nav-enabled"})],ei.prototype,"navEnabled",void 0),Gt([ge({type:String,attribute:"user-type"})],ei.prototype,"userType",void 0),Gt([ge({type:Array})],ei.prototype,"breadcrumbs",void 0),Gt([me()],ei.prototype,"isDev",void 0),Gt([me()],ei.prototype,"navItemsExpanded",void 0),Gt([me()],ei.prototype,"navQuery",void 0),Gt([me()],ei.prototype,"activeNavItemId",void 0),Gt([me()],ei.prototype,"isNavScrolled",void 0),Gt([me()],ei.prototype,"isNavOpened",void 0),Gt([me()],ei.prototype,"isEditing",void 0),Gt([me()],ei.prototype,"isUserMenuOpen",void 0),Gt([me()],ei.prototype,"pref",void 0),Gt([me()],ei.prototype,"draggedNavItemId",void 0),Gt([me()],ei.prototype,"navItemDropTargetId",void 0),Gt([me()],ei.prototype,"navItemDropPosition",void 0),Gt([me()],ei.prototype,"pendingRequests",void 0),customElements.get("kr-scaffold")||customElements.define("kr-scaffold",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 ce{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 V`
|
|
4248
|
+
`,Gt([ge({type:String})],ei.prototype,"logo",void 0),Gt([ge({type:String})],ei.prototype,"label",void 0),Gt([ge({type:String,attribute:"home-url"})],ei.prototype,"homeUrl",void 0),Gt([ge({type:String,reflect:!0})],ei.prototype,"scheme",void 0),Gt([ge({type:Array})],ei.prototype,"nav",void 0),Gt([ge({type:Boolean,attribute:"nav-icons-displayed",reflect:!0})],ei.prototype,"navIconsDisplayed",void 0),Gt([ge({type:Boolean,attribute:"nav-expanded"})],ei.prototype,"navExpanded",void 0),Gt([ge({type:Object})],ei.prototype,"user",void 0),Gt([ge({type:Boolean})],ei.prototype,"subbar",void 0),Gt([ge({type:Boolean,attribute:"nav-enabled"})],ei.prototype,"navEnabled",void 0),Gt([ge({type:String,attribute:"user-type"})],ei.prototype,"userType",void 0),Gt([ge({type:Array})],ei.prototype,"breadcrumbs",void 0),Gt([me()],ei.prototype,"isDev",void 0),Gt([me()],ei.prototype,"navItemsExpanded",void 0),Gt([me()],ei.prototype,"navQuery",void 0),Gt([me()],ei.prototype,"activeNavItemId",void 0),Gt([me()],ei.prototype,"isNavScrolled",void 0),Gt([me()],ei.prototype,"isNavOpened",void 0),Gt([me()],ei.prototype,"isEditing",void 0),Gt([me()],ei.prototype,"isUserMenuOpen",void 0),Gt([me()],ei.prototype,"pref",void 0),Gt([me()],ei.prototype,"draggedNavItemId",void 0),Gt([me()],ei.prototype,"navItemDropTargetId",void 0),Gt([me()],ei.prototype,"navItemDropPosition",void 0),Gt([me()],ei.prototype,"pendingRequests",void 0),customElements.get("kr-scaffold")||customElements.define("kr-scaffold",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 ce{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})))),V`
|
|
4249
4249
|
<nav class="nav">
|
|
4250
4250
|
${this.label?V`
|
|
4251
4251
|
<div class="nav-header">
|
|
@@ -4268,6 +4268,31 @@ function fe(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?V`
|
|
4272
|
+
<div class="nav-actions">
|
|
4273
|
+
${t.map((e=>V`
|
|
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?V`
|
|
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
|
+
`:Q}
|
|
4294
|
+
</div>
|
|
4295
|
+
`:Q}
|
|
4271
4296
|
</nav>
|
|
4272
4297
|
<main class="content">
|
|
4273
4298
|
<div class="content__main">
|
|
@@ -4353,6 +4378,19 @@ function fe(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 fe(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
|
-
`,ti([ge({type:String})],ii.prototype,"label",void 0),ti([ge({type:String})],ii.prototype,"subLabel",void 0),ti([ge({type:Array})],ii.prototype,"items",void 0),ti([ge({type:String})],ii.prototype,"activeId",void 0),customElements.get("kr-screen-nav")||customElements.define("kr-screen-nav",ii);var si=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 ni extends ce{constructor(){super(...arguments),this.title=""}render(){return V`
|
|
4405
|
+
`,ti([ge({type:String})],ii.prototype,"label",void 0),ti([ge({type:String})],ii.prototype,"subLabel",void 0),ti([ge({type:Array})],ii.prototype,"items",void 0),ti([ge({type:String})],ii.prototype,"activeId",void 0),ti([ge({type:Array})],ii.prototype,"actions",void 0),ti([ge({type:Number})],ii.prototype,"maxVisibleActions",void 0),customElements.get("kr-screen-nav")||customElements.define("kr-screen-nav",ii);var si=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 ni extends ce{constructor(){super(...arguments),this.title=""}render(){return V`
|
|
4368
4406
|
<div class="header">
|
|
4369
4407
|
<h2 class="header__title">${this.title}</h2>
|
|
4370
4408
|
<div class="header__actions">
|