1- /**
2- * SubTrackr Design System - Complete Documentation
3- *
4- * This document provides comprehensive guidance on using the design system
5- * for consistent, accessible, and maintainable UI development.
6- * /
1+ /\*\*
2+
3+ - SubTrackr Design System - Complete Documentation
4+ -
5+ - This document provides comprehensive guidance on using the design system
6+ - for consistent, accessible, and maintainable UI development.
7+ \* /
78
89# SubTrackr Design System Documentation
910
@@ -28,6 +29,7 @@ The SubTrackr Design System provides a comprehensive set of design tokens, compo
2829The design system uses a semantic color system with three built-in themes:
2930
3031#### Dark Theme (Default)
32+
3133- ** Primary** : #6366f1 (Indigo)
3234- ** Secondary** : #8b5cf6 (Purple)
3335- ** Accent** : #06b6d4 (Cyan)
@@ -37,9 +39,11 @@ The design system uses a semantic color system with three built-in themes:
3739- ** Info** : #0ea5e9 (Sky)
3840
3941#### Light Theme
42+
4043Optimized for daytime use with adjusted saturation and contrast.
4144
4245#### High Contrast Theme
46+
4347WCAG AAA compliant with 7:1 minimum contrast ratios for accessibility.
4448
4549### Spacing
@@ -343,10 +347,10 @@ All components support standard accessibility props:
343347
344348``` typescript
345349interface AccessibilityProps {
346- accessibilityLabel: string ; // Required - screen reader label
347- accessibilityHint? : string ; // Optional - additional context
348- accessibilityRole? : string ; // Optional - semantic role
349- testID? : string ; // Optional - testing identifier
350+ accessibilityLabel: string ; // Required - screen reader label
351+ accessibilityHint? : string ; // Optional - additional context
352+ accessibilityRole? : string ; // Optional - semantic role
353+ testID? : string ; // Optional - testing identifier
350354}
351355```
352356
@@ -420,8 +424,8 @@ if (isIOS()) {
420424
421425// Conditional values
422426const elevation = getPlatformValue (
423- 4 , // iOS shadow
424- 8 , // Android elevation
427+ 4 , // iOS shadow
428+ 8 , // Android elevation
425429 ' 0 2px 4px rgba(0,0,0,0.1)' // Web box-shadow
426430);
427431```
@@ -493,6 +497,7 @@ npm test src/design-system
493497```
494498
495499Tests cover:
500+
496501- Component rendering
497502- User interactions
498503- Accessibility compliance
@@ -506,6 +511,7 @@ npm run e2e:test-android
506511```
507512
508513E2E tests verify:
514+
509515- Visual consistency across platforms
510516- Theme application
511517- RTL layout
@@ -531,15 +537,15 @@ const handleChange = (field: string, value: string) => {
531537
532538const handleSubmit = () => {
533539 const newErrors: Record <string , string > = {};
534-
540+
535541 if (! isValidEmail (formData .email )) {
536542 newErrors .email = ' Invalid email address' ;
537543 }
538-
544+
539545 if (! isValidAmount (formData .amount )) {
540546 newErrors .amount = ' Amount must be between $1-$1000' ;
541547 }
542-
548+
543549 if (Object .keys (newErrors ).length === 0 ) {
544550 // Submit form
545551 } else {
@@ -612,6 +618,7 @@ To migrate existing components to use the design system:
612618## Support
613619
614620For questions or issues with the design system:
621+
6156221 . Check this documentation
6166232 . Review Storybook examples
6176243 . Check existing tests
0 commit comments