@temboplus/frontend-react-core 0.1.3-beta.38 → 0.1.3-beta.39
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/README.md +72 -338
- package/dist/index.cjs.js +15 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +4 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/timezone/index.cjs.js +16 -0
- package/dist/{notifications → timezone}/index.cjs.js.map +1 -1
- package/dist/timezone/index.d.ts +3 -0
- package/dist/timezone/index.js +5 -0
- package/dist/{notifications → timezone}/index.js.map +1 -1
- package/dist/timezone/use-format-date.d.ts +22 -0
- package/dist/timezone/use-timezone-date.d.ts +17 -0
- package/dist/timezone/use-timezone.d.ts +19 -0
- package/dist/use-format-date--9gcnP7_.js +82 -0
- package/dist/use-format-date--9gcnP7_.js.map +1 -0
- package/dist/use-format-date-BvwtJTnU.js +89 -0
- package/dist/use-format-date-BvwtJTnU.js.map +1 -0
- package/package.json +23 -51
- package/dist/InfoCircleOutlined-B4_-Z3H4.js +0 -6
- package/dist/InfoCircleOutlined-B4_-Z3H4.js.map +0 -1
- package/dist/InfoCircleOutlined-pKxRobXG.js +0 -6
- package/dist/InfoCircleOutlined-pKxRobXG.js.map +0 -1
- package/dist/alerts/index.cjs.js +0 -2
- package/dist/alerts/index.cjs.js.map +0 -1
- package/dist/alerts/index.d.ts +0 -1
- package/dist/alerts/index.js +0 -2
- package/dist/alerts/index.js.map +0 -1
- package/dist/dialogs/index.cjs.js +0 -2
- package/dist/dialogs/index.cjs.js.map +0 -1
- package/dist/dialogs/index.d.ts +0 -1
- package/dist/dialogs/index.js +0 -2
- package/dist/dialogs/index.js.map +0 -1
- package/dist/features/alerts/alert.d.ts +0 -12
- package/dist/features/alerts/alert.js +0 -95
- package/dist/features/alerts/index.d.ts +0 -1
- package/dist/features/alerts/index.js +0 -1
- package/dist/features/dialogs/index.d.ts +0 -1
- package/dist/features/dialogs/index.js +0 -1
- package/dist/features/dialogs/modal-provider.d.ts +0 -3
- package/dist/features/dialogs/modal-provider.js +0 -6
- package/dist/features/dialogs/tembo-confirm.d.ts +0 -63
- package/dist/features/dialogs/tembo-confirm.js +0 -98
- package/dist/features/input-validation/account-name-validator.d.ts +0 -13
- package/dist/features/input-validation/account-name-validator.js +0 -28
- package/dist/features/input-validation/account-number-validator.d.ts +0 -13
- package/dist/features/input-validation/account-number-validator.js +0 -65
- package/dist/features/input-validation/amount-validator.d.ts +0 -78
- package/dist/features/input-validation/amount-validator.js +0 -100
- package/dist/features/input-validation/index.d.ts +0 -5
- package/dist/features/input-validation/index.js +0 -5
- package/dist/features/input-validation/phone-number-validator.d.ts +0 -25
- package/dist/features/input-validation/phone-number-validator.js +0 -79
- package/dist/features/input-validation/swift-code-validator.d.ts +0 -13
- package/dist/features/input-validation/swift-code-validator.js +0 -38
- package/dist/features/notifications/index.d.ts +0 -3
- package/dist/features/notifications/index.js +0 -3
- package/dist/features/notifications/tembo-notify.d.ts +0 -51
- package/dist/features/notifications/tembo-notify.js +0 -140
- package/dist/features/notifications/toast-config.d.ts +0 -13
- package/dist/features/notifications/toast-config.js +0 -60
- package/dist/features/notifications/toast-container.d.ts +0 -19
- package/dist/features/notifications/toast-container.js +0 -104
- package/dist/index.js +0 -1
- package/dist/notifications/index.cjs.js +0 -2
- package/dist/notifications/index.d.ts +0 -1
- package/dist/notifications/index.js +0 -2
- package/dist/providers.d.ts +0 -7
- package/dist/providers.js +0 -11
- package/dist/tembo-notify-By9oLCSX.js +0 -3
- package/dist/tembo-notify-By9oLCSX.js.map +0 -1
- package/dist/tembo-notify-CssdTeIP.js +0 -3
- package/dist/tembo-notify-CssdTeIP.js.map +0 -1
- package/dist/theme/deprecated/colors.d.ts +0 -278
- package/dist/theme/deprecated/colors.js +0 -212
- package/dist/theme/deprecated/constants.d.ts +0 -143
- package/dist/theme/deprecated/constants.js +0 -82
- package/dist/theme/deprecated/theme-provider.d.ts +0 -100
- package/dist/theme/deprecated/theme-provider.js +0 -405
- package/dist/theme/index.cjs.js +0 -2
- package/dist/theme/index.cjs.js.map +0 -1
- package/dist/theme/index.d.ts +0 -4
- package/dist/theme/index.js +0 -2
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/theme-config.d.ts +0 -15
- package/dist/theme/theme-config.js +0 -735
- package/dist/theme/theme-provider.d.ts +0 -29
- package/dist/theme/theme-provider.js +0 -32
- package/dist/theme/tokens/colors.d.ts +0 -153
- package/dist/theme/tokens/colors.js +0 -306
- package/dist/theme/tokens/constants.d.ts +0 -136
- package/dist/theme/tokens/constants.js +0 -137
- package/dist/theme-provider-XqWasApp.js +0 -11
- package/dist/theme-provider-XqWasApp.js.map +0 -1
- package/dist/theme-provider-c4R_KW4X.js +0 -2
- package/dist/theme-provider-c4R_KW4X.js.map +0 -1
- package/dist/theme-provider-slJZwhTc.js +0 -11
- package/dist/theme-provider-slJZwhTc.js.map +0 -1
- package/dist/theme-provider-slTbQLX5.js +0 -2
- package/dist/theme-provider-slTbQLX5.js.map +0 -1
- package/dist/validation/index.cjs.js +0 -2
- package/dist/validation/index.cjs.js.map +0 -1
- package/dist/validation/index.d.ts +0 -1
- package/dist/validation/index.js +0 -2
- package/dist/validation/index.js.map +0 -1
|
@@ -1,278 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tembo Color Palette
|
|
3
|
-
*
|
|
4
|
-
* Organized following Ant Design's token hierarchy:
|
|
5
|
-
* - Seed tokens (primary, action) → Map tokens (surfaces, components) → Alias tokens (text, borders)
|
|
6
|
-
* - Named by purpose, not by specific color values
|
|
7
|
-
* - Supports theming through consistent semantic structure
|
|
8
|
-
* - Theme-aware: neutral scale adapts to light/dark mode
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* // Usage in components
|
|
12
|
-
* const { colors } = useTemboTheme();
|
|
13
|
-
* style={{ color: colors.text.primary, backgroundColor: colors.neutral.lightest }}
|
|
14
|
-
*/
|
|
15
|
-
export interface TemboColorPalette {
|
|
16
|
-
/**
|
|
17
|
-
* Primary brand colors
|
|
18
|
-
* Used for main brand identity, primary buttons, and key UI elements
|
|
19
|
-
*/
|
|
20
|
-
primary: {
|
|
21
|
-
/** Base primary color - used for primary buttons and key branding elements */
|
|
22
|
-
main: string;
|
|
23
|
-
/** Hover state for primary interactive elements */
|
|
24
|
-
hover: string;
|
|
25
|
-
/** Active/pressed state for primary interactive elements */
|
|
26
|
-
active: string;
|
|
27
|
-
/** Lighter variant for backgrounds and subtle emphasis */
|
|
28
|
-
light: string;
|
|
29
|
-
/** Even lighter variant for very subtle backgrounds */
|
|
30
|
-
lighter: string;
|
|
31
|
-
/** Text color that maintains contrast on primary backgrounds (typically white) */
|
|
32
|
-
contrast: string;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Action/Interactive colors
|
|
36
|
-
* Used for links, secondary actions, and interactive elements that aren't primary
|
|
37
|
-
*/
|
|
38
|
-
action: {
|
|
39
|
-
/** Base action color - used for links, secondary buttons, and interactive elements */
|
|
40
|
-
main: string;
|
|
41
|
-
hover: string;
|
|
42
|
-
active: string;
|
|
43
|
-
/** Light background for action-related content (e.g. info badges, highlighted areas) */
|
|
44
|
-
light: string;
|
|
45
|
-
lighter: string;
|
|
46
|
-
/** Disabled state for action elements */
|
|
47
|
-
disabled: string;
|
|
48
|
-
/** Text color on action backgrounds */
|
|
49
|
-
contrast: string;
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Absolute colors
|
|
53
|
-
* Never change regardless of theme mode - use for logos, illustrations, or specific design requirements
|
|
54
|
-
*/
|
|
55
|
-
absolute: {
|
|
56
|
-
/** Pure white - always #ffffff */
|
|
57
|
-
white: string;
|
|
58
|
-
/** Pure black - always #000000 */
|
|
59
|
-
black: string;
|
|
60
|
-
};
|
|
61
|
-
/**
|
|
62
|
-
* Neutral color scale (0-10)
|
|
63
|
-
* Theme-aware: entire scale inverts in dark mode
|
|
64
|
-
* Foundation for backgrounds, borders, and subtle UI elements
|
|
65
|
-
* 0 = brightest in current theme, 10 = dimmest in current theme
|
|
66
|
-
*/
|
|
67
|
-
neutral: {
|
|
68
|
-
/** Brightest tone in current theme (white in light, black in dark) */
|
|
69
|
-
0: string;
|
|
70
|
-
1: string;
|
|
71
|
-
2: string;
|
|
72
|
-
3: string;
|
|
73
|
-
4: string;
|
|
74
|
-
/** Middle gray - typically stays similar across themes */
|
|
75
|
-
5: string;
|
|
76
|
-
6: string;
|
|
77
|
-
7: string;
|
|
78
|
-
8: string;
|
|
79
|
-
9: string;
|
|
80
|
-
/** Dimmest tone in current theme (black in light, white in dark) */
|
|
81
|
-
10: string;
|
|
82
|
-
/** Brightest tone (maps to 0) */
|
|
83
|
-
brightest: string;
|
|
84
|
-
/** Near-brightest tone (maps to 1) */
|
|
85
|
-
lightest: string;
|
|
86
|
-
/** Very light tone (maps to 2) */
|
|
87
|
-
lighter: string;
|
|
88
|
-
/** Light tone (maps to 3) */
|
|
89
|
-
light: string;
|
|
90
|
-
/** Middle tone (maps to 5) */
|
|
91
|
-
medium: string;
|
|
92
|
-
/** Dark tone (maps to 7) */
|
|
93
|
-
dark: string;
|
|
94
|
-
/** Very dark tone (maps to 8) */
|
|
95
|
-
darker: string;
|
|
96
|
-
/** Near-dimmest tone (maps to 9) */
|
|
97
|
-
darkest: string;
|
|
98
|
-
/** Dimmest tone (maps to 10) */
|
|
99
|
-
dimmest: string;
|
|
100
|
-
};
|
|
101
|
-
/**
|
|
102
|
-
* Success colors
|
|
103
|
-
* Indicate successful operations, positive states, and confirmations
|
|
104
|
-
*/
|
|
105
|
-
success: {
|
|
106
|
-
/** Main success color - for success buttons, icons, and indicators */
|
|
107
|
-
main: string;
|
|
108
|
-
/** Light background for success messages and alerts */
|
|
109
|
-
bg: string;
|
|
110
|
-
/** Border for success containers */
|
|
111
|
-
border: string;
|
|
112
|
-
/** Text color for success messages */
|
|
113
|
-
text: string;
|
|
114
|
-
};
|
|
115
|
-
/**
|
|
116
|
-
* Error colors
|
|
117
|
-
* Indicate errors, failures, and destructive actions
|
|
118
|
-
*/
|
|
119
|
-
error: {
|
|
120
|
-
/** Main error color - for error states and destructive actions */
|
|
121
|
-
main: string;
|
|
122
|
-
/** Light background for error messages and alerts */
|
|
123
|
-
bg: string;
|
|
124
|
-
border: string;
|
|
125
|
-
text: string;
|
|
126
|
-
};
|
|
127
|
-
/**
|
|
128
|
-
* Warning colors
|
|
129
|
-
* Indicate caution, warnings, and important information requiring attention
|
|
130
|
-
*/
|
|
131
|
-
warning: {
|
|
132
|
-
/** Main warning color */
|
|
133
|
-
main: string;
|
|
134
|
-
bg: string;
|
|
135
|
-
border: string;
|
|
136
|
-
text: string;
|
|
137
|
-
};
|
|
138
|
-
/**
|
|
139
|
-
* Info colors
|
|
140
|
-
* For informational messages and neutral call-outs
|
|
141
|
-
*/
|
|
142
|
-
info: {
|
|
143
|
-
main: string;
|
|
144
|
-
bg: string;
|
|
145
|
-
border: string;
|
|
146
|
-
text: string;
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* Surface colors
|
|
150
|
-
* Backgrounds and containers throughout the application
|
|
151
|
-
*/
|
|
152
|
-
surface: {
|
|
153
|
-
/** Main page background */
|
|
154
|
-
background: string;
|
|
155
|
-
/** Default surface/container background (cards, panels) */
|
|
156
|
-
main: string;
|
|
157
|
-
/** Elevated surfaces (modals, popovers) - typically with shadow */
|
|
158
|
-
elevated: string;
|
|
159
|
-
/** Hover state for interactive surfaces */
|
|
160
|
-
hover: string;
|
|
161
|
-
/** Very subtle background for nested content */
|
|
162
|
-
subtle: string;
|
|
163
|
-
};
|
|
164
|
-
/**
|
|
165
|
-
* Text colors
|
|
166
|
-
* For all text content with varying emphasis levels
|
|
167
|
-
*/
|
|
168
|
-
text: {
|
|
169
|
-
/** Primary text - body copy, headings */
|
|
170
|
-
primary: string;
|
|
171
|
-
/** Secondary text - supporting information, labels */
|
|
172
|
-
secondary: string;
|
|
173
|
-
/** Tertiary text - de-emphasized content, helper text */
|
|
174
|
-
tertiary: string;
|
|
175
|
-
/** Quaternary text - least emphasis, subtle information */
|
|
176
|
-
quaternary: string;
|
|
177
|
-
/** Disabled text state */
|
|
178
|
-
disabled: string;
|
|
179
|
-
/** Text on dark backgrounds */
|
|
180
|
-
inverse: string;
|
|
181
|
-
};
|
|
182
|
-
/**
|
|
183
|
-
* Border colors
|
|
184
|
-
* For separators, outlines, and component boundaries
|
|
185
|
-
*/
|
|
186
|
-
border: {
|
|
187
|
-
/** Default border color */
|
|
188
|
-
main: string;
|
|
189
|
-
/** Lighter border for subtle separation */
|
|
190
|
-
light: string;
|
|
191
|
-
/** Stronger border for emphasis */
|
|
192
|
-
strong: string;
|
|
193
|
-
/** Dividing lines between sections */
|
|
194
|
-
divider: string;
|
|
195
|
-
};
|
|
196
|
-
/**
|
|
197
|
-
* Component-specific colors
|
|
198
|
-
* Pre-defined color combinations for common components
|
|
199
|
-
*/
|
|
200
|
-
components: {
|
|
201
|
-
/** Button color tokens */
|
|
202
|
-
button: {
|
|
203
|
-
primary: {
|
|
204
|
-
bg: string;
|
|
205
|
-
hover: string;
|
|
206
|
-
text: string;
|
|
207
|
-
};
|
|
208
|
-
default: {
|
|
209
|
-
bg: string;
|
|
210
|
-
border: string;
|
|
211
|
-
text: string;
|
|
212
|
-
hover: string;
|
|
213
|
-
};
|
|
214
|
-
};
|
|
215
|
-
/** Form input color tokens */
|
|
216
|
-
input: {
|
|
217
|
-
bg: string;
|
|
218
|
-
border: string;
|
|
219
|
-
borderHover: string;
|
|
220
|
-
borderFocus: string;
|
|
221
|
-
placeholder: string;
|
|
222
|
-
};
|
|
223
|
-
/** Table color tokens */
|
|
224
|
-
table: {
|
|
225
|
-
bg: string;
|
|
226
|
-
headerBg: string;
|
|
227
|
-
headerText: string;
|
|
228
|
-
border: string;
|
|
229
|
-
rowHover: string;
|
|
230
|
-
};
|
|
231
|
-
/** Navigation sidebar tokens */
|
|
232
|
-
sidebar: {
|
|
233
|
-
/** Dark sidebar background */
|
|
234
|
-
bg: string;
|
|
235
|
-
hover: string;
|
|
236
|
-
selected: string;
|
|
237
|
-
text: string;
|
|
238
|
-
textSecondary: string;
|
|
239
|
-
};
|
|
240
|
-
};
|
|
241
|
-
/**
|
|
242
|
-
* Utility colors
|
|
243
|
-
* Special purpose color values
|
|
244
|
-
*/
|
|
245
|
-
utility: {
|
|
246
|
-
transparent: string;
|
|
247
|
-
/** Link color (often aliases action.main) */
|
|
248
|
-
link: string;
|
|
249
|
-
linkHover: string;
|
|
250
|
-
linkActive: string;
|
|
251
|
-
};
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Partial color overrides
|
|
255
|
-
* Allows deep partial overrides for theming
|
|
256
|
-
*/
|
|
257
|
-
export type TemboColorOverrides = DeepPartial<TemboColorPalette>;
|
|
258
|
-
/**
|
|
259
|
-
* Theme mode
|
|
260
|
-
*/
|
|
261
|
-
export type ThemeMode = 'light' | 'dark';
|
|
262
|
-
/**
|
|
263
|
-
* Default color palette for light theme
|
|
264
|
-
*/
|
|
265
|
-
export declare const defaultColorPalette: TemboColorPalette;
|
|
266
|
-
/**
|
|
267
|
-
* Build a complete color palette by merging overrides with defaults
|
|
268
|
-
* Performs deep merge to allow partial nested overrides
|
|
269
|
-
*
|
|
270
|
-
* @param overrides - Partial color palette overrides
|
|
271
|
-
* @param mode - Theme mode ('light' or 'dark')
|
|
272
|
-
* @returns Complete color palette with overrides applied
|
|
273
|
-
*/
|
|
274
|
-
export declare const buildColorPalette: (overrides?: TemboColorOverrides, mode?: ThemeMode) => TemboColorPalette;
|
|
275
|
-
type DeepPartial<T> = {
|
|
276
|
-
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
277
|
-
};
|
|
278
|
-
export {};
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { merge } from "lodash";
|
|
2
|
-
/**
|
|
3
|
-
* Base color values for light theme
|
|
4
|
-
* These are the actual color values that get mapped to the palette
|
|
5
|
-
*/
|
|
6
|
-
const lightModeColors = {
|
|
7
|
-
neutral: {
|
|
8
|
-
0: '#ffffff',
|
|
9
|
-
1: '#fafafa',
|
|
10
|
-
2: '#f5f5f5',
|
|
11
|
-
3: '#f0f0f0',
|
|
12
|
-
4: '#e5e5e5',
|
|
13
|
-
5: '#d4d4d4',
|
|
14
|
-
6: '#b3b3b3',
|
|
15
|
-
7: '#999999',
|
|
16
|
-
8: '#666666',
|
|
17
|
-
9: '#1a1a1a',
|
|
18
|
-
10: '#000000',
|
|
19
|
-
},
|
|
20
|
-
};
|
|
21
|
-
/**
|
|
22
|
-
* Base color values for dark theme
|
|
23
|
-
* Inverted neutral scale for dark mode
|
|
24
|
-
*/
|
|
25
|
-
const darkModeColors = {
|
|
26
|
-
neutral: {
|
|
27
|
-
0: '#000000',
|
|
28
|
-
1: '#1a1a1a',
|
|
29
|
-
2: '#666666',
|
|
30
|
-
3: '#999999',
|
|
31
|
-
4: '#b3b3b3',
|
|
32
|
-
5: '#d4d4d4',
|
|
33
|
-
6: '#e5e5e5',
|
|
34
|
-
7: '#f0f0f0',
|
|
35
|
-
8: '#f5f5f5',
|
|
36
|
-
9: '#fafafa',
|
|
37
|
-
10: '#ffffff',
|
|
38
|
-
},
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Build default color palette for a given theme mode
|
|
42
|
-
*
|
|
43
|
-
* @param mode - 'light' or 'dark'
|
|
44
|
-
* @returns Complete color palette with theme-aware neutral scale
|
|
45
|
-
*/
|
|
46
|
-
const buildDefaultPalette = (mode) => {
|
|
47
|
-
const modeColors = mode === 'light' ? lightModeColors : darkModeColors;
|
|
48
|
-
return {
|
|
49
|
-
primary: {
|
|
50
|
-
main: '#000000',
|
|
51
|
-
hover: '#1a1a1a',
|
|
52
|
-
active: '#000000',
|
|
53
|
-
light: '#666666',
|
|
54
|
-
lighter: '#999999',
|
|
55
|
-
contrast: '#FFFFFF',
|
|
56
|
-
},
|
|
57
|
-
action: {
|
|
58
|
-
main: '#1a6985',
|
|
59
|
-
hover: '#145268',
|
|
60
|
-
active: '#0f3d4f',
|
|
61
|
-
light: '#e8f2f5',
|
|
62
|
-
lighter: '#f4f9fa',
|
|
63
|
-
disabled: '#a3c9d6',
|
|
64
|
-
contrast: '#FFFFFF',
|
|
65
|
-
},
|
|
66
|
-
absolute: {
|
|
67
|
-
white: '#ffffff',
|
|
68
|
-
black: '#000000',
|
|
69
|
-
},
|
|
70
|
-
neutral: {
|
|
71
|
-
// Numeric scale (theme-aware)
|
|
72
|
-
0: modeColors.neutral[0],
|
|
73
|
-
1: modeColors.neutral[1],
|
|
74
|
-
2: modeColors.neutral[2],
|
|
75
|
-
3: modeColors.neutral[3],
|
|
76
|
-
4: modeColors.neutral[4],
|
|
77
|
-
5: modeColors.neutral[5],
|
|
78
|
-
6: modeColors.neutral[6],
|
|
79
|
-
7: modeColors.neutral[7],
|
|
80
|
-
8: modeColors.neutral[8],
|
|
81
|
-
9: modeColors.neutral[9],
|
|
82
|
-
10: modeColors.neutral[10],
|
|
83
|
-
// Convenient aliases (map to numeric scale)
|
|
84
|
-
brightest: modeColors.neutral[0],
|
|
85
|
-
lightest: modeColors.neutral[1],
|
|
86
|
-
lighter: modeColors.neutral[2],
|
|
87
|
-
light: modeColors.neutral[3],
|
|
88
|
-
medium: modeColors.neutral[5],
|
|
89
|
-
dark: modeColors.neutral[7],
|
|
90
|
-
darker: modeColors.neutral[8],
|
|
91
|
-
darkest: modeColors.neutral[9],
|
|
92
|
-
dimmest: modeColors.neutral[10],
|
|
93
|
-
},
|
|
94
|
-
success: {
|
|
95
|
-
main: '#10b981',
|
|
96
|
-
bg: '#ecfdf5',
|
|
97
|
-
border: '#a7f3d0',
|
|
98
|
-
text: '#047857',
|
|
99
|
-
},
|
|
100
|
-
error: {
|
|
101
|
-
main: '#ef4444',
|
|
102
|
-
bg: '#fef2f2',
|
|
103
|
-
border: '#fecaca',
|
|
104
|
-
text: '#dc2626',
|
|
105
|
-
},
|
|
106
|
-
warning: {
|
|
107
|
-
main: '#f59e0b',
|
|
108
|
-
bg: '#fffbeb',
|
|
109
|
-
border: '#fde68a',
|
|
110
|
-
text: '#d97706',
|
|
111
|
-
},
|
|
112
|
-
info: {
|
|
113
|
-
main: '#1a6985',
|
|
114
|
-
bg: '#e8f2f5',
|
|
115
|
-
border: '#b8d9e6',
|
|
116
|
-
text: '#0f3d4f',
|
|
117
|
-
},
|
|
118
|
-
surface: {
|
|
119
|
-
background: modeColors.neutral[0],
|
|
120
|
-
main: modeColors.neutral[0],
|
|
121
|
-
elevated: modeColors.neutral[0],
|
|
122
|
-
hover: modeColors.neutral[1],
|
|
123
|
-
subtle: modeColors.neutral[1],
|
|
124
|
-
},
|
|
125
|
-
text: {
|
|
126
|
-
primary: modeColors.neutral[10],
|
|
127
|
-
secondary: modeColors.neutral[8],
|
|
128
|
-
tertiary: modeColors.neutral[7],
|
|
129
|
-
quaternary: modeColors.neutral[6],
|
|
130
|
-
disabled: modeColors.neutral[5],
|
|
131
|
-
inverse: modeColors.neutral[0],
|
|
132
|
-
},
|
|
133
|
-
border: {
|
|
134
|
-
main: modeColors.neutral[4],
|
|
135
|
-
light: modeColors.neutral[3],
|
|
136
|
-
strong: modeColors.neutral[5],
|
|
137
|
-
divider: modeColors.neutral[4],
|
|
138
|
-
},
|
|
139
|
-
components: {
|
|
140
|
-
button: {
|
|
141
|
-
primary: {
|
|
142
|
-
bg: '#1a6985',
|
|
143
|
-
hover: '#145268',
|
|
144
|
-
text: '#FFFFFF',
|
|
145
|
-
},
|
|
146
|
-
default: {
|
|
147
|
-
bg: modeColors.neutral[0],
|
|
148
|
-
border: modeColors.neutral[5],
|
|
149
|
-
text: modeColors.neutral[10],
|
|
150
|
-
hover: modeColors.neutral[1],
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
input: {
|
|
154
|
-
bg: modeColors.neutral[0],
|
|
155
|
-
border: modeColors.neutral[5],
|
|
156
|
-
borderHover: modeColors.neutral[7],
|
|
157
|
-
borderFocus: '#1a6985',
|
|
158
|
-
placeholder: modeColors.neutral[7],
|
|
159
|
-
},
|
|
160
|
-
table: {
|
|
161
|
-
bg: modeColors.neutral[0],
|
|
162
|
-
headerBg: modeColors.neutral[1],
|
|
163
|
-
headerText: modeColors.neutral[10],
|
|
164
|
-
border: modeColors.neutral[4],
|
|
165
|
-
rowHover: modeColors.neutral[1],
|
|
166
|
-
},
|
|
167
|
-
sidebar: {
|
|
168
|
-
bg: '#000000',
|
|
169
|
-
hover: 'rgba(255, 255, 255, 0.08)',
|
|
170
|
-
selected: 'rgba(255, 255, 255, 0.12)',
|
|
171
|
-
text: '#FFFFFF',
|
|
172
|
-
textSecondary: 'rgba(255, 255, 255, 0.65)',
|
|
173
|
-
},
|
|
174
|
-
},
|
|
175
|
-
utility: {
|
|
176
|
-
transparent: 'transparent',
|
|
177
|
-
link: '#1a6985',
|
|
178
|
-
linkHover: '#145268',
|
|
179
|
-
linkActive: '#0f3d4f',
|
|
180
|
-
},
|
|
181
|
-
};
|
|
182
|
-
};
|
|
183
|
-
/**
|
|
184
|
-
* Default color palette for light theme
|
|
185
|
-
*/
|
|
186
|
-
export const defaultColorPalette = buildDefaultPalette('light');
|
|
187
|
-
/**
|
|
188
|
-
* Build a complete color palette by merging overrides with defaults
|
|
189
|
-
* Performs deep merge to allow partial nested overrides
|
|
190
|
-
*
|
|
191
|
-
* @param overrides - Partial color palette overrides
|
|
192
|
-
* @param mode - Theme mode ('light' or 'dark')
|
|
193
|
-
* @returns Complete color palette with overrides applied
|
|
194
|
-
*/
|
|
195
|
-
export const buildColorPalette = (overrides, mode = 'light') => {
|
|
196
|
-
const basePalette = buildDefaultPalette(mode);
|
|
197
|
-
if (!overrides)
|
|
198
|
-
return basePalette;
|
|
199
|
-
const merged = merge({}, basePalette, overrides);
|
|
200
|
-
// After merging, ensure neutral aliases are synced with numeric values
|
|
201
|
-
// This handles cases where overrides might change the numeric scale
|
|
202
|
-
merged.neutral.brightest = merged.neutral[0];
|
|
203
|
-
merged.neutral.lightest = merged.neutral[1];
|
|
204
|
-
merged.neutral.lighter = merged.neutral[2];
|
|
205
|
-
merged.neutral.light = merged.neutral[3];
|
|
206
|
-
merged.neutral.medium = merged.neutral[5];
|
|
207
|
-
merged.neutral.dark = merged.neutral[7];
|
|
208
|
-
merged.neutral.darker = merged.neutral[8];
|
|
209
|
-
merged.neutral.darkest = merged.neutral[9];
|
|
210
|
-
merged.neutral.dimmest = merged.neutral[10];
|
|
211
|
-
return merged;
|
|
212
|
-
};
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tembo UI Constants
|
|
3
|
-
*
|
|
4
|
-
* Non-color design tokens for typography, spacing, sizing, shadows, and animations.
|
|
5
|
-
* Separated from colors for better organization and independent theming.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* const { constants } = useTemboTheme();
|
|
9
|
-
* style={{ borderRadius: constants.radius.base, padding: constants.spacing.md }}
|
|
10
|
-
*/
|
|
11
|
-
export interface TemboUIConstants {
|
|
12
|
-
/**
|
|
13
|
-
* Typography tokens
|
|
14
|
-
* Font families, sizes, weights, and line heights
|
|
15
|
-
*/
|
|
16
|
-
typography: {
|
|
17
|
-
/** Primary font stack used throughout the application */
|
|
18
|
-
fontFamily: string;
|
|
19
|
-
/** Font size scale - use 'base' (14px) for body text */
|
|
20
|
-
fontSize: {
|
|
21
|
-
xs: number;
|
|
22
|
-
sm: number;
|
|
23
|
-
/** Default body text size (14px) */
|
|
24
|
-
base: number;
|
|
25
|
-
lg: number;
|
|
26
|
-
xl: number;
|
|
27
|
-
};
|
|
28
|
-
fontWeight: {
|
|
29
|
-
normal: number;
|
|
30
|
-
medium: number;
|
|
31
|
-
semibold: number;
|
|
32
|
-
bold: number;
|
|
33
|
-
};
|
|
34
|
-
lineHeight: {
|
|
35
|
-
/** Tight line height for headings */
|
|
36
|
-
tight: number;
|
|
37
|
-
/** Default line height for body text */
|
|
38
|
-
base: number;
|
|
39
|
-
/** Relaxed line height for large text blocks */
|
|
40
|
-
relaxed: number;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Spacing scale
|
|
45
|
-
* Consistent spacing values for margins, padding, and gaps
|
|
46
|
-
* Based on 4px grid system
|
|
47
|
-
*/
|
|
48
|
-
spacing: {
|
|
49
|
-
xs: number;
|
|
50
|
-
sm: number;
|
|
51
|
-
md: number;
|
|
52
|
-
lg: number;
|
|
53
|
-
xl: number;
|
|
54
|
-
'2xl': number;
|
|
55
|
-
'3xl': number;
|
|
56
|
-
};
|
|
57
|
-
/**
|
|
58
|
-
* Border radius tokens
|
|
59
|
-
* Consistent corner rounding across components
|
|
60
|
-
*/
|
|
61
|
-
radius: {
|
|
62
|
-
none: number;
|
|
63
|
-
sm: number;
|
|
64
|
-
/** Default border radius (12px) */
|
|
65
|
-
base: number;
|
|
66
|
-
md: number;
|
|
67
|
-
lg: number;
|
|
68
|
-
xl: number;
|
|
69
|
-
/** Fully rounded (pill shape) */
|
|
70
|
-
full: number;
|
|
71
|
-
/** Button-specific radius for pill-shaped buttons */
|
|
72
|
-
button: number;
|
|
73
|
-
/** Input field radius */
|
|
74
|
-
input: number;
|
|
75
|
-
/** Card radius */
|
|
76
|
-
card: number;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Box shadow tokens
|
|
80
|
-
* Elevation and depth through shadows
|
|
81
|
-
*/
|
|
82
|
-
shadow: {
|
|
83
|
-
/** Subtle shadow for slight elevation */
|
|
84
|
-
sm: string;
|
|
85
|
-
/** Default shadow for cards and containers */
|
|
86
|
-
base: string;
|
|
87
|
-
/** Medium shadow for elevated content */
|
|
88
|
-
md: string;
|
|
89
|
-
/** Large shadow for modals and important elements */
|
|
90
|
-
lg: string;
|
|
91
|
-
/** Extra large shadow for maximum elevation */
|
|
92
|
-
xl: string;
|
|
93
|
-
/** Semantic: Card shadow (typically subtle) */
|
|
94
|
-
card: string;
|
|
95
|
-
/** Semantic: Elevated content like popovers */
|
|
96
|
-
elevated: string;
|
|
97
|
-
/** Semantic: Dropdown menus */
|
|
98
|
-
dropdown: string;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Z-index layers
|
|
102
|
-
* Stacking order for overlays and floating elements
|
|
103
|
-
*/
|
|
104
|
-
zIndex: {
|
|
105
|
-
dropdown: number;
|
|
106
|
-
modal: number;
|
|
107
|
-
popover: number;
|
|
108
|
-
tooltip: number;
|
|
109
|
-
notification: number;
|
|
110
|
-
};
|
|
111
|
-
/**
|
|
112
|
-
* Transition timing
|
|
113
|
-
* Animation durations for consistent motion
|
|
114
|
-
*/
|
|
115
|
-
transition: {
|
|
116
|
-
/** Quick interactions (150ms) */
|
|
117
|
-
fast: string;
|
|
118
|
-
/** Default transitions (200ms) */
|
|
119
|
-
base: string;
|
|
120
|
-
/** Slower, more deliberate animations (300ms) */
|
|
121
|
-
slow: string;
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Partial UI constants overrides
|
|
126
|
-
*/
|
|
127
|
-
export type TemboUIConstantsOverrides = DeepPartial<TemboUIConstants>;
|
|
128
|
-
/**
|
|
129
|
-
* Default UI constants
|
|
130
|
-
* Professional, accessible defaults suitable for most applications
|
|
131
|
-
*/
|
|
132
|
-
export declare const defaultUIConstants: TemboUIConstants;
|
|
133
|
-
/**
|
|
134
|
-
* Build complete UI constants by merging overrides with defaults
|
|
135
|
-
*
|
|
136
|
-
* @param overrides - Partial UI constants overrides
|
|
137
|
-
* @returns Complete UI constants with overrides applied
|
|
138
|
-
*/
|
|
139
|
-
export declare const buildUIConstants: (overrides?: TemboUIConstantsOverrides) => TemboUIConstants;
|
|
140
|
-
type DeepPartial<T> = {
|
|
141
|
-
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
142
|
-
};
|
|
143
|
-
export {};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { merge } from 'lodash';
|
|
2
|
-
/**
|
|
3
|
-
* Default UI constants
|
|
4
|
-
* Professional, accessible defaults suitable for most applications
|
|
5
|
-
*/
|
|
6
|
-
export const defaultUIConstants = {
|
|
7
|
-
typography: {
|
|
8
|
-
fontFamily: "Avenir, MarkPro, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
|
|
9
|
-
fontSize: {
|
|
10
|
-
xs: 12,
|
|
11
|
-
sm: 13,
|
|
12
|
-
base: 14,
|
|
13
|
-
lg: 16,
|
|
14
|
-
xl: 18,
|
|
15
|
-
},
|
|
16
|
-
fontWeight: {
|
|
17
|
-
normal: 400,
|
|
18
|
-
medium: 500,
|
|
19
|
-
semibold: 600,
|
|
20
|
-
bold: 700,
|
|
21
|
-
},
|
|
22
|
-
lineHeight: {
|
|
23
|
-
tight: 1.25,
|
|
24
|
-
base: 1.5715,
|
|
25
|
-
relaxed: 1.75,
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
spacing: {
|
|
29
|
-
xs: 4,
|
|
30
|
-
sm: 8,
|
|
31
|
-
md: 12,
|
|
32
|
-
lg: 16,
|
|
33
|
-
xl: 24,
|
|
34
|
-
'2xl': 32,
|
|
35
|
-
'3xl': 48,
|
|
36
|
-
},
|
|
37
|
-
radius: {
|
|
38
|
-
none: 0,
|
|
39
|
-
sm: 8,
|
|
40
|
-
base: 12,
|
|
41
|
-
md: 14,
|
|
42
|
-
lg: 16,
|
|
43
|
-
xl: 20,
|
|
44
|
-
full: 9999,
|
|
45
|
-
button: 24,
|
|
46
|
-
input: 10,
|
|
47
|
-
card: 16,
|
|
48
|
-
},
|
|
49
|
-
shadow: {
|
|
50
|
-
sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
|
|
51
|
-
base: '0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08)',
|
|
52
|
-
md: '0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08)',
|
|
53
|
-
lg: '0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08)',
|
|
54
|
-
xl: '0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08)',
|
|
55
|
-
card: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
|
|
56
|
-
elevated: '0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08)',
|
|
57
|
-
dropdown: '0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08)',
|
|
58
|
-
},
|
|
59
|
-
zIndex: {
|
|
60
|
-
dropdown: 1000,
|
|
61
|
-
modal: 1050,
|
|
62
|
-
popover: 1060,
|
|
63
|
-
tooltip: 1070,
|
|
64
|
-
notification: 1080,
|
|
65
|
-
},
|
|
66
|
-
transition: {
|
|
67
|
-
fast: '150ms cubic-bezier(0.4, 0, 0.2, 1)',
|
|
68
|
-
base: '200ms cubic-bezier(0.4, 0, 0.2, 1)',
|
|
69
|
-
slow: '300ms cubic-bezier(0.4, 0, 0.2, 1)',
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
/**
|
|
73
|
-
* Build complete UI constants by merging overrides with defaults
|
|
74
|
-
*
|
|
75
|
-
* @param overrides - Partial UI constants overrides
|
|
76
|
-
* @returns Complete UI constants with overrides applied
|
|
77
|
-
*/
|
|
78
|
-
export const buildUIConstants = (overrides) => {
|
|
79
|
-
if (!overrides)
|
|
80
|
-
return defaultUIConstants;
|
|
81
|
-
return merge(defaultUIConstants, overrides);
|
|
82
|
-
};
|