@kubex/zinc 1.1.84 → 1.1.85
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 +77 -76
- package/dist/vscode.html-custom-data.json +11 -11
- package/dist/web-types.json +23 -23
- package/dist/zn.d.ts +3 -0
- package/dist/zn.min.js +105 -104
- package/package.json +1 -1
- package/src/components/flow-builder/flow-builder.scss +6 -0
- package/src/components/theme-editor/theme-editor.component.ts +21 -17
- package/src/components/theme-editor/theme-editor.scss +17 -34
package/package.json
CHANGED
|
@@ -141,6 +141,12 @@
|
|
|
141
141
|
// rather than the navbar's default body colour.
|
|
142
142
|
--zn-active-nav-background: var(--zn-panel);
|
|
143
143
|
|
|
144
|
+
// Themes with a glass page tab bar (e.g. Aura) frost inactive tabs on every
|
|
145
|
+
// navbar under a zn-page — over the panel the translucent white just reads
|
|
146
|
+
// as white. Pin the standard tab tint instead.
|
|
147
|
+
--navbar-page-inactive-tab-background: rgb(var(--zn-color-tab));
|
|
148
|
+
--navbar-page-inactive-tab-filter: none;
|
|
149
|
+
|
|
144
150
|
border-right: 1px solid rgb(var(--zn-border-color));
|
|
145
151
|
|
|
146
152
|
// The registry-driven steps panel fills the column below the title block.
|
|
@@ -5,6 +5,7 @@ import { MutationController } from '@lit-labs/observers/mutation-controller.js';
|
|
|
5
5
|
import { property, query, queryAll, state } from 'lit/decorators.js';
|
|
6
6
|
import ZincElement from '../../internal/zinc-element';
|
|
7
7
|
import ZnButton from '../button';
|
|
8
|
+
import ZnButtonGroup from '../button-group';
|
|
8
9
|
import ZnCollapsible from '../collapsible';
|
|
9
10
|
import ZnIcon from '../icon';
|
|
10
11
|
import ZnNavbar from '../navbar';
|
|
@@ -84,6 +85,7 @@ interface DerivedStructure {
|
|
|
84
85
|
* @dependency zn-preview-frame
|
|
85
86
|
* @dependency zn-icon
|
|
86
87
|
* @dependency zn-button
|
|
88
|
+
* @dependency zn-button-group
|
|
87
89
|
* @dependency zn-tabs
|
|
88
90
|
* @dependency zn-navbar
|
|
89
91
|
* @dependency zn-select
|
|
@@ -135,6 +137,7 @@ export default class ZnThemeEditor extends ZincElement {
|
|
|
135
137
|
'zn-preview-frame': ZnPreviewFrame,
|
|
136
138
|
'zn-icon': ZnIcon,
|
|
137
139
|
'zn-button': ZnButton,
|
|
140
|
+
'zn-button-group': ZnButtonGroup,
|
|
138
141
|
'zn-tabs': ZnTabs,
|
|
139
142
|
'zn-navbar': ZnNavbar,
|
|
140
143
|
'zn-select': ZnSelect,
|
|
@@ -822,13 +825,14 @@ export default class ZnThemeEditor extends ZincElement {
|
|
|
822
825
|
<div class="editor__controls-inner">
|
|
823
826
|
<div part="controls-header" class="editor__controls-header">
|
|
824
827
|
${this.controlsCaption ? html`<span class="editor__caption">${this.controlsCaption}</span>` : nothing}
|
|
825
|
-
<button
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
828
|
+
<zn-button class="editor__mode"
|
|
829
|
+
icon-button="small"
|
|
830
|
+
icon-size="20"
|
|
831
|
+
icon="${this.mode === 'dark' ? 'sun@lu' : 'moon@lu'}"
|
|
832
|
+
data-mode-toggle
|
|
833
|
+
tooltip="${this.mode === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'}"
|
|
834
|
+
aria-label="${this.mode === 'dark' ? 'Switch to light mode' : 'Switch to dark mode'}"
|
|
835
|
+
@click="${this._toggleMode}"></zn-button>
|
|
832
836
|
</div>
|
|
833
837
|
<div class="editor__controls-body">
|
|
834
838
|
<div
|
|
@@ -870,17 +874,17 @@ export default class ZnThemeEditor extends ZincElement {
|
|
|
870
874
|
<div part="toolbar" class="editor__toolbar">
|
|
871
875
|
${this.previewCaption ? html`<span class="editor__caption">${this.previewCaption}</span>` : nothing}
|
|
872
876
|
<div class="editor__toolbar-actions">
|
|
873
|
-
<
|
|
877
|
+
<zn-button-group class="editor__devices" aria-label="Preview width">
|
|
874
878
|
${DEVICES.map(d => html`
|
|
875
|
-
<button
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
</
|
|
879
|
+
<zn-button class="editor__device"
|
|
880
|
+
icon-button="small"
|
|
881
|
+
icon-size="20"
|
|
882
|
+
icon="${d.icon}@lu"
|
|
883
|
+
data-device="${d.id}"
|
|
884
|
+
aria-label="${d.label}"
|
|
885
|
+
aria-pressed="${this.device === d.id ? 'true' : 'false'}"
|
|
886
|
+
@click="${() => this._setDevice(d.id)}"></zn-button>`)}
|
|
887
|
+
</zn-button-group>
|
|
884
888
|
${this._sourcesSafe().length > 0 ? html`
|
|
885
889
|
<zn-select
|
|
886
890
|
class="editor__sources"
|
|
@@ -70,6 +70,12 @@
|
|
|
70
70
|
// rather than the navbar's default body colour (flow-builder pattern).
|
|
71
71
|
--zn-active-nav-background: var(--zn-panel);
|
|
72
72
|
|
|
73
|
+
// Themes with a glass page tab bar (e.g. Aura) frost inactive tabs on every
|
|
74
|
+
// navbar under a zn-page — over the editor's opaque panel the translucent
|
|
75
|
+
// white just reads as white. Pin the standard tab tint instead.
|
|
76
|
+
--navbar-page-inactive-tab-background: rgb(var(--zn-color-tab));
|
|
77
|
+
--navbar-page-inactive-tab-filter: none;
|
|
78
|
+
|
|
73
79
|
position: relative;
|
|
74
80
|
display: flex;
|
|
75
81
|
flex-direction: column;
|
|
@@ -235,44 +241,21 @@
|
|
|
235
241
|
}
|
|
236
242
|
}
|
|
237
243
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
border: 1px solid rgb(var(--zn-border-color));
|
|
241
|
-
border-radius: 4px;
|
|
242
|
-
overflow: hidden;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.editor__device,
|
|
246
|
-
.editor__mode {
|
|
247
|
-
display: flex;
|
|
248
|
-
align-items: center;
|
|
249
|
-
justify-content: center;
|
|
250
|
-
width: 30px;
|
|
251
|
-
height: 28px;
|
|
252
|
-
padding: 0;
|
|
253
|
-
border: 0;
|
|
254
|
-
background: transparent;
|
|
255
|
-
color: rgb(var(--zn-text));
|
|
256
|
-
cursor: pointer;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
.editor__device + .editor__device {
|
|
260
|
-
border-left: 1px solid rgb(var(--zn-border-color));
|
|
261
|
-
}
|
|
262
|
-
|
|
263
|
-
.editor__device:hover,
|
|
264
|
-
.editor__mode:hover {
|
|
265
|
-
background: rgba(var(--zn-border-color), 0.5);
|
|
266
|
-
}
|
|
267
|
-
|
|
244
|
+
// The device switcher is zn-button[icon-button="small"]s joined into a
|
|
245
|
+
// segmented control by zn-button-group; only the active fill is styled here.
|
|
268
246
|
.editor__device[aria-pressed="true"] {
|
|
269
|
-
|
|
270
|
-
|
|
247
|
+
// The button's shadow border-color is !important, so it can only be
|
|
248
|
+
// overridden through its own custom property.
|
|
249
|
+
--zn-button-border-color: rgb(var(--zn-primary));
|
|
250
|
+
|
|
251
|
+
// !important so the fill also beats the button's shadow hover background.
|
|
252
|
+
&::part(base) {
|
|
253
|
+
background: rgb(var(--zn-primary)) !important;
|
|
254
|
+
color: white !important;
|
|
255
|
+
}
|
|
271
256
|
}
|
|
272
257
|
|
|
273
258
|
.editor__mode {
|
|
274
|
-
border: 1px solid rgb(var(--zn-border-color));
|
|
275
|
-
border-radius: 4px;
|
|
276
259
|
// Sole occupant of .editor__controls-header's right side, beside the caption.
|
|
277
260
|
margin-left: auto;
|
|
278
261
|
}
|