@kubex/zinc 1.0.116 → 1.0.118
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 +372 -234
- package/dist/vscode.html-custom-data.json +41 -46
- package/dist/web-types.json +94 -74
- package/dist/zn.d.ts +59 -11
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +1090 -1081
- package/docs/_includes/default.njk +3 -4
- package/docs/assets/styles/docs.css +13 -13
- package/docs/pages/components/absolute-container.md +2 -2
- package/docs/pages/components/alert.md +5 -5
- package/docs/pages/components/audio-select.md +4 -4
- package/docs/pages/components/button-group.md +1 -31
- package/docs/pages/components/button.md +13 -12
- package/docs/pages/components/checkbox.md +4 -4
- package/docs/pages/components/chip.md +14 -14
- package/docs/pages/components/data-table.md +4 -4
- package/docs/pages/components/datepicker.md +5 -5
- package/docs/pages/components/dialog.md +2 -2
- package/docs/pages/components/file.md +81 -9
- package/docs/pages/components/header.md +4 -6
- package/docs/pages/components/hover-container.md +1 -1
- package/docs/pages/components/icon.md +14 -0
- package/docs/pages/components/inline-edit.md +4 -4
- package/docs/pages/components/item.md +2 -2
- package/docs/pages/components/menu.md +2 -2
- package/docs/pages/components/note.md +12 -12
- package/docs/pages/components/page.md +3 -3
- package/docs/pages/components/pagination.md +6 -6
- package/docs/pages/components/pane.md +3 -6
- package/docs/pages/components/panel.md +10 -12
- package/docs/pages/components/priority-list.md +3 -3
- package/docs/pages/components/radio-group.md +4 -4
- package/docs/pages/components/radio.md +4 -4
- package/docs/pages/components/scroll-container.md +10 -10
- package/docs/pages/components/select.md +5 -5
- package/docs/pages/components/split-button.md +4 -4
- package/docs/pages/components/tabs.md +3 -3
- package/docs/pages/components/tile.md +13 -13
- package/docs/pages/components/toggle.md +4 -4
- package/docs/pages/components/translations.md +5 -5
- package/docs/pages/components/vertical-stepper.md +3 -3
- package/docs/pages/components/well.md +19 -19
- package/docs/pages/getting-started/example-layout.md +16 -16
- package/docs/pages/getting-started/example-page.md +1 -3
- package/package.json +2 -1
- package/scss/_root.scss +87 -60
- package/scss/shared/_button.scss +6 -1
- package/scss/shared/_form-elements.scss +1 -0
- package/scss/shared/layout.scss +5 -4
- package/scss/themes/_dark.scss +4 -4
- package/scss/themes/_light.scss +70 -287
- package/src/components/bulk-actions/bulk-actions.component.ts +0 -1
- package/src/components/button/button.component.ts +40 -10
- package/src/components/button/button.scss +67 -103
- package/src/components/button-menu/button-menu.component.ts +2 -6
- package/src/components/collapsible/collapsible.scss +1 -1
- package/src/components/cols/cols.scss +1 -1
- package/src/components/content-block/content-block.component.ts +1 -2
- package/src/components/data-table/data-table.component.ts +4 -8
- package/src/components/data-table/data-table.test.ts +7 -0
- package/src/components/data-table-filter/data-table-filter.component.ts +1 -1
- package/src/components/data-table-sort/data-table-sort.component.ts +2 -2
- package/src/components/dialog/dialog.component.ts +0 -1
- package/src/components/editor/modules/dialog/dialog.component.ts +0 -1
- package/src/components/editor/modules/dialog/dialog.scss +1 -1
- package/src/components/editor/modules/toolbar/toolbar.component.ts +0 -1
- package/src/components/expanding-action/expanding-action.component.ts +0 -3
- package/src/components/expanding-action/expanding-action.scss +0 -5
- package/src/components/file/file.component.ts +158 -17
- package/src/components/file/file.scss +122 -29
- package/src/components/header/header.component.ts +2 -8
- package/src/components/header/header.scss +4 -25
- package/src/components/icon/icon.component.ts +80 -1
- package/src/components/icon/icon.scss +8 -0
- package/src/components/icon/icon.test.ts +24 -0
- package/src/components/icon-picker/icon-picker.component.ts +0 -1
- package/src/components/inline-edit/inline-edit.component.ts +3 -4
- package/src/components/input/input.scss +21 -6
- package/src/components/input-group/input-group.scss +2 -1
- package/src/components/markdown-editor/markdown-editor.component.ts +1 -5
- package/src/components/menu/menu.scss +1 -1
- package/src/components/menu-item/menu-item.scss +4 -4
- package/src/components/navbar/navbar.component.ts +20 -0
- package/src/components/navbar/navbar.scss +31 -17
- package/src/components/navbar/navbar.test.ts +72 -0
- package/src/components/note/note.component.ts +0 -1
- package/src/components/page/page.component.ts +7 -9
- package/src/components/page/page.scss +21 -17
- package/src/components/page/page.test.ts +1 -1
- package/src/components/page-nav/page-nav.scss +6 -6
- package/src/components/panel/panel.component.ts +3 -5
- package/src/components/panel/panel.scss +3 -3
- package/src/components/panel/panel.test.ts +14 -0
- package/src/components/query-builder/query-builder.component.ts +0 -1
- package/src/components/slideout/slideout.component.ts +0 -1
- package/src/components/sp/sp.scss +2 -2
- package/src/components/tabs/tabs.component.ts +1 -1
- package/src/components/tile/tile.scss +1 -1
- package/src/components/translation-group/translation-group.component.ts +0 -3
- package/src/components/translations/translations.component.ts +0 -3
|
@@ -7,24 +7,24 @@
|
|
|
7
7
|
min-height: 0;
|
|
8
8
|
container-type: inline-size;
|
|
9
9
|
--zn-page-content-background: var(--zn-body);
|
|
10
|
-
--zn-page-header-background: var(--zn-page-surface-background, var(--zn-page-background));
|
|
10
|
+
--zn-page-header-background: var(--zn-page-surface-background, var(--zn-page-background, var(--zn-body)));
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
@container (width > 1024px) {
|
|
14
14
|
:host {
|
|
15
|
-
--zn-gutter:
|
|
15
|
+
--zn-gutter: 16px;
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
@container (width > 1400px) {
|
|
20
20
|
:host {
|
|
21
|
-
--zn-gutter:
|
|
21
|
+
--zn-gutter: 24px;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
@container (width > 1500px) {
|
|
26
26
|
:host {
|
|
27
|
-
--zn-gutter:
|
|
27
|
+
--zn-gutter: 32px;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
position: sticky;
|
|
46
46
|
top: 0;
|
|
47
47
|
z-index: 2;
|
|
48
|
-
padding: var(--zn-base-gap) var(--zn-base-gap) 0;
|
|
49
48
|
box-sizing: border-box;
|
|
50
49
|
background: rgba(var(--zn-page-header-background), 95%);
|
|
51
50
|
|
|
@@ -72,6 +71,11 @@
|
|
|
72
71
|
flex-direction: column;
|
|
73
72
|
position: relative;
|
|
74
73
|
margin: 0;
|
|
74
|
+
padding: calc(var(--zn-base-px) * 3) var(--zn-base-gap) calc(calc(var(--zn-base-px) * 3) - var(--zn-base-gap)) var(--zn-base-gap);
|
|
75
|
+
|
|
76
|
+
&.header--has-navigation {
|
|
77
|
+
padding: calc(var(--zn-base-px) * 3) var(--zn-base-gap);
|
|
78
|
+
}
|
|
75
79
|
|
|
76
80
|
.content {
|
|
77
81
|
display: flex;
|
|
@@ -87,7 +91,7 @@
|
|
|
87
91
|
}
|
|
88
92
|
|
|
89
93
|
&--has-navigation .content {
|
|
90
|
-
min-height:
|
|
94
|
+
min-height: 36px;
|
|
91
95
|
}
|
|
92
96
|
|
|
93
97
|
.caption {
|
|
@@ -95,9 +99,9 @@
|
|
|
95
99
|
display: flex;
|
|
96
100
|
align-items: flex-start;
|
|
97
101
|
justify-content: space-between;
|
|
98
|
-
gap:
|
|
102
|
+
gap: 2px;
|
|
99
103
|
max-width: 100%;
|
|
100
|
-
min-height:
|
|
104
|
+
min-height: 36px;
|
|
101
105
|
|
|
102
106
|
a {
|
|
103
107
|
display: flex;
|
|
@@ -112,7 +116,7 @@
|
|
|
112
116
|
justify-content: flex-start;
|
|
113
117
|
flex-direction: column;
|
|
114
118
|
gap: 4px;
|
|
115
|
-
min-height:
|
|
119
|
+
min-height: 36px;
|
|
116
120
|
flex-shrink: 1;
|
|
117
121
|
max-width: 100%;
|
|
118
122
|
}
|
|
@@ -128,7 +132,7 @@
|
|
|
128
132
|
font-weight: var(--zn-font-weight-medium);
|
|
129
133
|
font-size: var(--zn-font-size-large);
|
|
130
134
|
color: rgba(var(--zn-text-panel-title), 100%);
|
|
131
|
-
line-height:
|
|
135
|
+
line-height: 18px;
|
|
132
136
|
margin: 0;
|
|
133
137
|
overflow: hidden;
|
|
134
138
|
white-space: nowrap;
|
|
@@ -142,7 +146,7 @@
|
|
|
142
146
|
&__description {
|
|
143
147
|
display: block;
|
|
144
148
|
font-size: var(--zn-font-size-medium);
|
|
145
|
-
line-height:
|
|
149
|
+
line-height: 14px;
|
|
146
150
|
}
|
|
147
151
|
|
|
148
152
|
.breadcrumb {
|
|
@@ -282,20 +286,20 @@
|
|
|
282
286
|
}
|
|
283
287
|
|
|
284
288
|
zn-navbar {
|
|
285
|
-
margin-top: var(--zn-base-gap);
|
|
286
289
|
|
|
287
290
|
&::part(navbar) {
|
|
288
|
-
height:
|
|
289
|
-
min-height:
|
|
290
|
-
|
|
291
|
+
height: 40px;
|
|
292
|
+
min-height: 40px;
|
|
293
|
+
max-height: 40px;
|
|
291
294
|
padding-left: var(--zn-base-gap);
|
|
295
|
+
margin: 0;
|
|
292
296
|
}
|
|
293
297
|
|
|
294
298
|
&::part(navbar-item) {
|
|
295
|
-
|
|
299
|
+
height: 40px;
|
|
296
300
|
box-sizing: border-box;
|
|
297
301
|
font-size: var(--zn-font-size-medium);
|
|
298
|
-
line-height:
|
|
302
|
+
line-height: 16px;
|
|
299
303
|
}
|
|
300
304
|
}
|
|
301
305
|
|
|
@@ -6,7 +6,7 @@ describe('<zn-page>', () => {
|
|
|
6
6
|
it('renders header actions and generated tabs', async () => {
|
|
7
7
|
const el = await fixture<ZnPage>(html`
|
|
8
8
|
<zn-page caption="Page Title" summary="Page Summary">
|
|
9
|
-
<zn-button slot="actions" type="primary"
|
|
9
|
+
<zn-button slot="actions" type="primary" href="/ui">UI Examples</zn-button>
|
|
10
10
|
|
|
11
11
|
<zn-tab caption="Overview">Overview Content</zn-tab>
|
|
12
12
|
<zn-tab caption="Tab One">Tab One Content</zn-tab>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
height: 100%;
|
|
8
8
|
|
|
9
9
|
--page-nav-crumb-height: 50px;
|
|
10
|
-
--page-nav-width:
|
|
10
|
+
--page-nav-width: 240px;
|
|
11
11
|
--page-nav-animation-duration: 0.3s;
|
|
12
12
|
|
|
13
13
|
--page-nav-bg: var(--zn-page-content-background, var(--zn-body));
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
width: var(--page-nav-width);
|
|
49
49
|
background-color: rgb(var(--page-nav-bg));
|
|
50
50
|
overflow-y: auto;
|
|
51
|
-
padding: var(--zn-
|
|
51
|
+
padding: var(--zn-base-gap) 0 var(--zn-base-gap) var(--zn-base-gap);
|
|
52
52
|
@include wc.scrollbars;
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -92,16 +92,16 @@
|
|
|
92
92
|
width: 100%;
|
|
93
93
|
height: var(--page-nav-crumb-height);
|
|
94
94
|
background-color: rgb(var(--page-nav-bg));
|
|
95
|
-
gap:
|
|
95
|
+
gap: var(--zn-base-px);
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.breadcrumb-menu-toggle {
|
|
99
99
|
cursor: pointer;
|
|
100
|
-
margin-left: var(--zn-
|
|
100
|
+
margin-left: var(--zn-base-gap);
|
|
101
101
|
|
|
102
102
|
display: flex;
|
|
103
103
|
align-items: center;
|
|
104
|
-
gap:
|
|
104
|
+
gap: var(--zn-base-px);
|
|
105
105
|
|
|
106
106
|
|
|
107
107
|
height: 100%;
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
display: block;
|
|
133
133
|
position: absolute;
|
|
134
134
|
top: 0;
|
|
135
|
-
padding
|
|
135
|
+
padding: 60px var(--zn-base-gap) var(--zn-base-gap) var(--zn-base-gap);
|
|
136
136
|
left: calc(var(--page-nav-width) * -1);
|
|
137
137
|
max-width: var(--page-nav-width);
|
|
138
138
|
opacity: 0;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import {classMap} from "lit/directives/class-map.js";
|
|
2
2
|
import {type CSSResultGroup, html, type PropertyValues, unsafeCSS} from 'lit';
|
|
3
3
|
import {HasSlotController} from "../../internal/slot";
|
|
4
|
-
import {ifDefined} from "lit/directives/if-defined.js";
|
|
5
4
|
import {property} from 'lit/decorators.js';
|
|
6
5
|
import ZincElement from '../../internal/zinc-element';
|
|
7
6
|
|
|
@@ -29,9 +28,8 @@ export default class ZnPanel extends ZincElement {
|
|
|
29
28
|
@property({attribute: 'basis-px', type: Number}) basis: number;
|
|
30
29
|
@property() caption: string;
|
|
31
30
|
@property() icon: string;
|
|
32
|
-
@property() description: string;
|
|
33
31
|
@property({type: Boolean}) tabbed: boolean;
|
|
34
|
-
@property({attribute: 'header-
|
|
32
|
+
@property({attribute: 'header-borderless', type: Boolean}) headerBorderless: boolean;
|
|
35
33
|
@property({type: Boolean}) cosmic: boolean;
|
|
36
34
|
@property({type: Boolean}) flush: boolean;
|
|
37
35
|
@property({attribute: 'flush-x', type: Boolean}) flushX: boolean;
|
|
@@ -91,6 +89,7 @@ export default class ZnPanel extends ZincElement {
|
|
|
91
89
|
'panel--has-actions': hasActionSlot,
|
|
92
90
|
'panel--has-footer': hasFooterSlot,
|
|
93
91
|
'panel--has-header': hasHeader,
|
|
92
|
+
'panel--borderless-header': this.headerBorderless,
|
|
94
93
|
'panel--cosmic': this.cosmic,
|
|
95
94
|
'panel--shadow': this.shadow,
|
|
96
95
|
})}">
|
|
@@ -99,11 +98,10 @@ export default class ZnPanel extends ZincElement {
|
|
|
99
98
|
${hasHeader ? html`
|
|
100
99
|
<zn-header class="${classMap({
|
|
101
100
|
"panel__header": true,
|
|
102
|
-
"panel__header--underline": this.
|
|
101
|
+
"panel__header--underline": !this.headerBorderless,
|
|
103
102
|
})}"
|
|
104
103
|
icon="${this.icon}"
|
|
105
104
|
caption="${this.caption}"
|
|
106
|
-
description="${ifDefined(this.description)}"
|
|
107
105
|
transparent>
|
|
108
106
|
${hasActionSlot ? html`
|
|
109
107
|
<slot name="actions" slot="actions" class="panel__header__actions"></slot>` : null}
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
flex-direction: column;
|
|
75
75
|
overflow-y: auto;
|
|
76
76
|
flex-grow: 1;
|
|
77
|
-
padding:
|
|
77
|
+
padding: var(--zn-base-gap);
|
|
78
78
|
|
|
79
79
|
> :not([hidden]) ~ :not([hidden]) {
|
|
80
80
|
border: 1px solid rgb(var(--zn-border-color));
|
|
@@ -110,8 +110,8 @@
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
|
|
113
|
-
|
|
114
|
-
padding-top:
|
|
113
|
+
&.panel--borderless-header:not(.panel--flush, .panel--flush-y) &__body {
|
|
114
|
+
padding-top: 0;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
&--flush {
|
|
@@ -7,4 +7,18 @@ describe('<zn-panel>', () => {
|
|
|
7
7
|
|
|
8
8
|
expect(el).to.exist;
|
|
9
9
|
});
|
|
10
|
+
|
|
11
|
+
it('underlines panel headers by default', async () => {
|
|
12
|
+
const el = await fixture(html` <zn-panel caption="Example"></zn-panel> `);
|
|
13
|
+
const header = el.shadowRoot!.querySelector('.panel__header')!;
|
|
14
|
+
|
|
15
|
+
expect(header.classList.contains('panel__header--underline')).to.be.true;
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('removes the header underline when header-borderless is set', async () => {
|
|
19
|
+
const el = await fixture(html` <zn-panel caption="Example" header-borderless></zn-panel> `);
|
|
20
|
+
const header = el.shadowRoot!.querySelector('.panel__header')!;
|
|
21
|
+
|
|
22
|
+
expect(header.classList.contains('panel__header--underline')).to.be.false;
|
|
23
|
+
});
|
|
10
24
|
});
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
:host {
|
|
7
7
|
display: block;
|
|
8
|
-
--zn-sp-padding: var(--zn-base-gap
|
|
9
|
-
--zn-sp-gap: var(--zn-base-gap
|
|
8
|
+
--zn-sp-padding: var(--zn-base-gap);
|
|
9
|
+
--zn-sp-gap: var(--zn-base-gap);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
:host([grow]) {
|
|
@@ -525,7 +525,7 @@ export default class ZnTabs extends ZincElement {
|
|
|
525
525
|
return html`
|
|
526
526
|
<div class="tabs">
|
|
527
527
|
${hasHeader ? html`
|
|
528
|
-
<zn-header caption="${ifDefined(this.caption)}"
|
|
528
|
+
<zn-header caption="${ifDefined(this.caption)}" transparent>
|
|
529
529
|
<slot name="actions" slot="actions"></slot>
|
|
530
530
|
</zn-header>` : null}
|
|
531
531
|
<slot name="top"></slot>
|
|
@@ -262,7 +262,6 @@ export default class ZnTranslationGroup extends ZnPanel {
|
|
|
262
262
|
${visibleLangTabs.map(code => html`
|
|
263
263
|
<zn-button
|
|
264
264
|
data-lang-btn
|
|
265
|
-
size="x-small"
|
|
266
265
|
color="default"
|
|
267
266
|
?outline="${code !== this._activeLanguage}"
|
|
268
267
|
@click="${() => this.switchLanguage(code)}"
|
|
@@ -273,7 +272,6 @@ export default class ZnTranslationGroup extends ZnPanel {
|
|
|
273
272
|
<zn-dropdown placement="bottom-end" data-lang-overflow>
|
|
274
273
|
<zn-button
|
|
275
274
|
slot="trigger"
|
|
276
|
-
size="x-small"
|
|
277
275
|
color="default"
|
|
278
276
|
icon="keyboard_arrow_down"
|
|
279
277
|
?outline="${!overflowLangTabs.includes(this._activeLanguage)}"
|
|
@@ -288,7 +286,6 @@ export default class ZnTranslationGroup extends ZnPanel {
|
|
|
288
286
|
<zn-dropdown placement="bottom-end" data-lang-add>
|
|
289
287
|
<zn-button
|
|
290
288
|
slot="trigger"
|
|
291
|
-
size="x-small"
|
|
292
289
|
color="default"
|
|
293
290
|
outline
|
|
294
291
|
>+
|
|
@@ -357,7 +357,6 @@ export default class ZnTranslations extends ZincElement implements ZincFormContr
|
|
|
357
357
|
${visibleLangTabs.map(code => html`
|
|
358
358
|
<zn-button
|
|
359
359
|
data-lang-btn
|
|
360
|
-
size="x-small"
|
|
361
360
|
color="default"
|
|
362
361
|
?outline="${code !== this._activeLanguage}"
|
|
363
362
|
@click="${() => this.switchLanguage(code)}"
|
|
@@ -368,7 +367,6 @@ export default class ZnTranslations extends ZincElement implements ZincFormContr
|
|
|
368
367
|
<zn-dropdown placement="bottom-end" data-lang-overflow>
|
|
369
368
|
<zn-button
|
|
370
369
|
slot="trigger"
|
|
371
|
-
size="x-small"
|
|
372
370
|
color="default"
|
|
373
371
|
icon="keyboard_arrow_down"
|
|
374
372
|
?outline="${!overflowLangTabs.includes(this._activeLanguage)}"
|
|
@@ -383,7 +381,6 @@ export default class ZnTranslations extends ZincElement implements ZincFormContr
|
|
|
383
381
|
<zn-dropdown placement="bottom-end" data-lang-add>
|
|
384
382
|
<zn-button
|
|
385
383
|
slot="trigger"
|
|
386
|
-
size="x-small"
|
|
387
384
|
color="default"
|
|
388
385
|
outline
|
|
389
386
|
>+
|