@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,29 +0,0 @@
|
|
|
1
|
-
import "./theme-overrides.css";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import type { ThemeConfig } from 'antd';
|
|
4
|
-
import { UIConstants } from './tokens/constants.js';
|
|
5
|
-
import { ColorPalette, ThemeMode } from './tokens/colors.js';
|
|
6
|
-
/**
|
|
7
|
-
* Theme context value - now includes constants!
|
|
8
|
-
*/
|
|
9
|
-
export interface TemboTheme {
|
|
10
|
-
colors: ColorPalette;
|
|
11
|
-
constants: UIConstants;
|
|
12
|
-
mode: ThemeMode;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Theme provider props
|
|
16
|
-
*/
|
|
17
|
-
export interface TemboThemeProviderProps {
|
|
18
|
-
children: React.ReactNode;
|
|
19
|
-
mode?: ThemeMode;
|
|
20
|
-
antdThemeOverrides?: Partial<ThemeConfig>;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* TemboThemeProvider
|
|
24
|
-
*/
|
|
25
|
-
export declare const TemboThemeProvider: React.FC<TemboThemeProviderProps>;
|
|
26
|
-
/**
|
|
27
|
-
* Hook to access theme - now returns constants too!
|
|
28
|
-
*/
|
|
29
|
-
export declare const useNewTemboTheme: () => TemboTheme;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import "./theme-overrides.css";
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { ConfigProvider } from 'antd';
|
|
5
|
-
import { defaultUIConstants } from './tokens/constants.js';
|
|
6
|
-
import { buildAntDTheme } from './theme-config.js';
|
|
7
|
-
import { buildColorPalette } from './tokens/colors.js';
|
|
8
|
-
const TemboThemeContext = React.createContext({
|
|
9
|
-
colors: buildColorPalette('light'),
|
|
10
|
-
constants: defaultUIConstants,
|
|
11
|
-
mode: 'light',
|
|
12
|
-
});
|
|
13
|
-
/**
|
|
14
|
-
* TemboThemeProvider
|
|
15
|
-
*/
|
|
16
|
-
export const TemboThemeProvider = ({ children, mode = 'light', antdThemeOverrides, }) => {
|
|
17
|
-
const colors = React.useMemo(() => buildColorPalette(mode), [mode]);
|
|
18
|
-
const constants = React.useMemo(() => defaultUIConstants, []);
|
|
19
|
-
const antdTheme = React.useMemo(() => {
|
|
20
|
-
var _a, _b;
|
|
21
|
-
const baseTheme = buildAntDTheme(colors, constants);
|
|
22
|
-
if (!antdThemeOverrides)
|
|
23
|
-
return baseTheme;
|
|
24
|
-
return Object.assign(Object.assign({}, baseTheme), { token: Object.assign(Object.assign({}, baseTheme.token), ((_a = antdThemeOverrides.token) !== null && _a !== void 0 ? _a : {})), components: Object.assign(Object.assign({}, baseTheme.components), ((_b = antdThemeOverrides.components) !== null && _b !== void 0 ? _b : {})) });
|
|
25
|
-
}, [colors, constants, antdThemeOverrides]);
|
|
26
|
-
const contextValue = React.useMemo(() => ({ colors, constants, mode }), [colors, constants, mode]);
|
|
27
|
-
return (_jsx(TemboThemeContext.Provider, { value: contextValue, children: _jsx(ConfigProvider, { theme: antdTheme, children: children }) }));
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Hook to access theme - now returns constants too!
|
|
31
|
-
*/
|
|
32
|
-
export const useNewTemboTheme = () => React.useContext(TemboThemeContext);
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tembo Design System - Monochrome Foundation with Modern Semantics
|
|
3
|
-
*
|
|
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 with AAA contrast
|
|
9
|
-
*
|
|
10
|
-
* Semantic color definitions:
|
|
11
|
-
* - main: For icons, borders, full backgrounds, text on subtle backgrounds
|
|
12
|
-
* - subtle: For light/dark background fills
|
|
13
|
-
* - contrast: For icons & text on main backgrounds
|
|
14
|
-
*
|
|
15
|
-
* Secondary color definitions:
|
|
16
|
-
* - subtlest: Barely visible tint (for large background areas)
|
|
17
|
-
* - subtle: Soft but visible tint (for badges, highlights)
|
|
18
|
-
* - main: Strong accent color (for icons, borders, emphasis)
|
|
19
|
-
* - contrast: High contrast (for text on main backgrounds only)
|
|
20
|
-
*/
|
|
21
|
-
export type ThemeMode = 'light' | 'dark';
|
|
22
|
-
/**
|
|
23
|
-
* Color scale interface (for semantic colors)
|
|
24
|
-
*/
|
|
25
|
-
export interface ColorScale {
|
|
26
|
-
/** Main color - for icons, borders, solid backgrounds, text on subtle */
|
|
27
|
-
main: string;
|
|
28
|
-
/** Subtle background - for alert/badge backgrounds */
|
|
29
|
-
subtle: string;
|
|
30
|
-
/** Contrast color - for text/icons on main backgrounds */
|
|
31
|
-
contrast: string;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Secondary color scale interface (4-step scale)
|
|
35
|
-
*/
|
|
36
|
-
export interface SecondaryColorScale {
|
|
37
|
-
/** Subtlest background - barely visible tint, highest luminosity */
|
|
38
|
-
subtlest: string;
|
|
39
|
-
/** Subtle background - soft tint, still very light/dark */
|
|
40
|
-
subtle: string;
|
|
41
|
-
/** Main accent - vibrant color for icons, borders */
|
|
42
|
-
main: string;
|
|
43
|
-
/** Contrast - for text on main backgrounds only */
|
|
44
|
-
contrast: string;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Complete color palette
|
|
48
|
-
*/
|
|
49
|
-
export interface ColorPalette {
|
|
50
|
-
mode: ThemeMode;
|
|
51
|
-
/**
|
|
52
|
-
* Monochrome neutral scale - carefully calibrated
|
|
53
|
-
* 10-step scale (0-9) with proper WCAG contrast ratios
|
|
54
|
-
*/
|
|
55
|
-
neutral: {
|
|
56
|
-
0: string;
|
|
57
|
-
1: string;
|
|
58
|
-
2: string;
|
|
59
|
-
3: string;
|
|
60
|
-
4: string;
|
|
61
|
-
5: string;
|
|
62
|
-
6: string;
|
|
63
|
-
7: string;
|
|
64
|
-
8: string;
|
|
65
|
-
9: string;
|
|
66
|
-
};
|
|
67
|
-
absolute: {
|
|
68
|
-
black: string;
|
|
69
|
-
white: string;
|
|
70
|
-
};
|
|
71
|
-
accent: {
|
|
72
|
-
default: string;
|
|
73
|
-
hover: string;
|
|
74
|
-
active: string;
|
|
75
|
-
subtle: string;
|
|
76
|
-
};
|
|
77
|
-
semantic: {
|
|
78
|
-
success: ColorScale;
|
|
79
|
-
error: ColorScale;
|
|
80
|
-
warning: ColorScale;
|
|
81
|
-
info: ColorScale;
|
|
82
|
-
pending: ColorScale;
|
|
83
|
-
};
|
|
84
|
-
/**
|
|
85
|
-
* Secondary colors - for badges, labels, tags, highlights
|
|
86
|
-
* Each with 4-step scale: subtlest, subtle, main, contrast
|
|
87
|
-
* Text colors (primary/secondary/tertiary) work on both subtlest and subtle backgrounds
|
|
88
|
-
*/
|
|
89
|
-
secondary: {
|
|
90
|
-
purple: SecondaryColorScale;
|
|
91
|
-
green: SecondaryColorScale;
|
|
92
|
-
blue: SecondaryColorScale;
|
|
93
|
-
orange: SecondaryColorScale;
|
|
94
|
-
};
|
|
95
|
-
surface: {
|
|
96
|
-
/** Main backgrounds */
|
|
97
|
-
page: string;
|
|
98
|
-
/**Elevated surfaces */
|
|
99
|
-
card: string;
|
|
100
|
-
/**Modals, dropdowns */
|
|
101
|
-
overlay: string;
|
|
102
|
-
/**Input fields */
|
|
103
|
-
input: string;
|
|
104
|
-
/** Hover states */
|
|
105
|
-
interactive: string;
|
|
106
|
-
/** Selected states */
|
|
107
|
-
selected: string;
|
|
108
|
-
/** Nested backgrounds */
|
|
109
|
-
nested: string;
|
|
110
|
-
};
|
|
111
|
-
border: {
|
|
112
|
-
subtle: string;
|
|
113
|
-
default: string;
|
|
114
|
-
strong: string;
|
|
115
|
-
};
|
|
116
|
-
text: {
|
|
117
|
-
primary: string;
|
|
118
|
-
secondary: string;
|
|
119
|
-
tertiary: string;
|
|
120
|
-
disabled: string;
|
|
121
|
-
inverse: string;
|
|
122
|
-
input: string;
|
|
123
|
-
};
|
|
124
|
-
action: {
|
|
125
|
-
default: string;
|
|
126
|
-
hover: string;
|
|
127
|
-
disabled: string;
|
|
128
|
-
contrast: string;
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
export declare const buildColorPalette: (mode?: ThemeMode) => ColorPalette;
|
|
132
|
-
export declare const lightPalette: ColorPalette;
|
|
133
|
-
export declare const darkPalette: ColorPalette;
|
|
134
|
-
/**
|
|
135
|
-
* Color palette overrides (for custom theming)
|
|
136
|
-
*/
|
|
137
|
-
export type ColorOverrides = {
|
|
138
|
-
neutral?: Partial<ColorPalette['neutral']>;
|
|
139
|
-
accent?: Partial<ColorPalette['accent']>;
|
|
140
|
-
semantic?: {
|
|
141
|
-
success?: Partial<ColorScale>;
|
|
142
|
-
error?: Partial<ColorScale>;
|
|
143
|
-
warning?: Partial<ColorScale>;
|
|
144
|
-
info?: Partial<ColorScale>;
|
|
145
|
-
pending?: Partial<ColorScale>;
|
|
146
|
-
};
|
|
147
|
-
secondary?: {
|
|
148
|
-
purple?: Partial<SecondaryColorScale>;
|
|
149
|
-
green?: Partial<SecondaryColorScale>;
|
|
150
|
-
blue?: Partial<SecondaryColorScale>;
|
|
151
|
-
orange?: Partial<SecondaryColorScale>;
|
|
152
|
-
};
|
|
153
|
-
};
|
|
@@ -1,306 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tembo Design System - Monochrome Foundation with Modern Semantics
|
|
3
|
-
*
|
|
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 with AAA contrast
|
|
9
|
-
*
|
|
10
|
-
* Semantic color definitions:
|
|
11
|
-
* - main: For icons, borders, full backgrounds, text on subtle backgrounds
|
|
12
|
-
* - subtle: For light/dark background fills
|
|
13
|
-
* - contrast: For icons & text on main backgrounds
|
|
14
|
-
*
|
|
15
|
-
* Secondary color definitions:
|
|
16
|
-
* - subtlest: Barely visible tint (for large background areas)
|
|
17
|
-
* - subtle: Soft but visible tint (for badges, highlights)
|
|
18
|
-
* - main: Strong accent color (for icons, borders, emphasis)
|
|
19
|
-
* - contrast: High contrast (for text on main backgrounds only)
|
|
20
|
-
*/
|
|
21
|
-
// ============================================
|
|
22
|
-
// NEUTRAL SCALE CONSTANTS
|
|
23
|
-
// ============================================
|
|
24
|
-
/**
|
|
25
|
-
* Light mode neutral scale - Professional fintech UI
|
|
26
|
-
* Optimized for clarity without being overly bold
|
|
27
|
-
*
|
|
28
|
-
* Visual hierarchy (dark to light):
|
|
29
|
-
* 9 = Pure black (#000000) - 21:1 contrast - maximum emphasis
|
|
30
|
-
* 8 = Almost black (#171717) - 17.9:1 contrast - actions, input text
|
|
31
|
-
* 7 = Very dark (#404040) - 10.4:1 contrast - primary text (AAA)
|
|
32
|
-
* 6 = Dark gray (#525252) - 6.4:1 contrast - strong elements
|
|
33
|
-
* 5 = Medium-dark (#737373) - 3.9:1 contrast - secondary text (AA)
|
|
34
|
-
* 4 = Medium (#A3A3A3) - 3.1:1 contrast - tertiary text, borders
|
|
35
|
-
* 3 = Medium-light (#D4D4D4) - 2.1:1 contrast - subtle borders
|
|
36
|
-
* 2 = Light gray (#E8E8E8) - 1.6:1 contrast - hover states
|
|
37
|
-
* 1 = Very light (#F5F5F5) - 1.3:1 contrast - input backgrounds
|
|
38
|
-
* 0 = Pure white (#FFFFFF) - 1:1 - card surfaces
|
|
39
|
-
*/
|
|
40
|
-
const LIGHT_NEUTRAL_SCALE = {
|
|
41
|
-
0: '#FFFFFF', // Pure white
|
|
42
|
-
1: '#F5F5F5', // Very light gray
|
|
43
|
-
2: '#E8E8E8', // Light gray
|
|
44
|
-
3: '#D4D4D4', // Medium-light gray
|
|
45
|
-
4: '#A3A3A3', // Medium gray
|
|
46
|
-
5: '#737373', // Medium-dark gray
|
|
47
|
-
6: '#525252', // Dark gray
|
|
48
|
-
7: '#404040', // Very dark gray
|
|
49
|
-
8: '#171717', // Almost black
|
|
50
|
-
9: '#000000', // Pure black
|
|
51
|
-
};
|
|
52
|
-
/**
|
|
53
|
-
* Dark mode neutral scale - Professional fintech UI
|
|
54
|
-
* Inverted for dark backgrounds
|
|
55
|
-
*
|
|
56
|
-
* Visual hierarchy (light to dark):
|
|
57
|
-
* 9 = Pure white (#FFFFFF) - maximum emphasis
|
|
58
|
-
* 8 = Almost white (#F5F5F5) - actions, input text
|
|
59
|
-
* 7 = Very light (#D4D4D4) - primary text
|
|
60
|
-
* 6 = Light (#A3A3A3) - strong elements
|
|
61
|
-
* 5 = Medium-light (#737373) - secondary text
|
|
62
|
-
* 4 = Medium (#525252) - tertiary text, borders
|
|
63
|
-
* 3 = Medium-dark (#404040) - subtle borders
|
|
64
|
-
* 2 = Dark (#262626) - hover states
|
|
65
|
-
* 1 = Very dark (#171717) - input backgrounds
|
|
66
|
-
* 0 = Near black (#0A0A0A) - card surfaces
|
|
67
|
-
*/
|
|
68
|
-
const DARK_NEUTRAL_SCALE = {
|
|
69
|
-
0: '#0A0A0A', // Near black
|
|
70
|
-
1: '#171717', // Very dark
|
|
71
|
-
2: '#262626', // Dark
|
|
72
|
-
3: '#404040', // Medium-dark
|
|
73
|
-
4: '#525252', // Medium
|
|
74
|
-
5: '#737373', // Medium-light
|
|
75
|
-
6: '#A3A3A3', // Light
|
|
76
|
-
7: '#D4D4D4', // Very light
|
|
77
|
-
8: '#F5F5F5', // Almost white
|
|
78
|
-
9: '#FFFFFF', // Pure white
|
|
79
|
-
};
|
|
80
|
-
// ============================================
|
|
81
|
-
// COLOR PALETTE BUILDERS
|
|
82
|
-
// ============================================
|
|
83
|
-
/**
|
|
84
|
-
* Build light mode colors with neutral scale references
|
|
85
|
-
*/
|
|
86
|
-
const buildLightModeColors = () => {
|
|
87
|
-
const neutral = LIGHT_NEUTRAL_SCALE;
|
|
88
|
-
return {
|
|
89
|
-
mode: 'light',
|
|
90
|
-
neutral,
|
|
91
|
-
absolute: {
|
|
92
|
-
black: '#000000',
|
|
93
|
-
white: '#FFFFFF',
|
|
94
|
-
},
|
|
95
|
-
// Single accent - monochrome black
|
|
96
|
-
accent: {
|
|
97
|
-
default: neutral[7], // Almost black (#171717) - matches action.default
|
|
98
|
-
hover: neutral[6], // Very dark gray (#404040) - slightly lighter on hover
|
|
99
|
-
active: neutral[9], // Pure black (#000000) - darkest on active
|
|
100
|
-
subtle: neutral[1], // Very light gray (#F5F5F5) - subtle background
|
|
101
|
-
},
|
|
102
|
-
// Semantic colors - AAA contrast verified
|
|
103
|
-
semantic: {
|
|
104
|
-
error: {
|
|
105
|
-
main: '#DC2626', // Modern red - 5.9:1 contrast ✅
|
|
106
|
-
subtle: '#FEF2F2', // Very light red background
|
|
107
|
-
contrast: '#FFFFFF', // White text on red
|
|
108
|
-
},
|
|
109
|
-
success: {
|
|
110
|
-
main: '#0F766E', // Modern teal - 5.5:1 contrast ✅
|
|
111
|
-
subtle: '#F0FDFA', // Very light teal background
|
|
112
|
-
contrast: '#FFFFFF', // White text on teal
|
|
113
|
-
},
|
|
114
|
-
warning: {
|
|
115
|
-
main: '#EA580C', // Modern orange - 4.8:1 contrast ✅
|
|
116
|
-
subtle: '#FFF7ED', // Very light orange background
|
|
117
|
-
contrast: '#FFFFFF', // White text on orange
|
|
118
|
-
},
|
|
119
|
-
info: {
|
|
120
|
-
main: '#2563EB', // Same as accent - 6.1:1 contrast ✅
|
|
121
|
-
subtle: '#EFF6FF', // Very light blue background
|
|
122
|
-
contrast: '#FFFFFF', // White text on blue
|
|
123
|
-
},
|
|
124
|
-
pending: {
|
|
125
|
-
main: '#64748B', // Slate gray-blue - 4.5:1 contrast ✅
|
|
126
|
-
subtle: '#F8FAFC', // Very light slate
|
|
127
|
-
contrast: '#FFFFFF', // White text
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
// Secondary colors - 4-step scale with strong main colors
|
|
131
|
-
secondary: {
|
|
132
|
-
purple: {
|
|
133
|
-
subtlest: '#FDF4FF', // L: 98% - Almost white with faint purple
|
|
134
|
-
subtle: '#F5E3FF', // L: 93% - Soft purple background
|
|
135
|
-
main: '#470047', // Your dark magenta - 9.2:1 on subtlest ✅
|
|
136
|
-
contrast: '#FFFFFF', // White text on main
|
|
137
|
-
},
|
|
138
|
-
green: {
|
|
139
|
-
subtlest: '#F0FDF4', // L: 98% - Almost white with faint green
|
|
140
|
-
subtle: '#DCFCE7', // L: 95% - Soft green background
|
|
141
|
-
main: '#004700', // Your dark green - 8.9:1 on subtlest ✅
|
|
142
|
-
contrast: '#FFFFFF', // White text on main
|
|
143
|
-
},
|
|
144
|
-
blue: {
|
|
145
|
-
subtlest: '#F0F4FF', // L: 98% - Almost white with faint blue
|
|
146
|
-
subtle: '#E0E7FF', // L: 94% - Soft blue background
|
|
147
|
-
main: '#0000D1', // Your deep royal blue - 10.5:1 on subtlest ✅
|
|
148
|
-
contrast: '#FFFFFF', // White text on main
|
|
149
|
-
},
|
|
150
|
-
orange: {
|
|
151
|
-
subtlest: '#FFFBEB', // L: 98% - Almost white with faint orange
|
|
152
|
-
subtle: '#FEF3C7', // L: 95% - Soft orange/amber background
|
|
153
|
-
main: '#472400', // Your dark brown-orange - 10.8:1 on subtlest ✅
|
|
154
|
-
contrast: '#FFFFFF', // White text on main
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
// Surface hierarchy - clearly mapped to neutral scale
|
|
158
|
-
surface: {
|
|
159
|
-
page: neutral[1], // Very light gray - main background
|
|
160
|
-
card: neutral[0], // Pure white - elevated surfaces
|
|
161
|
-
overlay: neutral[0], // Pure white - modals, dropdowns
|
|
162
|
-
input: neutral[0], // Pure white - input fields
|
|
163
|
-
interactive: neutral[2], // Light gray - hover states
|
|
164
|
-
selected: neutral[2], // Light gray - selected states
|
|
165
|
-
nested: neutral[1], // Very light gray - nested backgrounds
|
|
166
|
-
},
|
|
167
|
-
// Border hierarchy - clearly mapped to neutral scale
|
|
168
|
-
border: {
|
|
169
|
-
subtle: neutral[2], // Light gray - dividers, subtle borders
|
|
170
|
-
default: neutral[3], // Medium-light gray - default borders
|
|
171
|
-
strong: neutral[4], // Medium gray - emphasized borders
|
|
172
|
-
},
|
|
173
|
-
// Text hierarchy - clearly mapped for professional fintech UI
|
|
174
|
-
text: {
|
|
175
|
-
primary: neutral[7], // Very dark gray - main text (10.4:1 AAA)
|
|
176
|
-
secondary: neutral[5], // Medium-dark gray - supporting text (3.9:1 AA)
|
|
177
|
-
tertiary: neutral[4], // Medium gray - hints, captions (3.1:1)
|
|
178
|
-
disabled: neutral[3], // Medium-light gray - disabled state
|
|
179
|
-
inverse: neutral[0], // Pure white - text on dark backgrounds
|
|
180
|
-
input: neutral[8], // Almost black - input text (17.9:1 AAA)
|
|
181
|
-
},
|
|
182
|
-
// Action colors - clearly mapped to neutral scale
|
|
183
|
-
action: {
|
|
184
|
-
default: neutral[8], // Almost black - primary actions
|
|
185
|
-
hover: neutral[7], // Very dark gray - action hover
|
|
186
|
-
disabled: neutral[2], // Light gray - disabled actions
|
|
187
|
-
contrast: neutral[0], // Pure white - text on actions
|
|
188
|
-
},
|
|
189
|
-
};
|
|
190
|
-
};
|
|
191
|
-
/**
|
|
192
|
-
* Build dark mode colors with neutral scale references
|
|
193
|
-
*/
|
|
194
|
-
const buildDarkModeColors = () => {
|
|
195
|
-
const neutral = DARK_NEUTRAL_SCALE;
|
|
196
|
-
return {
|
|
197
|
-
mode: 'dark',
|
|
198
|
-
neutral,
|
|
199
|
-
absolute: {
|
|
200
|
-
black: '#000000',
|
|
201
|
-
white: '#FFFFFF',
|
|
202
|
-
},
|
|
203
|
-
// Accent - brighter for dark backgrounds
|
|
204
|
-
accent: {
|
|
205
|
-
default: '#60A5FA', // Brighter blue for dark bg
|
|
206
|
-
hover: '#93C5FD',
|
|
207
|
-
active: '#BFDBFE',
|
|
208
|
-
subtle: '#1E3A8A',
|
|
209
|
-
},
|
|
210
|
-
// Semantic colors - vibrant on dark, AAA contrast
|
|
211
|
-
semantic: {
|
|
212
|
-
error: {
|
|
213
|
-
main: '#F87171', // Bright red - 8.3:1 on dark ✅
|
|
214
|
-
subtle: '#7F1D1D', // Dark red background
|
|
215
|
-
contrast: '#450A0A', // Very dark red
|
|
216
|
-
},
|
|
217
|
-
success: {
|
|
218
|
-
main: '#5EEAD4', // Bright teal - 12.5:1 on dark ✅
|
|
219
|
-
subtle: '#134E4A', // Dark teal background
|
|
220
|
-
contrast: '#0A3A35', // Very dark teal
|
|
221
|
-
},
|
|
222
|
-
warning: {
|
|
223
|
-
main: '#FB923C', // Bright orange - 9.5:1 on dark ✅
|
|
224
|
-
subtle: '#7C2D12', // Dark orange background
|
|
225
|
-
contrast: '#431407', // Very dark orange
|
|
226
|
-
},
|
|
227
|
-
info: {
|
|
228
|
-
main: '#60A5FA', // Bright blue - 8.0:1 on dark ✅
|
|
229
|
-
subtle: '#1E3A8A', // Dark blue background
|
|
230
|
-
contrast: '#1E3A8A', // Dark blue
|
|
231
|
-
},
|
|
232
|
-
pending: {
|
|
233
|
-
main: '#94A3B8', // Light slate - 6.5:1 on dark ✅
|
|
234
|
-
subtle: '#1E293B', // Dark slate
|
|
235
|
-
contrast: '#0F172A', // Very dark slate
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
// Secondary colors - bright main, dark backgrounds (inverted principle)
|
|
239
|
-
secondary: {
|
|
240
|
-
purple: {
|
|
241
|
-
subtlest: '#2E0A2E', // L: 14% - Very dark purple (barely visible)
|
|
242
|
-
subtle: '#4A1A4A', // L: 20% - Dark purple (subtle)
|
|
243
|
-
main: '#E879F9', // L: 70% - Bright magenta - 8.5:1 on subtlest ✅
|
|
244
|
-
contrast: '#1A0A1A', // Very dark for text on bright
|
|
245
|
-
},
|
|
246
|
-
green: {
|
|
247
|
-
subtlest: '#0A1F0A', // L: 12% - Very dark green
|
|
248
|
-
subtle: '#1A3A1A', // L: 18% - Dark green
|
|
249
|
-
main: '#4ADE80', // L: 75% - Bright green - 10.2:1 on subtlest ✅
|
|
250
|
-
contrast: '#0A1A0A', // Very dark green
|
|
251
|
-
},
|
|
252
|
-
blue: {
|
|
253
|
-
subtlest: '#0A0F2E', // L: 13% - Very dark blue
|
|
254
|
-
subtle: '#1A1F4A', // L: 19% - Dark blue
|
|
255
|
-
main: '#60A5FA', // L: 72% - Bright blue - 8.0:1 on subtlest ✅
|
|
256
|
-
contrast: '#0A0F1A', // Very dark blue
|
|
257
|
-
},
|
|
258
|
-
orange: {
|
|
259
|
-
subtlest: '#1F1A0A', // L: 10% - Very dark orange
|
|
260
|
-
subtle: '#3A2E1A', // L: 18% - Dark orange
|
|
261
|
-
main: '#FB923C', // L: 75% - Bright orange - 9.5:1 on subtlest ✅
|
|
262
|
-
contrast: '#1A0F0A', // Very dark orange
|
|
263
|
-
},
|
|
264
|
-
},
|
|
265
|
-
// Surface hierarchy - clearly mapped to neutral scale
|
|
266
|
-
surface: {
|
|
267
|
-
page: neutral[1], // Very dark - main background
|
|
268
|
-
card: neutral[0], // Near black - elevated surfaces
|
|
269
|
-
overlay: neutral[0], // Near black - modals, dropdowns
|
|
270
|
-
input: neutral[0], // Near black - input fields
|
|
271
|
-
interactive: neutral[2], // Dark - hover states
|
|
272
|
-
selected: neutral[2], // Dark - selected states
|
|
273
|
-
nested: neutral[1], // Very dark - nested backgrounds
|
|
274
|
-
},
|
|
275
|
-
// Border hierarchy - clearly mapped to neutral scale
|
|
276
|
-
border: {
|
|
277
|
-
subtle: neutral[2], // Dark - dividers, subtle borders
|
|
278
|
-
default: neutral[3], // Medium-dark - default borders
|
|
279
|
-
strong: neutral[4], // Medium - emphasized borders
|
|
280
|
-
},
|
|
281
|
-
// Text hierarchy - clearly mapped for professional fintech UI
|
|
282
|
-
text: {
|
|
283
|
-
primary: neutral[7], // Very light - main text
|
|
284
|
-
secondary: neutral[5], // Medium-light - supporting text
|
|
285
|
-
tertiary: neutral[4], // Medium - hints, captions
|
|
286
|
-
disabled: neutral[3], // Medium-dark - disabled state
|
|
287
|
-
inverse: neutral[0], // Near black - text on light backgrounds
|
|
288
|
-
input: neutral[8], // Almost white - input text
|
|
289
|
-
},
|
|
290
|
-
// Action colors - clearly mapped to neutral scale
|
|
291
|
-
action: {
|
|
292
|
-
default: neutral[8], // Almost white - primary actions
|
|
293
|
-
hover: neutral[7], // Very light - action hover
|
|
294
|
-
disabled: neutral[2], // Dark - disabled actions
|
|
295
|
-
contrast: neutral[0], // Near black - text on actions
|
|
296
|
-
},
|
|
297
|
-
};
|
|
298
|
-
};
|
|
299
|
-
// ============================================
|
|
300
|
-
// EXPORTS
|
|
301
|
-
// ============================================
|
|
302
|
-
export const buildColorPalette = (mode = 'light') => {
|
|
303
|
-
return mode === 'light' ? buildLightModeColors() : buildDarkModeColors();
|
|
304
|
-
};
|
|
305
|
-
export const lightPalette = buildLightModeColors();
|
|
306
|
-
export const darkPalette = buildDarkModeColors();
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tembo Design System - Constants
|
|
3
|
-
*
|
|
4
|
-
* All non-color design tokens: typography, spacing, radius, shadows, etc.
|
|
5
|
-
* Bold rounded corners with subtle shadows for elevation.
|
|
6
|
-
*/
|
|
7
|
-
export interface UIConstants {
|
|
8
|
-
/**
|
|
9
|
-
* Typography tokens
|
|
10
|
-
*/
|
|
11
|
-
typography: {
|
|
12
|
-
fontFamily: {
|
|
13
|
-
base: string;
|
|
14
|
-
mono: string;
|
|
15
|
-
};
|
|
16
|
-
fontSize: {
|
|
17
|
-
xs: number;
|
|
18
|
-
sm: number;
|
|
19
|
-
base: number;
|
|
20
|
-
lg: number;
|
|
21
|
-
xl: number;
|
|
22
|
-
'2xl': number;
|
|
23
|
-
'3xl': number;
|
|
24
|
-
'4xl': number;
|
|
25
|
-
'5xl': number;
|
|
26
|
-
};
|
|
27
|
-
fontWeight: {
|
|
28
|
-
light: number;
|
|
29
|
-
regular: number;
|
|
30
|
-
medium: number;
|
|
31
|
-
semibold: number;
|
|
32
|
-
bold: number;
|
|
33
|
-
heavy: number;
|
|
34
|
-
};
|
|
35
|
-
lineHeight: {
|
|
36
|
-
tight: number;
|
|
37
|
-
base: number;
|
|
38
|
-
relaxed: number;
|
|
39
|
-
};
|
|
40
|
-
letterSpacing: {
|
|
41
|
-
tight: string;
|
|
42
|
-
base: string;
|
|
43
|
-
wide: string;
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* Spacing scale (4px base unit)
|
|
48
|
-
* Includes both numeric values and semantic aliases
|
|
49
|
-
*/
|
|
50
|
-
spacing: {
|
|
51
|
-
0: number;
|
|
52
|
-
1: number;
|
|
53
|
-
2: number;
|
|
54
|
-
3: number;
|
|
55
|
-
4: number;
|
|
56
|
-
5: number;
|
|
57
|
-
6: number;
|
|
58
|
-
8: number;
|
|
59
|
-
10: number;
|
|
60
|
-
12: number;
|
|
61
|
-
16: number;
|
|
62
|
-
20: number;
|
|
63
|
-
xs: number;
|
|
64
|
-
sm: number;
|
|
65
|
-
md: number;
|
|
66
|
-
lg: number;
|
|
67
|
-
xl: number;
|
|
68
|
-
'2xl': number;
|
|
69
|
-
'3xl': number;
|
|
70
|
-
'4xl': number;
|
|
71
|
-
'5xl': number;
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Border radius tokens
|
|
75
|
-
* Bold, smooth rounded corners throughout the design
|
|
76
|
-
*/
|
|
77
|
-
radius: {
|
|
78
|
-
none: number;
|
|
79
|
-
sm: number;
|
|
80
|
-
base: number;
|
|
81
|
-
md: number;
|
|
82
|
-
lg: number;
|
|
83
|
-
xl: number;
|
|
84
|
-
full: number;
|
|
85
|
-
button: number;
|
|
86
|
-
input: number;
|
|
87
|
-
card: number;
|
|
88
|
-
modal: number;
|
|
89
|
-
avatar: number;
|
|
90
|
-
};
|
|
91
|
-
/**
|
|
92
|
-
* Box shadow tokens
|
|
93
|
-
* Subtle shadows for gentle elevation
|
|
94
|
-
* Inputs and buttons have no shadow - shadows only for raised/overlay elements
|
|
95
|
-
*/
|
|
96
|
-
shadow: {
|
|
97
|
-
none: string;
|
|
98
|
-
sm: string;
|
|
99
|
-
base: string;
|
|
100
|
-
md: string;
|
|
101
|
-
lg: string;
|
|
102
|
-
xl: string;
|
|
103
|
-
card: string;
|
|
104
|
-
modal: string;
|
|
105
|
-
popover: string;
|
|
106
|
-
tooltip: string;
|
|
107
|
-
};
|
|
108
|
-
/**
|
|
109
|
-
* Z-index layers
|
|
110
|
-
*/
|
|
111
|
-
zIndex: {
|
|
112
|
-
dropdown: number;
|
|
113
|
-
modal: number;
|
|
114
|
-
popover: number;
|
|
115
|
-
tooltip: number;
|
|
116
|
-
notification: number;
|
|
117
|
-
};
|
|
118
|
-
/**
|
|
119
|
-
* Transition timing
|
|
120
|
-
*/
|
|
121
|
-
transition: {
|
|
122
|
-
fast: string;
|
|
123
|
-
base: string;
|
|
124
|
-
slow: string;
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* Default UI constants
|
|
129
|
-
* Bold rounded corners with subtle shadows for elevation
|
|
130
|
-
*/
|
|
131
|
-
export declare const defaultUIConstants: UIConstants;
|
|
132
|
-
/**
|
|
133
|
-
* Dark mode adjustments
|
|
134
|
-
* Shadows are more subtle/absent in dark mode
|
|
135
|
-
*/
|
|
136
|
-
export declare const buildDarkModeConstants: () => Pick<UIConstants, "shadow">;
|