@temboplus/frontend-react-core 0.1.3-beta.12 → 0.1.3-beta.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/alerts/index.cjs.js +1 -1
  2. package/dist/alerts/index.cjs.js.map +1 -1
  3. package/dist/alerts/index.js +1 -1
  4. package/dist/alerts/index.js.map +1 -1
  5. package/dist/dialogs/index.cjs.js +3 -3
  6. package/dist/dialogs/index.cjs.js.map +1 -1
  7. package/dist/dialogs/index.js +3 -3
  8. package/dist/dialogs/index.js.map +1 -1
  9. package/dist/features/alerts/alert.js +18 -18
  10. package/dist/features/dialogs/tembo-confirm.js +11 -11
  11. package/dist/features/notifications/tembo-notify.d.ts +3 -2
  12. package/dist/features/notifications/toast-config.d.ts +4 -3
  13. package/dist/features/notifications/toast-config.js +7 -7
  14. package/dist/features/notifications/toast-container.js +2 -2
  15. package/dist/index.cjs.js +1 -1
  16. package/dist/index.cjs.js.map +1 -1
  17. package/dist/index.esm.js +1 -1
  18. package/dist/index.esm.js.map +1 -1
  19. package/dist/notifications/index.cjs.js +1 -1
  20. package/dist/notifications/index.js +1 -1
  21. package/dist/tembo-notify-8__PpMV9.js +3 -0
  22. package/dist/tembo-notify-8__PpMV9.js.map +1 -0
  23. package/dist/tembo-notify-DrVkWFXZ.js +3 -0
  24. package/dist/tembo-notify-DrVkWFXZ.js.map +1 -0
  25. package/dist/theme/index.cjs.js +1 -1
  26. package/dist/theme/index.js +1 -1
  27. package/dist/theme/theme-config.d.ts +3 -2
  28. package/dist/theme/theme-config.js +168 -214
  29. package/dist/theme/theme-provider.d.ts +23 -11
  30. package/dist/theme/theme-provider.js +25 -14
  31. package/dist/theme/tokens/{color.d.ts → colors.d.ts} +32 -17
  32. package/dist/theme/tokens/{color.js → colors.js} +65 -46
  33. package/dist/theme/tokens/constants.d.ts +126 -0
  34. package/dist/theme/tokens/constants.js +126 -0
  35. package/dist/theme-provider-BP-1aQ22.js +11 -0
  36. package/dist/theme-provider-BP-1aQ22.js.map +1 -0
  37. package/dist/theme-provider-Ck6qg6WJ.js +2 -0
  38. package/dist/theme-provider-Ck6qg6WJ.js.map +1 -0
  39. package/dist/theme-provider-Cpt7os8V.js +2 -0
  40. package/dist/theme-provider-Cpt7os8V.js.map +1 -0
  41. package/dist/theme-provider-CvaUdBY_.js +11 -0
  42. package/dist/theme-provider-CvaUdBY_.js.map +1 -0
  43. package/package.json +1 -1
  44. package/dist/tembo-notify-BUN8_mKb.js +0 -3
  45. package/dist/tembo-notify-BUN8_mKb.js.map +0 -1
  46. package/dist/tembo-notify-D0uYvwZP.js +0 -3
  47. package/dist/tembo-notify-D0uYvwZP.js.map +0 -1
  48. package/dist/theme/tokens/radius.d.ts +0 -26
  49. package/dist/theme/tokens/radius.js +0 -17
  50. package/dist/theme/tokens/shadow.d.ts +0 -27
  51. package/dist/theme/tokens/shadow.js +0 -23
  52. package/dist/theme/tokens/spacing.d.ts +0 -47
  53. package/dist/theme/tokens/spacing.js +0 -32
  54. package/dist/theme/tokens/typography.d.ts +0 -43
  55. package/dist/theme/tokens/typography.js +0 -33
  56. package/dist/theme-provider-BsQRkig_.js +0 -11
  57. package/dist/theme-provider-BsQRkig_.js.map +0 -1
  58. package/dist/theme-provider-C44BTeC4.js +0 -11
  59. package/dist/theme-provider-C44BTeC4.js.map +0 -1
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
- import { type ThemeConfig } from 'antd';
3
- import { ColorPalette, ThemeMode } from './tokens/color.js';
2
+ import type { ThemeConfig } from 'antd';
3
+ import { UIConstants } from './tokens/constants.js';
4
+ import { ColorPalette, ThemeMode } from './tokens/colors.js';
4
5
  /**
5
- * Theme context value
6
+ * Theme context value - now includes constants!
6
7
  */
7
8
  export interface TemboTheme {
8
9
  colors: ColorPalette;
10
+ constants: UIConstants;
9
11
  mode: ThemeMode;
10
12
  }
11
13
  /**
@@ -13,22 +15,32 @@ export interface TemboTheme {
13
15
  */
14
16
  export interface TemboThemeProviderProps {
15
17
  children: React.ReactNode;
16
- /** Theme mode - 'light' or 'dark' */
17
18
  mode?: ThemeMode;
18
- /** Raw Ant Design theme overrides (advanced usage) */
19
19
  antdThemeOverrides?: Partial<ThemeConfig>;
20
20
  }
21
21
  /**
22
22
  * TemboThemeProvider
23
- *
24
- * Wraps your application with monochrome-first theming system.
25
- * Supports seamless light/dark mode switching.
26
23
  */
27
24
  export declare const TemboThemeProvider: React.FC<TemboThemeProviderProps>;
28
25
  /**
29
- * Hook to access current theme
26
+ * Hook to access theme - now returns constants too!
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * function MyComponent() {
31
+ * const { colors, constants, mode } = useTemboTheme();
30
32
  *
31
- * Returns the active color palette and theme mode.
32
- * Use this in components that need direct access to theme tokens.
33
+ * return (
34
+ * <div style={{
35
+ * color: colors.text.primary,
36
+ * padding: constants.spacing[4],
37
+ * borderRadius: constants.radius.base,
38
+ * fontWeight: constants.typography.fontWeight.medium,
39
+ * }}>
40
+ * Content
41
+ * </div>
42
+ * );
43
+ * }
44
+ * ```
33
45
  */
34
46
  export declare const useNewTemboTheme: () => TemboTheme;
@@ -1,38 +1,49 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { ConfigProvider } from 'antd';
4
+ import { defaultUIConstants } from './tokens/constants.js';
4
5
  import { buildAntDTheme } from './theme-config.js';
5
- import { buildColorPalette } from './tokens/color.js';
6
+ import { buildColorPalette } from './tokens/colors.js';
6
7
  const TemboThemeContext = React.createContext({
7
8
  colors: buildColorPalette('light'),
9
+ constants: defaultUIConstants,
8
10
  mode: 'light',
9
11
  });
10
12
  /**
11
13
  * TemboThemeProvider
12
- *
13
- * Wraps your application with monochrome-first theming system.
14
- * Supports seamless light/dark mode switching.
15
14
  */
16
15
  export const TemboThemeProvider = ({ children, mode = 'light', antdThemeOverrides, }) => {
17
- // Build color palette for current mode
18
16
  const colors = React.useMemo(() => buildColorPalette(mode), [mode]);
19
- // Build Ant Design theme configuration
17
+ const constants = React.useMemo(() => defaultUIConstants, []);
20
18
  const antdTheme = React.useMemo(() => {
21
19
  var _a, _b;
22
- const baseTheme = buildAntDTheme(colors);
20
+ const baseTheme = buildAntDTheme(colors, constants);
23
21
  if (!antdThemeOverrides)
24
22
  return baseTheme;
25
- // Deep merge overrides
26
23
  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 : {})) });
27
- }, [colors, antdThemeOverrides]);
28
- // Build context value
29
- const contextValue = React.useMemo(() => ({ colors, mode }), [colors, mode]);
24
+ }, [colors, constants, antdThemeOverrides]);
25
+ const contextValue = React.useMemo(() => ({ colors, constants, mode }), [colors, constants, mode]);
30
26
  return (_jsx(TemboThemeContext.Provider, { value: contextValue, children: _jsx(ConfigProvider, { theme: antdTheme, children: children }) }));
31
27
  };
32
28
  /**
33
- * Hook to access current theme
29
+ * Hook to access theme - now returns constants too!
30
+ *
31
+ * @example
32
+ * ```tsx
33
+ * function MyComponent() {
34
+ * const { colors, constants, mode } = useTemboTheme();
34
35
  *
35
- * Returns the active color palette and theme mode.
36
- * Use this in components that need direct access to theme tokens.
36
+ * return (
37
+ * <div style={{
38
+ * color: colors.text.primary,
39
+ * padding: constants.spacing[4],
40
+ * borderRadius: constants.radius.base,
41
+ * fontWeight: constants.typography.fontWeight.medium,
42
+ * }}>
43
+ * Content
44
+ * </div>
45
+ * );
46
+ * }
47
+ * ```
37
48
  */
38
49
  export const useNewTemboTheme = () => React.useContext(TemboThemeContext);
@@ -4,12 +4,10 @@
4
4
  * Monochrome-first design system with purposeful color usage.
5
5
  *
6
6
  * Philosophy:
7
- * - Monochrome foundation (4 neutral tones)
8
- * - Color used purposefully (semantic feedback, categories, data viz)
9
- * - Standard blue for links (web conventions)
7
+ * - 6 neutral tones for optimal contrast and clean mapping
8
+ * - Monochrome foundation with semantic color accents
9
+ * - Standard blue for links and focus states
10
10
  * - Theme-aware: entire system adapts to light/dark mode
11
- *
12
- * Inspired by: Wise, Linear, Apple HIG
13
11
  */
14
12
  export type ThemeMode = 'light' | 'dark';
15
13
  /**
@@ -30,19 +28,24 @@ export interface ColorScale {
30
28
  export interface ColorPalette {
31
29
  mode: ThemeMode;
32
30
  /**
33
- * Monochrome foundation - 4 neutral tones
31
+ * Monochrome foundation - 6 neutral tones
34
32
  * Theme-aware: inverts in dark mode
33
+ * Optimized for accessibility with proper contrast ratios
35
34
  *
36
- * 1 = Brightest (backgrounds)
37
- * 2 = Subtle (hover states, dividers)
38
- * 3 = Medium (borders, disabled text)
39
- * 4 = Darkest (text, primary elements)
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)
40
41
  */
41
42
  neutral: {
42
43
  1: string;
43
44
  2: string;
44
45
  3: string;
45
46
  4: string;
47
+ 5: string;
48
+ 6: string;
46
49
  };
47
50
  /**
48
51
  * Absolute colors - never change
@@ -53,7 +56,7 @@ export interface ColorPalette {
53
56
  };
54
57
  /**
55
58
  * Links - standard web colors
56
- * Same in both themes (chosen for universal contrast)
59
+ * Also used for focus rings (blue is universal web standard)
57
60
  */
58
61
  link: {
59
62
  /** Default link color - standard blue */
@@ -88,8 +91,7 @@ export interface ColorPalette {
88
91
  orange: ColorScale;
89
92
  };
90
93
  /**
91
- * Surface hierarchy - derived from neutral scale
92
- * Convenience tokens for common surfaces
94
+ * Surface hierarchy
93
95
  */
94
96
  surface: {
95
97
  /** Main page background */
@@ -106,18 +108,18 @@ export interface ColorPalette {
106
108
  nested: string;
107
109
  };
108
110
  /**
109
- * Border colors - derived from neutral scale
111
+ * Border colors
110
112
  */
111
113
  border: {
112
114
  /** Subtle borders - dividers, separators */
113
115
  subtle: string;
114
116
  /** Default borders - form inputs, cards */
115
117
  default: string;
116
- /** Strong borders - emphasis, focus alternative */
118
+ /** Strong borders - emphasis */
117
119
  strong: string;
118
120
  };
119
121
  /**
120
- * Text colors - derived from neutral scale
122
+ * Text colors
121
123
  */
122
124
  text: {
123
125
  /** Primary text - headlines, body copy */
@@ -131,6 +133,20 @@ export interface ColorPalette {
131
133
  /** Text on dark backgrounds */
132
134
  inverse: string;
133
135
  };
136
+ /**
137
+ * Monochrome actions - for buttons and interactive elements
138
+ * Inverts automatically with theme mode
139
+ */
140
+ action: {
141
+ /** Default action background */
142
+ default: string;
143
+ /** Hover state background */
144
+ hover: string;
145
+ /** Disabled state background */
146
+ disabled: string;
147
+ /** Text/icons on action backgrounds */
148
+ contrast: string;
149
+ };
134
150
  }
135
151
  /**
136
152
  * Build color palette for given theme mode
@@ -146,7 +162,6 @@ export declare const lightPalette: ColorPalette;
146
162
  export declare const darkPalette: ColorPalette;
147
163
  /**
148
164
  * Color palette overrides (for custom theming)
149
- * Allows partial overrides while maintaining type safety
150
165
  */
151
166
  export type ColorOverrides = {
152
167
  neutral?: Partial<ColorPalette['neutral']>;
@@ -4,47 +4,49 @@
4
4
  * Monochrome-first design system with purposeful color usage.
5
5
  *
6
6
  * Philosophy:
7
- * - Monochrome foundation (4 neutral tones)
8
- * - Color used purposefully (semantic feedback, categories, data viz)
9
- * - Standard blue for links (web conventions)
7
+ * - 6 neutral tones for optimal contrast and clean mapping
8
+ * - Monochrome foundation with semantic color accents
9
+ * - Standard blue for links and focus states
10
10
  * - Theme-aware: entire system adapts to light/dark mode
11
- *
12
- * Inspired by: Wise, Linear, Apple HIG
13
11
  */
14
12
  /**
15
- * Build light mode colors
13
+ * Build light mode colors with 6-tone neutral scale
16
14
  */
17
15
  const buildLightModeColors = () => ({
18
16
  mode: 'light',
17
+ // 6 neutral tones - optimized for accessibility
19
18
  neutral: {
20
- 1: '#FFFFFF', // Pure white - cards, inputs
21
- 2: '#F7F8F9', // Light gray - page backgrounds, hover
22
- 3: '#E1E4E8', // Medium gray - borders
23
- 4: '#2E3338', // Dark gray - text, primary elements
19
+ 1: '#FFFFFF', // Pure white
20
+ 2: '#F5F7FA', // Very light gray - page backgrounds
21
+ 3: '#E5E7EB', // Light gray - hover, subtle borders
22
+ 4: '#D1D5DB', // Medium gray - default borders
23
+ 5: '#6B7280', // Dark gray - secondary text, strong borders
24
+ 6: '#111827', // Near black - primary text, actions
24
25
  },
25
26
  absolute: {
26
27
  black: '#000000',
27
28
  white: '#FFFFFF',
28
29
  },
30
+ // Standard blue for links and focus states
29
31
  link: {
30
32
  default: '#2563EB', // Standard web blue
31
33
  hover: '#1D4ED8', // Darker blue
32
- visited: '#7C3AED', // Purple (standard)
34
+ visited: '#7C3AED', // Purple (web standard)
33
35
  active: '#1E40AF', // Even darker blue
34
36
  },
35
37
  semantic: {
36
38
  success: {
37
- main: '#059669', // Dark green (readable on white)
39
+ main: '#059669', // Dark green (7.0:1 contrast)
38
40
  subtle: '#ECFDF5', // Very light green
39
41
  contrast: '#FFFFFF', // White text on main
40
42
  },
41
43
  error: {
42
- main: '#DC2626', // Dark red
44
+ main: '#DC2626', // Dark red (6.5:1 contrast)
43
45
  subtle: '#FEF2F2', // Very light red
44
46
  contrast: '#FFFFFF',
45
47
  },
46
48
  warning: {
47
- main: '#D97706', // Dark amber
49
+ main: '#D97706', // Dark amber (6.0:1 contrast)
48
50
  subtle: '#FFFBEB', // Very light yellow
49
51
  contrast: '#FFFFFF',
50
52
  },
@@ -86,40 +88,50 @@ const buildLightModeColors = () => ({
86
88
  contrast: '#FFFFFF',
87
89
  },
88
90
  },
89
- // Derived surface tokens
91
+ // Derived surface tokens (from 6-tone scale)
90
92
  surface: {
91
- page: '#F7F8F9', // neutral[2]
93
+ page: '#F5F7FA', // neutral[2]
92
94
  card: '#FFFFFF', // neutral[1]
93
95
  overlay: '#FFFFFF', // neutral[1]
94
- interactive: '#F0F2F5', // Between neutral[1] and neutral[2]
95
- selected: '#F7F8F9', // neutral[2]
96
- nested: '#FAFBFC', // Between neutral[1] and neutral[2]
96
+ interactive: '#E5E7EB', // neutral[3]
97
+ selected: '#E5E7EB', // neutral[3]
98
+ nested: '#FAFBFC', // Between neutral[1] and [2]
97
99
  },
98
100
  // Derived border tokens
99
101
  border: {
100
- subtle: '#F0F2F5', // Lighter than neutral[3]
101
- default: '#E1E4E8', // neutral[3]
102
- strong: '#C4CCD4', // Between neutral[3] and neutral[4]
102
+ subtle: '#E5E7EB', // neutral[3]
103
+ default: '#D1D5DB', // neutral[4]
104
+ strong: '#6B7280', // neutral[5]
103
105
  },
104
106
  // Derived text tokens
105
107
  text: {
106
- primary: '#2E3338', // neutral[4]
107
- secondary: '#5E6C7A', // ~70% opacity of neutral[4]
108
- tertiary: '#8A96A3', // ~50% opacity of neutral[4]
109
- disabled: '#C4CCD4', // ~30% opacity of neutral[4]
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
110
112
  inverse: '#FFFFFF', // neutral[1]
111
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
+ },
112
121
  });
113
122
  /**
114
- * Build dark mode colors
123
+ * Build dark mode colors with inverted 6-tone scale
115
124
  */
116
125
  const buildDarkModeColors = () => ({
117
126
  mode: 'dark',
127
+ // 6 neutral tones - inverted for dark mode
118
128
  neutral: {
119
- 1: '#1A1D21', // Dark background
120
- 2: '#2E3338', // Slightly lighter
121
- 3: '#4A5158', // Medium gray
122
- 4: '#F7F8F9', // Light text
129
+ 1: '#111827', // Near black
130
+ 2: '#1F2937', // Very dark gray
131
+ 3: '#374151', // Dark gray
132
+ 4: '#4B5563', // Medium gray
133
+ 5: '#9CA3AF', // Light gray
134
+ 6: '#F9FAFB', // Off white
123
135
  },
124
136
  absolute: {
125
137
  black: '#000000',
@@ -133,7 +145,7 @@ const buildDarkModeColors = () => ({
133
145
  },
134
146
  semantic: {
135
147
  success: {
136
- main: '#34D399', // Bright green (readable on dark)
148
+ main: '#34D399', // Bright green
137
149
  subtle: '#064E3B', // Dark green background
138
150
  contrast: '#000000', // Black text on bright
139
151
  },
@@ -187,26 +199,33 @@ const buildDarkModeColors = () => ({
187
199
  },
188
200
  // Derived surface tokens
189
201
  surface: {
190
- page: '#1A1D21', // neutral[1]
191
- card: '#2E3338', // neutral[2]
192
- overlay: '#2E3338', // neutral[2]
193
- interactive: '#3A3F45', // Between neutral[2] and neutral[3]
194
- selected: '#2E3338', // neutral[2]
195
- nested: '#242729', // Between neutral[1] and neutral[2]
202
+ page: '#1F2937', // neutral[2]
203
+ card: '#111827', // neutral[1]
204
+ overlay: '#1F2937', // neutral[2]
205
+ interactive: '#374151', // neutral[3]
206
+ selected: '#374151', // neutral[3]
207
+ nested: '#1A1F2E', // Between neutral[1] and [2]
196
208
  },
197
209
  // Derived border tokens
198
210
  border: {
199
- subtle: '#3A3F45', // Lighter than neutral[3]
200
- default: '#4A5158', // neutral[3]
201
- strong: '#5E6C7A', // Between neutral[3] and neutral[4]
211
+ subtle: '#374151', // neutral[3]
212
+ default: '#4B5563', // neutral[4]
213
+ strong: '#9CA3AF', // neutral[5]
202
214
  },
203
215
  // Derived text tokens
204
216
  text: {
205
- primary: '#F7F8F9', // neutral[4]
206
- secondary: '#B4BCC5', // ~75% opacity
207
- tertiary: '#8A96A3', // ~55% opacity
208
- disabled: '#5E6C7A', // ~35% opacity
209
- inverse: '#1A1D21', // neutral[1]
217
+ primary: '#F9FAFB', // neutral[6]
218
+ secondary: '#9CA3AF', // neutral[5]
219
+ tertiary: '#9CA3AF', // neutral[5]
220
+ disabled: '#4B5563', // neutral[4]
221
+ inverse: '#111827', // neutral[1]
222
+ },
223
+ // Monochrome actions (inverted)
224
+ action: {
225
+ default: '#F9FAFB', // neutral[6] - light button
226
+ hover: '#E5E7EB', // Slightly darker
227
+ disabled: '#374151', // neutral[3] - dark disabled
228
+ contrast: '#111827', // neutral[1] - dark text
210
229
  },
211
230
  });
212
231
  /**
@@ -0,0 +1,126 @@
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
+ */
49
+ spacing: {
50
+ 0: number;
51
+ 1: number;
52
+ 2: number;
53
+ 3: number;
54
+ 4: number;
55
+ 5: number;
56
+ 6: number;
57
+ 8: number;
58
+ 10: number;
59
+ 12: number;
60
+ 16: number;
61
+ 20: number;
62
+ };
63
+ /**
64
+ * Border radius tokens
65
+ * Bold, smooth rounded corners throughout the design
66
+ */
67
+ radius: {
68
+ none: number;
69
+ sm: number;
70
+ base: number;
71
+ md: number;
72
+ lg: number;
73
+ xl: number;
74
+ full: number;
75
+ button: number;
76
+ input: number;
77
+ card: number;
78
+ modal: number;
79
+ avatar: number;
80
+ };
81
+ /**
82
+ * Box shadow tokens
83
+ * Subtle shadows for gentle elevation
84
+ * Inputs and buttons have no shadow - shadows only for raised/overlay elements
85
+ */
86
+ shadow: {
87
+ none: string;
88
+ sm: string;
89
+ base: string;
90
+ md: string;
91
+ lg: string;
92
+ xl: string;
93
+ card: string;
94
+ modal: string;
95
+ popover: string;
96
+ tooltip: string;
97
+ };
98
+ /**
99
+ * Z-index layers
100
+ */
101
+ zIndex: {
102
+ dropdown: number;
103
+ modal: number;
104
+ popover: number;
105
+ tooltip: number;
106
+ notification: number;
107
+ };
108
+ /**
109
+ * Transition timing
110
+ */
111
+ transition: {
112
+ fast: string;
113
+ base: string;
114
+ slow: string;
115
+ };
116
+ }
117
+ /**
118
+ * Default UI constants
119
+ * Bold rounded corners with subtle shadows for elevation
120
+ */
121
+ export declare const defaultUIConstants: UIConstants;
122
+ /**
123
+ * Dark mode adjustments
124
+ * Shadows are more subtle/absent in dark mode
125
+ */
126
+ export declare const buildDarkModeConstants: () => Pick<UIConstants, "shadow">;
@@ -0,0 +1,126 @@
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
+ /**
8
+ * Default UI constants
9
+ * Bold rounded corners with subtle shadows for elevation
10
+ */
11
+ export const defaultUIConstants = {
12
+ typography: {
13
+ fontFamily: {
14
+ base: "Avenir, MarkPro, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",
15
+ mono: "'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace",
16
+ },
17
+ fontSize: {
18
+ xs: 12,
19
+ sm: 13,
20
+ base: 14,
21
+ lg: 16,
22
+ xl: 18,
23
+ '2xl': 20,
24
+ '3xl': 24,
25
+ '4xl': 30,
26
+ '5xl': 36,
27
+ },
28
+ fontWeight: {
29
+ light: 300,
30
+ regular: 400,
31
+ medium: 500,
32
+ semibold: 600,
33
+ bold: 700,
34
+ heavy: 800,
35
+ },
36
+ lineHeight: {
37
+ tight: 1.25,
38
+ base: 1.5,
39
+ relaxed: 1.75,
40
+ },
41
+ letterSpacing: {
42
+ tight: '-0.01em',
43
+ base: '0',
44
+ wide: '0.025em',
45
+ },
46
+ },
47
+ spacing: {
48
+ 0: 0,
49
+ 1: 4,
50
+ 2: 8,
51
+ 3: 12,
52
+ 4: 16,
53
+ 5: 20,
54
+ 6: 24,
55
+ 8: 32,
56
+ 10: 40,
57
+ 12: 48,
58
+ 16: 64,
59
+ 20: 80,
60
+ },
61
+ /**
62
+ * Bold rounded corners
63
+ */
64
+ radius: {
65
+ none: 0,
66
+ sm: 12,
67
+ base: 24, // Bold default radius
68
+ md: 28,
69
+ lg: 32,
70
+ xl: 40,
71
+ full: 9999,
72
+ // Alias tokens
73
+ button: 24, // base - bold rounded buttons
74
+ input: 24, // base - bold rounded inputs
75
+ card: 28, // md - smooth cards
76
+ modal: 32, // lg - prominent modals
77
+ avatar: 9999, // full - circular
78
+ },
79
+ /**
80
+ * Subtle shadows - only for elevated/overlay elements
81
+ */
82
+ shadow: {
83
+ none: 'none',
84
+ sm: '0 1px 2px 0 rgba(0, 0, 0, 0.05)',
85
+ base: '0 2px 4px 0 rgba(0, 0, 0, 0.06)',
86
+ md: '0 4px 8px 0 rgba(0, 0, 0, 0.08)',
87
+ lg: '0 8px 16px 0 rgba(0, 0, 0, 0.10)',
88
+ xl: '0 12px 24px 0 rgba(0, 0, 0, 0.12)',
89
+ // Alias tokens - semantic shadows
90
+ card: '0 2px 4px 0 rgba(0, 0, 0, 0.06)', // base - gentle
91
+ modal: '0 8px 16px 0 rgba(0, 0, 0, 0.10)', // lg - prominent
92
+ popover: '0 4px 8px 0 rgba(0, 0, 0, 0.08)', // md - medium
93
+ tooltip: '0 1px 2px 0 rgba(0, 0, 0, 0.05)', // sm - subtle
94
+ },
95
+ zIndex: {
96
+ dropdown: 1000,
97
+ modal: 1050,
98
+ popover: 1060,
99
+ tooltip: 1070,
100
+ notification: 1080,
101
+ },
102
+ transition: {
103
+ fast: '150ms cubic-bezier(0.4, 0, 0.2, 1)',
104
+ base: '200ms cubic-bezier(0.4, 0, 0.2, 1)',
105
+ slow: '300ms cubic-bezier(0.4, 0, 0.2, 1)',
106
+ },
107
+ };
108
+ /**
109
+ * Dark mode adjustments
110
+ * Shadows are more subtle/absent in dark mode
111
+ */
112
+ export const buildDarkModeConstants = () => ({
113
+ shadow: {
114
+ none: 'none',
115
+ sm: '0 1px 2px 0 rgba(0, 0, 0, 0.2)',
116
+ base: '0 2px 4px 0 rgba(0, 0, 0, 0.25)',
117
+ md: '0 4px 8px 0 rgba(0, 0, 0, 0.3)',
118
+ lg: '0 8px 16px 0 rgba(0, 0, 0, 0.35)',
119
+ xl: '0 12px 24px 0 rgba(0, 0, 0, 0.4)',
120
+ // Alias tokens - adjusted for dark mode
121
+ card: 'none', // No shadow on cards in dark mode
122
+ modal: '0 8px 16px 0 rgba(0, 0, 0, 0.35)', // Stronger in dark
123
+ popover: '0 4px 8px 0 rgba(0, 0, 0, 0.3)', // Stronger in dark
124
+ tooltip: '0 1px 2px 0 rgba(0, 0, 0, 0.2)', // Stronger in dark
125
+ },
126
+ });