@kodaris/krubble-app-components 1.0.53 → 1.0.55

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.
@@ -331,6 +331,7 @@
331
331
  * @property {'light'|'dark'} scheme - Color scheme: 'light' (default) or 'dark'
332
332
  * @property {KRNavItem[]} nav - Navigation items as JSON array
333
333
  * @property {KRUser} user - User profile data
334
+ * @property {boolean} navEnabled - Whether to show the nav drawer (menu toggle remains visible when false)
334
335
  *
335
336
  *
336
337
  * TODO
@@ -378,6 +379,11 @@
378
379
  * Whether to show the subbar with menu toggle
379
380
  */
380
381
  this.subbar = false;
382
+ /**
383
+ * Whether to hide the navigation drawer.
384
+ * Menu toggle button remains visible and emits menu-click events.
385
+ */
386
+ this.navEnabled = true;
381
387
  /**
382
388
  * Breadcrumbs to display in the subbar
383
389
  */
@@ -1342,52 +1348,54 @@
1342
1348
  ` : A}
1343
1349
 
1344
1350
  <div class="wrapper">
1345
- <nav class=${e({
1351
+ ${this.navEnabled ? b `
1352
+ <nav class=${e({
1346
1353
  'nav': true,
1347
1354
  'nav--scrolled': this.isNavScrolled,
1348
1355
  'nav--opened': !this.subbar || this.isNavOpened,
1349
1356
  })}>
1350
- <div class="nav-header" @click=${this.handleNavHeaderClick}>
1351
- ${this.label
1357
+ <div class="nav-header" @click=${this.handleNavHeaderClick}>
1358
+ ${this.label
1352
1359
  ? b `<span class="nav-title">${this.label}</span>`
1353
1360
  : this.logo
1354
1361
  ? b `<img class="nav-logo" src=${this.logo} alt="Logo" />`
1355
1362
  : A}
1356
- </div>
1357
- <div class="nav-content" @scroll=${this.handleNavScroll}>
1358
- ${totalTopLevelItems > 20 ? b `
1359
- <div class="nav-search">
1360
- <div class="nav-search__wrapper">
1361
- <span class="nav-search__icon">
1362
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
1363
- <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
1364
- </svg>
1365
- </span>
1366
- <input
1367
- class="nav-search__input"
1368
- type="text"
1369
- placeholder="Search..."
1370
- .value=${this.navQuery}
1371
- @input=${this.handleNavQueryChange}
1372
- />
1373
- ${this.navQuery ? b `
1374
- <button class="nav-search__clear" @click=${this.handleNavQueryClear}>
1363
+ </div>
1364
+ <div class="nav-content" @scroll=${this.handleNavScroll}>
1365
+ ${totalTopLevelItems > 20 ? b `
1366
+ <div class="nav-search">
1367
+ <div class="nav-search__wrapper">
1368
+ <span class="nav-search__icon">
1375
1369
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
1376
- <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
1370
+ <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/>
1377
1371
  </svg>
1378
- </button>
1379
- ` : A}
1372
+ </span>
1373
+ <input
1374
+ class="nav-search__input"
1375
+ type="text"
1376
+ placeholder="Search..."
1377
+ .value=${this.navQuery}
1378
+ @input=${this.handleNavQueryChange}
1379
+ />
1380
+ ${this.navQuery ? b `
1381
+ <button class="nav-search__clear" @click=${this.handleNavQueryClear}>
1382
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
1383
+ <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>
1384
+ </svg>
1385
+ </button>
1386
+ ` : A}
1387
+ </div>
1380
1388
  </div>
1389
+ ` : A}
1390
+ <div class="nav-items">
1391
+ ${topLevelItems.map((item) => this.renderNavItem(item))}
1381
1392
  </div>
1382
- ` : A}
1383
- <div class="nav-items">
1384
- ${topLevelItems.map((item) => this.renderNavItem(item))}
1385
1393
  </div>
1386
- </div>
1387
- <!-- <div class="nav-footer">
1388
- ${this.isEditing ? this.renderEditFooter() : this.renderNormalFooter()}
1389
- </div> -->
1390
- </nav>
1394
+ <!-- <div class="nav-footer">
1395
+ ${this.isEditing ? this.renderEditFooter() : this.renderNormalFooter()}
1396
+ </div> -->
1397
+ </nav>
1398
+ ` : A}
1391
1399
 
1392
1400
  <main class="main">
1393
1401
  <slot></slot>
@@ -2186,6 +2194,9 @@
2186
2194
  __decorate$4([
2187
2195
  n({ type: Boolean })
2188
2196
  ], exports.Scaffold.prototype, "subbar", void 0);
2197
+ __decorate$4([
2198
+ n({ type: Boolean, attribute: 'nav-enabled' })
2199
+ ], exports.Scaffold.prototype, "navEnabled", void 0);
2189
2200
  __decorate$4([
2190
2201
  n({ type: Array })
2191
2202
  ], exports.Scaffold.prototype, "breadcrumbs", void 0);