@kodaris/krubble-app-components 1.0.35 → 1.0.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.
@@ -1,6 +1,6 @@
1
1
  [
2
2
  {
3
3
  "version": "1.0.18",
4
- "description": "<kr-scaffold> \"title\" attribute renamed to \"label\""
4
+ "description": "<kr-screen-nav> \"title\" renamed to \"label\", \"subtitle\" renamed to \"subLabel\", \"backUrl\" property removed, \"updateActiveNavItem()\" method removed"
5
5
  }
6
6
  ]
@@ -3160,9 +3160,8 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
3160
3160
  * ## Usage
3161
3161
  * ```html
3162
3162
  * <kr-screen-nav
3163
- * title="Acme Corporation"
3164
- * subtitle="Company"
3165
- * backUrl="/crm/companies"
3163
+ * label="Acme Corporation"
3164
+ * subLabel="Company"
3166
3165
  * .navItems=${[
3167
3166
  * { id: 'overview', label: 'Overview', url: '/companies/123/overview' },
3168
3167
  * { id: 'contacts', label: 'Contacts', url: '/companies/123/contacts' },
@@ -3176,9 +3175,8 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
3176
3175
  *
3177
3176
  * @slot - The main screen content
3178
3177
  *
3179
- * @property {string} title - Main title (e.g., entity name like "Acme Corporation")
3180
- * @property {string} subtitle - Subtitle/label (e.g., entity type like "Company")
3181
- * @property {string} backUrl - URL to navigate back to (e.g., the table/list view)
3178
+ * @property {string} label - Main label (e.g., entity name like "Acme Corporation")
3179
+ * @property {string} subLabel - Sub label (e.g., entity type like "Company")
3182
3180
  * @property {KRScreenNavItem[]} navItems - Navigation items as JSON array
3183
3181
  * @property {string} activeId - Currently active item ID
3184
3182
  */
@@ -3186,17 +3184,13 @@ let KRScreenNav = class KRScreenNav extends i$1 {
3186
3184
  constructor() {
3187
3185
  super(...arguments);
3188
3186
  /**
3189
- * Main title (e.g., entity name like "Acme Corporation")
3187
+ * Main label (e.g., entity name like "Acme Corporation")
3190
3188
  */
3191
- this.title = '';
3192
- /**
3193
- * Subtitle/label (e.g., entity type like "Company")
3194
- */
3195
- this.subtitle = '';
3189
+ this.label = '';
3196
3190
  /**
3197
- * URL to navigate back to (e.g., the table/list view)
3191
+ * Sub label (e.g., entity type like "Company")
3198
3192
  */
3199
- this.backUrl = '';
3193
+ this.subLabel = '';
3200
3194
  /**
3201
3195
  * Navigation items
3202
3196
  */
@@ -3234,34 +3228,14 @@ let KRScreenNav = class KRScreenNav extends i$1 {
3234
3228
  e.preventDefault();
3235
3229
  }
3236
3230
  }
3237
- /**
3238
- * Updates the active nav item based on the current URL.
3239
- * Called automatically by `KRScreenNavDirective` on Angular route changes.
3240
- */
3241
- updateActiveNavItem() {
3242
- const currentPath = window.location.pathname;
3243
- const activeItem = this.navItems.find(item => {
3244
- if (!item.url)
3245
- return false;
3246
- // Handle both absolute and relative URLs
3247
- if (item.url.startsWith('./')) {
3248
- const segment = item.url.replace(/^\.\//, '');
3249
- return currentPath.endsWith('/' + segment);
3250
- }
3251
- return currentPath === item.url || currentPath.startsWith(item.url + '/');
3252
- });
3253
- if (activeItem) {
3254
- this.activeId = activeItem.id;
3255
- }
3256
- }
3257
3231
  render() {
3258
3232
  return b `
3259
3233
  <nav class="nav">
3260
- ${this.title ? b `
3234
+ ${this.label ? b `
3261
3235
  <div class="nav-header">
3262
3236
  <div class="nav-header__text">
3263
- ${this.subtitle ? b `<div class="nav-header__subtitle">${this.subtitle}</div>` : A}
3264
- <div class="nav-header__title">${this.title}</div>
3237
+ ${this.subLabel ? b `<div class="nav-header__subtitle">${this.subLabel}</div>` : A}
3238
+ <div class="nav-header__title">${this.label}</div>
3265
3239
  </div>
3266
3240
  </div>
3267
3241
  ` : A}
@@ -3283,13 +3257,6 @@ let KRScreenNav = class KRScreenNav extends i$1 {
3283
3257
  <div class="content__main">
3284
3258
  <slot></slot>
3285
3259
  </div>
3286
- <!--<div class="breadcrumbs">
3287
- <a href="/crm">CRM</a>
3288
- <span class="breadcrumbs__separator">/</span>
3289
- <a href="/crm/companies">Companies</a>
3290
- <span class="breadcrumbs__separator">/</span>
3291
- <span class="breadcrumbs__current">Acme Corporation</span>
3292
- </div>-->
3293
3260
  </main>
3294
3261
  `;
3295
3262
  }
@@ -3351,13 +3318,14 @@ KRScreenNav.styles = i$4 `
3351
3318
  .nav-item {
3352
3319
  display: block;
3353
3320
  padding: 0 12px;
3354
- height: 40px;
3355
- line-height: 40px;
3356
- letter-spacing: 0.13px;
3321
+ height: 32px;
3322
+ line-height: 32px;
3323
+ letter-spacing: 0.01em;
3357
3324
  color: rgb(32, 33, 36);
3358
3325
  text-decoration: none;
3359
3326
  font-size: 13px;
3360
- font-weight: 500;
3327
+ font-weight: 400;
3328
+ font-family: inherit;
3361
3329
  border-radius: 8px;
3362
3330
  transition: all 0.15s ease;
3363
3331
  }
@@ -3368,9 +3336,9 @@ KRScreenNav.styles = i$4 `
3368
3336
  }
3369
3337
 
3370
3338
  .nav-item--active {
3371
- background: rgba(22, 48, 82, 0.08);
3372
- color: #163052;
3373
- font-weight: 600;
3339
+ background: #e1e9f6;
3340
+ color: #1a2332;
3341
+ font-weight: 700;
3374
3342
  }
3375
3343
 
3376
3344
  .content {
@@ -3380,42 +3348,6 @@ KRScreenNav.styles = i$4 `
3380
3348
  flex-direction: column;
3381
3349
  }
3382
3350
 
3383
- .breadcrumbs {
3384
- height: 32px;
3385
- padding: 0 1rem;
3386
- display: flex;
3387
- align-items: center;
3388
- gap: 6px;
3389
- font-size: 12px;
3390
- color: #6b7280;
3391
- //background: #f9fafb;
3392
- background: #beea4e;
3393
- border-top: 1px solid #e5e7eb;
3394
- flex-shrink: 0;
3395
- }
3396
-
3397
- .breadcrumbs a {
3398
- //color: #6b7280;
3399
- color: #10172a;
3400
- font-size: 13px;
3401
- font-weight: 600;
3402
- text-decoration: none;
3403
- }
3404
-
3405
- .breadcrumbs a:hover {
3406
- color: #111827;
3407
- text-decoration: underline;
3408
- }
3409
-
3410
- .breadcrumbs__separator {
3411
- color: #d1d5db;
3412
- }
3413
-
3414
- .breadcrumbs__current {
3415
- color: #111827;
3416
- font-weight: 500;
3417
- }
3418
-
3419
3351
  .content__main {
3420
3352
  flex: 1;
3421
3353
  overflow-y: auto;
@@ -3423,13 +3355,10 @@ KRScreenNav.styles = i$4 `
3423
3355
  `;
3424
3356
  __decorate$2([
3425
3357
  n({ type: String })
3426
- ], KRScreenNav.prototype, "title", void 0);
3427
- __decorate$2([
3428
- n({ type: String })
3429
- ], KRScreenNav.prototype, "subtitle", void 0);
3358
+ ], KRScreenNav.prototype, "label", void 0);
3430
3359
  __decorate$2([
3431
3360
  n({ type: String })
3432
- ], KRScreenNav.prototype, "backUrl", void 0);
3361
+ ], KRScreenNav.prototype, "subLabel", void 0);
3433
3362
  __decorate$2([
3434
3363
  n({ type: Array })
3435
3364
  ], KRScreenNav.prototype, "navItems", void 0);