@temboplus/frontend-react-core 0.1.3-beta.2 → 0.1.3-beta.3

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.
@@ -1,138 +1,212 @@
1
1
  import { merge } from "lodash";
2
2
  /**
3
- * Default Tembo color palette
4
- * Light theme with professional, accessible colors
3
+ * Base color values for light theme
4
+ * These are the actual color values that get mapped to the palette
5
5
  */
6
- export const defaultColorPalette = {
7
- primary: {
8
- main: '#000000',
9
- hover: '#1a1a1a',
10
- active: '#000000',
11
- light: '#666666',
12
- lighter: '#999999',
13
- contrast: '#FFFFFF',
14
- },
15
- action: {
16
- main: '#1a6985',
17
- hover: '#145268',
18
- active: '#0f3d4f',
19
- light: '#e8f2f5',
20
- lighter: '#f4f9fa',
21
- disabled: '#a3c9d6',
22
- contrast: '#FFFFFF',
23
- },
6
+ const lightModeColors = {
24
7
  neutral: {
25
- 50: '#ffffff',
26
- 100: '#fafafa',
27
- 200: '#f5f5f5',
28
- 300: '#f0f0f0',
29
- 400: '#e5e5e5',
30
- 500: '#d4d4d4',
31
- 600: '#b3b3b3',
32
- 700: '#999999',
33
- 800: '#666666',
34
- 900: '#1a1a1a',
35
- 950: '#000000',
36
- },
37
- success: {
38
- main: '#10b981',
39
- bg: '#ecfdf5',
40
- border: '#a7f3d0',
41
- text: '#047857',
42
- },
43
- error: {
44
- main: '#ef4444',
45
- bg: '#fef2f2',
46
- border: '#fecaca',
47
- text: '#dc2626',
48
- },
49
- warning: {
50
- main: '#f59e0b',
51
- bg: '#fffbeb',
52
- border: '#fde68a',
53
- text: '#d97706',
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',
54
19
  },
55
- info: {
56
- main: '#1a6985',
57
- bg: '#e8f2f5',
58
- border: '#b8d9e6',
59
- text: '#0f3d4f',
60
- },
61
- surface: {
62
- background: '#ffffff',
63
- main: '#ffffff',
64
- elevated: '#ffffff',
65
- hover: '#fafafa',
66
- subtle: '#f9fafb',
67
- },
68
- text: {
69
- primary: '#000000',
70
- secondary: '#666666',
71
- tertiary: '#999999',
72
- quaternary: '#b3b3b3',
73
- disabled: '#d4d4d4',
74
- inverse: '#ffffff',
75
- },
76
- border: {
77
- main: '#e5e5e5',
78
- light: '#f0f0f0',
79
- strong: '#d4d4d4',
80
- divider: '#e5e5e5',
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',
81
38
  },
82
- components: {
83
- button: {
84
- primary: {
85
- bg: '#1a6985',
86
- hover: '#145268',
87
- text: '#FFFFFF',
88
- },
89
- default: {
90
- bg: '#FFFFFF',
91
- border: '#d4d4d4',
92
- text: '#000000',
93
- hover: '#fafafa',
94
- },
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',
95
56
  },
96
- input: {
97
- bg: '#ffffff',
98
- border: '#d4d4d4',
99
- borderHover: '#999999',
100
- borderFocus: '#1a6985',
101
- placeholder: '#999999',
57
+ action: {
58
+ main: '#1a6985',
59
+ hover: '#145268',
60
+ active: '#0f3d4f',
61
+ light: '#e8f2f5',
62
+ lighter: '#f4f9fa',
63
+ disabled: '#a3c9d6',
64
+ contrast: '#FFFFFF',
102
65
  },
103
- table: {
104
- bg: '#ffffff',
105
- headerBg: '#fafafa',
106
- headerText: '#000000',
107
- border: '#e5e5e5',
108
- rowHover: '#fafafa',
66
+ absolute: {
67
+ white: '#ffffff',
68
+ black: '#000000',
109
69
  },
110
- sidebar: {
111
- bg: '#000000',
112
- hover: 'rgba(255, 255, 255, 0.08)',
113
- selected: 'rgba(255, 255, 255, 0.12)',
114
- text: '#FFFFFF',
115
- textSecondary: 'rgba(255, 255, 255, 0.65)',
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],
116
93
  },
117
- },
118
- utility: {
119
- white: '#ffffff',
120
- black: '#000000',
121
- transparent: 'transparent',
122
- link: '#1a6985',
123
- linkHover: '#145268',
124
- linkActive: '#0f3d4f',
125
- },
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
+ };
126
182
  };
183
+ /**
184
+ * Default color palette for light theme
185
+ */
186
+ export const defaultColorPalette = buildDefaultPalette('light');
127
187
  /**
128
188
  * Build a complete color palette by merging overrides with defaults
129
189
  * Performs deep merge to allow partial nested overrides
130
190
  *
131
191
  * @param overrides - Partial color palette overrides
192
+ * @param mode - Theme mode ('light' or 'dark')
132
193
  * @returns Complete color palette with overrides applied
133
194
  */
134
- export const buildColorPalette = (overrides) => {
195
+ export const buildColorPalette = (overrides, mode = 'light') => {
196
+ const basePalette = buildDefaultPalette(mode);
135
197
  if (!overrides)
136
- return defaultColorPalette;
137
- return merge(defaultColorPalette, 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;
138
212
  };
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../theme-provider-Dqvy24OD.js");require("react"),require("antd"),require("lodash"),exports.TemboThemeProvider=e.TemboThemeProvider,exports.buildColorPalette=e.buildColorPalette,exports.buildUIConstants=e.buildUIConstants,exports.defaultColorPalette=e.defaultColorPalette,exports.defaultUIConstants=e.defaultUIConstants,exports.useTemboTheme=e.useTemboTheme;
1
+ "use strict";var e=require("../theme-provider-RhAw3jw_.js");require("react"),require("antd"),require("lodash"),exports.TemboThemeProvider=e.TemboThemeProvider,exports.buildColorPalette=e.buildColorPalette,exports.buildUIConstants=e.buildUIConstants,exports.defaultColorPalette=e.defaultColorPalette,exports.defaultUIConstants=e.defaultUIConstants,exports.useTemboTheme=e.useTemboTheme;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1,2 +1,2 @@
1
- export{T as TemboThemeProvider,b as buildColorPalette,c as buildUIConstants,d as defaultColorPalette,a as defaultUIConstants,u as useTemboTheme}from"../theme-provider-D_oV1J_K.js";import"react";import"antd";import"lodash";
1
+ export{T as TemboThemeProvider,b as buildColorPalette,c as buildUIConstants,d as defaultColorPalette,a as defaultUIConstants,u as useTemboTheme}from"../theme-provider-Ca4P0Hcp.js";import"react";import"antd";import"lodash";
2
2
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { ThemeConfig } from 'antd';
3
- import { TemboColorPalette, TemboColorOverrides } from './colors.js';
3
+ import { TemboColorPalette, TemboColorOverrides, ThemeMode } from './colors.js';
4
4
  import { TemboUIConstants, TemboUIConstantsOverrides } from './constants.js';
5
5
  /**
6
6
  * Shape of the theme context exposed via useTemboTheme()
@@ -8,6 +8,7 @@ import { TemboUIConstants, TemboUIConstantsOverrides } from './constants.js';
8
8
  export interface TemboThemeContextValue {
9
9
  colors: TemboColorPalette;
10
10
  constants: TemboUIConstants;
11
+ mode: ThemeMode;
11
12
  }
12
13
  /**
13
14
  * Props for TemboThemeProvider
@@ -19,6 +20,12 @@ export interface TemboThemeContextValue {
19
20
  * </TemboThemeProvider>
20
21
  *
21
22
  * @example
23
+ * // With dark mode
24
+ * <TemboThemeProvider mode="dark">
25
+ * <App />
26
+ * </TemboThemeProvider>
27
+ *
28
+ * @example
22
29
  * // With color overrides
23
30
  * <TemboThemeProvider
24
31
  * colors={{
@@ -32,6 +39,7 @@ export interface TemboThemeContextValue {
32
39
  * @example
33
40
  * // With all customizations
34
41
  * <TemboThemeProvider
42
+ * mode="dark"
35
43
  * colors={{ primary: { main: '#007bff' } }}
36
44
  * constants={{ radius: { base: 8 } }}
37
45
  * themeOverrides={{
@@ -45,6 +53,8 @@ export interface TemboThemeContextValue {
45
53
  */
46
54
  export interface TemboThemeProviderProps {
47
55
  children: React.ReactNode;
56
+ /** Theme mode - 'light' or 'dark' */
57
+ mode?: ThemeMode;
48
58
  /** Color palette overrides - supports deep partial overrides */
49
59
  colors?: TemboColorOverrides;
50
60
  /** UI constants overrides - supports deep partial overrides */
@@ -57,6 +67,7 @@ export interface TemboThemeProviderProps {
57
67
  *
58
68
  * Wraps your application to provide theming through React context and Ant Design's ConfigProvider.
59
69
  * Merges default colors/constants with host overrides and configures Ant Design components.
70
+ * Supports light and dark mode through the mode prop.
60
71
  *
61
72
  * All child components can access theme values via the useTemboTheme() hook.
62
73
  */
@@ -64,22 +75,23 @@ export declare const TemboThemeProvider: React.FC<TemboThemeProviderProps>;
64
75
  /**
65
76
  * Hook to access the active Tembo theme
66
77
  *
67
- * Returns the merged color palette and UI constants with any host overrides applied.
78
+ * Returns the merged color palette, UI constants, and current theme mode.
68
79
  * Components should always use this hook instead of importing defaults directly.
69
80
  *
70
- * @returns Theme context containing colors and constants
81
+ * @returns Theme context containing colors, constants, and mode
71
82
  *
72
83
  * @example
73
84
  * function MyComponent() {
74
- * const { colors, constants } = useTemboTheme();
85
+ * const { colors, constants, mode } = useTemboTheme();
75
86
  *
76
87
  * return (
77
88
  * <div style={{
78
89
  * color: colors.text.primary,
79
90
  * padding: constants.spacing.md,
80
- * borderRadius: constants.radius.base
91
+ * borderRadius: constants.radius.base,
92
+ * backgroundColor: colors.neutral.lightest
81
93
  * }}>
82
- * Themed content
94
+ * Current theme: {mode}
83
95
  * </div>
84
96
  * );
85
97
  * }
@@ -9,6 +9,7 @@ import { buildUIConstants, } from './constants.js';
9
9
  const TemboThemeContext = React.createContext({
10
10
  colors: buildColorPalette(),
11
11
  constants: buildUIConstants(),
12
+ mode: 'light',
12
13
  });
13
14
  /**
14
15
  * Build Ant Design theme configuration from Tembo tokens
@@ -16,10 +17,11 @@ const TemboThemeContext = React.createContext({
16
17
  *
17
18
  * @param palette - Complete Tembo color palette
18
19
  * @param constants - Complete Tembo UI constants
20
+ * @param mode - Theme mode
19
21
  * @param overrides - Optional raw Ant Design theme overrides
20
22
  * @returns Ant Design ThemeConfig
21
23
  */
22
- const buildAntDThemeConfig = (palette, constants, overrides) => {
24
+ const buildAntDThemeConfig = (palette, constants, mode, overrides) => {
23
25
  var _a, _b;
24
26
  const baseTokens = {
25
27
  // Primary colors
@@ -94,6 +96,7 @@ const buildAntDThemeConfig = (palette, constants, overrides) => {
94
96
  };
95
97
  const baseTheme = {
96
98
  token: baseTokens,
99
+ // algorithm: mode === 'dark' ? 'dark' : undefined,
97
100
  components: {
98
101
  Button: {
99
102
  colorPrimary: palette.components.button.primary.bg,
@@ -138,7 +141,7 @@ const buildAntDThemeConfig = (palette, constants, overrides) => {
138
141
  optionSelectedBg: palette.action.main,
139
142
  optionSelectedColor: palette.action.contrast,
140
143
  optionActiveBg: palette.surface.hover,
141
- colorBgElevated: palette.utility.white,
144
+ colorBgElevated: palette.neutral.brightest,
142
145
  controlItemBgHover: palette.surface.hover,
143
146
  boxShadowSecondary: constants.shadow.elevated,
144
147
  borderRadius: constants.radius.input,
@@ -248,11 +251,11 @@ const buildAntDThemeConfig = (palette, constants, overrides) => {
248
251
  borderRadiusLG: constants.radius.lg,
249
252
  },
250
253
  Notification: {
251
- colorBgElevated: palette.utility.white,
254
+ colorBgElevated: palette.neutral.brightest,
252
255
  borderRadiusLG: constants.radius.base,
253
256
  },
254
257
  Message: {
255
- contentBg: palette.utility.white,
258
+ contentBg: palette.neutral.brightest,
256
259
  borderRadiusLG: constants.radius.base,
257
260
  },
258
261
  Spin: {
@@ -265,8 +268,8 @@ const buildAntDThemeConfig = (palette, constants, overrides) => {
265
268
  borderRadius: 100,
266
269
  },
267
270
  Skeleton: {
268
- colorFill: palette.neutral[200],
269
- colorFillContent: palette.neutral[100],
271
+ colorFill: palette.neutral[2],
272
+ colorFillContent: palette.neutral[1],
270
273
  borderRadiusSM: constants.radius.sm,
271
274
  },
272
275
  Menu: {
@@ -317,10 +320,10 @@ const buildAntDThemeConfig = (palette, constants, overrides) => {
317
320
  },
318
321
  Layout: {
319
322
  colorBgBody: palette.surface.background,
320
- colorBgHeader: palette.utility.white,
323
+ colorBgHeader: palette.neutral.brightest,
321
324
  colorBgTrigger: palette.components.sidebar.bg,
322
325
  siderBg: palette.components.sidebar.bg,
323
- headerBg: palette.utility.white,
326
+ headerBg: palette.neutral.brightest,
324
327
  borderRadiusLG: 0,
325
328
  },
326
329
  Divider: {
@@ -332,19 +335,19 @@ const buildAntDThemeConfig = (palette, constants, overrides) => {
332
335
  colorTextDescription: palette.text.tertiary,
333
336
  },
334
337
  Tooltip: {
335
- colorBgSpotlight: palette.neutral[900],
336
- colorTextLightSolid: palette.utility.white,
338
+ colorBgSpotlight: palette.neutral.darkest,
339
+ colorTextLightSolid: palette.neutral.brightest,
337
340
  borderRadius: constants.radius.sm,
338
341
  },
339
342
  Popover: {
340
- colorBgElevated: palette.utility.white,
343
+ colorBgElevated: palette.neutral.brightest,
341
344
  borderRadiusLG: constants.radius.base,
342
345
  },
343
346
  Dropdown: {
344
347
  boxShadowSecondary: constants.shadow.dropdown,
345
348
  },
346
349
  Calendar: {
347
- colorBgContainer: palette.utility.white,
350
+ colorBgContainer: palette.neutral.brightest,
348
351
  colorPrimary: palette.action.main,
349
352
  borderRadiusLG: constants.radius.base,
350
353
  },
@@ -359,38 +362,41 @@ const buildAntDThemeConfig = (palette, constants, overrides) => {
359
362
  *
360
363
  * Wraps your application to provide theming through React context and Ant Design's ConfigProvider.
361
364
  * Merges default colors/constants with host overrides and configures Ant Design components.
365
+ * Supports light and dark mode through the mode prop.
362
366
  *
363
367
  * All child components can access theme values via the useTemboTheme() hook.
364
368
  */
365
- export const TemboThemeProvider = ({ children, colors, constants, themeOverrides, }) => {
366
- const palette = React.useMemo(() => buildColorPalette(colors), [colors]);
369
+ export const TemboThemeProvider = ({ children, mode = 'light', colors, constants, themeOverrides, }) => {
370
+ const palette = React.useMemo(() => buildColorPalette(colors, mode), [colors, mode]);
367
371
  const uiConstants = React.useMemo(() => buildUIConstants(constants), [constants]);
368
- const theme = React.useMemo(() => buildAntDThemeConfig(palette, uiConstants, themeOverrides), [palette, uiConstants, themeOverrides]);
372
+ const theme = React.useMemo(() => buildAntDThemeConfig(palette, uiConstants, mode, themeOverrides), [palette, uiConstants, mode, themeOverrides]);
369
373
  const contextValue = React.useMemo(() => ({
370
374
  colors: palette,
371
375
  constants: uiConstants,
372
- }), [palette, uiConstants]);
376
+ mode,
377
+ }), [palette, uiConstants, mode]);
373
378
  return (_jsx(TemboThemeContext.Provider, { value: contextValue, children: _jsx(ConfigProvider, { theme: theme, children: children }) }));
374
379
  };
375
380
  /**
376
381
  * Hook to access the active Tembo theme
377
382
  *
378
- * Returns the merged color palette and UI constants with any host overrides applied.
383
+ * Returns the merged color palette, UI constants, and current theme mode.
379
384
  * Components should always use this hook instead of importing defaults directly.
380
385
  *
381
- * @returns Theme context containing colors and constants
386
+ * @returns Theme context containing colors, constants, and mode
382
387
  *
383
388
  * @example
384
389
  * function MyComponent() {
385
- * const { colors, constants } = useTemboTheme();
390
+ * const { colors, constants, mode } = useTemboTheme();
386
391
  *
387
392
  * return (
388
393
  * <div style={{
389
394
  * color: colors.text.primary,
390
395
  * padding: constants.spacing.md,
391
- * borderRadius: constants.radius.base
396
+ * borderRadius: constants.radius.base,
397
+ * backgroundColor: colors.neutral.lightest
392
398
  * }}>
393
- * Themed content
399
+ * Current theme: {mode}
394
400
  * </div>
395
401
  * );
396
402
  * }
@@ -0,0 +1,11 @@
1
+ import r from"react";import{ConfigProvider as e}from"antd";import{merge as o}from"lodash";var t,a={exports:{}},n={};var i,l,c={};
2
+ /**
3
+ * @license React
4
+ * react-jsx-runtime.development.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */function s(){return i||(i=1,"production"!==process.env.NODE_ENV&&function(){function e(r){if(null==r)return null;if("function"==typeof r)return r.$$typeof===R?null:r.displayName||r.name||null;if("string"==typeof r)return r;switch(r){case p:return"Fragment";case f:return"Profiler";case g:return"StrictMode";case v:return"Suspense";case S:return"SuspenseList";case w:return"Activity"}if("object"==typeof r)switch("number"==typeof r.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case m:return"Portal";case h:return(r.displayName||"Context")+".Provider";case y:return(r._context.displayName||"Context")+".Consumer";case x:var o=r.render;return(r=r.displayName)||(r=""!==(r=o.displayName||o.name||"")?"ForwardRef("+r+")":"ForwardRef"),r;case B:return null!==(o=r.displayName||null)?o:e(r.type)||"Memo";case k:o=r._payload,r=r._init;try{return e(r(o))}catch(r){}}return null}function o(r){return""+r}function t(r){try{o(r);var e=!1}catch(r){e=!0}if(e){var t=(e=console).error,a="function"==typeof Symbol&&Symbol.toStringTag&&r[Symbol.toStringTag]||r.constructor.name||"Object";return t.call(e,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",a),o(r)}}function a(r){if(r===p)return"<>";if("object"==typeof r&&null!==r&&r.$$typeof===k)return"<...>";try{var o=e(r);return o?"<"+o+">":"<...>"}catch(r){return"<...>"}}function n(){return Error("react-stack-top-frame")}function i(){var r=e(this.type);return F[r]||(F[r]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(r=this.props.ref)?r:null}function l(r,o,a,n,l,c,u,m){var p,g=o.children;if(void 0!==g)if(n)if(H(g)){for(n=0;n<g.length;n++)s(g[n]);Object.freeze&&Object.freeze(g)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else s(g);if(T.call(o,"key")){g=e(r);var f=Object.keys(o).filter(function(r){return"key"!==r});n=0<f.length?"{key: someKey, "+f.join(": ..., ")+": ...}":"{key: someKey}",E[g+n]||(f=0<f.length?"{"+f.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',n,g,f,g),E[g+n]=!0)}if(g=null,void 0!==a&&(t(a),g=""+a),function(r){if(T.call(r,"key")){var e=Object.getOwnPropertyDescriptor(r,"key").get;if(e&&e.isReactWarning)return!1}return void 0!==r.key}(o)&&(t(o.key),g=""+o.key),"key"in o)for(var y in a={},o)"key"!==y&&(a[y]=o[y]);else a=o;return g&&function(r,e){function o(){d||(d=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",e))}o.isReactWarning=!0,Object.defineProperty(r,"key",{get:o,configurable:!0})}(a,"function"==typeof r?r.displayName||r.name||"Unknown":r),function(r,e,o,t,a,n,l,c){return o=n.ref,r={$$typeof:b,type:r,key:e,props:n,_owner:a},null!==(void 0!==o?o:null)?Object.defineProperty(r,"ref",{enumerable:!1,get:i}):Object.defineProperty(r,"ref",{enumerable:!1,value:null}),r._store={},Object.defineProperty(r._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(r,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(r,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:l}),Object.defineProperty(r,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:c}),Object.freeze&&(Object.freeze(r.props),Object.freeze(r)),r}(r,g,c,0,null===(p=C.A)?null:p.getOwner(),a,u,m)}function s(r){"object"==typeof r&&null!==r&&r.$$typeof===b&&r._store&&(r._store.validated=1)}var d,u=r,b=Symbol.for("react.transitional.element"),m=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),h=Symbol.for("react.context"),x=Symbol.for("react.forward_ref"),v=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),R=Symbol.for("react.client.reference"),C=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,H=Array.isArray,P=console.createTask?console.createTask:function(){return null},F={},j=(u={"react-stack-bottom-frame":function(r){return r()}})["react-stack-bottom-frame"].bind(u,n)(),O=P(a(n)),E={};c.Fragment=p,c.jsx=function(r,e,o,t,n){var i=1e4>C.recentlyCreatedOwnerStacks++;return l(r,e,o,!1,0,n,i?Error("react-stack-top-frame"):j,i?P(a(r)):O)},c.jsxs=function(r,e,o,t,n){var i=1e4>C.recentlyCreatedOwnerStacks++;return l(r,e,o,!0,0,n,i?Error("react-stack-top-frame"):j,i?P(a(r)):O)}}()),c}var d=(l||(l=1,"production"===process.env.NODE_ENV?a.exports=function(){if(t)return n;t=1;var r=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function o(e,o,t){var a=null;if(void 0!==t&&(a=""+t),void 0!==o.key&&(a=""+o.key),"key"in o)for(var n in t={},o)"key"!==n&&(t[n]=o[n]);else t=o;return o=t.ref,{$$typeof:r,type:e,key:a,ref:void 0!==o?o:null,props:t}}return n.Fragment=e,n.jsx=o,n.jsxs=o,n}():a.exports=s()),a.exports);const u={neutral:{0:"#ffffff",1:"#fafafa",2:"#f5f5f5",3:"#f0f0f0",4:"#e5e5e5",5:"#d4d4d4",6:"#b3b3b3",7:"#999999",8:"#666666",9:"#1a1a1a",10:"#000000"}},b={neutral:{0:"#000000",1:"#1a1a1a",2:"#666666",3:"#999999",4:"#b3b3b3",5:"#d4d4d4",6:"#e5e5e5",7:"#f0f0f0",8:"#f5f5f5",9:"#fafafa",10:"#ffffff"}},m=r=>{const e="light"===r?u:b;return{primary:{main:"#000000",hover:"#1a1a1a",active:"#000000",light:"#666666",lighter:"#999999",contrast:"#FFFFFF"},action:{main:"#1a6985",hover:"#145268",active:"#0f3d4f",light:"#e8f2f5",lighter:"#f4f9fa",disabled:"#a3c9d6",contrast:"#FFFFFF"},absolute:{white:"#ffffff",black:"#000000"},neutral:{0:e.neutral[0],1:e.neutral[1],2:e.neutral[2],3:e.neutral[3],4:e.neutral[4],5:e.neutral[5],6:e.neutral[6],7:e.neutral[7],8:e.neutral[8],9:e.neutral[9],10:e.neutral[10],brightest:e.neutral[0],lightest:e.neutral[1],lighter:e.neutral[2],light:e.neutral[3],medium:e.neutral[5],dark:e.neutral[7],darker:e.neutral[8],darkest:e.neutral[9],dimmest:e.neutral[10]},success:{main:"#10b981",bg:"#ecfdf5",border:"#a7f3d0",text:"#047857"},error:{main:"#ef4444",bg:"#fef2f2",border:"#fecaca",text:"#dc2626"},warning:{main:"#f59e0b",bg:"#fffbeb",border:"#fde68a",text:"#d97706"},info:{main:"#1a6985",bg:"#e8f2f5",border:"#b8d9e6",text:"#0f3d4f"},surface:{background:e.neutral[0],main:e.neutral[0],elevated:e.neutral[0],hover:e.neutral[1],subtle:e.neutral[1]},text:{primary:e.neutral[10],secondary:e.neutral[8],tertiary:e.neutral[7],quaternary:e.neutral[6],disabled:e.neutral[5],inverse:e.neutral[0]},border:{main:e.neutral[4],light:e.neutral[3],strong:e.neutral[5],divider:e.neutral[4]},components:{button:{primary:{bg:"#1a6985",hover:"#145268",text:"#FFFFFF"},default:{bg:e.neutral[0],border:e.neutral[5],text:e.neutral[10],hover:e.neutral[1]}},input:{bg:e.neutral[0],border:e.neutral[5],borderHover:e.neutral[7],borderFocus:"#1a6985",placeholder:e.neutral[7]},table:{bg:e.neutral[0],headerBg:e.neutral[1],headerText:e.neutral[10],border:e.neutral[4],rowHover:e.neutral[1]},sidebar:{bg:"#000000",hover:"rgba(255, 255, 255, 0.08)",selected:"rgba(255, 255, 255, 0.12)",text:"#FFFFFF",textSecondary:"rgba(255, 255, 255, 0.65)"}},utility:{transparent:"transparent",link:"#1a6985",linkHover:"#145268",linkActive:"#0f3d4f"}}},p=m("light"),g=(r,e="light")=>{const t=m(e);if(!r)return t;const a=o({},t,r);return a.neutral.brightest=a.neutral[0],a.neutral.lightest=a.neutral[1],a.neutral.lighter=a.neutral[2],a.neutral.light=a.neutral[3],a.neutral.medium=a.neutral[5],a.neutral.dark=a.neutral[7],a.neutral.darker=a.neutral[8],a.neutral.darkest=a.neutral[9],a.neutral.dimmest=a.neutral[10],a},f={typography:{fontFamily:"Avenir, MarkPro, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif",fontSize:{xs:12,sm:13,base:14,lg:16,xl:18},fontWeight:{normal:400,medium:500,semibold:600,bold:700},lineHeight:{tight:1.25,base:1.5715,relaxed:1.75}},spacing:{xs:4,sm:8,md:12,lg:16,xl:24,"2xl":32,"3xl":48},radius:{none:0,sm:8,base:12,md:14,lg:16,xl:20,full:9999,button:24,input:10,card:16},shadow:{sm:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",base:"0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08)",md:"0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08)",lg:"0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08)",xl:"0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.08)",card:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",elevated:"0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08)",dropdown:"0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08)"},zIndex:{dropdown:1e3,modal:1050,popover:1060,tooltip:1070,notification:1080},transition:{fast:"150ms cubic-bezier(0.4, 0, 0.2, 1)",base:"200ms cubic-bezier(0.4, 0, 0.2, 1)",slow:"300ms cubic-bezier(0.4, 0, 0.2, 1)"}},y=r=>r?o(f,r):f,h=r.createContext({colors:g(),constants:y(),mode:"light"}),x=({children:o,mode:t="light",colors:a,constants:n,themeOverrides:i})=>{const l=r.useMemo(()=>g(a,t),[a,t]),c=r.useMemo(()=>y(n),[n]),s=r.useMemo(()=>((r,e,o,t)=>{var a,n;const i={token:{colorPrimary:r.primary.main,colorPrimaryHover:r.primary.hover,colorPrimaryActive:r.primary.active,colorPrimaryBorder:r.primary.main,colorText:r.text.primary,colorTextSecondary:r.text.secondary,colorTextTertiary:r.text.tertiary,colorTextQuaternary:r.text.quaternary,colorTextDisabled:r.text.disabled,colorBgBase:r.surface.background,colorBgContainer:r.surface.main,colorBgElevated:r.surface.elevated,colorBgLayout:r.surface.background,colorBgSpotlight:r.surface.hover,colorBorder:r.border.main,colorBorderSecondary:r.border.light,colorSplit:r.border.divider,colorSuccess:r.success.main,colorSuccessBg:r.success.bg,colorSuccessBorder:r.success.border,colorSuccessText:r.success.text,colorError:r.error.main,colorErrorBg:r.error.bg,colorErrorBorder:r.error.border,colorErrorText:r.error.text,colorWarning:r.warning.main,colorWarningBg:r.warning.bg,colorWarningBorder:r.warning.border,colorWarningText:r.warning.text,colorInfo:r.info.main,colorInfoBg:r.info.bg,colorInfoBorder:r.info.border,colorInfoText:r.info.text,colorLink:r.utility.link,colorLinkHover:r.utility.linkHover,colorLinkActive:r.utility.linkActive,borderRadius:e.radius.base,borderRadiusLG:e.radius.lg,borderRadiusSM:e.radius.sm,borderRadiusXS:6,boxShadow:e.shadow.base,boxShadowSecondary:e.shadow.card,boxShadowTertiary:e.shadow.elevated,fontFamily:e.typography.fontFamily,fontSize:e.typography.fontSize.base,fontSizeHeading1:38,fontSizeHeading2:30,fontSizeHeading3:24,fontSizeHeading4:20,fontSizeHeading5:e.typography.fontSize.lg,fontWeightStrong:e.typography.fontWeight.medium,lineHeight:e.typography.lineHeight.base,lineHeightHeading1:1.21,lineHeightHeading2:1.27,lineHeightHeading3:1.33,lineHeightHeading4:1.4,lineHeightHeading5:1.5},components:{Button:{colorPrimary:r.components.button.primary.bg,colorPrimaryHover:r.components.button.primary.hover,colorPrimaryActive:r.action.active,colorPrimaryBorder:r.components.button.primary.bg,primaryColor:r.components.button.primary.text,colorBorder:r.components.button.default.border,colorBgContainer:r.components.button.default.bg,colorText:r.components.button.default.text,defaultBg:r.components.button.default.bg,defaultBorderColor:r.components.button.default.border,defaultColor:r.components.button.default.text,primaryShadow:"none",defaultShadow:"none",dangerShadow:"none",fontWeight:e.typography.fontWeight.medium,controlHeight:32,paddingContentHorizontal:e.spacing.lg,borderRadius:e.radius.button,borderRadiusLG:e.radius.button,borderRadiusSM:e.radius.sm+8},Input:{colorBgContainer:r.components.input.bg,colorBorder:r.components.input.border,hoverBorderColor:r.components.input.borderHover,activeBorderColor:r.components.input.borderFocus,colorPrimaryHover:r.components.input.borderFocus,colorTextPlaceholder:r.components.input.placeholder,borderRadius:e.radius.input,borderRadiusLG:e.radius.base,borderRadiusSM:e.radius.sm},Select:{colorBgContainer:r.components.input.bg,colorBorder:r.components.input.border,colorTextPlaceholder:r.components.input.placeholder,colorPrimaryHover:r.action.main,hoverBorderColor:r.components.input.borderHover,activeBorderColor:r.components.input.borderFocus,optionSelectedBg:r.action.main,optionSelectedColor:r.action.contrast,optionActiveBg:r.surface.hover,colorBgElevated:r.neutral.brightest,controlItemBgHover:r.surface.hover,boxShadowSecondary:e.shadow.elevated,borderRadius:e.radius.input,borderRadiusLG:e.radius.base,borderRadiusSM:e.radius.sm},Checkbox:{colorPrimary:r.action.main,colorPrimaryHover:r.action.hover,colorBorder:r.border.strong,borderRadiusSM:6},Radio:{colorPrimary:r.action.main,colorPrimaryHover:r.action.hover,colorBorder:r.border.strong},Switch:{colorPrimary:r.action.main,colorPrimaryHover:r.action.hover,colorTextQuaternary:r.text.quaternary},Form:{labelColor:r.text.primary,labelRequiredMarkColor:r.error.main,labelFontSize:e.typography.fontSize.base,itemMarginBottom:e.spacing.lg},DatePicker:{colorBgContainer:r.components.input.bg,colorBorder:r.components.input.border,hoverBorderColor:r.components.input.borderHover,activeBorderColor:r.components.input.borderFocus,colorPrimary:r.action.main,borderRadius:e.radius.input},InputNumber:{borderRadius:e.radius.input},Table:{colorBgContainer:r.components.table.bg,headerBg:r.components.table.headerBg,headerColor:r.components.table.headerText,borderColor:r.components.table.border,headerSplitColor:r.components.table.border,rowHoverBg:r.components.table.rowHover,rowSelectedBg:r.action.light,rowSelectedHoverBg:r.action.lighter,colorText:r.text.primary,colorTextHeading:r.text.primary,borderRadius:e.radius.base,borderRadiusLG:e.radius.lg},Card:{colorBgContainer:r.surface.main,colorBorder:r.border.main,colorBorderSecondary:r.border.light,boxShadowTertiary:e.shadow.card,borderRadius:e.radius.card,borderRadiusLG:e.radius.lg+4},Statistic:{contentFontSize:24,colorTextHeading:r.text.primary},Descriptions:{labelBg:r.surface.hover,colorTextSecondary:r.text.secondary,itemPaddingBottom:e.spacing.md},Badge:{colorError:r.error.main,colorSuccess:r.success.main,colorInfo:r.info.main,colorInfoBg:r.info.bg,borderRadiusSM:e.radius.input},Tag:{colorBorder:r.border.main,defaultBg:r.surface.hover,borderRadiusSM:e.radius.sm},Timeline:{dotBg:r.surface.main,tailColor:r.border.main},Alert:{colorSuccessBg:r.success.bg,colorSuccessBorder:r.success.border,colorErrorBg:r.error.bg,colorErrorBorder:r.error.border,colorWarningBg:r.warning.bg,colorWarningBorder:r.warning.border,colorInfoBg:r.info.bg,colorInfoBorder:r.info.border,borderRadiusLG:e.radius.base},Modal:{contentBg:r.surface.elevated,headerBg:r.surface.elevated,colorBgMask:"rgba(0, 0, 0, 0.45)",borderRadiusLG:e.radius.lg},Drawer:{colorBgElevated:r.surface.elevated,colorBgMask:"rgba(0, 0, 0, 0.45)",borderRadiusLG:e.radius.lg},Notification:{colorBgElevated:r.neutral.brightest,borderRadiusLG:e.radius.base},Message:{contentBg:r.neutral.brightest,borderRadiusLG:e.radius.base},Spin:{colorPrimary:r.primary.main},Progress:{colorSuccess:r.success.main,colorError:r.error.main,defaultColor:r.primary.main,borderRadius:100},Skeleton:{colorFill:r.neutral[2],colorFillContent:r.neutral[1],borderRadiusSM:e.radius.sm},Menu:{itemBg:"transparent",itemColor:r.text.primary,itemHoverBg:r.surface.hover,itemSelectedBg:r.action.lighter,itemSelectedColor:r.action.main,itemActiveBg:r.action.lighter,subMenuItemBg:"transparent",darkItemBg:r.components.sidebar.bg,darkSubMenuItemBg:r.components.sidebar.bg,darkItemColor:r.components.sidebar.text,darkItemHoverBg:r.components.sidebar.hover,darkItemSelectedBg:r.components.sidebar.selected,darkItemSelectedColor:r.primary.contrast,borderRadius:e.radius.input,borderRadiusLG:e.radius.base},Breadcrumb:{linkColor:r.utility.link,linkHoverColor:r.utility.linkHover,itemColor:r.text.secondary,lastItemColor:r.text.primary,separatorColor:r.text.tertiary,borderRadiusSM:6},Pagination:{colorPrimary:r.primary.main,colorPrimaryHover:r.primary.hover,itemActiveBg:r.primary.main,borderRadius:e.radius.sm},Steps:{colorPrimary:r.action.main,colorText:r.text.secondary,colorTextDescription:r.text.tertiary,borderRadiusSM:100},Tabs:{colorPrimary:r.action.main,colorBorderSecondary:r.border.main,itemColor:r.text.secondary,itemHoverColor:r.action.hover,itemSelectedColor:r.action.main,inkBarColor:r.action.main,borderRadiusSM:e.radius.sm},Layout:{colorBgBody:r.surface.background,colorBgHeader:r.neutral.brightest,colorBgTrigger:r.components.sidebar.bg,siderBg:r.components.sidebar.bg,headerBg:r.neutral.brightest,borderRadiusLG:0},Divider:{colorSplit:r.border.divider},Typography:{colorText:r.text.primary,colorTextSecondary:r.text.secondary,colorTextDescription:r.text.tertiary},Tooltip:{colorBgSpotlight:r.neutral.darkest,colorTextLightSolid:r.neutral.brightest,borderRadius:e.radius.sm},Popover:{colorBgElevated:r.neutral.brightest,borderRadiusLG:e.radius.base},Dropdown:{boxShadowSecondary:e.shadow.dropdown},Calendar:{colorBgContainer:r.neutral.brightest,colorPrimary:r.action.main,borderRadiusLG:e.radius.base}}};return t?Object.assign(Object.assign({},i),{token:Object.assign(Object.assign({},i.token),null!==(a=t.token)&&void 0!==a?a:{}),components:Object.assign(Object.assign({},i.components),null!==(n=t.components)&&void 0!==n?n:{})}):i})(l,c,0,i),[l,c,t,i]),u=r.useMemo(()=>({colors:l,constants:c,mode:t}),[l,c,t]);return d.jsx(h.Provider,{value:u,children:d.jsx(e,{theme:s,children:o})})},v=()=>r.useContext(h);export{x as T,f as a,g as b,y as c,p as d,d as j,v as u};
11
+ //# sourceMappingURL=theme-provider-Ca4P0Hcp.js.map