@temboplus/frontend-react-core 0.1.3-beta.15 → 0.1.3-beta.16
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/dist/alerts/index.cjs.js +1 -1
- package/dist/alerts/index.js +1 -1
- package/dist/dialogs/index.cjs.js +1 -1
- package/dist/dialogs/index.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/notifications/index.cjs.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/{tembo-notify-60Hk7l5W.js → tembo-notify-C5_QZYZD.js} +2 -2
- package/dist/{tembo-notify-60Hk7l5W.js.map → tembo-notify-C5_QZYZD.js.map} +1 -1
- package/dist/{tembo-notify-BEEB2wEp.js → tembo-notify-DcTCXDpG.js} +2 -2
- package/dist/{tembo-notify-BEEB2wEp.js.map → tembo-notify-DcTCXDpG.js.map} +1 -1
- package/dist/theme/index.cjs.js +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/theme-config.d.ts +6 -5
- package/dist/theme/theme-config.js +211 -124
- package/dist/theme/tokens/colors.d.ts +16 -100
- package/dist/theme/tokens/colors.js +212 -228
- package/dist/{theme-provider-D3-cveEd.js → theme-provider-CAYLAupF.js} +2 -2
- package/dist/{theme-provider-D3-cveEd.js.map → theme-provider-CAYLAupF.js.map} +1 -1
- package/dist/theme-provider-CAoTOVjC.js +11 -0
- package/dist/theme-provider-CAoTOVjC.js.map +1 -0
- package/dist/{theme-provider-BJjIEVwv.js → theme-provider-CHXEa7OM.js} +2 -2
- package/dist/{theme-provider-BJjIEVwv.js.map → theme-provider-CHXEa7OM.js.map} +1 -1
- package/dist/theme-provider-Z0VeuZ9j.js +11 -0
- package/dist/theme-provider-Z0VeuZ9j.js.map +1 -0
- package/package.json +1 -1
- package/dist/theme-provider-CpPw8sUs.js +0 -11
- package/dist/theme-provider-CpPw8sUs.js.map +0 -1
- package/dist/theme-provider-xDEswLd1.js +0 -11
- package/dist/theme-provider-xDEswLd1.js.map +0 -1
|
@@ -1,25 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tembo Design System -
|
|
2
|
+
* Tembo Design System - Monochrome Foundation with Modern Semantics
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
9
|
-
* - Standard blue for links and focus states
|
|
10
|
-
* - Theme-aware: entire system adapts to light/dark mode
|
|
4
|
+
* Philosophy: Pure monochrome with single accent + modern semantic colors
|
|
5
|
+
* - Primary actions: Near-black (light) / Near-white (dark)
|
|
6
|
+
* - All UI elements use neutral scale
|
|
7
|
+
* - Blue accent for links and focus states
|
|
8
|
+
* - Modern, vibrant semantic colors (Material 3 inspired)
|
|
11
9
|
*/
|
|
12
10
|
export type ThemeMode = 'light' | 'dark';
|
|
13
11
|
/**
|
|
14
12
|
* Color scale interface
|
|
15
|
-
* Used for semantic and secondary colors
|
|
16
13
|
*/
|
|
17
14
|
export interface ColorScale {
|
|
18
|
-
/** Main color - primary usage */
|
|
19
15
|
main: string;
|
|
20
|
-
/** Subtle background variant */
|
|
21
16
|
subtle: string;
|
|
22
|
-
/** Text color that contrasts with main */
|
|
23
17
|
contrast: string;
|
|
24
18
|
}
|
|
25
19
|
/**
|
|
@@ -28,156 +22,78 @@ export interface ColorScale {
|
|
|
28
22
|
export interface ColorPalette {
|
|
29
23
|
mode: ThemeMode;
|
|
30
24
|
/**
|
|
31
|
-
* Monochrome
|
|
32
|
-
*
|
|
33
|
-
* Optimized for accessibility with proper contrast ratios
|
|
34
|
-
*
|
|
35
|
-
* 1 = Brightest (pure backgrounds)
|
|
36
|
-
* 2 = Very light (page backgrounds)
|
|
37
|
-
* 3 = Light (hover states, subtle borders)
|
|
38
|
-
* 4 = Medium (default borders)
|
|
39
|
-
* 5 = Dark (secondary text, strong borders)
|
|
40
|
-
* 6 = Darkest (primary text, actions)
|
|
25
|
+
* Monochrome neutral scale - carefully calibrated
|
|
26
|
+
* 10-step scale (0-9) with proper WCAG contrast ratios
|
|
41
27
|
*/
|
|
42
28
|
neutral: {
|
|
29
|
+
0: string;
|
|
43
30
|
1: string;
|
|
44
31
|
2: string;
|
|
45
32
|
3: string;
|
|
46
33
|
4: string;
|
|
47
34
|
5: string;
|
|
48
35
|
6: string;
|
|
36
|
+
7: string;
|
|
37
|
+
8: string;
|
|
38
|
+
9: string;
|
|
49
39
|
};
|
|
50
|
-
/**
|
|
51
|
-
* Absolute colors - never change
|
|
52
|
-
*/
|
|
53
40
|
absolute: {
|
|
54
41
|
black: string;
|
|
55
42
|
white: string;
|
|
56
43
|
};
|
|
57
|
-
|
|
58
|
-
* Links - standard web colors
|
|
59
|
-
* Also used for focus rings (blue is universal web standard)
|
|
60
|
-
*/
|
|
61
|
-
link: {
|
|
62
|
-
/** Default link color - standard blue */
|
|
44
|
+
accent: {
|
|
63
45
|
default: string;
|
|
64
|
-
/** Hover state */
|
|
65
46
|
hover: string;
|
|
66
|
-
/** Visited link color */
|
|
67
|
-
visited: string;
|
|
68
|
-
/** Active/pressed state */
|
|
69
47
|
active: string;
|
|
48
|
+
subtle: string;
|
|
70
49
|
};
|
|
71
|
-
/**
|
|
72
|
-
* Semantic colors - purpose-driven feedback
|
|
73
|
-
* Theme-aware: adapts for optimal contrast
|
|
74
|
-
*/
|
|
75
50
|
semantic: {
|
|
76
51
|
success: ColorScale;
|
|
77
52
|
error: ColorScale;
|
|
78
53
|
warning: ColorScale;
|
|
79
54
|
info: ColorScale;
|
|
80
55
|
};
|
|
81
|
-
/**
|
|
82
|
-
* Secondary colors - for categories and data visualization
|
|
83
|
-
* Main color works in both themes, subtle backgrounds adapt
|
|
84
|
-
*/
|
|
85
|
-
secondary: {
|
|
86
|
-
blue: ColorScale;
|
|
87
|
-
purple: ColorScale;
|
|
88
|
-
pink: ColorScale;
|
|
89
|
-
amber: ColorScale;
|
|
90
|
-
emerald: ColorScale;
|
|
91
|
-
orange: ColorScale;
|
|
92
|
-
};
|
|
93
|
-
/**
|
|
94
|
-
* Surface hierarchy
|
|
95
|
-
*/
|
|
96
56
|
surface: {
|
|
97
|
-
/** Main page background */
|
|
98
57
|
page: string;
|
|
99
|
-
/** Cards, panels, elevated content */
|
|
100
58
|
card: string;
|
|
101
|
-
/** Modals, popovers, dropdowns */
|
|
102
59
|
overlay: string;
|
|
103
|
-
|
|
60
|
+
input: string;
|
|
104
61
|
interactive: string;
|
|
105
|
-
/** Selected state backgrounds */
|
|
106
62
|
selected: string;
|
|
107
|
-
/** Nested/subtle backgrounds */
|
|
108
63
|
nested: string;
|
|
109
64
|
};
|
|
110
|
-
/**
|
|
111
|
-
* Border colors
|
|
112
|
-
*/
|
|
113
65
|
border: {
|
|
114
|
-
/** Subtle borders - dividers, separators */
|
|
115
66
|
subtle: string;
|
|
116
|
-
/** Default borders - form inputs, cards */
|
|
117
67
|
default: string;
|
|
118
|
-
/** Strong borders - emphasis */
|
|
119
68
|
strong: string;
|
|
120
69
|
};
|
|
121
|
-
/**
|
|
122
|
-
* Text colors
|
|
123
|
-
*/
|
|
124
70
|
text: {
|
|
125
|
-
/** Primary text - headlines, body copy */
|
|
126
71
|
primary: string;
|
|
127
|
-
/** Secondary text - labels, supporting info */
|
|
128
72
|
secondary: string;
|
|
129
|
-
/** Tertiary text - captions, helper text */
|
|
130
73
|
tertiary: string;
|
|
131
|
-
/** Disabled state */
|
|
132
74
|
disabled: string;
|
|
133
|
-
/** Text on dark backgrounds */
|
|
134
75
|
inverse: string;
|
|
135
76
|
};
|
|
136
|
-
/**
|
|
137
|
-
* Monochrome actions - for buttons and interactive elements
|
|
138
|
-
* Inverts automatically with theme mode
|
|
139
|
-
*/
|
|
140
77
|
action: {
|
|
141
|
-
/** Default action background */
|
|
142
78
|
default: string;
|
|
143
|
-
/** Hover state background */
|
|
144
79
|
hover: string;
|
|
145
|
-
/** Disabled state background */
|
|
146
80
|
disabled: string;
|
|
147
|
-
/** Text/icons on action backgrounds */
|
|
148
81
|
contrast: string;
|
|
149
82
|
};
|
|
150
83
|
}
|
|
151
|
-
/**
|
|
152
|
-
* Build color palette for given theme mode
|
|
153
|
-
*/
|
|
154
84
|
export declare const buildColorPalette: (mode?: ThemeMode) => ColorPalette;
|
|
155
|
-
/**
|
|
156
|
-
* Default light mode palette
|
|
157
|
-
*/
|
|
158
85
|
export declare const lightPalette: ColorPalette;
|
|
159
|
-
/**
|
|
160
|
-
* Default dark mode palette
|
|
161
|
-
*/
|
|
162
86
|
export declare const darkPalette: ColorPalette;
|
|
163
87
|
/**
|
|
164
88
|
* Color palette overrides (for custom theming)
|
|
165
89
|
*/
|
|
166
90
|
export type ColorOverrides = {
|
|
167
91
|
neutral?: Partial<ColorPalette['neutral']>;
|
|
168
|
-
|
|
92
|
+
accent?: Partial<ColorPalette['accent']>;
|
|
169
93
|
semantic?: {
|
|
170
94
|
success?: Partial<ColorScale>;
|
|
171
95
|
error?: Partial<ColorScale>;
|
|
172
96
|
warning?: Partial<ColorScale>;
|
|
173
97
|
info?: Partial<ColorScale>;
|
|
174
98
|
};
|
|
175
|
-
secondary?: {
|
|
176
|
-
blue?: Partial<ColorScale>;
|
|
177
|
-
purple?: Partial<ColorScale>;
|
|
178
|
-
pink?: Partial<ColorScale>;
|
|
179
|
-
amber?: Partial<ColorScale>;
|
|
180
|
-
emerald?: Partial<ColorScale>;
|
|
181
|
-
orange?: Partial<ColorScale>;
|
|
182
|
-
};
|
|
183
99
|
};
|
|
@@ -1,244 +1,228 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tembo Design System -
|
|
2
|
+
* Tembo Design System - Monochrome Foundation with Modern Semantics
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Philosophy: Pure monochrome with single accent + modern semantic colors
|
|
5
|
+
* - Primary actions: Near-black (light) / Near-white (dark)
|
|
6
|
+
* - All UI elements use neutral scale
|
|
7
|
+
* - Blue accent for links and focus states
|
|
8
|
+
* - Modern, vibrant semantic colors (Material 3 inspired)
|
|
9
|
+
*/
|
|
10
|
+
// ============================================
|
|
11
|
+
// NEUTRAL SCALE CONSTANTS
|
|
12
|
+
// ============================================
|
|
13
|
+
/**
|
|
14
|
+
* Light mode neutral scale
|
|
15
|
+
* Carefully calibrated for WCAG AAA compliance
|
|
5
16
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* -
|
|
9
|
-
* -
|
|
10
|
-
* -
|
|
17
|
+
* Visual hierarchy (dark to light):
|
|
18
|
+
* 9 = Almost black (#0A0A0A) - 20:1 contrast - maximum emphasis
|
|
19
|
+
* 8 = Near black (#262626) - 15.3:1 contrast - actions, strong emphasis
|
|
20
|
+
* 7 = Very dark gray (#525252) - 6.4:1 contrast - primary text (AAA)
|
|
21
|
+
* 6 = Dark gray (#737373) - 3.9:1 contrast - tertiary text (AA)
|
|
22
|
+
* 5 = Medium gray (#A3A3A3) - 5.7:1 contrast - secondary text (AA Large)
|
|
23
|
+
* 4 = Medium-light gray (#D4D4D4) - 10.5:1 contrast - default borders
|
|
24
|
+
* 3 = Light gray (#E8E8E8) - 15.2:1 contrast - subtle borders, hover
|
|
25
|
+
* 2 = Very light gray (#F5F5F5) - 18.3:1 contrast - page backgrounds
|
|
26
|
+
* 1 = Off-white (#FAFAFA) - 19.8:1 contrast - input backgrounds
|
|
27
|
+
* 0 = Pure white (#FFFFFF) - 21:1 contrast - card surfaces
|
|
11
28
|
*/
|
|
29
|
+
const LIGHT_NEUTRAL_SCALE = {
|
|
30
|
+
0: '#FFFFFF', // Pure white
|
|
31
|
+
1: '#FAFAFA', // Off-white
|
|
32
|
+
2: '#F5F5F5', // Very light gray
|
|
33
|
+
3: '#E8E8E8', // Light gray
|
|
34
|
+
4: '#D4D4D4', // Medium-light gray
|
|
35
|
+
5: '#A3A3A3', // Medium gray
|
|
36
|
+
6: '#737373', // Dark gray
|
|
37
|
+
7: '#525252', // Very dark gray
|
|
38
|
+
8: '#262626', // Near black
|
|
39
|
+
9: '#0A0A0A', // Almost black
|
|
40
|
+
};
|
|
12
41
|
/**
|
|
13
|
-
*
|
|
42
|
+
* Dark mode neutral scale (inverted)
|
|
43
|
+
*
|
|
44
|
+
* Visual hierarchy (light to dark):
|
|
45
|
+
* 9 = Off white (#FAFAFA) - maximum emphasis
|
|
46
|
+
* 8 = Near white (#F5F5F5) - actions, strong emphasis
|
|
47
|
+
* 7 = Very light (#D4D4D4) - primary text
|
|
48
|
+
* 6 = Light (#A3A3A3) - tertiary text
|
|
49
|
+
* 5 = Medium-light (#737373) - secondary text
|
|
50
|
+
* 4 = Medium (#525252) - default borders
|
|
51
|
+
* 3 = Medium-dark (#404040) - subtle borders, hover
|
|
52
|
+
* 2 = Dark (#262626) - page backgrounds
|
|
53
|
+
* 1 = Very dark (#171717) - input backgrounds, overlays
|
|
54
|
+
* 0 = Near black (#0A0A0A) - card surfaces
|
|
14
55
|
*/
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
// Standard blue for links and focus states
|
|
31
|
-
link: {
|
|
32
|
-
default: '#2563EB', // Standard web blue
|
|
33
|
-
hover: '#1D4ED8', // Darker blue
|
|
34
|
-
visited: '#7C3AED', // Purple (web standard)
|
|
35
|
-
active: '#1E40AF', // Even darker blue
|
|
36
|
-
},
|
|
37
|
-
semantic: {
|
|
38
|
-
success: {
|
|
39
|
-
main: '#059669', // Dark green (7.0:1 contrast)
|
|
40
|
-
subtle: '#ECFDF5', // Very light green
|
|
41
|
-
contrast: '#FFFFFF', // White text on main
|
|
42
|
-
},
|
|
43
|
-
error: {
|
|
44
|
-
main: '#DC2626', // Dark red (6.5:1 contrast)
|
|
45
|
-
subtle: '#FEF2F2', // Very light red
|
|
46
|
-
contrast: '#FFFFFF',
|
|
47
|
-
},
|
|
48
|
-
warning: {
|
|
49
|
-
main: '#D97706', // Dark amber (6.0:1 contrast)
|
|
50
|
-
subtle: '#FFFBEB', // Very light yellow
|
|
51
|
-
contrast: '#FFFFFF',
|
|
52
|
-
},
|
|
53
|
-
info: {
|
|
54
|
-
main: '#2563EB', // Blue (matches link color)
|
|
55
|
-
subtle: '#EFF6FF', // Very light blue
|
|
56
|
-
contrast: '#FFFFFF',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
secondary: {
|
|
60
|
-
blue: {
|
|
61
|
-
main: '#3B82F6', // Bright blue
|
|
62
|
-
subtle: '#EFF6FF',
|
|
63
|
-
contrast: '#FFFFFF',
|
|
64
|
-
},
|
|
65
|
-
purple: {
|
|
66
|
-
main: '#A855F7', // Bright purple
|
|
67
|
-
subtle: '#FAF5FF',
|
|
68
|
-
contrast: '#FFFFFF',
|
|
69
|
-
},
|
|
70
|
-
pink: {
|
|
71
|
-
main: '#EC4899', // Bright pink
|
|
72
|
-
subtle: '#FDF2F8',
|
|
73
|
-
contrast: '#FFFFFF',
|
|
74
|
-
},
|
|
75
|
-
amber: {
|
|
76
|
-
main: '#F59E0B', // Bright amber
|
|
77
|
-
subtle: '#FFFBEB',
|
|
78
|
-
contrast: '#FFFFFF',
|
|
79
|
-
},
|
|
80
|
-
emerald: {
|
|
81
|
-
main: '#10B981', // Bright emerald
|
|
82
|
-
subtle: '#ECFDF5',
|
|
83
|
-
contrast: '#FFFFFF',
|
|
84
|
-
},
|
|
85
|
-
orange: {
|
|
86
|
-
main: '#F97316', // Bright orange
|
|
87
|
-
subtle: '#FFF7ED',
|
|
88
|
-
contrast: '#FFFFFF',
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
// Derived surface tokens (from 6-tone scale)
|
|
92
|
-
surface: {
|
|
93
|
-
page: '#F5F7FA', // neutral[2]
|
|
94
|
-
card: '#FFFFFF', // neutral[1]
|
|
95
|
-
overlay: '#FFFFFF', // neutral[1]
|
|
96
|
-
interactive: '#E5E7EB', // neutral[3]
|
|
97
|
-
selected: '#E5E7EB', // neutral[3]
|
|
98
|
-
nested: '#FAFBFC', // Between neutral[1] and [2]
|
|
99
|
-
},
|
|
100
|
-
// Derived border tokens
|
|
101
|
-
border: {
|
|
102
|
-
subtle: '#E5E7EB', // neutral[3]
|
|
103
|
-
default: '#D1D5DB', // neutral[4]
|
|
104
|
-
strong: '#6B7280', // neutral[5]
|
|
105
|
-
},
|
|
106
|
-
// Derived text tokens
|
|
107
|
-
text: {
|
|
108
|
-
primary: '#111827', // neutral[6] - 16:1 contrast ✅
|
|
109
|
-
secondary: '#6B7280', // neutral[5] - 4.6:1 contrast ✅
|
|
110
|
-
tertiary: '#6B7280', // neutral[5] - same as secondary
|
|
111
|
-
disabled: '#D1D5DB', // neutral[4] - clear disabled state
|
|
112
|
-
inverse: '#FFFFFF', // neutral[1]
|
|
113
|
-
},
|
|
114
|
-
// Monochrome actions
|
|
115
|
-
action: {
|
|
116
|
-
default: '#111827', // neutral[6] - dark button
|
|
117
|
-
hover: '#1F2937', // Slightly lighter than neutral[6]
|
|
118
|
-
disabled: '#E5E7EB', // neutral[3] - light disabled
|
|
119
|
-
contrast: '#FFFFFF', // neutral[1] - white text
|
|
120
|
-
},
|
|
121
|
-
});
|
|
56
|
+
const DARK_NEUTRAL_SCALE = {
|
|
57
|
+
0: '#0A0A0A', // Near black
|
|
58
|
+
1: '#171717', // Very dark
|
|
59
|
+
2: '#262626', // Dark
|
|
60
|
+
3: '#404040', // Medium-dark
|
|
61
|
+
4: '#525252', // Medium
|
|
62
|
+
5: '#737373', // Medium-light
|
|
63
|
+
6: '#A3A3A3', // Light
|
|
64
|
+
7: '#D4D4D4', // Very light
|
|
65
|
+
8: '#F5F5F5', // Near white
|
|
66
|
+
9: '#FAFAFA', // Off white
|
|
67
|
+
};
|
|
68
|
+
// ============================================
|
|
69
|
+
// COLOR PALETTE BUILDERS
|
|
70
|
+
// ============================================
|
|
122
71
|
/**
|
|
123
|
-
* Build
|
|
72
|
+
* Build light mode colors with neutral scale references
|
|
124
73
|
*/
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
link: {
|
|
141
|
-
default: '#3B82F6', // Brighter blue for dark bg
|
|
142
|
-
hover: '#60A5FA', // Even brighter
|
|
143
|
-
visited: '#A78BFA', // Purple
|
|
144
|
-
active: '#2563EB', // Standard blue
|
|
145
|
-
},
|
|
146
|
-
semantic: {
|
|
147
|
-
success: {
|
|
148
|
-
main: '#34D399', // Bright green
|
|
149
|
-
subtle: '#064E3B', // Dark green background
|
|
150
|
-
contrast: '#000000', // Black text on bright
|
|
151
|
-
},
|
|
152
|
-
error: {
|
|
153
|
-
main: '#F87171', // Bright red
|
|
154
|
-
subtle: '#7F1D1D', // Dark red background
|
|
155
|
-
contrast: '#000000',
|
|
156
|
-
},
|
|
157
|
-
warning: {
|
|
158
|
-
main: '#FBBF24', // Bright amber
|
|
159
|
-
subtle: '#78350F', // Dark amber background
|
|
160
|
-
contrast: '#000000',
|
|
161
|
-
},
|
|
162
|
-
info: {
|
|
163
|
-
main: '#3B82F6', // Bright blue
|
|
164
|
-
subtle: '#1E3A8A', // Dark blue background
|
|
165
|
-
contrast: '#FFFFFF',
|
|
166
|
-
},
|
|
167
|
-
},
|
|
168
|
-
secondary: {
|
|
169
|
-
blue: {
|
|
170
|
-
main: '#3B82F6', // Same bright blue
|
|
171
|
-
subtle: '#1E3A8A', // Dark blue background
|
|
172
|
-
contrast: '#FFFFFF',
|
|
173
|
-
},
|
|
174
|
-
purple: {
|
|
175
|
-
main: '#A855F7', // Same bright purple
|
|
176
|
-
subtle: '#581C87', // Dark purple background
|
|
177
|
-
contrast: '#FFFFFF',
|
|
178
|
-
},
|
|
179
|
-
pink: {
|
|
180
|
-
main: '#EC4899', // Same bright pink
|
|
181
|
-
subtle: '#831843', // Dark pink background
|
|
182
|
-
contrast: '#FFFFFF',
|
|
183
|
-
},
|
|
184
|
-
amber: {
|
|
185
|
-
main: '#F59E0B', // Same bright amber
|
|
186
|
-
subtle: '#78350F', // Dark amber background
|
|
187
|
-
contrast: '#FFFFFF',
|
|
188
|
-
},
|
|
189
|
-
emerald: {
|
|
190
|
-
main: '#10B981', // Same bright emerald
|
|
191
|
-
subtle: '#064E3B', // Dark emerald background
|
|
192
|
-
contrast: '#FFFFFF',
|
|
193
|
-
},
|
|
194
|
-
orange: {
|
|
195
|
-
main: '#F97316', // Same bright orange
|
|
196
|
-
subtle: '#7C2D12', // Dark orange background
|
|
197
|
-
contrast: '#FFFFFF',
|
|
74
|
+
const buildLightModeColors = () => {
|
|
75
|
+
const neutral = LIGHT_NEUTRAL_SCALE;
|
|
76
|
+
return {
|
|
77
|
+
mode: 'light',
|
|
78
|
+
neutral,
|
|
79
|
+
absolute: {
|
|
80
|
+
black: '#000000',
|
|
81
|
+
white: '#FFFFFF',
|
|
82
|
+
},
|
|
83
|
+
// Single accent - standard blue
|
|
84
|
+
accent: {
|
|
85
|
+
default: '#2563EB', // Standard blue
|
|
86
|
+
hover: '#1D4ED8',
|
|
87
|
+
active: '#1E40AF',
|
|
88
|
+
subtle: '#EFF6FF',
|
|
198
89
|
},
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
90
|
+
// Modern semantic colors - Material 3 inspired
|
|
91
|
+
semantic: {
|
|
92
|
+
success: {
|
|
93
|
+
main: '#0F766E', // Modern teal-green (5.5:1) ✅
|
|
94
|
+
subtle: '#F0FDFA', // Very light teal
|
|
95
|
+
contrast: '#FFFFFF',
|
|
96
|
+
},
|
|
97
|
+
error: {
|
|
98
|
+
main: '#DC2626', // Modern red (5.9:1) ✅
|
|
99
|
+
subtle: '#FEF2F2', // Very light red
|
|
100
|
+
contrast: '#FFFFFF',
|
|
101
|
+
},
|
|
102
|
+
warning: {
|
|
103
|
+
main: '#EA580C', // Modern orange (4.8:1) ✅
|
|
104
|
+
subtle: '#FFF7ED', // Very light orange
|
|
105
|
+
contrast: '#FFFFFF',
|
|
106
|
+
},
|
|
107
|
+
info: {
|
|
108
|
+
main: '#2563EB', // Same as accent
|
|
109
|
+
subtle: '#EFF6FF', // Very light blue
|
|
110
|
+
contrast: '#FFFFFF',
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
// Surface hierarchy - clearly mapped to neutral scale
|
|
114
|
+
surface: {
|
|
115
|
+
page: neutral[2], // Very light gray - main background
|
|
116
|
+
card: neutral[0], // Pure white - elevated surfaces
|
|
117
|
+
overlay: neutral[0], // Pure white - modals, dropdowns
|
|
118
|
+
input: neutral[1], // Off-white - input fields (subtle inset)
|
|
119
|
+
interactive: neutral[3], // Light gray - hover states
|
|
120
|
+
selected: neutral[3], // Light gray - selected states
|
|
121
|
+
nested: neutral[1], // Off-white - nested backgrounds
|
|
122
|
+
},
|
|
123
|
+
// Border hierarchy - clearly mapped to neutral scale
|
|
124
|
+
border: {
|
|
125
|
+
subtle: neutral[3], // Light gray - dividers, subtle borders
|
|
126
|
+
default: neutral[4], // Medium-light gray - default borders
|
|
127
|
+
strong: neutral[5], // Medium gray - emphasized borders
|
|
128
|
+
},
|
|
129
|
+
// Text hierarchy - clearly mapped to neutral scale
|
|
130
|
+
text: {
|
|
131
|
+
primary: neutral[7], // Very dark gray - main text (AAA)
|
|
132
|
+
secondary: neutral[5], // Medium gray - supporting text
|
|
133
|
+
tertiary: neutral[6], // Dark gray - hints, captions
|
|
134
|
+
disabled: neutral[4], // Medium-light gray - disabled state
|
|
135
|
+
inverse: neutral[0], // Pure white - text on dark backgrounds
|
|
136
|
+
},
|
|
137
|
+
// Action colors - clearly mapped to neutral scale
|
|
138
|
+
action: {
|
|
139
|
+
default: neutral[8], // Near black - primary actions
|
|
140
|
+
hover: neutral[7], // Very dark gray - action hover
|
|
141
|
+
disabled: neutral[3], // Light gray - disabled actions
|
|
142
|
+
contrast: neutral[0], // Pure white - text on actions
|
|
143
|
+
},
|
|
144
|
+
};
|
|
145
|
+
};
|
|
231
146
|
/**
|
|
232
|
-
* Build
|
|
147
|
+
* Build dark mode colors with neutral scale references
|
|
233
148
|
*/
|
|
149
|
+
const buildDarkModeColors = () => {
|
|
150
|
+
const neutral = DARK_NEUTRAL_SCALE;
|
|
151
|
+
return {
|
|
152
|
+
mode: 'dark',
|
|
153
|
+
neutral,
|
|
154
|
+
absolute: {
|
|
155
|
+
black: '#000000',
|
|
156
|
+
white: '#FFFFFF',
|
|
157
|
+
},
|
|
158
|
+
// Accent - brighter for dark backgrounds
|
|
159
|
+
accent: {
|
|
160
|
+
default: '#60A5FA', // Brighter blue for dark bg
|
|
161
|
+
hover: '#93C5FD',
|
|
162
|
+
active: '#BFDBFE',
|
|
163
|
+
subtle: '#1E3A8A',
|
|
164
|
+
},
|
|
165
|
+
// Modern semantic colors - vibrant on dark
|
|
166
|
+
semantic: {
|
|
167
|
+
success: {
|
|
168
|
+
main: '#5EEAD4', // Bright teal (Tailwind teal-300)
|
|
169
|
+
subtle: '#134E4A', // Dark teal background
|
|
170
|
+
contrast: '#0F172A', // Dark text on bright
|
|
171
|
+
},
|
|
172
|
+
error: {
|
|
173
|
+
main: '#F87171', // Bright red (Tailwind red-400)
|
|
174
|
+
subtle: '#7F1D1D', // Dark red background
|
|
175
|
+
contrast: '#0F172A',
|
|
176
|
+
},
|
|
177
|
+
warning: {
|
|
178
|
+
main: '#FB923C', // Bright orange (Tailwind orange-400)
|
|
179
|
+
subtle: '#7C2D12', // Dark orange background
|
|
180
|
+
contrast: '#0F172A',
|
|
181
|
+
},
|
|
182
|
+
info: {
|
|
183
|
+
main: '#60A5FA', // Bright blue (same as accent)
|
|
184
|
+
subtle: '#1E3A8A', // Dark blue background
|
|
185
|
+
contrast: '#FFFFFF',
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
// Surface hierarchy - clearly mapped to neutral scale
|
|
189
|
+
surface: {
|
|
190
|
+
page: neutral[2], // Dark - main background
|
|
191
|
+
card: neutral[0], // Near black - elevated surfaces
|
|
192
|
+
overlay: neutral[1], // Very dark - modals, dropdowns
|
|
193
|
+
input: neutral[1], // Very dark - input fields (subtle raise)
|
|
194
|
+
interactive: neutral[3], // Medium-dark - hover states
|
|
195
|
+
selected: neutral[3], // Medium-dark - selected states
|
|
196
|
+
nested: neutral[1], // Very dark - nested backgrounds
|
|
197
|
+
},
|
|
198
|
+
// Border hierarchy - clearly mapped to neutral scale
|
|
199
|
+
border: {
|
|
200
|
+
subtle: neutral[3], // Medium-dark - dividers, subtle borders
|
|
201
|
+
default: neutral[4], // Medium - default borders
|
|
202
|
+
strong: neutral[5], // Medium-light - emphasized borders
|
|
203
|
+
},
|
|
204
|
+
// Text hierarchy - clearly mapped to neutral scale
|
|
205
|
+
text: {
|
|
206
|
+
primary: neutral[7], // Very light - main text
|
|
207
|
+
secondary: neutral[5], // Medium-light - supporting text
|
|
208
|
+
tertiary: neutral[6], // Light - hints, captions
|
|
209
|
+
disabled: neutral[4], // Medium - disabled state
|
|
210
|
+
inverse: neutral[0], // Near black - text on light backgrounds
|
|
211
|
+
},
|
|
212
|
+
// Action colors - clearly mapped to neutral scale
|
|
213
|
+
action: {
|
|
214
|
+
default: neutral[8], // Near white - primary actions
|
|
215
|
+
hover: neutral[7], // Very light - action hover
|
|
216
|
+
disabled: neutral[3], // Medium-dark - disabled actions
|
|
217
|
+
contrast: neutral[0], // Near black - text on actions
|
|
218
|
+
},
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
// ============================================
|
|
222
|
+
// EXPORTS
|
|
223
|
+
// ============================================
|
|
234
224
|
export const buildColorPalette = (mode = 'light') => {
|
|
235
225
|
return mode === 'light' ? buildLightModeColors() : buildDarkModeColors();
|
|
236
226
|
};
|
|
237
|
-
/**
|
|
238
|
-
* Default light mode palette
|
|
239
|
-
*/
|
|
240
227
|
export const lightPalette = buildLightModeColors();
|
|
241
|
-
/**
|
|
242
|
-
* Default dark mode palette
|
|
243
|
-
*/
|
|
244
228
|
export const darkPalette = buildDarkModeColors();
|