@temboplus/frontend-react-core 0.1.3-beta.0 → 0.1.3-beta.10
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-CW-jqBMI.js +2 -0
- package/dist/ZoomOutOutlined-CW-jqBMI.js.map +1 -0
- package/dist/ZoomOutOutlined-Pw8hpWWK.js +2 -0
- package/dist/ZoomOutOutlined-Pw8hpWWK.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 +50 -0
- package/dist/features/notifications/tembo-notify.js +140 -0
- package/dist/features/notifications/toast-config.d.ts +12 -0
- package/dist/features/notifications/toast-config.js +60 -0
- package/dist/features/notifications/toast-container.d.ts +19 -0
- package/dist/features/notifications/toast-container.js +89 -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-Bp14qngd.js +2 -0
- package/dist/tembo-notify-Bp14qngd.js.map +1 -0
- package/dist/tembo-notify-h5Xn66oA.js +2 -0
- package/dist/tembo-notify-h5Xn66oA.js.map +1 -0
- package/dist/theme/colors.d.ts +278 -0
- package/dist/theme/colors.js +212 -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 +99 -0
- package/dist/theme/theme-provider.js +404 -0
- package/dist/theme-provider-Ca4P0Hcp.js +11 -0
- package/dist/theme-provider-Ca4P0Hcp.js.map +1 -0
- package/dist/theme-provider-RhAw3jw_.js +11 -0
- package/dist/theme-provider-RhAw3jw_.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
|
|
1
|
+
"use strict";var n=require("./theme-provider-RhAw3jw_.js"),t=require("@ebay/nice-modal-react"),e=require("tslib"),s=require("react"),o=require("react-toastify");require("lodash");var r=require("./tembo-notify-Bp14qngd.js");function i(n){return n&&n.__esModule?n:{default:n}}require("antd"),require("./InfoCircleOutlined-B7d2aRfV.js"),require("./ZoomOutOutlined-CW-jqBMI.js");var a=i(t);const l=t=>n.jsxRuntimeExports.jsx(a.default.Provider,{children:t.children}),c=t=>{var{showCloseButton:i=!1,showProgressBar:a=!1}=t,l=e.__rest(t,["showCloseButton","showProgressBar"]);const{colors:c,constants:d}=n.useTemboTheme();return s.useEffect(()=>{r.TemboNotify.init(c,d)},[c,d]),n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(o.ToastContainer,Object.assign({closeButton:i,hideProgressBar:!a},l)),n.jsxRuntimeExports.jsx("style",{children:`\n .Toastify__toast {\n font-family: ${d.typography.fontFamily};\n line-height: 1.5;\n display: flex;\n align-items: center; /* center icon + content */\n }\n\n .Toastify__toast-body {\n padding: 0;\n margin: 0;\n display: flex;\n align-items: flex-start;\n }\n\n .Toastify__toast-icon {\n width: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-inline-end: 6px; /* tighter spacing */\n }\n\n .Toastify__progress-bar {\n display: none;\n }\n\n .Toastify__close-button {\n opacity: 0.5;\n transition: opacity 0.2s ease;\n }\n\n .Toastify__close-button:hover {\n opacity: 1;\n }\n\n /* Force progress bar hidden in case someone enables it unintentionally */\n .Toastify__progress-bar {\n display: none;\n }\n\n /* Smooth entrance animation */\n @keyframes toastSlideIn {\n from {\n transform: translateX(110%);\n opacity: 0;\n }\n to {\n transform: translateX(0);\n opacity: 1;\n }\n }\n\n .Toastify__toast--top-right {\n animation: toastSlideIn 0.3s ease-out;\n }\n\n /* Optional: full-width mobile behaviour */\n @media (max-width: 480px) {\n .Toastify__toast-container--top-right {\n right: 0;\n left: 0;\n padding: 0;\n width: 100vw;\n }\n\n .Toastify__toast {\n margin-bottom: 0;\n border-radius: 0;\n }\n }\n `})]})};exports.TemboUIProviders=({children:t,colors:e,constants:s,themeOverrides:o})=>n.jsxRuntimeExports.jsx(n.TemboThemeProvider,{colors:e,constants:s,themeOverrides:o,children:n.jsxRuntimeExports.jsxs(l,{children:[t,n.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","_a","showCloseButton","showProgressBar","rest","__rest","colors","constants","useTemboTheme","useEffect","TemboNotify","init","_jsxs","_Fragment","ToastContainer","Object","assign","closeButton","hideProgressBar","typography","fontFamily","themeOverrides","TemboThemeProvider"],"mappings":"kYAGA,MAAMA,EAAmDC,GAC9CC,EAAAA,kBAAAA,IAACC,EAAAA,QAAUC,mBAAUH,EAAMI,WCsBhCC,EAA2DC,IAAA,IAAAC,gBAC7DA,GAAkB,EAAKC,gBACvBA,GAAkB,GAAKF,EACpBG,EAAIC,EAAAA,OAAAJ,EAHsD,CAAA,kBAAA,oBAK7D,MAAMK,OAAEA,EAAMC,UAAEA,GAAcC,kBAM9B,OAJAC,EAAAA,UAAU,KACNC,cAAYC,KAAKL,EAAQC,IAC1B,CAACD,EAAQC,IAGRK,EAAAA,kBAAAA,KAAAC,EAAAA,kBAAAA,SAAA,CAAAd,SAAA,CACIH,EAAAA,kBAAAA,IAACkB,EAAAA,eAAcC,OAAAC,OAAA,CACXC,YAAaf,EACbgB,iBAAkBf,GACdC,IAGRR,EAAAA,kBAAAA,IAAA,QAAA,CAAAG,SAAQ,0EAEeQ,EAAUY,WAAWC,ovECJS,EAC7DrB,WACAO,SACAC,YACAc,oBAGIzB,EAAAA,kBAAAA,IAAC0B,qBAAkB,CACfhB,OAAQA,EACRC,UAAWA,EACXc,eAAgBA,EAActB,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 n,u as t,T as o}from"./theme-provider-Ca4P0Hcp.js";import i from"@ebay/nice-modal-react";import{__rest as s}from"tslib";import{useEffect as e}from"react";import{ToastContainer as r}from"react-toastify";import"lodash";import{T as a}from"./tembo-notify-h5Xn66oA.js";import"antd";import"./InfoCircleOutlined-DYs90hdV.js";import"./ZoomOutOutlined-Pw8hpWWK.js";const l=t=>n.jsx(i.Provider,{children:t.children}),m=o=>{var{showCloseButton:i=!1,showProgressBar:l=!1}=o,m=s(o,["showCloseButton","showProgressBar"]);const{colors:c,constants:d}=t();return e(()=>{a.init(c,d)},[c,d]),n.jsxs(n.Fragment,{children:[n.jsx(r,Object.assign({closeButton:i,hideProgressBar:!l},m)),n.jsx("style",{children:`\n .Toastify__toast {\n font-family: ${d.typography.fontFamily};\n line-height: 1.5;\n display: flex;\n align-items: center; /* center icon + content */\n }\n\n .Toastify__toast-body {\n padding: 0;\n margin: 0;\n display: flex;\n align-items: flex-start;\n }\n\n .Toastify__toast-icon {\n width: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-inline-end: 6px; /* tighter spacing */\n }\n\n .Toastify__progress-bar {\n display: none;\n }\n\n .Toastify__close-button {\n opacity: 0.5;\n transition: opacity 0.2s ease;\n }\n\n .Toastify__close-button:hover {\n opacity: 1;\n }\n\n /* Force progress bar hidden in case someone enables it unintentionally */\n .Toastify__progress-bar {\n display: none;\n }\n\n /* Smooth entrance animation */\n @keyframes toastSlideIn {\n from {\n transform: translateX(110%);\n opacity: 0;\n }\n to {\n transform: translateX(0);\n opacity: 1;\n }\n }\n\n .Toastify__toast--top-right {\n animation: toastSlideIn 0.3s ease-out;\n }\n\n /* Optional: full-width mobile behaviour */\n @media (max-width: 480px) {\n .Toastify__toast-container--top-right {\n right: 0;\n left: 0;\n padding: 0;\n width: 100vw;\n }\n\n .Toastify__toast {\n margin-bottom: 0;\n border-radius: 0;\n }\n }\n `})]})},c=({children:t,colors:i,constants:s,themeOverrides:e})=>n.jsx(o,{colors:i,constants:s,themeOverrides:e,children:n.jsxs(l,{children:[t,n.jsx(m,{})]})});export{c 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","_a","showCloseButton","showProgressBar","rest","__rest","colors","constants","useTemboTheme","useEffect","TemboNotify","init","_jsxs","_Fragment","ToastContainer","Object","assign","closeButton","hideProgressBar","typography","fontFamily","TemboUIProviders","themeOverrides","TemboThemeProvider"],"mappings":"gXAGA,MAAMA,EAAmDC,GAC9CC,EAAAA,IAACC,EAAUC,mBAAUH,EAAMI,WCsBhCC,EAA2DC,IAAA,IAAAC,gBAC7DA,GAAkB,EAAKC,gBACvBA,GAAkB,GAAKF,EACpBG,EAAIC,EAAAJ,EAHsD,CAAA,kBAAA,oBAK7D,MAAMK,OAAEA,EAAMC,UAAEA,GAAcC,IAM9B,OAJAC,EAAU,KACNC,EAAYC,KAAKL,EAAQC,IAC1B,CAACD,EAAQC,IAGRK,EAAAA,KAAAC,EAAAA,SAAA,CAAAd,SAAA,CACIH,EAAAA,IAACkB,EAAcC,OAAAC,OAAA,CACXC,YAAaf,EACbgB,iBAAkBf,GACdC,IAGRR,EAAAA,IAAA,QAAA,CAAAG,SAAQ,0EAEeQ,EAAUY,WAAWC,2tECJ3CC,EAAoD,EAC7DtB,WACAO,SACAC,YACAe,oBAGI1B,EAAAA,IAAC2B,EAAkB,CACfjB,OAAQA,EACRC,UAAWA,EACXe,eAAgBA,EAAcvB,SAE9Ba,EAAAA,KAAClB,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-Bp14qngd.js");require("tslib"),require("../theme-provider-RhAw3jw_.js"),require("react"),require("react-toastify"),require("lodash"),require("../InfoCircleOutlined-B7d2aRfV.js"),require("../ZoomOutOutlined-CW-jqBMI.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-h5Xn66oA.js";import"tslib";import"../theme-provider-Ca4P0Hcp.js";import"react";import"react-toastify";import"lodash";import"../InfoCircleOutlined-DYs90hdV.js";import"../ZoomOutOutlined-Pw8hpWWK.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
|
+
"use strict";var s=require("tslib"),t=require("./theme-provider-RhAw3jw_.js"),o=require("react-toastify"),i=require("./InfoCircleOutlined-B7d2aRfV.js"),e=require("./ZoomOutOutlined-CW-jqBMI.js");const n=(s,o)=>{const n={position:"top-right",autoClose:4e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,closeButton:!1,style:{fontFamily:o.typography.fontFamily,fontSize:14,borderRadius:10,padding:"10px 14px",boxShadow:"0 12px 24px rgba(15, 23, 42, 0.12)",border:"none",minHeight:56,backgroundColor:s.surface.elevated,color:s.text.primary,display:"flex",alignItems:"center",gap:8}},r=Object.assign(Object.assign({},n),{icon:t.jsxRuntimeExports.jsx(i.RefIcon$2,{style:{fontSize:18,color:s.success.main}}),style:Object.assign(Object.assign({},n.style),{backgroundColor:s.success.bg,color:s.success.text}),className:"toast-success"}),a=Object.assign(Object.assign({},n),{icon:t.jsxRuntimeExports.jsx(i.RefIcon$3,{style:{fontSize:18,color:s.error.main}}),style:Object.assign(Object.assign({},n.style),{backgroundColor:s.error.bg,color:s.error.text}),className:"toast-error"}),l=Object.assign(Object.assign({},n),{icon:t.jsxRuntimeExports.jsx(i.RefIcon,{style:{fontSize:18,color:s.warning.main}}),style:Object.assign(Object.assign({},n.style),{backgroundColor:s.warning.bg,color:s.warning.text}),className:"toast-warning"}),c=Object.assign(Object.assign({},n),{icon:t.jsxRuntimeExports.jsx(i.RefIcon$1,{style:{fontSize:18,color:s.info.main}}),style:Object.assign(Object.assign({},n.style),{backgroundColor:s.surface.elevated,color:s.text.primary}),className:"toast-info"});return{loadingConfig:Object.assign(Object.assign({},n),{icon:t.jsxRuntimeExports.jsx(e.RefIcon$2,{style:{fontSize:18,color:s.primary.main}}),style:Object.assign(Object.assign({},n.style),{backgroundColor:s.surface.elevated,color:s.text.primary}),autoClose:!1,closeButton:!1,hideProgressBar:!0,className:"toast-loading"}),infoConfig:c,warningConfig:l,errorConfig:a,successConfig:r,baseConfig:n,colors:s}},r={position:"top-right",autoClose:4e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,closeButton:!1};class a{static init(s,t){this.configs=n(s,t)}static getConfigs(){return this.configs}static formatMessage(s){if(s&&"object"==typeof s&&!("$$typeof"in s)){const o=!!s.title,i=!!s.description;return o&&i?t.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsxRuntimeExports.jsx("div",{style:{fontWeight:600,fontSize:14},children:s.title}),t.jsxRuntimeExports.jsx("div",{style:{fontSize:13,fontWeight:400,opacity:.95},children:s.description})]}):o&&!i?t.jsxRuntimeExports.jsx("div",{style:{fontWeight:600,fontSize:14},children:s.title}):!o&&i?t.jsxRuntimeExports.jsx("div",{style:{fontSize:13,fontWeight:500},children:s.description}):""}return s}static buildOptions(t,o){const i=o||{},{duration:e,toastId:n,onClick:a,onClose:l}=i,c=s.__rest(i,["duration","toastId","onClick","onClose"]),g=null!=t?t:r;return Object.assign(Object.assign(Object.assign({},g),c),{toastId:n,autoClose:void 0!==e?e||!1:g.autoClose,onClick:a,onClose:l})}static getSuccessConfig(){var s,t;const o=this.getConfigs();return null!==(t=null!==(s=null==o?void 0:o.successConfig)&&void 0!==s?s:null==o?void 0:o.baseConfig)&&void 0!==t?t:void 0}static getErrorConfig(){var s,t;const o=this.getConfigs();return null!==(t=null!==(s=null==o?void 0:o.errorConfig)&&void 0!==s?s:null==o?void 0:o.baseConfig)&&void 0!==t?t:void 0}static getWarningConfig(){var s,t;const o=this.getConfigs();return null!==(t=null!==(s=null==o?void 0:o.warningConfig)&&void 0!==s?s:null==o?void 0:o.baseConfig)&&void 0!==t?t:void 0}static getInfoConfig(){var s,t;const o=this.getConfigs();return null!==(t=null!==(s=null==o?void 0:o.infoConfig)&&void 0!==s?s:null==o?void 0:o.baseConfig)&&void 0!==t?t:void 0}static getLoadingConfig(){var s,t;const o=this.getConfigs();return null!==(t=null!==(s=null==o?void 0:o.loadingConfig)&&void 0!==s?s:null==o?void 0:o.baseConfig)&&void 0!==t?t:void 0}static success(s,t){const i=this.formatMessage(s),e=this.buildOptions(this.getSuccessConfig(),t);return o.toast.success(i,e)}static error(s,t){const i=this.formatMessage(s),e=this.buildOptions(this.getErrorConfig(),t);return o.toast.error(i,e)}static warning(s,t){const i=this.formatMessage(s),e=this.buildOptions(this.getWarningConfig(),t);return o.toast.warning(i,e)}static info(s,t){const i=this.formatMessage(s),e=this.buildOptions(this.getInfoConfig(),t);return o.toast.info(i,e)}static loading(t,i){var e;const n=this.formatMessage(t),a=i||{},{toastId:l,onClick:c,onClose:g}=a,u=s.__rest(a,["toastId","onClick","onClose"]),d=null!==(e=this.getLoadingConfig())&&void 0!==e?e:r;return o.toast.loading(n,Object.assign(Object.assign(Object.assign({},d),u),{toastId:l,onClick:c,onClose:g}))}static update(s,t){var i,e;const n=this.getConfigs(),a=t.type&&n?{success:n.successConfig,error:n.errorConfig,warning:n.warningConfig,info:n.infoConfig}[t.type]:void 0,l=t.message?this.formatMessage(t.message):t.render;o.toast.update(s,Object.assign({render:l,type:t.type,isLoading:!1,autoClose:null!==(e=null!==(i=t.autoClose)&&void 0!==i?i:null==a?void 0:a.autoClose)&&void 0!==e?e:r.autoClose},null!=a?a:{}))}static dismiss(s){o.toast.dismiss(s)}static dismissAll(){o.toast.dismiss()}static isActive(s){return o.toast.isActive(s)}}a.configs=null,exports.TemboNotify=a,exports.buildToastConfigs=n;
|
|
2
|
+
//# sourceMappingURL=tembo-notify-Bp14qngd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tembo-notify-Bp14qngd.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","closeButton","style","fontFamily","typography","fontSize","borderRadius","padding","boxShadow","border","minHeight","backgroundColor","surface","elevated","color","text","primary","display","alignItems","gap","successConfig","Object","assign","icon","_jsx","CheckCircleOutlined","success","main","bg","className","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","LoadingOutlined","FALLBACK_BASE_CONFIG","TemboNotify","init","this","configs","getConfigs","formatMessage","message","hasTitle","title","hasDescription","description","_jsxs","flexDirection","children","fontWeight","opacity","buildOptions","options","_a","duration","toastId","onClick","onClose","restOptions","__rest","effectiveBase","undefined","getSuccessConfig","_b","getErrorConfig","getWarningConfig","getInfoConfig","getLoadingConfig","content","toastOptions","toast","loading","update","id","typeConfig","type","render","isLoading","dismiss","dismissAll","isActive"],"mappings":"yMAUaA,EAAoB,CAC7BC,EACAC,KAKA,MAAMC,EAA2B,CAC7BC,SAAU,YACVC,UAAW,IACXC,iBAAiB,EACjBC,cAAc,EACdC,cAAc,EACdC,WAAW,EACXC,aAAa,EACbC,MAAO,CACHC,WAAYV,EAAUW,WAAWD,WACjCE,SAAU,GACVC,aAAc,GACdC,QAAS,YACTC,UAAW,qCACXC,OAAQ,OACRC,UAAW,GACXC,gBAAiBnB,EAAOoB,QAAQC,SAChCC,MAAOtB,EAAOuB,KAAKC,QACnBC,QAAS,OACTC,WAAY,SACZC,IAAK,IAOPC,EAAaC,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACZ5B,GAAU,CACb6B,KACIC,EAAAA,kBAAAA,IAACC,YAAmB,CAChBvB,MAAO,CAAEG,SAAU,GAAIS,MAAOtB,EAAOkC,QAAQC,QAGrDzB,MAAKmB,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACE5B,EAAWQ,OAAK,CACnBS,gBAAiBnB,EAAOkC,QAAQE,GAChCd,MAAOtB,EAAOkC,QAAQX,OAE1Bc,UAAW,kBAMTC,EAAWT,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACV5B,GAAU,CACb6B,KACIC,EAAAA,kBAAAA,IAACO,YAAmB,CAChB7B,MAAO,CAAEG,SAAU,GAAIS,MAAOtB,EAAOwC,MAAML,QAGnDzB,MAAKmB,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACE5B,EAAWQ,OAAK,CACnBS,gBAAiBnB,EAAOwC,MAAMJ,GAC9Bd,MAAOtB,EAAOwC,MAAMjB,OAExBc,UAAW,gBAMTI,EAAaZ,OAAAC,OAAAD,OAAAC,OAAA,C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G/B,cAAOE,CAAQ9B,EAAwBW,SACnC,MAAMgB,EAAU/B,KAAKG,cAAcC,GAC7BsB,EAAgDX,GAAW,CAAA,GAA3DG,QAAEA,EAAOC,QAAEA,EAAOC,QAAEA,GAAOM,EAAKL,EAAWC,EAAAA,OAAAI,EAA3C,CAAA,UAAA,UAAA,YACA5E,EAAoC,QAAvBkE,EAAAhB,KAAK8B,0BAAkB,IAAAd,EAAAA,EAAInB,EAE9C,OAAOoC,EAAAA,MAAMC,QAAQH,+CACdjF,GACAuE,GAAW,CACdH,UACAC,UACAC,aAIR,aAAOe,CAAOC,EAAQrB,WAMlB,MAAMd,EAAUD,KAAKE,aAEfmC,EACFtB,EAAQuB,MAAQrC,EACV,CACInB,QAASmB,EAAQzB,cACjBY,MAAOa,EAAQf,YACfK,QAASU,EAAQZ,cACjBK,KAAMO,EAAQT,YAChBuB,EAAQuB,WACVd,EAEJO,EAAUhB,EAAQX,QAClBJ,KAAKG,cAAcY,EAAQX,SAC3BW,EAAQwB,OAEdN,QAAME,OAAOC,iBACTG,OAAQR,EACRO,KAAMvB,EAAQuB,KACdE,WAAW,EACXxF,UAEyB,QADrB0E,EAAiB,QAAjBV,EAAAD,EAAQ/D,iBAAS,IAAAgE,EAAAA,EACjBqB,eAAAA,EAAYrF,iBAAS,IAAA0E,EAAAA,EACrB7B,EAAqB7C,WACrBqF,QAAAA,EAAc,CAAA,IAI1B,cAAOI,CAAQL,GACXH,EAAAA,MAAMQ,QAAQL,GAGlB,iBAAOM,GACHT,EAAAA,MAAMQ,UAGV,eAAOE,CAASP,GACZ,OAAOH,EAAAA,MAAMU,SAASP,IAvLXtC,EAAAG,QAA+B"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__rest as s}from"tslib";import{j as o}from"./theme-provider-Ca4P0Hcp.js";import{toast as t}from"react-toastify";import{b as i,c as n,R as e,a}from"./InfoCircleOutlined-DYs90hdV.js";import{b as r}from"./ZoomOutOutlined-Pw8hpWWK.js";const l=(s,t)=>{const l={position:"top-right",autoClose:4e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,closeButton:!1,style:{fontFamily:t.typography.fontFamily,fontSize:14,borderRadius:10,padding:"10px 14px",boxShadow:"0 12px 24px rgba(15, 23, 42, 0.12)",border:"none",minHeight:56,backgroundColor:s.surface.elevated,color:s.text.primary,display:"flex",alignItems:"center",gap:8}},c=Object.assign(Object.assign({},l),{icon:o.jsx(i,{style:{fontSize:18,color:s.success.main}}),style:Object.assign(Object.assign({},l.style),{backgroundColor:s.success.bg,color:s.success.text}),className:"toast-success"}),g=Object.assign(Object.assign({},l),{icon:o.jsx(n,{style:{fontSize:18,color:s.error.main}}),style:Object.assign(Object.assign({},l.style),{backgroundColor:s.error.bg,color:s.error.text}),className:"toast-error"}),d=Object.assign(Object.assign({},l),{icon:o.jsx(e,{style:{fontSize:18,color:s.warning.main}}),style:Object.assign(Object.assign({},l.style),{backgroundColor:s.warning.bg,color:s.warning.text}),className:"toast-warning"}),u=Object.assign(Object.assign({},l),{icon:o.jsx(a,{style:{fontSize:18,color:s.info.main}}),style:Object.assign(Object.assign({},l.style),{backgroundColor:s.surface.elevated,color:s.text.primary}),className:"toast-info"});return{loadingConfig:Object.assign(Object.assign({},l),{icon:o.jsx(r,{style:{fontSize:18,color:s.primary.main}}),style:Object.assign(Object.assign({},l.style),{backgroundColor:s.surface.elevated,color:s.text.primary}),autoClose:!1,closeButton:!1,hideProgressBar:!0,className:"toast-loading"}),infoConfig:u,warningConfig:d,errorConfig:g,successConfig:c,baseConfig:l,colors:s}},c={position:"top-right",autoClose:4e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,closeButton:!1};class g{static init(s,o){this.configs=l(s,o)}static getConfigs(){return this.configs}static formatMessage(s){if(s&&"object"==typeof s&&!("$$typeof"in s)){const t=!!s.title,i=!!s.description;return t&&i?o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[o.jsx("div",{style:{fontWeight:600,fontSize:14},children:s.title}),o.jsx("div",{style:{fontSize:13,fontWeight:400,opacity:.95},children:s.description})]}):t&&!i?o.jsx("div",{style:{fontWeight:600,fontSize:14},children:s.title}):!t&&i?o.jsx("div",{style:{fontSize:13,fontWeight:500},children:s.description}):""}return s}static buildOptions(o,t){const i=t||{},{duration:n,toastId:e,onClick:a,onClose:r}=i,l=s(i,["duration","toastId","onClick","onClose"]),g=null!=o?o:c;return Object.assign(Object.assign(Object.assign({},g),l),{toastId:e,autoClose:void 0!==n?n||!1:g.autoClose,onClick:a,onClose:r})}static getSuccessConfig(){var s,o;const t=this.getConfigs();return null!==(o=null!==(s=null==t?void 0:t.successConfig)&&void 0!==s?s:null==t?void 0:t.baseConfig)&&void 0!==o?o:void 0}static getErrorConfig(){var s,o;const t=this.getConfigs();return null!==(o=null!==(s=null==t?void 0:t.errorConfig)&&void 0!==s?s:null==t?void 0:t.baseConfig)&&void 0!==o?o:void 0}static getWarningConfig(){var s,o;const t=this.getConfigs();return null!==(o=null!==(s=null==t?void 0:t.warningConfig)&&void 0!==s?s:null==t?void 0:t.baseConfig)&&void 0!==o?o:void 0}static getInfoConfig(){var s,o;const t=this.getConfigs();return null!==(o=null!==(s=null==t?void 0:t.infoConfig)&&void 0!==s?s:null==t?void 0:t.baseConfig)&&void 0!==o?o:void 0}static getLoadingConfig(){var s,o;const t=this.getConfigs();return null!==(o=null!==(s=null==t?void 0:t.loadingConfig)&&void 0!==s?s:null==t?void 0:t.baseConfig)&&void 0!==o?o:void 0}static success(s,o){const i=this.formatMessage(s),n=this.buildOptions(this.getSuccessConfig(),o);return t.success(i,n)}static error(s,o){const i=this.formatMessage(s),n=this.buildOptions(this.getErrorConfig(),o);return t.error(i,n)}static warning(s,o){const i=this.formatMessage(s),n=this.buildOptions(this.getWarningConfig(),o);return t.warning(i,n)}static info(s,o){const i=this.formatMessage(s),n=this.buildOptions(this.getInfoConfig(),o);return t.info(i,n)}static loading(o,i){var n;const e=this.formatMessage(o),a=i||{},{toastId:r,onClick:l,onClose:g}=a,d=s(a,["toastId","onClick","onClose"]),u=null!==(n=this.getLoadingConfig())&&void 0!==n?n:c;return t.loading(e,Object.assign(Object.assign(Object.assign({},u),d),{toastId:r,onClick:l,onClose:g}))}static update(s,o){var i,n;const e=this.getConfigs(),a=o.type&&e?{success:e.successConfig,error:e.errorConfig,warning:e.warningConfig,info:e.infoConfig}[o.type]:void 0,r=o.message?this.formatMessage(o.message):o.render;t.update(s,Object.assign({render:r,type:o.type,isLoading:!1,autoClose:null!==(n=null!==(i=o.autoClose)&&void 0!==i?i:null==a?void 0:a.autoClose)&&void 0!==n?n:c.autoClose},null!=a?a:{}))}static dismiss(s){t.dismiss(s)}static dismissAll(){t.dismiss()}static isActive(s){return t.isActive(s)}}g.configs=null;export{g as T,l as b};
|
|
2
|
+
//# sourceMappingURL=tembo-notify-h5Xn66oA.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tembo-notify-h5Xn66oA.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","closeButton","style","fontFamily","typography","fontSize","borderRadius","padding","boxShadow","border","minHeight","backgroundColor","surface","elevated","color","text","primary","display","alignItems","gap","successConfig","Object","assign","icon","_jsx","CheckCircleOutlined","success","main","bg","className","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","LoadingOutlined","FALLBACK_BASE_CONFIG","TemboNotify","init","this","configs","getConfigs","formatMessage","message","hasTitle","title","hasDescription","description","_jsxs","flexDirection","children","fontWeight","opacity","buildOptions","options","_a","duration","toastId","onClick","onClose","restOptions","__rest","effectiveBase","undefined","getSuccessConfig","_b","getErrorConfig","getWarningConfig","getInfoConfig","getLoadingConfig","content","toastOptions","toast","loading","update","id","typeConfig","type","render","isLoading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AA,EAAInB,EAE9C,OAAOoC,EAAMC,QAAQH,+CACdjF,GACAuE,GAAW,CACdH,UACAC,UACAC,aAIR,aAAOe,CAAOC,EAAQrB,WAMlB,MAAMd,EAAUD,KAAKE,aAEfmC,EACFtB,EAAQuB,MAAQrC,EACV,CACInB,QAASmB,EAAQzB,cACjBY,MAAOa,EAAQf,YACfK,QAASU,EAAQZ,cACjBK,KAAMO,EAAQT,YAChBuB,EAAQuB,WACVd,EAEJO,EAAUhB,EAAQX,QAClBJ,KAAKG,cAAcY,EAAQX,SAC3BW,EAAQwB,OAEdN,EAAME,OAAOC,iBACTG,OAAQR,EACRO,KAAMvB,EAAQuB,KACdE,WAAW,EACXxF,UAEyB,QADrB0E,EAAiB,QAAjBV,EAAAD,EAAQ/D,iBAAS,IAAAgE,EAAAA,EACjBqB,eAAAA,EAAYrF,iBAAS,IAAA0E,EAAAA,EACrB7B,EAAqB7C,WACrBqF,QAAAA,EAAc,CAAA,IAI1B,cAAOI,CAAQL,GACXH,EAAMQ,QAAQL,GAGlB,iBAAOM,GACHT,EAAMQ,UAGV,eAAOE,CAASP,GACZ,OAAOH,EAAMU,SAASP,IAvLXtC,EAAAG,QAA+B"}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tembo Color Palette
|
|
3
|
+
*
|
|
4
|
+
* Organized following Ant Design's token hierarchy:
|
|
5
|
+
* - Seed tokens (primary, action) → Map tokens (surfaces, components) → Alias tokens (text, borders)
|
|
6
|
+
* - Named by purpose, not by specific color values
|
|
7
|
+
* - Supports theming through consistent semantic structure
|
|
8
|
+
* - Theme-aware: neutral scale adapts to light/dark mode
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* // Usage in components
|
|
12
|
+
* const { colors } = useTemboTheme();
|
|
13
|
+
* style={{ color: colors.text.primary, backgroundColor: colors.neutral.lightest }}
|
|
14
|
+
*/
|
|
15
|
+
export interface TemboColorPalette {
|
|
16
|
+
/**
|
|
17
|
+
* Primary brand colors
|
|
18
|
+
* Used for main brand identity, primary buttons, and key UI elements
|
|
19
|
+
*/
|
|
20
|
+
primary: {
|
|
21
|
+
/** Base primary color - used for primary buttons and key branding elements */
|
|
22
|
+
main: string;
|
|
23
|
+
/** Hover state for primary interactive elements */
|
|
24
|
+
hover: string;
|
|
25
|
+
/** Active/pressed state for primary interactive elements */
|
|
26
|
+
active: string;
|
|
27
|
+
/** Lighter variant for backgrounds and subtle emphasis */
|
|
28
|
+
light: string;
|
|
29
|
+
/** Even lighter variant for very subtle backgrounds */
|
|
30
|
+
lighter: string;
|
|
31
|
+
/** Text color that maintains contrast on primary backgrounds (typically white) */
|
|
32
|
+
contrast: string;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Action/Interactive colors
|
|
36
|
+
* Used for links, secondary actions, and interactive elements that aren't primary
|
|
37
|
+
*/
|
|
38
|
+
action: {
|
|
39
|
+
/** Base action color - used for links, secondary buttons, and interactive elements */
|
|
40
|
+
main: string;
|
|
41
|
+
hover: string;
|
|
42
|
+
active: string;
|
|
43
|
+
/** Light background for action-related content (e.g. info badges, highlighted areas) */
|
|
44
|
+
light: string;
|
|
45
|
+
lighter: string;
|
|
46
|
+
/** Disabled state for action elements */
|
|
47
|
+
disabled: string;
|
|
48
|
+
/** Text color on action backgrounds */
|
|
49
|
+
contrast: string;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Absolute colors
|
|
53
|
+
* Never change regardless of theme mode - use for logos, illustrations, or specific design requirements
|
|
54
|
+
*/
|
|
55
|
+
absolute: {
|
|
56
|
+
/** Pure white - always #ffffff */
|
|
57
|
+
white: string;
|
|
58
|
+
/** Pure black - always #000000 */
|
|
59
|
+
black: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Neutral color scale (0-10)
|
|
63
|
+
* Theme-aware: entire scale inverts in dark mode
|
|
64
|
+
* Foundation for backgrounds, borders, and subtle UI elements
|
|
65
|
+
* 0 = brightest in current theme, 10 = dimmest in current theme
|
|
66
|
+
*/
|
|
67
|
+
neutral: {
|
|
68
|
+
/** Brightest tone in current theme (white in light, black in dark) */
|
|
69
|
+
0: string;
|
|
70
|
+
1: string;
|
|
71
|
+
2: string;
|
|
72
|
+
3: string;
|
|
73
|
+
4: string;
|
|
74
|
+
/** Middle gray - typically stays similar across themes */
|
|
75
|
+
5: string;
|
|
76
|
+
6: string;
|
|
77
|
+
7: string;
|
|
78
|
+
8: string;
|
|
79
|
+
9: string;
|
|
80
|
+
/** Dimmest tone in current theme (black in light, white in dark) */
|
|
81
|
+
10: string;
|
|
82
|
+
/** Brightest tone (maps to 0) */
|
|
83
|
+
brightest: string;
|
|
84
|
+
/** Near-brightest tone (maps to 1) */
|
|
85
|
+
lightest: string;
|
|
86
|
+
/** Very light tone (maps to 2) */
|
|
87
|
+
lighter: string;
|
|
88
|
+
/** Light tone (maps to 3) */
|
|
89
|
+
light: string;
|
|
90
|
+
/** Middle tone (maps to 5) */
|
|
91
|
+
medium: string;
|
|
92
|
+
/** Dark tone (maps to 7) */
|
|
93
|
+
dark: string;
|
|
94
|
+
/** Very dark tone (maps to 8) */
|
|
95
|
+
darker: string;
|
|
96
|
+
/** Near-dimmest tone (maps to 9) */
|
|
97
|
+
darkest: string;
|
|
98
|
+
/** Dimmest tone (maps to 10) */
|
|
99
|
+
dimmest: string;
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Success colors
|
|
103
|
+
* Indicate successful operations, positive states, and confirmations
|
|
104
|
+
*/
|
|
105
|
+
success: {
|
|
106
|
+
/** Main success color - for success buttons, icons, and indicators */
|
|
107
|
+
main: string;
|
|
108
|
+
/** Light background for success messages and alerts */
|
|
109
|
+
bg: string;
|
|
110
|
+
/** Border for success containers */
|
|
111
|
+
border: string;
|
|
112
|
+
/** Text color for success messages */
|
|
113
|
+
text: string;
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Error colors
|
|
117
|
+
* Indicate errors, failures, and destructive actions
|
|
118
|
+
*/
|
|
119
|
+
error: {
|
|
120
|
+
/** Main error color - for error states and destructive actions */
|
|
121
|
+
main: string;
|
|
122
|
+
/** Light background for error messages and alerts */
|
|
123
|
+
bg: string;
|
|
124
|
+
border: string;
|
|
125
|
+
text: string;
|
|
126
|
+
};
|
|
127
|
+
/**
|
|
128
|
+
* Warning colors
|
|
129
|
+
* Indicate caution, warnings, and important information requiring attention
|
|
130
|
+
*/
|
|
131
|
+
warning: {
|
|
132
|
+
/** Main warning color */
|
|
133
|
+
main: string;
|
|
134
|
+
bg: string;
|
|
135
|
+
border: string;
|
|
136
|
+
text: string;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Info colors
|
|
140
|
+
* For informational messages and neutral call-outs
|
|
141
|
+
*/
|
|
142
|
+
info: {
|
|
143
|
+
main: string;
|
|
144
|
+
bg: string;
|
|
145
|
+
border: string;
|
|
146
|
+
text: string;
|
|
147
|
+
};
|
|
148
|
+
/**
|
|
149
|
+
* Surface colors
|
|
150
|
+
* Backgrounds and containers throughout the application
|
|
151
|
+
*/
|
|
152
|
+
surface: {
|
|
153
|
+
/** Main page background */
|
|
154
|
+
background: string;
|
|
155
|
+
/** Default surface/container background (cards, panels) */
|
|
156
|
+
main: string;
|
|
157
|
+
/** Elevated surfaces (modals, popovers) - typically with shadow */
|
|
158
|
+
elevated: string;
|
|
159
|
+
/** Hover state for interactive surfaces */
|
|
160
|
+
hover: string;
|
|
161
|
+
/** Very subtle background for nested content */
|
|
162
|
+
subtle: string;
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* Text colors
|
|
166
|
+
* For all text content with varying emphasis levels
|
|
167
|
+
*/
|
|
168
|
+
text: {
|
|
169
|
+
/** Primary text - body copy, headings */
|
|
170
|
+
primary: string;
|
|
171
|
+
/** Secondary text - supporting information, labels */
|
|
172
|
+
secondary: string;
|
|
173
|
+
/** Tertiary text - de-emphasized content, helper text */
|
|
174
|
+
tertiary: string;
|
|
175
|
+
/** Quaternary text - least emphasis, subtle information */
|
|
176
|
+
quaternary: string;
|
|
177
|
+
/** Disabled text state */
|
|
178
|
+
disabled: string;
|
|
179
|
+
/** Text on dark backgrounds */
|
|
180
|
+
inverse: string;
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Border colors
|
|
184
|
+
* For separators, outlines, and component boundaries
|
|
185
|
+
*/
|
|
186
|
+
border: {
|
|
187
|
+
/** Default border color */
|
|
188
|
+
main: string;
|
|
189
|
+
/** Lighter border for subtle separation */
|
|
190
|
+
light: string;
|
|
191
|
+
/** Stronger border for emphasis */
|
|
192
|
+
strong: string;
|
|
193
|
+
/** Dividing lines between sections */
|
|
194
|
+
divider: string;
|
|
195
|
+
};
|
|
196
|
+
/**
|
|
197
|
+
* Component-specific colors
|
|
198
|
+
* Pre-defined color combinations for common components
|
|
199
|
+
*/
|
|
200
|
+
components: {
|
|
201
|
+
/** Button color tokens */
|
|
202
|
+
button: {
|
|
203
|
+
primary: {
|
|
204
|
+
bg: string;
|
|
205
|
+
hover: string;
|
|
206
|
+
text: string;
|
|
207
|
+
};
|
|
208
|
+
default: {
|
|
209
|
+
bg: string;
|
|
210
|
+
border: string;
|
|
211
|
+
text: string;
|
|
212
|
+
hover: string;
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
/** Form input color tokens */
|
|
216
|
+
input: {
|
|
217
|
+
bg: string;
|
|
218
|
+
border: string;
|
|
219
|
+
borderHover: string;
|
|
220
|
+
borderFocus: string;
|
|
221
|
+
placeholder: string;
|
|
222
|
+
};
|
|
223
|
+
/** Table color tokens */
|
|
224
|
+
table: {
|
|
225
|
+
bg: string;
|
|
226
|
+
headerBg: string;
|
|
227
|
+
headerText: string;
|
|
228
|
+
border: string;
|
|
229
|
+
rowHover: string;
|
|
230
|
+
};
|
|
231
|
+
/** Navigation sidebar tokens */
|
|
232
|
+
sidebar: {
|
|
233
|
+
/** Dark sidebar background */
|
|
234
|
+
bg: string;
|
|
235
|
+
hover: string;
|
|
236
|
+
selected: string;
|
|
237
|
+
text: string;
|
|
238
|
+
textSecondary: string;
|
|
239
|
+
};
|
|
240
|
+
};
|
|
241
|
+
/**
|
|
242
|
+
* Utility colors
|
|
243
|
+
* Special purpose color values
|
|
244
|
+
*/
|
|
245
|
+
utility: {
|
|
246
|
+
transparent: string;
|
|
247
|
+
/** Link color (often aliases action.main) */
|
|
248
|
+
link: string;
|
|
249
|
+
linkHover: string;
|
|
250
|
+
linkActive: string;
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* Partial color overrides
|
|
255
|
+
* Allows deep partial overrides for theming
|
|
256
|
+
*/
|
|
257
|
+
export type TemboColorOverrides = DeepPartial<TemboColorPalette>;
|
|
258
|
+
/**
|
|
259
|
+
* Theme mode
|
|
260
|
+
*/
|
|
261
|
+
export type ThemeMode = 'light' | 'dark';
|
|
262
|
+
/**
|
|
263
|
+
* Default color palette for light theme
|
|
264
|
+
*/
|
|
265
|
+
export declare const defaultColorPalette: TemboColorPalette;
|
|
266
|
+
/**
|
|
267
|
+
* Build a complete color palette by merging overrides with defaults
|
|
268
|
+
* Performs deep merge to allow partial nested overrides
|
|
269
|
+
*
|
|
270
|
+
* @param overrides - Partial color palette overrides
|
|
271
|
+
* @param mode - Theme mode ('light' or 'dark')
|
|
272
|
+
* @returns Complete color palette with overrides applied
|
|
273
|
+
*/
|
|
274
|
+
export declare const buildColorPalette: (overrides?: TemboColorOverrides, mode?: ThemeMode) => TemboColorPalette;
|
|
275
|
+
type DeepPartial<T> = {
|
|
276
|
+
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
277
|
+
};
|
|
278
|
+
export {};
|