@gears-frontx/ui-kit 0.4.0-alpha.2 → 0.4.0-alpha.3

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.
Files changed (53) hide show
  1. package/dist/alert.js +11 -11
  2. package/dist/attachment.js +20 -20
  3. package/dist/avatar.js +39 -39
  4. package/dist/badge.js +15 -15
  5. package/dist/bubble.js +31 -31
  6. package/dist/button.js +28 -28
  7. package/dist/chunks/alert.C5BedF7l.css +1 -0
  8. package/dist/chunks/attachment.GAZbWSyB.css +1 -0
  9. package/dist/chunks/avatar.DZUXl1ev.css +1 -0
  10. package/dist/chunks/badge.Bi22h20j.css +1 -0
  11. package/dist/chunks/bubble.DvN6QyQ1.css +1 -0
  12. package/dist/chunks/button.DvAxXxKj.css +1 -0
  13. package/dist/chunks/context-menu.DwGCD0vN.css +1 -0
  14. package/dist/chunks/data-table.CtZdVSAU.css +1 -0
  15. package/dist/chunks/dropdown-menu.C5TLD9JO.css +1 -0
  16. package/dist/chunks/empty.BlhsHrOz.css +1 -0
  17. package/dist/chunks/field.Ccqt897k.css +1 -0
  18. package/dist/chunks/item.BkcgydVc.css +1 -0
  19. package/dist/chunks/questionnaire.D-u_K3Co.css +1 -0
  20. package/dist/chunks/table.BpnQ6j85.css +1 -0
  21. package/dist/chunks/tabs.4MEFBvw-.css +1 -0
  22. package/dist/chunks/toast.uUtCEAiv.css +1 -0
  23. package/dist/context-menu.js +62 -62
  24. package/dist/data-table.js +26 -26
  25. package/dist/docs/badge.md +7 -8
  26. package/dist/docs/questionnaire.md +4 -4
  27. package/dist/docs/sidebar.md +2 -2
  28. package/dist/dropdown-menu.js +65 -65
  29. package/dist/empty.js +18 -18
  30. package/dist/field.js +10 -10
  31. package/dist/item.js +20 -20
  32. package/dist/questionnaire.js +77 -77
  33. package/dist/table.js +23 -23
  34. package/dist/tabs.js +17 -17
  35. package/dist/theme.css +359 -242
  36. package/dist/toast.js +50 -50
  37. package/package.json +1 -1
  38. package/dist/chunks/alert.BJLRcB65.css +0 -1
  39. package/dist/chunks/attachment.rknKEWlr.css +0 -1
  40. package/dist/chunks/avatar.CsQmQnay.css +0 -1
  41. package/dist/chunks/badge.DR0epAiZ.css +0 -1
  42. package/dist/chunks/bubble.BKcAopT7.css +0 -1
  43. package/dist/chunks/button.D69BdJF1.css +0 -1
  44. package/dist/chunks/context-menu.Bjib7_AL.css +0 -1
  45. package/dist/chunks/data-table.DECm3qI-.css +0 -1
  46. package/dist/chunks/dropdown-menu.CDaeWYDT.css +0 -1
  47. package/dist/chunks/empty.B334jSES.css +0 -1
  48. package/dist/chunks/field.yTrg1G90.css +0 -1
  49. package/dist/chunks/item.CLg1KaYF.css +0 -1
  50. package/dist/chunks/questionnaire.DYnuWKAQ.css +0 -1
  51. package/dist/chunks/table.CFAJfhd-.css +0 -1
  52. package/dist/chunks/tabs.C4jGj2Vg.css +0 -1
  53. package/dist/chunks/toast.DMUpK07T.css +0 -1
package/dist/theme.css CHANGED
@@ -8,30 +8,49 @@
8
8
  * own surface from these same tokens is what makes the rest of the page
9
9
  * match. The token structure derives from shadcn/ui (MIT,
10
10
  * https://ui.shadcn.com; see the repository NOTICE file for attribution);
11
- * the values implement the Studio palette from the F-mockups Figma file
12
- * (variable collection "Studio / shadcn", modes Light + Dark). Figma
13
- * namespaces the same tokens under a `color/` folder (`color/background`);
14
- * the CSS names stay unprefixed per the shadcn convention the collection
15
- * itself is named after. A handful of collection entries are drawn by no
16
- * mockup node, so their per-mode values are unreadable via the Figma API;
17
- * those carry a `derived:` comment with the reasoning, and are the ones to
11
+ * the values implement the Studio BLUE rebrand recorded on the mockups'
12
+ * token spec frame "02 · Tokens, type & elevation" (node 40001232:5254),
13
+ * which superseded the violet "Studio / shadcn" collection this file
14
+ * previously carried. That frame's swatches label their WEB syntax with a
15
+ * `color/` prefix (`var(--color-background)`); the CSS names here stay
16
+ * unprefixed per the shadcn convention regardless — renaming the public
17
+ * token surface would break every consumer for zero semantic gain, and the
18
+ * `color/<name>` ↔ `--<name>` mapping is 1:1 either way. Entries the frame
19
+ * does not draw (card, popover, secondary, destructive, the sidebar block)
20
+ * carry a `derived:` comment with the reasoning, and are the ones to
18
21
  * re-check when the design file pins them down.
19
22
  *
20
- * Deliberately not here: the `color/workflow/*` and `color/scenario-canvas`
21
- * entries from the same collection. Figma itself exports them under its own
22
- * `--studio-*` namespace, which is the line this file follows — they name
23
- * one consumer's workflow surfaces rather than any kit semantic, and belong
24
- * to that app's own stylesheet.
23
+ * WCAG ruling (2026-08-31, standing): a drawn value that fails its
24
+ * contrast floor gets a corrected value in code — the deviation is recorded
25
+ * at the token, never shipped as a "kept as drawn" footnote. This pass
26
+ * deviates from the frame in exactly four places, all status colors used as
27
+ * 12px badge/avatar labels over their own -soft fills: light --success
28
+ * #059669→#047857, light --warning #f59e0b→#b45309, light --danger
29
+ * #e11d48→#be123c, dark --danger #e11d48→#fb7185 (per-token comments carry
30
+ * the measured ratios). Open designer question: pin AA-passing status
31
+ * values in the Figma file.
25
32
  *
26
- * The line is namespace, not "is a component reading it today": a few groups
27
- * here (Sidebar Navigation, the code pair, --blue, the four *-soft fills)
28
- * are unread by any current component. They are part of the collection's
29
- * unprefixed palette and are carried so a consumer painting a page around
30
- * the kit — or a later kit component — brands them from the same surface as
31
- * everything else, instead of finding a hole. Each such group says so at its
32
- * own declaration; app LAYOUT itself stays a non-goal (see design-notes),
33
- * so the sidebar tokens are colors for a consumer's own chrome, not a
34
- * promise of a Sidebar component.
33
+ * Deliberately not here: the `--studio-color-*` entries the same frame
34
+ * draws (progress-value/track, icon-subtle/icon-selected, and the studio
35
+ * copy of selection-subtle), plus `scenario-canvas` and
36
+ * `artifact-accent-icon`. The first group Figma exports under its own
37
+ * `--studio-*` namespace; the last two sit in the `color/` namespace since
38
+ * the rebrand, but all of them name one consumer's workflow surfaces
39
+ * (Studio's scenario canvas, its artifact cards) rather than any kit
40
+ * semantic, and belong to that app's own stylesheet. Ownership, not
41
+ * namespace, is what admits a token here — a Figma folder move alone does
42
+ * not put a product-domain name into the kit's public API.
43
+ *
44
+ * Being unread is NOT what excludes them, though: a few groups here (the
45
+ * code pair, --blue) are unread by any current component. They are part of
46
+ * the collection's unprefixed palette, carry kit-generic names, and are
47
+ * kept so a consumer painting a page around the kit — or a later kit
48
+ * component — brands them from the same surface as everything else,
49
+ * instead of finding a hole. Each such group says so at
50
+ * its own declaration. The Sidebar Navigation block is NOT one of them:
51
+ * sidebar.module.css consumes all five --sidebar-* tokens, so that group is
52
+ * component-consumed like any other pair — it merely doubles as the
53
+ * branding surface for a consumer's own navigation chrome.
35
54
  *
36
55
  * Basic branding happens on the consumer side by overriding these variables.
37
56
  * Dark mode: set data-theme="dark" on <html>/<body> for explicit control, or
@@ -61,34 +80,37 @@
61
80
 
62
81
  /*
63
82
  * Popover chrome shared by every card-like popup (Dialog/DropdownMenu/
64
- * Select/Toast): a 1px ring plus a two-layer drop shadow, declared once
65
- * here rather than hand-duplicated in each module. All
66
- * four consumers already paint their surface from the --popover/
83
+ * Select/Toast): a 1px ring plus a drop shadow, declared once here rather
84
+ * than hand-duplicated in each module. The geometry and strength follow
85
+ * the rebrand frame's "Studio/Elevation/200" spec (0 8 24 at a 12% tint
86
+ * of the light foreground #0F172A1F), which is the elevation the drawn
87
+ * overlays sit on; the frame's other elevation steps (100/300/Dock top)
88
+ * have no kit consumer yet and are not carried as tokens until one does.
89
+ * All four consumers already paint their surface from the --popover/
67
90
  * --popover-foreground pair, so this chrome takes the same family name
68
91
  * rather than "--overlay-*", which would read as a variant of --overlay
69
92
  * above (the modal *scrim*, an unrelated concept — a popover has no
70
93
  * backdrop) and reversed word order from it besides. --popover-shadow is
71
- * COMPOSED from --popover-border (both its layers are that same color),
72
- * not just co-located with it: rebranding the hairline recolors the
73
- * shadow along with it, by construction, not as a separate edit anyone
74
- * has to remember to make. Same rationale as --overlay above for living
75
- * here un-redefined regardless: both are mixed from --foreground, so the
76
- * computed value already flips correctly per theme without a separate
77
- * light/dark declaration.
94
+ * COMPOSED from --popover-border (its layer is that same color), not just
95
+ * co-located with it: rebranding the hairline recolors the shadow along
96
+ * with it, by construction, not as a separate edit anyone has to remember
97
+ * to make. Same rationale as --overlay above for living here un-redefined
98
+ * regardless: both are mixed from --foreground, so the computed value
99
+ * already flips correctly per theme without a separate light/dark
100
+ * declaration.
78
101
  */
79
- --popover-border: color-mix(in oklab, var(--foreground) 10%, transparent);
80
- --popover-shadow:
81
- 0 4px 6px -1px var(--popover-border),
82
- 0 2px 4px -2px var(--popover-border);
102
+ --popover-border: color-mix(in oklab, var(--foreground) 12%, transparent);
103
+ --popover-shadow: 0 8px 24px 0 var(--popover-border);
83
104
 
84
105
  /*
85
106
  * Radius scale. Components consume only the derived steps; consumers
86
107
  * rebrand by overriding --radius alone and the whole scale follows. The
87
- * offsets place the Studio scale (sm 6 / md 8 / lg 12 / xl 16) on the
88
- * 8px base — note md, not lg, sits at the base value, unlike shadcn v4's
89
- * derivation. --radius-xs has no Figma counterpart; it predates the
90
- * Studio scale and keeps its 4px slot. Corner shape isn't a light/dark
91
- * concern, so none of this is redefined per-theme.
108
+ * offsets place the Studio scale (sm 6 / md 8 / lg 12 / xl 16, unchanged
109
+ * by the blue rebrand) on the 8px base — note md, not lg, sits at the
110
+ * base value, unlike shadcn v4's derivation. --radius-xs has no Figma
111
+ * counterpart; it predates the Studio scale and keeps its 4px slot.
112
+ * Corner shape isn't a light/dark concern, so none of this is redefined
113
+ * per-theme.
92
114
  */
93
115
  --radius: 0.5rem;
94
116
  --radius-xs: calc(var(--radius) - 4px);
@@ -112,8 +134,9 @@
112
134
  * Heights follow the DRAWN control specimens (32/36/40) — the design
113
135
  * file's "Token architecture" text says 32/40/44, but the drawn mockups
114
136
  * are the source of truth for that discrepancy (a standing ruling; see
115
- * design-notes.md). Buttons sit on sm/md/lg directly; the drawn fields are
116
- * 40px (the lg step) and the filter chip 36px (md).
137
+ * design-notes.md). The rebrand frame's layout panel confirms 32/36/40.
138
+ * Buttons sit on sm/md/lg directly; the drawn fields are 40px (the lg
139
+ * step) and the filter chip 36px (md).
117
140
  */
118
141
  --control-height-sm: 2rem;
119
142
  --control-height-md: 2.25rem;
@@ -142,71 +165,104 @@
142
165
  --ring-inset: calc(var(--border-width-focus) - var(--border-width));
143
166
 
144
167
  /*
145
- * Typography (Figma "Typography / Specimens", frame 175:371 — the Studio
146
- * text styles, recorded verbatim). The kit ships no font FILES: loading
147
- * Inter/JetBrains Mono (@font-face, preload, subsetting) is the
148
- * consumer's build concern; until they load, the fallback stacks keep
149
- * metrics close. "Body Medium"/"Mono Medium" are not separate roles —
150
- * the same metrics at weight 500.
168
+ * Typography — the Studio blue rebrand's "Studio/Type" ramp (the
169
+ * "02 · Tokens, type & elevation" frame, node 40001232:5254), carried on
170
+ * the kit's existing role names: the roles are the public API and the
171
+ * NEW ramp's styles map onto them rather than renaming them —
172
+ * display <- Page Title (26/32 semibold)
173
+ * heading-2 <- Section Title (16/24 semibold — same metrics the role
174
+ * already had)
175
+ * body <- UI Primary Regular (14/20)
176
+ * label <- UI Secondary Medium (12/16) — the drawn Tabs trigger's
177
+ * own binding; Badge (UI Secondary Medium in the spec
178
+ * sheet) already sat on exactly these numbers via its
179
+ * meta-size + label-weight mix
180
+ * meta <- UI Secondary Regular (12/16 — same metrics as before)
181
+ * mono <- System Micro (10/14, --font-mono)
182
+ * All Studio/Type styles carry letter-spacing 0, so every role's
183
+ * tracking is normalized to 0 with them. heading-1 (20/28) has NO
184
+ * counterpart in the new ramp — the kit keeps it as an interpolated step
185
+ * between Page Title and Section Title rather than collapsing two
186
+ * heading roles onto one size. Also deliberately not carried: Display
187
+ * Metric (36/40), Foundation Hero (56/64) and Avatar Micro (10/14
188
+ * semibold) — no kit component consumes a role at those slots (Avatar's
189
+ * sm fallback sits on meta). Open at the component level, not the ramp:
190
+ * the drawn compact Button binds UI Secondary SEMI BOLD (600) while
191
+ * Button reads --text-label-weight (500) — a per-component weight
192
+ * question for the components pass, since label's 500 also dresses
193
+ * menus, tooltips and table headers.
194
+ *
195
+ * The kit ships no font FILES: loading Inter/JetBrains Mono (@font-face,
196
+ * preload, subsetting) is the consumer's build concern; until they load,
197
+ * the fallback stacks keep metrics close.
151
198
  *
152
199
  * The specimens-vs-ramp conflict is settled: the drawn component
153
- * specimens hand-set line-heights the ramp doesn't have (13/18, 12/17,
154
- * plus a 10px table header with no role at all), and the ruling is that
155
- * the token system wins — component text sits on these roles, off-ramp
156
- * drawn metrics were normalized to the nearest role, and the same ruling
157
- * snapped off-grid spacing onto --space-*. A tokens.test.ts guard enforces
158
- * it; design-notes.md records it.
200
+ * specimens hand-set line-heights the ramp doesn't have, and the ruling
201
+ * is that the token system wins — component text sits on these roles,
202
+ * off-ramp drawn metrics were normalized to the nearest role, and the
203
+ * same ruling snapped off-grid spacing onto --space-*. A tokens.test.ts
204
+ * guard enforces it; design-notes.md records it.
159
205
  */
160
206
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
161
207
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
162
- /* Display: 28/34 semibold. */
163
- --text-display-size: 1.75rem;
164
- --text-display-line-height: 2.125rem;
208
+ /* Display: 26/32 semibold (Studio/Type/Page Title). */
209
+ --text-display-size: 1.625rem;
210
+ --text-display-line-height: 2rem;
165
211
  --text-display-weight: 600;
166
- --text-display-tracking: -0.4px;
167
- /* Heading 1: 20/28 semibold. */
212
+ --text-display-tracking: 0px;
213
+ /* Heading 1: 20/28 semibold (kit interpolation, no ramp counterpart —
214
+ * see the header comment above). */
168
215
  --text-heading-1-size: 1.25rem;
169
216
  --text-heading-1-line-height: 1.75rem;
170
217
  --text-heading-1-weight: 600;
171
- --text-heading-1-tracking: -0.2px;
172
- /* Heading 2: 16/24 semibold. */
218
+ --text-heading-1-tracking: 0px;
219
+ /* Heading 2: 16/24 semibold (Studio/Type/Section Title). */
173
220
  --text-heading-2-size: 1rem;
174
221
  --text-heading-2-line-height: 1.5rem;
175
222
  --text-heading-2-weight: 600;
176
- --text-heading-2-tracking: -0.1px;
177
- /* Body: 15/20 regular (Body Medium = weight 500). */
178
- --text-body-size: 0.9375rem;
223
+ --text-heading-2-tracking: 0px;
224
+ /* Body: 14/20 regular (Studio/Type/UI Primary Regular; the Medium and
225
+ * Semi Bold cuts are the same metrics at 500/600). */
226
+ --text-body-size: 0.875rem;
179
227
  --text-body-line-height: 1.25rem;
180
228
  --text-body-weight: 400;
181
229
  --text-body-tracking: 0px;
182
- /* Label: 13/16 medium. */
183
- --text-label-size: 0.8125rem;
230
+ /* Label: 12/16 medium (Studio/Type/UI Secondary Medium). */
231
+ --text-label-size: 0.75rem;
184
232
  --text-label-line-height: 1rem;
185
233
  --text-label-weight: 500;
186
- --text-label-tracking: 0.1px;
187
- /* Meta: 12/16 regular. */
234
+ --text-label-tracking: 0px;
235
+ /* Meta: 12/16 regular (Studio/Type/UI Secondary Regular). */
188
236
  --text-meta-size: 0.75rem;
189
237
  --text-meta-line-height: 1rem;
190
238
  --text-meta-weight: 400;
191
- --text-meta-tracking: 0.1px;
192
- /* Mono: 11/16 regular, --font-mono (Mono Medium = weight 500). */
193
- --text-mono-size: 0.6875rem;
194
- --text-mono-line-height: 1rem;
239
+ --text-meta-tracking: 0px;
240
+ /* Mono: 10/14 regular, --font-mono (Studio/Type/System Micro; System
241
+ * Micro Medium = the same metrics at 500). */
242
+ --text-mono-size: 0.625rem;
243
+ --text-mono-line-height: 0.875rem;
195
244
  --text-mono-weight: 400;
196
245
  --text-mono-tracking: 0px;
197
246
  }
198
247
 
199
248
  :root,
200
249
  [data-theme='light'] {
201
- --background: #f8fafc;
250
+ --background: #f1f5f9;
202
251
  --foreground: #0f172a;
203
252
 
204
253
  /* Flat and raised panel fills. Both are white in light mode — the pair
205
- * only separates visually in dark mode — but components must still pick
206
- * the semantically right one so the dark theme comes out layered. */
254
+ * only separates visually against the (now slate-tinted) page behind
255
+ * them — but components must still pick the semantically right one so a
256
+ * future re-split of the dark pair comes out layered. The rebrand frame
257
+ * draws the dark pair COLLAPSED onto one value too (see the dark block);
258
+ * both entries stay because the seam is the token name, not today's
259
+ * value. */
207
260
  --surface: #ffffff;
208
261
  --surface-elevated: #ffffff;
209
262
 
263
+ /* derived: the frame draws no card/* entries; card keeps mirroring
264
+ * --surface (white over the slate page), with hover one step toward the
265
+ * page tint. */
210
266
  --card: #ffffff;
211
267
  --card-hover: #f8fafc;
212
268
  --card-foreground: #0f172a;
@@ -216,143 +272,197 @@
216
272
  --popover: #ffffff;
217
273
  --popover-foreground: #0f172a;
218
274
 
219
- --primary: #8257e6;
220
- /* derived (light only): the dark mode's hover is the light primary, so
221
- * the light hover takes the dark primary — one step down the same ramp.
222
- * The dark value is Figma's own. */
223
- --primary-hover: #7c4fde;
275
+ /* The Studio brand blue ("blue-bright" in the frame's primitive ramp).
276
+ * White text on it measures 5.29:1 in both modes (same hex both modes,
277
+ * per the frame). */
278
+ --primary: #0065e3;
279
+ --primary-hover: #2668c5;
224
280
  --primary-foreground: #ffffff;
225
281
  /* Button default variant's focus-ring tone, measured against
226
- * --background: 6.79:1 light / 7.23:1 dark (the dark values below carry
227
- * no comment of their own — per this file's convention, a token's
228
- * comment lives in the light block only). Literal hexes, not var()
229
- * aliases, because the contrast tests parse hex directly (see
230
- * src/__test-utils__/contrast.ts). A dedicated token, not --primary
231
- * itself: the ring is drawn OUTSIDE the button (see button.module.css),
232
- * so it only ever borders the page, and a violet a shade darker than
233
- * --primary reads more clearly there than --primary's own value would. */
234
- --primary-ring: #6d28d9;
235
- --secondary: #f1f5f9;
282
+ * --background: 4.95:1 light / 7.75:1 dark against the 3:1 floor (the
283
+ * dark values below carry no comment of their own — per this file's
284
+ * convention, a token's comment lives in the light block only). Literal
285
+ * hexes, not var() aliases, because the contrast tests parse hex
286
+ * directly (see src/__test-utils__/contrast.ts). derived: the frame
287
+ * draws no ring-family entries beyond --ring itself; light takes the
288
+ * brand ramp's next step down (--primary-hover's own hex, duplicated as
289
+ * a literal on purpose), dark the ramp's light "blue-sky" tint — the
290
+ * ring is drawn OUTSIDE the button (see button.module.css), so it only
291
+ * ever borders the page. */
292
+ --primary-ring: #2668c5;
293
+ /* derived: the old light secondary equalled --muted, but the rebrand
294
+ * moved --background onto that same slate-50 — a secondary fill equal to
295
+ * the page would vanish. One step down the frame's neutral ramp
296
+ * (neutral-100) keeps it a visible fill (1.13:1 against the page) the
297
+ * way the old value was against the old page. Dark mirrors the move one
298
+ * step the OTHER way from its (card-equal) drawn muted — see the dark
299
+ * block. */
300
+ --secondary: #e2e8f0;
236
301
  --secondary-foreground: #0f172a;
237
- /* derived (dark only): light muted equals light secondary in the
238
- * collection, so dark muted follows dark secondary the same way. */
239
- --muted: #f1f5f9;
240
- --muted-foreground: #64748b;
302
+ /* derived: the frame draws muted at slate-50 — the exact value the
303
+ * rebrand made the page itself — and its dark muted at the card surface.
304
+ * Muted is the kit's workhorse FILL (Skeleton, outline/ghost Button
305
+ * hover, Calendar's outside days, a dozen more), and a fill equal to its
306
+ * own backdrop vanishes: the same argument --secondary above already
307
+ * applies, so muted takes the same one-step correction and lands ON
308
+ * secondary's value — which is also upstream shadcn's own arrangement
309
+ * (its default theme ships muted == secondary). 1.13:1 against the page
310
+ * / 1.23:1 against the card in light, 1.22 / 1.35 in dark; every text
311
+ * seat stays clear (--muted-foreground on this fill is 8.40:1 light /
312
+ * 5.71:1 dark). tokens.test.ts pins the separation so a later value
313
+ * move cannot silently re-collapse it. */
314
+ --muted: #e2e8f0;
315
+ /* The frame collapses muted-foreground, subtle-foreground and
316
+ * code-foreground onto one slate-600 in light (and one slate-400 in
317
+ * dark). Adopted as drawn — the collapse is the design's own, and every
318
+ * pair still clears its floor (see --subtle-foreground below). */
319
+ --muted-foreground: #334155;
241
320
  /*
242
321
  * Table's header row is the only consumer (tokens.test.ts's leading-class
243
322
  * guard doesn't reach theme.css itself, but a grep confirms it — see
244
- * table.module.css). Not the drawn value: each mode's drawn value failed
245
- * the 4.5:1 AA floor against the header's own --surface fill (light
246
- * #94a3b8 at 2.56:1, dark #667085 at 3.74:1), so both were replaced.
247
- * AA leaves this token no room to read lighter than --muted-foreground in
248
- * light mode (anything less saturated than ~this value fails against
249
- * --surface's near-white), so light converges close to it; dark keeps a
250
- * visibly dimmer, genuinely "subtler" step since --surface is dark enough
251
- * to leave headroom. The ratios and the open designer question — pin
252
- * AA-passing values in the Figma file — are in design-notes.md.
323
+ * table.module.css). The previous design's drawn values failed the 4.5:1
324
+ * AA floor against the header's own --surface fill and were replaced in
325
+ * code; the rebrand frame resolved that open question itself — its drawn
326
+ * values measure 10.35:1 light / 6.96:1 dark against --surface, so both
327
+ * modes are the frame's own again (they happen to converge with
328
+ * --muted-foreground; that collapse is the design's, see above).
253
329
  */
254
- --subtle-foreground: #5f6f88;
255
- --accent: #f3e8ff;
256
- --accent-foreground: #6d28d9;
330
+ --subtle-foreground: #334155;
331
+ /* The brand-tinted fill+text pair (menus' hover/active rows, Badge's
332
+ * accent tone, Bubble). The drawn pair measures 4.68:1 light / 13.77:1
333
+ * dark — clears the 4.5:1 AA floor as drawn. */
334
+ --accent: #e6effa;
335
+ --accent-foreground: #2668c5;
257
336
  /*
258
337
  * The tint a row carries while it is selected. Table's row-state hooks
259
338
  * are the only consumer (see table.module.css). Its own token rather
260
339
  * than --muted or --accent because the Studio Data Table frame
261
- * (40001455:6353) draws selection in neither: --accent is the violet
262
- * brand tint, and --muted is a neutral slate the drawn value is visibly
340
+ * (40001455:6353) draws selection in neither: --accent is the brand
341
+ * tint, and --muted is a neutral slate the drawn value is visibly
263
342
  * bluer and one step stronger than — selection has to read as a state at
264
343
  * a glance across a column of rows, which a fill that close to the
265
344
  * page's own neutrals does not.
266
- * Light is the frame's own drawn value. derived (dark only): the frame
267
- * has no dark specimen, so dark takes the same hue and saturation at the
268
- * lightness that puts it one clear step above --card-hover, the fill it
269
- * has to stay distinguishable from. --foreground clears AA on both
270
- * (14.2:1 light, 13.1:1 dark).
345
+ * Both modes are now drawn values: light from the Data Table frame, dark
346
+ * from the rebrand frame's studio-namespaced copy of the same token
347
+ * (--studio-color-selection-subtle — the only place a dark specimen
348
+ * exists; the kit-side name stays unprefixed like everything else).
349
+ * --foreground clears AA on both (14.2:1 light, 12.0:1 dark).
271
350
  */
272
351
  --selection-subtle: #dce7f2;
273
352
 
274
- /* derived: no mockup node draws with destructive/*, so it aliases danger —
275
- * one red, two names, both overridable separately. White text clears AA
276
- * on both modes' reds (4.7:1 light, 4.6:1 dark). */
353
+ /* derived: no mockup node draws with destructive/*, so it aliases the
354
+ * frame's danger red — one red, two names, both overridable separately.
355
+ * The alias tracks the DRAWN danger (#e11d48 both modes), not the
356
+ * AA-corrected --danger below: destructive is a solid fill under white
357
+ * text (4.70:1, passes in both modes), so the label-driven correction
358
+ * that moved --danger does not apply to it. */
277
359
  --destructive: #e11d48;
278
360
  --destructive-foreground: #ffffff;
361
+ /* Badge's destructive-variant hover tone (see badge.module.css) — darker
362
+ * than --destructive so white text never drops under 4.5:1 on hover. Same
363
+ * hex both modes on purpose: a hover recipe that darkens by mixing toward
364
+ * --foreground works in light (foreground is dark) but LIGHTENS in dark
365
+ * mode instead (foreground flips to white there), so this token sidesteps
366
+ * that by not depending on --foreground at all. #be123c is the same
367
+ * literal --destructive-ring/--danger already carry — white on it
368
+ * measures 6.29:1 in both modes. */
369
+ --destructive-hover: #be123c;
279
370
  /* Button destructive variant's focus-ring tone, measured against
280
- * --background: 6.01:1 light / 7.89:1 dark. Literal hexes, not var()
371
+ * --background: 5.74:1 light / 7.89:1 dark. Literal hexes, not var()
281
372
  * aliases, for the same reason as --primary-ring above: the contrast
282
373
  * tests parse hex directly (see src/__test-utils__/contrast.ts). The
283
374
  * ring is drawn outside the button, so it only ever borders the page. */
284
375
  --destructive-ring: #be123c;
285
376
 
286
377
  /*
287
- * Link text token — Button's `link` variant, which has no drawn
288
- * counterpart to align to: the mockups' Button panel draws no borderless
289
- * text variant, so there is no specimen color to take. --primary itself
290
- * measured 4.51:1 light
291
- * (barely over the 4.5:1 AA floor for this 13px text — 0.005 of headroom,
292
- * so close that a future one-step nudge to --background could silently
293
- * fail it again) and 3.78:1 dark (a clear fail) against the page
294
- * background the borderless variant sits on. derived: light takes
295
- * --primary-hover's value instead of --primary's own (still the same
296
- * violet family, one step darker) for real headroom — 4.98:1, not a
297
- * borderline pass; dark takes a lighter tint of the same hue.
378
+ * Link text token — Button's `link` variant and Badge's, which have no
379
+ * drawn counterpart to align to. --primary itself passes the 4.5:1 AA
380
+ * floor against the page in light (4.83:1) but the convention set when
381
+ * this token was introduced stands: take the ramp's next step for real
382
+ * headroom rather than ride a value that a one-step nudge to
383
+ * --background could push under the floor. derived: light duplicates
384
+ * --primary-hover's hex (4.95:1) as a literal (the contrast tests parse
385
+ * hex, see above); dark takes the ramp's light "blue-sky" tint
386
+ * (7.75:1).
298
387
  */
299
- --link-foreground: #7c4fde;
388
+ --link-foreground: #2668c5;
300
389
 
301
390
  /* Status colors with their -soft fills. The status colors themselves are
302
- * consumed — Badge's dot and label text, Table's stale/restricted row
303
- * rings; the four -soft fills are read by Badge's tone variants
304
- * (success/warning/danger/info backgrounds, badge.module.css) and by
305
- * Avatar's tone-by-variant fill matrix (avatar.module.css) - both paint a
306
- * tinted surface: the -soft fill as background, the base status token as
307
- * foreground text. Dark warning-soft and info-soft are corroborated by
308
- * the workflow aliases that resolve to the same values; dark danger-soft
309
- * and light warning-soft are drawn nowhere — derived: chosen to sit in
310
- * the same tint family as their corroborated siblings, not from one
311
- * reproducible mix recipe (the four -soft values don't share a single
312
- * formula against their base hue). */
313
- --success: #059669;
391
+ * consumed as 12px label text over the -soft fills (Badge's tone
392
+ * variants, Avatar's soft treatment) and as solid Avatar fills; the
393
+ * -soft fills also carry Table's stale/restricted row tints. Because
394
+ * they are label text, each base value must clear 4.5:1 over its own
395
+ * -soft fill, --card and --background — and four drawn values don't,
396
+ * which is where this file's WCAG ruling (see header) deviates from the
397
+ * frame:
398
+ * - light success: drawn #059669 is 3.43:1 on its soft fill →
399
+ * #047857, one step down the same green ramp (5.00/5.48/5.01 on
400
+ * soft/card/bg);
401
+ * - light warning: drawn #f59e0b is 1.96–2.15:1 everywhere → #b45309
402
+ * (4.67/5.02/4.58) — amber simply has no AA-passing tone brighter
403
+ * than this over near-white fills;
404
+ * - light danger: drawn #e11d48 is 4.28:1 on its soft fill → #be123c
405
+ * (5.72/6.29/5.74), the same hex the destructive ring already
406
+ * carries;
407
+ * - light info: drawn #2563eb PASSES (4.59:1 worst case) and is kept
408
+ * as drawn — the floor is met, though with little headroom;
409
+ * - dark: success #34d399, warning #f6c453 and info #60a5fa all pass
410
+ * as drawn (8.05/10.03/6.62 worst case); danger #e11d48 fails
411
+ * (3.63:1 on its soft fill) → #fb7185, the light rose tint one step
412
+ * up (6.34:1 worst case).
413
+ * The -soft fills are the frame's own in both modes. */
414
+ --success: #047857;
314
415
  --success-soft: #e8f8f1;
315
- --warning: #d97706;
316
- --warning-soft: #fdf3e2;
317
- --danger: #e11d48;
416
+ --warning: #b45309;
417
+ --warning-soft: #fff7d6;
418
+ --danger: #be123c;
318
419
  --danger-soft: #fff1f2;
319
- --info: #0284c7;
320
- --info-soft: #eaf6ff;
420
+ --info: #2563eb;
421
+ --info-soft: #eaf2ff;
321
422
  /* A palette entry, not a semantic: --info is the token a component reaches
322
423
  * for, and nothing in the kit reads this one. Kept because the collection
323
- * names it separately from --info.
324
- * derived (light only): dark is Figma's blue-400; light takes the same
325
- * Tailwind ramp one step down (blue-500). */
326
- --blue: #3b82f6;
424
+ * names it separately from --info; the rebrand pointed it at the brand
425
+ * ramp's mid blue (the frame's own `--blue` primitive). derived (dark
426
+ * only): the frame's primitives are mode-invariant, but a mid blue that
427
+ * reads on white doesn't on near-black, so dark takes the ramp's
428
+ * "blue-sky" tint, same move as --link-foreground. */
429
+ --blue: #2668c5;
327
430
 
328
431
  --border: #e2e8f0;
329
432
  --border-strong: #cbd5e1;
330
- /* Field-control borders. Not derived: the mockups' Field set (frame
331
- * 193:433) strokes every input/textarea/select with the border-strong
332
- * value, so input carries it in both modes. */
433
+ /* Field-control borders. Not derived: the mockups' Field set strokes
434
+ * every input/textarea/select with the border-strong value, so input
435
+ * carries it in both modes (the rebrand frame collapses the dark border
436
+ * pair — see the dark block). */
333
437
  --input: #cbd5e1;
334
- /* Focus color. Light from the MVP Foundations frame; dark is drawn by
335
- * the Field focus specimens (frame 193:383 strokes focus with the dark
336
- * primary value), so neither mode is derived. */
337
- --ring: #8b5cf6;
438
+ /* Focus color, per the rebrand frame: the brand blue in light, the
439
+ * "blue-sky" tint in dark. 4.83:1 / 7.75:1 against the page — clears the
440
+ * 3:1 non-text floor the shared focus rings need. */
441
+ --ring: #0065e3;
338
442
 
339
- /* Sidebar Navigation block. Palette only — no kit component reads these
340
- * (app layout is a non-goal; see design-notes), they brand a consumer's
341
- * own navigation chrome from the same surface as the rest.
342
- * --sidebar/--sidebar-accent are each drawn by their own dark-mode mockup
343
- * node; the other three are not — named individually below, per this
344
- * file's derived-marker convention. */
345
- --sidebar: #f1f5f9;
346
- /* derived (dark only): follows dark --muted-foreground. */
347
- --sidebar-foreground: #64748b;
443
+ /* Sidebar Navigation block. Read by the kit's Sidebar parts and offered
444
+ * for a consumer's own navigation chrome alike. The rebrand frame draws
445
+ * no sidebar entries, so the whole block is derived from the same-role
446
+ * tokens above: sidebar follows --muted, its foreground follows
447
+ * --muted-foreground, the active-item fill takes --surface (light) /
448
+ * --selection-subtle's value (dark), its foreground follows --foreground,
449
+ * and the border follows --border-strong — NOT --border, whose light
450
+ * value is the panel fill itself, which would erase SidebarSeparator,
451
+ * the menu-sub rail and the floating variant's outline (1.20:1 against
452
+ * the panel instead; dark's collapsed border family is border-strong
453
+ * already). tokens.test.ts pins the border/panel separation. */
454
+ --sidebar: #e2e8f0;
455
+ --sidebar-foreground: #334155;
348
456
  --sidebar-accent: #ffffff;
349
- /* derived (dark only): follows dark --foreground. */
350
457
  --sidebar-accent-foreground: #0f172a;
351
- /* derived (dark only): follows dark --border. */
352
- --sidebar-border: #e2e8f0;
458
+ --sidebar-border: #cbd5e1;
353
459
 
354
460
  /* Also palette-only: the kit ships no code/pre component, so these exist
355
- * for a consumer rendering code blocks beside kit parts. */
461
+ * for a consumer rendering code blocks beside kit parts. The foreground
462
+ * is the frame's own (the light collapse onto slate-600, see
463
+ * --muted-foreground); derived (both modes): the fill takes the page
464
+ * --background value, which reads one step darker than any surface a
465
+ * code block sits on. */
356
466
  --code-background: #f1f5f9;
357
467
  --code-foreground: #334155;
358
468
 
@@ -367,49 +477,55 @@
367
477
 
368
478
  [data-theme='dark'] {
369
479
  --background: #090b10;
370
- --foreground: #f6f7f9;
371
- --surface: #0f131b;
372
- --surface-elevated: #131824;
373
- --card: #111722;
374
- --card-hover: #151c29;
375
- --card-foreground: #f6f7f9;
376
- --popover: #131824;
377
- --popover-foreground: #f6f7f9;
378
- --primary: #7c4fde;
379
- --primary-hover: #8257e6;
480
+ --foreground: #ffffff;
481
+ /* The rebrand frame draws surface and surface-elevated COLLAPSED onto
482
+ * one slate-900 (overlays separate via --popover-border/-shadow, not
483
+ * fill) — adopted as drawn; see the light block's comment. */
484
+ --surface: #0f172a;
485
+ --surface-elevated: #0f172a;
486
+ --card: #0f172a;
487
+ --card-hover: #182338;
488
+ --card-foreground: #ffffff;
489
+ --popover: #0f172a;
490
+ --popover-foreground: #ffffff;
491
+ --primary: #0065e3;
492
+ --primary-hover: #2668c5;
380
493
  --primary-foreground: #ffffff;
381
- --primary-ring: #a78bfa;
494
+ --primary-ring: #6ba5f0;
382
495
  --secondary: #1e293b;
383
- --secondary-foreground: #f8fafc;
496
+ --secondary-foreground: #ffffff;
384
497
  --muted: #1e293b;
385
- --muted-foreground: #8d96a8;
386
- --subtle-foreground: #7a8396;
387
- --accent: #2e1065;
388
- --accent-foreground: #ede9fe;
389
- --selection-subtle: #1c2d3f;
390
- --destructive: #d63853;
498
+ --muted-foreground: #94a3b8;
499
+ --subtle-foreground: #94a3b8;
500
+ --accent: #00204d;
501
+ --accent-foreground: #e6effa;
502
+ --selection-subtle: #26384b;
503
+ --destructive: #e11d48;
391
504
  --destructive-foreground: #ffffff;
505
+ --destructive-hover: #be123c;
392
506
  --destructive-ring: #f87f8f;
393
- --link-foreground: #a78bfa;
507
+ --link-foreground: #6ba5f0;
394
508
  --success: #34d399;
395
509
  --success-soft: #0d2921;
396
- --warning: #fbbf24;
397
- --warning-soft: #2e240a;
398
- --danger: #d63853;
399
- --danger-soft: #2b1119;
400
- --info: #22d3ee;
401
- --info-soft: #06262b;
402
- --blue: #60a5fa;
403
- --border: #222a38;
404
- --border-strong: #303a4d;
405
- --input: #303a4d;
406
- --ring: #7c4fde;
407
- --sidebar: #0c0f15;
408
- --sidebar-foreground: #8d96a8;
409
- --sidebar-accent: #172033;
410
- --sidebar-accent-foreground: #f6f7f9;
411
- --sidebar-border: #222a38;
412
- --code-background: #0b1220;
510
+ --warning: #f6c453;
511
+ --warning-soft: #2b1e04;
512
+ --danger: #fb7185;
513
+ --danger-soft: #32111b;
514
+ --info: #60a5fa;
515
+ --info-soft: #111e2d;
516
+ --blue: #6ba5f0;
517
+ /* The frame draws border and border-strong collapsed onto one slate-600
518
+ * in dark; --input follows border-strong as in light. */
519
+ --border: #334155;
520
+ --border-strong: #334155;
521
+ --input: #334155;
522
+ --ring: #6ba5f0;
523
+ --sidebar: #1e293b;
524
+ --sidebar-foreground: #94a3b8;
525
+ --sidebar-accent: #26384b;
526
+ --sidebar-accent-foreground: #ffffff;
527
+ --sidebar-border: #334155;
528
+ --code-background: #090b10;
413
529
  --code-foreground: #e2e8f0;
414
530
 
415
531
  /* See the light block's color-scheme comment above for why this exists. */
@@ -419,49 +535,50 @@
419
535
  @media (prefers-color-scheme: dark) {
420
536
  :root:not([data-theme='light']) {
421
537
  --background: #090b10;
422
- --foreground: #f6f7f9;
423
- --surface: #0f131b;
424
- --surface-elevated: #131824;
425
- --card: #111722;
426
- --card-hover: #151c29;
427
- --card-foreground: #f6f7f9;
428
- --popover: #131824;
429
- --popover-foreground: #f6f7f9;
430
- --primary: #7c4fde;
431
- --primary-hover: #8257e6;
538
+ --foreground: #ffffff;
539
+ --surface: #0f172a;
540
+ --surface-elevated: #0f172a;
541
+ --card: #0f172a;
542
+ --card-hover: #182338;
543
+ --card-foreground: #ffffff;
544
+ --popover: #0f172a;
545
+ --popover-foreground: #ffffff;
546
+ --primary: #0065e3;
547
+ --primary-hover: #2668c5;
432
548
  --primary-foreground: #ffffff;
433
- --primary-ring: #a78bfa;
549
+ --primary-ring: #6ba5f0;
434
550
  --secondary: #1e293b;
435
- --secondary-foreground: #f8fafc;
551
+ --secondary-foreground: #ffffff;
436
552
  --muted: #1e293b;
437
- --muted-foreground: #8d96a8;
438
- --subtle-foreground: #7a8396;
439
- --accent: #2e1065;
440
- --accent-foreground: #ede9fe;
441
- --selection-subtle: #1c2d3f;
442
- --destructive: #d63853;
553
+ --muted-foreground: #94a3b8;
554
+ --subtle-foreground: #94a3b8;
555
+ --accent: #00204d;
556
+ --accent-foreground: #e6effa;
557
+ --selection-subtle: #26384b;
558
+ --destructive: #e11d48;
443
559
  --destructive-foreground: #ffffff;
560
+ --destructive-hover: #be123c;
444
561
  --destructive-ring: #f87f8f;
445
- --link-foreground: #a78bfa;
562
+ --link-foreground: #6ba5f0;
446
563
  --success: #34d399;
447
564
  --success-soft: #0d2921;
448
- --warning: #fbbf24;
449
- --warning-soft: #2e240a;
450
- --danger: #d63853;
451
- --danger-soft: #2b1119;
452
- --info: #22d3ee;
453
- --info-soft: #06262b;
454
- --blue: #60a5fa;
455
- --border: #222a38;
456
- --border-strong: #303a4d;
457
- --input: #303a4d;
458
- --ring: #7c4fde;
459
- --sidebar: #0c0f15;
460
- --sidebar-foreground: #8d96a8;
461
- --sidebar-accent: #172033;
462
- --sidebar-accent-foreground: #f6f7f9;
463
- --sidebar-border: #222a38;
464
- --code-background: #0b1220;
565
+ --warning: #f6c453;
566
+ --warning-soft: #2b1e04;
567
+ --danger: #fb7185;
568
+ --danger-soft: #32111b;
569
+ --info: #60a5fa;
570
+ --info-soft: #111e2d;
571
+ --blue: #6ba5f0;
572
+ --border: #334155;
573
+ --border-strong: #334155;
574
+ --input: #334155;
575
+ --ring: #6ba5f0;
576
+ --sidebar: #1e293b;
577
+ --sidebar-foreground: #94a3b8;
578
+ --sidebar-accent: #26384b;
579
+ --sidebar-accent-foreground: #ffffff;
580
+ --sidebar-border: #334155;
581
+ --code-background: #090b10;
465
582
  --code-foreground: #e2e8f0;
466
583
 
467
584
  /* See the light block's color-scheme comment above for why this exists. */