@kubex/zinc 1.1.151 → 1.1.153
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/custom-elements.json +75 -75
- package/dist/vscode.html-custom-data.json +11 -11
- package/dist/web-types.json +23 -23
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +290 -290
- package/package.json +1 -1
- package/scss/mixins/_helper-mixins.scss +34 -5
- package/scss/shared/layout.scss +8 -0
- package/src/components/page/page.component.ts +4 -2
- package/src/components/page/page.scss +6 -1
package/package.json
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
@use "./spacing-mixins";
|
|
2
2
|
|
|
3
|
+
$scrollbar-size: 5px;
|
|
4
|
+
$scrollbar-thumb: rgba(var(--inverse-base), 0.2);
|
|
5
|
+
$scrollbar-thumb-hover: rgba(var(--inverse-base), 0.6);
|
|
6
|
+
|
|
3
7
|
@mixin scrollbars {
|
|
4
8
|
::-webkit-scrollbar {
|
|
5
|
-
width:
|
|
6
|
-
height:
|
|
9
|
+
width: $scrollbar-size;
|
|
10
|
+
height: $scrollbar-size;
|
|
7
11
|
}
|
|
8
12
|
|
|
9
13
|
/* Track */
|
|
@@ -13,12 +17,37 @@
|
|
|
13
17
|
|
|
14
18
|
/* Handle */
|
|
15
19
|
::-webkit-scrollbar-thumb {
|
|
16
|
-
background:
|
|
17
|
-
border-radius:
|
|
20
|
+
background: $scrollbar-thumb;
|
|
21
|
+
border-radius: $scrollbar-size;
|
|
18
22
|
}
|
|
19
23
|
|
|
20
24
|
/* Handle on hover */
|
|
21
25
|
::-webkit-scrollbar-thumb:hover {
|
|
22
|
-
background:
|
|
26
|
+
background: $scrollbar-thumb-hover;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
// `scrollbars` only reaches descendant scroll areas; this styles an element that
|
|
31
|
+
// is itself the scroller
|
|
32
|
+
@mixin scrollbars-self {
|
|
33
|
+
scrollbar-width: thin;
|
|
34
|
+
scrollbar-color: $scrollbar-thumb transparent;
|
|
35
|
+
|
|
36
|
+
&::-webkit-scrollbar {
|
|
37
|
+
width: $scrollbar-size;
|
|
38
|
+
height: $scrollbar-size;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&::-webkit-scrollbar-track {
|
|
42
|
+
background: transparent;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&::-webkit-scrollbar-thumb {
|
|
46
|
+
background: $scrollbar-thumb;
|
|
47
|
+
border-radius: $scrollbar-size;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
51
|
+
background: $scrollbar-thumb-hover;
|
|
23
52
|
}
|
|
24
53
|
}
|
package/scss/shared/layout.scss
CHANGED
|
@@ -304,6 +304,14 @@
|
|
|
304
304
|
padding: var(--zn-base-px) calc(var(--zn-base-gap) + var(--zn-gutter));
|
|
305
305
|
gap: var(--zn-base-px);
|
|
306
306
|
height: 50px;
|
|
307
|
+
|
|
308
|
+
// The height is fixed, so a second row would spill over the bar — scroll
|
|
309
|
+
// sideways instead of wrapping
|
|
310
|
+
flex-wrap: nowrap;
|
|
311
|
+
overflow-x: auto;
|
|
312
|
+
overflow-y: hidden;
|
|
313
|
+
|
|
314
|
+
@include mixins.scrollbars-self;
|
|
307
315
|
}
|
|
308
316
|
|
|
309
317
|
.scroll-container {
|
|
@@ -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-
|
|
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;
|