Align Prop Names #38
Reference in New Issue
Block a user
Delete Branch "adilallo/maintenance/AlignPropNames"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Align Component Props with Figma Design Specifications
Overview
This PR aligns all component property names and values with Figma design specifications while maintaining full backward compatibility. Figma uses PascalCase for prop values (e.g., "Standard", "Inverse", "Default"), while the codebase uses lowercase. This change enables components to accept both formats and normalize internally, treating Figma as the source of truth.
Key Goals:
Changes
Core Infrastructure
lib/propNormalization.ts- Centralized normalization utilities with 20+ functions:normalizeMode()- Standard/Inverse modesnormalizeState()- Default/Hover/Focus/Selected statesnormalizeInputState()- Default/Active/Hover/Focus for inputsnormalizeVariant()- Generic variant normalizationnormalizeSize()- Generic size normalizationnormalizeLabelVariant()- Label variants (default/horizontal)normalizeSmallMediumLargeSize()- Small/medium/large sizesComponents Updated (50+ components)
Form Components:
indicatorprop from Figma)Core UI Components:
Navigation & Layout:
Content Components:
Card & Display Components:
Feature Components:
Context & Menu Components:
Utility Components:
Development Rules
.cursorrules- Development guidelines for:.cursorrulesto.gitignore- Keeps local development rules out of repositoryType System Updates
"small" | "medium" | "Small" | "Medium"How to Test
// Existing lowercase usage should still work