@knime/kds-styles 10.1.0 → 11.0.0
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/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ An app that cannot import `index.css` yet — e.g. it still needs the `@knime/st
|
|
|
60
60
|
|
|
61
61
|
Do so deliberately if the app is only partially migrated: legacy `--knime-*` properties are hard-coded light and ignore `light-dark()`, so those parts stay light, and `color-scheme` also switches browser chrome (scrollbars, form controls, canvas background).
|
|
62
62
|
|
|
63
|
-
For an explicit user override, call `
|
|
63
|
+
For an explicit user override, call `useKdsDarkModeController()` from `@knime/kds-components`. It writes `color-scheme` inline on `<html>`, winning over the rule above. It needs a DOM, so in a server-rendered app call it from client-only code and leave the `system` default to CSS.
|
|
64
64
|
|
|
65
65
|
### Design Tokens in JavaScript/TypeScript
|
|
66
66
|
|
package/dist/css/basics.css
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
/*
|
|
5
5
|
* Follow the device preference. The color tokens resolve via `light-dark()`,
|
|
6
6
|
* so this needs no JavaScript and applies on the first paint.
|
|
7
|
-
* `
|
|
8
|
-
* light/dark preference.
|
|
7
|
+
* `useKdsDarkModeController()` overrides it with an inline style for an
|
|
8
|
+
* explicit light/dark preference.
|
|
9
9
|
*/
|
|
10
10
|
color-scheme: light dark;
|
|
11
11
|
}
|
|
@@ -2972,6 +2972,12 @@ syntax: "<length>";
|
|
|
2972
2972
|
initial-value: 4px;
|
|
2973
2973
|
}
|
|
2974
2974
|
|
|
2975
|
+
@property --kds-dimension-component-height-0-5x {
|
|
2976
|
+
syntax: "<length>";
|
|
2977
|
+
inherits: false;
|
|
2978
|
+
initial-value: 8px;
|
|
2979
|
+
}
|
|
2980
|
+
|
|
2975
2981
|
@property --kds-dimension-component-height-0-75x {
|
|
2976
2982
|
syntax: "<length>";
|
|
2977
2983
|
inherits: false;
|
|
@@ -3080,6 +3086,12 @@ syntax: "<length>";
|
|
|
3080
3086
|
initial-value: 4px;
|
|
3081
3087
|
}
|
|
3082
3088
|
|
|
3089
|
+
@property --kds-dimension-component-width-0-5x {
|
|
3090
|
+
syntax: "<length>";
|
|
3091
|
+
inherits: false;
|
|
3092
|
+
initial-value: 8px;
|
|
3093
|
+
}
|
|
3094
|
+
|
|
3083
3095
|
@property --kds-dimension-component-width-0-75x {
|
|
3084
3096
|
syntax: "<length>";
|
|
3085
3097
|
inherits: false;
|
|
@@ -498,6 +498,7 @@
|
|
|
498
498
|
--kds-spacing-sub-text-spacing-top: 4px;
|
|
499
499
|
--kds-dimension-component-height-0-125x: 2px;
|
|
500
500
|
--kds-dimension-component-height-0-25x: 4px;
|
|
501
|
+
--kds-dimension-component-height-0-5x: 8px;
|
|
501
502
|
--kds-dimension-component-height-0-75x: 12px;
|
|
502
503
|
--kds-dimension-component-height-0-88x: 14px;
|
|
503
504
|
--kds-dimension-component-height-1x: 16px;
|
|
@@ -516,6 +517,7 @@
|
|
|
516
517
|
--kds-dimension-component-height-45x: 720px;
|
|
517
518
|
--kds-dimension-component-width-0-125x: 2px;
|
|
518
519
|
--kds-dimension-component-width-0-25x: 4px;
|
|
520
|
+
--kds-dimension-component-width-0-5x: 8px;
|
|
519
521
|
--kds-dimension-component-width-0-75x: 12px;
|
|
520
522
|
--kds-dimension-component-width-0-88x: 14px;
|
|
521
523
|
--kds-dimension-component-width-1x: 16px;
|
|
@@ -14,6 +14,10 @@ export type KdsDimensionTokens = {
|
|
|
14
14
|
* Extra small component height (4px). Use for thin dividers and minimal height elements.
|
|
15
15
|
*/
|
|
16
16
|
readonly "0.25x": KdsDimension;
|
|
17
|
+
/**
|
|
18
|
+
* Extra small component height (8px). Use for tiny elements.
|
|
19
|
+
*/
|
|
20
|
+
readonly "0.5x": KdsDimension;
|
|
17
21
|
/**
|
|
18
22
|
* Small component height (12px). Use for compact inline elements and badges.
|
|
19
23
|
*/
|
|
@@ -88,6 +92,10 @@ export type KdsDimensionTokens = {
|
|
|
88
92
|
* Extra small component width (4px). Use for thin dividers and minimal width elements.
|
|
89
93
|
*/
|
|
90
94
|
readonly "0.25x": KdsDimension;
|
|
95
|
+
/**
|
|
96
|
+
* Extra small component width (8px). Use for tiny elements like the xsmall KdsToggleSwitch knob.
|
|
97
|
+
*/
|
|
98
|
+
readonly "0.5x": KdsDimension;
|
|
91
99
|
/**
|
|
92
100
|
* Small component width (12px). Use for compact inline elements.
|
|
93
101
|
*/
|
|
@@ -21,6 +21,14 @@ export const dimension = {
|
|
|
21
21
|
variable: "var(--kds-dimension-component-height-0-25x)",
|
|
22
22
|
},
|
|
23
23
|
},
|
|
24
|
+
"0.5x": {
|
|
25
|
+
value: 8,
|
|
26
|
+
unit: "px",
|
|
27
|
+
css: {
|
|
28
|
+
value: "8px",
|
|
29
|
+
variable: "var(--kds-dimension-component-height-0-5x)",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
24
32
|
"0.75x": {
|
|
25
33
|
value: 12,
|
|
26
34
|
unit: "px",
|
|
@@ -167,6 +175,14 @@ export const dimension = {
|
|
|
167
175
|
variable: "var(--kds-dimension-component-width-0-25x)",
|
|
168
176
|
},
|
|
169
177
|
},
|
|
178
|
+
"0.5x": {
|
|
179
|
+
value: 8,
|
|
180
|
+
unit: "px",
|
|
181
|
+
css: {
|
|
182
|
+
value: "8px",
|
|
183
|
+
variable: "var(--kds-dimension-component-width-0-5x)",
|
|
184
|
+
},
|
|
185
|
+
},
|
|
170
186
|
"0.75x": {
|
|
171
187
|
value: 12,
|
|
172
188
|
unit: "px",
|