@whitekiwi/tokens 0.1.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/LICENSE +21 -0
- package/README.md +38 -0
- package/package.json +31 -0
- package/src/theme.css +199 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 WhiteKiwi
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# @whitekiwi/tokens
|
|
2
|
+
|
|
3
|
+
PIP's light/dark semantic design tokens: color, spacing, type, radius, motion,
|
|
4
|
+
breakpoints, and interaction state contracts.
|
|
5
|
+
|
|
6
|
+
## Use
|
|
7
|
+
|
|
8
|
+
After the first public release:
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
npm install @whitekiwi/tokens
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Import the CSS once at your application's global entry point:
|
|
15
|
+
|
|
16
|
+
```css
|
|
17
|
+
@import "@whitekiwi/tokens/theme.css";
|
|
18
|
+
|
|
19
|
+
.example {
|
|
20
|
+
color: var(--kiwi-color-text);
|
|
21
|
+
background: var(--kiwi-color-canvas);
|
|
22
|
+
padding: var(--kiwi-space-4);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Set `data-theme="dark"` on the document root to opt into the dark theme. Components
|
|
27
|
+
should consume semantic roles rather than primitive palette values.
|
|
28
|
+
|
|
29
|
+
This is a CSS-only package. Its public export is `@whitekiwi/tokens/theme.css`;
|
|
30
|
+
there is no JavaScript default export and no Tailwind runtime dependency.
|
|
31
|
+
|
|
32
|
+
[Documentation](https://design.whitekiwi.link/) ·
|
|
33
|
+
[Source and release guide](https://github.com/WhiteKiwi/kiwi-design-system)
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
|
|
37
|
+
[MIT](LICENSE), copyright WhiteKiwi. Third-party dependencies retain their own
|
|
38
|
+
licenses. This license does not imply that a public npm release has occurred.
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@whitekiwi/tokens",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"sideEffects": [
|
|
6
|
+
"**/*.css"
|
|
7
|
+
],
|
|
8
|
+
"exports": {
|
|
9
|
+
"./theme.css": "./src/theme.css"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"src/theme.css",
|
|
13
|
+
"README.md",
|
|
14
|
+
"LICENSE"
|
|
15
|
+
],
|
|
16
|
+
"description": "PIP semantic design tokens for WhiteKiwi interfaces",
|
|
17
|
+
"license": "MIT",
|
|
18
|
+
"homepage": "https://design.whitekiwi.link/",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/WhiteKiwi/kiwi-design-system.git",
|
|
22
|
+
"directory": "packages/tokens"
|
|
23
|
+
},
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/WhiteKiwi/kiwi-design-system/issues"
|
|
26
|
+
},
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public",
|
|
29
|
+
"registry": "https://registry.npmjs.org/"
|
|
30
|
+
}
|
|
31
|
+
}
|
package/src/theme.css
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: light;
|
|
3
|
+
|
|
4
|
+
/* Primitive palette */
|
|
5
|
+
--kiwi-paper: #f4f5ef;
|
|
6
|
+
--kiwi-milk: #fbfcf8;
|
|
7
|
+
--kiwi-ink: #11140f;
|
|
8
|
+
--kiwi-ash: #62685e;
|
|
9
|
+
--kiwi-carbon: #0e100e;
|
|
10
|
+
--kiwi-carbon-raised: #181a18;
|
|
11
|
+
--kiwi-fog: #a5ab9f;
|
|
12
|
+
--kiwi-chalk: #f1f4eb;
|
|
13
|
+
--kiwi-signal: #c6ff4a;
|
|
14
|
+
--kiwi-soft: #e9f8c9;
|
|
15
|
+
--kiwi-line: #668b15;
|
|
16
|
+
--kiwi-deep: #3c6000;
|
|
17
|
+
--kiwi-error: #b42318;
|
|
18
|
+
--kiwi-success: #16794f;
|
|
19
|
+
--kiwi-warning: #7a5300;
|
|
20
|
+
--kiwi-info: #1769aa;
|
|
21
|
+
|
|
22
|
+
/* Semantic color roles */
|
|
23
|
+
--kiwi-color-canvas: var(--kiwi-paper);
|
|
24
|
+
--kiwi-color-surface: var(--kiwi-milk);
|
|
25
|
+
--kiwi-color-surface-raised: #ffffff;
|
|
26
|
+
--kiwi-color-text: var(--kiwi-ink);
|
|
27
|
+
--kiwi-color-text-muted: var(--kiwi-ash);
|
|
28
|
+
--kiwi-color-border: color-mix(in srgb, var(--kiwi-ink) 12%, transparent);
|
|
29
|
+
--kiwi-color-control-border: var(--kiwi-ash);
|
|
30
|
+
--kiwi-color-border-soft: color-mix(in srgb, var(--kiwi-ink) 7%, transparent);
|
|
31
|
+
--kiwi-color-brand-field: var(--kiwi-signal);
|
|
32
|
+
--kiwi-color-brand-field-hover: #b7ef3f;
|
|
33
|
+
--kiwi-color-brand-field-active: #a8dd35;
|
|
34
|
+
--kiwi-color-brand-soft: var(--kiwi-soft);
|
|
35
|
+
--kiwi-color-on-brand: var(--kiwi-ink);
|
|
36
|
+
--kiwi-color-interactive: var(--kiwi-deep);
|
|
37
|
+
--kiwi-color-interactive-hover: #2f4d00;
|
|
38
|
+
--kiwi-color-interactive-active: #223900;
|
|
39
|
+
--kiwi-color-control-hover: #e2f2bf;
|
|
40
|
+
--kiwi-color-control-active: #d7eaaa;
|
|
41
|
+
--kiwi-color-focus: var(--kiwi-line);
|
|
42
|
+
--kiwi-color-disabled-surface: color-mix(
|
|
43
|
+
in srgb,
|
|
44
|
+
var(--kiwi-ink) 6%,
|
|
45
|
+
transparent
|
|
46
|
+
);
|
|
47
|
+
--kiwi-color-disabled-text: color-mix(
|
|
48
|
+
in srgb,
|
|
49
|
+
var(--kiwi-ink) 42%,
|
|
50
|
+
transparent
|
|
51
|
+
);
|
|
52
|
+
--kiwi-color-error: var(--kiwi-error);
|
|
53
|
+
--kiwi-color-error-hover: #9a1e16;
|
|
54
|
+
--kiwi-color-error-active: #811912;
|
|
55
|
+
--kiwi-color-error-soft: #fbe9e7;
|
|
56
|
+
--kiwi-color-success: var(--kiwi-success);
|
|
57
|
+
--kiwi-color-success-soft: #e5f5ed;
|
|
58
|
+
--kiwi-color-warning: var(--kiwi-warning);
|
|
59
|
+
--kiwi-color-warning-soft: #fff2cc;
|
|
60
|
+
--kiwi-color-info: var(--kiwi-info);
|
|
61
|
+
--kiwi-color-info-soft: #e8f2fb;
|
|
62
|
+
|
|
63
|
+
/* Layout and material */
|
|
64
|
+
--kiwi-space-1: 0.25rem;
|
|
65
|
+
--kiwi-space-2: 0.5rem;
|
|
66
|
+
--kiwi-space-3: 0.75rem;
|
|
67
|
+
--kiwi-space-4: 1rem;
|
|
68
|
+
--kiwi-space-6: 1.5rem;
|
|
69
|
+
--kiwi-space-8: 2rem;
|
|
70
|
+
--kiwi-space-12: 3rem;
|
|
71
|
+
--kiwi-space-16: 4rem;
|
|
72
|
+
--kiwi-gutter: clamp(1.2rem, 3vw, 3rem);
|
|
73
|
+
--kiwi-radius-none: 0;
|
|
74
|
+
--kiwi-radius-sm: 0.25rem;
|
|
75
|
+
--kiwi-radius-md: 0.5rem;
|
|
76
|
+
--kiwi-motion-fast: 150ms;
|
|
77
|
+
--kiwi-motion-base: 220ms;
|
|
78
|
+
--kiwi-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
|
|
79
|
+
--kiwi-font-sans: "Pretendard", "Apple SD Gothic Neo", system-ui, sans-serif;
|
|
80
|
+
--kiwi-font-mono: "SFMono-Regular", Consolas, monospace;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
:root[data-theme="dark"] {
|
|
84
|
+
color-scheme: dark;
|
|
85
|
+
--kiwi-color-canvas: var(--kiwi-carbon);
|
|
86
|
+
--kiwi-color-surface: var(--kiwi-carbon-raised);
|
|
87
|
+
--kiwi-color-surface-raised: #202320;
|
|
88
|
+
--kiwi-color-text: var(--kiwi-chalk);
|
|
89
|
+
--kiwi-color-text-muted: var(--kiwi-fog);
|
|
90
|
+
--kiwi-color-control-border: var(--kiwi-fog);
|
|
91
|
+
--kiwi-color-border: color-mix(in srgb, var(--kiwi-chalk) 14%, transparent);
|
|
92
|
+
--kiwi-color-border-soft: color-mix(
|
|
93
|
+
in srgb,
|
|
94
|
+
var(--kiwi-chalk) 8%,
|
|
95
|
+
transparent
|
|
96
|
+
);
|
|
97
|
+
--kiwi-color-brand-field-hover: #d2ff72;
|
|
98
|
+
--kiwi-color-brand-field-active: #b7ef3f;
|
|
99
|
+
--kiwi-color-brand-soft: color-mix(
|
|
100
|
+
in srgb,
|
|
101
|
+
var(--kiwi-signal) 12%,
|
|
102
|
+
var(--kiwi-carbon)
|
|
103
|
+
);
|
|
104
|
+
--kiwi-color-interactive: var(--kiwi-signal);
|
|
105
|
+
--kiwi-color-interactive-hover: #d8ff84;
|
|
106
|
+
--kiwi-color-interactive-active: #b7ef3f;
|
|
107
|
+
--kiwi-color-control-hover: #29321e;
|
|
108
|
+
--kiwi-color-control-active: #344325;
|
|
109
|
+
--kiwi-color-disabled-surface: color-mix(
|
|
110
|
+
in srgb,
|
|
111
|
+
var(--kiwi-chalk) 8%,
|
|
112
|
+
transparent
|
|
113
|
+
);
|
|
114
|
+
--kiwi-color-disabled-text: color-mix(
|
|
115
|
+
in srgb,
|
|
116
|
+
var(--kiwi-chalk) 42%,
|
|
117
|
+
transparent
|
|
118
|
+
);
|
|
119
|
+
--kiwi-color-error: #ff8585;
|
|
120
|
+
--kiwi-color-error-hover: #ff9a9a;
|
|
121
|
+
--kiwi-color-error-active: #e56f6f;
|
|
122
|
+
--kiwi-color-error-soft: #321817;
|
|
123
|
+
--kiwi-color-success: #62d49a;
|
|
124
|
+
--kiwi-color-success-soft: #10281f;
|
|
125
|
+
--kiwi-color-warning: #f2c14e;
|
|
126
|
+
--kiwi-color-warning-soft: #2d2410;
|
|
127
|
+
--kiwi-color-info: #73b7ff;
|
|
128
|
+
--kiwi-color-info-soft: #10243a;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
@media (prefers-color-scheme: dark) {
|
|
132
|
+
:root:not([data-theme]) {
|
|
133
|
+
color-scheme: dark;
|
|
134
|
+
--kiwi-color-canvas: var(--kiwi-carbon);
|
|
135
|
+
--kiwi-color-surface: var(--kiwi-carbon-raised);
|
|
136
|
+
--kiwi-color-surface-raised: #202320;
|
|
137
|
+
--kiwi-color-text: var(--kiwi-chalk);
|
|
138
|
+
--kiwi-color-text-muted: var(--kiwi-fog);
|
|
139
|
+
--kiwi-color-control-border: var(--kiwi-fog);
|
|
140
|
+
--kiwi-color-border: color-mix(in srgb, var(--kiwi-chalk) 14%, transparent);
|
|
141
|
+
--kiwi-color-border-soft: color-mix(
|
|
142
|
+
in srgb,
|
|
143
|
+
var(--kiwi-chalk) 8%,
|
|
144
|
+
transparent
|
|
145
|
+
);
|
|
146
|
+
--kiwi-color-brand-field-hover: #d2ff72;
|
|
147
|
+
--kiwi-color-brand-field-active: #b7ef3f;
|
|
148
|
+
--kiwi-color-brand-soft: color-mix(
|
|
149
|
+
in srgb,
|
|
150
|
+
var(--kiwi-signal) 12%,
|
|
151
|
+
var(--kiwi-carbon)
|
|
152
|
+
);
|
|
153
|
+
--kiwi-color-interactive: var(--kiwi-signal);
|
|
154
|
+
--kiwi-color-interactive-hover: #d8ff84;
|
|
155
|
+
--kiwi-color-interactive-active: #b7ef3f;
|
|
156
|
+
--kiwi-color-control-hover: #29321e;
|
|
157
|
+
--kiwi-color-control-active: #344325;
|
|
158
|
+
--kiwi-color-disabled-surface: color-mix(
|
|
159
|
+
in srgb,
|
|
160
|
+
var(--kiwi-chalk) 8%,
|
|
161
|
+
transparent
|
|
162
|
+
);
|
|
163
|
+
--kiwi-color-disabled-text: color-mix(
|
|
164
|
+
in srgb,
|
|
165
|
+
var(--kiwi-chalk) 42%,
|
|
166
|
+
transparent
|
|
167
|
+
);
|
|
168
|
+
--kiwi-color-error: #ff8585;
|
|
169
|
+
--kiwi-color-error-hover: #ff9a9a;
|
|
170
|
+
--kiwi-color-error-active: #e56f6f;
|
|
171
|
+
--kiwi-color-error-soft: #321817;
|
|
172
|
+
--kiwi-color-success: #62d49a;
|
|
173
|
+
--kiwi-color-success-soft: #10281f;
|
|
174
|
+
--kiwi-color-warning: #f2c14e;
|
|
175
|
+
--kiwi-color-warning-soft: #2d2410;
|
|
176
|
+
--kiwi-color-info: #73b7ff;
|
|
177
|
+
--kiwi-color-info-soft: #10243a;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@theme inline {
|
|
182
|
+
--color-canvas: var(--kiwi-color-canvas);
|
|
183
|
+
--color-surface: var(--kiwi-color-surface);
|
|
184
|
+
--color-surface-raised: var(--kiwi-color-surface-raised);
|
|
185
|
+
--color-foreground: var(--kiwi-color-text);
|
|
186
|
+
--color-muted: var(--kiwi-color-text-muted);
|
|
187
|
+
--color-line: var(--kiwi-color-border);
|
|
188
|
+
--color-brand: var(--kiwi-color-brand-field);
|
|
189
|
+
--color-brand-soft: var(--kiwi-color-brand-soft);
|
|
190
|
+
--color-interactive: var(--kiwi-color-interactive);
|
|
191
|
+
--font-sans: var(--kiwi-font-sans);
|
|
192
|
+
--font-mono: var(--kiwi-font-mono);
|
|
193
|
+
--radius-sm: var(--kiwi-radius-sm);
|
|
194
|
+
--radius-md: var(--kiwi-radius-md);
|
|
195
|
+
--breakpoint-sm: 40rem;
|
|
196
|
+
--breakpoint-md: 48rem;
|
|
197
|
+
--breakpoint-lg: 64rem;
|
|
198
|
+
--breakpoint-xl: 80rem;
|
|
199
|
+
}
|