@rowkit/tokens 0.4.0 → 1.0.0-beta.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 +16 -12
- package/dist/color.d.ts +134 -495
- package/dist/css.d.ts +2 -4
- package/dist/index.d.ts +142 -352
- package/dist/index.js +212 -369
- package/dist/index.js.map +1 -1
- package/dist/radius.d.ts +15 -17
- package/dist/shadow.d.ts +42 -20
- package/dist/tokens.css +111 -232
- package/dist/typography.d.ts +63 -46
- package/package.json +3 -4
- package/dist/blur.d.ts +0 -18
- package/dist/reference.html +0 -1275
package/dist/color.d.ts
CHANGED
|
@@ -1,493 +1,188 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Colour primitives and semantic mappings.
|
|
2
|
+
* Colour primitives and semantic mappings — the Windows 98 palette.
|
|
3
3
|
*
|
|
4
|
-
* ##
|
|
4
|
+
* ## Where the values come from
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
6
|
+
* The primitives are the sixteen-colour VGA palette Windows 98 was drawn in,
|
|
7
|
+
* plus the handful of system colours the default "Windows Standard" scheme
|
|
8
|
+
* added on top of it: the light bevel grey, the title-bar gradient ends and
|
|
9
|
+
* the tooltip yellow. They are written as the exact sRGB hex values, not
|
|
10
|
+
* converted to another space: these colours are defined by their eight-bit
|
|
11
|
+
* channels, and a round trip through OKLCH would only add rounding to values
|
|
12
|
+
* that are already exact.
|
|
10
13
|
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
* Clamping trades a little vividness for identical output everywhere.
|
|
14
|
+
* The names and values mirror the Figma file's `primitives` collection, and
|
|
15
|
+
* the semantic map mirrors its `semantic` collection token for token, so a
|
|
16
|
+
* colour picked in the design is the colour the component paints.
|
|
15
17
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* steps read as muddy brown rather than amber.
|
|
19
|
-
*
|
|
20
|
-
* Contrast for every semantic pair is asserted in `contrast.test.ts` — the
|
|
21
|
-
* ratios are a build gate, not a claim in a comment.
|
|
22
|
-
*/
|
|
23
|
-
/** The eleven steps every colour family provides. */
|
|
24
|
-
export declare const colorSteps: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950];
|
|
25
|
-
/** One step of a colour family. */
|
|
26
|
-
export type ColorStep = (typeof colorSteps)[number];
|
|
27
|
-
/**
|
|
28
|
-
* Cool-slate neutral (hue 264). Roughly 70% of the pixels in a data table:
|
|
29
|
-
* page background, row borders, muted labels, table chrome.
|
|
30
|
-
*/
|
|
31
|
-
export declare const neutral: {
|
|
32
|
-
readonly 50: "oklch(0.984 0.003 264)";
|
|
33
|
-
readonly 100: "oklch(0.968 0.004 264)";
|
|
34
|
-
readonly 200: "oklch(0.928 0.006 264)";
|
|
35
|
-
readonly 300: "oklch(0.869 0.01 264)";
|
|
36
|
-
readonly 400: "oklch(0.704 0.018 264)";
|
|
37
|
-
readonly 500: "oklch(0.551 0.024 264)";
|
|
38
|
-
readonly 600: "oklch(0.446 0.027 264)";
|
|
39
|
-
readonly 700: "oklch(0.373 0.028 264)";
|
|
40
|
-
readonly 800: "oklch(0.279 0.03 264)";
|
|
41
|
-
readonly 900: "oklch(0.21 0.033 264)";
|
|
42
|
-
readonly 950: "oklch(0.13 0.036 264)";
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Ink blue (hue 255).
|
|
46
|
-
*
|
|
47
|
-
* Cool and current — the step after warm espresso. Chroma stays low so a
|
|
48
|
-
* solid button is ink, not a brand shout, and the selected-row wash
|
|
49
|
-
* (`primary-50`) reads as a cool mist instead of a pink one.
|
|
50
|
-
*/
|
|
51
|
-
export declare const primary: {
|
|
52
|
-
readonly 50: "oklch(0.975 0.011 255)";
|
|
53
|
-
readonly 100: "oklch(0.948 0.022 255)";
|
|
54
|
-
readonly 200: "oklch(0.90 0.034 255)";
|
|
55
|
-
readonly 300: "oklch(0.80 0.05 255)";
|
|
56
|
-
readonly 400: "oklch(0.68 0.07 255)";
|
|
57
|
-
readonly 500: "oklch(0.52 0.09 255)";
|
|
58
|
-
readonly 600: "oklch(0.44 0.095 255)";
|
|
59
|
-
readonly 700: "oklch(0.38 0.095 255)";
|
|
60
|
-
/** Solid actions — ink blue, deep enough for white labels. */
|
|
61
|
-
readonly 800: "oklch(0.32 0.09 255)";
|
|
62
|
-
readonly 900: "oklch(0.27 0.075 255)";
|
|
63
|
-
readonly 950: "oklch(0.19 0.05 255)";
|
|
64
|
-
};
|
|
65
|
-
/** Green (hue 152). Reserved for successful outcomes, never for brand accent. */
|
|
66
|
-
export declare const success: {
|
|
67
|
-
readonly 50: "oklch(0.97 0.014 152)";
|
|
68
|
-
readonly 100: "oklch(0.936 0.036 152)";
|
|
69
|
-
readonly 200: "oklch(0.885 0.064 152)";
|
|
70
|
-
readonly 300: "oklch(0.809 0.097 152)";
|
|
71
|
-
readonly 400: "oklch(0.715 0.145 152)";
|
|
72
|
-
readonly 500: "oklch(0.623 0.162 152)";
|
|
73
|
-
readonly 600: "oklch(0.546 0.142 152)";
|
|
74
|
-
readonly 700: "oklch(0.488 0.127 152)";
|
|
75
|
-
readonly 800: "oklch(0.442 0.115 152)";
|
|
76
|
-
readonly 900: "oklch(0.396 0.103 152)";
|
|
77
|
-
readonly 950: "oklch(0.282 0.073 152)";
|
|
78
|
-
};
|
|
79
|
-
/** Amber (hue 75), lightness-bumped through the midtones. See the module note. */
|
|
80
|
-
export declare const warning: {
|
|
81
|
-
readonly 50: "oklch(0.97 0.016 75)";
|
|
82
|
-
readonly 100: "oklch(0.936 0.04 75)";
|
|
83
|
-
readonly 200: "oklch(0.885 0.071 75)";
|
|
84
|
-
readonly 300: "oklch(0.849 0.108 75)";
|
|
85
|
-
readonly 400: "oklch(0.785 0.162 75)";
|
|
86
|
-
readonly 500: "oklch(0.723 0.15 75)";
|
|
87
|
-
readonly 600: "oklch(0.616 0.128 75)";
|
|
88
|
-
readonly 700: "oklch(0.528 0.11 75)";
|
|
89
|
-
readonly 800: "oklch(0.442 0.092 75)";
|
|
90
|
-
readonly 900: "oklch(0.396 0.082 75)";
|
|
91
|
-
readonly 950: "oklch(0.282 0.059 75)";
|
|
92
|
-
};
|
|
93
|
-
/** Red (hue 25). Destructive actions and error states. */
|
|
94
|
-
export declare const danger: {
|
|
95
|
-
readonly 50: "oklch(0.97 0.014 25)";
|
|
96
|
-
readonly 100: "oklch(0.936 0.032 25)";
|
|
97
|
-
readonly 200: "oklch(0.885 0.06 25)";
|
|
98
|
-
readonly 300: "oklch(0.809 0.107 25)";
|
|
99
|
-
readonly 400: "oklch(0.715 0.17 25)";
|
|
100
|
-
readonly 500: "oklch(0.623 0.214 25)";
|
|
101
|
-
readonly 600: "oklch(0.546 0.218 25)";
|
|
102
|
-
readonly 700: "oklch(0.488 0.195 25)";
|
|
103
|
-
readonly 800: "oklch(0.442 0.165 25)";
|
|
104
|
-
readonly 900: "oklch(0.396 0.135 25)";
|
|
105
|
-
readonly 950: "oklch(0.282 0.086 25)";
|
|
106
|
-
};
|
|
107
|
-
/**
|
|
108
|
-
* Greys keyed by OKLCH lightness × 1000, so `gray-922` is lightness 0.922.
|
|
109
|
-
*
|
|
110
|
-
* Most steps stay zero-chroma — the reference design's quiet base. A few carry
|
|
111
|
-
* a cool cast (hue 264, the same as {@link neutral}): lighter hairlines and
|
|
112
|
-
* soft recessed surfaces. That is rowkit's own signal inside an otherwise
|
|
113
|
-
* clean, reference-shaped palette — enough to read as itself on a long session,
|
|
114
|
-
* not enough to look like a tinted theme.
|
|
115
|
-
*/
|
|
116
|
-
export declare const gray: {
|
|
117
|
-
/** Soft cool page. Slightly off pure white so a day of table work is less glare. */
|
|
118
|
-
readonly 988: "oklch(0.988 0.002 264)";
|
|
119
|
-
/** the reference `--primary-foreground`, `--foreground` (dark). */
|
|
120
|
-
readonly 985: "oklch(0.985 0 0)";
|
|
121
|
-
/**
|
|
122
|
-
* Cool recessed surface — muted toolbars, row hover, quiet chips.
|
|
123
|
-
*
|
|
124
|
-
* Lighter and cooler than the reference `--muted` (0.97 0 0): same job, less
|
|
125
|
-
* ink on the page.
|
|
126
|
-
*/
|
|
127
|
-
readonly 972: "oklch(0.972 0.003 264)";
|
|
128
|
-
/** the reference `--secondary`, `--muted`, `--accent` — kept for dark primary fill. */
|
|
129
|
-
readonly 970: "oklch(0.97 0 0)";
|
|
130
|
-
/**
|
|
131
|
-
* Cool decorative hairline / recessed fill step. Lighter than the reference
|
|
132
|
-
* `--border` (0.922) — table rules, card outlines, and secondary button fill
|
|
133
|
-
* (`surface-active`) that must read as a surface next to white outline chrome.
|
|
134
|
-
*/
|
|
135
|
-
readonly 940: "oklch(0.940 0.004 264)";
|
|
136
|
-
/** the reference `--border`. Kept for pressed fills that still need a step of weight. */
|
|
137
|
-
readonly 922: "oklch(0.922 0 0)";
|
|
138
|
-
/**
|
|
139
|
-
* Cool emphasised hairline. rowkit's; the reference design has no "strong border".
|
|
140
|
-
* Softer than the old 0.87 step so structure reads without shouting.
|
|
141
|
-
*/
|
|
142
|
-
readonly 905: "oklch(0.905 0.006 264)";
|
|
143
|
-
/** Emphasised hairline (legacy weight). Prefer {@link gray[905]} for new chrome. */
|
|
144
|
-
readonly 870: "oklch(0.87 0 0)";
|
|
145
|
-
/** the reference `--muted-foreground` (dark), where it clears AA at 7.63:1. */
|
|
146
|
-
readonly 708: "oklch(0.708 0 0)";
|
|
147
|
-
/**
|
|
148
|
-
* rowkit's correction to the reference `--ring` and `--input` in light mode.
|
|
149
|
-
*
|
|
150
|
-
* the reference design puts them at 0.708 and 0.922, which measure 2.59:1 and 1.26:1
|
|
151
|
-
* against a white page — a focus ring and a control boundary that both fail
|
|
152
|
-
* WCAG 1.4.11.
|
|
153
|
-
*
|
|
154
|
-
* Not the mathematical minimum. Solving in floating point gave 0.669 and a
|
|
155
|
-
* tidy 3.00:1; the browser paints `#959595` and axe measured **2.995:1**,
|
|
156
|
-
* because a colour is quantised to eight bits per channel before anyone sees
|
|
157
|
-
* it. Anything solved exactly onto a threshold lands on whichever side the
|
|
158
|
-
* rounding chooses. 0.635 is 3.45:1 against the page and 3.17:1 against
|
|
159
|
-
* `surface-subtle`, which clears the bar on both sides of the rounding.
|
|
160
|
-
*/
|
|
161
|
-
readonly 635: "oklch(0.635 0 0)";
|
|
162
|
-
/**
|
|
163
|
-
* Cool control boundary. Softer and cooler than the a11y floor at 0.635, still
|
|
164
|
-
* clears 3:1 on the page, a card and a recessed toolbar — so inputs speak the
|
|
165
|
-
* same language as the cool hairlines without failing WCAG 1.4.11.
|
|
166
|
-
*/
|
|
167
|
-
readonly 642: "oklch(0.642 0.012 264)";
|
|
168
|
-
/** the reference `--ring` (dark), 4.18:1 against the dark page. */
|
|
169
|
-
readonly 556: "oklch(0.556 0 0)";
|
|
170
|
-
/**
|
|
171
|
-
* rowkit's correction to the reference `--muted-foreground` in light mode.
|
|
172
|
-
*
|
|
173
|
-
* The reference design's 0.556 is 4.73:1 on white but only 4.34:1 on `--muted`, the
|
|
174
|
-
* recessed surface a table header sits on — and a table header is the single
|
|
175
|
-
* most common use this token has.
|
|
176
|
-
*
|
|
177
|
-
* 0.547 was the first attempt and shipped 4.51:1 in floating point; axe,
|
|
178
|
-
* reading the painted `#717171`, called it 4.47:1 and failed twenty-four
|
|
179
|
-
* stories. See {@link gray[635]} — same lesson, same cause. 0.535 measures
|
|
180
|
-
* 4.75:1 on `--muted` and 5.17:1 on the page.
|
|
181
|
-
*/
|
|
182
|
-
readonly 535: "oklch(0.535 0 0)";
|
|
183
|
-
/** Pressed row in dark mode. */
|
|
184
|
-
readonly 371: "oklch(0.371 0 0)";
|
|
185
|
-
/** the reference `--secondary`, `--muted`, `--accent` (dark). */
|
|
186
|
-
readonly 269: "oklch(0.269 0 0)";
|
|
187
|
-
/** the reference `--primary` (light), `--card` and `--popover` (dark). */
|
|
188
|
-
readonly 205: "oklch(0.205 0 0)";
|
|
189
|
-
/** the reference `--foreground` (light), `--background` (dark). */
|
|
190
|
-
readonly 145: "oklch(0.145 0 0)";
|
|
191
|
-
};
|
|
192
|
-
/**
|
|
193
|
-
* The reference design's destructive red, clamped into sRGB. Keyed by lightness, like `gray`.
|
|
194
|
-
*
|
|
195
|
-
* the reference design publishes `oklch(0.577 0.245 27.325)`, and that chroma **does not fit
|
|
196
|
-
* in sRGB** — 0.235 is the maximum at this lightness and hue. The difference is
|
|
197
|
-
* invisible; what it buys is a colour that renders identically on an sRGB
|
|
198
|
-
* monitor and a P3 laptop, instead of one each browser gamut-maps by its own
|
|
199
|
-
* rules. rowkit clamps every chromatic primitive for this reason, and
|
|
200
|
-
* `color.test.ts` enforces it.
|
|
201
|
-
*
|
|
202
|
-
* One red serves both themes. The reference design's dark `--destructive` is a lighter
|
|
203
|
-
* `oklch(0.704 …)`, which carries its white label at **2.86:1** — the single
|
|
204
|
-
* worst failure in the reference design's default set. Reusing the light value gives 4.90:1
|
|
205
|
-
* on the label in both themes and still clears 4.04:1 against the dark page.
|
|
18
|
+
* Contrast for every semantic pair a component produces is asserted in
|
|
19
|
+
* `contrast.test.ts` — the ratios are a build gate, not a claim in a comment.
|
|
206
20
|
*/
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
readonly
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
21
|
+
/** The sixteen-colour VGA palette, as Windows 98 used it. Only the twelve the design uses are listed. */
|
|
22
|
+
export declare const vga: {
|
|
23
|
+
readonly black: "#000000";
|
|
24
|
+
readonly white: "#ffffff";
|
|
25
|
+
/** The face of every window, button and dialog. */
|
|
26
|
+
readonly silver: "#c0c0c0";
|
|
27
|
+
/** Bevel shadows, disabled text, the borders of a field. */
|
|
28
|
+
readonly gray: "#808080";
|
|
29
|
+
/** Selection, the active title bar, the default primary. */
|
|
30
|
+
readonly navy: "#000080";
|
|
31
|
+
/** Hyperlinks. */
|
|
32
|
+
readonly blue: "#0000ff";
|
|
33
|
+
/** The desktop. */
|
|
34
|
+
readonly teal: "#008080";
|
|
35
|
+
readonly green: "#008000";
|
|
36
|
+
readonly olive: "#808000";
|
|
37
|
+
readonly yellow: "#ffff00";
|
|
38
|
+
readonly maroon: "#800000";
|
|
39
|
+
readonly red: "#ff0000";
|
|
218
40
|
};
|
|
219
|
-
/**
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
*/
|
|
232
|
-
export declare const green: {
|
|
233
|
-
/** Badge fill, light. */
|
|
234
|
-
readonly 950: "oklch(0.95 0.05 152)";
|
|
235
|
-
/** Badge border, light. */
|
|
236
|
-
readonly 880: "oklch(0.88 0.05 152)";
|
|
237
|
-
/** Badge text, dark. */
|
|
238
|
-
readonly 850: "oklch(0.85 0.12 152)";
|
|
239
|
-
/** Solid fill, both themes. White label at 4.56:1. */
|
|
240
|
-
readonly 550: "oklch(0.55 0.144 152)";
|
|
241
|
-
/** Solid hover — darkens, so the white label improves. */
|
|
242
|
-
readonly 520: "oklch(0.52 0.136 152)";
|
|
243
|
-
/** Badge text, light. */
|
|
244
|
-
readonly 400: "oklch(0.4 0.105 152)";
|
|
245
|
-
/** Badge border, dark. */
|
|
246
|
-
readonly 350: "oklch(0.35 0.092 152)";
|
|
247
|
-
/** Badge fill, dark. */
|
|
248
|
-
readonly 260: "oklch(0.26 0.068 152)";
|
|
249
|
-
};
|
|
250
|
-
/** Warning, mirroring {@link green} step for step. */
|
|
251
|
-
export declare const amber: {
|
|
252
|
-
readonly 950: "oklch(0.95 0.04 75)";
|
|
253
|
-
readonly 880: "oklch(0.88 0.05 75)";
|
|
254
|
-
readonly 850: "oklch(0.85 0.12 75)";
|
|
255
|
-
/** Solid fill, both themes. White label at 4.96:1. */
|
|
256
|
-
readonly 550: "oklch(0.55 0.116 75)";
|
|
257
|
-
readonly 520: "oklch(0.52 0.109 75)";
|
|
258
|
-
readonly 400: "oklch(0.4 0.084 75)";
|
|
259
|
-
readonly 350: "oklch(0.35 0.074 75)";
|
|
260
|
-
readonly 260: "oklch(0.26 0.055 75)";
|
|
261
|
-
};
|
|
262
|
-
/**
|
|
263
|
-
* White at a fraction of opacity, for dark-mode borders.
|
|
264
|
-
*
|
|
265
|
-
* Alpha, not a solid grey: a grey tuned for `--background` draws too hard a
|
|
266
|
-
* line once the same border sits on `--card`. The reference uses 10% / 15%;
|
|
267
|
-
* rowkit softens the decorative hairline to 8% so dense tables stay quiet in
|
|
268
|
-
* dark mode the same way the cool light hairline does.
|
|
269
|
-
*/
|
|
270
|
-
export declare const whiteAlpha: {
|
|
271
|
-
/** Soft decorative hairline in dark mode. */
|
|
272
|
-
readonly 8: "oklch(1 0 0 / 8%)";
|
|
273
|
-
/** the reference dark `--border`. */
|
|
274
|
-
readonly 10: "oklch(1 0 0 / 10%)";
|
|
275
|
-
/** Emphasised dark hairline / the reference dark `--input`. */
|
|
276
|
-
readonly 15: "oklch(1 0 0 / 15%)";
|
|
41
|
+
/** The system colours Windows 98 added on top of VGA. */
|
|
42
|
+
export declare const win98: {
|
|
43
|
+
/** The inner light edge of a raised bevel (`3D Light`). */
|
|
44
|
+
readonly light: "#dfdfdf";
|
|
45
|
+
/** Secondary text a step lighter than black. */
|
|
46
|
+
readonly 'dark-gray': "#404040";
|
|
47
|
+
/** The light end of the active title-bar gradient. */
|
|
48
|
+
readonly 'title-blue': "#1084d0";
|
|
49
|
+
/** The light end of the inactive title-bar gradient. */
|
|
50
|
+
readonly 'title-gray': "#b5b5b5";
|
|
51
|
+
/** Tooltip background (`Info`). */
|
|
52
|
+
readonly info: "#ffffe1";
|
|
277
53
|
};
|
|
278
54
|
/**
|
|
279
|
-
* Every primitive colour, keyed by the CSS custom property it becomes
|
|
55
|
+
* Every primitive colour, keyed by the CSS custom property it becomes:
|
|
56
|
+
* `--color-vga-silver`, `--color-win98-info`.
|
|
280
57
|
*
|
|
281
58
|
* These are the only place a literal colour value appears in rowkit. Everything
|
|
282
59
|
* else — semantic tokens, component variants — references one of these.
|
|
283
60
|
*/
|
|
284
61
|
export declare const colorPrimitives: {
|
|
285
|
-
readonly "
|
|
286
|
-
readonly "
|
|
287
|
-
readonly "
|
|
288
|
-
readonly "
|
|
289
|
-
readonly "
|
|
290
|
-
readonly "
|
|
291
|
-
readonly "
|
|
292
|
-
readonly "
|
|
293
|
-
readonly "
|
|
294
|
-
readonly "
|
|
295
|
-
readonly "
|
|
296
|
-
readonly "
|
|
297
|
-
readonly "
|
|
298
|
-
readonly "
|
|
299
|
-
readonly "
|
|
300
|
-
readonly "
|
|
301
|
-
readonly "
|
|
302
|
-
readonly "warning-600": string;
|
|
303
|
-
readonly "warning-700": string;
|
|
304
|
-
readonly "warning-800": string;
|
|
305
|
-
readonly "warning-900": string;
|
|
306
|
-
readonly "warning-950": string;
|
|
307
|
-
readonly "success-50": string;
|
|
308
|
-
readonly "success-100": string;
|
|
309
|
-
readonly "success-200": string;
|
|
310
|
-
readonly "success-300": string;
|
|
311
|
-
readonly "success-400": string;
|
|
312
|
-
readonly "success-500": string;
|
|
313
|
-
readonly "success-600": string;
|
|
314
|
-
readonly "success-700": string;
|
|
315
|
-
readonly "success-800": string;
|
|
316
|
-
readonly "success-900": string;
|
|
317
|
-
readonly "success-950": string;
|
|
318
|
-
readonly "primary-50": string;
|
|
319
|
-
readonly "primary-100": string;
|
|
320
|
-
readonly "primary-200": string;
|
|
321
|
-
readonly "primary-300": string;
|
|
322
|
-
readonly "primary-400": string;
|
|
323
|
-
readonly "primary-500": string;
|
|
324
|
-
readonly "primary-600": string;
|
|
325
|
-
readonly "primary-700": string;
|
|
326
|
-
readonly "primary-800": string;
|
|
327
|
-
readonly "primary-900": string;
|
|
328
|
-
readonly "primary-950": string;
|
|
329
|
-
readonly "neutral-50": string;
|
|
330
|
-
readonly "neutral-100": string;
|
|
331
|
-
readonly "neutral-200": string;
|
|
332
|
-
readonly "neutral-300": string;
|
|
333
|
-
readonly "neutral-400": string;
|
|
334
|
-
readonly "neutral-500": string;
|
|
335
|
-
readonly "neutral-600": string;
|
|
336
|
-
readonly "neutral-700": string;
|
|
337
|
-
readonly "neutral-800": string;
|
|
338
|
-
readonly "neutral-900": string;
|
|
339
|
-
readonly "neutral-950": string;
|
|
340
|
-
readonly "white-alpha-8": string;
|
|
341
|
-
readonly "white-alpha-10": string;
|
|
342
|
-
readonly "white-alpha-15": string;
|
|
343
|
-
readonly "amber-400": string;
|
|
344
|
-
readonly "amber-950": string;
|
|
345
|
-
readonly "amber-850": string;
|
|
346
|
-
readonly "amber-520": string;
|
|
347
|
-
readonly "amber-350": string;
|
|
348
|
-
readonly "amber-260": string;
|
|
349
|
-
readonly "amber-880": string;
|
|
350
|
-
readonly "amber-550": string;
|
|
351
|
-
readonly "green-400": string;
|
|
352
|
-
readonly "green-950": string;
|
|
353
|
-
readonly "green-850": string;
|
|
354
|
-
readonly "green-520": string;
|
|
355
|
-
readonly "green-350": string;
|
|
356
|
-
readonly "green-260": string;
|
|
357
|
-
readonly "green-880": string;
|
|
358
|
-
readonly "green-550": string;
|
|
359
|
-
readonly "red-850": string;
|
|
360
|
-
readonly "red-577": string;
|
|
361
|
-
readonly "red-520": string;
|
|
362
|
-
readonly "red-350": string;
|
|
363
|
-
readonly "red-260": string;
|
|
364
|
-
readonly "gray-988": string;
|
|
365
|
-
readonly "gray-985": string;
|
|
366
|
-
readonly "gray-972": string;
|
|
367
|
-
readonly "gray-970": string;
|
|
368
|
-
readonly "gray-940": string;
|
|
369
|
-
readonly "gray-922": string;
|
|
370
|
-
readonly "gray-905": string;
|
|
371
|
-
readonly "gray-870": string;
|
|
372
|
-
readonly "gray-708": string;
|
|
373
|
-
readonly "gray-635": string;
|
|
374
|
-
readonly "gray-642": string;
|
|
375
|
-
readonly "gray-556": string;
|
|
376
|
-
readonly "gray-535": string;
|
|
377
|
-
readonly "gray-371": string;
|
|
378
|
-
readonly "gray-269": string;
|
|
379
|
-
readonly "gray-205": string;
|
|
380
|
-
readonly "gray-145": string;
|
|
381
|
-
readonly white: "oklch(1 0 0)";
|
|
382
|
-
readonly black: "oklch(0 0 0)";
|
|
62
|
+
readonly "win98-light": "#dfdfdf";
|
|
63
|
+
readonly "win98-dark-gray": "#404040";
|
|
64
|
+
readonly "win98-title-blue": "#1084d0";
|
|
65
|
+
readonly "win98-title-gray": "#b5b5b5";
|
|
66
|
+
readonly "win98-info": "#ffffe1";
|
|
67
|
+
readonly "vga-black": "#000000";
|
|
68
|
+
readonly "vga-white": "#ffffff";
|
|
69
|
+
readonly "vga-silver": "#c0c0c0";
|
|
70
|
+
readonly "vga-gray": "#808080";
|
|
71
|
+
readonly "vga-navy": "#000080";
|
|
72
|
+
readonly "vga-blue": "#0000ff";
|
|
73
|
+
readonly "vga-teal": "#008080";
|
|
74
|
+
readonly "vga-green": "#008000";
|
|
75
|
+
readonly "vga-olive": "#808000";
|
|
76
|
+
readonly "vga-yellow": "#ffff00";
|
|
77
|
+
readonly "vga-maroon": "#800000";
|
|
78
|
+
readonly "vga-red": "#ff0000";
|
|
383
79
|
};
|
|
384
80
|
/** A reference to a primitive colour, as a CSS `var()` expression. */
|
|
385
81
|
export type ColorRef = `var(--color-${string})`;
|
|
386
82
|
/**
|
|
387
|
-
*
|
|
83
|
+
* Semantic colours.
|
|
388
84
|
*
|
|
389
85
|
* Semantic tokens never hold a literal colour — each one points at a primitive
|
|
390
86
|
* through `var()`, so re-theming means repointing references rather than
|
|
391
|
-
* hunting down hex codes. `
|
|
87
|
+
* hunting down hex codes. `color.test.ts` enforces this.
|
|
88
|
+
*
|
|
89
|
+
* Windows 98 is a grey world: most surfaces are the same silver, and depth
|
|
90
|
+
* comes from bevels rather than from a lighter or darker fill. So several
|
|
91
|
+
* surface tokens below share a value. They stay separate tokens because they
|
|
92
|
+
* are separate override points — a theme that wants a hovered row to change
|
|
93
|
+
* colour repoints `accent` without touching `muted`.
|
|
392
94
|
*/
|
|
393
|
-
export declare const
|
|
394
|
-
/**
|
|
395
|
-
* Page background, behind all surfaces.
|
|
396
|
-
*
|
|
397
|
-
* Soft cool off-white rather than the reference pure white — less glare over
|
|
398
|
-
* a long session, and enough lift that a white `card` still reads as a plane.
|
|
399
|
-
*/
|
|
95
|
+
export declare const semanticColor: {
|
|
96
|
+
/** The face of a window: the page behind the content. */
|
|
400
97
|
readonly background: `var(--color-${string})`;
|
|
401
|
-
/**
|
|
98
|
+
/** The desktop a window sits on. Docs and demo backdrops. */
|
|
99
|
+
readonly desktop: `var(--color-${string})`;
|
|
100
|
+
/** Panels and dialogs. Same face as the window; the bevel separates them. */
|
|
402
101
|
readonly card: `var(--color-${string})`;
|
|
403
|
-
/**
|
|
404
|
-
* Table headers, toolbars: a surface that recedes slightly.
|
|
405
|
-
*
|
|
406
|
-
* Cool and a touch lighter than the reference `--muted`. Same role as
|
|
407
|
-
* `accent` out of the box — separate override points, not different colours.
|
|
408
|
-
*/
|
|
102
|
+
/** Toolbars and table headers. */
|
|
409
103
|
readonly muted: `var(--color-${string})`;
|
|
410
|
-
/** Row hover. */
|
|
104
|
+
/** Row hover. Windows 98 has none — the token is here to be repointed. */
|
|
411
105
|
readonly accent: `var(--color-${string})`;
|
|
412
|
-
/**
|
|
106
|
+
/** A pressed row or toggle. The pressed bevel carries the state, not the fill. */
|
|
413
107
|
readonly 'surface-active': `var(--color-${string})`;
|
|
414
|
-
/**
|
|
415
|
-
* Selected table row. Quiet primary wash — distinct from hover, not a shout.
|
|
416
|
-
*/
|
|
108
|
+
/** A selected row or list item: navy, with `on-selected` text. */
|
|
417
109
|
readonly 'surface-selected': `var(--color-${string})`;
|
|
418
|
-
/**
|
|
110
|
+
/** A disabled control keeps the face colour; its text goes grey and embossed. */
|
|
419
111
|
readonly 'surface-disabled': `var(--color-${string})`;
|
|
420
112
|
/**
|
|
421
113
|
* Loading placeholder fill.
|
|
422
114
|
*
|
|
423
|
-
*
|
|
424
|
-
*
|
|
425
|
-
* interaction token would tie the two together for any future re-theme.
|
|
426
|
-
*
|
|
427
|
-
* Exempt from contrast rules: skeletons are `aria-hidden` decoration
|
|
428
|
-
* standing in for content that has not arrived, so there is nothing for a
|
|
429
|
-
* reader to perceive and WCAG 1.4.11 does not apply.
|
|
115
|
+
* Exempt from contrast rules: skeletons are `aria-hidden` decoration standing
|
|
116
|
+
* in for content that has not arrived, so WCAG 1.4.11 does not apply.
|
|
430
117
|
*/
|
|
431
118
|
readonly skeleton: `var(--color-${string})`;
|
|
432
|
-
/**
|
|
119
|
+
/** The inside of a text field, list or table body: white inside a sunken bevel. */
|
|
120
|
+
readonly input: `var(--color-${string})`;
|
|
121
|
+
/** Tooltip bubble. */
|
|
122
|
+
readonly 'tooltip-bg': `var(--color-${string})`;
|
|
123
|
+
/** Body and heading text. */
|
|
433
124
|
readonly foreground: `var(--color-${string})`;
|
|
434
125
|
/**
|
|
435
|
-
* Secondary text,
|
|
436
|
-
*
|
|
437
|
-
* `gray-535`, not the reference design's 0.556. The same trap the old `neutral-500` fell
|
|
438
|
-
* into: a table header is muted text on `surface-subtle`, and the reference design's value
|
|
439
|
-
* reaches 4.73:1 on white but only 4.34:1 on the recessed surface this token
|
|
440
|
-
* is most often used against. Nine thousandths of lightness buy the pass.
|
|
126
|
+
* Secondary text. Black, like body text: Windows 98 never greys out text
|
|
127
|
+
* that can still be read and acted on — grey means disabled.
|
|
441
128
|
*/
|
|
442
129
|
readonly 'muted-foreground': `var(--color-${string})`;
|
|
443
130
|
/** Placeholders and de-emphasised metadata. */
|
|
444
131
|
readonly 'text-subtle': `var(--color-${string})`;
|
|
445
|
-
/**
|
|
132
|
+
/** Disabled text, always drawn with {@link semanticColor['text-disabled-emboss']} under it. */
|
|
446
133
|
readonly 'text-disabled': `var(--color-${string})`;
|
|
447
|
-
/**
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
134
|
+
/** The white copy, one pixel right and down, that embosses disabled text. */
|
|
135
|
+
readonly 'text-disabled-emboss': `var(--color-${string})`;
|
|
136
|
+
/** Text on a selected row. */
|
|
137
|
+
readonly 'on-selected': `var(--color-${string})`;
|
|
138
|
+
/** Hyperlinks. */
|
|
139
|
+
readonly link: `var(--color-${string})`;
|
|
140
|
+
/** Separators and the frame of a group. Decorative, below 3:1 on purpose. */
|
|
454
141
|
readonly border: `var(--color-${string})`;
|
|
455
|
-
/**
|
|
142
|
+
/** A frame that has to read as an edge: the outline of a default button. */
|
|
456
143
|
readonly 'border-strong': `var(--color-${string})`;
|
|
457
|
-
/**
|
|
144
|
+
/** The faintest rule, inside a dense group. */
|
|
458
145
|
readonly 'border-subtle': `var(--color-${string})`;
|
|
459
146
|
/**
|
|
460
|
-
*
|
|
461
|
-
*
|
|
462
|
-
*
|
|
463
|
-
* Quiet on purpose (structure without severity). Resting edges sit near the
|
|
464
|
-
* decorative hairline; the focus treatment (`border-ring` + ring) is what
|
|
465
|
-
* carries WCAG 1.4.11. Matching the reference design's soft resting edge
|
|
466
|
-
* rather than a 3:1 ink outline that shouted next to every field.
|
|
467
|
-
*/
|
|
468
|
-
readonly input: `var(--color-${string})`;
|
|
469
|
-
/**
|
|
470
|
-
* Focus ring. Never remove the ring — recolour it.
|
|
471
|
-
*
|
|
472
|
-
* Soft silver — the payment-form / shadcn weight (`gray-708`), not ink.
|
|
473
|
-
* Intentionally under 3:1 as a solid; the visible treatment is
|
|
474
|
-
* `border-ring` plus a translucent outer ring, not a black halo.
|
|
475
|
-
* Every control that focuses (Button, Input, Select, Dialog close,
|
|
476
|
-
* Pagination, FilterBar chips, DataTable, Toast) reads this same token.
|
|
147
|
+
* Focus. Drawn as a 1px dotted ring inside the control, around its label.
|
|
148
|
+
* Black, so it clears 3:1 on every surface rowkit paints.
|
|
477
149
|
*/
|
|
478
150
|
readonly ring: `var(--color-${string})`;
|
|
479
|
-
/** Base colour shadows
|
|
151
|
+
/** Base colour for shadows. */
|
|
480
152
|
readonly shadow: `var(--color-${string})`;
|
|
153
|
+
/** Outer light edge of a raised bevel, inner one of a sunken bevel. */
|
|
154
|
+
readonly 'bevel-highlight': `var(--color-${string})`;
|
|
155
|
+
/** Inner light edge of a raised bevel. */
|
|
156
|
+
readonly 'bevel-light': `var(--color-${string})`;
|
|
157
|
+
/** Inner dark edge of a raised bevel. */
|
|
158
|
+
readonly 'bevel-shadow': `var(--color-${string})`;
|
|
159
|
+
/**
|
|
160
|
+
* Outer dark edge of a raised bevel. Being black, it is what gives every
|
|
161
|
+
* control a boundary of well over 3:1 against the face (WCAG 1.4.11).
|
|
162
|
+
*/
|
|
163
|
+
readonly 'bevel-dark': `var(--color-${string})`;
|
|
164
|
+
/** Active title bar, left end of the gradient. The title text sits on this end. */
|
|
165
|
+
readonly 'titlebar-from': `var(--color-${string})`;
|
|
166
|
+
/** Active title bar, right end of the gradient. */
|
|
167
|
+
readonly 'titlebar-to': `var(--color-${string})`;
|
|
168
|
+
/** Inactive title bar, left end of the gradient. */
|
|
169
|
+
readonly 'titlebar-inactive-from': `var(--color-${string})`;
|
|
170
|
+
/** Inactive title bar, right end of the gradient. */
|
|
171
|
+
readonly 'titlebar-inactive-to': `var(--color-${string})`;
|
|
172
|
+
/** Active title text. */
|
|
173
|
+
readonly 'titlebar-foreground': `var(--color-${string})`;
|
|
174
|
+
/**
|
|
175
|
+
* Inactive title text. Black, not Windows 98's silver: silver on the grey
|
|
176
|
+
* gradient is about 2:1 and fails 4.5:1; black is 5.3:1 on `#808080` and
|
|
177
|
+
* 11:1 on `#b5b5b5`.
|
|
178
|
+
*/
|
|
179
|
+
readonly 'titlebar-inactive-foreground': `var(--color-${string})`;
|
|
481
180
|
readonly 'neutral-solid': `var(--color-${string})`;
|
|
482
181
|
readonly 'neutral-solid-hover': `var(--color-${string})`;
|
|
483
182
|
readonly 'neutral-on-solid': `var(--color-${string})`;
|
|
484
183
|
readonly 'neutral-subtle': `var(--color-${string})`;
|
|
485
184
|
readonly 'neutral-on-subtle': `var(--color-${string})`;
|
|
486
185
|
readonly 'neutral-border': `var(--color-${string})`;
|
|
487
|
-
/**
|
|
488
|
-
* Ink-blue solid — cool, not a black brick and not a saturated brand blue.
|
|
489
|
-
* `primary-800` ≈ `oklch(0.32 0.09 255)`.
|
|
490
|
-
*/
|
|
491
186
|
readonly 'primary-solid': `var(--color-${string})`;
|
|
492
187
|
readonly 'primary-solid-hover': `var(--color-${string})`;
|
|
493
188
|
readonly 'primary-on-solid': `var(--color-${string})`;
|
|
@@ -500,66 +195,10 @@ export declare const semanticColorLight: {
|
|
|
500
195
|
readonly 'success-subtle': `var(--color-${string})`;
|
|
501
196
|
readonly 'success-on-subtle': `var(--color-${string})`;
|
|
502
197
|
readonly 'success-border': `var(--color-${string})`;
|
|
503
|
-
readonly 'warning-solid': `var(--color-${string})`;
|
|
504
|
-
readonly 'warning-solid-hover': `var(--color-${string})`;
|
|
505
|
-
readonly 'warning-on-solid': `var(--color-${string})`;
|
|
506
|
-
readonly 'warning-subtle': `var(--color-${string})`;
|
|
507
|
-
readonly 'warning-on-subtle': `var(--color-${string})`;
|
|
508
|
-
readonly 'warning-border': `var(--color-${string})`;
|
|
509
|
-
readonly 'danger-solid': `var(--color-${string})`;
|
|
510
|
-
readonly 'danger-solid-hover': `var(--color-${string})`;
|
|
511
|
-
readonly 'danger-on-solid': `var(--color-${string})`;
|
|
512
|
-
readonly 'danger-subtle': `var(--color-${string})`;
|
|
513
|
-
readonly 'danger-on-subtle': `var(--color-${string})`;
|
|
514
|
-
readonly 'danger-border': `var(--color-${string})`;
|
|
515
|
-
};
|
|
516
|
-
/**
|
|
517
|
-
* Dark-mode semantic colours, applied under `.dark`.
|
|
518
|
-
*
|
|
519
|
-
* Soft ink fills invert on dark pages: a near-white solid with dark type,
|
|
520
|
-
* rather than a mid-grey that disappears into the chrome.
|
|
521
|
-
*/
|
|
522
|
-
export declare const semanticColorDark: {
|
|
523
|
-
readonly background: `var(--color-${string})`;
|
|
524
|
-
readonly card: `var(--color-${string})`;
|
|
525
|
-
readonly muted: `var(--color-${string})`;
|
|
526
|
-
readonly accent: `var(--color-${string})`;
|
|
527
|
-
readonly 'surface-active': `var(--color-${string})`;
|
|
528
|
-
readonly 'surface-selected': `var(--color-${string})`;
|
|
529
|
-
readonly 'surface-disabled': `var(--color-${string})`;
|
|
530
|
-
readonly skeleton: `var(--color-${string})`;
|
|
531
|
-
readonly foreground: `var(--color-${string})`;
|
|
532
|
-
readonly 'muted-foreground': `var(--color-${string})`;
|
|
533
|
-
readonly 'text-subtle': `var(--color-${string})`;
|
|
534
|
-
readonly 'text-disabled': `var(--color-${string})`;
|
|
535
|
-
readonly border: `var(--color-${string})`;
|
|
536
|
-
readonly 'border-strong': `var(--color-${string})`;
|
|
537
|
-
readonly 'border-subtle': `var(--color-${string})`;
|
|
538
|
-
readonly input: `var(--color-${string})`;
|
|
539
198
|
/**
|
|
540
|
-
*
|
|
541
|
-
*
|
|
199
|
+
* Yellow carries black, never white: white on `#ffff00` is 1.07:1. Its edge
|
|
200
|
+
* is olive, because yellow on silver has almost no edge of its own.
|
|
542
201
|
*/
|
|
543
|
-
readonly ring: `var(--color-${string})`;
|
|
544
|
-
readonly shadow: `var(--color-${string})`;
|
|
545
|
-
readonly 'neutral-solid': `var(--color-${string})`;
|
|
546
|
-
readonly 'neutral-solid-hover': `var(--color-${string})`;
|
|
547
|
-
readonly 'neutral-on-solid': `var(--color-${string})`;
|
|
548
|
-
readonly 'neutral-subtle': `var(--color-${string})`;
|
|
549
|
-
readonly 'neutral-on-subtle': `var(--color-${string})`;
|
|
550
|
-
readonly 'neutral-border': `var(--color-${string})`;
|
|
551
|
-
readonly 'primary-solid': `var(--color-${string})`;
|
|
552
|
-
readonly 'primary-solid-hover': `var(--color-${string})`;
|
|
553
|
-
readonly 'primary-on-solid': `var(--color-${string})`;
|
|
554
|
-
readonly 'primary-subtle': `var(--color-${string})`;
|
|
555
|
-
readonly 'primary-on-subtle': `var(--color-${string})`;
|
|
556
|
-
readonly 'primary-border': `var(--color-${string})`;
|
|
557
|
-
readonly 'success-solid': `var(--color-${string})`;
|
|
558
|
-
readonly 'success-solid-hover': `var(--color-${string})`;
|
|
559
|
-
readonly 'success-on-solid': `var(--color-${string})`;
|
|
560
|
-
readonly 'success-subtle': `var(--color-${string})`;
|
|
561
|
-
readonly 'success-on-subtle': `var(--color-${string})`;
|
|
562
|
-
readonly 'success-border': `var(--color-${string})`;
|
|
563
202
|
readonly 'warning-solid': `var(--color-${string})`;
|
|
564
203
|
readonly 'warning-solid-hover': `var(--color-${string})`;
|
|
565
204
|
readonly 'warning-on-solid': `var(--color-${string})`;
|
|
@@ -574,4 +213,4 @@ export declare const semanticColorDark: {
|
|
|
574
213
|
readonly 'danger-border': `var(--color-${string})`;
|
|
575
214
|
};
|
|
576
215
|
/** Names of every semantic colour token. */
|
|
577
|
-
export type SemanticColorName = keyof typeof
|
|
216
|
+
export type SemanticColorName = keyof typeof semanticColor;
|