@kubex/zinc 1.1.99 → 1.1.100
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 +16 -2
- 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,6 +8,10 @@
|
|
|
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)));
|
|
13
17
|
}
|
|
@@ -30,7 +34,11 @@
|
|
|
30
34
|
top: 0;
|
|
31
35
|
z-index: 2;
|
|
32
36
|
box-sizing: border-box;
|
|
33
|
-
background: rgba(var(--zn-page-header-background), 95%);
|
|
37
|
+
background-color: rgba(var(--zn-page-header-background), 95%);
|
|
38
|
+
background-image: var(--zn-page-texture);
|
|
39
|
+
background-repeat: repeat;
|
|
40
|
+
background-position: center top;
|
|
41
|
+
background-size: var(--zn-page-texture-size);
|
|
34
42
|
|
|
35
43
|
&::after {
|
|
36
44
|
content: '';
|
|
@@ -173,6 +181,8 @@
|
|
|
173
181
|
&__caption {
|
|
174
182
|
font-weight: var(--zn-text-h1-font-weight);
|
|
175
183
|
font-size: var(--zn-text-h1-font-size);
|
|
184
|
+
text-transform: var(--zn-text-h1-transform, none);
|
|
185
|
+
letter-spacing: var(--zn-text-h1-letter-spacing, normal);
|
|
176
186
|
color: rgba(var(--zn-text-panel-title), 100%);
|
|
177
187
|
line-height: var(--zn-spacing-medium);
|
|
178
188
|
margin: 0;
|
|
@@ -303,7 +313,11 @@
|
|
|
303
313
|
overflow: visible;
|
|
304
314
|
box-sizing: border-box;
|
|
305
315
|
padding: 0 var(--zn-base-gap) var(--zn-base-gap);
|
|
306
|
-
background: rgb(var(--zn-page-content-background, var(--zn-body)));
|
|
316
|
+
background-color: rgb(var(--zn-page-content-background, var(--zn-body)));
|
|
317
|
+
background-image: var(--zn-page-texture);
|
|
318
|
+
background-repeat: repeat;
|
|
319
|
+
background-position: center top;
|
|
320
|
+
background-size: var(--zn-page-texture-size);
|
|
307
321
|
}
|
|
308
322
|
|
|
309
323
|
.page__tabs .page__content {
|
|
@@ -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;
|