Skip to content

CAP foundations migration#618

Draft
NataliaBar wants to merge 17 commits intomicrosoft:mainfrom
NataliaBar:ds-migration
Draft

CAP foundations migration#618
NataliaBar wants to merge 17 commits intomicrosoft:mainfrom
NataliaBar:ds-migration

Conversation

@NataliaBar
Copy link
Contributor

@NataliaBar NataliaBar commented Mar 16, 2026

🚀 cap-foundations Migration: Complete Design System Foundation
Migrates cap-foundations from experimental workspace to production-ready design system in fluentui-contrib with full SSR compatibility and React integration.

📦 What's Added

Core Package (@fluentui-contrib/cap-foundations-core)
✅ Design Tokens: Spacing, typography, colors, shadows, animations
✅ Dynamic Color System: 80+ semantic color groups with auto-contrast
✅ Theme Pipeline: JSON → CSS generation (35KB output)
✅ Runtime Bootstrap: Theme switching + localStorage persistence

React Package (@fluentui-contrib/cap-foundations-react)
✅ ThemeProvider: Context + hooks for theme management
✅ First Component: Button with 5 variants, 3 sizes, full a11y
✅ Storybook: Standalone setup with token verification

🛠️ Technical Highlights

  • SSR-Safe: All browser APIs properly guarded with typeof checks
  • Zero Dependencies: Pure TypeScript color math, no external libs
  • Build Pipeline: Automated CSS/JS generation via Nx targets
  • TypeScript: Full type safety with JSON schema validation
  • Testing: 32 passing tests with Jest + jsdom

🔗 Quick Start

# Theme generation
nx run cap-foundations-core:build-themes

# Storybook
nx run cap-foundations-react:storybook # → localhost:4401

⚠️ Breaking Changes
Package rename: @fluentui-contrib/cap-foundations → @fluentui-contrib/cap-foundations-core
API namespace: UIKit.* → CapFoundations.*

@NataliaBar NataliaBar changed the title Ds migration CAP foundations migration Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants