@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.
- package/dist/alert.js +11 -11
- package/dist/attachment.js +20 -20
- package/dist/avatar.js +39 -39
- package/dist/badge.js +15 -15
- package/dist/bubble.js +31 -31
- package/dist/button.js +28 -28
- package/dist/chunks/alert.C5BedF7l.css +1 -0
- package/dist/chunks/attachment.GAZbWSyB.css +1 -0
- package/dist/chunks/avatar.DZUXl1ev.css +1 -0
- package/dist/chunks/badge.Bi22h20j.css +1 -0
- package/dist/chunks/bubble.DvN6QyQ1.css +1 -0
- package/dist/chunks/button.DvAxXxKj.css +1 -0
- package/dist/chunks/context-menu.DwGCD0vN.css +1 -0
- package/dist/chunks/data-table.CtZdVSAU.css +1 -0
- package/dist/chunks/dropdown-menu.C5TLD9JO.css +1 -0
- package/dist/chunks/empty.BlhsHrOz.css +1 -0
- package/dist/chunks/field.Ccqt897k.css +1 -0
- package/dist/chunks/item.BkcgydVc.css +1 -0
- package/dist/chunks/questionnaire.D-u_K3Co.css +1 -0
- package/dist/chunks/table.BpnQ6j85.css +1 -0
- package/dist/chunks/tabs.4MEFBvw-.css +1 -0
- package/dist/chunks/toast.uUtCEAiv.css +1 -0
- package/dist/context-menu.js +62 -62
- package/dist/data-table.js +26 -26
- package/dist/docs/badge.md +7 -8
- package/dist/docs/questionnaire.md +4 -4
- package/dist/docs/sidebar.md +2 -2
- package/dist/dropdown-menu.js +65 -65
- package/dist/empty.js +18 -18
- package/dist/field.js +10 -10
- package/dist/item.js +20 -20
- package/dist/questionnaire.js +77 -77
- package/dist/table.js +23 -23
- package/dist/tabs.js +17 -17
- package/dist/theme.css +359 -242
- package/dist/toast.js +50 -50
- package/package.json +1 -1
- package/dist/chunks/alert.BJLRcB65.css +0 -1
- package/dist/chunks/attachment.rknKEWlr.css +0 -1
- package/dist/chunks/avatar.CsQmQnay.css +0 -1
- package/dist/chunks/badge.DR0epAiZ.css +0 -1
- package/dist/chunks/bubble.BKcAopT7.css +0 -1
- package/dist/chunks/button.D69BdJF1.css +0 -1
- package/dist/chunks/context-menu.Bjib7_AL.css +0 -1
- package/dist/chunks/data-table.DECm3qI-.css +0 -1
- package/dist/chunks/dropdown-menu.CDaeWYDT.css +0 -1
- package/dist/chunks/empty.B334jSES.css +0 -1
- package/dist/chunks/field.yTrg1G90.css +0 -1
- package/dist/chunks/item.CLg1KaYF.css +0 -1
- package/dist/chunks/questionnaire.DYnuWKAQ.css +0 -1
- package/dist/chunks/table.CFAJfhd-.css +0 -1
- package/dist/chunks/tabs.C4jGj2Vg.css +0 -1
- 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
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
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
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
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
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
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
|
|
65
|
-
*
|
|
66
|
-
*
|
|
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 (
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
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)
|
|
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
|
|
88
|
-
* 8px base — note md, not lg, sits at the
|
|
89
|
-
* derivation. --radius-xs has no Figma
|
|
90
|
-
* Studio scale and keeps its 4px slot.
|
|
91
|
-
* concern, so none of this is redefined
|
|
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).
|
|
116
|
-
*
|
|
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
|
|
146
|
-
*
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
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
|
|
154
|
-
*
|
|
155
|
-
*
|
|
156
|
-
*
|
|
157
|
-
*
|
|
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:
|
|
163
|
-
--text-display-size: 1.
|
|
164
|
-
--text-display-line-height:
|
|
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:
|
|
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:
|
|
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:
|
|
177
|
-
/* Body:
|
|
178
|
-
|
|
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:
|
|
183
|
-
--text-label-size: 0.
|
|
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:
|
|
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:
|
|
192
|
-
/* Mono:
|
|
193
|
-
|
|
194
|
-
--text-mono-
|
|
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: #
|
|
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
|
|
206
|
-
*
|
|
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
|
-
|
|
220
|
-
|
|
221
|
-
*
|
|
222
|
-
|
|
223
|
-
--primary-hover: #
|
|
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:
|
|
227
|
-
* no comment of their own — per this file's
|
|
228
|
-
* comment lives in the light block only). Literal
|
|
229
|
-
* aliases, because the contrast tests parse hex
|
|
230
|
-
* src/__test-utils__/contrast.ts).
|
|
231
|
-
*
|
|
232
|
-
*
|
|
233
|
-
*
|
|
234
|
-
|
|
235
|
-
|
|
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
|
|
238
|
-
*
|
|
239
|
-
|
|
240
|
-
|
|
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).
|
|
245
|
-
*
|
|
246
|
-
*
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* --
|
|
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: #
|
|
255
|
-
|
|
256
|
-
|
|
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
|
|
262
|
-
*
|
|
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
|
-
*
|
|
267
|
-
*
|
|
268
|
-
*
|
|
269
|
-
*
|
|
270
|
-
* (14.2:1 light,
|
|
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
|
|
275
|
-
* one red, two names, both overridable separately.
|
|
276
|
-
*
|
|
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:
|
|
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
|
|
288
|
-
* counterpart to align to
|
|
289
|
-
*
|
|
290
|
-
*
|
|
291
|
-
*
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
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: #
|
|
388
|
+
--link-foreground: #2668c5;
|
|
300
389
|
|
|
301
390
|
/* Status colors with their -soft fills. The status colors themselves are
|
|
302
|
-
* consumed
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
*
|
|
309
|
-
*
|
|
310
|
-
*
|
|
311
|
-
*
|
|
312
|
-
*
|
|
313
|
-
|
|
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: #
|
|
316
|
-
--warning-soft: #
|
|
317
|
-
--danger: #
|
|
416
|
+
--warning: #b45309;
|
|
417
|
+
--warning-soft: #fff7d6;
|
|
418
|
+
--danger: #be123c;
|
|
318
419
|
--danger-soft: #fff1f2;
|
|
319
|
-
--info: #
|
|
320
|
-
--info-soft: #
|
|
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
|
-
*
|
|
325
|
-
*
|
|
326
|
-
|
|
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
|
|
331
|
-
*
|
|
332
|
-
*
|
|
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
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
--ring: #
|
|
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.
|
|
340
|
-
*
|
|
341
|
-
*
|
|
342
|
-
*
|
|
343
|
-
*
|
|
344
|
-
*
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
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
|
-
|
|
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: #
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
--
|
|
375
|
-
--
|
|
376
|
-
--
|
|
377
|
-
--
|
|
378
|
-
--
|
|
379
|
-
--
|
|
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: #
|
|
494
|
+
--primary-ring: #6ba5f0;
|
|
382
495
|
--secondary: #1e293b;
|
|
383
|
-
--secondary-foreground: #
|
|
496
|
+
--secondary-foreground: #ffffff;
|
|
384
497
|
--muted: #1e293b;
|
|
385
|
-
--muted-foreground: #
|
|
386
|
-
--subtle-foreground: #
|
|
387
|
-
--accent: #
|
|
388
|
-
--accent-foreground: #
|
|
389
|
-
--selection-subtle: #
|
|
390
|
-
--destructive: #
|
|
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: #
|
|
507
|
+
--link-foreground: #6ba5f0;
|
|
394
508
|
--success: #34d399;
|
|
395
509
|
--success-soft: #0d2921;
|
|
396
|
-
--warning: #
|
|
397
|
-
--warning-soft: #
|
|
398
|
-
--danger: #
|
|
399
|
-
--danger-soft: #
|
|
400
|
-
--info: #
|
|
401
|
-
--info-soft: #
|
|
402
|
-
--blue: #
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
--
|
|
406
|
-
--
|
|
407
|
-
--
|
|
408
|
-
--
|
|
409
|
-
--sidebar
|
|
410
|
-
--sidebar-
|
|
411
|
-
--sidebar-
|
|
412
|
-
--
|
|
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: #
|
|
423
|
-
--surface: #
|
|
424
|
-
--surface-elevated: #
|
|
425
|
-
--card: #
|
|
426
|
-
--card-hover: #
|
|
427
|
-
--card-foreground: #
|
|
428
|
-
--popover: #
|
|
429
|
-
--popover-foreground: #
|
|
430
|
-
--primary: #
|
|
431
|
-
--primary-hover: #
|
|
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: #
|
|
549
|
+
--primary-ring: #6ba5f0;
|
|
434
550
|
--secondary: #1e293b;
|
|
435
|
-
--secondary-foreground: #
|
|
551
|
+
--secondary-foreground: #ffffff;
|
|
436
552
|
--muted: #1e293b;
|
|
437
|
-
--muted-foreground: #
|
|
438
|
-
--subtle-foreground: #
|
|
439
|
-
--accent: #
|
|
440
|
-
--accent-foreground: #
|
|
441
|
-
--selection-subtle: #
|
|
442
|
-
--destructive: #
|
|
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: #
|
|
562
|
+
--link-foreground: #6ba5f0;
|
|
446
563
|
--success: #34d399;
|
|
447
564
|
--success-soft: #0d2921;
|
|
448
|
-
--warning: #
|
|
449
|
-
--warning-soft: #
|
|
450
|
-
--danger: #
|
|
451
|
-
--danger-soft: #
|
|
452
|
-
--info: #
|
|
453
|
-
--info-soft: #
|
|
454
|
-
--blue: #
|
|
455
|
-
--border: #
|
|
456
|
-
--border-strong: #
|
|
457
|
-
--input: #
|
|
458
|
-
--ring: #
|
|
459
|
-
--sidebar: #
|
|
460
|
-
--sidebar-foreground: #
|
|
461
|
-
--sidebar-accent: #
|
|
462
|
-
--sidebar-accent-foreground: #
|
|
463
|
-
--sidebar-border: #
|
|
464
|
-
--code-background: #
|
|
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. */
|