@codecademy/gamut 68.6.2-alpha.671e56.0 → 68.6.2-alpha.d2f2df.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.
Files changed (107) hide show
  1. package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.d.ts +2 -2
  2. package/dist/AccordionButtonDeprecated/ButtonDeprecated/index.js +1 -1
  3. package/dist/Alert/elements.d.ts +2 -2
  4. package/dist/Anchor/index.d.ts +19 -9
  5. package/dist/Anchor/index.js +9 -6
  6. package/dist/BarChart/BarRow/elements.d.ts +47 -45
  7. package/dist/BarChart/utils/hooks.d.ts +2 -2
  8. package/dist/BarChart/utils/hooks.js +3 -1
  9. package/dist/Box/GridBox.d.ts +1 -0
  10. package/dist/Box/GridBox.js +1 -1
  11. package/dist/Box/props.d.ts +1 -1
  12. package/dist/Breadcrumbs/index.d.ts +5 -5
  13. package/dist/Breadcrumbs/index.js +2 -2
  14. package/dist/Button/CTAButton.d.ts +2 -2
  15. package/dist/Button/FillButton.d.ts +4 -4
  16. package/dist/Button/IconButton.d.ts +4 -4
  17. package/dist/Button/StrokeButton.d.ts +4 -4
  18. package/dist/Button/TextButton.d.ts +4 -4
  19. package/dist/Button/shared/InlineIconButton.d.ts +2 -2
  20. package/dist/Button/shared/styles.d.ts +3 -3
  21. package/dist/Button/shared/types.d.ts +1 -1
  22. package/dist/ButtonBase/ButtonBase.d.ts +9 -4
  23. package/dist/ButtonBase/ButtonBase.js +11 -4
  24. package/dist/Card/elements.d.ts +109 -103
  25. package/dist/Card/styles.d.ts +8 -8
  26. package/dist/Coachmark/index.d.ts +1 -1
  27. package/dist/ConnectedForm/ConnectedForm.d.ts +1 -1
  28. package/dist/ConnectedForm/ConnectedFormGroup.js +4 -3
  29. package/dist/ConnectedForm/utils.d.ts +1 -1
  30. package/dist/ConnectedForm/utils.js +1 -1
  31. package/dist/DatePicker/DatePickerInput/index.d.ts +1 -1
  32. package/dist/Disclosure/elements.d.ts +18 -12
  33. package/dist/FeatureShimmer/index.js +1 -1
  34. package/dist/Form/SelectDropdown/SelectDropdown.js +1 -1
  35. package/dist/Form/SelectDropdown/elements/containers.js +1 -1
  36. package/dist/Form/SelectDropdown/elements/controls.js +2 -2
  37. package/dist/Form/SelectDropdown/elements/multi-value.js +2 -2
  38. package/dist/Form/SelectDropdown/types/internal.d.ts +2 -2
  39. package/dist/Form/SelectDropdown/utils.js +2 -1
  40. package/dist/Form/elements/Form.d.ts +15 -15
  41. package/dist/Form/elements/FormGroup.d.ts +1 -1
  42. package/dist/Form/styles/Checkbox-styles.d.ts +1 -1
  43. package/dist/GridForm/GridFormButtons/index.d.ts +4 -4
  44. package/dist/List/ListProvider.d.ts +1 -1
  45. package/dist/List/elements.d.ts +44 -42
  46. package/dist/Menu/MenuItem.js +10 -6
  47. package/dist/Menu/elements.d.ts +2 -2
  48. package/dist/Modals/Dialog.js +6 -2
  49. package/dist/Modals/Modal.js +5 -2
  50. package/dist/Modals/elements.d.ts +1 -1
  51. package/dist/Pagination/AnimatedPaginationButtons.d.ts +31 -29
  52. package/dist/Pagination/EllipsisButton.d.ts +2 -2
  53. package/dist/Pagination/PaginationButton.d.ts +6 -6
  54. package/dist/Pagination/utils.d.ts +31 -29
  55. package/dist/Pagination/utils.js +14 -11
  56. package/dist/Popover/Popover.js +6 -6
  57. package/dist/Popover/types.d.ts +4 -3
  58. package/dist/PopoverContainer/PopoverContainer.js +9 -9
  59. package/dist/PopoverContainer/hooks.d.ts +16 -4
  60. package/dist/PopoverContainer/hooks.js +50 -27
  61. package/dist/PopoverContainer/types.d.ts +2 -1
  62. package/dist/Tabs/TabButton.d.ts +2 -2
  63. package/dist/Tabs/TabNavLink.d.ts +2 -2
  64. package/dist/Tag/elements.d.ts +14 -8
  65. package/dist/Tag/index.js +1 -1
  66. package/dist/Tip/InfoTip/InfoTipButton.d.ts +4 -4
  67. package/dist/Tip/PreviewTip/elements.d.ts +12 -6
  68. package/dist/Tip/__tests__/helpers.d.ts +1 -1
  69. package/dist/Tip/shared/FloatingTip.js +2 -2
  70. package/dist/Tip/shared/types.d.ts +2 -2
  71. package/dist/Tip/shared/utils.js +1 -1
  72. package/dist/utils/nullish.d.ts +10 -0
  73. package/dist/utils/nullish.js +11 -0
  74. package/dist/utils/react.js +4 -2
  75. package/package.json +12 -15
  76. package/agent-tools/.claude-plugin/marketplace.json +0 -16
  77. package/agent-tools/.claude-plugin/plugin.json +0 -7
  78. package/agent-tools/.cursor-plugin/plugin.json +0 -7
  79. package/agent-tools/DESIGN.Codecademy.md +0 -643
  80. package/agent-tools/DESIGN.LXStudio.md +0 -437
  81. package/agent-tools/DESIGN.Percipio.md +0 -433
  82. package/agent-tools/DESIGN.md +0 -1
  83. package/agent-tools/agents/.gitkeep +0 -0
  84. package/agent-tools/rules/accessibility.mdc +0 -78
  85. package/agent-tools/skills/gamut-accessibility/SKILL.md +0 -214
  86. package/agent-tools/skills/gamut-buttons/SKILL.md +0 -96
  87. package/agent-tools/skills/gamut-color-mode/SKILL.md +0 -257
  88. package/agent-tools/skills/gamut-forms/SKILL.md +0 -84
  89. package/agent-tools/skills/gamut-layout/SKILL.md +0 -109
  90. package/agent-tools/skills/gamut-list/SKILL.md +0 -273
  91. package/agent-tools/skills/gamut-review/SKILL.md +0 -254
  92. package/agent-tools/skills/gamut-style-utilities/SKILL.md +0 -107
  93. package/agent-tools/skills/gamut-system-props/SKILL.md +0 -203
  94. package/agent-tools/skills/gamut-testing/SKILL.md +0 -221
  95. package/agent-tools/skills/gamut-theming/SKILL.md +0 -115
  96. package/agent-tools/skills/gamut-typography/SKILL.md +0 -98
  97. package/bin/commands/plugin/install.mjs +0 -212
  98. package/bin/commands/plugin/list.mjs +0 -73
  99. package/bin/commands/plugin/remove.mjs +0 -108
  100. package/bin/commands/plugin/update.mjs +0 -59
  101. package/bin/gamut.mjs +0 -96
  102. package/bin/lib/claude.mjs +0 -52
  103. package/bin/lib/cursor.mjs +0 -40
  104. package/bin/lib/design.mjs +0 -71
  105. package/bin/lib/io.mjs +0 -14
  106. package/bin/lib/resolve-plugin-dir.mjs +0 -38
  107. package/bin/lib/run-command.mjs +0 -22
@@ -1,433 +0,0 @@
1
- ---
2
- version: alpha
3
- name: Percipio Design System
4
- description: Design tokens for the Skillsoft Percipio platform.
5
- colors:
6
- # palette — raw swatches; set once on :root and then always reference by token name, never use hex values directly in code
7
- percipioTextPrimary: '#222325'
8
- percipioTextSecondary: '#595A5C'
9
- percipioTextDisabled: '#AFB6C2'
10
- percipioActionPrimary: '#0073C4'
11
- percipioActionPrimaryHover: '#141C36'
12
- percipioActionSecondary: '#6A6E75'
13
- percipioActionSecondaryHover: '#7F8288'
14
- percipioActionDangerHover: '#A52020'
15
- percipioDanger: '#B83C3C'
16
- percipioFeedbackSuccess: '#1B8057'
17
- percipioFeedbackWarning: '#EF5B0D'
18
- percipioBgPrimary: '#FAFBFC'
19
- percipioBgSuccess: '#EEF7F3'
20
- percipioBgWarning: '#FFF7E0'
21
- percipioBgError: '#FFF1F5'
22
- navy-800: '#10162F'
23
- navy-400: '#8F919D'
24
- navy-300: '#BCBEC5'
25
- navy-200: '#E2E3E6'
26
- navy-100: '#F5F6F7'
27
- white: '#ffffff'
28
- # semantic aliases — use these in code, not palette swatches or hex values
29
- text: '{colors.percipioTextPrimary}'
30
- text-accent: '{colors.percipioTextPrimary}'
31
- text-secondary: '{colors.percipioTextSecondary}'
32
- text-disabled: '{colors.percipioTextDisabled}'
33
- background: '{colors.white}'
34
- background-primary: '{colors.percipioBgPrimary}'
35
- background-selected: '{colors.navy-100}'
36
- background-hover: '{colors.navy-200}'
37
- background-disabled: '{colors.navy-200}'
38
- background-success: '{colors.percipioBgSuccess}'
39
- background-warning: '{colors.percipioBgWarning}'
40
- background-error: '{colors.percipioBgError}'
41
- primary: '{colors.percipioActionPrimary}'
42
- primary-hover: '{colors.percipioActionPrimaryHover}'
43
- primary-inverse: '{colors.white}'
44
- secondary: '{colors.percipioActionSecondary}'
45
- secondary-hover: '{colors.percipioActionSecondaryHover}'
46
- danger: '{colors.percipioDanger}'
47
- danger-hover: '{colors.percipioActionDangerHover}'
48
- feedback-error: '{colors.percipioDanger}'
49
- feedback-success: '{colors.percipioFeedbackSuccess}'
50
- feedback-warning: '{colors.percipioFeedbackWarning}'
51
- border-primary: '{colors.navy-400}'
52
- border-secondary: '{colors.navy-200}'
53
- border-tertiary: '{colors.navy-800}'
54
- border-disabled: '{colors.navy-300}'
55
- shadow-primary: '{colors.navy-200}'
56
- shadow-secondary: '{colors.navy-400}'
57
- typography:
58
- base:
59
- fontFamily: '"Roboto", sans-serif'
60
- fontSize: '1rem'
61
- fontWeight: '400'
62
- lineHeight: '1.5'
63
- accent:
64
- fontFamily: '"Roboto", sans-serif'
65
- fontSize: '0.875rem'
66
- fontWeight: '400'
67
- lineHeight: '1.5'
68
- title:
69
- fontFamily: '"Roboto", sans-serif'
70
- fontSize: '2.125rem'
71
- fontWeight: '500'
72
- lineHeight: '1.2'
73
- monospace:
74
- fontFamily: '"Roboto Mono", monospace'
75
- components:
76
- FillButton:
77
- backgroundColor: '{colors.primary}'
78
- textColor: '{colors.primary-inverse}'
79
- rounded: '{rounded.md}'
80
- FillButton-hover:
81
- backgroundColor: '{colors.primary-hover}'
82
- textColor: '{colors.primary-inverse}'
83
- FillButton-danger:
84
- backgroundColor: '{colors.danger}'
85
- textColor: '{colors.white}'
86
- rounded: '{rounded.md}'
87
- FillButton-danger-hover:
88
- backgroundColor: '{colors.danger-hover}'
89
- textColor: '{colors.white}'
90
- StrokeButton:
91
- backgroundColor: 'transparent'
92
- textColor: '{colors.secondary}'
93
- rounded: '{rounded.md}'
94
- Input:
95
- backgroundColor: '{colors.background}'
96
- textColor: '{colors.text}'
97
- rounded: '{rounded.md}'
98
- borderColor: '{colors.border-primary}'
99
- Checkbox:
100
- backgroundColor: '{colors.primary}'
101
- rounded: '{rounded.sm}'
102
- Checkbox-hover:
103
- backgroundColor: '{colors.primary-hover}'
104
- Alert-error:
105
- backgroundColor: '{colors.background-error}'
106
- textColor: '{colors.feedback-error}'
107
- Alert-success:
108
- backgroundColor: '{colors.background-success}'
109
- textColor: '{colors.text}'
110
- Alert-warning:
111
- backgroundColor: '{colors.background-warning}'
112
- textColor: '{colors.text}'
113
- ---
114
-
115
- # Percipio
116
-
117
- This file defines the visual design tokens for the Skillsoft Percipio platform, implemented using the Gamut design system (`@codecademy/gamut`, `@codecademy/gamut-styles`). Percipio uses a dedicated Gamut theme that applies its own colors and typography — all Gamut components work without modification.
118
-
119
- **Storybook**: https://gamut.codecademy.com
120
-
121
- ---
122
-
123
- ## Visual Theme & Atmosphere
124
-
125
- Percipio communicates **professional clarity** — clean, trustworthy, and enterprise-ready. The design voice is more neutral and corporate than Codecademy: less playful, more functional. Primary blue drives interactive affordances; neutral grays define text and structure.
126
-
127
- **Density**: Medium. Consistent with Codecademy layouts but with softer shadows and a lighter overall feel due to the muted neutral palette.
128
-
129
- **Design philosophy**:
130
-
131
- - Light mode only — no dark mode support
132
- - Primary blue (`percipioActionPrimary`) replaces Codecademy's `hyper-500` for all interactive elements
133
- - Text is near-black dark gray rather than navy
134
- - Shadows are soft and minimal (navy at low opacity) rather than hard borders
135
- - Title font weight is 500 (medium) rather than 700 (bold) — Percipio headlines are less heavy
136
-
137
- ---
138
-
139
- ## Themes
140
-
141
- Percipio uses a single Gamut theme — light mode only.
142
-
143
- | Theme | Use case | Base font | Dark mode |
144
- | ------------ | --------------------------- | --------- | ---------- |
145
- | **Percipio** | Skillsoft Percipio platform | Roboto | light only |
146
-
147
- The active theme is set at the app root via `<GamutProvider theme={percipioTheme}>`.
148
-
149
- ---
150
-
151
- ## Semantic Color Aliases
152
-
153
- Use these token names when specifying colors. Percipio is light mode only — there are no dark mode counterparts.
154
-
155
- ### Text
156
-
157
- | Token | Value | Use for |
158
- | ---------------- | --------- | ------------------------------------------------ |
159
- | `text` | `#222325` | Default body and UI text |
160
- | `text-accent` | `#222325` | Emphasis text (same value as `text` in Percipio) |
161
- | `text-secondary` | `#595A5C` | Supporting / secondary copy |
162
- | `text-disabled` | `#AFB6C2` | Disabled state labels |
163
-
164
- ### Background
165
-
166
- | Token | Value | Use for |
167
- | --------------------- | -------------------- | --------------------------------- |
168
- | `background` | `#ffffff` | Default page/component background |
169
- | `background-primary` | `#FAFBFC` | Slightly elevated surfaces |
170
- | `background-selected` | `#F5F6F7` (navy-100) | Selected row / item |
171
- | `background-hover` | `#E2E3E6` (navy-200) | Hover state overlay |
172
- | `background-disabled` | `#E2E3E6` (navy-200) | Disabled surface |
173
- | `background-success` | `#EEF7F3` | Success state container |
174
- | `background-warning` | `#FFF7E0` | Warning state container |
175
- | `background-error` | `#FFF1F5` | Error state container |
176
-
177
- ### Interactive
178
-
179
- | Token | Value | Use for |
180
- | ----------------- | --------- | ------------------------------------ |
181
- | `primary` | `#0073C4` | Primary CTA, links, focus rings |
182
- | `primary-hover` | `#141C36` | Hover state of primary interactive |
183
- | `primary-inverse` | `#ffffff` | Primary on a colored background |
184
- | `secondary` | `#6A6E75` | Secondary CTA, ghost buttons |
185
- | `secondary-hover` | `#7F8288` | Hover state of secondary interactive |
186
- | `danger` | `#B83C3C` | Destructive actions, error states |
187
- | `danger-hover` | `#A52020` | Hover on danger interactive |
188
-
189
- ### Border
190
-
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
-
193
- | Token | Value | Use for |
194
- | ------------------ | -------------------- | ----------------------------------- |
195
- | `border-primary` | `#8F919D` (navy-400) | Standard input and card borders |
196
- | `border-secondary` | `#E2E3E6` (navy-200) | Subtle dividers, section separators |
197
- | `border-tertiary` | `#10162F` (navy-800) | Strong structural borders |
198
- | `border-disabled` | `#BCBEC5` (navy-300) | Disabled input borders |
199
-
200
- ### Feedback
201
-
202
- | Token | Value | Use for |
203
- | ------------------ | --------- | -------------------------------- |
204
- | `feedback-error` | `#B83C3C` | Error messages, validation |
205
- | `feedback-success` | `#1B8057` | Success messages, confirmations |
206
- | `feedback-warning` | `#EF5B0D` | Warning messages, caution states |
207
-
208
- ### Shadow
209
-
210
- | Token | Value |
211
- | ------------------ | -------------------- |
212
- | `shadow-primary` | `#E2E3E6` (navy-200) |
213
- | `shadow-secondary` | `#8F919D` (navy-400) |
214
-
215
- Percipio shadows are softer than Codecademy's — use `shadow-primary` for standard elevated surfaces.
216
-
217
- ---
218
-
219
- ## Percipio Color Palette
220
-
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
-
223
- | Named color | Value | Mapped to |
224
- | ------------------------------ | --------- | -------------------------- |
225
- | `percipioTextPrimary` | `#222325` | `text`, `text-accent` |
226
- | `percipioTextSecondary` | `#595A5C` | `text-secondary` |
227
- | `percipioTextDisabled` | `#AFB6C2` | `text-disabled` |
228
- | `percipioActionPrimary` | `#0073C4` | `primary` |
229
- | `percipioActionPrimaryHover` | `#141C36` | `primary-hover` |
230
- | `percipioActionSecondary` | `#6A6E75` | `secondary` |
231
- | `percipioActionSecondaryHover` | `#7F8288` | `secondary-hover` |
232
- | `percipioActionDangerHover` | `#A52020` | `danger-hover` |
233
- | `percipioDanger` | `#B83C3C` | `danger`, `feedback-error` |
234
- | `percipioFeedbackSuccess` | `#1B8057` | `feedback-success` |
235
- | `percipioFeedbackWarning` | `#EF5B0D` | `feedback-warning` |
236
- | `percipioBgPrimary` | `#FAFBFC` | `background-primary` |
237
- | `percipioBgSuccess` | `#EEF7F3` | `background-success` |
238
- | `percipioBgWarning` | `#FFF7E0` | `background-warning` |
239
- | `percipioBgError` | `#FFF1F5` | `background-error` |
240
-
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
-
243
- ---
244
-
245
- ## Typography
246
-
247
- ### Typefaces
248
-
249
- All font families in Percipio use **Roboto**. There is no separate accent or display typeface.
250
-
251
- | Token | Font | Use for |
252
- | ----------- | -------------------------- | ------------------------------------------- |
253
- | `base` | `"Roboto", sans-serif` | All default UI text, headlines, body copy |
254
- | `accent` | `"Roboto", sans-serif` | Labels, captions (same as base in Percipio) |
255
- | `monospace` | `"Roboto Mono", monospace` | Code editor contexts |
256
- | `system` | `"Roboto", sans-serif` | Performance-critical surfaces |
257
-
258
- ### Rules
259
-
260
- - **Roboto Medium (500)** for headlines, sub-headlines, CTAs, and buttons — not Bold (700).
261
- - **Roboto Regular (400)** for body text, UI labels, and menu items.
262
- - Text is **left-aligned** by default. Center-align only for short marketing headlines. Never right-align.
263
- - Do not adjust letter-spacing.
264
-
265
- ### Font weight scale
266
-
267
- Percipio overrides the title weight from Core's 700 to 500 (medium). This gives Percipio a lighter, less heavy headline style.
268
-
269
- | Token | Value | Use |
270
- | ------- | ------- | ---------------------------------------------------------- |
271
- | `base` | 400 | Body text, UI labels |
272
- | `title` | **500** | Headlines, CTAs, buttons _(differs from Codecademy's 700)_ |
273
-
274
- ### Font size scale
275
-
276
- Shared with Core — all sizes are identical.
277
-
278
- | Token key | Size | Common use |
279
- | --------- | ---- | ---------------------------- |
280
- | `64` | 64px | Hero / display |
281
- | `44` | 44px | Page titles |
282
- | `34` | 34px | Section titles |
283
- | `26` | 26px | Sub-section titles |
284
- | `22` | 22px | Card titles, large UI labels |
285
- | `20` | 20px | Secondary titles |
286
- | `18` | 18px | Large body, intro text |
287
- | `16` | 16px | Default body text |
288
- | `14` | 14px | Small body, captions, labels |
289
-
290
- ### Line height scale
291
-
292
- Shared with Core.
293
-
294
- | Token | Value | Use |
295
- | ------------- | ----- | ------------------------------- |
296
- | `base` | 1.5 | Body text |
297
- | `spacedTitle` | 1.3 | Sub-headlines and medium titles |
298
- | `title` | 1.2 | Large headlines |
299
-
300
- ### Line length
301
-
302
- Target 45–85 characters per line; 66 characters is ideal. Max 50 for multi-column layouts.
303
-
304
- ---
305
-
306
- ## Spacing Scale
307
-
308
- Identical to Core. All spacing is multiples of 4px on an 8px grid.
309
-
310
- | Token | Value |
311
- | ----- | ----- |
312
- | `0` | 0 |
313
- | `4` | 4px |
314
- | `8` | 8px |
315
- | `12` | 12px |
316
- | `16` | 16px |
317
- | `24` | 24px |
318
- | `32` | 32px |
319
- | `40` | 40px |
320
- | `48` | 48px |
321
- | `64` | 64px |
322
- | `96` | 96px |
323
-
324
- ---
325
-
326
- ## Border Radius Scale
327
-
328
- Identical to Core.
329
-
330
- | Token | Value | Use |
331
- | ------ | ----- | ------------------------------------------ |
332
- | `none` | 0px | Square / non-interactive elements |
333
- | `sm` | 2px | Subtle rounding, tags |
334
- | `md` | 4px | Default buttons, inputs, interactive cards |
335
- | `lg` | 8px | Cards, panels |
336
- | `xl` | 16px | Large cards, modals |
337
- | `full` | 999px | Pills, avatars, circular elements |
338
-
339
- ---
340
-
341
- ## Responsive Behavior
342
-
343
- Identical to Core. Mobile-first, apply styles from the named breakpoint up.
344
-
345
- | Token | Min-width | Max content |
346
- | -------- | --------- | ----------- |
347
- | _(base)_ | 0 | 288px |
348
- | `xs` | 480px | 448px |
349
- | `sm` | 768px | 704px |
350
- | `md` | 1024px | 896px |
351
- | `lg` | 1200px | 1072px |
352
- | `xl` | 1440px | 1248px |
353
-
354
- 12-column grid at all breakpoints.
355
-
356
- | Usage | Recommended values |
357
- | --------------------- | ------------------------------------------------ |
358
- | Horizontal margins | 64px (lg+), 48px (md), 32px (sm/xs), 16px (base) |
359
- | Column gaps (gutters) | 32px (lg+), 24px (md), 16px (sm/xs), 8px (base) |
360
- | Row gaps | 32px (lg+), 24px (md), 16px (sm/xs), 8px (base) |
361
-
362
- Minimum interactive touch target: **44×44px** on mobile breakpoints.
363
-
364
- ---
365
-
366
- ## Component Library
367
-
368
- Same component library as Codecademy — all atoms, molecules, and organisms apply. Token values resolve differently per theme automatically.
369
-
370
- Key Percipio-specific visual differences:
371
-
372
- - `FillButton` uses `#0073C4` (blue) instead of hyper-purple
373
- - `FillButton` hover shifts to near-black `#141C36` rather than a lighter purple
374
- - `Checkbox` / `Toggle` use the same blue `#0073C4`
375
- - `Card` has softer shadows (navy-200 vs navy-800 in Codecademy light mode)
376
- - Card shadow patterns (`patternLeft`, `patternRight`) are available but rarely used in Percipio UIs
377
-
378
- ---
379
-
380
- ## Do's and Don'ts
381
-
382
- ### Colors
383
-
384
- - **Do** use semantic color aliases (`primary`, `text`, `background`, etc.) — never hardcode hex values.
385
- - **Do** use `#0073C4` blue as the only primary interactive color.
386
- - **Don't** use Codecademy's hyper-purple or yellow in Percipio contexts.
387
- - **Don't** attempt dark mode — Percipio is light only.
388
-
389
- ### Typography
390
-
391
- - **Do** use title weight (500) for headlines, CTAs, and buttons — not 700.
392
- - **Do** keep body text at 150–175% line height for readability.
393
- - **Don't** use a separate accent typeface — Roboto is used uniformly for base and accent.
394
- - **Don't** right-align or center-align body paragraphs.
395
- - **Don't** adjust letter-spacing.
396
-
397
- ### Layout & Spacing
398
-
399
- - **Do** use multiples of 8px for block-element spacing (4px only for inline / typographic relationships).
400
- - **Do** begin design work at 1440px (XL), then adapt down.
401
- - **Do** align elements to the 12-column grid.
402
-
403
- ---
404
-
405
- ## Agent Prompt Guide
406
-
407
- Quick color/token reference for generating or specifying Percipio UI:
408
-
409
- | Scenario | Tokens |
410
- | ---------------- | ------------------------------------------------------------------------------------------------------------ |
411
- | Primary button | `bg: primary (#0073C4)`, `color: white`, `hover: primary-hover (#141C36)` |
412
- | Body text | `color: text (#222325)`, `font: Roboto`, `size: 16px`, `weight: 400`, `lineHeight: base (1.5)` |
413
- | Headline | `color: text (#222325)`, `font: Roboto`, `size: 34–64px`, `weight: title (500)`, `lineHeight: title (1.2)` |
414
- | Secondary text | `color: text-secondary (#595A5C)` |
415
- | Disabled text | `color: text-disabled (#AFB6C2)` |
416
- | Elevated surface | `bg: background-primary (#FAFBFC)` |
417
- | Card default | `bg: background (#ffffff)`, `borderRadius: none` — add `isInteractive` for hover shadow + `borderRadius: md` |
418
- | Error state | `color: feedback-error (#B83C3C)`, `bg: background-error (#FFF1F5)`, `border: danger` |
419
- | Success state | `color: feedback-success (#1B8057)`, `bg: background-success (#EEF7F3)` |
420
- | Warning state | `color: feedback-warning (#EF5B0D)`, `bg: background-warning (#FFF7E0)` |
421
- | Disabled state | `color: text-disabled (#AFB6C2)`, `bg: background-disabled (#E2E3E6, navy-200)`, `border: border-disabled` |
422
-
423
- ### Component token cheatsheet
424
-
425
- ```
426
- FillButton → bg: primary (#0073C4), color: white, hover: primary-hover (#141C36)
427
- StrokeButton → bg: transparent, border: secondary (#6A6E75)
428
- Checkbox/Toggle → primary (#0073C4), hover: primary-hover (#141C36)
429
- Card → bg: background, shadow: shadow-primary (#E2E3E6, navy-200, soft)
430
- Alert (error) → uses feedback-error + background-error
431
- Alert (success) → uses feedback-success + background-success
432
- Alert (warning) → uses feedback-warning + background-warning
433
- ```
@@ -1 +0,0 @@
1
- DEPRECATED. Use the appropriate DESIGN.*.md from https://github.com/Codecademy/gamut/pull/3329 instead.
File without changes
@@ -1,78 +0,0 @@
1
- ---
2
- description: Apply these guardrails when editing Gamut UI in TS/JS/TSX/JSX. Universal rules (always loaded). Form wiring depth: `gamut-forms` skill; other component matrix and audit detail: `gamut-accessibility` — those skills do not repeat this rule set.
3
- alwaysApply: true
4
- globs: ['*.tsx', '*.ts', '*.jsx', '*.js']
5
- ---
6
-
7
- # Gamut Accessibility Rules
8
-
9
- ## Prefer HTML over ARIA
10
-
11
- Unnecessary ARIA can cause harm. If a native HTML element or attribute with the semantics and behavior you need already exists, use it. Reach for ARIA only when native HTML is genuinely insufficient for the pattern.
12
-
13
- ## A Role is a Promise
14
-
15
- ARIA roles modify the accessibility tree and _imply_ behavior. Always ensure that the implied keyboard behavior, focusability, and interactivity exists when a role is used.
16
-
17
- ## ARIA can both cloak and enhance
18
-
19
- ARIA can augment native semantics (`aria-pressed` on a `<button>`) or override them entirely (`role="menuitem"` on an `<a>`). Both capabilities are powerful and dangerous. Override only when native HTML genuinely doesn't fit the pattern; when augmenting, don't contradict the native semantics.
20
-
21
- ## Align accessible names with visible copy
22
-
23
- Prefer wiring names through visible text and native `<label>` / control text / `alt` over using `aria-label`. Point `aria-labelledby` at the visible heading or label that should define the name if it's not possible to name elements from their content. Use bare `aria-label` when there is no suitable visible label.
24
-
25
- ## Treat missing visible labels as a design smell
26
-
27
- When there is no visible text for a nameable element, consider this a sign that the content design could be improved, but not a requirement that it is changed. This is not an accessibility violation.
28
-
29
- ```html
30
- <!-- smell: this list has no conceptual name, so we have to create one using ARIA -->
31
- <ul aria-label="List heading">
32
- <li>...</li>
33
- </ul>
34
-
35
- <!-- better: the list's name is visible and can be used for its accessible name -->
36
- <h2 id="list-name">List heading</h2>
37
- <ul aria-labelledby="list-name">
38
- <li>...</li>
39
- </ul>
40
- ```
41
-
42
- ## Use Gamut primitives — do not fake buttons or dialogs
43
-
44
- - Actions: use Gamut button atoms (`FillButton`, `TextButton`, `StrokeButton`, `CTAButton`, `IconButton`) — not `<div onClick>`, not `<span role="button">`, not `<a>` without `href` for actions. Variant and `tip` guidance: [`skills/gamut-buttons/SKILL.md`](../skills/gamut-buttons/SKILL.md).
45
- - Tabs / overlays: `Tabs`, `Dialog`, `Modal`, and related primitives implement keyboard and focus patterns in code — still supply labels, titles, and trigger semantics as documented in the skill.
46
-
47
- ## Every interactive control needs an accessible name
48
-
49
- - `IconButton` — provide `tip` (accessible name for icon-only).
50
- - `InfoTip` — provide `ariaLabel` or `ariaLabelledby`; there is no automatic fallback.
51
- - Decorative icon SVGs next to visible text — `aria-hidden="true"` on the icon.
52
-
53
- ## Form label association
54
-
55
- Match `htmlFor` on `<FormGroupLabel>` with the `id` on the control. Base `<FormGroup>` renders live regions for `error` and `description`; `GridForm` and `ConnectedForm` add field wiring (`aria-describedby`, `aria-invalid`, first-error `aria-live` behavior) — do not add redundant duplicate regions. Depth: [`skills/gamut-forms/SKILL.md`](../skills/gamut-forms/SKILL.md).
56
-
57
- ## Screen-reader-only text
58
-
59
- Use `<Text screenreader>` for visually hidden but announced content. `<HiddenText>` is deprecated.
60
-
61
- ## Color and contrast
62
-
63
- Do not hardcode hex for adaptive UI. Prefer semantic tokens and `ColorMode` / `<Background>` so surfaces track theme and mode — see the [`gamut-color-mode`](../skills/gamut-color-mode/SKILL.md) skill. Default pairings support accessible UI, but tokens do not guarantee WCAG compliance for every layout; validate non-standard combinations.
64
-
65
- ## Focus visibility
66
-
67
- Never suppress focus indicators with `outline: none` or `outline: 0` without a visible replacement. Gamut’s focus styles are intentional (WCAG 2.4.7).
68
-
69
- ## Where to read more (minimal index)
70
-
71
- | Topic | Primary doc |
72
- | --- | --- |
73
- | Forms (`GridForm`, `ConnectedForm`, `FormGroup`, validation, live regions) | [`skills/gamut-forms/SKILL.md`](../skills/gamut-forms/SKILL.md) |
74
- | Component matrix (tips, overlays, composites, checklists; not form wiring) | [`skills/gamut-accessibility/SKILL.md`](../skills/gamut-accessibility/SKILL.md) |
75
- | Button variants, `IconButton` `tip`, `disabled` vs `aria-disabled` | [`skills/gamut-buttons/SKILL.md`](../skills/gamut-buttons/SKILL.md) |
76
- | ColorMode, `Background`, semantic color roles | [`skills/gamut-color-mode/SKILL.md`](../skills/gamut-color-mode/SKILL.md) |
77
- | Tokens, `css` / `variant` / `states` | Storybook [Meta / Best practices](https://gamut.codecademy.com/?path=/docs-meta-best-practices--page) |
78
- | Install, `GamutProvider`, CSP | Storybook [Meta / Installation](https://gamut.codecademy.com/?path=/docs-meta-installation--page) |