@kubex/zinc 1.1.151 → 1.1.152

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubex/zinc",
3
- "version": "1.1.151",
3
+ "version": "1.1.152",
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",
@@ -44,7 +44,7 @@ export default class ZnPage extends ZnTabs {
44
44
  'zn-tab': ZnTab
45
45
  };
46
46
 
47
- private readonly pageSlotController = new HasSlotController(this, 'breadcrumb', 'actions', 'caption');
47
+ private readonly pageSlotController = new HasSlotController(this, 'breadcrumb', 'actions', 'caption', 'description');
48
48
 
49
49
  @property() caption: string;
50
50
  @property({attribute: 'entity-id'}) entityId: string;
@@ -442,6 +442,7 @@ export default class ZnPage extends ZnTabs {
442
442
  const hasEntityId = this.entityId;
443
443
  const hasFullLocation = this.fullLocation;
444
444
  const hasPreviousPath = this.previousPath;
445
+ const hasDescription = !!this.summary || this.pageSlotController.test('description');
445
446
 
446
447
  return html`
447
448
  <div class="page" part="base" @scroll="${this.handlePageScroll}">
@@ -455,7 +456,8 @@ export default class ZnPage extends ZnTabs {
455
456
  'header--has-entity-id': hasEntityId,
456
457
  'header--has-full-location': hasFullLocation,
457
458
  'header--has-navigation': hasNavigation,
458
- 'header--has-previous': hasPreviousPath
459
+ 'header--has-previous': hasPreviousPath,
460
+ 'header--has-description': hasDescription
459
461
  })}">
460
462
  ${hasFullLocation || hasEntityId ? html`
461
463
  <div class="${classMap({
@@ -184,7 +184,7 @@
184
184
  display: flex;
185
185
  justify-content: flex-start;
186
186
  flex-direction: column;
187
- gap: var(--zn-spacing-x-small);
187
+ gap: var(--zn-spacing-2x-small);
188
188
  min-height: 36px;
189
189
  flex-shrink: 1;
190
190
  min-width: 0;
@@ -215,6 +215,11 @@
215
215
  min-height: 36px; // Keep in step with the actions row: both bands share a centre line.
216
216
  }
217
217
 
218
+ // Stacked above a description the band buys no alignment, it only pads the gap.
219
+ &--has-description &__caption {
220
+ min-height: 0;
221
+ }
222
+
218
223
  &__description {
219
224
  @include wc.text-style(subheading);
220
225
  display: block;