@whatsaaaa/design-system 0.4.0 → 0.6.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/README.md +18 -18
- package/assets/manifest.json +12 -0
- package/assets/whatsaaaa/ghost-on-dark.svg +1 -0
- package/assets/whatsaaaa/ghost-on-light.svg +1 -0
- package/dist/css/base.css +14 -0
- package/dist/css/code.css +18 -0
- package/dist/css/ghost.css +27 -0
- package/dist/css/icons.css +1 -0
- package/dist/css/pairs.css +57 -0
- package/dist/css/segmented.css +71 -0
- package/dist/ghost/bubble.d.ts +2 -2
- package/dist/ghost/bubble.js +18 -10
- package/dist/ghost/index.d.ts +8 -2
- package/dist/ghost/index.js +50 -10
- package/dist/ghost/svg.d.ts +4 -0
- package/dist/ghost/svg.js +9 -0
- package/dist/index.css +211 -0
- package/dist/shiki/index.d.ts +19 -0
- package/dist/shiki/index.js +25 -0
- package/dist/tailwind/theme.css +206 -0
- package/dist/tailwind/variants.css +43 -0
- package/dist/tailwind.css +42 -0
- package/dist/tokens.css +42 -0
- package/dist/tokens.d.ts +7 -0
- package/dist/tokens.js +14 -0
- package/docs/usage.md +171 -32
- package/package.json +11 -1
- package/src/vitepress/styles/vars.css +2 -2
- package/tokens/contrast.json +18 -0
- package/tokens/core.tokens.json +53 -0
- package/tokens/theme-dark.tokens.json +16 -0
- package/tokens/theme-light.tokens.json +16 -0
package/dist/tokens.css
CHANGED
|
@@ -120,8 +120,12 @@
|
|
|
120
120
|
--ws-radius-xl: 12px;
|
|
121
121
|
/* Key caps. */
|
|
122
122
|
--ws-radius-xs: 3px;
|
|
123
|
+
/* A checkbox or a radio button. */
|
|
124
|
+
--ws-size-check: 1.25rem;
|
|
123
125
|
/* Widest a column of long-form text gets, padding included. */
|
|
124
126
|
--ws-size-content: 50rem;
|
|
127
|
+
/* Height of a one-line field, a button and a segmented control. */
|
|
128
|
+
--ws-size-control: 2.5rem;
|
|
125
129
|
/* Widest a page frame gets. */
|
|
126
130
|
--ws-size-frame: 90rem;
|
|
127
131
|
/* Page outline. */
|
|
@@ -130,6 +134,8 @@
|
|
|
130
134
|
--ws-size-sidebar: 17rem;
|
|
131
135
|
/* Height of the status line. */
|
|
132
136
|
--ws-size-status-line: 2rem;
|
|
137
|
+
/* The number of a step in its circle. */
|
|
138
|
+
--ws-size-step: 1.5rem;
|
|
133
139
|
/* Height of the tab bar. */
|
|
134
140
|
--ws-size-tab-bar: 3rem;
|
|
135
141
|
--ws-space-2: 0.125rem;
|
|
@@ -346,6 +352,30 @@
|
|
|
346
352
|
--ws-text-overline-letter-spacing: 0.06875rem;
|
|
347
353
|
/* Group headings and table heads. Set in uppercase. */
|
|
348
354
|
--ws-text-overline-line-height: 1.5;
|
|
355
|
+
/* The line under the display name on a home page. */
|
|
356
|
+
--ws-text-tagline: var(--ws-text-tagline-font-weight) var(--ws-text-tagline-font-size)/var(--ws-text-tagline-line-height) var(--ws-text-tagline-font-family);
|
|
357
|
+
/* The tagline on phones. */
|
|
358
|
+
--ws-text-tagline-compact: var(--ws-text-tagline-compact-font-weight) var(--ws-text-tagline-compact-font-size)/var(--ws-text-tagline-compact-line-height) var(--ws-text-tagline-compact-font-family);
|
|
359
|
+
/* The tagline on phones. */
|
|
360
|
+
--ws-text-tagline-compact-font-family: var(--ws-font-family-sans);
|
|
361
|
+
/* The tagline on phones. */
|
|
362
|
+
--ws-text-tagline-compact-font-size: 1.125rem;
|
|
363
|
+
/* The tagline on phones. */
|
|
364
|
+
--ws-text-tagline-compact-font-weight: 500;
|
|
365
|
+
/* The tagline on phones. */
|
|
366
|
+
--ws-text-tagline-compact-letter-spacing: 0rem;
|
|
367
|
+
/* The tagline on phones. */
|
|
368
|
+
--ws-text-tagline-compact-line-height: 1.5;
|
|
369
|
+
/* The line under the display name on a home page. */
|
|
370
|
+
--ws-text-tagline-font-family: var(--ws-font-family-sans);
|
|
371
|
+
/* The line under the display name on a home page. */
|
|
372
|
+
--ws-text-tagline-font-size: 1.25rem;
|
|
373
|
+
/* The line under the display name on a home page. */
|
|
374
|
+
--ws-text-tagline-font-weight: 500;
|
|
375
|
+
/* The line under the display name on a home page. */
|
|
376
|
+
--ws-text-tagline-letter-spacing: 0rem;
|
|
377
|
+
/* The line under the display name on a home page. */
|
|
378
|
+
--ws-text-tagline-line-height: 1.5;
|
|
349
379
|
}
|
|
350
380
|
|
|
351
381
|
:root,
|
|
@@ -372,6 +402,10 @@
|
|
|
372
402
|
--ws-color-field-border: var(--ws-palette-main-muted);
|
|
373
403
|
/* Links, the focus ring, checked controls and the primary button fill. */
|
|
374
404
|
--ws-color-interactive: var(--ws-palette-main-foam);
|
|
405
|
+
/* The interactive fill while it is pressed: 0.1 further from the page in OKLab lightness. */
|
|
406
|
+
--ws-color-interactive-active: #bcf0f9;
|
|
407
|
+
/* The interactive fill under the pointer, such as a hovered primary button: the interactive color 0.05 further from the page in OKLab lightness. */
|
|
408
|
+
--ws-color-interactive-hover: #acdfe8;
|
|
375
409
|
/* Status note: bar and icon. */
|
|
376
410
|
--ws-color-note: var(--ws-palette-main-iris);
|
|
377
411
|
/* Status note: label text. */
|
|
@@ -435,6 +469,10 @@
|
|
|
435
469
|
--ws-color-field-border: var(--ws-palette-dawn-subtle);
|
|
436
470
|
/* Links, the focus ring, checked controls and the primary button fill. */
|
|
437
471
|
--ws-color-interactive: var(--ws-palette-dawn-pine);
|
|
472
|
+
/* The interactive fill while it is pressed: 0.1 further from the page in OKLab lightness. */
|
|
473
|
+
--ws-color-interactive-active: #004d65;
|
|
474
|
+
/* The interactive fill under the pointer, such as a hovered primary button: the interactive color 0.05 further from the page in OKLab lightness. */
|
|
475
|
+
--ws-color-interactive-hover: #165b74;
|
|
438
476
|
/* Status note: bar and icon. */
|
|
439
477
|
--ws-color-note: var(--ws-palette-dawn-iris);
|
|
440
478
|
/* Status note: label text. */
|
|
@@ -498,6 +536,10 @@
|
|
|
498
536
|
--ws-color-field-border: var(--ws-palette-dawn-subtle);
|
|
499
537
|
/* Links, the focus ring, checked controls and the primary button fill. */
|
|
500
538
|
--ws-color-interactive: var(--ws-palette-dawn-pine);
|
|
539
|
+
/* The interactive fill while it is pressed: 0.1 further from the page in OKLab lightness. */
|
|
540
|
+
--ws-color-interactive-active: #004d65;
|
|
541
|
+
/* The interactive fill under the pointer, such as a hovered primary button: the interactive color 0.05 further from the page in OKLab lightness. */
|
|
542
|
+
--ws-color-interactive-hover: #165b74;
|
|
501
543
|
/* Status note: bar and icon. */
|
|
502
544
|
--ws-color-note: var(--ws-palette-dawn-iris);
|
|
503
545
|
/* Status note: label text. */
|
package/dist/tokens.d.ts
CHANGED
|
@@ -51,6 +51,8 @@ export interface Tokens {
|
|
|
51
51
|
"color.danger-tint": Color;
|
|
52
52
|
"color.field-border": Color;
|
|
53
53
|
"color.interactive": Color;
|
|
54
|
+
"color.interactive-active": Color;
|
|
55
|
+
"color.interactive-hover": Color;
|
|
54
56
|
"color.note": Color;
|
|
55
57
|
"color.note-text": Color;
|
|
56
58
|
"color.note-tint": Color;
|
|
@@ -141,11 +143,14 @@ export interface Tokens {
|
|
|
141
143
|
"radius.sm": Dimension;
|
|
142
144
|
"radius.xl": Dimension;
|
|
143
145
|
"radius.xs": Dimension;
|
|
146
|
+
"size.check": Dimension;
|
|
144
147
|
"size.content": Dimension;
|
|
148
|
+
"size.control": Dimension;
|
|
145
149
|
"size.frame": Dimension;
|
|
146
150
|
"size.outline": Dimension;
|
|
147
151
|
"size.sidebar": Dimension;
|
|
148
152
|
"size.status-line": Dimension;
|
|
153
|
+
"size.step": Dimension;
|
|
149
154
|
"size.tab-bar": Dimension;
|
|
150
155
|
"space.2": Dimension;
|
|
151
156
|
"space.4": Dimension;
|
|
@@ -185,6 +190,8 @@ export interface Tokens {
|
|
|
185
190
|
"text.label-sm": Typography;
|
|
186
191
|
"text.lead": Typography;
|
|
187
192
|
"text.overline": Typography;
|
|
193
|
+
"text.tagline": Typography;
|
|
194
|
+
"text.tagline-compact": Typography;
|
|
188
195
|
}
|
|
189
196
|
|
|
190
197
|
/** Produce a token set from a given input. */
|
package/dist/tokens.js
CHANGED
|
@@ -25,6 +25,8 @@ export const PERMUTATIONS = {
|
|
|
25
25
|
"color.danger-tint":{"$type":"color","$description":"Status danger: block background.","$value":{"colorSpace":"srgb","components":[0.9216,0.4353,0.5725],"alpha":0.09,"hex":"#eb6f92"}},
|
|
26
26
|
"color.field-border":{"$type":"color","$description":"Input and button outlines. At least 3:1 on surface.","$value":{"colorSpace":"srgb","components":[0.4314,0.4157,0.5255],"hex":"#6e6a86","alpha":1}},
|
|
27
27
|
"color.interactive":{"$type":"color","$description":"Links, the focus ring, checked controls and the primary button fill.","$value":{"colorSpace":"srgb","components":[0.6118,0.8118,0.8471],"hex":"#9ccfd8","alpha":1}},
|
|
28
|
+
"color.interactive-active":{"$type":"color","$description":"The interactive fill while it is pressed: 0.1 further from the page in OKLab lightness.","$value":{"colorSpace":"srgb","components":[0.7373,0.9412,0.9765],"hex":"#bcf0f9","alpha":1}},
|
|
29
|
+
"color.interactive-hover":{"$type":"color","$description":"The interactive fill under the pointer, such as a hovered primary button: the interactive color 0.05 further from the page in OKLab lightness.","$value":{"colorSpace":"srgb","components":[0.6745,0.8745,0.9098],"hex":"#acdfe8","alpha":1}},
|
|
28
30
|
"color.note":{"$type":"color","$description":"Status note: bar and icon.","$value":{"colorSpace":"srgb","components":[0.7686,0.6549,0.9059],"hex":"#c4a7e7","alpha":1}},
|
|
29
31
|
"color.note-text":{"$type":"color","$description":"Status note: label text.","$value":{"colorSpace":"srgb","components":[0.7686,0.6549,0.9059],"hex":"#c4a7e7","alpha":1}},
|
|
30
32
|
"color.note-tint":{"$type":"color","$description":"Status note: block background.","$value":{"colorSpace":"srgb","components":[0.7686,0.6549,0.9059],"alpha":0.09,"hex":"#c4a7e7"}},
|
|
@@ -115,11 +117,14 @@ export const PERMUTATIONS = {
|
|
|
115
117
|
"radius.sm":{"$type":"dimension","$description":"Inline code, tags and the focus ring.","$value":{"value":4,"unit":"px"}},
|
|
116
118
|
"radius.xl":{"$type":"dimension","$description":"The terminal frame.","$value":{"value":12,"unit":"px"}},
|
|
117
119
|
"radius.xs":{"$type":"dimension","$description":"Key caps.","$value":{"value":3,"unit":"px"}},
|
|
120
|
+
"size.check":{"$type":"dimension","$description":"A checkbox or a radio button.","$value":{"value":1.25,"unit":"rem"}},
|
|
118
121
|
"size.content":{"$type":"dimension","$description":"Widest a column of long-form text gets, padding included.","$value":{"value":50,"unit":"rem"}},
|
|
122
|
+
"size.control":{"$type":"dimension","$description":"Height of a one-line field, a button and a segmented control.","$value":{"value":2.5,"unit":"rem"}},
|
|
119
123
|
"size.frame":{"$type":"dimension","$description":"Widest a page frame gets.","$value":{"value":90,"unit":"rem"}},
|
|
120
124
|
"size.outline":{"$type":"dimension","$description":"Page outline.","$value":{"value":15,"unit":"rem"}},
|
|
121
125
|
"size.sidebar":{"$type":"dimension","$description":"Side navigation.","$value":{"value":17,"unit":"rem"}},
|
|
122
126
|
"size.status-line":{"$type":"dimension","$description":"Height of the status line.","$value":{"value":2,"unit":"rem"}},
|
|
127
|
+
"size.step":{"$type":"dimension","$description":"The number of a step in its circle.","$value":{"value":1.5,"unit":"rem"}},
|
|
123
128
|
"size.tab-bar":{"$type":"dimension","$description":"Height of the tab bar.","$value":{"value":3,"unit":"rem"}},
|
|
124
129
|
"space.2":{"$type":"dimension","$value":{"value":0.125,"unit":"rem"}},
|
|
125
130
|
"space.4":{"$type":"dimension","$value":{"value":0.25,"unit":"rem"}},
|
|
@@ -159,6 +164,8 @@ export const PERMUTATIONS = {
|
|
|
159
164
|
"text.label-sm":{"$type":"typography","$description":"Side navigation and tags.","$value":{"fontFamily":["JetBrains Mono","ui-monospace","SFMono-Regular","Menlo","Consolas","monospace"],"fontSize":{"value":0.8125,"unit":"rem"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
160
165
|
"text.lead":{"$type":"typography","$description":"The first paragraph of a page.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.0625,"unit":"rem"},"fontWeight":400,"lineHeight":1.75,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
161
166
|
"text.overline":{"$type":"typography","$description":"Group headings and table heads. Set in uppercase.","$value":{"fontFamily":["JetBrains Mono","ui-monospace","SFMono-Regular","Menlo","Consolas","monospace"],"fontSize":{"value":0.6875,"unit":"rem"},"fontWeight":700,"lineHeight":1.5,"letterSpacing":{"value":0.06875,"unit":"rem"}}},
|
|
167
|
+
"text.tagline":{"$type":"typography","$description":"The line under the display name on a home page.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.25,"unit":"rem"},"fontWeight":500,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
168
|
+
"text.tagline-compact":{"$type":"typography","$description":"The tagline on phones.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.125,"unit":"rem"},"fontWeight":500,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
162
169
|
},
|
|
163
170
|
"{\"theme\":\"light\"}": {
|
|
164
171
|
"border-width.medium":{"$type":"dimension","$description":"Active markers and the focus ring.","$value":{"value":2,"unit":"px"}},
|
|
@@ -183,6 +190,8 @@ export const PERMUTATIONS = {
|
|
|
183
190
|
"color.danger-tint":{"$type":"color","$description":"Status danger: block background.","$value":{"colorSpace":"srgb","components":[0.7059,0.3882,0.4784],"alpha":0.09,"hex":"#b4637a"}},
|
|
184
191
|
"color.field-border":{"$type":"color","$description":"Input and button outlines. At least 3:1 on surface.","$value":{"colorSpace":"srgb","components":[0.4745,0.4588,0.5765],"hex":"#797593","alpha":1}},
|
|
185
192
|
"color.interactive":{"$type":"color","$description":"Links, the focus ring, checked controls and the primary button fill.","$value":{"colorSpace":"srgb","components":[0.1569,0.4118,0.5137],"hex":"#286983","alpha":1}},
|
|
193
|
+
"color.interactive-active":{"$type":"color","$description":"The interactive fill while it is pressed: 0.1 further from the page in OKLab lightness.","$value":{"colorSpace":"srgb","components":[0,0.302,0.3961],"hex":"#004d65","alpha":1}},
|
|
194
|
+
"color.interactive-hover":{"$type":"color","$description":"The interactive fill under the pointer, such as a hovered primary button: the interactive color 0.05 further from the page in OKLab lightness.","$value":{"colorSpace":"srgb","components":[0.0863,0.3569,0.4549],"hex":"#165b74","alpha":1}},
|
|
186
195
|
"color.note":{"$type":"color","$description":"Status note: bar and icon.","$value":{"colorSpace":"srgb","components":[0.5647,0.4784,0.6627],"hex":"#907aa9","alpha":1}},
|
|
187
196
|
"color.note-text":{"$type":"color","$description":"Status note: label text.","$value":{"colorSpace":"srgb","components":[0.3412,0.3216,0.4745],"hex":"#575279","alpha":1}},
|
|
188
197
|
"color.note-tint":{"$type":"color","$description":"Status note: block background.","$value":{"colorSpace":"srgb","components":[0.5647,0.4784,0.6627],"alpha":0.09,"hex":"#907aa9"}},
|
|
@@ -273,11 +282,14 @@ export const PERMUTATIONS = {
|
|
|
273
282
|
"radius.sm":{"$type":"dimension","$description":"Inline code, tags and the focus ring.","$value":{"value":4,"unit":"px"}},
|
|
274
283
|
"radius.xl":{"$type":"dimension","$description":"The terminal frame.","$value":{"value":12,"unit":"px"}},
|
|
275
284
|
"radius.xs":{"$type":"dimension","$description":"Key caps.","$value":{"value":3,"unit":"px"}},
|
|
285
|
+
"size.check":{"$type":"dimension","$description":"A checkbox or a radio button.","$value":{"value":1.25,"unit":"rem"}},
|
|
276
286
|
"size.content":{"$type":"dimension","$description":"Widest a column of long-form text gets, padding included.","$value":{"value":50,"unit":"rem"}},
|
|
287
|
+
"size.control":{"$type":"dimension","$description":"Height of a one-line field, a button and a segmented control.","$value":{"value":2.5,"unit":"rem"}},
|
|
277
288
|
"size.frame":{"$type":"dimension","$description":"Widest a page frame gets.","$value":{"value":90,"unit":"rem"}},
|
|
278
289
|
"size.outline":{"$type":"dimension","$description":"Page outline.","$value":{"value":15,"unit":"rem"}},
|
|
279
290
|
"size.sidebar":{"$type":"dimension","$description":"Side navigation.","$value":{"value":17,"unit":"rem"}},
|
|
280
291
|
"size.status-line":{"$type":"dimension","$description":"Height of the status line.","$value":{"value":2,"unit":"rem"}},
|
|
292
|
+
"size.step":{"$type":"dimension","$description":"The number of a step in its circle.","$value":{"value":1.5,"unit":"rem"}},
|
|
281
293
|
"size.tab-bar":{"$type":"dimension","$description":"Height of the tab bar.","$value":{"value":3,"unit":"rem"}},
|
|
282
294
|
"space.2":{"$type":"dimension","$value":{"value":0.125,"unit":"rem"}},
|
|
283
295
|
"space.4":{"$type":"dimension","$value":{"value":0.25,"unit":"rem"}},
|
|
@@ -317,6 +329,8 @@ export const PERMUTATIONS = {
|
|
|
317
329
|
"text.label-sm":{"$type":"typography","$description":"Side navigation and tags.","$value":{"fontFamily":["JetBrains Mono","ui-monospace","SFMono-Regular","Menlo","Consolas","monospace"],"fontSize":{"value":0.8125,"unit":"rem"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
318
330
|
"text.lead":{"$type":"typography","$description":"The first paragraph of a page.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.0625,"unit":"rem"},"fontWeight":400,"lineHeight":1.75,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
319
331
|
"text.overline":{"$type":"typography","$description":"Group headings and table heads. Set in uppercase.","$value":{"fontFamily":["JetBrains Mono","ui-monospace","SFMono-Regular","Menlo","Consolas","monospace"],"fontSize":{"value":0.6875,"unit":"rem"},"fontWeight":700,"lineHeight":1.5,"letterSpacing":{"value":0.06875,"unit":"rem"}}},
|
|
332
|
+
"text.tagline":{"$type":"typography","$description":"The line under the display name on a home page.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.25,"unit":"rem"},"fontWeight":500,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
333
|
+
"text.tagline-compact":{"$type":"typography","$description":"The tagline on phones.","$value":{"fontFamily":["Inter","system-ui","-apple-system","Segoe UI","sans-serif"],"fontSize":{"value":1.125,"unit":"rem"},"fontWeight":500,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"rem"}}},
|
|
320
334
|
},
|
|
321
335
|
};
|
|
322
336
|
const INPUT_DEFAULTS = {"theme":"dark"};
|
package/docs/usage.md
CHANGED
|
@@ -18,39 +18,107 @@ One import has everything: fonts, tokens, page defaults and every class.
|
|
|
18
18
|
|
|
19
19
|
Or take pieces. `tokens.css` and `fonts.css` first, then what you use:
|
|
20
20
|
|
|
21
|
-
| Import
|
|
22
|
-
|
|
|
23
|
-
| `@whatsaaaa/design-system/tokens.css`
|
|
24
|
-
| `@whatsaaaa/design-system/fonts.css`
|
|
25
|
-
| `@whatsaaaa/design-system/css/base.css`
|
|
26
|
-
| `@whatsaaaa/design-system/css/prose.css`
|
|
27
|
-
| `@whatsaaaa/design-system/css/code.css`
|
|
28
|
-
| `@whatsaaaa/design-system/css/callout.css`
|
|
29
|
-
| `@whatsaaaa/design-system/css/
|
|
30
|
-
| `@whatsaaaa/design-system/css/
|
|
31
|
-
| `@whatsaaaa/design-system/css/
|
|
32
|
-
| `@whatsaaaa/design-system/css/
|
|
21
|
+
| Import | What it has |
|
|
22
|
+
| -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
23
|
+
| `@whatsaaaa/design-system/tokens.css` | Every token as a CSS variable, for both themes |
|
|
24
|
+
| `@whatsaaaa/design-system/fonts.css` | JetBrains Mono and Inter, self-hosted, with Serbian Latin |
|
|
25
|
+
| `@whatsaaaa/design-system/css/base.css` | Page defaults. It resets margins and list markers |
|
|
26
|
+
| `@whatsaaaa/design-system/css/prose.css` | Long-form text, in a `.ws-prose` container |
|
|
27
|
+
| `@whatsaaaa/design-system/css/code.css` | `.ws-code`, a code block with a caption |
|
|
28
|
+
| `@whatsaaaa/design-system/css/callout.css` | `.ws-callout` |
|
|
29
|
+
| `@whatsaaaa/design-system/css/segmented.css` | `.ws-segmented`, buttons in a row with one pressed |
|
|
30
|
+
| `@whatsaaaa/design-system/css/pairs.css` | `.ws-pairs`, terms and their values, such as an order summary |
|
|
31
|
+
| `@whatsaaaa/design-system/css/terminal.css` | Tab bar, prompts, status line, key caps, tags. It brings `theme.css` along |
|
|
32
|
+
| `@whatsaaaa/design-system/css/theme.css` | `ws-theme-dark` and `ws-theme-light`, for an element of one theme only |
|
|
33
|
+
| `@whatsaaaa/design-system/css/ghost.css` | Styles of `<ws-ghost>` |
|
|
34
|
+
| `@whatsaaaa/design-system/css/icons.css` | The icons the callouts and prompts draw, and `--ws-icon-check`, the tick of a form. Needed with `callout.css` and `terminal.css`, and for the tick |
|
|
33
35
|
|
|
34
36
|
Everything is prefixed: classes with `ws-`, variables with `--ws-`.
|
|
35
37
|
|
|
38
|
+
### With Tailwind CSS
|
|
39
|
+
|
|
40
|
+
An app on Tailwind CSS v4, such as one on Nuxt UI, imports the Tailwind entry in place of both `tailwindcss` and `index.css`. It goes first in the app's stylesheet, before the app's other imports and its own rules:
|
|
41
|
+
|
|
42
|
+
```css
|
|
43
|
+
@import '@whatsaaaa/design-system/tailwind.css';
|
|
44
|
+
@import '@nuxt/ui'; /* a library on Tailwind, if the app has one */
|
|
45
|
+
@import '@whatsaaaa/design-system/tailwind/variants.css'; /* after a library with its own dark: and light: */
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Install `tailwindcss` 4.3.5 or a later 4.x next to the package. Only this entry needs it.
|
|
49
|
+
|
|
50
|
+
The entry gives Nuxt UI the system's fonts, weights, radii and spacing, but not its colors. Nuxt UI takes its colors from its own `--ui-*` variables, which fall back to its green and slate, and without `--ui-bg` it paints the body in its own background. Pointing them at the roles is the app's job, in its stylesheet outside any layer. A variable takes the role's value where it is set, so set it on `:root`, which follows the system, and on every element that chooses a theme, with `data-theme` or the `dark` or `light` class:
|
|
51
|
+
|
|
52
|
+
```css
|
|
53
|
+
:root,
|
|
54
|
+
[data-theme],
|
|
55
|
+
.dark,
|
|
56
|
+
.light {
|
|
57
|
+
--ui-primary: var(--ws-color-interactive);
|
|
58
|
+
--ui-bg: var(--ws-color-bg);
|
|
59
|
+
--ui-text: var(--ws-color-text);
|
|
60
|
+
--ui-border: var(--ws-color-border);
|
|
61
|
+
/* and the rest of Nuxt UI's colors, such as --ui-error and --ui-bg-elevated */
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The entry brings Tailwind and everything `index.css` brings, in cascade layers, so a utility wins over a class of the system and the app's rules outside any layer win over both:
|
|
66
|
+
|
|
67
|
+
| Layer | What it has, the later winning |
|
|
68
|
+
| ------------ | ----------------------------------------------------------------- |
|
|
69
|
+
| `theme` | Tailwind's theme variables, then the tokens |
|
|
70
|
+
| `base` | Tailwind's preflight, then the page defaults of `base.css` |
|
|
71
|
+
| `components` | The system's classes: `ws-prose`, the terminal frame and the rest |
|
|
72
|
+
| `utilities` | Tailwind's utilities |
|
|
73
|
+
|
|
74
|
+
The tokens are Tailwind's theme, and a utility reads its token where it is used, so it follows the theme as the token does:
|
|
75
|
+
|
|
76
|
+
| Utilities | Tokens |
|
|
77
|
+
| ---------------------------------------------------------- | ------------------------------------------------------------------------------- |
|
|
78
|
+
| `bg-surface`, `text-text-secondary`, `border-field-border` | The color roles. Tailwind's palette is taken out |
|
|
79
|
+
| `font-mono`, `font-sans` | The two families, and no others |
|
|
80
|
+
| `text-h1`, `text-body-sm` | The text styles, without their family: write `font-mono text-h1` |
|
|
81
|
+
| `leading-normal`, `font-semibold` | Line heights and weights |
|
|
82
|
+
| `p-4`, `gap-2.5` | Space, four pixels to a step: `p-4` is `--ws-space-16` |
|
|
83
|
+
| `h-tab-bar`, `max-w-content` | The sizes, by name, for any width, height or space |
|
|
84
|
+
| `rounded-md` | The radii, by name only, so no bare `rounded`. `rounded-full` is Tailwind's own |
|
|
85
|
+
| `border-thin` | The border widths. There are no shadow utilities |
|
|
86
|
+
| `ease-standard`, `transition` | The easings. A transition takes `--ws-motion-duration-fast` |
|
|
87
|
+
| `max-lg:` | The one breakpoint: below 64rem |
|
|
88
|
+
|
|
89
|
+
The entry takes out Tailwind's defaults that no token stands behind, as the system colors interface with its roles only and draws edges with borders, not shadows. As classes their utilities compile to nothing, with no error. In `@apply`, in the app's CSS or a component's `<style>` block, one fails the build with `Cannot apply unknown utility class`:
|
|
90
|
+
|
|
91
|
+
| Taken out | Utilities that compile to nothing | Use instead |
|
|
92
|
+
| -------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- |
|
|
93
|
+
| Tailwind's palette, white and black included | `bg-white`, `text-black`, `text-red-500`, `border-slate-200` | A role: `bg-surface`, `text-text` |
|
|
94
|
+
| Shadows | `shadow`, `shadow-lg`, `inset-shadow-sm`, `drop-shadow`, `text-shadow-md` | A border: `border-thin border-border` |
|
|
95
|
+
| The serif family | `font-serif` | `font-sans` or `font-mono` |
|
|
96
|
+
| The weights with no token | `font-thin`, `font-extralight`, `font-light`, `font-black` | `font-normal` to `font-extrabold` |
|
|
97
|
+
| The radii with no token | `rounded` and its sides and corners, such as `rounded-t` and `rounded-tl`, and `rounded-2xl` to `rounded-4xl` | `rounded-sm`, the same 4px, for `rounded`. `rounded-xs` to `rounded-xl`, `rounded-full` |
|
|
98
|
+
|
|
99
|
+
A library imported after the entry loses them too, by design: the overlays of Nuxt UI, for example, have no shadow on the entry.
|
|
100
|
+
|
|
101
|
+
`dark:` and `light:` follow the theme as the tokens do: the nearest `data-theme` or `dark` or `light` class around the element, then the system, by the rules of section 3, Theme. The roles already switch, so use them only for what the roles do not cover. A library that defines its own `dark:` or `light:` after the entry, as Nuxt UI does, replaces the system's: import them again after it, with `@import '@whatsaaaa/design-system/tailwind/variants.css';`.
|
|
102
|
+
|
|
36
103
|
## 2. Colors
|
|
37
104
|
|
|
38
105
|
Use the role tokens. Never write a hex value, and never use a `--ws-palette-*` color for interface: a role changes with the theme and carries the contrast rules, the palette does not.
|
|
39
106
|
|
|
40
|
-
| For
|
|
41
|
-
|
|
|
42
|
-
| Page background
|
|
43
|
-
| Panels and cards
|
|
44
|
-
| Inline code, hover, current item
|
|
45
|
-
| Dividers
|
|
46
|
-
| Outlines of inputs and buttons
|
|
47
|
-
| Text
|
|
48
|
-
| Secondary text
|
|
49
|
-
| Disabled text, idle marks
|
|
50
|
-
| Brand accent
|
|
51
|
-
| Links, focus ring, primary button
|
|
52
|
-
|
|
|
53
|
-
|
|
|
107
|
+
| For | Token |
|
|
108
|
+
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------- |
|
|
109
|
+
| Page background | `--ws-color-bg` |
|
|
110
|
+
| Panels and cards | `--ws-color-surface` |
|
|
111
|
+
| Inline code, hover, current item | `--ws-color-raised` |
|
|
112
|
+
| Dividers | `--ws-color-border` |
|
|
113
|
+
| Outlines of inputs and buttons | `--ws-color-field-border` |
|
|
114
|
+
| Text | `--ws-color-text` |
|
|
115
|
+
| Secondary text | `--ws-color-text-secondary` |
|
|
116
|
+
| Disabled text, idle marks | `--ws-color-text-faint` |
|
|
117
|
+
| Brand accent | `--ws-color-brand` |
|
|
118
|
+
| Links, focus ring, primary button | `--ws-color-interactive`, with `--ws-color-on-interactive` for text on it |
|
|
119
|
+
| Primary button, hovered or pressed | `--ws-color-interactive-hover`, `--ws-color-interactive-active` |
|
|
120
|
+
| Tags | `--ws-color-tag-text` on `--ws-color-tag-bg` |
|
|
121
|
+
| Status | `--ws-color-tip`, `-note`, `-warning`, `-danger`: each with `-text` for its label and `-tint` for its background |
|
|
54
122
|
|
|
55
123
|
Rules:
|
|
56
124
|
|
|
@@ -123,13 +191,14 @@ Use a text style, not a size. A style is two lines:
|
|
|
123
191
|
}
|
|
124
192
|
```
|
|
125
193
|
|
|
126
|
-
Styles: `display`, `h1`, `h2`, `h3`, `h4`, `lead`, `body`, `body-sm`, `label`, `label-sm`, `caption`, `overline` (set it in uppercase) and `code`. Below 64rem use `display-compact`, `h1-compact` and `
|
|
194
|
+
Styles: `display`, `h1`, `h2`, `h3`, `h4`, `tagline` (the line under the display name), `lead`, `body`, `body-sm`, `label`, `label-sm`, `caption`, `overline` (set it in uppercase) and `code`. Below 64rem use `display-compact`, `h1-compact`, `h2-compact` and `tagline-compact`.
|
|
127
195
|
|
|
128
196
|
Do not load other fonts, and do not load these from a CDN. Set `font-variant-ligatures: none` on anything that shows code.
|
|
129
197
|
|
|
130
198
|
## 5. Space, radius, motion
|
|
131
199
|
|
|
132
200
|
- Space: `--ws-space-2` to `--ws-space-64`, named by px, set in rem. Use them for padding, margin and gap.
|
|
201
|
+
- Sizes: `--ws-size-control` (40 px) is the height of a one-line field, a button and a segmented control. `--ws-size-check` (20 px) is a checkbox or a radio button and `--ws-size-step` (24 px) the circle of a step number. Use them for those, not a space token.
|
|
133
202
|
- Radius: `--ws-radius-xs` (key caps), `-sm` (inline code, tags), `-md` (inputs, buttons), `-lg` (blocks, cards), `-xl` (the window), `-full` (dots).
|
|
134
203
|
- Borders, not shadows: `--ws-border-width-thin`, `-medium`, `-thick`.
|
|
135
204
|
- Motion: `--ws-motion-duration-fast`, `-base`, `-slow` with `--ws-motion-easing-standard`. Wrap movement in `@media (prefers-reduced-motion: no-preference)`.
|
|
@@ -138,10 +207,11 @@ Do not load other fonts, and do not load these from a CDN. Set `font-variant-lig
|
|
|
138
207
|
## 6. Classes
|
|
139
208
|
|
|
140
209
|
- Long-form text: put rendered Markdown in `<article class="ws-prose">`. Wrap a table in `<div class="ws-table">` so it scrolls inside itself, and give a cell of running text `class="ws-table__text"` so a narrow frame scrolls instead of squeezing it. A first cell stays on one line unless it has that class. The docs theme does both.
|
|
141
|
-
- Code block with a caption: `<figure class="ws-code"><figcaption><span>file.ts</span><span>ts</span></figcaption><pre><code>...</code></pre></figure>`. For highlighting, use Shiki with `codeTheme` from `@whatsaaaa/design-system/shiki`.
|
|
210
|
+
- Code block with a caption: `<figure class="ws-code"><figcaption><span>file.ts</span><span>ts</span></figcaption><pre><code>...</code></pre></figure>`. For highlighting, use Shiki with `codeTheme` from `@whatsaaaa/design-system/shiki`. See [code blocks](#code-blocks).
|
|
142
211
|
- Callout: `<aside class="ws-callout ws-callout--warning"><p class="ws-callout__title">Warning</p><p>...</p></aside>`. Modifiers: `--tip`, `--warning`, `--danger`. None is a note.
|
|
143
212
|
- Terminal frame: `ws-term` (the window), `ws-tab-bar` with `ws-tab-bar__brand`, `ws-tabs` and `ws-tab-bar__end`, `ws-prompt` for headings, `ws-output`, `ws-status-line`. Mark the current tab with `aria-current="page"`.
|
|
144
213
|
- Small pieces: `ws-kbd`, `ws-tag`, `ws-tag--outline`, `ws-state` with `--active` or `--experimental`, `ws-arrow`, `ws-cursor`, and `ws-visually-hidden` for text that only assistive technology reads.
|
|
214
|
+
- Forms: `ws-segmented` and `ws-pairs`. See [forms](#forms).
|
|
145
215
|
|
|
146
216
|
The markup of each piece is in the comment at the top of its stylesheet, and in the style guide.
|
|
147
217
|
|
|
@@ -168,6 +238,71 @@ The markup of each piece is in the comment at the top of its stylesheet, and in
|
|
|
168
238
|
- An item for wide screens only takes `ws-status-line__item--wide`, and one with a border on its left `ws-status-line__item--edge`.
|
|
169
239
|
- A focus ring in the window's bars is drawn inside its control, so neither the bars nor the window's corners cut it off. A control of your own in a bar does the same: `outline-offset: calc(-1 * var(--ws-border-width-medium))`.
|
|
170
240
|
|
|
241
|
+
### Forms
|
|
242
|
+
|
|
243
|
+
The system draws no fields and no buttons: draw them from the roles, with these.
|
|
244
|
+
|
|
245
|
+
- **One height.** A one-line field, a button and a segmented control are `--ws-size-control` tall. A checkbox or a radio button is `--ws-size-check`, a step number's circle `--ws-size-step`.
|
|
246
|
+
- **The primary button** is filled with `--ws-color-interactive`, its label `--ws-color-on-interactive`. Under the pointer it takes `--ws-color-interactive-hover`, while pressed `--ws-color-interactive-active`. Do not mix a hover color of your own.
|
|
247
|
+
- **A tick** is `--ws-icon-check` from `css/icons.css`, a mask like the other icons: a ticked box, a done step, a sent form. Draw it at 1rem in `currentcolor`, or `--ws-color-on-interactive` on a checked box.
|
|
248
|
+
- **A number field has no spin buttons.** `base.css` hides the browser's own, and the arrow keys still step the value. Without `base.css`, hide them the same way: `appearance: textfield` on the field, and `appearance: none` on its `::-webkit-inner-spin-button` and `::-webkit-outer-spin-button`.
|
|
249
|
+
|
|
250
|
+
A **segmented control** is a few buttons with one pressed, such as a switch between the languages of a page:
|
|
251
|
+
|
|
252
|
+
```html
|
|
253
|
+
<div class="ws-segmented" role="group" aria-label="Language">
|
|
254
|
+
<button type="button" aria-pressed="true" lang="en">English</button>
|
|
255
|
+
<button type="button" aria-pressed="false" lang="sr">Srpski</button>
|
|
256
|
+
</div>
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
- Give the group a name with `aria-label`, and each button `aria-pressed`. Pressing a button presses it and releases the one that was pressed. Pressing the pressed one does nothing.
|
|
260
|
+
- Keys: each button is a stop of the Tab key, and Enter or Space presses it. No arrow keys: those belong to a radio group. A choice that is a value of a form, sent with it, is a group of radio buttons, not this.
|
|
261
|
+
- The pressed button is raised, in the text color, with an edge of the interactive color twice as thick, at least 3:1 on the page and on the raised fill. In forced colors it takes the system's selection colors. Do not fill it with the interactive color: next to a primary button it would be as loud.
|
|
262
|
+
|
|
263
|
+
**Terms and values**, a row each, are a `<dl class="ws-pairs">`: the answers of a form on its review step. The term is in the voice of a label, its value in the face of a field. The terms share a column as wide as the longest of them, at most two fifths of the row, so the values line up and have the rest of it. With `ws-pairs--amounts` the amounts take what the widest of them needs, and the terms the rest of the row. A long value wraps: give a long email or URL a `<wbr />` after its `@` or a `/`, so it breaks there. A value that still does not fit breaks anywhere, as a last resort.
|
|
264
|
+
|
|
265
|
+
```html
|
|
266
|
+
<dl class="ws-pairs ws-pairs--amounts">
|
|
267
|
+
<div>
|
|
268
|
+
<dt>2 × workshop ticket</dt>
|
|
269
|
+
<dd>€96.00</dd>
|
|
270
|
+
</div>
|
|
271
|
+
<div>
|
|
272
|
+
<dt>Lunch</dt>
|
|
273
|
+
<dd>€12.50</dd>
|
|
274
|
+
</div>
|
|
275
|
+
<div>
|
|
276
|
+
<dt>Booking fee</dt>
|
|
277
|
+
<dd>€1.00</dd>
|
|
278
|
+
</div>
|
|
279
|
+
<div class="ws-pairs__total">
|
|
280
|
+
<dt>Total</dt>
|
|
281
|
+
<dd>€109.50</dd>
|
|
282
|
+
</div>
|
|
283
|
+
</dl>
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
- `ws-pairs--amounts` is for money and other numbers: each value at the right edge, in figures of one width, so the digits of the rows line up. Write each amount whole, with its currency and the same number of decimals.
|
|
287
|
+
- `ws-pairs__total` is the last row: set off by a solid rule, and semibold.
|
|
288
|
+
|
|
289
|
+
### Code blocks
|
|
290
|
+
|
|
291
|
+
- **A block scrolls sideways.** One that shows what a person typed, which a phone would cut off, takes `ws-code--wrap` and wraps its lines instead.
|
|
292
|
+
- **Its lines hang.** When each line is a `<span class="line">` with `--ws-code-hang`, its indent in characters plus two, the rest of a wrapped line starts one level in from the line's own text. With Shiki, the `hangingIndent` transformer gives each line its own:
|
|
293
|
+
|
|
294
|
+
```ts
|
|
295
|
+
import { codeTheme, hangingIndent } from '@whatsaaaa/design-system/shiki'
|
|
296
|
+
|
|
297
|
+
const html = highlighter.codeToHtml(json, {
|
|
298
|
+
lang: 'json',
|
|
299
|
+
theme: codeTheme,
|
|
300
|
+
transformers: [hangingIndent()],
|
|
301
|
+
})
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
- **Shiki is large.** With one language and the JavaScript engine it is about 40 KB gzipped, enough to push a small app past a bundler's chunk warning. When code blocks are not on the first screen, load it when a block needs it, with a dynamic `import()` of `shiki/core`, its JavaScript engine and the languages you use, so it is a chunk of its own: show the code as plain text in `--ws-code-text` first, and the colors when they arrive. For one small language, such as the JSON a form sends, a tokenizer of your own that colors with the `--ws-syntax-*` tokens needs no Shiki at all.
|
|
305
|
+
|
|
171
306
|
## 7. Keys
|
|
172
307
|
|
|
173
308
|
A key hint in a status line has to work. Put `data-ws-key` on the control the key presses, give the status line the keys switch, and turn the shortcuts on:
|
|
@@ -209,14 +344,15 @@ The switch is not optional. The keys are single characters that act on the whole
|
|
|
209
344
|
## 8. The ghost
|
|
210
345
|
|
|
211
346
|
```ts
|
|
212
|
-
import { defineGhost, ghostMarkup, ghostSvg } from '@whatsaaaa/design-system/ghost'
|
|
347
|
+
import { defineGhost, ghostElement, ghostMarkup, ghostSvg } from '@whatsaaaa/design-system/ghost'
|
|
213
348
|
|
|
214
349
|
defineGhost() // registers <ws-ghost>, in the browser
|
|
215
350
|
```
|
|
216
351
|
|
|
217
|
-
- `<ws-ghost px="6"></ws-ghost>` is the ghost with the easter egg. Render `ghostMarkup({ px: 6 })` inside it on the server.
|
|
218
|
-
- `ghostSvg({ px: 2 })` is the ghost as a picture, for a link or a decoration.
|
|
219
|
-
- `
|
|
352
|
+
- `<ws-ghost px="6"></ws-ghost>` is the ghost with the easter egg. Render `ghostMarkup({ px: 6 })` inside it on the server. It fills itself in when it is empty, and draws its speech bubble, without setting `innerHTML`.
|
|
353
|
+
- `ghostSvg({ px: 2 })` is the ghost as a picture, for a link or a decoration. `ghostElement({ px: 2 })` is the same picture as an element, for a script that adds it with `append`.
|
|
354
|
+
- In a component, where markup would need `innerHTML`, `v-html` or `dangerouslySetInnerHTML`, take the files instead: `ghost-on-dark.svg` and `ghost-on-light.svg`, the ghost without the margin of its grid, 20 by 24. Put both in, with `ws-theme-dark` and `ws-theme-light`.
|
|
355
|
+
- `px` is the size of one sprite pixel. Use whole numbers. A large ghost, such as the one next to the display name, takes `compact-px="4"` too: its size below 64rem, from 1 to 5.
|
|
220
356
|
|
|
221
357
|
Do not recolor the ghost, do not draw on it, do not rotate or stretch it, and do not redraw it. Its tongue is always the brand color. On a project's site the ghost links to the handle's site, and the project's own sprite is the logo.
|
|
222
358
|
|
|
@@ -229,6 +365,7 @@ Generated files are in `assets/<name>/`, for `whatsaaaa` and for each project. `
|
|
|
229
365
|
| Favicon | `favicon.ico`, `favicon.svg`, `apple-touch-icon.png`. `icon-192.png` and `icon-512.png` for a manifest |
|
|
230
366
|
| Logo on any background | `mark.svg` |
|
|
231
367
|
| Logo in a header | `mark-on-dark.svg`, `mark-on-light.svg`, or `mark-mono.svg` to take the text color |
|
|
368
|
+
| The ghost in a link | `ghost-on-dark.svg`, `ghost-on-light.svg`, the handle's only |
|
|
232
369
|
| Name | `wordmark-dark.svg`, `wordmark-light.svg` |
|
|
233
370
|
| Logo with name | `lockup-dark.svg`, `lockup-light.svg` |
|
|
234
371
|
| Top of a README | `readme-header.svg` |
|
|
@@ -237,6 +374,8 @@ Generated files are in `assets/<name>/`, for `whatsaaaa` and for each project. `
|
|
|
237
374
|
|
|
238
375
|
Copy the files you need into the project. Show a mark at 16, 32, 48 or 64 px, where its pixels are sharp.
|
|
239
376
|
|
|
377
|
+
A mark's box is its whole 16 by 16 grid, with the empty pixels around the sprite. A project's sprite leaves two columns empty on each side, an eighth of the width, so at 32 px its pixels start 4 px inside the box. To put them on an edge, such as the edge the content of a page starts at, pull the image out by that much: `margin-inline: calc(-1 * var(--ws-space-4))` at 32 px. The ghost's files have no margin.
|
|
378
|
+
|
|
240
379
|
Never edit a file in `assets/`. To change artwork, change its source and run `pnpm assets` in this repository. For a project that has no kit yet, add a file like `identity/projects/form-builder.json` first.
|
|
241
380
|
|
|
242
381
|
## 10. Docs sites
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whatsaaaa/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Whatsaaaa's design system: brand identity, design tokens, typography, docs theme and asset kit",
|
|
5
5
|
"homepage": "https://github.com/whatsaaaa/design-system#readme",
|
|
6
6
|
"bugs": "https://github.com/whatsaaaa/design-system/issues",
|
|
@@ -27,6 +27,8 @@
|
|
|
27
27
|
"./index.css": "./dist/index.css",
|
|
28
28
|
"./tokens.css": "./dist/tokens.css",
|
|
29
29
|
"./fonts.css": "./dist/fonts.css",
|
|
30
|
+
"./tailwind.css": "./dist/tailwind.css",
|
|
31
|
+
"./tailwind/variants.css": "./dist/tailwind/variants.css",
|
|
30
32
|
"./css/*.css": "./dist/css/*.css",
|
|
31
33
|
"./fonts/*": "./dist/fonts/*",
|
|
32
34
|
"./tokens": {
|
|
@@ -78,6 +80,7 @@
|
|
|
78
80
|
"@playwright/test": "^1.65.0",
|
|
79
81
|
"@resvg/resvg-js": "^2.6.2",
|
|
80
82
|
"@rose-pine/palette": "^4.0.1",
|
|
83
|
+
"@tailwindcss/vite": "^4.3.5",
|
|
81
84
|
"@terrazzo/cli": "^2.10.0",
|
|
82
85
|
"@terrazzo/plugin-css": "^2.10.0",
|
|
83
86
|
"@terrazzo/plugin-js": "^2.10.0",
|
|
@@ -103,10 +106,13 @@
|
|
|
103
106
|
"png-to-ico": "^3.0.2",
|
|
104
107
|
"postcss-html": "^2.0.0",
|
|
105
108
|
"publint": "^0.3.25",
|
|
109
|
+
"shiki": "^2.5.0",
|
|
106
110
|
"stylelint": "^18.0.0",
|
|
107
111
|
"stylelint-config-standard": "^41.0.0",
|
|
108
112
|
"stylelint-value-no-unknown-custom-properties": "^6.1.1",
|
|
113
|
+
"tailwindcss": "^4.3.5",
|
|
109
114
|
"typescript": "~6.0.3",
|
|
115
|
+
"vite": "^8.3.8",
|
|
110
116
|
"vitepress": "^1.6.4",
|
|
111
117
|
"vitest": "^5.1.0",
|
|
112
118
|
"vue": "^3.5.45",
|
|
@@ -115,10 +121,14 @@
|
|
|
115
121
|
"yaml": "^2.9.1"
|
|
116
122
|
},
|
|
117
123
|
"peerDependencies": {
|
|
124
|
+
"tailwindcss": "^4.3.5",
|
|
118
125
|
"vitepress": "^1.6.4",
|
|
119
126
|
"vue": "^3.5.0"
|
|
120
127
|
},
|
|
121
128
|
"peerDependenciesMeta": {
|
|
129
|
+
"tailwindcss": {
|
|
130
|
+
"optional": true
|
|
131
|
+
},
|
|
122
132
|
"vitepress": {
|
|
123
133
|
"optional": true
|
|
124
134
|
},
|
|
@@ -118,10 +118,10 @@
|
|
|
118
118
|
--vp-button-brand-bg: var(--ws-color-interactive);
|
|
119
119
|
--vp-button-brand-hover-border: transparent;
|
|
120
120
|
--vp-button-brand-hover-text: var(--ws-color-on-interactive);
|
|
121
|
-
--vp-button-brand-hover-bg: var(--ws-color-interactive);
|
|
121
|
+
--vp-button-brand-hover-bg: var(--ws-color-interactive-hover);
|
|
122
122
|
--vp-button-brand-active-border: transparent;
|
|
123
123
|
--vp-button-brand-active-text: var(--ws-color-on-interactive);
|
|
124
|
-
--vp-button-brand-active-bg: var(--ws-color-interactive);
|
|
124
|
+
--vp-button-brand-active-bg: var(--ws-color-interactive-active);
|
|
125
125
|
--vp-button-alt-border: var(--ws-color-field-border);
|
|
126
126
|
--vp-button-alt-text: var(--ws-color-text);
|
|
127
127
|
--vp-button-alt-bg: transparent;
|
package/tokens/contrast.json
CHANGED
|
@@ -97,6 +97,24 @@
|
|
|
97
97
|
"min": 4.5,
|
|
98
98
|
"use": "The label of a primary button"
|
|
99
99
|
},
|
|
100
|
+
{
|
|
101
|
+
"foreground": "color.on-interactive",
|
|
102
|
+
"background": "color.interactive-hover",
|
|
103
|
+
"min": 4.5,
|
|
104
|
+
"use": "The label of a primary button under the pointer"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"foreground": "color.on-interactive",
|
|
108
|
+
"background": "color.interactive-active",
|
|
109
|
+
"min": 4.5,
|
|
110
|
+
"use": "The label of a primary button while it is pressed"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"foreground": "color.interactive",
|
|
114
|
+
"background": "color.raised",
|
|
115
|
+
"min": 3,
|
|
116
|
+
"use": "The edge of a pressed segment"
|
|
117
|
+
},
|
|
100
118
|
{ "foreground": "color.tag-text", "background": "color.tag-bg", "min": 4.5, "use": "Tags" },
|
|
101
119
|
{
|
|
102
120
|
"foreground": "color.tip",
|