@rowkit/tokens 0.4.0 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/color.d.ts CHANGED
@@ -1,577 +1,333 @@
1
1
  /**
2
- * Colour primitives and semantic mappings.
2
+ * Colour primitives and semantic mappings — the Windows 98 palette.
3
3
  *
4
- * ## How the scales were derived
4
+ * ## Where the values come from
5
5
  *
6
- * Every chromatic family shares one lightness ramp and one chroma envelope, so
7
- * `primary-600`, `danger-600` and `success-600` are the same perceptual weight
8
- * and can be swapped without relayering the design. Families differ only by
9
- * hue and a chroma factor.
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
- * Chroma at each step is clamped to the sRGB gamut boundary. OKLCH can express
12
- * colours outside sRGB, and browsers gamut-map them per their own rules — that
13
- * makes a token render differently on a P3 laptop than on an sRGB monitor.
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
- * `warning` carries a lightness bump through its midtones: at a shared
17
- * lightness, yellow is far less saturated than blue or red, so the unbumped
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.
206
- */
207
- export declare const red: {
208
- /** Soft text on a dark subtle wash. Chroma clamped for sRGB. */
209
- readonly 850: "oklch(0.85 0.08 25)";
210
- /** Destructive fill. The reference design's lightness, chroma clamped. */
211
- readonly 577: "oklch(0.577 0.235 27.325)";
212
- /** Destructive hover — darkens in both themes, so the white label improves. */
213
- readonly 520: "oklch(0.52 0.212 27.325)";
214
- /** Soft border on a dark subtle wash. */
215
- readonly 350: "oklch(0.38 0.055 25)";
216
- /** Soft fill in dark mode — quiet red wash, not a solid brick. */
217
- readonly 260: "oklch(0.32 0.045 25)";
218
- };
219
- /**
220
- * Success and warning, at the reference design's weight. Keyed by lightness, like `gray`.
221
- *
222
- * the reference design has no equivalent to copy, so the rule is consistency rather than
223
- * fidelity: the solid step sits at the same lightness band as `red-577` and
224
- * carries a white label, so a success, a warning and a destructive button are
225
- * the same perceptual weight and only differ in hue.
226
- *
227
- * That is a real change for warning, which used to be bright amber with dark
228
- * text. Bright amber is the loudest thing on a the reference design page — the language is
229
- * built on restraint, and one saturated chip undoes it. Chroma is clamped to
230
- * the sRGB boundary at every step, as everywhere else.
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.
231
20
  */
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)";
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";
249
40
  };
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 "danger-50": string;
286
- readonly "danger-100": string;
287
- readonly "danger-200": string;
288
- readonly "danger-300": string;
289
- readonly "danger-400": string;
290
- readonly "danger-500": string;
291
- readonly "danger-600": string;
292
- readonly "danger-700": string;
293
- readonly "danger-800": string;
294
- readonly "danger-900": string;
295
- readonly "danger-950": string;
296
- readonly "warning-50": string;
297
- readonly "warning-100": string;
298
- readonly "warning-200": string;
299
- readonly "warning-300": string;
300
- readonly "warning-400": string;
301
- readonly "warning-500": string;
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
- * Light-mode semantic colours.
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. `semantic.test.ts` enforces this.
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 semanticColorLight: {
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
- /** Cards, panels, table bodies — the plane content sits on. The reference `--card`. */
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
- /** Row press / active. One step past hover; the reference design has no press token. */
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
- /** Disabled control background. */
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
- * Its own token rather than a reuse of `surface-active`, which means "this
424
- * row is being pressed". A skeleton is never interactive, so borrowing an
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
- /** Primary body and heading text. The reference `--foreground`. */
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, column labels, help text. The reference `--muted-foreground`.
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
- /** Text on a disabled control. */
132
+ /** Disabled text, always drawn with {@link semanticColor['text-disabled-emboss']} under it. */
446
133
  readonly 'text-disabled': `var(--color-${string})`;
447
- /**
448
- * Decorative hairline: row separators, card outlines.
449
- *
450
- * Cool and lighter than the reference 0.922. Deliberately below 3:1 — do not
451
- * use it for the boundary of an interactive control; see
452
- * {@link semanticColorLight['input']}.
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
- /** Emphasised decorative border: dividers that need to read as structure. */
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
- /** Barely-there separation inside a dense group. */
144
+ /** The faintest rule, inside a dense group. */
458
145
  readonly 'border-subtle': `var(--color-${string})`;
459
146
  /**
460
- * Boundary of an interactive control — text inputs, selects, outlined
461
- * buttons.
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 are mixed from. */
151
+ /** Base colour for shadows. */
480
152
  readonly shadow: `var(--color-${string})`;
481
- readonly 'neutral-solid': `var(--color-${string})`;
482
- readonly 'neutral-solid-hover': `var(--color-${string})`;
483
- readonly 'neutral-on-solid': `var(--color-${string})`;
484
- readonly 'neutral-subtle': `var(--color-${string})`;
485
- readonly 'neutral-on-subtle': `var(--color-${string})`;
486
- readonly 'neutral-border': `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})`;
487
159
  /**
488
- * Ink-blue solid — cool, not a black brick and not a saturated brand blue.
489
- * `primary-800` ≈ `oklch(0.32 0.09 255)`.
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).
490
162
  */
491
- readonly 'primary-solid': `var(--color-${string})`;
492
- readonly 'primary-solid-hover': `var(--color-${string})`;
493
- readonly 'primary-on-solid': `var(--color-${string})`;
494
- readonly 'primary-subtle': `var(--color-${string})`;
495
- readonly 'primary-on-subtle': `var(--color-${string})`;
496
- readonly 'primary-border': `var(--color-${string})`;
497
- readonly 'success-solid': `var(--color-${string})`;
498
- readonly 'success-solid-hover': `var(--color-${string})`;
499
- readonly 'success-on-solid': `var(--color-${string})`;
500
- readonly 'success-subtle': `var(--color-${string})`;
501
- readonly 'success-on-subtle': `var(--color-${string})`;
502
- 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})`;
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})`;
539
174
  /**
540
- * Soft focus — white at the same quiet weight as the control border, not a
541
- * bright primary wash. Reads as a silver edge on dark surfaces.
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`.
542
178
  */
543
- readonly ring: `var(--color-${string})`;
544
- readonly shadow: `var(--color-${string})`;
179
+ readonly 'titlebar-inactive-foreground': `var(--color-${string})`;
180
+ /** Neutral fill: a solid neutral badge, and anything filled in the neutral colour. */
545
181
  readonly 'neutral-solid': `var(--color-${string})`;
182
+ /** Neutral fill under the pointer. */
546
183
  readonly 'neutral-solid-hover': `var(--color-${string})`;
184
+ /** Text and icons on the neutral fill. */
547
185
  readonly 'neutral-on-solid': `var(--color-${string})`;
186
+ /** Neutral tint: the face of a subtle neutral badge or callout. */
548
187
  readonly 'neutral-subtle': `var(--color-${string})`;
188
+ /** Neutral text and icons, on its tint and on the page. */
549
189
  readonly 'neutral-on-subtle': `var(--color-${string})`;
190
+ /** The edge of a subtle or outlined neutral badge. */
550
191
  readonly 'neutral-border': `var(--color-${string})`;
192
+ /** Primary fill — the accent: a solid primary badge, a selected item, the default action in a theme that colours it. */
551
193
  readonly 'primary-solid': `var(--color-${string})`;
194
+ /** Primary fill under the pointer. */
552
195
  readonly 'primary-solid-hover': `var(--color-${string})`;
196
+ /** Text and icons on the primary fill. */
553
197
  readonly 'primary-on-solid': `var(--color-${string})`;
198
+ /** Primary tint: the face of a subtle primary badge or callout. */
554
199
  readonly 'primary-subtle': `var(--color-${string})`;
200
+ /** Primary text and icons, on its tint and on the page. */
555
201
  readonly 'primary-on-subtle': `var(--color-${string})`;
202
+ /** The edge of a subtle or outlined primary badge. */
556
203
  readonly 'primary-border': `var(--color-${string})`;
204
+ /** Success fill: a solid success badge, and anything filled in the success colour. */
557
205
  readonly 'success-solid': `var(--color-${string})`;
206
+ /** Success fill under the pointer. */
558
207
  readonly 'success-solid-hover': `var(--color-${string})`;
208
+ /** Text and icons on the success fill. */
559
209
  readonly 'success-on-solid': `var(--color-${string})`;
210
+ /** Success tint: the face of a subtle success badge or callout. */
560
211
  readonly 'success-subtle': `var(--color-${string})`;
212
+ /** Success text and icons, on its tint and on the page. */
561
213
  readonly 'success-on-subtle': `var(--color-${string})`;
214
+ /** The edge of a subtle or outlined success badge. */
562
215
  readonly 'success-border': `var(--color-${string})`;
216
+ /**
217
+ * Warning fill: a solid warning badge, and anything filled in the warning colour. Yellow carries black, never white: white on `#ffff00` is 1.07:1;
218
+ * its edge is olive, because yellow on silver has almost no edge of its own.
219
+ */
563
220
  readonly 'warning-solid': `var(--color-${string})`;
221
+ /** Warning fill under the pointer. */
564
222
  readonly 'warning-solid-hover': `var(--color-${string})`;
223
+ /** Text and icons on the warning fill. */
565
224
  readonly 'warning-on-solid': `var(--color-${string})`;
225
+ /** Warning tint: the face of a subtle warning badge or callout. */
566
226
  readonly 'warning-subtle': `var(--color-${string})`;
227
+ /** Warning text and icons, on its tint and on the page. */
567
228
  readonly 'warning-on-subtle': `var(--color-${string})`;
229
+ /** The edge of a subtle or outlined warning badge. */
568
230
  readonly 'warning-border': `var(--color-${string})`;
231
+ /** Danger fill: a solid danger badge, and anything filled in the danger colour. */
569
232
  readonly 'danger-solid': `var(--color-${string})`;
233
+ /** Danger fill under the pointer. */
570
234
  readonly 'danger-solid-hover': `var(--color-${string})`;
235
+ /** Text and icons on the danger fill. */
571
236
  readonly 'danger-on-solid': `var(--color-${string})`;
237
+ /** Danger tint: the face of a subtle danger badge or callout. */
572
238
  readonly 'danger-subtle': `var(--color-${string})`;
239
+ /** Danger text and icons, on its tint and on the page. */
573
240
  readonly 'danger-on-subtle': `var(--color-${string})`;
241
+ /** The edge of a subtle or outlined danger badge. */
574
242
  readonly 'danger-border': `var(--color-${string})`;
243
+ /** A plain button, a spin or drop button, a table's sort header. */
244
+ readonly control: `var(--color-${string})`;
245
+ /** Text and icons on a plain button. */
246
+ readonly 'control-foreground': `var(--color-${string})`;
247
+ /** A plain button under the pointer. */
248
+ readonly 'control-hover': `var(--color-${string})`;
249
+ /** A plain button while it is held. */
250
+ readonly 'control-active': `var(--color-${string})`;
251
+ /** The default button of a form or dialog — Enter's target. */
252
+ readonly 'control-primary': `var(--color-${string})`;
253
+ /** Text and icons on the default button. */
254
+ readonly 'control-primary-foreground': `var(--color-${string})`;
255
+ /** The default button under the pointer. */
256
+ readonly 'control-primary-hover': `var(--color-${string})`;
257
+ /** The default button while it is held. */
258
+ readonly 'control-primary-active': `var(--color-${string})`;
259
+ /** A flat toolbar button while hovered and while held. */
260
+ readonly 'control-ghost-hover': `var(--color-${string})`;
261
+ readonly 'control-ghost-active': `var(--color-${string})`;
262
+ /** The face of a latched toggle, under its pattern. */
263
+ readonly 'control-latched': `var(--color-${string})`;
264
+ /** A latched default button. A toggle is never the default, but if one latches it keeps its colour. */
265
+ readonly 'control-primary-latched': `var(--color-${string})`;
266
+ /** The box of a checked checkbox or radio, and the mark inside it. */
267
+ readonly checked: `var(--color-${string})`;
268
+ readonly 'on-checked': `var(--color-${string})`;
269
+ /** A list that drops from a trigger: a select's options. */
270
+ readonly popover: `var(--color-${string})`;
271
+ readonly 'popover-border': `var(--color-${string})`;
272
+ /** The ring a theme draws around a focused control, outside its edge. */
273
+ readonly 'focus-ring': `var(--color-${string})`;
274
+ /** A window's caption buttons; one fill per button, for themes that colour them. */
275
+ readonly caption: `var(--color-${string})`;
276
+ readonly 'caption-foreground': `var(--color-${string})`;
277
+ readonly 'caption-close': `var(--color-${string})`;
278
+ readonly 'caption-minimize': `var(--color-${string})`;
279
+ readonly 'caption-maximize': `var(--color-${string})`;
280
+ readonly 'caption-inactive': `var(--color-${string})`;
281
+ /** A data table's column headers. */
282
+ readonly 'table-header': `var(--color-${string})`;
283
+ readonly 'table-header-foreground': `var(--color-${string})`;
284
+ /** Every other row of a data table. Windows 98 does not stripe. */
285
+ readonly 'table-stripe': `var(--color-${string})`;
286
+ /** A data table row under the pointer. Windows 98 does not highlight it. */
287
+ readonly 'table-row-hover': `var(--color-${string})`;
288
+ /** The channel a progress bar or a scroll thumb runs in, and what fills it. */
289
+ readonly track: `var(--color-${string})`;
290
+ readonly progress: `var(--color-${string})`;
291
+ readonly 'scroll-thumb': `var(--color-${string})`;
292
+ /** The channel a scroll bar's thumb runs in, under its pattern. */
293
+ readonly 'scroll-track': `var(--color-${string})`;
294
+ /** The frame of a tooltip. */
295
+ readonly 'tooltip-border': `var(--color-${string})`;
296
+ /**
297
+ * The inside of a group box's frame, and the face around it — behind the
298
+ * legend and the frame's edge. Both the window's silver in Windows 98.
299
+ */
300
+ readonly groupbox: `var(--color-${string})`;
301
+ readonly 'groupbox-face': `var(--color-${string})`;
302
+ /** A toast's ✕: the caption button's silver in Windows 98, a soft grey disc elsewhere. */
303
+ readonly 'toast-close': `var(--color-${string})`;
304
+ readonly 'toast-close-foreground': `var(--color-${string})`;
305
+ /** «Loading…» in a dropped list: plain text in Windows 98, the subtle grey elsewhere. */
306
+ readonly 'loading-foreground': `var(--color-${string})`;
307
+ /** The strip that holds a searchable list's search box: the window face in Windows 98, nothing elsewhere. */
308
+ readonly 'select-search': `var(--color-${string})`;
309
+ /** A pager's buttons: raised command buttons in Windows 98, flat elsewhere. */
310
+ readonly pager: `var(--color-${string})`;
311
+ readonly 'pager-hover': `var(--color-${string})`;
312
+ readonly 'pager-active': `var(--color-${string})`;
313
+ /** The strip a filter bar sits on. */
314
+ readonly 'filter-bar': `var(--color-${string})`;
315
+ /** A filter chip: its face, its edge and its text. */
316
+ readonly chip: `var(--color-${string})`;
317
+ readonly 'chip-border': `var(--color-${string})`;
318
+ readonly 'chip-foreground': `var(--color-${string})`;
319
+ /** The face of a chip's ✕ at rest: the chip's own white in Windows 98. */
320
+ readonly 'chip-remove': `var(--color-${string})`;
321
+ /**
322
+ * The value of a read-only field that holds focus — a drop-down list's —
323
+ * highlighted the way Windows 98 marks it, and the text on it.
324
+ */
325
+ readonly 'field-highlight': `var(--color-${string})`;
326
+ readonly 'on-field-highlight': `var(--color-${string})`;
327
+ /** The text caret in a field. */
328
+ readonly 'field-caret': `var(--color-${string})`;
329
+ /** The buttons inside a field: a select's drop button, a number's spin buttons. */
330
+ readonly 'field-button': `var(--color-${string})`;
575
331
  };
576
332
  /** Names of every semantic colour token. */
577
- export type SemanticColorName = keyof typeof semanticColorLight;
333
+ export type SemanticColorName = keyof typeof semanticColor;