@codecademy/gamut 68.7.1-alpha.77d9da.0 → 68.7.1-alpha.89ca82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -230,15 +230,15 @@ LX Studio extends Core with these differences:
|
|
|
230
230
|
|
|
231
231
|
**Semantic color overrides (light mode)**:
|
|
232
232
|
|
|
233
|
-
| Token | Core value
|
|
234
|
-
| -------------------- |
|
|
235
|
-
| `primary` | hyper-500
|
|
236
|
-
| `primary-hover` | hyper-400
|
|
237
|
-
| `feedback-success` | green-700
|
|
238
|
-
| `background-primary` | beige
|
|
239
|
-
| `shadow-primary` | navy-800
|
|
240
|
-
| `border-primary` | navy-800
|
|
241
|
-
| `border-disabled` | navy-500
|
|
233
|
+
| Token | Core value | LX Studio value |
|
|
234
|
+
| -------------------- | ----------- | ------------------- |
|
|
235
|
+
| `primary` | `hyper-500` | `sapphire` |
|
|
236
|
+
| `primary-hover` | `hyper-400` | `navy-800` |
|
|
237
|
+
| `feedback-success` | `green-700` | `lxStudioSuccess` |
|
|
238
|
+
| `background-primary` | `beige` | `lxStudioBgPrimary` |
|
|
239
|
+
| `shadow-primary` | navy-800 | navy-200 |
|
|
240
|
+
| `border-primary` | navy-800 | navy-400 |
|
|
241
|
+
| `border-disabled` | navy-500 | navy-300 |
|
|
242
242
|
|
|
243
243
|
---
|
|
244
244
|
|
|
@@ -248,55 +248,55 @@ Use these token names when specifying colors in designs. They resolve to the cor
|
|
|
248
248
|
|
|
249
249
|
### Text
|
|
250
250
|
|
|
251
|
-
| Token | Light
|
|
252
|
-
| ---------------- |
|
|
253
|
-
| `text` | navy-800
|
|
254
|
-
| `text-accent` | navy-900
|
|
255
|
-
| `text-secondary` | navy-800 at 75%
|
|
256
|
-
| `text-disabled` | navy-800 at 63%
|
|
251
|
+
| Token | Light | Dark | Use for |
|
|
252
|
+
| ---------------- | --------------- | ------------ | --------------------------- |
|
|
253
|
+
| `text` | `navy-800` | `white` | Default body and UI text |
|
|
254
|
+
| `text-accent` | `navy-900` | `beige` | Stronger emphasis text |
|
|
255
|
+
| `text-secondary` | navy-800 at 75% | white at 65% | Supporting / secondary copy |
|
|
256
|
+
| `text-disabled` | navy-800 at 63% | white at 50% | Disabled state labels |
|
|
257
257
|
|
|
258
258
|
### Background
|
|
259
259
|
|
|
260
|
-
| Token | Light
|
|
261
|
-
| --------------------- |
|
|
262
|
-
| `background` | white
|
|
263
|
-
| `background-primary` | beige
|
|
264
|
-
| `background-contrast` | white
|
|
265
|
-
| `background-selected` | navy-800 at 4%
|
|
266
|
-
| `background-hover` | navy-800 at 12%
|
|
267
|
-
| `background-disabled` | navy-800 at 12%
|
|
268
|
-
| `background-success` | green-0
|
|
269
|
-
| `background-warning` | yellow-0
|
|
270
|
-
| `background-error` | red-0
|
|
260
|
+
| Token | Light | Dark | Use for |
|
|
261
|
+
| --------------------- | --------------- | ------------ | --------------------------------- |
|
|
262
|
+
| `background` | `white` | `navy-800` | Default page/component background |
|
|
263
|
+
| `background-primary` | `beige` | `navy-900` | Slightly elevated surfaces |
|
|
264
|
+
| `background-contrast` | `white` | `black` | Maximum contrast surface |
|
|
265
|
+
| `background-selected` | navy-800 at 4% | white at 4% | Selected row / item |
|
|
266
|
+
| `background-hover` | navy-800 at 12% | white at 9% | Hover state overlay |
|
|
267
|
+
| `background-disabled` | navy-800 at 12% | white at 9% | Disabled surface |
|
|
268
|
+
| `background-success` | `green-0` | `green-900` | Success state container |
|
|
269
|
+
| `background-warning` | `yellow-0` | `yellow-900` | Warning state container |
|
|
270
|
+
| `background-error` | `red-0` | `red-900` | Error state container |
|
|
271
271
|
|
|
272
272
|
### Interactive
|
|
273
273
|
|
|
274
|
-
| Token | Light
|
|
275
|
-
| ----------------- |
|
|
276
|
-
| `primary` | hyper-500
|
|
277
|
-
| `primary-hover` | hyper-400
|
|
278
|
-
| `primary-inverse` | yellow-500
|
|
279
|
-
| `secondary` | navy-800
|
|
280
|
-
| `secondary-hover` | navy-800 at 86%
|
|
281
|
-
| `danger` | red-500
|
|
282
|
-
| `danger-hover` | red-600
|
|
274
|
+
| Token | Light | Dark | Use for |
|
|
275
|
+
| ----------------- | --------------- | ------------ | ------------------------------------ |
|
|
276
|
+
| `primary` | `hyper-500` | `yellow-500` | Primary CTA, links, focus rings |
|
|
277
|
+
| `primary-hover` | `hyper-400` | `yellow-400` | Hover state of primary interactive |
|
|
278
|
+
| `primary-inverse` | `yellow-500` | `hyper-500` | Primary on a colored background |
|
|
279
|
+
| `secondary` | `navy-800` | `white` | Secondary CTA, ghost buttons |
|
|
280
|
+
| `secondary-hover` | navy-800 at 86% | white at 80% | Hover state of secondary interactive |
|
|
281
|
+
| `danger` | `red-500` | `red-300` | Destructive actions, error states |
|
|
282
|
+
| `danger-hover` | `red-600` | `red-400` | Hover on danger interactive |
|
|
283
283
|
|
|
284
284
|
### Border
|
|
285
285
|
|
|
286
|
-
| Token | Light
|
|
287
|
-
| ------------------ |
|
|
288
|
-
| `border-primary` | navy-800
|
|
289
|
-
| `border-secondary` | navy-800 at 75%
|
|
290
|
-
| `border-tertiary` | navy-800 at 28%
|
|
291
|
-
| `border-disabled` | navy-800 at 63%
|
|
286
|
+
| Token | Light | Dark | Use for |
|
|
287
|
+
| ------------------ | --------------- | ------------ | -------------------------- |
|
|
288
|
+
| `border-primary` | `navy-800` | `white` | Strong borders, dividers |
|
|
289
|
+
| `border-secondary` | navy-800 at 75% | white at 65% | Medium-weight borders |
|
|
290
|
+
| `border-tertiary` | navy-800 at 28% | white at 20% | Subtle borders, separators |
|
|
291
|
+
| `border-disabled` | navy-800 at 63% | white at 50% | Disabled input borders |
|
|
292
292
|
|
|
293
293
|
### Feedback
|
|
294
294
|
|
|
295
|
-
| Token | Light
|
|
296
|
-
| ------------------ |
|
|
297
|
-
| `feedback-error` | red-600
|
|
298
|
-
| `feedback-success` | green-700
|
|
299
|
-
| `feedback-warning` | yellow
|
|
295
|
+
| Token | Light | Dark | Use for |
|
|
296
|
+
| ------------------ | ----------- | ----------- | -------------------------------- |
|
|
297
|
+
| `feedback-error` | `red-600` | `red-300` | Error messages, validation |
|
|
298
|
+
| `feedback-success` | `green-700` | `green-400` | Success messages, confirmations |
|
|
299
|
+
| `feedback-warning` | `yellow` | `yellow-0` | Warning messages, caution states |
|
|
300
300
|
|
|
301
301
|
### Shadow
|
|
302
302
|
|
|
@@ -313,32 +313,32 @@ All colors available as static tokens regardless of color mode. Use these only w
|
|
|
313
313
|
|
|
314
314
|
### Core Palette
|
|
315
315
|
|
|
316
|
-
| Name | Weights available | Notes
|
|
317
|
-
| --------------- | ---------------------------- |
|
|
318
|
-
| `navy` | 100–900 | 100–700 are rgba transparencies of
|
|
319
|
-
| `white` | 100–700 | rgba transparencies of
|
|
320
|
-
| `blue` | 0, 100, 300, 400, 500, 800 |
|
|
321
|
-
| `hyper` | 400, 500 |
|
|
322
|
-
| `green` | 0, 100, 400, 700, 900 |
|
|
323
|
-
| `yellow` | 0, 400, 500, 900 |
|
|
324
|
-
| `red` | 0, 300, 400, 500, 600, 900 |
|
|
325
|
-
| `gray` | 100, 200, 300, 600, 800, 900 |
|
|
326
|
-
| `pink` | 0, 400 |
|
|
327
|
-
| `orange` | 100, 500 |
|
|
328
|
-
| `beige` | 100 (alias: `beige`) |
|
|
329
|
-
| `black` | — |
|
|
330
|
-
| `white` (solid) | — |
|
|
316
|
+
| Name | Weights available | Notes |
|
|
317
|
+
| --------------- | ---------------------------- | -------------------------------------------------------------------------- |
|
|
318
|
+
| `navy` | 100–900 | 100–700 are rgba transparencies of `navy-800`; 800 and 900 are solid |
|
|
319
|
+
| `white` | 100–700 | rgba transparencies of `white` (no solid white weight — use `white` token) |
|
|
320
|
+
| `blue` | 0, 100, 300, 400, 500, 800 | named alias `blue` maps to `blue-500` |
|
|
321
|
+
| `hyper` | 400, 500 | named alias `hyper` maps to `hyper-500` |
|
|
322
|
+
| `green` | 0, 100, 400, 700, 900 | named alias `green` maps to `green-700` |
|
|
323
|
+
| `yellow` | 0, 400, 500, 900 | named alias `yellow` maps to `yellow-500` |
|
|
324
|
+
| `red` | 0, 300, 400, 500, 600, 900 | named alias `red` maps to `red-500` |
|
|
325
|
+
| `gray` | 100, 200, 300, 600, 800, 900 | |
|
|
326
|
+
| `pink` | 0, 400 | named alias `pink` maps to `pink-400` |
|
|
327
|
+
| `orange` | 100, 500 | named alias `orange` maps to `orange-500` |
|
|
328
|
+
| `beige` | 100 (alias: `beige`) | solid `beige` token |
|
|
329
|
+
| `black` | — | `black` token |
|
|
330
|
+
| `white` (solid) | — | `white` token |
|
|
331
331
|
|
|
332
332
|
**Named aliases** (shorthand for common weights):
|
|
333
333
|
`beige`, `blue`, `green`, `hyper`, `lightBlue`, `lightGreen`, `navy`, `orange`, `paleBlue`, `paleGreen`, `palePink`, `paleRed`, `paleYellow`, `pink`, `red`, `yellow`, `black`, `white`
|
|
334
334
|
|
|
335
335
|
### Platform-only additions
|
|
336
336
|
|
|
337
|
-
`lightBeige
|
|
337
|
+
`lightBeige`, `gold`, `teal`, `purple` (Platform theme palette)
|
|
338
338
|
|
|
339
339
|
### LX Studio additions
|
|
340
340
|
|
|
341
|
-
`sapphire
|
|
341
|
+
`sapphire`, `lxStudioSuccess`, `lxStudioBgPrimary` (LX Studio theme palette)
|
|
342
342
|
|
|
343
343
|
---
|
|
344
344
|
|
|
@@ -602,8 +602,8 @@ Quick color/token reference for generating or specifying UI:
|
|
|
602
602
|
|
|
603
603
|
| Scenario | Tokens |
|
|
604
604
|
| ---------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
605
|
-
| Primary button (light) | `bg: primary
|
|
606
|
-
| Primary button (dark) | `bg: primary
|
|
605
|
+
| Primary button (light) | `bg: primary`, `color: white`, `hover: primary-hover` |
|
|
606
|
+
| Primary button (dark) | `bg: primary`, `color: text`, `hover: primary-hover` |
|
|
607
607
|
| Body text | `color: text`, `font: base (Apercu Pro)`, `size: 16px`, `weight: 400`, `lineHeight: base (1.5)` |
|
|
608
608
|
| Headline | `color: text-accent`, `font: base`, `size: 34–64px`, `weight: title (700)`, `lineHeight: title (1.2)` |
|
|
609
609
|
| Caption / label | `color: text-secondary`, `font: accent (Suisse Int'l Mono)`, `size: 14px` |
|
|
@@ -164,64 +164,64 @@ Use these token names when specifying colors. LX Studio is light mode only — t
|
|
|
164
164
|
|
|
165
165
|
### Text
|
|
166
166
|
|
|
167
|
-
| Token |
|
|
168
|
-
| ---------------- |
|
|
169
|
-
| `text` |
|
|
170
|
-
| `text-accent` |
|
|
171
|
-
| `text-secondary` | navy-600
|
|
172
|
-
| `text-disabled` | navy-500
|
|
167
|
+
| Token | Resolves to | Use for |
|
|
168
|
+
| ---------------- | ----------- | --------------------------- |
|
|
169
|
+
| `text` | `navy-800` | Default body and UI text |
|
|
170
|
+
| `text-accent` | `navy-900` | Stronger emphasis text |
|
|
171
|
+
| `text-secondary` | `navy-600` | Supporting / secondary copy |
|
|
172
|
+
| `text-disabled` | `navy-500` | Disabled state labels |
|
|
173
173
|
|
|
174
174
|
### Background
|
|
175
175
|
|
|
176
|
-
| Token |
|
|
177
|
-
| --------------------- |
|
|
178
|
-
| `background` |
|
|
179
|
-
| `background-primary` |
|
|
180
|
-
| `background-contrast` |
|
|
181
|
-
| `background-selected` | navy-100
|
|
182
|
-
| `background-hover` | navy-200
|
|
183
|
-
| `background-disabled` | navy-200
|
|
184
|
-
| `background-success` |
|
|
185
|
-
| `background-warning` |
|
|
186
|
-
| `background-error` |
|
|
176
|
+
| Token | Resolves to | Use for |
|
|
177
|
+
| --------------------- | ------------------- | --------------------------------- |
|
|
178
|
+
| `background` | `white` | Default page/component background |
|
|
179
|
+
| `background-primary` | `lxStudioBgPrimary` | Slightly elevated surfaces |
|
|
180
|
+
| `background-contrast` | `white` | Maximum contrast surface |
|
|
181
|
+
| `background-selected` | `navy-100` | Selected row / item |
|
|
182
|
+
| `background-hover` | `navy-200` | Hover state overlay |
|
|
183
|
+
| `background-disabled` | `navy-200` | Disabled surface |
|
|
184
|
+
| `background-success` | `green-0` | Success state container |
|
|
185
|
+
| `background-warning` | `yellow-0` | Warning state container |
|
|
186
|
+
| `background-error` | `red-0` | Error state container |
|
|
187
187
|
|
|
188
188
|
### Interactive
|
|
189
189
|
|
|
190
|
-
| Token |
|
|
191
|
-
| ----------------- |
|
|
192
|
-
| `primary` |
|
|
193
|
-
| `primary-hover` |
|
|
194
|
-
| `primary-inverse` |
|
|
195
|
-
| `secondary` |
|
|
196
|
-
| `secondary-hover` | navy-700
|
|
197
|
-
| `danger` |
|
|
198
|
-
| `danger-hover` |
|
|
190
|
+
| Token | Resolves to | Use for |
|
|
191
|
+
| ----------------- | ------------ | ------------------------------------ |
|
|
192
|
+
| `primary` | `sapphire` | Primary CTA, links, focus rings |
|
|
193
|
+
| `primary-hover` | `navy-800` | Hover state of primary interactive |
|
|
194
|
+
| `primary-inverse` | `yellow-500` | Primary on a colored background |
|
|
195
|
+
| `secondary` | `navy-800` | Secondary CTA, ghost buttons |
|
|
196
|
+
| `secondary-hover` | `navy-700` | Hover state of secondary interactive |
|
|
197
|
+
| `danger` | `red-500` | Destructive actions, error states |
|
|
198
|
+
| `danger-hover` | `red-600` | Hover on danger interactive |
|
|
199
199
|
|
|
200
200
|
### Border
|
|
201
201
|
|
|
202
|
-
| Token |
|
|
203
|
-
| ------------------ |
|
|
204
|
-
| `border-primary` | navy-400
|
|
205
|
-
| `border-secondary` | navy-600
|
|
206
|
-
| `border-tertiary` |
|
|
207
|
-
| `border-disabled` | navy-300
|
|
202
|
+
| Token | Resolves to | Use for |
|
|
203
|
+
| ------------------ | ----------- | ------------------------------- |
|
|
204
|
+
| `border-primary` | `navy-400` | Standard input and card borders |
|
|
205
|
+
| `border-secondary` | `navy-600` | Medium-weight borders |
|
|
206
|
+
| `border-tertiary` | `navy-800` | Strong structural borders |
|
|
207
|
+
| `border-disabled` | `navy-300` | Disabled input borders |
|
|
208
208
|
|
|
209
209
|
LX Studio's `border-primary` is mid-gray (navy-400) rather than Core's near-black navy-800 — borders are softer and less prominent.
|
|
210
210
|
|
|
211
211
|
### Feedback
|
|
212
212
|
|
|
213
|
-
| Token |
|
|
214
|
-
| ------------------ |
|
|
215
|
-
| `feedback-error` |
|
|
216
|
-
| `feedback-success` |
|
|
217
|
-
| `feedback-warning` |
|
|
213
|
+
| Token | Resolves to | Use for |
|
|
214
|
+
| ------------------ | ----------------- | -------------------------------- |
|
|
215
|
+
| `feedback-error` | `red-600` | Error messages, validation |
|
|
216
|
+
| `feedback-success` | `lxStudioSuccess` | Success messages, confirmations |
|
|
217
|
+
| `feedback-warning` | `yellow-500` | Warning messages, caution states |
|
|
218
218
|
|
|
219
219
|
### Shadow
|
|
220
220
|
|
|
221
|
-
| Token |
|
|
222
|
-
| ------------------ |
|
|
223
|
-
| `shadow-primary` | navy-200
|
|
224
|
-
| `shadow-secondary` | navy-600
|
|
221
|
+
| Token | Resolves to |
|
|
222
|
+
| ------------------ | ----------- |
|
|
223
|
+
| `shadow-primary` | `navy-200` |
|
|
224
|
+
| `shadow-secondary` | `navy-600` |
|
|
225
225
|
|
|
226
226
|
LX Studio shadows are soft — use `shadow-primary` for standard elevated surfaces. This matches Percipio's shadow weight, not Core's hard navy-800 shadow.
|
|
227
227
|
|
|
@@ -231,11 +231,11 @@ LX Studio shadows are soft — use `shadow-primary` for standard elevated surfac
|
|
|
231
231
|
|
|
232
232
|
LX Studio adds named colors to the core palette. Use semantic aliases in code, not these raw names.
|
|
233
233
|
|
|
234
|
-
|
|
|
235
|
-
| ------------------- |
|
|
236
|
-
| `sapphire` |
|
|
237
|
-
| `lxStudioSuccess` |
|
|
238
|
-
| `lxStudioBgPrimary` |
|
|
234
|
+
| Palette token | Semantic alias(es) |
|
|
235
|
+
| ------------------- | -------------------- |
|
|
236
|
+
| `sapphire` | `primary` |
|
|
237
|
+
| `lxStudioSuccess` | `feedback-success` |
|
|
238
|
+
| `lxStudioBgPrimary` | `background-primary` |
|
|
239
239
|
|
|
240
240
|
The full core swatch palette (navy, hyper, blue, green, yellow, red, etc.) is also available. Raw swatches should only be used for fixed colors that must not adapt (illustrations, data viz, etc.).
|
|
241
241
|
|
|
@@ -369,9 +369,9 @@ Same component library as Codecademy — all atoms, molecules, and organisms app
|
|
|
369
369
|
|
|
370
370
|
Key LX Studio-specific visual differences:
|
|
371
371
|
|
|
372
|
-
- `FillButton` uses
|
|
373
|
-
- `FillButton` hover
|
|
374
|
-
- `Checkbox` / `Toggle` use hyper-500
|
|
372
|
+
- `FillButton` uses `primary` (`sapphire`) instead of Core `hyper-500`
|
|
373
|
+
- `FillButton` hover uses `primary-hover` (`navy-800`) — darker on hover
|
|
374
|
+
- `Checkbox` / `Toggle` use palette `hyper-500` (not `primary`)
|
|
375
375
|
- All interactive elements have `borderRadius: md` (8px) instead of Core's 4px
|
|
376
376
|
- `Card` shadows use navy-200 (soft) rather than navy-800 (hard)
|
|
377
377
|
- No `Card-beige` variant — LX Studio `background-primary` is off-white, not beige
|
|
@@ -383,7 +383,7 @@ Key LX Studio-specific visual differences:
|
|
|
383
383
|
### Colors
|
|
384
384
|
|
|
385
385
|
- **Do** use semantic color aliases (`primary`, `text`, `background`, etc.) — never hardcode hex values.
|
|
386
|
-
- **Do** use `primary`
|
|
386
|
+
- **Do** use `primary` (resolves to palette `sapphire`) for buttons and links.
|
|
387
387
|
- **Don't** attempt dark mode — LX Studio is light only.
|
|
388
388
|
- **Don't** use the Percipio or Codecademy primary blue/hyper colors directly; go through semantic aliases.
|
|
389
389
|
|
|
@@ -408,26 +408,26 @@ Key LX Studio-specific visual differences:
|
|
|
408
408
|
|
|
409
409
|
Quick color/token reference for generating or specifying LX Studio UI:
|
|
410
410
|
|
|
411
|
-
| Scenario | Tokens
|
|
412
|
-
| ---------------- |
|
|
413
|
-
| Primary button | `bg: primary
|
|
414
|
-
| Body text | `color: text
|
|
415
|
-
| Headline | `color: text-accent
|
|
416
|
-
| Secondary text | `color: text-secondary
|
|
417
|
-
| Disabled text | `color: text-disabled
|
|
418
|
-
| Elevated surface | `bg: background-primary
|
|
419
|
-
| Card default | `bg: background
|
|
420
|
-
| Error state | `color: feedback-error
|
|
421
|
-
| Success state | `color: feedback-success
|
|
422
|
-
| Warning state | `color: feedback-warning
|
|
423
|
-
| Disabled state | `color: text-disabled
|
|
411
|
+
| Scenario | Tokens |
|
|
412
|
+
| ---------------- | -------------------------------------------------------------------------------------------------- |
|
|
413
|
+
| Primary button | `bg: primary`, `color: white`, `hover: primary-hover`, `borderRadius: md` |
|
|
414
|
+
| Body text | `color: text`, `font: base`, `size: 16`, `weight: 400`, `lineHeight: base` |
|
|
415
|
+
| Headline | `color: text-accent`, `font: base`, `size: 34–64`, `weight: title`, `lineHeight: title` |
|
|
416
|
+
| Secondary text | `color: text-secondary` |
|
|
417
|
+
| Disabled text | `color: text-disabled` |
|
|
418
|
+
| Elevated surface | `bg: background-primary` |
|
|
419
|
+
| Card default | `bg: background`, `borderRadius: none` — add `isInteractive` for hover shadow + `borderRadius: md` |
|
|
420
|
+
| Error state | `color: feedback-error`, `bg: background-error`, `borderColor: danger` |
|
|
421
|
+
| Success state | `color: feedback-success`, `bg: background-success` |
|
|
422
|
+
| Warning state | `color: feedback-warning`, `bg: background-warning` |
|
|
423
|
+
| Disabled state | `color: text-disabled`, `bg: background-disabled`, `borderColor: border-disabled` |
|
|
424
424
|
|
|
425
425
|
### Component token cheatsheet
|
|
426
426
|
|
|
427
427
|
```
|
|
428
|
-
FillButton → bg: primary
|
|
429
|
-
StrokeButton → bg: transparent,
|
|
430
|
-
Checkbox/Toggle → hyper-500
|
|
428
|
+
FillButton → bg: primary, color: white, hover: primary-hover, borderRadius: md
|
|
429
|
+
StrokeButton → bg: transparent, borderColor: secondary
|
|
430
|
+
Checkbox/Toggle → palette hyper-500, hover hyper-400, borderRadius: sm
|
|
431
431
|
Card → bg: background, shadow: shadow-primary (navy-200, soft), radius: none
|
|
432
432
|
Alert (error) → uses feedback-error + background-error
|
|
433
433
|
Alert (success) → uses feedback-success + background-success
|
|
@@ -154,63 +154,63 @@ Use these token names when specifying colors. Percipio is light mode only — th
|
|
|
154
154
|
|
|
155
155
|
### Text
|
|
156
156
|
|
|
157
|
-
| Token |
|
|
158
|
-
| ---------------- |
|
|
159
|
-
| `text` |
|
|
160
|
-
| `text-accent` |
|
|
161
|
-
| `text-secondary` | `
|
|
162
|
-
| `text-disabled` |
|
|
157
|
+
| Token | Resolves to | Use for |
|
|
158
|
+
| ---------------- | ----------------------- | ------------------------------------------------ |
|
|
159
|
+
| `text` | `percipioTextPrimary` | Default body and UI text |
|
|
160
|
+
| `text-accent` | `percipioTextPrimary` | Emphasis text (same value as `text` in Percipio) |
|
|
161
|
+
| `text-secondary` | `percipioTextSecondary` | Supporting / secondary copy |
|
|
162
|
+
| `text-disabled` | `percipioTextDisabled` | Disabled state labels |
|
|
163
163
|
|
|
164
164
|
### Background
|
|
165
165
|
|
|
166
|
-
| Token |
|
|
167
|
-
| --------------------- |
|
|
168
|
-
| `background` |
|
|
169
|
-
| `background-primary` |
|
|
170
|
-
| `background-selected` | navy-100
|
|
171
|
-
| `background-hover` | navy-200
|
|
172
|
-
| `background-disabled` | navy-200
|
|
173
|
-
| `background-success` |
|
|
174
|
-
| `background-warning` |
|
|
175
|
-
| `background-error` |
|
|
166
|
+
| Token | Resolves to | Use for |
|
|
167
|
+
| --------------------- | ------------------- | --------------------------------- |
|
|
168
|
+
| `background` | `white` | Default page/component background |
|
|
169
|
+
| `background-primary` | `percipioBgPrimary` | Slightly elevated surfaces |
|
|
170
|
+
| `background-selected` | `navy-100` | Selected row / item |
|
|
171
|
+
| `background-hover` | `navy-200` | Hover state overlay |
|
|
172
|
+
| `background-disabled` | `navy-200` | Disabled surface |
|
|
173
|
+
| `background-success` | `percipioBgSuccess` | Success state container |
|
|
174
|
+
| `background-warning` | `percipioBgWarning` | Warning state container |
|
|
175
|
+
| `background-error` | `percipioBgError` | Error state container |
|
|
176
176
|
|
|
177
177
|
### Interactive
|
|
178
178
|
|
|
179
|
-
| Token |
|
|
180
|
-
| ----------------- |
|
|
181
|
-
| `primary` |
|
|
182
|
-
| `primary-hover` |
|
|
183
|
-
| `primary-inverse` |
|
|
184
|
-
| `secondary` |
|
|
185
|
-
| `secondary-hover` | `
|
|
186
|
-
| `danger` |
|
|
187
|
-
| `danger-hover` |
|
|
179
|
+
| Token | Resolves to | Use for |
|
|
180
|
+
| ----------------- | ------------------------------ | ------------------------------------ |
|
|
181
|
+
| `primary` | `sapphire` | Primary CTA, links, focus rings |
|
|
182
|
+
| `primary-hover` | `percipioActionPrimaryHover` | Hover state of primary interactive |
|
|
183
|
+
| `primary-inverse` | `white` | Primary on a colored background |
|
|
184
|
+
| `secondary` | `percipioActionSecondary` | Secondary CTA, ghost buttons |
|
|
185
|
+
| `secondary-hover` | `percipioActionSecondaryHover` | Hover state of secondary interactive |
|
|
186
|
+
| `danger` | `percipioDanger` | Destructive actions, error states |
|
|
187
|
+
| `danger-hover` | `percipioActionDangerHover` | Hover on danger interactive |
|
|
188
188
|
|
|
189
189
|
### Border
|
|
190
190
|
|
|
191
191
|
Percipio's border weights use a non-standard order: `primary` is mid-weight, `secondary` is very light, `tertiary` is the strongest (solid navy). Use them for their semantic intent, not their numeric rank.
|
|
192
192
|
|
|
193
|
-
| Token |
|
|
194
|
-
| ------------------ |
|
|
195
|
-
| `border-primary` | navy-400
|
|
196
|
-
| `border-secondary` | navy-200
|
|
197
|
-
| `border-tertiary` |
|
|
198
|
-
| `border-disabled` | navy-300
|
|
193
|
+
| Token | Resolves to | Use for |
|
|
194
|
+
| ------------------ | ----------- | ----------------------------------- |
|
|
195
|
+
| `border-primary` | `navy-400` | Standard input and card borders |
|
|
196
|
+
| `border-secondary` | `navy-200` | Subtle dividers, section separators |
|
|
197
|
+
| `border-tertiary` | `navy-800` | Strong structural borders |
|
|
198
|
+
| `border-disabled` | `navy-300` | Disabled input borders |
|
|
199
199
|
|
|
200
200
|
### Feedback
|
|
201
201
|
|
|
202
|
-
| Token |
|
|
203
|
-
| ------------------ |
|
|
204
|
-
| `feedback-error` |
|
|
205
|
-
| `feedback-success` |
|
|
206
|
-
| `feedback-warning` |
|
|
202
|
+
| Token | Resolves to | Use for |
|
|
203
|
+
| ------------------ | ------------------------- | -------------------------------- |
|
|
204
|
+
| `feedback-error` | `percipioDanger` | Error messages, validation |
|
|
205
|
+
| `feedback-success` | `percipioFeedbackSuccess` | Success messages, confirmations |
|
|
206
|
+
| `feedback-warning` | `percipioFeedbackWarning` | Warning messages, caution states |
|
|
207
207
|
|
|
208
208
|
### Shadow
|
|
209
209
|
|
|
210
|
-
| Token |
|
|
211
|
-
| ------------------ |
|
|
212
|
-
| `shadow-primary` | navy-200
|
|
213
|
-
| `shadow-secondary` | navy-400
|
|
210
|
+
| Token | Resolves to |
|
|
211
|
+
| ------------------ | ----------- |
|
|
212
|
+
| `shadow-primary` | `navy-200` |
|
|
213
|
+
| `shadow-secondary` | `navy-400` |
|
|
214
214
|
|
|
215
215
|
Percipio shadows are softer than Codecademy's — use `shadow-primary` for standard elevated surfaces.
|
|
216
216
|
|
|
@@ -220,23 +220,23 @@ Percipio shadows are softer than Codecademy's — use `shadow-primary` for stand
|
|
|
220
220
|
|
|
221
221
|
Percipio introduces its own named semantic colors. These are the source values behind the aliases above. Use the semantic aliases in designs, not the raw named colors.
|
|
222
222
|
|
|
223
|
-
|
|
|
224
|
-
| ------------------------------ |
|
|
225
|
-
| `percipioTextPrimary` |
|
|
226
|
-
| `percipioTextSecondary` | `
|
|
227
|
-
| `percipioTextDisabled` |
|
|
228
|
-
| `sapphire` |
|
|
229
|
-
| `percipioActionPrimaryHover` |
|
|
230
|
-
| `percipioActionSecondary` |
|
|
231
|
-
| `percipioActionSecondaryHover` | `
|
|
232
|
-
| `percipioActionDangerHover` |
|
|
233
|
-
| `percipioDanger` |
|
|
234
|
-
| `percipioFeedbackSuccess` |
|
|
235
|
-
| `percipioFeedbackWarning` |
|
|
236
|
-
| `percipioBgPrimary` |
|
|
237
|
-
| `percipioBgSuccess` |
|
|
238
|
-
| `percipioBgWarning` |
|
|
239
|
-
| `percipioBgError` |
|
|
223
|
+
| Palette token | Semantic alias(es) |
|
|
224
|
+
| ------------------------------ | -------------------------- |
|
|
225
|
+
| `percipioTextPrimary` | `text`, `text-accent` |
|
|
226
|
+
| `percipioTextSecondary` | `text-secondary` |
|
|
227
|
+
| `percipioTextDisabled` | `text-disabled` |
|
|
228
|
+
| `sapphire` | `primary` |
|
|
229
|
+
| `percipioActionPrimaryHover` | `primary-hover` |
|
|
230
|
+
| `percipioActionSecondary` | `secondary` |
|
|
231
|
+
| `percipioActionSecondaryHover` | `secondary-hover` |
|
|
232
|
+
| `percipioActionDangerHover` | `danger-hover` |
|
|
233
|
+
| `percipioDanger` | `danger`, `feedback-error` |
|
|
234
|
+
| `percipioFeedbackSuccess` | `feedback-success` |
|
|
235
|
+
| `percipioFeedbackWarning` | `feedback-warning` |
|
|
236
|
+
| `percipioBgPrimary` | `background-primary` |
|
|
237
|
+
| `percipioBgSuccess` | `background-success` |
|
|
238
|
+
| `percipioBgWarning` | `background-warning` |
|
|
239
|
+
| `percipioBgError` | `background-error` |
|
|
240
240
|
|
|
241
241
|
The full core swatch palette (navy, blue, green, yellow, red, etc.) is also available, but the semantic aliases above are how Percipio maps them. Raw swatches should only be used for fixed colors that must not adapt (illustrations, data viz, etc.).
|
|
242
242
|
|
|
@@ -369,10 +369,10 @@ Same component library as Codecademy — all atoms, molecules, and organisms app
|
|
|
369
369
|
|
|
370
370
|
Key Percipio-specific visual differences:
|
|
371
371
|
|
|
372
|
-
- `FillButton` uses
|
|
373
|
-
- `FillButton` hover
|
|
374
|
-
- `Checkbox` / `Toggle` use
|
|
375
|
-
- `Card` has softer
|
|
372
|
+
- `FillButton` uses `primary` (`sapphire`) instead of Core `hyper-500`
|
|
373
|
+
- `FillButton` hover uses `primary-hover` (`percipioActionPrimaryHover`) rather than a lighter blue
|
|
374
|
+
- `Checkbox` / `Toggle` use `primary` (`sapphire`)
|
|
375
|
+
- `Card` has softer `shadow-primary` (`navy-200` vs `navy-800` in Codecademy light mode)
|
|
376
376
|
- Card shadow patterns (`patternLeft`, `patternRight`) are available but rarely used in Percipio UIs
|
|
377
377
|
|
|
378
378
|
---
|
|
@@ -382,7 +382,7 @@ Key Percipio-specific visual differences:
|
|
|
382
382
|
### Colors
|
|
383
383
|
|
|
384
384
|
- **Do** use semantic color aliases (`primary`, `text`, `background`, etc.) — never hardcode hex values.
|
|
385
|
-
- **Do** use `primary`
|
|
385
|
+
- **Do** use `primary` (resolves to palette `sapphire`) as the brand interactive color.
|
|
386
386
|
- **Don't** use Codecademy's hyper-purple or yellow in Percipio contexts.
|
|
387
387
|
- **Don't** attempt dark mode — Percipio is light only.
|
|
388
388
|
|
|
@@ -406,26 +406,26 @@ Key Percipio-specific visual differences:
|
|
|
406
406
|
|
|
407
407
|
Quick color/token reference for generating or specifying Percipio UI:
|
|
408
408
|
|
|
409
|
-
| Scenario | Tokens
|
|
410
|
-
| ---------------- |
|
|
411
|
-
| Primary button | `bg: primary
|
|
412
|
-
| Body text | `color: text
|
|
413
|
-
| Headline | `color: text
|
|
414
|
-
| Secondary text | `color: text-secondary
|
|
415
|
-
| Disabled text | `color: text-disabled
|
|
416
|
-
| Elevated surface | `bg: background-primary
|
|
417
|
-
| Card default | `bg: background
|
|
418
|
-
| Error state | `color: feedback-error
|
|
419
|
-
| Success state | `color: feedback-success
|
|
420
|
-
| Warning state | `color: feedback-warning
|
|
421
|
-
| Disabled state | `color: text-disabled
|
|
409
|
+
| Scenario | Tokens |
|
|
410
|
+
| ---------------- | -------------------------------------------------------------------------------------------------- |
|
|
411
|
+
| Primary button | `bg: primary`, `color: primary-inverse`, `hover: primary-hover` |
|
|
412
|
+
| Body text | `color: text`, `font: base`, `size: 16`, `weight: 400`, `lineHeight: base` |
|
|
413
|
+
| Headline | `color: text`, `font: base`, `size: 34–64`, `weight: title`, `lineHeight: title` |
|
|
414
|
+
| Secondary text | `color: text-secondary` |
|
|
415
|
+
| Disabled text | `color: text-disabled` |
|
|
416
|
+
| Elevated surface | `bg: background-primary` |
|
|
417
|
+
| Card default | `bg: background`, `borderRadius: none` — add `isInteractive` for hover shadow + `borderRadius: md` |
|
|
418
|
+
| Error state | `color: feedback-error`, `bg: background-error`, `borderColor: danger` |
|
|
419
|
+
| Success state | `color: feedback-success`, `bg: background-success` |
|
|
420
|
+
| Warning state | `color: feedback-warning`, `bg: background-warning` |
|
|
421
|
+
| Disabled state | `color: text-disabled`, `bg: background-disabled`, `borderColor: border-disabled` |
|
|
422
422
|
|
|
423
423
|
### Component token cheatsheet
|
|
424
424
|
|
|
425
425
|
```
|
|
426
|
-
FillButton → bg: primary
|
|
427
|
-
StrokeButton → bg: transparent,
|
|
428
|
-
Checkbox/Toggle → primary
|
|
426
|
+
FillButton → bg: primary, color: primary-inverse, hover: primary-hover
|
|
427
|
+
StrokeButton → bg: transparent, borderColor: secondary, hover: secondary-hover
|
|
428
|
+
Checkbox/Toggle → bg: primary, hover: primary-hover
|
|
429
429
|
Card → bg: background, shadow: shadow-primary (navy-200, soft)
|
|
430
430
|
Alert (error) → uses feedback-error + background-error
|
|
431
431
|
Alert (success) → uses feedback-success + background-success
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/gamut",
|
|
3
3
|
"description": "Styleguide & Component library for Codecademy",
|
|
4
|
-
"version": "68.7.1-alpha.
|
|
4
|
+
"version": "68.7.1-alpha.89ca82.0",
|
|
5
5
|
"author": "Codecademy Engineering <dev@codecademy.com>",
|
|
6
6
|
"bin": "./bin/gamut.mjs",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@codecademy/gamut-icons": "9.57.6-alpha.
|
|
9
|
-
"@codecademy/gamut-illustrations": "0.58.12-alpha.
|
|
10
|
-
"@codecademy/gamut-patterns": "0.10.31-alpha.
|
|
11
|
-
"@codecademy/gamut-styles": "18.0.1-alpha.
|
|
12
|
-
"@codecademy/variance": "0.26.2-alpha.
|
|
8
|
+
"@codecademy/gamut-icons": "9.57.6-alpha.89ca82.0",
|
|
9
|
+
"@codecademy/gamut-illustrations": "0.58.12-alpha.89ca82.0",
|
|
10
|
+
"@codecademy/gamut-patterns": "0.10.31-alpha.89ca82.0",
|
|
11
|
+
"@codecademy/gamut-styles": "18.0.1-alpha.89ca82.0",
|
|
12
|
+
"@codecademy/variance": "0.26.2-alpha.89ca82.0",
|
|
13
13
|
"@formatjs/intl-locale": "5.3.1",
|
|
14
14
|
"@react-aria/interactions": "3.25.0",
|
|
15
15
|
"@types/marked": "^4.0.8",
|