@temboplus/frontend-react-core 0.1.3-beta.0 → 0.1.3-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/InfoCircleOutlined-B7d2aRfV.js +7 -0
- package/dist/InfoCircleOutlined-B7d2aRfV.js.map +1 -0
- package/dist/InfoCircleOutlined-DYs90hdV.js +7 -0
- package/dist/InfoCircleOutlined-DYs90hdV.js.map +1 -0
- package/dist/ZoomOutOutlined-BL6A5RSq.js +2 -0
- package/dist/ZoomOutOutlined-BL6A5RSq.js.map +1 -0
- package/dist/ZoomOutOutlined-BY_CCwq7.js +2 -0
- package/dist/ZoomOutOutlined-BY_CCwq7.js.map +1 -0
- package/dist/alerts/index.cjs.js +2 -0
- package/dist/alerts/index.cjs.js.map +1 -0
- package/dist/alerts/index.d.ts +1 -0
- package/dist/alerts/index.js +2 -0
- package/dist/alerts/index.js.map +1 -0
- package/dist/dialogs/index.cjs.js +2 -0
- package/dist/dialogs/index.cjs.js.map +1 -0
- package/dist/dialogs/index.d.ts +1 -0
- package/dist/dialogs/index.js +2 -0
- package/dist/dialogs/index.js.map +1 -0
- package/dist/features/alerts/alert.d.ts +12 -0
- package/dist/features/alerts/alert.js +95 -0
- package/dist/features/alerts/index.d.ts +1 -0
- package/dist/features/alerts/index.js +1 -0
- package/dist/features/dialogs/index.d.ts +1 -0
- package/dist/features/dialogs/index.js +1 -0
- package/dist/features/dialogs/modal-provider.d.ts +3 -0
- package/dist/features/dialogs/modal-provider.js +6 -0
- package/dist/features/dialogs/tembo-confirm.d.ts +63 -0
- package/dist/features/dialogs/tembo-confirm.js +111 -0
- package/dist/features/input-validation/account-name-validator.d.ts +13 -0
- package/dist/features/input-validation/account-name-validator.js +28 -0
- package/dist/features/input-validation/account-number-validator.d.ts +13 -0
- package/dist/features/input-validation/account-number-validator.js +65 -0
- package/dist/{antd-validators.d.ts → features/input-validation/amount-validator.d.ts} +1 -62
- package/dist/features/input-validation/amount-validator.js +100 -0
- package/dist/features/input-validation/index.d.ts +5 -0
- package/dist/features/input-validation/index.js +5 -0
- package/dist/features/input-validation/phone-number-validator.d.ts +25 -0
- package/dist/features/input-validation/phone-number-validator.js +79 -0
- package/dist/features/input-validation/swift-code-validator.d.ts +13 -0
- package/dist/features/input-validation/swift-code-validator.js +38 -0
- package/dist/features/notifications/index.d.ts +3 -0
- package/dist/features/notifications/index.js +3 -0
- package/dist/features/notifications/tembo-notify.d.ts +124 -0
- package/dist/features/notifications/tembo-notify.js +149 -0
- package/dist/features/notifications/toast-config.d.ts +15 -0
- package/dist/features/notifications/toast-config.js +53 -0
- package/dist/features/notifications/toast-container.d.ts +9 -0
- package/dist/features/notifications/toast-container.js +18 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -0
- package/dist/notifications/index.cjs.js +2 -0
- package/dist/notifications/index.cjs.js.map +1 -0
- package/dist/notifications/index.d.ts +1 -0
- package/dist/notifications/index.js +2 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/providers.d.ts +37 -0
- package/dist/providers.js +32 -0
- package/dist/tembo-notify-C-QGduBt.js +2 -0
- package/dist/tembo-notify-C-QGduBt.js.map +1 -0
- package/dist/tembo-notify-D-uOV3t0.js +2 -0
- package/dist/tembo-notify-D-uOV3t0.js.map +1 -0
- package/dist/theme/colors.d.ts +246 -0
- package/dist/theme/colors.js +138 -0
- package/dist/theme/constants.d.ts +143 -0
- package/dist/theme/constants.js +82 -0
- package/dist/theme/index.cjs.js +2 -0
- package/dist/theme/index.cjs.js.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/theme-provider.d.ts +87 -0
- package/dist/theme/theme-provider.js +398 -0
- package/dist/theme-provider-D_oV1J_K.js +11 -0
- package/dist/theme-provider-D_oV1J_K.js.map +1 -0
- package/dist/theme-provider-Dqvy24OD.js +11 -0
- package/dist/theme-provider-Dqvy24OD.js.map +1 -0
- package/dist/validation/index.cjs.js +2 -0
- package/dist/validation/index.cjs.js.map +1 -0
- package/dist/validation/index.d.ts +1 -0
- package/dist/validation/index.js +2 -0
- package/dist/validation/index.js.map +1 -0
- package/package.json +31 -7
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("
|
|
1
|
+
"use strict";var e=require("./theme-provider-Dqvy24OD.js"),r=require("@ebay/nice-modal-react"),t=require("react"),s=require("react-toastify");require("lodash");var i=require("./tembo-notify-D-uOV3t0.js");function o(e){return e&&e.__esModule?e:{default:e}}require("antd"),require("./InfoCircleOutlined-B7d2aRfV.js"),require("./ZoomOutOutlined-BY_CCwq7.js");var n=o(r);const u=r=>e.jsxRuntimeExports.jsx(n.default.Provider,{children:r.children}),c=r=>{const{colors:o,constants:n}=e.useTemboTheme();return t.useEffect(()=>{i.TemboNotify.init(o,n)},[o,n]),e.jsxRuntimeExports.jsx(s.ToastContainer,Object.assign({},r))};exports.TemboUIProviders=({children:r,colors:t,constants:s,themeOverrides:i})=>e.jsxRuntimeExports.jsx(e.TemboThemeProvider,{colors:t,constants:s,themeOverrides:i,children:e.jsxRuntimeExports.jsxs(u,{children:[r,e.jsxRuntimeExports.jsx(c,{})]})});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../src/features/dialogs/modal-provider.tsx","../src/features/notifications/toast-container.tsx","../src/providers.tsx"],"sourcesContent":[null,null,null],"names":["TemboModalProvider","props","_jsx","NiceModal","Provider","children","TemboToastContainer","colors","constants","useTemboTheme","useEffect","TemboNotify","init","ToastContainer","Object","assign","themeOverrides","TemboThemeProvider","_jsxs"],"mappings":"+WAGA,MAAMA,EAAmDC,GAC9CC,EAAAA,kBAAAA,IAACC,EAAAA,QAAUC,mBAAUH,EAAMI,WCOhCC,EAA2DL,IAC7D,MAAMM,OAAEA,EAAMC,UAAEA,GAAcC,kBAO9B,OAJAC,EAAAA,UAAU,KACNC,cAAYC,KAAKL,EAAQC,IAC1B,CAACD,EAAQC,IAELN,EAAAA,kBAAAA,IAACW,EAAAA,eAAcC,OAAAC,OAAA,CAAA,EAAKd,8BCwBkC,EAC7DI,WACAE,SACAC,YACAQ,oBAGId,EAAAA,kBAAAA,IAACe,qBAAkB,CACfV,OAAQA,EACRC,UAAWA,EACXQ,eAAgBA,EAAcX,SAE9Ba,EAAAA,kBAAAA,KAAClB,EAAkB,CAAAK,SAAA,CACdA,EACDH,EAAAA,kBAAAA,IAACI,EAAmB,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./
|
|
1
|
+
export * from "./providers.js";
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{j as r,u as o,T as t}from"./theme-provider-D_oV1J_K.js";import s from"@ebay/nice-modal-react";import{useEffect as e}from"react";import{ToastContainer as i}from"react-toastify";import"lodash";import{T as n}from"./tembo-notify-C-QGduBt.js";import"antd";import"./InfoCircleOutlined-DYs90hdV.js";import"./ZoomOutOutlined-BL6A5RSq.js";const m=o=>r.jsx(s.Provider,{children:o.children}),c=t=>{const{colors:s,constants:m}=o();return e(()=>{n.init(s,m)},[s,m]),r.jsx(i,Object.assign({},t))},a=({children:o,colors:s,constants:e,themeOverrides:i})=>r.jsx(t,{colors:s,constants:e,themeOverrides:i,children:r.jsxs(m,{children:[o,r.jsx(c,{})]})});export{a as TemboUIProviders};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/features/dialogs/modal-provider.tsx","../src/features/notifications/toast-container.tsx","../src/providers.tsx"],"sourcesContent":[null,null,null],"names":["TemboModalProvider","props","_jsx","NiceModal","Provider","children","TemboToastContainer","colors","constants","useTemboTheme","useEffect","TemboNotify","init","ToastContainer","Object","assign","TemboUIProviders","themeOverrides","TemboThemeProvider","_jsxs"],"mappings":"iVAGA,MAAMA,EAAmDC,GAC9CC,EAAAA,IAACC,EAAUC,mBAAUH,EAAMI,WCOhCC,EAA2DL,IAC7D,MAAMM,OAAEA,EAAMC,UAAEA,GAAcC,IAO9B,OAJAC,EAAU,KACNC,EAAYC,KAAKL,EAAQC,IAC1B,CAACD,EAAQC,IAELN,EAAAA,IAACW,EAAcC,OAAAC,OAAA,CAAA,EAAKd,KCwBlBe,EAAoD,EAC7DX,WACAE,SACAC,YACAS,oBAGIf,EAAAA,IAACgB,EAAkB,CACfX,OAAQA,EACRC,UAAWA,EACXS,eAAgBA,EAAcZ,SAE9Bc,EAAAA,KAACnB,EAAkB,CAAAK,SAAA,CACdA,EACDH,EAAAA,IAACI,EAAmB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./providers.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("../tembo-notify-D-uOV3t0.js");require("../theme-provider-Dqvy24OD.js"),require("react"),require("react-toastify"),require("lodash"),require("../InfoCircleOutlined-B7d2aRfV.js"),require("../ZoomOutOutlined-BY_CCwq7.js"),require("antd"),exports.TemboNotify=e.TemboNotify,exports.buildToastConfigs=e.buildToastConfigs;
|
|
2
|
+
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../features/notifications";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export{T as TemboNotify,b as buildToastConfigs}from"../tembo-notify-C-QGduBt.js";import"../theme-provider-D_oV1J_K.js";import"react";import"react-toastify";import"lodash";import"../InfoCircleOutlined-DYs90hdV.js";import"../ZoomOutOutlined-BL6A5RSq.js";import"antd";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TemboThemeProviderProps } from './theme/index.js';
|
|
3
|
+
export interface TemboUIProvidersProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
/** Color palette overrides */
|
|
6
|
+
colors?: TemboThemeProviderProps['colors'];
|
|
7
|
+
/** UI constants overrides */
|
|
8
|
+
constants?: TemboThemeProviderProps['constants'];
|
|
9
|
+
/** Raw Ant Design theme overrides */
|
|
10
|
+
themeOverrides?: TemboThemeProviderProps['themeOverrides'];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Top-level provider that wires up theme, modal and notifications
|
|
14
|
+
* for all Tembo UI components.
|
|
15
|
+
*
|
|
16
|
+
* Supports theme customization through colors and constants props.
|
|
17
|
+
* TemboToastContainer automatically syncs with theme changes.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* // Basic usage
|
|
22
|
+
* <TemboUIProviders>
|
|
23
|
+
* <App />
|
|
24
|
+
* </TemboUIProviders>
|
|
25
|
+
*
|
|
26
|
+
* // With custom colors
|
|
27
|
+
* <TemboUIProviders
|
|
28
|
+
* colors={{
|
|
29
|
+
* primary: { main: '#007bff' },
|
|
30
|
+
* action: { main: '#28a745' }
|
|
31
|
+
* }}
|
|
32
|
+
* >
|
|
33
|
+
* <App />
|
|
34
|
+
* </TemboUIProviders>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const TemboUIProviders: React.FC<TemboUIProvidersProps>;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import TemboModalProvider from './features/dialogs/modal-provider.js';
|
|
3
|
+
import TemboToastContainer from './features/notifications/toast-container.js';
|
|
4
|
+
import { TemboThemeProvider } from './theme/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Top-level provider that wires up theme, modal and notifications
|
|
7
|
+
* for all Tembo UI components.
|
|
8
|
+
*
|
|
9
|
+
* Supports theme customization through colors and constants props.
|
|
10
|
+
* TemboToastContainer automatically syncs with theme changes.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* // Basic usage
|
|
15
|
+
* <TemboUIProviders>
|
|
16
|
+
* <App />
|
|
17
|
+
* </TemboUIProviders>
|
|
18
|
+
*
|
|
19
|
+
* // With custom colors
|
|
20
|
+
* <TemboUIProviders
|
|
21
|
+
* colors={{
|
|
22
|
+
* primary: { main: '#007bff' },
|
|
23
|
+
* action: { main: '#28a745' }
|
|
24
|
+
* }}
|
|
25
|
+
* >
|
|
26
|
+
* <App />
|
|
27
|
+
* </TemboUIProviders>
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export const TemboUIProviders = ({ children, colors, constants, themeOverrides, }) => {
|
|
31
|
+
return (_jsx(TemboThemeProvider, { colors: colors, constants: constants, themeOverrides: themeOverrides, children: _jsxs(TemboModalProvider, { children: [children, _jsx(TemboToastContainer, {})] }) }));
|
|
32
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{toast as o}from"react-toastify";import{j as s}from"./theme-provider-D_oV1J_K.js";import{b as i,c as n,R as t,a as e}from"./InfoCircleOutlined-DYs90hdV.js";import"./ZoomOutOutlined-BL6A5RSq.js";const l=(o,l)=>{const r={position:"top-right",autoClose:4e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,style:{fontFamily:l.typography.fontFamily,fontSize:l.typography.fontSize.base,borderRadius:l.radius.base}},a=Object.assign(Object.assign({},r),{icon:s.jsx(i,{style:{fontSize:20,color:o.success.main}}),style:Object.assign(Object.assign({},r.style),{border:`1px solid ${o.success.border}`})}),c=Object.assign(Object.assign({},r),{icon:s.jsx(n,{style:{fontSize:20,color:o.error.main}}),style:Object.assign(Object.assign({},r.style),{border:`1px solid ${o.error.border}`}),autoClose:6e3}),g=Object.assign(Object.assign({},r),{icon:s.jsx(t,{style:{fontSize:20,color:o.warning.main}}),style:Object.assign(Object.assign({},r.style),{border:`1px solid ${o.warning.border}`})}),u=Object.assign(Object.assign({},r),{icon:s.jsx(e,{style:{fontSize:20,color:o.info.main}}),style:Object.assign(Object.assign({},r.style),{border:`1px solid ${o.info.border}`})});return{loadingConfig:Object.assign(Object.assign({},r),{autoClose:!1,closeButton:!1}),infoConfig:u,warningConfig:g,errorConfig:c,successConfig:a,baseConfig:r}};class r{static init(o,s){this.configs=l(o,s)}static getConfigs(){if(!this.configs)throw new Error("TemboNotify not initialized. Call TemboNotify.init(colors, constants) before using notifications.");return this.configs}static success(s,i){var n;const t=this.getConfigs();return o.success(s,Object.assign(Object.assign({},t.successConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.successConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static error(s,i){var n;const t=this.getConfigs();return o.error(s,Object.assign(Object.assign({},t.errorConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.errorConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static warning(s,i){var n;const t=this.getConfigs();return o.warning(s,Object.assign(Object.assign({},t.warningConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.warningConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static info(s,i){var n;const t=this.getConfigs();return o.info(s,Object.assign(Object.assign({},t.infoConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.infoConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static loading(s,i){const n=this.getConfigs();return o.loading(s,Object.assign(Object.assign({},n.loadingConfig),{position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static update(s,i){var n;const t=this.getConfigs(),e=i.type?{success:t.successConfig,error:t.errorConfig,warning:t.warningConfig,info:t.infoConfig}[i.type]:void 0;o.update(s,Object.assign({render:i.message,type:i.type,isLoading:!1,autoClose:null!==(n=i.autoClose)&&void 0!==n?n:null==e?void 0:e.autoClose},e))}static dismiss(s){o.dismiss(s)}static dismissAll(){o.dismiss()}static isActive(s){return o.isActive(s)}static promise(s,i,n){var t,e;const l=this.getConfigs();return o.promise(s,{pending:Object.assign({render:i.pending},l.loadingConfig),success:Object.assign(Object.assign({render:i.success},l.successConfig),{autoClose:null!==(t=null==n?void 0:n.duration)&&void 0!==t?t:l.successConfig.autoClose}),error:Object.assign(Object.assign({render:i.error},l.errorConfig),{autoClose:null!==(e=null==n?void 0:n.duration)&&void 0!==e?e:l.errorConfig.autoClose})},{position:null==n?void 0:n.position})}}r.configs=null;export{r as T,l as b};
|
|
2
|
+
//# sourceMappingURL=tembo-notify-C-QGduBt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tembo-notify-C-QGduBt.js","sources":["../src/features/notifications/toast-config.tsx","../src/features/notifications/tembo-notify.tsx"],"sourcesContent":[null,null],"names":["buildToastConfigs","colors","constants","baseConfig","position","autoClose","hideProgressBar","closeOnClick","pauseOnHover","draggable","progress","undefined","style","fontFamily","typography","fontSize","base","borderRadius","radius","successConfig","Object","assign","icon","_jsx","CheckCircleOutlined","color","success","main","border","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","closeButton","TemboNotify","init","this","configs","getConfigs","Error","message","options","toast","_a","duration","onClick","onClose","loading","update","id","config","type","render","isLoading","dismiss","dismissAll","isActive","promise","messages","pending","_b"],"mappings":"8MAaaA,EAAoB,CAACC,EAA2BC,KAIzD,MAAMC,EAA2B,CAC7BC,SAAU,YACVC,UAAW,IACXC,iBAAiB,EACjBC,cAAc,EACdC,cAAc,EACdC,WAAW,EACXC,cAAUC,EACVC,MAAO,CACHC,WAAYX,EAAUY,WAAWD,WACjCE,SAAUb,EAAUY,WAAWC,SAASC,KACxCC,aAAcf,EAAUgB,OAAOF,OAOjCG,EAAaC,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACZlB,IACHmB,KAAMC,MAACC,EAAmB,CAACZ,MAAO,CAAEG,SAAU,GAAIU,MAAOxB,EAAOyB,QAAQC,QACxEf,MAAKQ,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACElB,EAAWS,OAAK,CACnBgB,OAAQ,aAAa3B,EAAOyB,QAAQE,aAOtCC,iCACC1B,GAAU,CACbmB,KAAMC,EAAAA,IAACO,EAAmB,CAAClB,MAAO,CAAEG,SAAU,GAAIU,MAAOxB,EAAO8B,MAAMJ,QACtEf,MAAKQ,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACElB,EAAWS,OAAK,CACnBgB,OAAQ,aAAa3B,EAAO8B,MAAMH,WAEtCvB,UAAW,MAMT2B,EAAaZ,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACZlB,IACHmB,KAAMC,MAACU,EAAyB,CAACrB,MAAO,CAAEG,SAAU,GAAIU,MAAOxB,EAAOiC,QAAQP,QAC9Ef,MAAKQ,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACElB,EAAWS,OAAK,CACnBgB,OAAQ,aAAa3B,EAAOiC,QAAQN,aAOtCO,EAAUf,OAAAC,OAA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V,EAAQU,KACdE,WAAW,EACXtD,UAA4B,QAAjB4C,EAAAF,EAAQ1C,iBAAS,IAAA4C,EAAAA,EAAIO,eAAAA,EAAQnD,WACrCmD,IAOX,cAAOI,CAAQL,GACXP,EAAMY,QAAQL,GAMlB,iBAAOM,GACHb,EAAMY,UAMV,eAAOE,CAASP,GACZ,OAAOP,EAAMc,SAASP,GAM1B,cAAOQ,CACHA,EACAC,EAKAjB,WAEA,MAAMJ,EAAUD,KAAKE,aACrB,OAAOI,EAAMe,QACTA,EACA,CACIE,QAAO7C,OAAAC,OAAA,CACHqC,OAAQM,EAASC,SACdtB,EAAQL,eAEfZ,QAAON,OAAAC,OAAAD,OAAAC,OAAA,CACHqC,OAAQM,EAAStC,SACbiB,EAAQxB,eAAqB,CACjCd,UAA4B,QAAjB4C,EAAAF,aAAO,EAAPA,EAASG,gBAAQ,IAAAD,EAAAA,EAAIN,EAAQxB,cAAcd,YAE1D0B,MAAKX,OAAAC,OAAAD,OAAAC,OAAA,CACDqC,OAAQM,EAASjC,OACdY,EAAQd,aAAW,CACtBxB,UAA4B,QAAjB6D,EAAAnB,aAAO,EAAPA,EAASG,gBAAQ,IAAAgB,EAAAA,EAAIvB,EAAQd,YAAYxB,aAG5D,CACID,SAAU2C,aAAO,EAAPA,EAAS3C,YA1KhBoC,EAAAG,QAA+B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var o=require("react-toastify"),s=require("./theme-provider-Dqvy24OD.js"),i=require("./InfoCircleOutlined-B7d2aRfV.js");require("./ZoomOutOutlined-BY_CCwq7.js");const n=(o,n)=>{const t={position:"top-right",autoClose:4e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,style:{fontFamily:n.typography.fontFamily,fontSize:n.typography.fontSize.base,borderRadius:n.radius.base}},e=Object.assign(Object.assign({},t),{icon:s.jsxRuntimeExports.jsx(i.RefIcon$2,{style:{fontSize:20,color:o.success.main}}),style:Object.assign(Object.assign({},t.style),{border:`1px solid ${o.success.border}`})}),r=Object.assign(Object.assign({},t),{icon:s.jsxRuntimeExports.jsx(i.RefIcon$3,{style:{fontSize:20,color:o.error.main}}),style:Object.assign(Object.assign({},t.style),{border:`1px solid ${o.error.border}`}),autoClose:6e3}),l=Object.assign(Object.assign({},t),{icon:s.jsxRuntimeExports.jsx(i.RefIcon,{style:{fontSize:20,color:o.warning.main}}),style:Object.assign(Object.assign({},t.style),{border:`1px solid ${o.warning.border}`})}),a=Object.assign(Object.assign({},t),{icon:s.jsxRuntimeExports.jsx(i.RefIcon$1,{style:{fontSize:20,color:o.info.main}}),style:Object.assign(Object.assign({},t.style),{border:`1px solid ${o.info.border}`})});return{loadingConfig:Object.assign(Object.assign({},t),{autoClose:!1,closeButton:!1}),infoConfig:a,warningConfig:l,errorConfig:r,successConfig:e,baseConfig:t}};class t{static init(o,s){this.configs=n(o,s)}static getConfigs(){if(!this.configs)throw new Error("TemboNotify not initialized. Call TemboNotify.init(colors, constants) before using notifications.");return this.configs}static success(s,i){var n;const t=this.getConfigs();return o.toast.success(s,Object.assign(Object.assign({},t.successConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.successConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static error(s,i){var n;const t=this.getConfigs();return o.toast.error(s,Object.assign(Object.assign({},t.errorConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.errorConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static warning(s,i){var n;const t=this.getConfigs();return o.toast.warning(s,Object.assign(Object.assign({},t.warningConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.warningConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static info(s,i){var n;const t=this.getConfigs();return o.toast.info(s,Object.assign(Object.assign({},t.infoConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.infoConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static loading(s,i){const n=this.getConfigs();return o.toast.loading(s,Object.assign(Object.assign({},n.loadingConfig),{position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static update(s,i){var n;const t=this.getConfigs(),e=i.type?{success:t.successConfig,error:t.errorConfig,warning:t.warningConfig,info:t.infoConfig}[i.type]:void 0;o.toast.update(s,Object.assign({render:i.message,type:i.type,isLoading:!1,autoClose:null!==(n=i.autoClose)&&void 0!==n?n:null==e?void 0:e.autoClose},e))}static dismiss(s){o.toast.dismiss(s)}static dismissAll(){o.toast.dismiss()}static isActive(s){return o.toast.isActive(s)}static promise(s,i,n){var t,e;const r=this.getConfigs();return o.toast.promise(s,{pending:Object.assign({render:i.pending},r.loadingConfig),success:Object.assign(Object.assign({render:i.success},r.successConfig),{autoClose:null!==(t=null==n?void 0:n.duration)&&void 0!==t?t:r.successConfig.autoClose}),error:Object.assign(Object.assign({render:i.error},r.errorConfig),{autoClose:null!==(e=null==n?void 0:n.duration)&&void 0!==e?e:r.errorConfig.autoClose})},{position:null==n?void 0:n.position})}}t.configs=null,exports.TemboNotify=t,exports.buildToastConfigs=n;
|
|
2
|
+
//# sourceMappingURL=tembo-notify-D-uOV3t0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tembo-notify-D-uOV3t0.js","sources":["../src/features/notifications/toast-config.tsx","../src/features/notifications/tembo-notify.tsx"],"sourcesContent":[null,null],"names":["buildToastConfigs","colors","constants","baseConfig","position","autoClose","hideProgressBar","closeOnClick","pauseOnHover","draggable","progress","undefined","style","fontFamily","typography","fontSize","base","borderRadius","radius","successConfig","Object","assign","icon","_jsx","CheckCircleOutlined","color","success","main","border","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","closeButton","TemboNotify","init","this","configs","getConfigs","Error","message","options","toast","_a","duration","onClick","onClose","loading","update","id","config","type","render","isLoading","dismiss","dismissAll","isActive","promise","messages","pending","_b"],"mappings":"oLAaaA,EAAoB,CAACC,EAA2BC,KAIzD,MAAMC,EAA2B,CAC7BC,SAAU,YACVC,UAAW,IACXC,iBAAiB,EACjBC,cAAc,EACdC,cAAc,EACdC,WAAW,EACXC,cAAUC,EACVC,MAAO,CACHC,WAAYX,EAAUY,WAAWD,WACjCE,SAAUb,EAAUY,WAAWC,SAASC,KACxCC,aAAcf,EAAUgB,OAAOF,OAOjCG,EAAaC,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACZlB,IACHmB,KAAMC,wBAACC,EAAAA,UAAmB,CAACZ,MAAO,CAAEG,SAAU,GAAIU,MAAOxB,EAAOyB,QAAQC,QACxEf,MAAKQ,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACElB,EAAWS,OAAK,CACnBgB,OAAQ,aAAa3B,EAAOyB,QAAQE,aAOtCC,iCACC1B,GAAU,CACbmB,KAAMC,EAAAA,kBAAAA,IAACO,EAAAA,UAAmB,CAAClB,MAAO,CAAEG,SAAU,GAAIU,MAAOxB,EAAO8B,MAAMJ,QACtEf,MAAKQ,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACElB,EAAWS,OAAK,CACnBgB,OAAQ,aAAa3B,EAAO8B,MAAMH,WAEtCvB,UAAW,MAMT2B,EAAaZ,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACZlB,IACHmB,KAAMC,wBAACU,EAAAA,QAAyB,CAACrB,MAAO,CAAEG,SAAU,GAAIU,MAAOxB,EAAOiC,QAAQP,QAC9Ef,MAAKQ,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACElB,EAAWS,OAAK,CACnBgB,OAAQ,aAAa3B,EAAOiC,QAAQN,aAOtCO,EAAUf,OAAAC,OAAAD,OAAAC,OAAA,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,KAAMV,EAAQU,KACdE,WAAW,EACXtD,UAA4B,QAAjB4C,EAAAF,EAAQ1C,iBAAS,IAAA4C,EAAAA,EAAIO,eAAAA,EAAQnD,WACrCmD,IAOX,cAAOI,CAAQL,GACXP,EAAAA,MAAMY,QAAQL,GAMlB,iBAAOM,GACHb,EAAAA,MAAMY,UAMV,eAAOE,CAASP,GACZ,OAAOP,EAAAA,MAAMc,SAASP,GAM1B,cAAOQ,CACHA,EACAC,EAKAjB,WAEA,MAAMJ,EAAUD,KAAKE,aACrB,OAAOI,EAAAA,MAAMe,QACTA,EACA,CACIE,QAAO7C,OAAAC,OAAA,CACHqC,OAAQM,EAASC,SACdtB,EAAQL,eAEfZ,QAAON,OAAAC,OAAAD,OAAAC,OAAA,CACHqC,OAAQM,EAAStC,SACbiB,EAAQxB,eAAqB,CACjCd,UAA4B,QAAjB4C,EAAAF,aAAO,EAAPA,EAASG,gBAAQ,IAAAD,EAAAA,EAAIN,EAAQxB,cAAcd,YAE1D0B,MAAKX,OAAAC,OAAAD,OAAAC,OAAA,CACDqC,OAAQM,EAASjC,OACdY,EAAQd,aAAW,CACtBxB,UAA4B,QAAjB6D,EAAAnB,aAAO,EAAPA,EAASG,gBAAQ,IAAAgB,EAAAA,EAAIvB,EAAQd,YAAYxB,aAG5D,CACID,SAAU2C,aAAO,EAAPA,EAAS3C,YA1KhBoC,EAAAG,QAA+B"}
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tembo Color Palette
|
|
3
|
+
*
|
|
4
|
+
* Organized following Ant Design's token hierarchy:
|
|
5
|
+
* - Seed tokens (primary, action) → Map tokens (surfaces, components) → Alias tokens (text, borders)
|
|
6
|
+
* - Named by purpose, not by specific color values
|
|
7
|
+
* - Supports theming through consistent semantic structure
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* // Usage in components
|
|
11
|
+
* const { colors } = useTemboTheme();
|
|
12
|
+
* style={{ color: colors.text.primary, backgroundColor: colors.surface.main }}
|
|
13
|
+
*/
|
|
14
|
+
export interface TemboColorPalette {
|
|
15
|
+
/**
|
|
16
|
+
* Primary brand colors
|
|
17
|
+
* Used for main brand identity, primary buttons, and key UI elements
|
|
18
|
+
*/
|
|
19
|
+
primary: {
|
|
20
|
+
/** Base primary color - used for primary buttons and key branding elements */
|
|
21
|
+
main: string;
|
|
22
|
+
/** Hover state for primary interactive elements */
|
|
23
|
+
hover: string;
|
|
24
|
+
/** Active/pressed state for primary interactive elements */
|
|
25
|
+
active: string;
|
|
26
|
+
/** Lighter variant for backgrounds and subtle emphasis */
|
|
27
|
+
light: string;
|
|
28
|
+
/** Even lighter variant for very subtle backgrounds */
|
|
29
|
+
lighter: string;
|
|
30
|
+
/** Text color that maintains contrast on primary backgrounds (typically white) */
|
|
31
|
+
contrast: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Action/Interactive colors
|
|
35
|
+
* Used for links, secondary actions, and interactive elements that aren't primary
|
|
36
|
+
*/
|
|
37
|
+
action: {
|
|
38
|
+
/** Base action color - used for links, secondary buttons, and interactive elements */
|
|
39
|
+
main: string;
|
|
40
|
+
hover: string;
|
|
41
|
+
active: string;
|
|
42
|
+
/** Light background for action-related content (e.g. info badges, highlighted areas) */
|
|
43
|
+
light: string;
|
|
44
|
+
lighter: string;
|
|
45
|
+
/** Disabled state for action elements */
|
|
46
|
+
disabled: string;
|
|
47
|
+
/** Text color on action backgrounds */
|
|
48
|
+
contrast: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Neutral color scale
|
|
52
|
+
* Foundation for backgrounds, borders, and subtle UI elements
|
|
53
|
+
* Numbered 50-950 where 50 is lightest and 950 is darkest
|
|
54
|
+
*/
|
|
55
|
+
neutral: {
|
|
56
|
+
/** Near white - for subtle backgrounds */
|
|
57
|
+
50: string;
|
|
58
|
+
100: string;
|
|
59
|
+
200: string;
|
|
60
|
+
300: string;
|
|
61
|
+
400: string;
|
|
62
|
+
/** Mid-point gray - useful for borders and dividers */
|
|
63
|
+
500: string;
|
|
64
|
+
600: string;
|
|
65
|
+
700: string;
|
|
66
|
+
800: string;
|
|
67
|
+
900: string;
|
|
68
|
+
/** Near black - for dark backgrounds or text */
|
|
69
|
+
950: string;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Success colors
|
|
73
|
+
* Indicate successful operations, positive states, and confirmations
|
|
74
|
+
*/
|
|
75
|
+
success: {
|
|
76
|
+
/** Main success color - for success buttons, icons, and indicators */
|
|
77
|
+
main: string;
|
|
78
|
+
/** Light background for success messages and alerts */
|
|
79
|
+
bg: string;
|
|
80
|
+
/** Border for success containers */
|
|
81
|
+
border: string;
|
|
82
|
+
/** Text color for success messages */
|
|
83
|
+
text: string;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Error colors
|
|
87
|
+
* Indicate errors, failures, and destructive actions
|
|
88
|
+
*/
|
|
89
|
+
error: {
|
|
90
|
+
/** Main error color - for error states and destructive actions */
|
|
91
|
+
main: string;
|
|
92
|
+
/** Light background for error messages and alerts */
|
|
93
|
+
bg: string;
|
|
94
|
+
border: string;
|
|
95
|
+
text: string;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Warning colors
|
|
99
|
+
* Indicate caution, warnings, and important information requiring attention
|
|
100
|
+
*/
|
|
101
|
+
warning: {
|
|
102
|
+
/** Main warning color */
|
|
103
|
+
main: string;
|
|
104
|
+
bg: string;
|
|
105
|
+
border: string;
|
|
106
|
+
text: string;
|
|
107
|
+
};
|
|
108
|
+
/**
|
|
109
|
+
* Info colors
|
|
110
|
+
* For informational messages and neutral call-outs
|
|
111
|
+
*/
|
|
112
|
+
info: {
|
|
113
|
+
main: string;
|
|
114
|
+
bg: string;
|
|
115
|
+
border: string;
|
|
116
|
+
text: string;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* Surface colors
|
|
120
|
+
* Backgrounds and containers throughout the application
|
|
121
|
+
*/
|
|
122
|
+
surface: {
|
|
123
|
+
/** Main page background */
|
|
124
|
+
background: string;
|
|
125
|
+
/** Default surface/container background (cards, panels) */
|
|
126
|
+
main: string;
|
|
127
|
+
/** Elevated surfaces (modals, popovers) - typically with shadow */
|
|
128
|
+
elevated: string;
|
|
129
|
+
/** Hover state for interactive surfaces */
|
|
130
|
+
hover: string;
|
|
131
|
+
/** Very subtle background for nested content */
|
|
132
|
+
subtle: string;
|
|
133
|
+
};
|
|
134
|
+
/**
|
|
135
|
+
* Text colors
|
|
136
|
+
* For all text content with varying emphasis levels
|
|
137
|
+
*/
|
|
138
|
+
text: {
|
|
139
|
+
/** Primary text - body copy, headings */
|
|
140
|
+
primary: string;
|
|
141
|
+
/** Secondary text - supporting information, labels */
|
|
142
|
+
secondary: string;
|
|
143
|
+
/** Tertiary text - de-emphasized content, helper text */
|
|
144
|
+
tertiary: string;
|
|
145
|
+
/** Quaternary text - least emphasis, subtle information */
|
|
146
|
+
quaternary: string;
|
|
147
|
+
/** Disabled text state */
|
|
148
|
+
disabled: string;
|
|
149
|
+
/** Text on dark backgrounds */
|
|
150
|
+
inverse: string;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Border colors
|
|
154
|
+
* For separators, outlines, and component boundaries
|
|
155
|
+
*/
|
|
156
|
+
border: {
|
|
157
|
+
/** Default border color */
|
|
158
|
+
main: string;
|
|
159
|
+
/** Lighter border for subtle separation */
|
|
160
|
+
light: string;
|
|
161
|
+
/** Stronger border for emphasis */
|
|
162
|
+
strong: string;
|
|
163
|
+
/** Dividing lines between sections */
|
|
164
|
+
divider: string;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* Component-specific colors
|
|
168
|
+
* Pre-defined color combinations for common components
|
|
169
|
+
*/
|
|
170
|
+
components: {
|
|
171
|
+
/** Button color tokens */
|
|
172
|
+
button: {
|
|
173
|
+
primary: {
|
|
174
|
+
bg: string;
|
|
175
|
+
hover: string;
|
|
176
|
+
text: string;
|
|
177
|
+
};
|
|
178
|
+
default: {
|
|
179
|
+
bg: string;
|
|
180
|
+
border: string;
|
|
181
|
+
text: string;
|
|
182
|
+
hover: string;
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
/** Form input color tokens */
|
|
186
|
+
input: {
|
|
187
|
+
bg: string;
|
|
188
|
+
border: string;
|
|
189
|
+
borderHover: string;
|
|
190
|
+
borderFocus: string;
|
|
191
|
+
placeholder: string;
|
|
192
|
+
};
|
|
193
|
+
/** Table color tokens */
|
|
194
|
+
table: {
|
|
195
|
+
bg: string;
|
|
196
|
+
headerBg: string;
|
|
197
|
+
headerText: string;
|
|
198
|
+
border: string;
|
|
199
|
+
rowHover: string;
|
|
200
|
+
};
|
|
201
|
+
/** Navigation sidebar tokens */
|
|
202
|
+
sidebar: {
|
|
203
|
+
/** Dark sidebar background */
|
|
204
|
+
bg: string;
|
|
205
|
+
hover: string;
|
|
206
|
+
selected: string;
|
|
207
|
+
text: string;
|
|
208
|
+
textSecondary: string;
|
|
209
|
+
};
|
|
210
|
+
};
|
|
211
|
+
/**
|
|
212
|
+
* Utility colors
|
|
213
|
+
* Absolute color values for special cases
|
|
214
|
+
*/
|
|
215
|
+
utility: {
|
|
216
|
+
white: string;
|
|
217
|
+
black: string;
|
|
218
|
+
transparent: string;
|
|
219
|
+
/** Link color (often aliases action.main) */
|
|
220
|
+
link: string;
|
|
221
|
+
linkHover: string;
|
|
222
|
+
linkActive: string;
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Partial color overrides
|
|
227
|
+
* Allows deep partial overrides for theming
|
|
228
|
+
*/
|
|
229
|
+
export type TemboColorOverrides = DeepPartial<TemboColorPalette>;
|
|
230
|
+
/**
|
|
231
|
+
* Default Tembo color palette
|
|
232
|
+
* Light theme with professional, accessible colors
|
|
233
|
+
*/
|
|
234
|
+
export declare const defaultColorPalette: TemboColorPalette;
|
|
235
|
+
/**
|
|
236
|
+
* Build a complete color palette by merging overrides with defaults
|
|
237
|
+
* Performs deep merge to allow partial nested overrides
|
|
238
|
+
*
|
|
239
|
+
* @param overrides - Partial color palette overrides
|
|
240
|
+
* @returns Complete color palette with overrides applied
|
|
241
|
+
*/
|
|
242
|
+
export declare const buildColorPalette: (overrides?: TemboColorOverrides) => TemboColorPalette;
|
|
243
|
+
type DeepPartial<T> = {
|
|
244
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
245
|
+
};
|
|
246
|
+
export {};
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { merge } from "lodash";
|
|
2
|
+
/**
|
|
3
|
+
* Default Tembo color palette
|
|
4
|
+
* Light theme with professional, accessible colors
|
|
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
|
+
},
|
|
24
|
+
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',
|
|
54
|
+
},
|
|
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',
|
|
81
|
+
},
|
|
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
|
+
},
|
|
95
|
+
},
|
|
96
|
+
input: {
|
|
97
|
+
bg: '#ffffff',
|
|
98
|
+
border: '#d4d4d4',
|
|
99
|
+
borderHover: '#999999',
|
|
100
|
+
borderFocus: '#1a6985',
|
|
101
|
+
placeholder: '#999999',
|
|
102
|
+
},
|
|
103
|
+
table: {
|
|
104
|
+
bg: '#ffffff',
|
|
105
|
+
headerBg: '#fafafa',
|
|
106
|
+
headerText: '#000000',
|
|
107
|
+
border: '#e5e5e5',
|
|
108
|
+
rowHover: '#fafafa',
|
|
109
|
+
},
|
|
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)',
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
utility: {
|
|
119
|
+
white: '#ffffff',
|
|
120
|
+
black: '#000000',
|
|
121
|
+
transparent: 'transparent',
|
|
122
|
+
link: '#1a6985',
|
|
123
|
+
linkHover: '#145268',
|
|
124
|
+
linkActive: '#0f3d4f',
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Build a complete color palette by merging overrides with defaults
|
|
129
|
+
* Performs deep merge to allow partial nested overrides
|
|
130
|
+
*
|
|
131
|
+
* @param overrides - Partial color palette overrides
|
|
132
|
+
* @returns Complete color palette with overrides applied
|
|
133
|
+
*/
|
|
134
|
+
export const buildColorPalette = (overrides) => {
|
|
135
|
+
if (!overrides)
|
|
136
|
+
return defaultColorPalette;
|
|
137
|
+
return merge(defaultColorPalette, overrides);
|
|
138
|
+
};
|