@rakeyshgidwani/roger-ui-bank-theme-harvey 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.
- package/CHANGELOG.md +1 -1
- package/dist/components/ui/button.d.ts +3 -1
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.esm.js +3 -2
- package/dist/components/ui/button.js +3 -2
- package/dist/components/ui/layout/container.d.ts +57 -0
- package/dist/components/ui/layout/container.d.ts.map +1 -0
- package/dist/components/ui/layout/container.esm.js +173 -0
- package/dist/components/ui/layout/container.js +173 -0
- package/dist/components/ui/layout/index.d.ts +9 -0
- package/dist/components/ui/layout/index.d.ts.map +1 -0
- package/dist/components/ui/layout/index.esm.js +6 -0
- package/dist/components/ui/layout/index.js +6 -0
- package/dist/components/ui/layout/responsive-grid.d.ts +93 -0
- package/dist/components/ui/layout/responsive-grid.d.ts.map +1 -0
- package/dist/components/ui/layout/responsive-grid.esm.js +124 -0
- package/dist/components/ui/layout/responsive-grid.js +124 -0
- package/dist/components/ui/navigation/index.d.ts +2 -1
- package/dist/components/ui/navigation/index.d.ts.map +1 -1
- package/dist/components/ui/navigation/index.esm.js +1 -0
- package/dist/components/ui/navigation/index.js +1 -0
- package/dist/components/ui/navigation/progressive-navigation.d.ts +37 -0
- package/dist/components/ui/navigation/progressive-navigation.d.ts.map +1 -0
- package/dist/components/ui/navigation/progressive-navigation.esm.js +145 -0
- package/dist/components/ui/navigation/progressive-navigation.js +145 -0
- package/dist/components/ui/navigation/types.d.ts +21 -0
- package/dist/components/ui/navigation/types.d.ts.map +1 -1
- package/dist/hooks/use-adaptive-layout.d.ts +2 -1
- package/dist/hooks/use-adaptive-layout.d.ts.map +1 -1
- package/dist/hooks/use-adaptive-layout.esm.js +13 -8
- package/dist/hooks/use-adaptive-layout.js +13 -8
- package/dist/hooks/use-device.d.ts +3 -1
- package/dist/hooks/use-device.d.ts.map +1 -1
- package/dist/hooks/use-device.esm.js +14 -7
- package/dist/hooks/use-device.js +14 -7
- package/dist/index.d.ts +19 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +9 -4
- package/dist/index.js +9 -4
- package/dist/plugins/css-purge-optimizer.d.ts +25 -0
- package/dist/plugins/css-purge-optimizer.d.ts.map +1 -0
- package/dist/plugins/css-purge-optimizer.esm.js +414 -0
- package/dist/plugins/css-purge-optimizer.js +414 -0
- package/dist/plugins/performance-monitor.d.ts +29 -0
- package/dist/plugins/performance-monitor.d.ts.map +1 -0
- package/dist/plugins/performance-monitor.esm.js +221 -0
- package/dist/plugins/performance-monitor.js +221 -0
- package/dist/plugins/progressive-css-loader.d.ts +21 -0
- package/dist/plugins/progressive-css-loader.d.ts.map +1 -0
- package/dist/plugins/progressive-css-loader.esm.js +227 -0
- package/dist/plugins/progressive-css-loader.js +227 -0
- package/dist/plugins/theme-css-generator.d.ts.map +1 -1
- package/dist/plugins/theme-css-generator.esm.js +19 -6
- package/dist/plugins/theme-css-generator.js +19 -6
- package/dist/styles.css +1025 -110
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.esm.js +4 -1
- package/dist/theme.js +4 -1
- package/dist/themes/phase1-constants.d.ts +23 -0
- package/dist/themes/phase1-constants.d.ts.map +1 -0
- package/dist/themes/phase1-constants.esm.js +180 -0
- package/dist/themes/phase1-constants.js +180 -0
- package/dist/themes/themes/default.d.ts.map +1 -1
- package/dist/themes/themes/default.esm.js +4 -1
- package/dist/themes/themes/default.js +4 -1
- package/dist/themes/themes/harvey.d.ts.map +1 -1
- package/dist/themes/themes/harvey.esm.js +4 -1
- package/dist/themes/themes/harvey.js +4 -1
- package/dist/themes/types.d.ts +62 -0
- package/dist/themes/types.d.ts.map +1 -1
- package/dist/themes/validation.d.ts +17 -0
- package/dist/themes/validation.d.ts.map +1 -1
- package/dist/themes/validation.esm.js +218 -0
- package/dist/themes/validation.js +218 -0
- package/dist/types.d.ts +62 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/progressive-css-injector.d.ts +80 -0
- package/dist/utils/progressive-css-injector.d.ts.map +1 -0
- package/dist/utils/progressive-css-injector.esm.js +217 -0
- package/dist/utils/progressive-css-injector.js +217 -0
- package/package.json +1 -1
- package/src/components/ui/button.tsx +9 -6
- package/src/components/ui/layout/container.tsx +312 -0
- package/src/components/ui/layout/index.ts +10 -0
- package/src/components/ui/layout/responsive-grid.tsx +286 -0
- package/src/components/ui/navigation/index.ts +2 -0
- package/src/components/ui/navigation/progressive-navigation.tsx +453 -0
- package/src/components/ui/navigation/types.ts +41 -0
- package/src/hooks/use-adaptive-layout.ts +13 -9
- package/src/hooks/use-device.tsx +17 -10
- package/src/index.ts +19 -4
- package/src/plugins/css-purge-optimizer.ts +491 -0
- package/src/plugins/performance-monitor.ts +292 -0
- package/src/plugins/progressive-css-loader.ts +269 -0
- package/src/plugins/theme-css-generator.ts +22 -6
- package/src/styles/components/base/badge.css +2 -2
- package/src/styles/components/base/button.css +238 -35
- package/src/styles/components/base/card.css +2 -2
- package/src/styles/components/base/checkbox.css +3 -3
- package/src/styles/components/base/label.css +3 -3
- package/src/styles/components/feedback/skeleton.css +1 -1
- package/src/styles/components/feedback/toast.css +1 -1
- package/src/styles/components/index.css +3 -0
- package/src/styles/components/layout/container.css +466 -0
- package/src/styles/components/layout/index.css +5 -0
- package/src/styles/components/layout/responsive-grid.css +422 -0
- package/src/styles/components/navigation/breadcrumb.css +1 -1
- package/src/styles/components/navigation/index.css +1 -0
- package/src/styles/components/navigation/menu.css +2 -2
- package/src/styles/components/navigation/pagination.css +4 -4
- package/src/styles/components/navigation/progressive-navigation.css +633 -0
- package/src/styles/components/navigation/sidebar.css +4 -4
- package/src/styles/components/navigation/stepper.css +2 -2
- package/src/styles/components/navigation/tabs.css +1 -1
- package/src/styles/progressive.css +17 -0
- package/src/styles/themes/harvey.css +103 -19
- package/src/styles/utilities/semantic-input-system.css +7 -13
- package/src/theme.ts +5 -1
- package/src/themes/phase1-constants.ts +189 -0
- package/src/themes/themes/default.ts +5 -1
- package/src/themes/themes/harvey.ts +5 -1
- package/src/themes/types.ts +77 -1
- package/src/themes/validation.ts +249 -0
- package/src/types.ts +77 -1
- package/src/utils/progressive-css-injector.ts +254 -0
|
@@ -7,6 +7,13 @@
|
|
|
7
7
|
--cs-breakpoints-desktop: 1024px;
|
|
8
8
|
--cs-breakpoints-wide: 1280px;
|
|
9
9
|
--cs-breakpoints-ultra: 1536px;
|
|
10
|
+
--cs-breakpoints-xs: 475px;
|
|
11
|
+
--cs-breakpoints-sm: 640px;
|
|
12
|
+
--cs-breakpoints-md: 768px;
|
|
13
|
+
--cs-breakpoints-lg: 1024px;
|
|
14
|
+
--cs-breakpoints-xl: 1280px;
|
|
15
|
+
--cs-breakpoints-2xl: 1536px;
|
|
16
|
+
--cs-breakpoints-3xl: 1920px;
|
|
10
17
|
|
|
11
18
|
/* Custom Media Queries for Breakpoints */
|
|
12
19
|
@custom-media --bp-mobile (min-width: 640px);
|
|
@@ -14,6 +21,13 @@
|
|
|
14
21
|
@custom-media --bp-desktop (min-width: 1024px);
|
|
15
22
|
@custom-media --bp-wide (min-width: 1280px);
|
|
16
23
|
@custom-media --bp-ultra (min-width: 1536px);
|
|
24
|
+
@custom-media --bp-xs (min-width: 475px);
|
|
25
|
+
@custom-media --bp-sm (min-width: 640px);
|
|
26
|
+
@custom-media --bp-md (min-width: 768px);
|
|
27
|
+
@custom-media --bp-lg (min-width: 1024px);
|
|
28
|
+
@custom-media --bp-xl (min-width: 1280px);
|
|
29
|
+
@custom-media --bp-2xl (min-width: 1536px);
|
|
30
|
+
@custom-media --bp-3xl (min-width: 1920px);
|
|
17
31
|
|
|
18
32
|
--cs-fonts-primary-family: Inter;
|
|
19
33
|
--cs-fonts-primary-fallbacks: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
|
|
@@ -159,11 +173,6 @@
|
|
|
159
173
|
--cs-colors-semantic-error-rgb: 217, 48, 37;
|
|
160
174
|
--cs-colors-semantic-error-dark-rgb: 161, 32, 23;
|
|
161
175
|
--cs-colors-semantic-info-rgb: 0, 123, 206;
|
|
162
|
-
--cs-colors-semantic-success-rgb: 30, 130, 76;
|
|
163
|
-
--cs-colors-semantic-warning-rgb: 230, 162, 60;
|
|
164
|
-
--cs-colors-semantic-error-rgb: 217, 48, 37;
|
|
165
|
-
--cs-colors-semantic-error-dark-rgb: 161, 32, 23;
|
|
166
|
-
--cs-colors-semantic-info-rgb: 0, 123, 206;
|
|
167
176
|
--cs-colors-neutral-50: #FAFAFA;
|
|
168
177
|
--cs-colors-neutral-100: #F4F4F4;
|
|
169
178
|
--cs-colors-neutral-200: #E8E8E8;
|
|
@@ -198,8 +207,6 @@
|
|
|
198
207
|
--cs-colors-accent-rgb: 245, 218, 167;
|
|
199
208
|
--cs-colors-border: #EAD7C0;
|
|
200
209
|
--cs-colors-border-transparent: transparent;
|
|
201
|
-
--cs-colors-text-primary: #2B1212;
|
|
202
|
-
--cs-colors-text-secondary: #5E3A3A;
|
|
203
210
|
--cs-navigation-layout: horizontal;
|
|
204
211
|
--cs-navigation-style: enhanced;
|
|
205
212
|
--cs-navigation-behavior: static;
|
|
@@ -307,11 +314,6 @@
|
|
|
307
314
|
--cs-navigation-typography-letter-spacing-normal: 0;
|
|
308
315
|
--cs-navigation-typography-letter-spacing-wide: 0.025em;
|
|
309
316
|
--cs-navigation-typography-letter-spacing-wider: 0.05em;
|
|
310
|
-
--cs-navigation-breakpoints-mobile: 640px;
|
|
311
|
-
--cs-navigation-breakpoints-tablet: 768px;
|
|
312
|
-
--cs-navigation-breakpoints-desktop: 1024px;
|
|
313
|
-
--cs-navigation-breakpoints-wide: 1280px;
|
|
314
|
-
--cs-navigation-breakpoints-ultra: 1536px;
|
|
315
317
|
--cs-spacing-scale-xs: 0.25rem;
|
|
316
318
|
--cs-spacing-scale-sm: 0.5rem;
|
|
317
319
|
--cs-spacing-scale-md: 1rem;
|
|
@@ -409,6 +411,95 @@
|
|
|
409
411
|
--cs-meta-preview: /themes/harvey-creative-preview.png;
|
|
410
412
|
--cs-meta-created-at: 2024-12-01T00:00:00.000Z;
|
|
411
413
|
--cs-meta-updated-at: 2024-12-01T00:00:00.000Z;
|
|
414
|
+
--cs-content-density-compact-spacing-section: 16px 24px;
|
|
415
|
+
--cs-content-density-compact-spacing-component: 8px 12px;
|
|
416
|
+
--cs-content-density-compact-spacing-element: 4px 8px;
|
|
417
|
+
--cs-content-density-compact-typography-scale: 0.875;
|
|
418
|
+
--cs-content-density-compact-typography-line-height: 1.4;
|
|
419
|
+
--cs-content-density-compact-touch-targets-minimum: 44px;
|
|
420
|
+
--cs-content-density-compact-touch-targets-preferred: 48px;
|
|
421
|
+
--cs-content-density-comfortable-spacing-section: 24px 32px;
|
|
422
|
+
--cs-content-density-comfortable-spacing-component: 12px 16px;
|
|
423
|
+
--cs-content-density-comfortable-spacing-element: 6px 12px;
|
|
424
|
+
--cs-content-density-comfortable-typography-scale: 1;
|
|
425
|
+
--cs-content-density-comfortable-typography-line-height: 1.5;
|
|
426
|
+
--cs-content-density-comfortable-touch-targets-minimum: 40px;
|
|
427
|
+
--cs-content-density-comfortable-touch-targets-preferred: 44px;
|
|
428
|
+
--cs-content-density-spacious-spacing-section: 32px 48px;
|
|
429
|
+
--cs-content-density-spacious-spacing-component: 16px 24px;
|
|
430
|
+
--cs-content-density-spacious-spacing-element: 8px 16px;
|
|
431
|
+
--cs-content-density-spacious-typography-scale: 1.125;
|
|
432
|
+
--cs-content-density-spacious-typography-line-height: 1.6;
|
|
433
|
+
--cs-responsive-typography-heading1-xs: 28px;
|
|
434
|
+
--cs-responsive-typography-heading1-sm: 32px;
|
|
435
|
+
--cs-responsive-typography-heading1-md: 36px;
|
|
436
|
+
--cs-responsive-typography-heading1-lg: 42px;
|
|
437
|
+
--cs-responsive-typography-heading1-xl: 48px;
|
|
438
|
+
--cs-responsive-typography-heading1-2xl: 56px;
|
|
439
|
+
--cs-responsive-typography-heading1-3xl: 64px;
|
|
440
|
+
--cs-responsive-typography-heading2-xs: 24px;
|
|
441
|
+
--cs-responsive-typography-heading2-sm: 26px;
|
|
442
|
+
--cs-responsive-typography-heading2-md: 28px;
|
|
443
|
+
--cs-responsive-typography-heading2-lg: 32px;
|
|
444
|
+
--cs-responsive-typography-heading2-xl: 36px;
|
|
445
|
+
--cs-responsive-typography-heading2-2xl: 40px;
|
|
446
|
+
--cs-responsive-typography-heading2-3xl: 44px;
|
|
447
|
+
--cs-responsive-typography-heading3-xs: 20px;
|
|
448
|
+
--cs-responsive-typography-heading3-sm: 22px;
|
|
449
|
+
--cs-responsive-typography-heading3-md: 24px;
|
|
450
|
+
--cs-responsive-typography-heading3-lg: 28px;
|
|
451
|
+
--cs-responsive-typography-heading3-xl: 30px;
|
|
452
|
+
--cs-responsive-typography-heading3-2xl: 32px;
|
|
453
|
+
--cs-responsive-typography-heading3-3xl: 36px;
|
|
454
|
+
--cs-responsive-typography-heading4-xs: 18px;
|
|
455
|
+
--cs-responsive-typography-heading4-sm: 20px;
|
|
456
|
+
--cs-responsive-typography-heading4-md: 22px;
|
|
457
|
+
--cs-responsive-typography-heading4-lg: 24px;
|
|
458
|
+
--cs-responsive-typography-heading4-xl: 26px;
|
|
459
|
+
--cs-responsive-typography-heading4-2xl: 28px;
|
|
460
|
+
--cs-responsive-typography-heading4-3xl: 30px;
|
|
461
|
+
--cs-responsive-typography-heading5-xs: 16px;
|
|
462
|
+
--cs-responsive-typography-heading5-sm: 18px;
|
|
463
|
+
--cs-responsive-typography-heading5-md: 20px;
|
|
464
|
+
--cs-responsive-typography-heading5-lg: 22px;
|
|
465
|
+
--cs-responsive-typography-heading5-xl: 24px;
|
|
466
|
+
--cs-responsive-typography-heading5-2xl: 26px;
|
|
467
|
+
--cs-responsive-typography-heading5-3xl: 28px;
|
|
468
|
+
--cs-responsive-typography-heading6-xs: 14px;
|
|
469
|
+
--cs-responsive-typography-heading6-sm: 16px;
|
|
470
|
+
--cs-responsive-typography-heading6-md: 18px;
|
|
471
|
+
--cs-responsive-typography-heading6-lg: 20px;
|
|
472
|
+
--cs-responsive-typography-heading6-xl: 22px;
|
|
473
|
+
--cs-responsive-typography-heading6-2xl: 24px;
|
|
474
|
+
--cs-responsive-typography-heading6-3xl: 26px;
|
|
475
|
+
--cs-responsive-typography-body-xs: 14px;
|
|
476
|
+
--cs-responsive-typography-body-sm: 15px;
|
|
477
|
+
--cs-responsive-typography-body-md: 16px;
|
|
478
|
+
--cs-responsive-typography-body-lg: 17px;
|
|
479
|
+
--cs-responsive-typography-body-xl: 18px;
|
|
480
|
+
--cs-responsive-typography-body-2xl: 18px;
|
|
481
|
+
--cs-responsive-typography-body-3xl: 19px;
|
|
482
|
+
--cs-responsive-typography-body-large-xs: 16px;
|
|
483
|
+
--cs-responsive-typography-body-large-sm: 17px;
|
|
484
|
+
--cs-responsive-typography-body-large-md: 18px;
|
|
485
|
+
--cs-responsive-typography-body-large-lg: 19px;
|
|
486
|
+
--cs-responsive-typography-body-large-xl: 20px;
|
|
487
|
+
--cs-responsive-typography-body-large-2xl: 21px;
|
|
488
|
+
--cs-responsive-typography-body-large-3xl: 22px;
|
|
489
|
+
--cs-responsive-typography-body-small-xs: 12px;
|
|
490
|
+
--cs-responsive-typography-body-small-sm: 13px;
|
|
491
|
+
--cs-responsive-typography-body-small-md: 14px;
|
|
492
|
+
--cs-responsive-typography-body-small-lg: 15px;
|
|
493
|
+
--cs-responsive-typography-body-small-xl: 16px;
|
|
494
|
+
--cs-responsive-typography-body-small-2xl: 16px;
|
|
495
|
+
--cs-responsive-typography-body-small-3xl: 17px;
|
|
496
|
+
--cs-responsive-typography-caption-xs: 11px;
|
|
497
|
+
--cs-responsive-typography-caption-sm: 12px;
|
|
498
|
+
--cs-responsive-typography-caption-md: 13px;
|
|
499
|
+
--cs-responsive-typography-caption-lg: 14px;
|
|
500
|
+
--cs-responsive-typography-caption-xl: 15px;
|
|
501
|
+
--cs-responsive-typography-caption-2xl: 15px;
|
|
502
|
+
--cs-responsive-typography-caption-3xl: 16px;
|
|
412
503
|
--cs-modes-dark-colors-primary-50: #2B1212;
|
|
413
504
|
--cs-modes-dark-colors-primary-100: #421414;
|
|
414
505
|
--cs-modes-dark-colors-primary-200: #662222;
|
|
@@ -442,11 +533,6 @@
|
|
|
442
533
|
--cs-modes-dark-colors-semantic-error-rgb: 248, 113, 113;
|
|
443
534
|
--cs-modes-dark-colors-semantic-error-dark-rgb: 185, 28, 28;
|
|
444
535
|
--cs-modes-dark-colors-semantic-info-rgb: 96, 165, 250;
|
|
445
|
-
--cs-modes-dark-colors-semantic-success-rgb: 52, 211, 153;
|
|
446
|
-
--cs-modes-dark-colors-semantic-warning-rgb: 251, 191, 36;
|
|
447
|
-
--cs-modes-dark-colors-semantic-error-rgb: 248, 113, 113;
|
|
448
|
-
--cs-modes-dark-colors-semantic-error-dark-rgb: 185, 28, 28;
|
|
449
|
-
--cs-modes-dark-colors-semantic-info-rgb: 96, 165, 250;
|
|
450
536
|
--cs-modes-dark-colors-neutral-50: #121212;
|
|
451
537
|
--cs-modes-dark-colors-neutral-100: #1A1A1A;
|
|
452
538
|
--cs-modes-dark-colors-neutral-200: #232323;
|
|
@@ -480,8 +566,6 @@
|
|
|
480
566
|
--cs-modes-dark-colors-primary-active: #E8A9A9;
|
|
481
567
|
--cs-modes-dark-colors-accent-rgb: 234, 207, 141;
|
|
482
568
|
--cs-modes-dark-colors-border: #3C1818;
|
|
483
|
-
--cs-modes-dark-colors-text-primary: #F5DAA7;
|
|
484
|
-
--cs-modes-dark-colors-text-secondary: #EACF8D;
|
|
485
569
|
}
|
|
486
570
|
|
|
487
571
|
.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
|
-
|
|
34
|
-
autocomplete: email;
|
|
35
|
-
autocapitalize: none;
|
|
35
|
+
/* Email input styling */
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
.semantic-input[type="tel"] {
|
|
39
|
-
|
|
40
|
-
autocomplete: tel;
|
|
41
|
-
autocapitalize: none;
|
|
39
|
+
/* Telephone input styling */
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
.semantic-input[type="number"] {
|
|
45
|
-
|
|
46
|
-
autocomplete: off;
|
|
43
|
+
/* Number input styling */
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
.semantic-input[type="search"] {
|
|
50
|
-
|
|
51
|
-
autocomplete: off;
|
|
47
|
+
/* Search input styling */
|
|
52
48
|
}
|
|
53
49
|
|
|
54
50
|
.semantic-input[type="url"] {
|
|
55
|
-
|
|
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
|
* Harvey Creative Theme
|
|
@@ -675,5 +676,8 @@ export const harveyTheme: MultiThemeConfig = {
|
|
|
675
676
|
'text-secondary': '#EACF8D'
|
|
676
677
|
}
|
|
677
678
|
}
|
|
678
|
-
}
|
|
679
|
+
},
|
|
680
|
+
|
|
681
|
+
// Phase 1 Enhancement: Use shared constants to prevent duplication
|
|
682
|
+
...getPhase1ThemeExtensions()
|
|
679
683
|
};
|
|
@@ -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
|
* Harvey Creative Theme
|
|
@@ -675,5 +676,8 @@ export const harveyTheme: MultiThemeConfig = {
|
|
|
675
676
|
'text-secondary': '#EACF8D'
|
|
676
677
|
}
|
|
677
678
|
}
|
|
678
|
-
}
|
|
679
|
+
},
|
|
680
|
+
|
|
681
|
+
// Phase 1 Enhancement: Use shared constants to prevent duplication
|
|
682
|
+
...getPhase1ThemeExtensions()
|
|
679
683
|
};
|
package/src/themes/types.ts
CHANGED
|
@@ -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
|
+
}
|