@ericrisco/rsc 3.3.1 → 3.4.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 (54) hide show
  1. package/README.md +2 -2
  2. package/manifest.json +43 -22
  3. package/package.json +1 -1
  4. package/scripts/lib/default-skill-floor.js +5 -1
  5. package/scripts/lib/domains.js +2 -2
  6. package/scripts/lib/retired-skills.js +4 -0
  7. package/skills/design/SKILL.md +4 -3
  8. package/skills/design/evals/cases.yaml +2 -2
  9. package/skills/react/SKILL.md +2 -1
  10. package/skills/ux/SKILL.md +149 -0
  11. package/skills/ux/THIRD_PARTY.md +32 -0
  12. package/skills/ux/evals/cases.yaml +40 -0
  13. package/skills/ux/references/flows.md +124 -0
  14. package/skills/ux/upstream/UPSTREAM.json +59 -0
  15. package/skills/ux/upstream/ux-designer/GUIDE.md +180 -0
  16. package/skills/ux/upstream/ux-designer/LICENSE +21 -0
  17. package/skills/ux/upstream/ux-designer/references/01-core-principles.md +251 -0
  18. package/skills/ux/upstream/ux-designer/references/02-laws-of-ux.md +330 -0
  19. package/skills/ux/upstream/ux-designer/references/03-accessibility.md +411 -0
  20. package/skills/ux/upstream/ux-designer/references/04-visual-design.md +433 -0
  21. package/skills/ux/upstream/ux-designer/references/05-information-architecture.md +432 -0
  22. package/skills/ux/upstream/ux-designer/references/06-interaction-design.md +495 -0
  23. package/skills/ux/upstream/ux-designer/references/07-forms-and-inputs.md +491 -0
  24. package/skills/ux/upstream/ux-designer/references/08-mobile-ux.md +539 -0
  25. package/skills/ux/upstream/ux-designer/references/09-ux-writing.md +493 -0
  26. package/skills/ux/upstream/ux-designer/references/10-user-research.md +533 -0
  27. package/skills/ux/upstream/ux-designer/references/11-design-systems.md +618 -0
  28. package/skills/ux/upstream/ux-designer/references/12a-presence-awareness.md +395 -0
  29. package/skills/ux/upstream/ux-designer/references/12b-conflict-resolution-sync.md +420 -0
  30. package/skills/ux/upstream/ux-designer/references/13a-canvas-navigation.md +388 -0
  31. package/skills/ux/upstream/ux-designer/references/13b-canvas-objects-performance.md +559 -0
  32. package/skills/ux/upstream/ux-designer/references/14-ai-ux-patterns.md +511 -0
  33. package/skills/ux/upstream/ux-designer/references/15-ethical-design.md +419 -0
  34. package/skills/ux/upstream/ux-designer/references/16-onboarding.md +430 -0
  35. package/skills/ux/upstream/ux-designer/references/17-notifications.md +461 -0
  36. package/skills/ux/upstream/ux-designer/references/18-data-visualization.md +453 -0
  37. package/skills/ux/upstream/ux-designer/references/19-search-ux.md +479 -0
  38. package/skills/ux/upstream/ux-designer/references/20-emotional-design.md +382 -0
  39. package/skills/ux/upstream/ux-designer/references/21-data-tables.md +629 -0
  40. package/skills/ux/upstream/ux-designer/references/22-performance-ux.md +626 -0
  41. package/skills/ux/upstream/ux-designer/references/23-internationalization.md +347 -0
  42. package/skills/ux/upstream/ux-designer/references/24-voice-and-multimodal.md +308 -0
  43. package/skills/ux/upstream/ux-designer/references/25a-barcode-camera-scanning.md +342 -0
  44. package/skills/ux/upstream/ux-designer/references/25b-barcode-scanner-workflows.md +412 -0
  45. package/skills/ux/upstream/ux-designer/references/25c-barcode-display.md +277 -0
  46. package/skills/ux/upstream/ux-usability-foundations/GUIDE.md +285 -0
  47. package/skills/ux/upstream/ux-usability-foundations/LICENSE +21 -0
  48. package/skills/ux/upstream/ux-usability-foundations/references/anti-patterns.md +267 -0
  49. package/skills/ux/upstream/ux-usability-foundations/references/checklists.md +130 -0
  50. package/skills/ux/upstream/ux-usability-foundations/references/decision-prompts.md +340 -0
  51. package/skills/ux/upstream/ux-usability-foundations/references/principle-cards.md +449 -0
  52. package/targets/clone-bootstrap.mjs +1 -1
  53. package/skills/ui-engineering/SKILL.md +0 -113
  54. package/skills/ui-engineering/evals/cases.yaml +0 -38
@@ -0,0 +1,618 @@
1
+ # Design Systems
2
+
3
+ A design system is a complete set of standards, documentation, and reusable components intended to manage design at scale.
4
+
5
+ ---
6
+
7
+ ## Contents
8
+
9
+ - What is a Design System?
10
+ - Design System vs. Related Concepts
11
+ - Design Tokens
12
+ - Component Architecture
13
+ - Documentation Best Practices
14
+ - Notable Design Systems
15
+ - React Component Libraries (2026)
16
+ - Governance & Contribution
17
+ - Building a Design System
18
+ - Common Pitfalls
19
+ - Tools Ecosystem
20
+ - Sources
21
+
22
+ ---
23
+
24
+ ## What is a Design System?
25
+
26
+ ### Definition
27
+
28
+ A design system is the single source of truth that groups all elements that allow teams to design, realize, and develop a product.
29
+
30
+ ### Components of a Design System
31
+
32
+ ```
33
+ Design System
34
+ ├── Foundations (Design Tokens)
35
+ │ ├── Colors
36
+ │ ├── Typography
37
+ │ ├── Spacing
38
+ │ ├── Shadows
39
+ │ └── Motion
40
+ ├── Components
41
+ │ ├── Buttons
42
+ │ ├── Forms
43
+ │ ├── Cards
44
+ │ ├── Navigation
45
+ │ └── ...
46
+ ├── Patterns
47
+ │ ├── Forms
48
+ │ ├── Authentication
49
+ │ ├── Search
50
+ │ └── ...
51
+ ├── Guidelines
52
+ │ ├── Accessibility
53
+ │ ├── Content
54
+ │ ├── Voice & Tone
55
+ │ └── Usage
56
+ └── Documentation
57
+ ├── Getting Started
58
+ ├── Component APIs
59
+ └── Contributing
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Design System vs. Related Concepts
65
+
66
+ ### Style Guide
67
+
68
+ Focus on **visual elements**:
69
+ - Brand colors
70
+ - Typography
71
+ - Logo usage
72
+ - Imagery guidelines
73
+
74
+ ### Pattern Library
75
+
76
+ Collection of **UI patterns**:
77
+ - Navigation patterns
78
+ - Form patterns
79
+ - Layout templates
80
+ - Interaction patterns
81
+
82
+ ### Component Library
83
+
84
+ **Coded UI components**:
85
+ - Buttons, inputs, modals
86
+ - Ready-to-use code
87
+ - Framework-specific
88
+ - Documented APIs
89
+
90
+ ### Design System
91
+
92
+ **All of the above, plus:**
93
+ - Governance processes
94
+ - Contribution guidelines
95
+ - Versioning
96
+ - Team workflows
97
+
98
+ ---
99
+
100
+ ## Design Tokens
101
+
102
+ Design tokens are the atomic values that define visual design decisions.
103
+
104
+ ### Tokens as the Universal Language
105
+
106
+ By 2026 the leading framing is that design tokens are not just a theming
107
+ convenience—they are the **infrastructure layer** that makes consistency possible
108
+ across an expanding surface of platforms and modalities (web, iOS, Android, watch,
109
+ TV, voice, in-car, AR). A token is a named, platform-agnostic decision (e.g.
110
+ `color.action.primary`, `space.4`) that a build step (Style Dictionary, Tokens
111
+ Studio) compiles into CSS custom properties, Swift, Kotlin, JSON, etc.
112
+
113
+ ```
114
+ Single source of truth (tokens.json)
115
+ │ transform / build
116
+ ├──► CSS --color-action-primary
117
+ ├──► iOS Color.actionPrimary
118
+ ├──► Android colorActionPrimary
119
+ └──► docs / Figma variables
120
+ ```
121
+
122
+ - **One decision, many outputs** — change a token, every platform updates in sync
123
+ - **Tiered structure** — primitive (raw values) → semantic (intent) → component
124
+ - **Theming falls out for free** — light/dark, brand, density, high-contrast are
125
+ just alternate token sets resolved at the semantic layer
126
+ - Tokens are the contract between design and engineering; treat them as versioned API
127
+
128
+ ### Token Types
129
+
130
+ ```css
131
+ /* Color tokens */
132
+ --color-primary: #0066cc;
133
+ --color-primary-light: #3399ff;
134
+ --color-primary-dark: #004499;
135
+ --color-background: #ffffff;
136
+ --color-text-primary: #1a1a1a;
137
+ --color-text-secondary: #666666;
138
+ --color-error: #dc3545;
139
+ --color-success: #28a745;
140
+
141
+ /* Typography tokens */
142
+ --font-family-base: 'Inter', sans-serif;
143
+ --font-family-mono: 'JetBrains Mono', monospace;
144
+ --font-size-xs: 0.75rem;
145
+ --font-size-sm: 0.875rem;
146
+ --font-size-base: 1rem;
147
+ --font-size-lg: 1.25rem;
148
+ --font-size-xl: 1.5rem;
149
+ --font-weight-normal: 400;
150
+ --font-weight-medium: 500;
151
+ --font-weight-bold: 700;
152
+ --line-height-tight: 1.25;
153
+ --line-height-normal: 1.5;
154
+
155
+ /* Spacing tokens */
156
+ --space-1: 0.25rem; /* 4px */
157
+ --space-2: 0.5rem; /* 8px */
158
+ --space-3: 0.75rem; /* 12px */
159
+ --space-4: 1rem; /* 16px */
160
+ --space-5: 1.5rem; /* 24px */
161
+ --space-6: 2rem; /* 32px */
162
+ --space-8: 3rem; /* 48px */
163
+
164
+ /* Shadow tokens */
165
+ --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
166
+ --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
167
+ --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
168
+
169
+ /* Border radius tokens */
170
+ --radius-sm: 0.25rem;
171
+ --radius-md: 0.5rem;
172
+ --radius-lg: 1rem;
173
+ --radius-full: 9999px;
174
+
175
+ /* Animation tokens */
176
+ --duration-fast: 150ms;
177
+ --duration-normal: 250ms;
178
+ --duration-slow: 400ms;
179
+ --easing-default: ease-out;
180
+ ```
181
+
182
+ ### Semantic Tokens
183
+
184
+ ```css
185
+ /* Semantic layer on top of primitive tokens */
186
+ --color-action-primary: var(--color-primary);
187
+ --color-action-secondary: var(--color-secondary);
188
+ --color-feedback-error: var(--color-error);
189
+ --color-feedback-success: var(--color-success);
190
+ --color-surface: var(--color-background);
191
+ --color-surface-raised: var(--color-white);
192
+
193
+ /* Component-specific tokens */
194
+ --button-padding: var(--space-3) var(--space-5);
195
+ --button-radius: var(--radius-md);
196
+ --card-padding: var(--space-5);
197
+ --card-radius: var(--radius-lg);
198
+ ```
199
+
200
+ ### Variable Fonts
201
+
202
+ A **variable font** packs an entire type family—every weight, width, and optical
203
+ size—into a single file along continuous axes, replacing the old "load 6 static
204
+ weight files" approach. This is now the default recommendation for design systems.
205
+
206
+ ```css
207
+ @font-face {
208
+ font-family: 'InterVar';
209
+ src: url('/fonts/Inter.var.woff2') format('woff2-variations');
210
+ font-weight: 100 900; /* full weight range in one file */
211
+ font-display: swap;
212
+ }
213
+
214
+ :root {
215
+ --font-family-base: 'InterVar', sans-serif;
216
+ }
217
+
218
+ /* Use any weight on the axis, not just preset steps */
219
+ .heading { font-weight: 620; }
220
+ /* Optical sizing axis tracks the rendered size automatically */
221
+ body { font-optical-sizing: auto; }
222
+ ```
223
+
224
+ **Why it matters:**
225
+ - **Performance** — one HTTP request and ~one file instead of many static weights
226
+ - **Responsive typography** — interpolate weight/width fluidly across breakpoints
227
+ and even animate them (respecting reduced-motion); great for fluid `clamp()` scales
228
+ - **Design flexibility** — fine-grained control (e.g. weight 540) without new files
229
+ - Expose axes as tokens (`--font-weight-*`) so the system stays the single source
230
+ - Caveat: subset to needed glyphs/axes; a full variable font can be large
231
+
232
+ ---
233
+
234
+ ## Component Architecture
235
+
236
+ ### Anatomy of a Component
237
+
238
+ ```
239
+ Button Component
240
+ ├── States
241
+ │ ├── Default
242
+ │ ├── Hover
243
+ │ ├── Active/Pressed
244
+ │ ├── Focus
245
+ │ ├── Disabled
246
+ │ └── Loading
247
+ ├── Variants
248
+ │ ├── Primary
249
+ │ ├── Secondary
250
+ │ ├── Tertiary/Ghost
251
+ │ └── Destructive
252
+ ├── Sizes
253
+ │ ├── Small
254
+ │ ├── Medium (default)
255
+ │ └── Large
256
+ ├── Props/Options
257
+ │ ├── Label
258
+ │ ├── Icon (left/right)
259
+ │ ├── Full width
260
+ │ └── Type (button/submit)
261
+ └── Accessibility
262
+ ├── Keyboard navigation
263
+ ├── ARIA attributes
264
+ └── Focus management
265
+ ```
266
+
267
+ ### Component API Design
268
+
269
+ ```tsx
270
+ // Well-designed component API
271
+ interface ButtonProps {
272
+ /** Button label */
273
+ children: React.ReactNode;
274
+ /** Visual style variant */
275
+ variant?: 'primary' | 'secondary' | 'ghost' | 'destructive';
276
+ /** Button size */
277
+ size?: 'sm' | 'md' | 'lg';
278
+ /** Disabled state */
279
+ disabled?: boolean;
280
+ /** Loading state */
281
+ loading?: boolean;
282
+ /** Full width */
283
+ fullWidth?: boolean;
284
+ /** Icon before label */
285
+ iconLeft?: React.ReactNode;
286
+ /** Icon after label */
287
+ iconRight?: React.ReactNode;
288
+ /** Click handler */
289
+ onClick?: () => void;
290
+ }
291
+
292
+ // Usage
293
+ <Button variant="primary" size="lg" iconLeft={<PlusIcon />}>
294
+ Add Item
295
+ </Button>
296
+ ```
297
+
298
+ ---
299
+
300
+ ## Documentation Best Practices
301
+
302
+ ### Component Documentation
303
+
304
+ Each component should include:
305
+
306
+ 1. **Overview**
307
+ - Description and purpose
308
+ - When to use / when not to use
309
+
310
+ 2. **Examples**
311
+ - Interactive playground
312
+ - Common use cases
313
+ - Edge cases
314
+
315
+ 3. **API Reference**
316
+ - Props/parameters
317
+ - Types
318
+ - Default values
319
+
320
+ 4. **Design Guidelines**
321
+ - Visual specifications
322
+ - Do's and don'ts
323
+ - Spacing and layout
324
+
325
+ 5. **Accessibility**
326
+ - Keyboard interactions
327
+ - Screen reader behavior
328
+ - ARIA requirements
329
+
330
+ 6. **Related Components**
331
+ - Similar components
332
+ - Composability patterns
333
+
334
+ ### Documentation Tools
335
+
336
+ - **Storybook** - Component documentation and playground
337
+ - **Docusaurus** - Documentation websites
338
+ - **Zeroheight** - Design system documentation
339
+ - **Notion** - Lightweight documentation
340
+ - **Supernova** - Design token management
341
+
342
+ ---
343
+
344
+ ## Notable Design Systems
345
+
346
+ ### IBM Carbon Design System
347
+
348
+ ```
349
+ Open source, comprehensive
350
+ - React, Vue, Angular, Web Components
351
+ - Detailed accessibility guidelines
352
+ - Strong data visualization components
353
+ - Enterprise-focused
354
+
355
+ https://carbondesignsystem.com/
356
+ ```
357
+
358
+ ### Atlassian Design System
359
+
360
+ ```
361
+ Product design focus
362
+ - Detailed component documentation
363
+ - Design tokens approach
364
+ - Accessibility built-in
365
+ - Confluence, Jira, Trello patterns
366
+
367
+ https://atlassian.design/
368
+ ```
369
+
370
+ ### Salesforce Lightning
371
+
372
+ ```
373
+ Enterprise-grade
374
+ - Extensive component library
375
+ - Accessibility focused
376
+ - Mobile-responsive
377
+ - Customizable themes
378
+
379
+ https://www.lightningdesignsystem.com/
380
+ ```
381
+
382
+ ### Material Design (Google)
383
+
384
+ ```
385
+ Platform-agnostic design language
386
+ - Comprehensive guidelines
387
+ - Motion and animation specs
388
+ - Cross-platform support
389
+ - Open-source implementations
390
+
391
+ https://m3.material.io/
392
+ ```
393
+
394
+ ### Apple Human Interface Guidelines
395
+
396
+ ```
397
+ Platform-specific guidance
398
+ - iOS, macOS, watchOS, tvOS
399
+ - System component integration
400
+ - Platform conventions
401
+ - Design resources (Figma, Sketch)
402
+
403
+ https://developer.apple.com/design/
404
+ ```
405
+
406
+ ---
407
+
408
+ ## React Component Libraries (2026)
409
+
410
+ ### Untitled UI React
411
+
412
+ ```
413
+ - 10,000+ Figma components
414
+ - Tailwind CSS v4.1
415
+ - React Aria for accessibility
416
+ - TypeScript v5.8
417
+ - Most comprehensive free library
418
+ ```
419
+
420
+ ### React Aria Components (Adobe)
421
+
422
+ ```
423
+ - Unstyled, accessible
424
+ - ARIA patterns built-in
425
+ - Internationalization
426
+ - Keyboard navigation
427
+ - Foundation for custom systems
428
+ ```
429
+
430
+ ### Radix UI
431
+
432
+ ```
433
+ - Unstyled primitives
434
+ - Accessibility focused
435
+ - Composable
436
+ - Foundation for shadcn/ui
437
+ ```
438
+
439
+ ### shadcn/ui
440
+
441
+ ```
442
+ - Copy-paste components
443
+ - Tailwind + Radix
444
+ - Full customization
445
+ - Popular for rapid prototyping
446
+ ```
447
+
448
+ ### Chakra UI
449
+
450
+ ```
451
+ - Styled components
452
+ - Dark mode built-in
453
+ - Accessible
454
+ - Good DX
455
+ ```
456
+
457
+ ---
458
+
459
+ ## Governance & Contribution
460
+
461
+ ### Versioning
462
+
463
+ ```
464
+ Semantic versioning (SemVer):
465
+ MAJOR.MINOR.PATCH
466
+
467
+ MAJOR - Breaking changes
468
+ MINOR - New features (backward compatible)
469
+ PATCH - Bug fixes
470
+
471
+ Example: 2.3.1
472
+ - Version 2 (breaking changes from v1)
473
+ - 3 new feature additions
474
+ - 1 bug fix since last minor
475
+ ```
476
+
477
+ ### Change Log
478
+
479
+ ```markdown
480
+ ## [2.3.0] - 2025-01-15
481
+
482
+ ### Added
483
+ - New `Select` component
484
+ - Dark mode support for `Card`
485
+
486
+ ### Changed
487
+ - Updated Button padding tokens
488
+
489
+ ### Fixed
490
+ - Modal focus trap on Safari
491
+
492
+ ### Deprecated
493
+ - Legacy Grid component (use CSS Grid)
494
+ ```
495
+
496
+ ### Contribution Model
497
+
498
+ ```
499
+ Federated Model:
500
+ - Central team maintains core
501
+ - Product teams can contribute
502
+ - Review and approval process
503
+ - Clear contribution guidelines
504
+
505
+ Centralized Model:
506
+ - Dedicated DS team owns everything
507
+ - Product teams request features
508
+ - Slower but more consistent
509
+
510
+ Hybrid:
511
+ - Core components centralized
512
+ - Extensions/themes distributed
513
+ ```
514
+
515
+ ---
516
+
517
+ ## Building a Design System
518
+
519
+ ### Phases
520
+
521
+ ```
522
+ Phase 1: Audit
523
+ - Inventory existing UI
524
+ - Identify inconsistencies
525
+ - Prioritize components
526
+ - Define scope
527
+
528
+ Phase 2: Foundation
529
+ - Design tokens
530
+ - Core components (button, input)
531
+ - Basic documentation
532
+ - Initial adoption
533
+
534
+ Phase 3: Expansion
535
+ - More components
536
+ - Patterns and templates
537
+ - Contribution guidelines
538
+ - Advanced documentation
539
+
540
+ Phase 4: Maturity
541
+ - Full component library
542
+ - Governance processes
543
+ - Automated testing
544
+ - Continuous improvement
545
+ ```
546
+
547
+ ### Success Metrics
548
+
549
+ ```
550
+ Adoption:
551
+ - % of products using the system
552
+ - Component usage analytics
553
+ - Developer satisfaction
554
+
555
+ Quality:
556
+ - Accessibility audit scores
557
+ - Bug/issue counts
558
+ - Design consistency reviews
559
+
560
+ Efficiency:
561
+ - Time to build new features
562
+ - Reduced design/dev sync issues
563
+ - Code reuse metrics
564
+ ```
565
+
566
+ ---
567
+
568
+ ## Common Pitfalls
569
+
570
+ 1. **Building too much upfront** - Start small, iterate
571
+ 2. **No governance** - Define ownership and processes
572
+ 3. **Designer-dev disconnect** - Single source of truth
573
+ 4. **Outdated documentation** - Automate where possible
574
+ 5. **No adoption strategy** - Train teams, provide support
575
+ 6. **Ignoring accessibility** - Build in from the start
576
+ 7. **Over-engineering** - Solve current problems first
577
+ 8. **No versioning** - Breaking changes break trust
578
+ 9. **Component bloat** - Audit and deprecate regularly
579
+ 10. **Premature abstraction** - Wait for patterns to emerge
580
+
581
+ ---
582
+
583
+ ## Tools Ecosystem
584
+
585
+ ### Design
586
+
587
+ | Tool | Purpose |
588
+ |------|---------|
589
+ | Figma | Design and prototyping |
590
+ | Figma Tokens | Token management |
591
+ | Storybook | Component development |
592
+
593
+ ### Development
594
+
595
+ | Tool | Purpose |
596
+ |------|---------|
597
+ | Style Dictionary | Token transformation |
598
+ | Chromatic | Visual testing |
599
+ | Playwright/Testing Library | Component testing |
600
+
601
+ ### Documentation
602
+
603
+ | Tool | Purpose |
604
+ |------|---------|
605
+ | Storybook | Component docs |
606
+ | Supernova | DS documentation |
607
+ | Docusaurus | Website docs |
608
+
609
+ ---
610
+
611
+ ## Sources
612
+
613
+ - [Nielsen Norman - Design Systems 101](https://www.nngroup.com/articles/design-systems-101/)
614
+ - [Atlassian Design System](https://atlassian.design/)
615
+ - [Carbon Design System](https://carbondesignsystem.com/)
616
+ - Nathan Curtis - [EightShapes](https://eightshapes.com/)
617
+ - Brad Frost - [Atomic Design](https://atomicdesign.bradfrost.com/)
618
+ - [Design Systems Repo](https://designsystemsrepo.com/)