@kubex/zinc 1.0.4 → 1.0.6
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 +1278 -191
- package/dist/vscode.html-custom-data.json +93 -16
- package/dist/web-types.json +235 -25
- package/dist/zn.d.ts +1313 -941
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +2049 -931
- package/docs/_includes/default.njk +1 -0
- package/docs/assets/scripts/docs.js +4 -5
- package/docs/assets/scripts/search.js +0 -9
- package/docs/assets/styles/docs.css +3 -3
- package/docs/data/data-table.json +79 -0
- package/docs/data/products-table.json +36 -0
- package/docs/eleventy.config.cjs +3 -0
- package/docs/pages/components/data-select.md +10 -0
- package/docs/pages/components/data-table.md +84 -45
- package/docs/pages/components/dialog.md +1 -1
- package/docs/pages/components/editor.md +1 -3
- package/docs/pages/components/filter-wrapper.md +20 -0
- package/docs/pages/components/icon.md +2 -0
- package/docs/pages/components/item.md +2 -2
- package/docs/pages/components/menu-item.md +12 -3
- package/docs/pages/components/panel.md +17 -0
- package/docs/pages/components/progress-tile.md +17 -1
- package/docs/pages/components/settings-container.md +137 -0
- package/docs/pages/components/textarea.md +1 -1
- package/package.json +3 -1
- package/scss/_root.scss +26 -0
- package/scss/boot.scss +27 -1
- package/scss/mixins/index.scss +30 -1
- package/scss/shared/_base.scss +1 -1
- package/scss/shared/_button.scss +1 -1
- package/scss/shared/layout.scss +7 -0
- package/scss/themes/_dark.scss +5 -5
- package/scss/themes/_light.scss +6 -5
- package/scss/variables/index.scss +9 -0
- package/src/components/alert/alert.component.ts +1 -1
- package/src/components/alert/alert.scss +18 -4
- package/src/components/bulk-actions/bulk-actions.component.ts +152 -84
- package/src/components/bulk-actions/bulk-actions.scss +2 -0
- package/src/components/button/button.component.ts +6 -2
- package/src/components/button/button.scss +16 -1
- package/src/components/button-menu/button-menu.component.ts +23 -15
- package/src/components/button-menu/button-menu.scss +4 -4
- package/src/components/chart/chart.component.ts +14 -12
- package/src/components/checkbox/checkbox.component.ts +5 -1
- package/src/components/checkbox/checkbox.scss +1 -1
- package/src/components/chip/chip.component.ts +7 -3
- package/src/components/chip/chip.scss +9 -1
- package/src/components/collapsible/collapsible.component.ts +48 -2
- package/src/components/cols/cols.component.ts +7 -3
- package/src/components/cols/cols.scss +22 -14
- package/src/components/confirm/confirm.component.ts +1 -2
- package/src/components/content-block/content-block.component.ts +104 -14
- package/src/components/content-block/content-block.scss +8 -0
- package/src/components/data-select/data-select.component.ts +1 -1
- package/src/components/data-table/data-table.component.ts +394 -430
- package/src/components/data-table/data-table.scss +6 -1
- package/src/components/datepicker/datepicker.scss +1 -1
- package/src/components/dialog/dialog.component.ts +52 -33
- package/src/components/dialog/dialog.scss +15 -1
- package/src/components/dropdown/dropdown.component.ts +1 -1
- package/src/components/editor/editor.component.ts +196 -158
- package/src/components/editor/editor.scss +25 -5
- package/src/components/editor/modules/ai/index.ts +281 -0
- package/src/components/editor/modules/ai/panel/ai-panel.component.ts +102 -0
- package/src/components/editor/modules/ai/panel/ai-panel.scss +83 -0
- package/src/components/editor/modules/ai/tooltip/ai-tooltip.component.ts +30 -0
- package/src/components/editor/modules/ai/tooltip/ai-tooltip.scss +28 -0
- package/src/components/editor/modules/{attachment-module.ts → attachment/attachment.ts} +7 -7
- package/src/components/editor/modules/context-menu/context-menu-component.ts +115 -0
- package/src/components/editor/modules/context-menu/context-menu.scss +49 -0
- package/src/components/editor/modules/context-menu/context-menu.ts +296 -0
- package/src/components/editor/modules/context-menu/quick-action/index.ts +12 -0
- package/src/components/editor/modules/context-menu/quick-action/quick-action.component.ts +18 -0
- package/src/components/editor/modules/date-picker/date-picker.ts +77 -0
- package/src/components/editor/modules/dialog/dialog.component.ts +115 -0
- package/src/components/editor/modules/dialog/dialog.scss +43 -0
- package/src/components/editor/modules/dialog/dialog.ts +46 -0
- package/src/components/editor/modules/{drag-drop-module.ts → drag-drop/drag-drop.ts} +6 -6
- package/src/components/editor/modules/emoji/emoji.ts +106 -0
- package/src/components/editor/modules/emoji/headless/headless-emoji.component.ts +122 -0
- package/src/components/editor/modules/emoji/headless/headless-emoji.scss +52 -0
- package/src/components/editor/modules/emoji/headless/headless-emoji.ts +223 -0
- package/src/components/editor/modules/{image-resize-module/image-resize-module.ts → image-resize/image-resize.ts} +5 -5
- package/src/components/editor/modules/{time-tracking-module.ts → time-tracking/time-tracking.ts} +5 -5
- package/src/components/editor/modules/toolbar/tool/index.ts +12 -0
- package/src/components/editor/modules/toolbar/tool/tool.component.ts +30 -0
- package/src/components/editor/modules/toolbar/tool/tool.scss +5 -0
- package/src/components/editor/modules/toolbar/toolbar.component.ts +738 -0
- package/src/components/editor/modules/toolbar/toolbar.scss +98 -0
- package/src/components/editor/modules/toolbar/toolbar.ts +328 -0
- package/src/components/expanding-action/expanding-action.component.ts +2 -2
- package/src/components/expanding-action/expanding-action.scss +2 -2
- package/src/components/filter-wrapper/filter-wrapper.component.ts +91 -0
- package/src/components/filter-wrapper/filter-wrapper.scss +11 -0
- package/src/components/filter-wrapper/filter-wrapper.test.ts +10 -0
- package/src/components/filter-wrapper/index.ts +12 -0
- package/src/components/header/header.component.ts +1 -1
- package/src/components/header/header.scss +8 -1
- package/src/components/hover-container/hover-container.scss +39 -36
- package/src/components/icon/icon.component.ts +11 -5
- package/src/components/icon/icon.scss +15 -2
- package/src/components/inline-edit/inline-edit.component.ts +52 -6
- package/src/components/inline-edit/inline-edit.scss +15 -2
- package/src/components/input/input.scss +1 -1
- package/src/components/item/item.component.ts +30 -19
- package/src/components/item/item.scss +57 -23
- package/src/components/linked-select/linked-select.component.ts +5 -1
- package/src/components/menu/menu.component.ts +1 -0
- package/src/components/menu/menu.scss +1 -1
- package/src/components/menu-item/menu-item.component.ts +22 -4
- package/src/components/menu-item/menu-item.scss +54 -7
- package/src/components/navbar/navbar.component.ts +7 -1
- package/src/components/navbar/navbar.scss +26 -16
- package/src/components/option/option.component.ts +4 -1
- package/src/components/option/option.scss +9 -0
- package/src/components/page-nav/page-nav.component.ts +2 -2
- package/src/components/page-nav/page-nav.scss +4 -4
- package/src/components/panel/panel.component.ts +20 -9
- package/src/components/panel/panel.scss +5 -1
- package/src/components/popup/popup.component.ts +16 -2
- package/src/components/progress-tile/progress-tile.component.ts +10 -4
- package/src/components/progress-tile/progress-tile.scss +7 -4
- package/src/components/query-builder/query-builder.component.ts +1 -1
- package/src/components/radio/radio.scss +1 -1
- package/src/components/scroll-container/scroll-container.component.ts +56 -9
- package/src/components/scroll-container/scroll-container.scss +37 -2
- package/src/components/select/select.component.ts +3 -0
- package/src/components/select/select.scss +1 -1
- package/src/components/settings-container/index.ts +12 -0
- package/src/components/settings-container/settings-container.component.ts +226 -0
- package/src/components/settings-container/settings-container.scss +99 -0
- package/src/components/settings-container/settings-container.test.ts +10 -0
- package/src/components/skeleton/skeleton.scss +5 -4
- package/src/components/sp/sp.component.ts +2 -0
- package/src/components/sp/sp.scss +2 -0
- package/src/components/split-button/split-button.component.ts +24 -18
- package/src/components/split-pane/split-pane.component.ts +5 -5
- package/src/components/stat/stat.component.ts +5 -1
- package/src/components/stat/stat.scss +24 -1
- package/src/components/style/style.component.ts +25 -1
- package/src/components/tabs/tabs.component.ts +12 -1
- package/src/components/textarea/textarea.component.ts +3 -1
- package/src/components/textarea/textarea.scss +21 -2
- package/src/components/vertical-stepper/vertical-stepper.scss +1 -1
- package/src/internal/form.ts +3 -1
- package/src/internal/slot.ts +29 -3
- package/src/utilities/on.ts +7 -8
- package/src/utilities/query.ts +5 -1
- package/src/wc.scss +7 -0
- package/src/zinc.ts +5 -0
- package/src/components/editor/modules/dialog-module/dialog-module.component.ts +0 -289
- package/src/components/editor/modules/dialog-module/dialog-module.scss +0 -115
- package/src/components/editor/modules/dialog-module/dialog-module.ts +0 -99
- package/src/components/editor/modules/events/zn-show-canned-response-dialog.ts +0 -15
- package/src/components/editor/modules/menu-module/menu-module.component.ts +0 -149
- package/src/components/editor/modules/menu-module/menu-module.scss +0 -17
- package/src/components/editor/modules/menu-module/menu-module.ts +0 -203
|
@@ -50,6 +50,8 @@ export default class ZnMenuItem extends ZincElement {
|
|
|
50
50
|
/** Draws the item in a checked state. */
|
|
51
51
|
@property({type: Boolean, reflect: true}) checked = false;
|
|
52
52
|
|
|
53
|
+
@property({attribute: 'checked-position', reflect: true}) checkedPosition: 'left' | 'right' = 'left';
|
|
54
|
+
|
|
53
55
|
/** A unique value to store in the menu item. This can be used as a way to identify menu items when selected. */
|
|
54
56
|
@property() value = '';
|
|
55
57
|
|
|
@@ -59,6 +61,8 @@ export default class ZnMenuItem extends ZincElement {
|
|
|
59
61
|
/** Draws the menu item in a disabled state, preventing selection. */
|
|
60
62
|
@property({type: Boolean, reflect: true}) disabled = false;
|
|
61
63
|
|
|
64
|
+
@property() color: string;
|
|
65
|
+
|
|
62
66
|
// Link Specific
|
|
63
67
|
@property() href: string;
|
|
64
68
|
|
|
@@ -193,13 +197,22 @@ export default class ZnMenuItem extends ZincElement {
|
|
|
193
197
|
'menu-item--disabled': this.disabled,
|
|
194
198
|
'menu-item--loading': this.loading,
|
|
195
199
|
'menu-item--has-submenu': this.isSubmenu(),
|
|
196
|
-
'menu-item--submenu-expanded': isSubmenuExpanded
|
|
200
|
+
'menu-item--submenu-expanded': isSubmenuExpanded,
|
|
201
|
+
'menu-item--primary': this.color === 'primary',
|
|
202
|
+
'menu-item--secondary': this.color === 'secondary',
|
|
203
|
+
'menu-item--error': this.color === 'error',
|
|
204
|
+
'menu-item--info': this.color === 'info',
|
|
205
|
+
'menu-item--success': this.color === 'success',
|
|
206
|
+
'menu-item--warning': this.color === 'warning',
|
|
207
|
+
'menu-item--transparent': this.color === 'transparent',
|
|
208
|
+
|
|
197
209
|
})}
|
|
198
210
|
?aria-haspopup="${this.isSubmenu()}"
|
|
199
211
|
?aria-expanded="${isSubmenuExpanded}">
|
|
200
|
-
|
|
201
|
-
<
|
|
202
|
-
|
|
212
|
+
${this.checkedPosition === 'left' ? html`
|
|
213
|
+
<span part="checked-icon" class="menu-item__check">
|
|
214
|
+
<zn-icon src="check_small" aria-hidden="true"></zn-icon>
|
|
215
|
+
</span>` : ''}
|
|
203
216
|
|
|
204
217
|
<slot name="prefix" part="prefix" class="menu-item__prefix"></slot>
|
|
205
218
|
|
|
@@ -207,6 +220,11 @@ export default class ZnMenuItem extends ZincElement {
|
|
|
207
220
|
|
|
208
221
|
<slot name="suffix" part="suffix" class="menu-item__suffix"></slot>
|
|
209
222
|
|
|
223
|
+
${this.checkedPosition === 'right' ? html`
|
|
224
|
+
<span part="checked-icon" class="menu-item__check">
|
|
225
|
+
<zn-icon src="check_small" aria-hidden="true"></zn-icon>
|
|
226
|
+
</span>` : ''}
|
|
227
|
+
|
|
210
228
|
<span part="submenu-icon" class="menu-item__chevron">
|
|
211
229
|
<zn-icon src=${isRtl ? 'chevron_left' : 'chevron_right'} aria-hidden="true"></zn-icon>
|
|
212
230
|
</span>
|
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
:host {
|
|
4
4
|
--submenu-offset: -2px;
|
|
5
|
+
--color: rgba(var(--zn-text), var(--zn-text-opacity));
|
|
6
|
+
--hover-color: rgb(var(--zn-primary));
|
|
7
|
+
--hover-bg: rgba(var(--zn-panel-highlight), var(--zn-panel-highlight-opacity));
|
|
5
8
|
display: block;
|
|
6
9
|
}
|
|
7
10
|
|
|
@@ -13,7 +16,7 @@
|
|
|
13
16
|
position: relative;
|
|
14
17
|
display: flex;
|
|
15
18
|
align-items: stretch;
|
|
16
|
-
padding: var(--zn-spacing-medium);
|
|
19
|
+
padding: var(--zn-spacing-small) var(--zn-spacing-medium);
|
|
17
20
|
transition: .4s fill;
|
|
18
21
|
user-select: none;
|
|
19
22
|
-webkit-user-select: none;
|
|
@@ -22,7 +25,7 @@
|
|
|
22
25
|
border-bottom-width: 1px;
|
|
23
26
|
|
|
24
27
|
text-decoration: none;
|
|
25
|
-
color:
|
|
28
|
+
color: var(--color);
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
.menu-item__label::slotted(*) {
|
|
@@ -47,6 +50,11 @@
|
|
|
47
50
|
text-overflow: ellipsis;
|
|
48
51
|
align-items: center;
|
|
49
52
|
overflow: hidden;
|
|
53
|
+
color: var(--color);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.menu-item:hover .menu-item__label {
|
|
57
|
+
color: var(--hover-color);
|
|
50
58
|
}
|
|
51
59
|
|
|
52
60
|
.menu-item .menu-item__prefix {
|
|
@@ -92,14 +100,14 @@
|
|
|
92
100
|
|
|
93
101
|
:host(:hover:not([aria-disabled='true'], :focus-visible)) .menu-item,
|
|
94
102
|
.menu-item--submenu-expanded {
|
|
95
|
-
background-color:
|
|
96
|
-
color:
|
|
103
|
+
background-color: var(--hover-bg);
|
|
104
|
+
color: var(--hover-color);
|
|
97
105
|
}
|
|
98
106
|
|
|
99
107
|
:host(:focus-visible) .menu-item {
|
|
100
108
|
outline: none;
|
|
101
|
-
background-color:
|
|
102
|
-
color:
|
|
109
|
+
background-color: var(--hover-bg);
|
|
110
|
+
color: var(--hover-color);
|
|
103
111
|
opacity: 1;
|
|
104
112
|
}
|
|
105
113
|
|
|
@@ -134,7 +142,7 @@
|
|
|
134
142
|
|
|
135
143
|
/* Add elevation and z-index to submenus */
|
|
136
144
|
zn-popup::part(popup) {
|
|
137
|
-
|
|
145
|
+
box-shadow: var(--zn-shadow-large);
|
|
138
146
|
z-index: 100;
|
|
139
147
|
margin-left: var(--submenu-offset);
|
|
140
148
|
}
|
|
@@ -155,3 +163,42 @@ zn-popup::part(popup) {
|
|
|
155
163
|
max-width: var(--auto-size-available-width) !important;
|
|
156
164
|
max-height: var(--auto-size-available-height) !important;
|
|
157
165
|
}
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
.menu-item--primary {
|
|
169
|
+
--color: rgba(var(--zn-primary), 0.9);
|
|
170
|
+
--hover-color: #ffffff;
|
|
171
|
+
--hover-bg: rgba(var(--zn-primary), 0.9);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.menu-item--error {
|
|
175
|
+
--color: rgb(var(--zn-color-error));
|
|
176
|
+
--hover-color: #ffffff;
|
|
177
|
+
--hover-bg: rgba(var(--zn-color-error), 0.9);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.menu-item--info {
|
|
181
|
+
--color: rgb(var(--zn-color-info));
|
|
182
|
+
--hover-color: #ffffff;
|
|
183
|
+
--hover-bg: rgba(var(--zn-color-info), 0.9);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.menu-item--warning {
|
|
187
|
+
--color: rgb(var(--zn-color-warning));
|
|
188
|
+
--hover-color: #ffffff;
|
|
189
|
+
--hover-bg: rgba(var(--zn-color-warning), 0.9);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.menu-item--success {
|
|
193
|
+
--color: rgb(var(--zn-color-success));
|
|
194
|
+
--hover-color: #ffffff;
|
|
195
|
+
--hover-bg: rgba(var(--zn-color-success), 0.9);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.menu-item--secondary {
|
|
199
|
+
--color: rgb(var(--zn-accent));
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.menu-item--transparent {
|
|
203
|
+
--color: rgb(var(--zn-text));
|
|
204
|
+
}
|
|
@@ -33,10 +33,13 @@ export default class ZnNavbar extends ZincElement {
|
|
|
33
33
|
@property({attribute: 'navigation', type: Array}) navigation = [];
|
|
34
34
|
@property({attribute: 'full-width', type: Boolean, reflect: true}) fullWidth: boolean;
|
|
35
35
|
@property({attribute: 'icon-bar', type: Boolean, reflect: true}) iconBar: boolean;
|
|
36
|
+
@property({attribute: 'slim', type: Boolean, reflect: true}) slim: boolean;
|
|
37
|
+
@property({attribute: 'border', type: Boolean, reflect: true}) border: boolean;
|
|
36
38
|
@property({attribute: 'hide-one', type: Boolean, reflect: true}) hideOne: boolean;
|
|
37
39
|
@property({attribute: 'flush', type: Boolean, reflect: true}) flush: boolean = false;
|
|
38
40
|
@property({type: Boolean}) stacked: boolean;
|
|
39
41
|
@property({type: Array}) dropdown = [];
|
|
42
|
+
@property({attribute: "no-pad", type: Boolean}) noPad: false
|
|
40
43
|
|
|
41
44
|
private _preItems: NodeListOf<Element>;
|
|
42
45
|
private _postItems: NodeListOf<Element>;
|
|
@@ -197,7 +200,10 @@ export default class ZnNavbar extends ZincElement {
|
|
|
197
200
|
<div class="navbar__container">
|
|
198
201
|
<ul class="${classMap({
|
|
199
202
|
'navbar': true,
|
|
200
|
-
'navbar--
|
|
203
|
+
'navbar--slim': this.slim,
|
|
204
|
+
'navbar--border': this.border,
|
|
205
|
+
'navbar--flush': this.flush,
|
|
206
|
+
'navbar--no-pad': this.noPad
|
|
201
207
|
})}">
|
|
202
208
|
${this._preItems}
|
|
203
209
|
${this.navigation.map((item: any) => {
|
|
@@ -38,10 +38,14 @@ ul.navbar {
|
|
|
38
38
|
width: unset;
|
|
39
39
|
height: 100%;
|
|
40
40
|
margin: 0 0;
|
|
41
|
-
border-left: 1px solid rgb(var(--zn-border-color));
|
|
42
41
|
|
|
43
42
|
.navbar__container {
|
|
44
43
|
border-bottom: none;
|
|
44
|
+
height: 100%;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
ul.navbar.navbar--no-pad li {
|
|
48
|
+
padding: 0 !important;
|
|
45
49
|
}
|
|
46
50
|
|
|
47
51
|
ul.navbar {
|
|
@@ -66,18 +70,33 @@ ul.navbar {
|
|
|
66
70
|
right: 0;
|
|
67
71
|
}
|
|
68
72
|
}
|
|
73
|
+
|
|
74
|
+
&--slim {
|
|
75
|
+
li {
|
|
76
|
+
padding: var(--zn-spacing-small);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
69
80
|
}
|
|
70
81
|
}
|
|
71
82
|
|
|
72
83
|
:host([stacked][slot="left"]) {
|
|
73
84
|
ul.navbar {
|
|
74
|
-
|
|
85
|
+
&--border {
|
|
86
|
+
border-right: 1px solid rgb(var(--zn-border-color));
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
//margin-right: var(--zn-spacing-medium);
|
|
75
90
|
}
|
|
76
91
|
}
|
|
77
92
|
|
|
78
93
|
:host([stacked][slot="right"]) {
|
|
79
94
|
ul.navbar {
|
|
80
|
-
|
|
95
|
+
&--border {
|
|
96
|
+
border-left: 1px solid rgb(var(--zn-border-color));
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// margin-left: var(--zn-spacing-medium);
|
|
81
100
|
}
|
|
82
101
|
}
|
|
83
102
|
|
|
@@ -162,7 +181,6 @@ ul.navbar {
|
|
|
162
181
|
}
|
|
163
182
|
|
|
164
183
|
li {
|
|
165
|
-
|
|
166
184
|
&.hidden {
|
|
167
185
|
visibility: hidden;
|
|
168
186
|
position: absolute;
|
|
@@ -183,10 +201,9 @@ ul.navbar {
|
|
|
183
201
|
justify-content: center;
|
|
184
202
|
gap: 3px;
|
|
185
203
|
|
|
186
|
-
|
|
187
204
|
cursor: pointer;
|
|
188
205
|
|
|
189
|
-
zn-icon {
|
|
206
|
+
zn-icon, zn-tooltip {
|
|
190
207
|
pointer-events: none;
|
|
191
208
|
}
|
|
192
209
|
|
|
@@ -282,6 +299,7 @@ button[popovertarget] {
|
|
|
282
299
|
border-bottom-width: 1px;
|
|
283
300
|
border-bottom-style: solid;
|
|
284
301
|
border-bottom-color: rgb(var(--zn-border-color));
|
|
302
|
+
height: 35px;
|
|
285
303
|
}
|
|
286
304
|
|
|
287
305
|
&:host([dropdown]) li {
|
|
@@ -332,12 +350,6 @@ button[popovertarget] {
|
|
|
332
350
|
border-right: 1px solid rgb(var(--zn-border-color));
|
|
333
351
|
border-left: 0;
|
|
334
352
|
|
|
335
|
-
@include wc.container-query(hd) {
|
|
336
|
-
&:first-of-type {
|
|
337
|
-
border-left: 1px solid rgb(var(--zn-border-color));
|
|
338
|
-
}
|
|
339
|
-
}
|
|
340
|
-
|
|
341
353
|
&.active {
|
|
342
354
|
border-bottom: 0;
|
|
343
355
|
}
|
|
@@ -356,13 +368,11 @@ button[popovertarget] {
|
|
|
356
368
|
.expandables {
|
|
357
369
|
flex-grow: 0;
|
|
358
370
|
flex-shrink: 1;
|
|
359
|
-
//flex-basis: 100%;
|
|
360
371
|
margin: 0 var(--zn-spacing-medium);
|
|
361
372
|
display: flex;
|
|
362
|
-
|
|
363
|
-
align-items: end;
|
|
373
|
+
align-items: center;
|
|
364
374
|
width: fit-content;
|
|
365
|
-
height:
|
|
375
|
+
height: 100%;
|
|
366
376
|
gap: var(--zn-spacing-2x-small);
|
|
367
377
|
}
|
|
368
378
|
|
|
@@ -34,6 +34,8 @@ export default class ZnOption extends ZincElement {
|
|
|
34
34
|
// @ts-expect-error - Controller is currently unused
|
|
35
35
|
private readonly localize = new LocalizeController(this);
|
|
36
36
|
|
|
37
|
+
public multiple = false;
|
|
38
|
+
|
|
37
39
|
@query('.option__label') defaultSlot: HTMLSlotElement;
|
|
38
40
|
|
|
39
41
|
@state() current = false; // the user has keyed into the option, but hasn't selected it yet (shows a highlight)
|
|
@@ -133,7 +135,8 @@ export default class ZnOption extends ZincElement {
|
|
|
133
135
|
'option--current': this.current,
|
|
134
136
|
'option--disabled': this.disabled,
|
|
135
137
|
'option--selected': this.selected,
|
|
136
|
-
'option--hover': this.hasHover
|
|
138
|
+
'option--hover': this.hasHover,
|
|
139
|
+
'option--singular': !this.multiple
|
|
137
140
|
})}
|
|
138
141
|
@mouseenter=${this.handleMouseEnter}
|
|
139
142
|
@mouseleave=${this.handleMouseLeave}>
|
|
@@ -25,6 +25,15 @@
|
|
|
25
25
|
cursor: pointer;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
.option--singular:not(.option--selected) {
|
|
29
|
+
padding: var(--zn-spacing-x-small) var(--zn-spacing-2x-large) var(--zn-spacing-x-small) var(--zn-spacing-large);
|
|
30
|
+
|
|
31
|
+
zn-icon {
|
|
32
|
+
display: none;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
|
|
28
37
|
.option--hover:not(.option--current):not(.option--disabled) {
|
|
29
38
|
background-color: var(--zn-color-primary-100);
|
|
30
39
|
color: var(--zn-input-color);
|
|
@@ -14,7 +14,7 @@ interface PageNavigation {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
interface PageNavigationItem {
|
|
17
|
-
icon
|
|
17
|
+
icon?: string;
|
|
18
18
|
label: string;
|
|
19
19
|
uri: string;
|
|
20
20
|
}
|
|
@@ -86,7 +86,7 @@ export default class ZnPageNav extends ZnTabs {
|
|
|
86
86
|
${data.title ? html`<h4>${data.title}</h4>` : ''}
|
|
87
87
|
${data.items.map(item => html`
|
|
88
88
|
<div tab-uri="${item.uri}" class="navigation-item">
|
|
89
|
-
|
|
89
|
+
${item.icon ? html`<zn-icon src="${item.icon}" size="24"></zn-icon>` : ''}
|
|
90
90
|
${item.label}
|
|
91
91
|
</div>
|
|
92
92
|
`)}
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
width: var(--page-nav-width);
|
|
47
47
|
background-color: rgb(var(--zn-body));
|
|
48
48
|
overflow-y: auto;
|
|
49
|
-
padding: var(--zn-spacing-
|
|
49
|
+
padding: var(--zn-spacing-medium);
|
|
50
50
|
@include wc.scrollbars;
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
|
|
59
59
|
.navigation-group h4 {
|
|
60
60
|
margin: 0;
|
|
61
|
-
padding: var(--zn-spacing-
|
|
61
|
+
padding: var(--zn-spacing-medium) 0;
|
|
62
62
|
color: rgb(var(--zn-text-heading));
|
|
63
63
|
font-size: var(--zn-font-size-medium);
|
|
64
64
|
font-weight: var(--zn-font-weight-semibold);
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
margin-top: 10px;
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
@include wc.container-query(null,
|
|
84
|
+
@include wc.container-query(null, md) {
|
|
85
85
|
.breadcrumb {
|
|
86
86
|
display: flex;
|
|
87
87
|
flex-direction: row;
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
|
|
96
96
|
.breadcrumb-menu-toggle {
|
|
97
97
|
cursor: pointer;
|
|
98
|
-
margin-left: var(--zn-spacing-
|
|
98
|
+
margin-left: var(--zn-spacing-medium);
|
|
99
99
|
|
|
100
100
|
display: flex;
|
|
101
101
|
align-items: center;
|
|
@@ -27,20 +27,15 @@ export default class ZnPanel extends ZincElement {
|
|
|
27
27
|
private readonly hasSlotController = new HasSlotController(this, '[default]', 'actions', 'footer');
|
|
28
28
|
|
|
29
29
|
@property({attribute: 'basis-px', type: Number}) basis: number;
|
|
30
|
-
|
|
31
30
|
@property() caption: string;
|
|
32
|
-
|
|
33
31
|
@property() description: string;
|
|
34
|
-
|
|
35
32
|
@property({type: Boolean}) tabbed: boolean;
|
|
36
|
-
|
|
33
|
+
@property({type: Boolean}) cosmic: boolean;
|
|
37
34
|
@property({type: Boolean}) flush: boolean;
|
|
38
35
|
@property({attribute: 'flush-x', type: Boolean}) flushX: boolean;
|
|
39
36
|
@property({attribute: 'flush-y', type: Boolean}) flushY: boolean;
|
|
40
|
-
|
|
41
37
|
@property({type: Boolean}) transparent: boolean;
|
|
42
38
|
|
|
43
|
-
|
|
44
39
|
protected firstUpdated(_changedProperties: PropertyValues) {
|
|
45
40
|
super.firstUpdated(_changedProperties);
|
|
46
41
|
if (this.basis) {
|
|
@@ -59,13 +54,29 @@ export default class ZnPanel extends ZincElement {
|
|
|
59
54
|
}
|
|
60
55
|
}
|
|
61
56
|
|
|
57
|
+
connectedCallback() {
|
|
58
|
+
super.connectedCallback();
|
|
59
|
+
if (window.CSS.registerProperty) {
|
|
60
|
+
try {
|
|
61
|
+
window.CSS.registerProperty({
|
|
62
|
+
inherits: false,
|
|
63
|
+
initialValue: '0deg',
|
|
64
|
+
name: '--rotate',
|
|
65
|
+
syntax: '<angle>',
|
|
66
|
+
});
|
|
67
|
+
} catch (e) {
|
|
68
|
+
// do nothing
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
62
73
|
protected render(): unknown {
|
|
63
74
|
const hasActionSlot = this.hasSlotController.test('actions');
|
|
64
75
|
const hasFooterSlot = this.hasSlotController.test('footer');
|
|
65
76
|
const hasHeader = this.caption || hasActionSlot;
|
|
66
77
|
|
|
67
78
|
return html`
|
|
68
|
-
<div part="base" class
|
|
79
|
+
<div part="base" class="${classMap({
|
|
69
80
|
panel: true,
|
|
70
81
|
'panel--flush': this.flush || this.tabbed,
|
|
71
82
|
'panel--flush-x': this.flushX,
|
|
@@ -75,7 +86,8 @@ export default class ZnPanel extends ZincElement {
|
|
|
75
86
|
'panel--has-actions': hasActionSlot,
|
|
76
87
|
'panel--has-footer': hasFooterSlot,
|
|
77
88
|
'panel--has-header': hasHeader,
|
|
78
|
-
|
|
89
|
+
'panel--cosmic': this.cosmic
|
|
90
|
+
})}">
|
|
79
91
|
|
|
80
92
|
<div class="panel__inner">
|
|
81
93
|
${hasHeader ? html`
|
|
@@ -94,7 +106,6 @@ export default class ZnPanel extends ZincElement {
|
|
|
94
106
|
${hasFooterSlot ? html`
|
|
95
107
|
<slot name="footer" class="panel__footer"></slot>` : null}
|
|
96
108
|
</div>
|
|
97
|
-
|
|
98
109
|
</div>`;
|
|
99
110
|
}
|
|
100
111
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
flex-basis: var(--zn-panel-basis);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
+
|
|
15
16
|
.panel {
|
|
16
17
|
position: relative;
|
|
17
18
|
border: 1px solid rgb(var(--zn-border-color));
|
|
@@ -125,5 +126,8 @@
|
|
|
125
126
|
padding-right: 0;
|
|
126
127
|
}
|
|
127
128
|
}
|
|
128
|
-
}
|
|
129
129
|
|
|
130
|
+
&--cosmic {
|
|
131
|
+
@include wc.cosmic-border();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -1,10 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
arrow,
|
|
3
|
+
autoUpdate,
|
|
4
|
+
computePosition,
|
|
5
|
+
flip,
|
|
6
|
+
offset,
|
|
7
|
+
platform,
|
|
8
|
+
shift,
|
|
9
|
+
size
|
|
10
|
+
} from '@floating-ui/dom';
|
|
2
11
|
import {classMap} from 'lit/directives/class-map.js';
|
|
3
12
|
import {html, unsafeCSS} from 'lit';
|
|
4
13
|
import {offsetParent} from 'composed-offset-position';
|
|
5
14
|
import {property, query} from 'lit/decorators.js';
|
|
6
15
|
import ZincElement from '../../internal/zinc-element';
|
|
7
16
|
import type {CSSResultGroup} from 'lit';
|
|
17
|
+
import type {
|
|
18
|
+
MiddlewareData
|
|
19
|
+
} from '@floating-ui/dom';
|
|
8
20
|
|
|
9
21
|
import styles from './popup.scss';
|
|
10
22
|
|
|
@@ -385,7 +397,7 @@ export default class ZnPopup extends ZincElement {
|
|
|
385
397
|
getOffsetParent
|
|
386
398
|
}
|
|
387
399
|
}).then(({x, y, middlewareData, placement}:
|
|
388
|
-
{ x: number
|
|
400
|
+
{ x: number; y: number; middlewareData: MiddlewareData; placement: string }) => {
|
|
389
401
|
const staticSide = {top: 'bottom', right: 'left', bottom: 'top', left: 'right'}[placement.split('-')[0]]!;
|
|
390
402
|
|
|
391
403
|
this.setAttribute('data-current-placement', placement);
|
|
@@ -395,6 +407,8 @@ export default class ZnPopup extends ZincElement {
|
|
|
395
407
|
top: `${y}px`
|
|
396
408
|
});
|
|
397
409
|
|
|
410
|
+
if (!this.popup?.isConnected) return;
|
|
411
|
+
|
|
398
412
|
this.popup.showPopover();
|
|
399
413
|
|
|
400
414
|
if (this.arrow) {
|
|
@@ -30,7 +30,6 @@ export default class ZnProgressTile extends ZincElement {
|
|
|
30
30
|
@property({type: Number, attribute: 'wait-time', reflect: true}) waitTime: number;
|
|
31
31
|
@property({type: Number, attribute: 'max-time'}) maxTime: number;
|
|
32
32
|
@property({type: Number, attribute: 'end-time'}) endTime: number;
|
|
33
|
-
|
|
34
33
|
@property({type: Number, attribute: 'max-wait-time'}) maxWaitTime: number = 60 * 5;
|
|
35
34
|
@property({type: Boolean, attribute: 'waiting-agent-response'}) waitingAgentResponse: boolean;
|
|
36
35
|
|
|
@@ -38,7 +37,7 @@ export default class ZnProgressTile extends ZincElement {
|
|
|
38
37
|
@property() avatar: string;
|
|
39
38
|
@property() caption: string;
|
|
40
39
|
|
|
41
|
-
private _timerInterval:
|
|
40
|
+
private _timerInterval: number;
|
|
42
41
|
|
|
43
42
|
connectedCallback() {
|
|
44
43
|
super.connectedCallback();
|
|
@@ -49,7 +48,9 @@ export default class ZnProgressTile extends ZincElement {
|
|
|
49
48
|
|
|
50
49
|
disconnectedCallback() {
|
|
51
50
|
super.disconnectedCallback();
|
|
52
|
-
|
|
51
|
+
if (this._timerInterval) {
|
|
52
|
+
clearInterval(this._timerInterval);
|
|
53
|
+
}
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
private getHumanReadableTime(time: number): string {
|
|
@@ -58,6 +59,11 @@ export default class ZnProgressTile extends ZincElement {
|
|
|
58
59
|
const minutes = Math.floor((time % 3600) / 60);
|
|
59
60
|
const seconds = time % 60;
|
|
60
61
|
|
|
62
|
+
// if over 24 hours, cap it
|
|
63
|
+
if (hours >= 24) {
|
|
64
|
+
return '1 Day+';
|
|
65
|
+
}
|
|
66
|
+
|
|
61
67
|
if (hours) {
|
|
62
68
|
return `${hours.toString().padStart(2, '0')}:${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
|
|
63
69
|
}
|
|
@@ -96,7 +102,7 @@ export default class ZnProgressTile extends ZincElement {
|
|
|
96
102
|
'progress-tile--warn': this.waitTime > 60 && this.waitTime < (this.maxWaitTime / 2),
|
|
97
103
|
'progress-tile--danger': this.waitTime >= this.maxWaitTime
|
|
98
104
|
})}">
|
|
99
|
-
<zn-icon size="
|
|
105
|
+
<zn-icon size="36" src="${this.avatar}"></zn-icon>
|
|
100
106
|
<div class="progress-tile__content">
|
|
101
107
|
|
|
102
108
|
<div class="progress-tile__header">
|
|
@@ -9,15 +9,12 @@
|
|
|
9
9
|
width: 100%;
|
|
10
10
|
align-items: center;
|
|
11
11
|
flex-direction: row;
|
|
12
|
-
gap:
|
|
12
|
+
gap: 12px;
|
|
13
13
|
margin-bottom: 20px;
|
|
14
14
|
|
|
15
15
|
zn-icon {
|
|
16
16
|
display: flex;
|
|
17
17
|
flex-shrink: 0;
|
|
18
|
-
border-radius: 50%;
|
|
19
|
-
width: 36px;
|
|
20
|
-
height: 36px;
|
|
21
18
|
overflow: hidden;
|
|
22
19
|
}
|
|
23
20
|
|
|
@@ -42,6 +39,7 @@
|
|
|
42
39
|
p {
|
|
43
40
|
font-size: 14px;
|
|
44
41
|
font-weight: 400;
|
|
42
|
+
margin: 0;
|
|
45
43
|
color: rgb(var(--zn-text));
|
|
46
44
|
}
|
|
47
45
|
}
|
|
@@ -53,11 +51,16 @@
|
|
|
53
51
|
font-size: 12px;
|
|
54
52
|
font-weight: 400;
|
|
55
53
|
color: rgb(var(--zn-primary));
|
|
54
|
+
|
|
55
|
+
p {
|
|
56
|
+
margin: 0;
|
|
57
|
+
}
|
|
56
58
|
}
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
&__progress-bars {
|
|
60
62
|
flex-grow: 1;
|
|
63
|
+
background: rgba(0, 0, 0, 0.02);
|
|
61
64
|
|
|
62
65
|
&__first, &__second {
|
|
63
66
|
height: 4px;
|
|
@@ -181,7 +181,7 @@ export default class ZnQueryBuilder extends ZincElement implements ZincFormContr
|
|
|
181
181
|
size="medium"
|
|
182
182
|
placeholder="Select Filter"
|
|
183
183
|
@zn-change="${this._addRule}">
|
|
184
|
-
${this.filters.map(item => html`
|
|
184
|
+
${this.filters && this.filters.map(item => html`
|
|
185
185
|
<zn-option value="${item.id}">
|
|
186
186
|
${item.name.charAt(0).toUpperCase() + item.name.slice(1)}
|
|
187
187
|
</zn-option>`)}
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
justify-content: center;
|
|
57
57
|
width: var(--toggle-size);
|
|
58
58
|
height: var(--toggle-size);
|
|
59
|
-
box-shadow: var(--zn-shadow-
|
|
59
|
+
box-shadow: var(--zn-shadow-x-small);
|
|
60
60
|
border: solid var(--zn-input-border-width) var(--zn-input-border-color);
|
|
61
61
|
border-radius: 50%;
|
|
62
62
|
background-color: var(--zn-input-background-color);
|