@kubex/zinc 1.1.99 → 1.1.101
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 +2095 -2095
- package/dist/vscode.html-custom-data.json +50 -50
- package/dist/web-types.json +165 -165
- package/dist/zn.min.css +1 -1
- package/dist/zn.min.js +21 -21
- package/package.json +1 -1
- package/scss/_root.scss +16 -0
- package/scss/mixins/_typography-mixins.scss +1 -0
- package/scss/shared/_button.scss +4 -2
- package/scss/themes/_typography.scss +2 -0
- package/src/components/button/button.scss +14 -4
- package/src/components/header/header.scss +2 -0
- package/src/components/menu-item/menu-item.scss +8 -5
- package/src/components/page/page.scss +30 -4
- package/src/components/tile/tile.scss +0 -2
- package/src/components/toggle/toggle.scss +8 -1
- package/src/components/tooltip/tooltip.scss +4 -1
package/package.json
CHANGED
package/scss/_root.scss
CHANGED
|
@@ -78,6 +78,22 @@
|
|
|
78
78
|
:root {
|
|
79
79
|
--zn-primary: var(--zn-color-primary);
|
|
80
80
|
|
|
81
|
+
// Ink colours — text and icons painted ON TOP of a filled colour surface
|
|
82
|
+
// (solid buttons, active menu items, badges). Every theme so far uses a
|
|
83
|
+
// colour dark enough for white ink, so white is the default; a theme with a
|
|
84
|
+
// light or high-luminance accent (neon lime, amber, mint) must override the
|
|
85
|
+
// matching token or its filled controls become unreadable.
|
|
86
|
+
//
|
|
87
|
+
// Declared as RGB triplets so they compose with rgba() the same way the rest
|
|
88
|
+
// of the palette does. Components that consume them are inside shadow roots
|
|
89
|
+
// that do not load this file, so they always pass a `255, 255, 255` fallback.
|
|
90
|
+
--zn-color-on-primary: 255, 255, 255;
|
|
91
|
+
--zn-color-on-info: 255, 255, 255;
|
|
92
|
+
--zn-color-on-success: 255, 255, 255;
|
|
93
|
+
--zn-color-on-warning: 255, 255, 255;
|
|
94
|
+
--zn-color-on-error: 255, 255, 255;
|
|
95
|
+
--zn-color-on-accent: 255, 255, 255;
|
|
96
|
+
|
|
81
97
|
// Brand Colors
|
|
82
98
|
--zn-red: 237, 84, 109;
|
|
83
99
|
--zn-blue: 100, 117, 242;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
line-height: var(--zn-text-#{$role}-line-height);
|
|
16
16
|
color: var(--zn-text-#{$role}-color);
|
|
17
17
|
text-transform: var(--zn-text-#{$role}-transform);
|
|
18
|
+
letter-spacing: var(--zn-text-#{$role}-letter-spacing, normal);
|
|
18
19
|
|
|
19
20
|
@if $spacing {
|
|
20
21
|
margin-block-end: var(--zn-text-#{$role}-spacing);
|
package/scss/shared/_button.scss
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
@use '../variables';
|
|
3
3
|
|
|
4
4
|
@mixin button {
|
|
5
|
-
|
|
5
|
+
// Buttons take their own radius token so a theme can make controls pills
|
|
6
|
+
// without reshaping panels, inputs and dialogs at the same time.
|
|
7
|
+
border-radius: var(--zn-button-border-radius, var(--zn-border-radius));
|
|
6
8
|
display: inline-flex;
|
|
7
9
|
align-items: center;
|
|
8
10
|
justify-content: center;
|
|
@@ -10,7 +12,7 @@
|
|
|
10
12
|
margin: auto;
|
|
11
13
|
width: fit-content;
|
|
12
14
|
background-color: rgb(var(--zn-primary));
|
|
13
|
-
color: rgba(255, 255, 255, 0.9);
|
|
15
|
+
color: rgba(var(--zn-color-on-primary, 255, 255, 255), 0.9);
|
|
14
16
|
font-size: var(--zn-text-button-label-font-size);
|
|
15
17
|
font-weight: var(--zn-text-button-label-font-weight);
|
|
16
18
|
line-height: var(--zn-text-button-label-line-height);
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
* --zn-text-<role>-font-weight
|
|
13
13
|
* --zn-text-<role>-color
|
|
14
14
|
* --zn-text-<role>-transform
|
|
15
|
+
* --zn-text-<role>-letter-spacing
|
|
15
16
|
*
|
|
16
17
|
* All roles use the sans family (--zn-font-sans). Apply a role
|
|
17
18
|
* in a component with the text-style() mixin from scss/mixins.
|
|
@@ -59,5 +60,6 @@ $text-styles: (
|
|
|
59
60
|
--zn-text-#{$role}-color: var(--zn-text-color);
|
|
60
61
|
}
|
|
61
62
|
--zn-text-#{$role}-transform: #{map.get($style, "transform")};
|
|
63
|
+
--zn-text-#{$role}-letter-spacing: var(--zn-letter-spacing-normal, normal);
|
|
62
64
|
}
|
|
63
65
|
}
|
|
@@ -17,7 +17,12 @@
|
|
|
17
17
|
.button {
|
|
18
18
|
@include shared.button;
|
|
19
19
|
|
|
20
|
+
// --btn-color paints the fill; --btn-ink is the text/icon colour that sits
|
|
21
|
+
// on top of it. They are declared as a pair so a theme with a light accent
|
|
22
|
+
// (e.g. neon lime) can re-point the ink via --zn-color-on-* without any
|
|
23
|
+
// component-level override.
|
|
20
24
|
--btn-color: var(--zn-primary);
|
|
25
|
+
--btn-ink: var(--zn-color-on-primary, 255, 255, 255);
|
|
21
26
|
--notification-color: rgb(var(--zn-color-error));
|
|
22
27
|
|
|
23
28
|
border-width: var(--zn-button-border-width, 1px);
|
|
@@ -31,18 +36,22 @@
|
|
|
31
36
|
|
|
32
37
|
&.button--info {
|
|
33
38
|
--btn-color: var(--zn-color-info);
|
|
39
|
+
--btn-ink: var(--zn-color-on-info, 255, 255, 255);
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
&.button--error {
|
|
37
43
|
--btn-color: var(--zn-color-error);
|
|
44
|
+
--btn-ink: var(--zn-color-on-error, 255, 255, 255);
|
|
38
45
|
}
|
|
39
46
|
|
|
40
47
|
&.button--warning {
|
|
41
48
|
--btn-color: var(--zn-color-warning);
|
|
49
|
+
--btn-ink: var(--zn-color-on-warning, 255, 255, 255);
|
|
42
50
|
}
|
|
43
51
|
|
|
44
52
|
&.button--success {
|
|
45
53
|
--btn-color: var(--zn-color-success);
|
|
54
|
+
--btn-ink: var(--zn-color-on-success, 255, 255, 255);
|
|
46
55
|
}
|
|
47
56
|
|
|
48
57
|
&__label--hidden {
|
|
@@ -131,7 +140,7 @@
|
|
|
131
140
|
|
|
132
141
|
background-color: rgba(var(--btn-color));
|
|
133
142
|
border-color: var(--zn-button-border-color, rgb(var(--btn-color)));
|
|
134
|
-
color: rgba(
|
|
143
|
+
color: rgba(var(--btn-ink), 0.9);
|
|
135
144
|
|
|
136
145
|
&:hover:not([disabled]) {
|
|
137
146
|
background-color: rgba(var(--btn-color), 0.8);
|
|
@@ -154,7 +163,7 @@
|
|
|
154
163
|
|
|
155
164
|
&:hover:not([disabled]), &:active:not([disabled]) {
|
|
156
165
|
background-color: rgb(var(--btn-color));
|
|
157
|
-
color:
|
|
166
|
+
color: rgb(var(--btn-ink));
|
|
158
167
|
}
|
|
159
168
|
|
|
160
169
|
&.button--secondary {
|
|
@@ -219,9 +228,10 @@
|
|
|
219
228
|
|
|
220
229
|
.button--star {
|
|
221
230
|
--btn-color: var(--zn-orange);
|
|
231
|
+
--btn-ink: var(--zn-color-on-warning, 255, 255, 255);
|
|
222
232
|
background-color: rgb(var(--btn-color));
|
|
223
233
|
border-color: var(--zn-button-border-color, rgb(var(--btn-color)));
|
|
224
|
-
color:
|
|
234
|
+
color: rgb(var(--btn-ink));
|
|
225
235
|
opacity: 1 !important;
|
|
226
236
|
|
|
227
237
|
&:hover:not([disabled]) {
|
|
@@ -239,7 +249,7 @@
|
|
|
239
249
|
|
|
240
250
|
&:hover:not([disabled]), &:active:not([disabled]) {
|
|
241
251
|
background-color: rgba(var(--btn-color));
|
|
242
|
-
color:
|
|
252
|
+
color: rgb(var(--btn-ink));
|
|
243
253
|
}
|
|
244
254
|
}
|
|
245
255
|
}
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
&__caption {
|
|
18
18
|
font-weight: var(--zn-text-h1-font-weight);
|
|
19
19
|
font-size: var(--zn-text-h1-font-size);
|
|
20
|
+
text-transform: var(--zn-text-h1-transform, none);
|
|
21
|
+
letter-spacing: var(--zn-text-h1-letter-spacing, normal);
|
|
20
22
|
color: rgba(var(--zn-text-panel-title), 100%);
|
|
21
23
|
line-height: var(--zn-icon-size, 20px);
|
|
22
24
|
margin: 0;
|
|
@@ -276,33 +276,36 @@ zn-popup::part(popup) {
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
|
|
279
|
+
// Colour variants fill the row on hover, so the label switches to the matching
|
|
280
|
+
// --zn-color-on-* ink rather than a hardcoded white (which disappears on a
|
|
281
|
+
// light accent such as velocity's neon lime).
|
|
279
282
|
.menu-item--primary {
|
|
280
283
|
--color: rgba(var(--zn-primary), 0.9);
|
|
281
|
-
--hover-color:
|
|
284
|
+
--hover-color: rgb(var(--zn-color-on-primary, 255, 255, 255));
|
|
282
285
|
--hover-bg: rgba(var(--zn-primary), 0.9);
|
|
283
286
|
}
|
|
284
287
|
|
|
285
288
|
.menu-item--error {
|
|
286
289
|
--color: rgb(var(--zn-color-error));
|
|
287
|
-
--hover-color:
|
|
290
|
+
--hover-color: rgb(var(--zn-color-on-error, 255, 255, 255));
|
|
288
291
|
--hover-bg: rgba(var(--zn-color-error), 0.9);
|
|
289
292
|
}
|
|
290
293
|
|
|
291
294
|
.menu-item--info {
|
|
292
295
|
--color: rgb(var(--zn-color-info));
|
|
293
|
-
--hover-color:
|
|
296
|
+
--hover-color: rgb(var(--zn-color-on-info, 255, 255, 255));
|
|
294
297
|
--hover-bg: rgba(var(--zn-color-info), 0.9);
|
|
295
298
|
}
|
|
296
299
|
|
|
297
300
|
.menu-item--warning {
|
|
298
301
|
--color: rgb(var(--zn-color-warning));
|
|
299
|
-
--hover-color:
|
|
302
|
+
--hover-color: rgb(var(--zn-color-on-warning, 255, 255, 255));
|
|
300
303
|
--hover-bg: rgba(var(--zn-color-warning), 0.9);
|
|
301
304
|
}
|
|
302
305
|
|
|
303
306
|
.menu-item--success {
|
|
304
307
|
--color: rgb(var(--zn-color-success));
|
|
305
|
-
--hover-color:
|
|
308
|
+
--hover-color: rgb(var(--zn-color-on-success, 255, 255, 255));
|
|
306
309
|
--hover-bg: rgba(var(--zn-color-success), 0.9);
|
|
307
310
|
}
|
|
308
311
|
|
|
@@ -8,8 +8,16 @@
|
|
|
8
8
|
height: 100%;
|
|
9
9
|
min-height: 0;
|
|
10
10
|
container-type: inline-size;
|
|
11
|
+
// Optional decorative layer tiled across the page canvas (header + content).
|
|
12
|
+
// A theme sets it to an image and its tile size; unset it costs nothing.
|
|
13
|
+
--zn-page-texture: none;
|
|
14
|
+
--zn-page-texture-size: auto;
|
|
11
15
|
--zn-page-content-background: var(--zn-body);
|
|
12
16
|
--zn-page-header-background: var(--zn-page-surface-background, var(--zn-page-background, var(--zn-body)));
|
|
17
|
+
// A modal shell overlays its own close button at --zn-base-gap from the page edge;
|
|
18
|
+
// these describe it so the header can keep clear of it.
|
|
19
|
+
--zn-page-closer-size: 36px;
|
|
20
|
+
--zn-page-closer-gap: var(--zn-spacing-x-small);
|
|
13
21
|
}
|
|
14
22
|
|
|
15
23
|
:host([panel]) {
|
|
@@ -30,7 +38,11 @@
|
|
|
30
38
|
top: 0;
|
|
31
39
|
z-index: 2;
|
|
32
40
|
box-sizing: border-box;
|
|
33
|
-
background: rgba(var(--zn-page-header-background), 95%);
|
|
41
|
+
background-color: rgba(var(--zn-page-header-background), 95%);
|
|
42
|
+
background-image: var(--zn-page-texture);
|
|
43
|
+
background-repeat: repeat;
|
|
44
|
+
background-position: center top;
|
|
45
|
+
background-size: var(--zn-page-texture-size);
|
|
34
46
|
|
|
35
47
|
&::after {
|
|
36
48
|
content: '';
|
|
@@ -143,6 +155,7 @@
|
|
|
143
155
|
justify-content: space-between;
|
|
144
156
|
gap: 2px;
|
|
145
157
|
max-width: 100%;
|
|
158
|
+
min-width: 0;
|
|
146
159
|
min-height: 36px;
|
|
147
160
|
|
|
148
161
|
a {
|
|
@@ -160,19 +173,21 @@
|
|
|
160
173
|
gap: var(--zn-spacing-x-small);
|
|
161
174
|
min-height: 36px;
|
|
162
175
|
flex-shrink: 1;
|
|
176
|
+
min-width: 0;
|
|
163
177
|
max-width: 100%;
|
|
164
178
|
}
|
|
165
179
|
|
|
166
180
|
&__right {
|
|
167
181
|
flex-grow: 1;
|
|
168
|
-
flex-shrink:
|
|
182
|
+
flex-shrink: 0;
|
|
169
183
|
overflow: hidden;
|
|
170
|
-
min-width: 20px;
|
|
171
184
|
}
|
|
172
185
|
|
|
173
186
|
&__caption {
|
|
174
187
|
font-weight: var(--zn-text-h1-font-weight);
|
|
175
188
|
font-size: var(--zn-text-h1-font-size);
|
|
189
|
+
text-transform: var(--zn-text-h1-transform, none);
|
|
190
|
+
letter-spacing: var(--zn-text-h1-letter-spacing, normal);
|
|
176
191
|
color: rgba(var(--zn-text-panel-title), 100%);
|
|
177
192
|
line-height: var(--zn-spacing-medium);
|
|
178
193
|
margin: 0;
|
|
@@ -188,6 +203,7 @@
|
|
|
188
203
|
&__description {
|
|
189
204
|
@include wc.text-style(subheading);
|
|
190
205
|
display: block;
|
|
206
|
+
overflow-wrap: anywhere;
|
|
191
207
|
}
|
|
192
208
|
|
|
193
209
|
.breadcrumb {
|
|
@@ -303,7 +319,11 @@
|
|
|
303
319
|
overflow: visible;
|
|
304
320
|
box-sizing: border-box;
|
|
305
321
|
padding: 0 var(--zn-base-gap) var(--zn-base-gap);
|
|
306
|
-
background: rgb(var(--zn-page-content-background, var(--zn-body)));
|
|
322
|
+
background-color: rgb(var(--zn-page-content-background, var(--zn-body)));
|
|
323
|
+
background-image: var(--zn-page-texture);
|
|
324
|
+
background-repeat: repeat;
|
|
325
|
+
background-position: center top;
|
|
326
|
+
background-size: var(--zn-page-texture-size);
|
|
307
327
|
}
|
|
308
328
|
|
|
309
329
|
.page__tabs .page__content {
|
|
@@ -353,6 +373,12 @@ zn-navbar {
|
|
|
353
373
|
padding-inline: calc(var(--zn-gutter, 0) + var(--zn-base-gap, 0));
|
|
354
374
|
}
|
|
355
375
|
|
|
376
|
+
// The gutter shrinks to 0 on narrow containers, which would run the header actions
|
|
377
|
+
// under the closer. Reserving the closer's own footprint holds the gap steady instead.
|
|
378
|
+
:host([modal]) .header {
|
|
379
|
+
padding-inline-end: calc(var(--zn-base-gap, 0) + var(--zn-page-closer-size) + var(--zn-page-closer-gap));
|
|
380
|
+
}
|
|
381
|
+
|
|
356
382
|
:host zn-navbar {
|
|
357
383
|
&::part(navbar) {
|
|
358
384
|
padding-inline: calc(var(--zn-gutter, 0) + var(--zn-base-gap, 0));
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
align-items: center;
|
|
11
11
|
justify-content: space-between;
|
|
12
12
|
min-height: 48px;
|
|
13
|
-
padding: var(--zn-base-gap);
|
|
14
13
|
column-gap: var(--zn-spacing-large);
|
|
15
14
|
|
|
16
15
|
font-size: var(--zn-text-table-content-font-size);
|
|
@@ -24,7 +23,6 @@
|
|
|
24
23
|
&--has-properties,
|
|
25
24
|
&--has-actions {
|
|
26
25
|
padding-inline: var(--zn-base-gap);
|
|
27
|
-
min-height: 85px;
|
|
28
26
|
}
|
|
29
27
|
|
|
30
28
|
&--has-description#{&}--has-caption {
|
|
@@ -31,7 +31,11 @@
|
|
|
31
31
|
border-radius: 12px;
|
|
32
32
|
align-items: center;
|
|
33
33
|
background-color: rgb(var(--zn-color-tab));
|
|
34
|
-
|
|
34
|
+
// The unchecked track needs an edge of its own. --zn-color-tab sits close to
|
|
35
|
+
// the surface behind it on dark themes, which left the switch reading as a
|
|
36
|
+
// free-floating knob with no discoverable control boundary. The checked state
|
|
37
|
+
// below repaints the border in the accent colour.
|
|
38
|
+
border: 0.92px solid rgb(var(--zn-border-color));
|
|
35
39
|
margin: var(--zn-toggle-margin);
|
|
36
40
|
transition: color .2s ease-in-out, background-color .4s ease-in-out, border-color .2s ease-in-out;
|
|
37
41
|
}
|
|
@@ -46,6 +50,9 @@
|
|
|
46
50
|
|
|
47
51
|
.switch__control {
|
|
48
52
|
left: calc(100% - 20.32px - 0.92px);
|
|
53
|
+
// The knob carries the on/off state, so it takes the on-primary ink: a
|
|
54
|
+
// white knob on a light accent (neon lime, amber) is invisible.
|
|
55
|
+
background: rgb(var(--zn-color-on-primary, 255, 255, 255));
|
|
49
56
|
}
|
|
50
57
|
}
|
|
51
58
|
|
|
@@ -35,7 +35,10 @@
|
|
|
35
35
|
background-color: var(--arrow-color);
|
|
36
36
|
text-align: start;
|
|
37
37
|
white-space: normal;
|
|
38
|
-
color
|
|
38
|
+
// The bubble is painted in --arrow-color, which resolves to --zn-color-text,
|
|
39
|
+
// so the ink has to be the surface colour rather than a fixed white — on any
|
|
40
|
+
// dark theme the text colour is light and white-on-light is unreadable.
|
|
41
|
+
color: rgb(var(--zn-color-base, 255, 255, 255));
|
|
39
42
|
padding: var(--zn-spacing-x-small) var(--zn-spacing-small);
|
|
40
43
|
pointer-events: none;
|
|
41
44
|
user-select: none;
|