@rakeyshgidwani/roger-ui-bank-theme-stan-design 0.2.52 → 0.3.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 (125) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/dist/components/ui/button.d.ts +3 -1
  3. package/dist/components/ui/button.d.ts.map +1 -1
  4. package/dist/components/ui/button.esm.js +3 -2
  5. package/dist/components/ui/button.js +3 -2
  6. package/dist/components/ui/layout/container.d.ts +57 -0
  7. package/dist/components/ui/layout/container.d.ts.map +1 -0
  8. package/dist/components/ui/layout/container.esm.js +173 -0
  9. package/dist/components/ui/layout/container.js +173 -0
  10. package/dist/components/ui/layout/index.d.ts +9 -0
  11. package/dist/components/ui/layout/index.d.ts.map +1 -0
  12. package/dist/components/ui/layout/index.esm.js +6 -0
  13. package/dist/components/ui/layout/index.js +6 -0
  14. package/dist/components/ui/layout/responsive-grid.d.ts +93 -0
  15. package/dist/components/ui/layout/responsive-grid.d.ts.map +1 -0
  16. package/dist/components/ui/layout/responsive-grid.esm.js +124 -0
  17. package/dist/components/ui/layout/responsive-grid.js +124 -0
  18. package/dist/components/ui/navigation/index.d.ts +2 -1
  19. package/dist/components/ui/navigation/index.d.ts.map +1 -1
  20. package/dist/components/ui/navigation/index.esm.js +1 -0
  21. package/dist/components/ui/navigation/index.js +1 -0
  22. package/dist/components/ui/navigation/progressive-navigation.d.ts +37 -0
  23. package/dist/components/ui/navigation/progressive-navigation.d.ts.map +1 -0
  24. package/dist/components/ui/navigation/progressive-navigation.esm.js +145 -0
  25. package/dist/components/ui/navigation/progressive-navigation.js +145 -0
  26. package/dist/components/ui/navigation/types.d.ts +21 -0
  27. package/dist/components/ui/navigation/types.d.ts.map +1 -1
  28. package/dist/hooks/use-adaptive-layout.d.ts +2 -1
  29. package/dist/hooks/use-adaptive-layout.d.ts.map +1 -1
  30. package/dist/hooks/use-adaptive-layout.esm.js +13 -8
  31. package/dist/hooks/use-adaptive-layout.js +13 -8
  32. package/dist/hooks/use-device.d.ts +3 -1
  33. package/dist/hooks/use-device.d.ts.map +1 -1
  34. package/dist/hooks/use-device.esm.js +14 -7
  35. package/dist/hooks/use-device.js +14 -7
  36. package/dist/index.d.ts +19 -4
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.esm.js +9 -4
  39. package/dist/index.js +9 -4
  40. package/dist/plugins/css-purge-optimizer.d.ts +25 -0
  41. package/dist/plugins/css-purge-optimizer.d.ts.map +1 -0
  42. package/dist/plugins/css-purge-optimizer.esm.js +414 -0
  43. package/dist/plugins/css-purge-optimizer.js +414 -0
  44. package/dist/plugins/performance-monitor.d.ts +29 -0
  45. package/dist/plugins/performance-monitor.d.ts.map +1 -0
  46. package/dist/plugins/performance-monitor.esm.js +221 -0
  47. package/dist/plugins/performance-monitor.js +221 -0
  48. package/dist/plugins/progressive-css-loader.d.ts +21 -0
  49. package/dist/plugins/progressive-css-loader.d.ts.map +1 -0
  50. package/dist/plugins/progressive-css-loader.esm.js +227 -0
  51. package/dist/plugins/progressive-css-loader.js +227 -0
  52. package/dist/plugins/theme-css-generator.d.ts.map +1 -1
  53. package/dist/plugins/theme-css-generator.esm.js +19 -6
  54. package/dist/plugins/theme-css-generator.js +19 -6
  55. package/dist/styles.css +1025 -109
  56. package/dist/theme.d.ts.map +1 -1
  57. package/dist/theme.esm.js +4 -1
  58. package/dist/theme.js +4 -1
  59. package/dist/themes/phase1-constants.d.ts +23 -0
  60. package/dist/themes/phase1-constants.d.ts.map +1 -0
  61. package/dist/themes/phase1-constants.esm.js +180 -0
  62. package/dist/themes/phase1-constants.js +180 -0
  63. package/dist/themes/themes/default.d.ts.map +1 -1
  64. package/dist/themes/themes/default.esm.js +4 -1
  65. package/dist/themes/themes/default.js +4 -1
  66. package/dist/themes/themes/stan-design.d.ts.map +1 -1
  67. package/dist/themes/themes/stan-design.esm.js +4 -1
  68. package/dist/themes/themes/stan-design.js +4 -1
  69. package/dist/themes/types.d.ts +62 -0
  70. package/dist/themes/types.d.ts.map +1 -1
  71. package/dist/themes/validation.d.ts +17 -0
  72. package/dist/themes/validation.d.ts.map +1 -1
  73. package/dist/themes/validation.esm.js +218 -0
  74. package/dist/themes/validation.js +218 -0
  75. package/dist/types.d.ts +62 -0
  76. package/dist/types.d.ts.map +1 -1
  77. package/dist/utils/progressive-css-injector.d.ts +80 -0
  78. package/dist/utils/progressive-css-injector.d.ts.map +1 -0
  79. package/dist/utils/progressive-css-injector.esm.js +217 -0
  80. package/dist/utils/progressive-css-injector.js +217 -0
  81. package/package.json +1 -1
  82. package/src/components/ui/button.tsx +9 -6
  83. package/src/components/ui/layout/container.tsx +312 -0
  84. package/src/components/ui/layout/index.ts +10 -0
  85. package/src/components/ui/layout/responsive-grid.tsx +286 -0
  86. package/src/components/ui/navigation/index.ts +2 -0
  87. package/src/components/ui/navigation/progressive-navigation.tsx +453 -0
  88. package/src/components/ui/navigation/types.ts +41 -0
  89. package/src/hooks/use-adaptive-layout.ts +13 -9
  90. package/src/hooks/use-device.tsx +17 -10
  91. package/src/index.ts +19 -4
  92. package/src/plugins/css-purge-optimizer.ts +491 -0
  93. package/src/plugins/performance-monitor.ts +292 -0
  94. package/src/plugins/progressive-css-loader.ts +269 -0
  95. package/src/plugins/theme-css-generator.ts +22 -6
  96. package/src/styles/components/base/badge.css +2 -2
  97. package/src/styles/components/base/button.css +238 -35
  98. package/src/styles/components/base/card.css +2 -2
  99. package/src/styles/components/base/checkbox.css +3 -3
  100. package/src/styles/components/base/label.css +3 -3
  101. package/src/styles/components/feedback/skeleton.css +1 -1
  102. package/src/styles/components/feedback/toast.css +1 -1
  103. package/src/styles/components/index.css +3 -0
  104. package/src/styles/components/layout/container.css +466 -0
  105. package/src/styles/components/layout/index.css +5 -0
  106. package/src/styles/components/layout/responsive-grid.css +422 -0
  107. package/src/styles/components/navigation/breadcrumb.css +1 -1
  108. package/src/styles/components/navigation/index.css +1 -0
  109. package/src/styles/components/navigation/menu.css +2 -2
  110. package/src/styles/components/navigation/pagination.css +4 -4
  111. package/src/styles/components/navigation/progressive-navigation.css +633 -0
  112. package/src/styles/components/navigation/sidebar.css +4 -4
  113. package/src/styles/components/navigation/stepper.css +2 -2
  114. package/src/styles/components/navigation/tabs.css +1 -1
  115. package/src/styles/progressive.css +17 -0
  116. package/src/styles/themes/stan-design.css +103 -18
  117. package/src/styles/utilities/semantic-input-system.css +7 -13
  118. package/src/theme.ts +5 -1
  119. package/src/themes/phase1-constants.ts +189 -0
  120. package/src/themes/themes/default.ts +5 -1
  121. package/src/themes/themes/stan-design.ts +5 -1
  122. package/src/themes/types.ts +77 -1
  123. package/src/themes/validation.ts +249 -0
  124. package/src/types.ts +77 -1
  125. package/src/utils/progressive-css-injector.ts +254 -0
@@ -21,6 +21,13 @@
21
21
  --cs-breakpoints-desktop: 1024px;
22
22
  --cs-breakpoints-wide: 1280px;
23
23
  --cs-breakpoints-ultra: 1536px;
24
+ --cs-breakpoints-xs: 475px;
25
+ --cs-breakpoints-sm: 640px;
26
+ --cs-breakpoints-md: 768px;
27
+ --cs-breakpoints-lg: 1024px;
28
+ --cs-breakpoints-xl: 1280px;
29
+ --cs-breakpoints-2xl: 1536px;
30
+ --cs-breakpoints-3xl: 1920px;
24
31
 
25
32
  /* Custom Media Queries for Breakpoints */
26
33
  @custom-media --bp-mobile (min-width: 640px);
@@ -28,6 +35,13 @@
28
35
  @custom-media --bp-desktop (min-width: 1024px);
29
36
  @custom-media --bp-wide (min-width: 1280px);
30
37
  @custom-media --bp-ultra (min-width: 1536px);
38
+ @custom-media --bp-xs (min-width: 475px);
39
+ @custom-media --bp-sm (min-width: 640px);
40
+ @custom-media --bp-md (min-width: 768px);
41
+ @custom-media --bp-lg (min-width: 1024px);
42
+ @custom-media --bp-xl (min-width: 1280px);
43
+ @custom-media --bp-2xl (min-width: 1536px);
44
+ @custom-media --bp-3xl (min-width: 1920px);
31
45
 
32
46
  --cs-fonts-primary-family: Clash Display;
33
47
  --cs-fonts-primary-fallbacks: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
@@ -175,11 +189,6 @@
175
189
  --cs-colors-semantic-error-rgb: 239, 68, 68;
176
190
  --cs-colors-semantic-error-dark-rgb: 220, 38, 38;
177
191
  --cs-colors-semantic-info-rgb: 37, 99, 235;
178
- --cs-colors-semantic-success-rgb: 5, 150, 105;
179
- --cs-colors-semantic-warning-rgb: 245, 158, 11;
180
- --cs-colors-semantic-error-rgb: 239, 68, 68;
181
- --cs-colors-semantic-error-dark-rgb: 220, 38, 38;
182
- --cs-colors-semantic-info-rgb: 37, 99, 235;
183
192
  --cs-colors-neutral-50: #fafafa;
184
193
  --cs-colors-neutral-100: #f5f5f5;
185
194
  --cs-colors-neutral-200: #e5e5e5;
@@ -214,8 +223,6 @@
214
223
  --cs-colors-accent-rgb: 99, 102, 241;
215
224
  --cs-colors-border: #e5e7eb;
216
225
  --cs-colors-border-transparent: transparent;
217
- --cs-colors-text-primary: #111827;
218
- --cs-colors-text-secondary: #4b5563;
219
226
  --cs-navigation-layout: horizontal;
220
227
  --cs-navigation-style: enhanced;
221
228
  --cs-navigation-behavior: static;
@@ -323,11 +330,6 @@
323
330
  --cs-navigation-typography-letter-spacing-normal: 0;
324
331
  --cs-navigation-typography-letter-spacing-wide: 0.025em;
325
332
  --cs-navigation-typography-letter-spacing-wider: 0.05em;
326
- --cs-navigation-breakpoints-mobile: 640px;
327
- --cs-navigation-breakpoints-tablet: 768px;
328
- --cs-navigation-breakpoints-desktop: 1024px;
329
- --cs-navigation-breakpoints-wide: 1280px;
330
- --cs-navigation-breakpoints-ultra: 1536px;
331
333
  --cs-spacing-scale-xs: 0.25rem;
332
334
  --cs-spacing-scale-sm: 0.5rem;
333
335
  --cs-spacing-scale-md: 1rem;
@@ -425,6 +427,95 @@
425
427
  --cs-meta-preview: /themes/stan-design-preview.png;
426
428
  --cs-meta-created-at: 2024-12-01T00:00:00.000Z;
427
429
  --cs-meta-updated-at: 2024-12-01T00:00:00.000Z;
430
+ --cs-content-density-compact-spacing-section: 16px 24px;
431
+ --cs-content-density-compact-spacing-component: 8px 12px;
432
+ --cs-content-density-compact-spacing-element: 4px 8px;
433
+ --cs-content-density-compact-typography-scale: 0.875;
434
+ --cs-content-density-compact-typography-line-height: 1.4;
435
+ --cs-content-density-compact-touch-targets-minimum: 44px;
436
+ --cs-content-density-compact-touch-targets-preferred: 48px;
437
+ --cs-content-density-comfortable-spacing-section: 24px 32px;
438
+ --cs-content-density-comfortable-spacing-component: 12px 16px;
439
+ --cs-content-density-comfortable-spacing-element: 6px 12px;
440
+ --cs-content-density-comfortable-typography-scale: 1;
441
+ --cs-content-density-comfortable-typography-line-height: 1.5;
442
+ --cs-content-density-comfortable-touch-targets-minimum: 40px;
443
+ --cs-content-density-comfortable-touch-targets-preferred: 44px;
444
+ --cs-content-density-spacious-spacing-section: 32px 48px;
445
+ --cs-content-density-spacious-spacing-component: 16px 24px;
446
+ --cs-content-density-spacious-spacing-element: 8px 16px;
447
+ --cs-content-density-spacious-typography-scale: 1.125;
448
+ --cs-content-density-spacious-typography-line-height: 1.6;
449
+ --cs-responsive-typography-heading1-xs: 28px;
450
+ --cs-responsive-typography-heading1-sm: 32px;
451
+ --cs-responsive-typography-heading1-md: 36px;
452
+ --cs-responsive-typography-heading1-lg: 42px;
453
+ --cs-responsive-typography-heading1-xl: 48px;
454
+ --cs-responsive-typography-heading1-2xl: 56px;
455
+ --cs-responsive-typography-heading1-3xl: 64px;
456
+ --cs-responsive-typography-heading2-xs: 24px;
457
+ --cs-responsive-typography-heading2-sm: 26px;
458
+ --cs-responsive-typography-heading2-md: 28px;
459
+ --cs-responsive-typography-heading2-lg: 32px;
460
+ --cs-responsive-typography-heading2-xl: 36px;
461
+ --cs-responsive-typography-heading2-2xl: 40px;
462
+ --cs-responsive-typography-heading2-3xl: 44px;
463
+ --cs-responsive-typography-heading3-xs: 20px;
464
+ --cs-responsive-typography-heading3-sm: 22px;
465
+ --cs-responsive-typography-heading3-md: 24px;
466
+ --cs-responsive-typography-heading3-lg: 28px;
467
+ --cs-responsive-typography-heading3-xl: 30px;
468
+ --cs-responsive-typography-heading3-2xl: 32px;
469
+ --cs-responsive-typography-heading3-3xl: 36px;
470
+ --cs-responsive-typography-heading4-xs: 18px;
471
+ --cs-responsive-typography-heading4-sm: 20px;
472
+ --cs-responsive-typography-heading4-md: 22px;
473
+ --cs-responsive-typography-heading4-lg: 24px;
474
+ --cs-responsive-typography-heading4-xl: 26px;
475
+ --cs-responsive-typography-heading4-2xl: 28px;
476
+ --cs-responsive-typography-heading4-3xl: 30px;
477
+ --cs-responsive-typography-heading5-xs: 16px;
478
+ --cs-responsive-typography-heading5-sm: 18px;
479
+ --cs-responsive-typography-heading5-md: 20px;
480
+ --cs-responsive-typography-heading5-lg: 22px;
481
+ --cs-responsive-typography-heading5-xl: 24px;
482
+ --cs-responsive-typography-heading5-2xl: 26px;
483
+ --cs-responsive-typography-heading5-3xl: 28px;
484
+ --cs-responsive-typography-heading6-xs: 14px;
485
+ --cs-responsive-typography-heading6-sm: 16px;
486
+ --cs-responsive-typography-heading6-md: 18px;
487
+ --cs-responsive-typography-heading6-lg: 20px;
488
+ --cs-responsive-typography-heading6-xl: 22px;
489
+ --cs-responsive-typography-heading6-2xl: 24px;
490
+ --cs-responsive-typography-heading6-3xl: 26px;
491
+ --cs-responsive-typography-body-xs: 14px;
492
+ --cs-responsive-typography-body-sm: 15px;
493
+ --cs-responsive-typography-body-md: 16px;
494
+ --cs-responsive-typography-body-lg: 17px;
495
+ --cs-responsive-typography-body-xl: 18px;
496
+ --cs-responsive-typography-body-2xl: 18px;
497
+ --cs-responsive-typography-body-3xl: 19px;
498
+ --cs-responsive-typography-body-large-xs: 16px;
499
+ --cs-responsive-typography-body-large-sm: 17px;
500
+ --cs-responsive-typography-body-large-md: 18px;
501
+ --cs-responsive-typography-body-large-lg: 19px;
502
+ --cs-responsive-typography-body-large-xl: 20px;
503
+ --cs-responsive-typography-body-large-2xl: 21px;
504
+ --cs-responsive-typography-body-large-3xl: 22px;
505
+ --cs-responsive-typography-body-small-xs: 12px;
506
+ --cs-responsive-typography-body-small-sm: 13px;
507
+ --cs-responsive-typography-body-small-md: 14px;
508
+ --cs-responsive-typography-body-small-lg: 15px;
509
+ --cs-responsive-typography-body-small-xl: 16px;
510
+ --cs-responsive-typography-body-small-2xl: 16px;
511
+ --cs-responsive-typography-body-small-3xl: 17px;
512
+ --cs-responsive-typography-caption-xs: 11px;
513
+ --cs-responsive-typography-caption-sm: 12px;
514
+ --cs-responsive-typography-caption-md: 13px;
515
+ --cs-responsive-typography-caption-lg: 14px;
516
+ --cs-responsive-typography-caption-xl: 15px;
517
+ --cs-responsive-typography-caption-2xl: 15px;
518
+ --cs-responsive-typography-caption-3xl: 16px;
428
519
  --cs-modes-dark-colors-primary-50: #1e3a8a;
429
520
  --cs-modes-dark-colors-primary-100: #1e40af;
430
521
  --cs-modes-dark-colors-primary-200: #1d4ed8;
@@ -456,10 +547,6 @@
456
547
  --cs-modes-dark-colors-semantic-warning-rgb: 251, 191, 36;
457
548
  --cs-modes-dark-colors-semantic-error-rgb: 248, 113, 113;
458
549
  --cs-modes-dark-colors-semantic-info-rgb: 96, 165, 250;
459
- --cs-modes-dark-colors-semantic-success-rgb: 16, 185, 129;
460
- --cs-modes-dark-colors-semantic-warning-rgb: 251, 191, 36;
461
- --cs-modes-dark-colors-semantic-error-rgb: 248, 113, 113;
462
- --cs-modes-dark-colors-semantic-info-rgb: 96, 165, 250;
463
550
  --cs-modes-dark-colors-neutral-50: #171717;
464
551
  --cs-modes-dark-colors-neutral-100: #262626;
465
552
  --cs-modes-dark-colors-neutral-200: #404040;
@@ -493,8 +580,6 @@
493
580
  --cs-modes-dark-colors-primary-active: #60a5fa;
494
581
  --cs-modes-dark-colors-accent-rgb: 139, 92, 246;
495
582
  --cs-modes-dark-colors-border: #334155;
496
- --cs-modes-dark-colors-text-primary: #f8fafc;
497
- --cs-modes-dark-colors-text-secondary: #cbd5e1;
498
583
  }
499
584
 
500
585
  .dark {
@@ -29,32 +29,26 @@
29
29
  }
30
30
 
31
31
  /* Input Type Variants */
32
+ /* Note: inputmode, autocomplete, and autocapitalize are HTML attributes,
33
+ not CSS properties. These should be applied directly to HTML elements. */
32
34
  .semantic-input[type="email"] {
33
- inputmode: email;
34
- autocomplete: email;
35
- autocapitalize: none;
35
+ /* Email input styling */
36
36
  }
37
37
 
38
38
  .semantic-input[type="tel"] {
39
- inputmode: tel;
40
- autocomplete: tel;
41
- autocapitalize: none;
39
+ /* Telephone input styling */
42
40
  }
43
41
 
44
42
  .semantic-input[type="number"] {
45
- inputmode: decimal;
46
- autocomplete: off;
43
+ /* Number input styling */
47
44
  }
48
45
 
49
46
  .semantic-input[type="search"] {
50
- inputmode: search;
51
- autocomplete: off;
47
+ /* Search input styling */
52
48
  }
53
49
 
54
50
  .semantic-input[type="url"] {
55
- inputmode: url;
56
- autocomplete: url;
57
- autocapitalize: none;
51
+ /* URL input styling */
58
52
  }
59
53
 
60
54
  /* Mobile Keyboard Optimization */
package/src/theme.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { MultiThemeConfig } from './types';
2
+ import { getPhase1ThemeExtensions } from './themes/phase1-constants';
2
3
 
3
4
  /**
4
5
  * Stan Design Base Theme
@@ -679,5 +680,8 @@ export const stanDesignTheme: MultiThemeConfig = {
679
680
  },
680
681
 
681
682
  }
682
- }
683
+ },
684
+
685
+ // Phase 1 Enhancement: Use shared constants to prevent duplication
686
+ ...getPhase1ThemeExtensions()
683
687
  };
@@ -0,0 +1,189 @@
1
+ /**
2
+ * Phase 1 Enhancement: Shared Constants
3
+ *
4
+ * This file contains shared constants for the Phase 1 mobile support enhancement
5
+ * to ensure consistency across themes and prevent duplication.
6
+ */
7
+
8
+ import { BreakpointThemeConfig, ContentDensityThemeConfig, ResponsiveTypographyThemeConfig } from './types';
9
+
10
+ // Enhanced Breakpoint System - Shared across all themes
11
+ export const PHASE1_BREAKPOINTS: BreakpointThemeConfig = {
12
+ xs: '475px', // Large phones (iPhone 14 Plus, etc.)
13
+ sm: '640px', // Small tablets, large phones landscape
14
+ md: '768px', // Tablets (iPad Mini, etc.)
15
+ lg: '1024px', // Desktop, large tablets
16
+ xl: '1280px', // Large desktop (MacBook Pro 13")
17
+ '2xl': '1536px', // Ultra-wide (MacBook Pro 16", external monitors)
18
+ '3xl': '1920px' // Large external monitors, TV displays
19
+ };
20
+
21
+ // Content Density System - Shared across all themes
22
+ export const PHASE1_CONTENT_DENSITY: ContentDensityThemeConfig = {
23
+ compact: {
24
+ spacing: {
25
+ section: '16px 24px',
26
+ component: '8px 12px',
27
+ element: '4px 8px'
28
+ },
29
+ typography: {
30
+ scale: 0.875, // 14px base instead of 16px
31
+ lineHeight: 1.4
32
+ },
33
+ touchTargets: {
34
+ minimum: '44px', // Apple/WCAG recommendation
35
+ preferred: '48px'
36
+ }
37
+ },
38
+ comfortable: {
39
+ spacing: {
40
+ section: '24px 32px',
41
+ component: '12px 16px',
42
+ element: '6px 12px'
43
+ },
44
+ typography: {
45
+ scale: 1.0, // 16px base
46
+ lineHeight: 1.5
47
+ },
48
+ touchTargets: {
49
+ minimum: '40px',
50
+ preferred: '44px'
51
+ }
52
+ },
53
+ spacious: {
54
+ spacing: {
55
+ section: '32px 48px',
56
+ component: '16px 24px',
57
+ element: '8px 16px'
58
+ },
59
+ typography: {
60
+ scale: 1.125, // 18px base for better readability
61
+ lineHeight: 1.6
62
+ },
63
+ interactions: {
64
+ hover: true,
65
+ tooltips: true,
66
+ shortcuts: true
67
+ }
68
+ }
69
+ };
70
+
71
+ // Responsive Typography System - Shared across all themes
72
+ export const PHASE1_RESPONSIVE_TYPOGRAPHY: ResponsiveTypographyThemeConfig = {
73
+ heading1: {
74
+ xs: '28px', // Large phone
75
+ sm: '32px', // Small tablet
76
+ md: '36px', // Tablet
77
+ lg: '42px', // Desktop
78
+ xl: '48px', // Large desktop
79
+ '2xl': '56px', // Ultra-wide
80
+ '3xl': '64px' // Large displays
81
+ },
82
+ heading2: {
83
+ xs: '24px',
84
+ sm: '26px',
85
+ md: '28px',
86
+ lg: '32px',
87
+ xl: '36px',
88
+ '2xl': '40px',
89
+ '3xl': '44px'
90
+ },
91
+ heading3: {
92
+ xs: '20px',
93
+ sm: '22px',
94
+ md: '24px',
95
+ lg: '28px',
96
+ xl: '30px',
97
+ '2xl': '32px',
98
+ '3xl': '36px'
99
+ },
100
+ heading4: {
101
+ xs: '18px',
102
+ sm: '20px',
103
+ md: '22px',
104
+ lg: '24px',
105
+ xl: '26px',
106
+ '2xl': '28px',
107
+ '3xl': '30px'
108
+ },
109
+ heading5: {
110
+ xs: '16px',
111
+ sm: '18px',
112
+ md: '20px',
113
+ lg: '22px',
114
+ xl: '24px',
115
+ '2xl': '26px',
116
+ '3xl': '28px'
117
+ },
118
+ heading6: {
119
+ xs: '14px',
120
+ sm: '16px',
121
+ md: '18px',
122
+ lg: '20px',
123
+ xl: '22px',
124
+ '2xl': '24px',
125
+ '3xl': '26px'
126
+ },
127
+ body: {
128
+ xs: '14px',
129
+ sm: '15px',
130
+ md: '16px',
131
+ lg: '17px',
132
+ xl: '18px',
133
+ '2xl': '18px',
134
+ '3xl': '19px'
135
+ },
136
+ bodyLarge: {
137
+ xs: '16px',
138
+ sm: '17px',
139
+ md: '18px',
140
+ lg: '19px',
141
+ xl: '20px',
142
+ '2xl': '21px',
143
+ '3xl': '22px'
144
+ },
145
+ bodySmall: {
146
+ xs: '12px',
147
+ sm: '13px',
148
+ md: '14px',
149
+ lg: '15px',
150
+ xl: '16px',
151
+ '2xl': '16px',
152
+ '3xl': '17px'
153
+ },
154
+ caption: {
155
+ xs: '11px',
156
+ sm: '12px',
157
+ md: '13px',
158
+ lg: '14px',
159
+ xl: '15px',
160
+ '2xl': '15px',
161
+ '3xl': '16px'
162
+ }
163
+ };
164
+
165
+ /**
166
+ * Helper function to get complete Phase 1 configuration for any theme
167
+ */
168
+ export function getPhase1ThemeExtensions() {
169
+ return {
170
+ breakpoints: PHASE1_BREAKPOINTS,
171
+ contentDensity: PHASE1_CONTENT_DENSITY,
172
+ responsiveTypography: PHASE1_RESPONSIVE_TYPOGRAPHY
173
+ };
174
+ }
175
+
176
+ /**
177
+ * Helper function to check if a theme has Phase 1 compliance
178
+ */
179
+ export function isPhase1Compliant(theme: any): boolean {
180
+ return !!(
181
+ theme.breakpoints?.xs &&
182
+ theme.breakpoints?.['3xl'] &&
183
+ theme.contentDensity?.compact &&
184
+ theme.contentDensity?.comfortable &&
185
+ theme.contentDensity?.spacious &&
186
+ theme.responsiveTypography?.heading1?.xs &&
187
+ theme.responsiveTypography?.heading1?.['3xl']
188
+ );
189
+ }
@@ -1,4 +1,5 @@
1
1
  import { MultiThemeConfig } from '../types';
2
+ import { getPhase1ThemeExtensions } from '../phase1-constants';
2
3
 
3
4
  /**
4
5
  * Default Base Theme Configuration
@@ -582,5 +583,8 @@ export const defaultTheme: MultiThemeConfig = {
582
583
  preview: '/themes/default-preview.png',
583
584
  createdAt: '2024-12-01T00:00:00.000Z',
584
585
  updatedAt: '2024-12-01T00:00:00.000Z'
585
- }
586
+ },
587
+
588
+ // Phase 1 Enhancement: Use shared constants to prevent duplication
589
+ ...getPhase1ThemeExtensions()
586
590
  };
@@ -1,4 +1,5 @@
1
1
  import { MultiThemeConfig } from '../types';
2
+ import { getPhase1ThemeExtensions } from '../phase1-constants';
2
3
 
3
4
  /**
4
5
  * Stan Design Base Theme
@@ -679,5 +680,8 @@ export const stanDesignTheme: MultiThemeConfig = {
679
680
  },
680
681
 
681
682
  }
682
- }
683
+ },
684
+
685
+ // Phase 1 Enhancement: Use shared constants to prevent duplication
686
+ ...getPhase1ThemeExtensions()
683
687
  };
@@ -22,7 +22,12 @@ export interface MultiThemeConfig {
22
22
  shimmer: ShimmerThemeConfig;
23
23
  meta: ThemeMetadata;
24
24
  extends?: string; // Optional property for theme inheritance
25
-
25
+
26
+ // Phase 1 Enhancements: Breakpoint and Content Density Systems
27
+ breakpoints?: BreakpointThemeConfig;
28
+ contentDensity?: ContentDensityThemeConfig;
29
+ responsiveTypography?: ResponsiveTypographyThemeConfig;
30
+
26
31
  // NEW: Add light/dark mode configuration (colors only)
27
32
  modes?: {
28
33
  light?: {
@@ -462,3 +467,74 @@ export interface CompleteThemeConfig extends MultiThemeConfig {
462
467
  inheritance?: ThemeInheritance;
463
468
  validation: ThemeValidationResult;
464
469
  }
470
+
471
+ // Phase 1 Enhancement: Enhanced Breakpoint System
472
+ export interface BreakpointThemeConfig {
473
+ xs: string; // 475px - Large phones (iPhone 14 Plus, etc.)
474
+ sm: string; // 640px - Small tablets, large phones landscape
475
+ md: string; // 768px - Tablets (iPad Mini, etc.)
476
+ lg: string; // 1024px - Desktop, large tablets
477
+ xl: string; // 1280px - Large desktop (MacBook Pro 13")
478
+ '2xl': string; // 1536px - Ultra-wide (MacBook Pro 16", external monitors)
479
+ '3xl': string; // 1920px - Large external monitors, TV displays
480
+ }
481
+
482
+ // Phase 1 Enhancement: Content Density System
483
+ export interface ContentDensityThemeConfig {
484
+ compact: DensityLevel; // xs to md breakpoints
485
+ comfortable: DensityLevel; // md to lg breakpoints
486
+ spacious: DensityLevel; // lg+ breakpoints
487
+ }
488
+
489
+ export interface DensityLevel {
490
+ spacing: DensitySpacing;
491
+ typography: DensityTypography;
492
+ touchTargets?: DensityTouchTargets;
493
+ interactions?: DensityInteractions;
494
+ }
495
+
496
+ export interface DensitySpacing {
497
+ section: string; // Section-level spacing
498
+ component: string; // Component-level spacing
499
+ element: string; // Element-level spacing
500
+ }
501
+
502
+ export interface DensityTypography {
503
+ scale: number; // Typography scale multiplier
504
+ lineHeight: number; // Line height ratio
505
+ }
506
+
507
+ export interface DensityTouchTargets {
508
+ minimum: string; // Minimum touch target size
509
+ preferred: string; // Preferred touch target size
510
+ }
511
+
512
+ export interface DensityInteractions {
513
+ hover?: boolean; // Enable hover states
514
+ tooltips?: boolean; // Enable tooltips
515
+ shortcuts?: boolean; // Enable keyboard shortcuts
516
+ }
517
+
518
+ // Phase 1 Enhancement: Responsive Typography System
519
+ export interface ResponsiveTypographyThemeConfig {
520
+ heading1: ResponsiveTypographyScale;
521
+ heading2: ResponsiveTypographyScale;
522
+ heading3: ResponsiveTypographyScale;
523
+ heading4: ResponsiveTypographyScale;
524
+ heading5: ResponsiveTypographyScale;
525
+ heading6: ResponsiveTypographyScale;
526
+ body: ResponsiveTypographyScale;
527
+ bodyLarge: ResponsiveTypographyScale;
528
+ bodySmall: ResponsiveTypographyScale;
529
+ caption: ResponsiveTypographyScale;
530
+ }
531
+
532
+ export interface ResponsiveTypographyScale {
533
+ xs: string; // Large phone
534
+ sm: string; // Small tablet
535
+ md: string; // Tablet
536
+ lg: string; // Desktop
537
+ xl: string; // Large desktop
538
+ '2xl': string; // Ultra-wide
539
+ '3xl': string; // Large displays
540
+ }