@kubex/zinc 1.0.6 → 1.0.7
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 +149 -27
- package/dist/vscode.html-custom-data.json +5 -1
- package/dist/web-types.json +23 -4
- package/dist/zn.d.ts +20 -5
- package/dist/zn.min.js +143 -159
- package/package.json +1 -1
- package/src/components/content-block/content-block.component.ts +169 -101
- package/src/components/data-select/data-select.component.ts +51 -10
- package/src/components/data-table/data-table.component.ts +21 -26
- package/src/components/data-table/data-table.scss +74 -7
- package/src/components/data-table-filter/data-table-filter.component.ts +1 -1
- package/src/components/editor/modules/attachment/attachment.ts +53 -41
- package/src/components/editor/modules/toolbar/toolbar.ts +42 -0
- package/src/components/empty-state/empty-state.component.ts +16 -8
- package/src/components/icon/icon.component.ts +2 -0
- package/src/components/icon/icon.scss +13 -0
- package/src/components/item/item.component.ts +11 -3
- package/src/components/item/item.scss +7 -4
- package/src/components/panel/panel.component.ts +2 -0
- package/src/components/panel/panel.scss +6 -0
|
@@ -21,7 +21,6 @@ table {
|
|
|
21
21
|
&.table--standalone {
|
|
22
22
|
background-color: rgb(var(--zn-panel));
|
|
23
23
|
border-radius: var(--zn-border-radius-large);
|
|
24
|
-
box-shadow: var(--zn-shadow-medium);
|
|
25
24
|
border: 1px solid rgb(var(--zn-border-color));
|
|
26
25
|
overflow: hidden;
|
|
27
26
|
}
|
|
@@ -35,7 +34,7 @@ table {
|
|
|
35
34
|
border-bottom: 1px solid rgb(var(--zn-border-color)) !important;
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
|
|
37
|
+
&.with-hover tbody tr:hover {
|
|
39
38
|
background-color: rgba(var(--zn-primary), 0.05) !important;
|
|
40
39
|
cursor: pointer;
|
|
41
40
|
}
|
|
@@ -115,10 +114,10 @@ table {
|
|
|
115
114
|
}
|
|
116
115
|
}
|
|
117
116
|
|
|
118
|
-
&:first-of-type > div:has(
|
|
117
|
+
&:first-of-type > div:has(zn-checkbox) {
|
|
119
118
|
justify-content: center;
|
|
120
119
|
|
|
121
|
-
|
|
120
|
+
zn-checkbox {
|
|
122
121
|
margin: 0;
|
|
123
122
|
}
|
|
124
123
|
}
|
|
@@ -240,7 +239,7 @@ table {
|
|
|
240
239
|
flex-direction: row;
|
|
241
240
|
justify-content: space-between;
|
|
242
241
|
align-items: baseline;
|
|
243
|
-
padding: var(--zn-spacing-small);
|
|
242
|
+
padding-block: var(--zn-spacing-small);
|
|
244
243
|
gap: var(--zn-spacing-small);
|
|
245
244
|
|
|
246
245
|
&__actions,
|
|
@@ -306,9 +305,7 @@ table {
|
|
|
306
305
|
}
|
|
307
306
|
}
|
|
308
307
|
}
|
|
309
|
-
|
|
310
308
|
}
|
|
311
|
-
|
|
312
309
|
}
|
|
313
310
|
|
|
314
311
|
.reduced-opacity .table tbody {
|
|
@@ -333,3 +330,73 @@ table {
|
|
|
333
330
|
filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.04)) drop-shadow(0 4px 3px rgba(0, 0, 0, 0.1));
|
|
334
331
|
background-color: rgb(var(--zn-panel, 255, 255, 255));
|
|
335
332
|
}
|
|
333
|
+
|
|
334
|
+
/* Table Select Styles */
|
|
335
|
+
table tbody tr.table__row--selected {
|
|
336
|
+
background-color: var(--zn-color-purple-100);
|
|
337
|
+
|
|
338
|
+
&:nth-of-type(even) {
|
|
339
|
+
background-color: hsla(from var(--zn-color-purple-200) h s l / 0.8);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
&:hover {
|
|
343
|
+
background-color: var(--zn-color-purple-200) !important;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
td {
|
|
347
|
+
border-top: 1px solid var(--zn-color-purple-600) !important;
|
|
348
|
+
border-bottom: 1px solid var(--zn-color-purple-600) !important;
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
td:first-of-type {
|
|
352
|
+
border-left: 1px solid var(--zn-color-purple-600);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
td:last-of-type {
|
|
356
|
+
border-right: 1px solid var(--zn-color-purple-600);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
&:last-of-type td:first-of-type {
|
|
360
|
+
border-bottom-left-radius: var(--zn-border-radius-large);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
&:last-of-type td:last-of-type {
|
|
364
|
+
border-bottom-right-radius: var(--zn-border-radius-large);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
& + tr td {
|
|
368
|
+
border-top: 0 !important;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
& + tr.table__row--selected td {
|
|
372
|
+
&:first-of-type {
|
|
373
|
+
border-top-left-radius: 0;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
&:last-of-type {
|
|
377
|
+
border-top-right-radius: 0;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
&:has(+ tr.table__row--selected) td {
|
|
382
|
+
border-bottom: 0 !important;
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
&:first-of-type td {
|
|
386
|
+
border-top: 0 !important;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
&:has(+ tr.table__row--selected) {
|
|
390
|
+
td:first-of-type {
|
|
391
|
+
border-bottom-left-radius: 0;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
td:last-of-type {
|
|
395
|
+
border-bottom-right-radius: 0;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
table:has(tbody tr:first-of-type.table__row--selected) thead tr th {
|
|
401
|
+
border-bottom-color: var(--zn-color-purple-600) !important;
|
|
402
|
+
}
|
|
@@ -106,7 +106,7 @@ export default class ZnDataTableFilter extends ZincElement implements ZincFormCo
|
|
|
106
106
|
return html`
|
|
107
107
|
<zn-button id="slideout-trigger" color="transparent" size="x-small" icon="filter_alt" icon-size="22"
|
|
108
108
|
slot="trigger"
|
|
109
|
-
tooltip="
|
|
109
|
+
tooltip="Filter">
|
|
110
110
|
</zn-button>
|
|
111
111
|
<zn-slideout class="slideout-basic" trigger="slideout-trigger" label="Filters">
|
|
112
112
|
|
|
@@ -2,7 +2,7 @@ import type Quill from 'quill';
|
|
|
2
2
|
import type Toolbar from "../toolbar/toolbar";
|
|
3
3
|
|
|
4
4
|
interface AttachmentOptions {
|
|
5
|
-
upload: (file: File) => Promise<{ path: any
|
|
5
|
+
upload: (file: File) => Promise<{ path: any; url: any; filename: any }>;
|
|
6
6
|
onFileUploaded?: (node: HTMLElement, {url}: { url: string }) => void;
|
|
7
7
|
attachmentInput?: HTMLInputElement;
|
|
8
8
|
}
|
|
@@ -26,6 +26,9 @@ export default class Attachment {
|
|
|
26
26
|
if (typeof (this._options.upload) !== "function") {
|
|
27
27
|
console.warn("[Quill Attachment Module] No upload function provided");
|
|
28
28
|
}
|
|
29
|
+
if (typeof (this._options.onFileUploaded) !== "function") {
|
|
30
|
+
console.warn("[Quill Attachment Module] No file uploaded function provided");
|
|
31
|
+
}
|
|
29
32
|
|
|
30
33
|
(this._quill
|
|
31
34
|
.getModule('toolbar') as Toolbar)
|
|
@@ -48,24 +51,34 @@ export default class Attachment {
|
|
|
48
51
|
}
|
|
49
52
|
|
|
50
53
|
const file = this._fileHolder.files[0];
|
|
51
|
-
|
|
52
|
-
|
|
54
|
+
this.addAttachment(file);
|
|
55
|
+
}
|
|
53
56
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
public addAttachment(file: File, dataUrl?: string) {
|
|
58
|
+
const attachmentId = generateId();
|
|
59
|
+
const insertWithDataUrl = (base64: string) => {
|
|
60
|
+
this._insertAttachment({ dataUrl: base64, file, id: attachmentId });
|
|
61
|
+
};
|
|
58
62
|
|
|
59
|
-
if (
|
|
63
|
+
if (dataUrl) {
|
|
64
|
+
insertWithDataUrl(dataUrl);
|
|
65
|
+
} else {
|
|
66
|
+
const fileReader = new FileReader();
|
|
67
|
+
fileReader.addEventListener('load', () => {
|
|
68
|
+
const base64Content = fileReader.result as string;
|
|
69
|
+
insertWithDataUrl(base64Content);
|
|
70
|
+
}, false);
|
|
60
71
|
fileReader.readAsDataURL(file);
|
|
61
72
|
}
|
|
62
73
|
|
|
63
|
-
this._options.upload
|
|
64
|
-
this.
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
if (typeof this._options.upload === 'function') {
|
|
75
|
+
this._options.upload(file).then(({ path, url }: { path: string; url: string }) => {
|
|
76
|
+
this._uploadAttachment(file, url);
|
|
77
|
+
this._updateAttachment(attachmentId, url, path);
|
|
78
|
+
}).catch((err: { message: string }) => {
|
|
79
|
+
console.warn(err.message);
|
|
80
|
+
});
|
|
81
|
+
}
|
|
69
82
|
}
|
|
70
83
|
|
|
71
84
|
private _attachmentContainer = document.createElement('div');
|
|
@@ -85,37 +98,36 @@ export default class Attachment {
|
|
|
85
98
|
this._quill.container.appendChild(attachmentContainer);
|
|
86
99
|
}
|
|
87
100
|
|
|
88
|
-
private _insertAttachment({dataUrl, file, id}: { dataUrl: string
|
|
101
|
+
private _insertAttachment({dataUrl, file, id}: { dataUrl: string; file: File; id: string }) {
|
|
89
102
|
this._attachmentContainer.appendChild(this._createAttachment(dataUrl, file, id));
|
|
90
103
|
}
|
|
91
104
|
|
|
92
105
|
private _updateAttachment(id: string, url: string, filename: string) {
|
|
93
|
-
const element = this._quill.container.querySelector(`#${id}`)
|
|
94
|
-
if (element)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
if (typeof this._options.onFileUploaded === 'function') {
|
|
106
|
-
this._options.onFileUploaded(element, {url});
|
|
106
|
+
const element = this._quill.container.querySelector(`#${id}`);
|
|
107
|
+
if (!element) return;
|
|
108
|
+
|
|
109
|
+
element.setAttribute('href', url);
|
|
110
|
+
const attachmentName = element.querySelector('.attachment-name');
|
|
111
|
+
if (attachmentName) {
|
|
112
|
+
if (filename) {
|
|
113
|
+
attachmentName.textContent = filename;
|
|
114
|
+
} else {
|
|
115
|
+
attachmentName.textContent = 'Error uploading file';
|
|
107
116
|
}
|
|
117
|
+
}
|
|
108
118
|
|
|
119
|
+
if (this._options.onFileUploaded) {
|
|
120
|
+
this._options.onFileUploaded(element as HTMLElement, {url});
|
|
121
|
+
}
|
|
109
122
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
}
|
|
123
|
+
// add the url to the hidden input
|
|
124
|
+
const attachments = this._options.attachmentInput;
|
|
125
|
+
if (attachments && filename) {
|
|
126
|
+
// value should be an array of attachment names
|
|
127
|
+
const value = attachments.value;
|
|
128
|
+
const data: string[] = value ? JSON.parse(value) as string[] : [];
|
|
129
|
+
data.push(filename);
|
|
130
|
+
attachments.value = JSON.stringify(data);
|
|
119
131
|
}
|
|
120
132
|
}
|
|
121
133
|
|
|
@@ -162,9 +174,9 @@ export default class Attachment {
|
|
|
162
174
|
if (attachments) {
|
|
163
175
|
// value should be an array of attachment names
|
|
164
176
|
const value = attachments.value;
|
|
165
|
-
|
|
166
|
-
const data = value ? JSON.parse(value) : [];
|
|
167
|
-
const index = data.indexOf(attachmentName ? attachmentName.textContent : '');
|
|
177
|
+
const attachmentName = attachment?.querySelector('.attachment-name');
|
|
178
|
+
const data: string[] = value ? JSON.parse(value) as string[] : [];
|
|
179
|
+
const index = data.indexOf(attachmentName?.textContent ? attachmentName.textContent : '');
|
|
168
180
|
if (index > -1) {
|
|
169
181
|
data.splice(index, 1);
|
|
170
182
|
attachments.value = JSON.stringify(data);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import './toolbar.component';
|
|
2
2
|
import Quill from "quill";
|
|
3
3
|
import QuillToolbar from "quill/modules/toolbar";
|
|
4
|
+
import type Attachment from "../attachment/attachment";
|
|
4
5
|
import type DialogComponent from "../dialog/dialog.component";
|
|
5
6
|
import type Emoji from "../emoji/emoji";
|
|
6
7
|
import type ToolbarComponent from "./toolbar.component";
|
|
@@ -26,6 +27,7 @@ class Toolbar extends QuillToolbar {
|
|
|
26
27
|
this.addHandler('redo', () => quill.history.redo());
|
|
27
28
|
this.addHandler('undo', () => quill.history.undo());
|
|
28
29
|
this.addHandler('dialog', (value: string) => this._openDialog(value));
|
|
30
|
+
this.addHandler('image', () => this._addImage());
|
|
29
31
|
|
|
30
32
|
this._quill = quill;
|
|
31
33
|
this._component = options.container;
|
|
@@ -323,6 +325,46 @@ class Toolbar extends QuillToolbar {
|
|
|
323
325
|
const emoji = this._quill.getModule('emoji') as Emoji;
|
|
324
326
|
emoji?.initPicker();
|
|
325
327
|
}
|
|
328
|
+
|
|
329
|
+
private _addImage() {
|
|
330
|
+
const input = document.createElement('input')
|
|
331
|
+
input.setAttribute('type', 'file')
|
|
332
|
+
input.setAttribute('accept', 'image/*')
|
|
333
|
+
input.click()
|
|
334
|
+
|
|
335
|
+
input.onchange = () => {
|
|
336
|
+
const file = input.files?.[0];
|
|
337
|
+
if (!file?.type || !file.type.startsWith('image/')) return;
|
|
338
|
+
|
|
339
|
+
const reader = new window.FileReader();
|
|
340
|
+
reader.onload = () => {
|
|
341
|
+
const dataUrl = reader.result as string;
|
|
342
|
+
const selection = this._quill.getSelection(true);
|
|
343
|
+
const index = selection ? selection.index + selection.length : this._quill.getLength();
|
|
344
|
+
|
|
345
|
+
this._quill.insertEmbed(index, 'image', dataUrl, Quill.sources.USER);
|
|
346
|
+
|
|
347
|
+
const root = this._quill.root as HTMLElement;
|
|
348
|
+
const images = Array.from(root.querySelectorAll('img')) as HTMLImageElement[];
|
|
349
|
+
const inserted = images.reverse().find(img => img.getAttribute('src') === dataUrl) || null;
|
|
350
|
+
if (inserted) {
|
|
351
|
+
inserted.setAttribute('alt', file.name.replace(/\.[^/.]+$/, ''));
|
|
352
|
+
inserted.setAttribute('title', file.name);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
this._quill.setSelection(index + 1, 0, Quill.sources.USER);
|
|
356
|
+
this._syncToolbarState();
|
|
357
|
+
|
|
358
|
+
try {
|
|
359
|
+
const attachmentModule = this._quill.getModule('attachment') as Attachment | undefined;
|
|
360
|
+
attachmentModule?.addAttachment(file, dataUrl);
|
|
361
|
+
} catch (err) {
|
|
362
|
+
console.warn('[Toolbar] Failed to process image with attachment handler', err);
|
|
363
|
+
}
|
|
364
|
+
};
|
|
365
|
+
reader.readAsDataURL(file);
|
|
366
|
+
}
|
|
367
|
+
}
|
|
326
368
|
}
|
|
327
369
|
|
|
328
370
|
export default Toolbar;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {classMap} from "lit/directives/class-map.js";
|
|
2
2
|
import {type CSSResultGroup, html, unsafeCSS} from 'lit';
|
|
3
|
+
import {HasSlotController} from "../../internal/slot";
|
|
4
|
+
import {property} from 'lit/decorators.js';
|
|
3
5
|
import ZincElement from '../../internal/zinc-element';
|
|
4
|
-
import {classMap} from "lit/directives/class-map.js";
|
|
5
6
|
|
|
6
7
|
import styles from './empty-state.scss';
|
|
7
8
|
|
|
@@ -35,6 +36,8 @@ export default class ZnEmptyState extends ZincElement {
|
|
|
35
36
|
|
|
36
37
|
@property({type: Boolean}) padded: boolean = false;
|
|
37
38
|
|
|
39
|
+
private readonly hasSlotController = new HasSlotController(this, '[default]', 'caption', 'description');
|
|
40
|
+
|
|
38
41
|
render() {
|
|
39
42
|
return html`
|
|
40
43
|
<div class="${classMap({
|
|
@@ -45,16 +48,21 @@ export default class ZnEmptyState extends ZincElement {
|
|
|
45
48
|
'empty-state--padded': this.padded
|
|
46
49
|
})}">
|
|
47
50
|
<div class="empty-state__wrapper">
|
|
48
|
-
${this.icon
|
|
49
|
-
? html
|
|
51
|
+
${this.icon || this.hasSlotController.test('icon')
|
|
52
|
+
? html`
|
|
53
|
+
<zn-icon src="${this.icon}" size="48" color="${this.type ? this.type : 'primary'}"></zn-icon>`
|
|
50
54
|
: ''}
|
|
51
|
-
${this.caption
|
|
55
|
+
${this.caption || this.hasSlotController.test('caption')
|
|
52
56
|
? html`
|
|
53
|
-
<div class="caption"
|
|
57
|
+
<div class="caption">
|
|
58
|
+
<slot name="caption">${this.caption}</slot>
|
|
59
|
+
</div>`
|
|
54
60
|
: ''}
|
|
55
|
-
${this.description
|
|
61
|
+
${this.description || this.hasSlotController.test('description')
|
|
56
62
|
? html`
|
|
57
|
-
<div class="description"
|
|
63
|
+
<div class="description">
|
|
64
|
+
<slot name="description">${this.description}</slot>
|
|
65
|
+
</div>`
|
|
58
66
|
: ''}
|
|
59
67
|
<slot></slot>
|
|
60
68
|
</div>
|
|
@@ -64,6 +64,7 @@ export default class ZnIcon extends ZincElement {
|
|
|
64
64
|
@property({reflect: true}) color: IconColor;
|
|
65
65
|
|
|
66
66
|
@property({type: Boolean}) padded: boolean = false;
|
|
67
|
+
@property({type: Boolean}) blink: boolean = false;
|
|
67
68
|
|
|
68
69
|
@property({type: Boolean}) squared: boolean = false;
|
|
69
70
|
|
|
@@ -192,6 +193,7 @@ export default class ZnIcon extends ZincElement {
|
|
|
192
193
|
'icon--grey': this.color === "grey",
|
|
193
194
|
'icon--avatar': this.library === "avatar",
|
|
194
195
|
'icon--padded': this.padded,
|
|
196
|
+
'icon--blink': this.blink,
|
|
195
197
|
'icon--squared': this.squared,
|
|
196
198
|
})}" style="${styleMap({
|
|
197
199
|
'--icon-size': this.size + "px",
|
|
@@ -119,6 +119,10 @@
|
|
|
119
119
|
border-radius: 50%;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
&--blink {
|
|
123
|
+
animation: blink-animation 1.5s steps(5, start) infinite;
|
|
124
|
+
}
|
|
125
|
+
|
|
122
126
|
&--avatar {
|
|
123
127
|
background-color: var(--avatar-color, var(--icon-color));
|
|
124
128
|
color: hsl(from var(--avatar-color, var(--icon-color)) h s 95);
|
|
@@ -197,3 +201,12 @@
|
|
|
197
201
|
vertical-align: middle;
|
|
198
202
|
}
|
|
199
203
|
}
|
|
204
|
+
|
|
205
|
+
@keyframes blink-animation {
|
|
206
|
+
0%, 100% {
|
|
207
|
+
opacity: 1;
|
|
208
|
+
}
|
|
209
|
+
50% {
|
|
210
|
+
opacity: 0.5;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
@@ -63,6 +63,12 @@ export default class ZnItem extends ZincElement {
|
|
|
63
63
|
if (inlineEdit) {
|
|
64
64
|
inlineEdit.setAttribute('size', this.size);
|
|
65
65
|
}
|
|
66
|
+
this.shadowRoot?.querySelector('.item')?.classList.toggle('item--with-content', this._hasContent());
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
protected _hasContent(): boolean {
|
|
70
|
+
const slotContent = this.querySelectorAll(":scope > :not([slot])")?.length || 0;
|
|
71
|
+
return slotContent > 0 || this.innerText.length > 0 || !(this.value === undefined || this.value === null)
|
|
66
72
|
}
|
|
67
73
|
|
|
68
74
|
render() {
|
|
@@ -71,13 +77,15 @@ export default class ZnItem extends ZincElement {
|
|
|
71
77
|
const headings = html`
|
|
72
78
|
<div class="item__headings">
|
|
73
79
|
<div class="item__caption" part="caption">${this.caption}</div>
|
|
74
|
-
${this.description ? html
|
|
80
|
+
${this.description ? html`
|
|
81
|
+
<div class="item__description">${this.description}</div>` : ''}
|
|
75
82
|
</div>`;
|
|
76
83
|
|
|
77
84
|
return html`
|
|
78
85
|
<div
|
|
79
|
-
class
|
|
86
|
+
class="${classMap({
|
|
80
87
|
'item': true,
|
|
88
|
+
'item--with-content': this._hasContent(),
|
|
81
89
|
'item--stacked': this.stacked,
|
|
82
90
|
'item--edit-on-hover': this.editOnHover,
|
|
83
91
|
'item--inline': this.inline,
|
|
@@ -88,7 +96,7 @@ export default class ZnItem extends ZincElement {
|
|
|
88
96
|
'item--has-icon': hasIcon,
|
|
89
97
|
'item--no-padding': this.noPadding,
|
|
90
98
|
'item--align-end': this.alignEnd
|
|
91
|
-
})}
|
|
99
|
+
})}"
|
|
92
100
|
part="base">
|
|
93
101
|
|
|
94
102
|
${this.icon ? html`
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
gap: var(--zn-spacing-2x-small);
|
|
15
15
|
|
|
16
16
|
@include wc.container-query(null, md) {
|
|
17
|
-
--zn-item-label-max-width:
|
|
17
|
+
--zn-item-label-max-width: 220px;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
@include wc.container-query(null, smp) {
|
|
21
|
-
--zn-item-label-max-width:
|
|
21
|
+
--zn-item-label-max-width: 180px;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
@include wc.container-query(null, sm) {
|
|
@@ -54,12 +54,15 @@
|
|
|
54
54
|
&__headings {
|
|
55
55
|
display: flex;
|
|
56
56
|
flex-direction: column;
|
|
57
|
-
|
|
57
|
+
flex-shrink: 0;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&--with-content &__headings {
|
|
61
|
+
max-width: 45%;
|
|
58
62
|
@include wc.container-query(null, sm) {
|
|
59
63
|
max-width: unset;
|
|
60
64
|
}
|
|
61
65
|
width: var(--zn-item-label-max-width);
|
|
62
|
-
flex-shrink: 0;
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
&__content {
|
|
@@ -34,6 +34,7 @@ export default class ZnPanel extends ZincElement {
|
|
|
34
34
|
@property({type: Boolean}) flush: boolean;
|
|
35
35
|
@property({attribute: 'flush-x', type: Boolean}) flushX: boolean;
|
|
36
36
|
@property({attribute: 'flush-y', type: Boolean}) flushY: boolean;
|
|
37
|
+
@property({attribute: 'flush-footer', type: Boolean}) flushFooter: boolean;
|
|
37
38
|
@property({type: Boolean}) transparent: boolean;
|
|
38
39
|
|
|
39
40
|
protected firstUpdated(_changedProperties: PropertyValues) {
|
|
@@ -81,6 +82,7 @@ export default class ZnPanel extends ZincElement {
|
|
|
81
82
|
'panel--flush': this.flush || this.tabbed,
|
|
82
83
|
'panel--flush-x': this.flushX,
|
|
83
84
|
'panel--flush-y': this.flushY,
|
|
85
|
+
'panel--flush-footer': this.flushFooter,
|
|
84
86
|
'panel--tabbed': this.tabbed,
|
|
85
87
|
'panel--transparent': this.transparent,
|
|
86
88
|
'panel--has-actions': hasActionSlot,
|