@temboplus/frontend-react-core 0.1.3-beta.3 → 0.1.3-beta.31
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/CloseCircleOutlined-CMilRURi.js +3 -0
- package/dist/CloseCircleOutlined-CMilRURi.js.map +1 -0
- package/dist/CloseCircleOutlined-CSHx89Jn.js +3 -0
- package/dist/CloseCircleOutlined-CSHx89Jn.js.map +1 -0
- package/dist/InfoCircleOutlined-DR9DmuN-.js +5 -0
- package/dist/InfoCircleOutlined-DR9DmuN-.js.map +1 -0
- package/dist/InfoCircleOutlined-Hx86sClq.js +5 -0
- package/dist/InfoCircleOutlined-Hx86sClq.js.map +1 -0
- package/dist/alerts/index.cjs.js +1 -1
- package/dist/alerts/index.cjs.js.map +1 -1
- package/dist/alerts/index.js +1 -1
- package/dist/alerts/index.js.map +1 -1
- package/dist/dialogs/index.cjs.js +3 -1
- package/dist/dialogs/index.cjs.js.map +1 -1
- package/dist/dialogs/index.js +3 -1
- package/dist/dialogs/index.js.map +1 -1
- package/dist/features/alerts/alert.js +18 -18
- package/dist/features/dialogs/tembo-confirm.js +28 -19
- package/dist/features/notifications/tembo-notify.d.ts +32 -105
- package/dist/features/notifications/tembo-notify.js +102 -111
- package/dist/features/notifications/toast-config.d.ts +4 -6
- package/dist/features/notifications/toast-config.js +28 -21
- package/dist/features/notifications/toast-container.d.ts +13 -3
- package/dist/features/notifications/toast-container.js +80 -9
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/notifications/index.cjs.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/providers.d.ts +2 -32
- package/dist/providers.js +3 -24
- package/dist/tembo-notify-C2pwp3tl.js +3 -0
- package/dist/tembo-notify-C2pwp3tl.js.map +1 -0
- package/dist/tembo-notify-vrLE3jqe.js +3 -0
- package/dist/tembo-notify-vrLE3jqe.js.map +1 -0
- package/dist/theme/deprecated/theme-provider.d.ts +100 -0
- package/dist/theme/deprecated/theme-provider.js +405 -0
- package/dist/theme/index.cjs.js +1 -1
- package/dist/theme/index.d.ts +3 -2
- package/dist/theme/index.js +1 -1
- package/dist/theme/theme-config.d.ts +15 -0
- package/dist/theme/theme-config.js +735 -0
- package/dist/theme/theme-provider.d.ts +11 -81
- package/dist/theme/theme-provider.js +20 -392
- package/dist/theme/tokens/colors.d.ts +153 -0
- package/dist/theme/tokens/colors.js +306 -0
- package/dist/theme/tokens/constants.d.ts +136 -0
- package/dist/theme/tokens/constants.js +137 -0
- package/dist/theme-provider-XqWasApp.js +11 -0
- package/dist/theme-provider-XqWasApp.js.map +1 -0
- package/dist/theme-provider-c4R_KW4X.js +2 -0
- package/dist/theme-provider-c4R_KW4X.js.map +1 -0
- package/dist/theme-provider-slJZwhTc.js +11 -0
- package/dist/theme-provider-slJZwhTc.js.map +1 -0
- package/dist/theme-provider-slTbQLX5.js +2 -0
- package/dist/theme-provider-slTbQLX5.js.map +1 -0
- package/dist/validation/index.cjs.js.map +1 -1
- package/dist/validation/index.js.map +1 -1
- package/package.json +22 -21
- package/dist/InfoCircleOutlined-B7d2aRfV.js +0 -7
- package/dist/InfoCircleOutlined-B7d2aRfV.js.map +0 -1
- package/dist/InfoCircleOutlined-DYs90hdV.js +0 -7
- package/dist/InfoCircleOutlined-DYs90hdV.js.map +0 -1
- package/dist/ZoomOutOutlined-BL6A5RSq.js +0 -2
- package/dist/ZoomOutOutlined-BL6A5RSq.js.map +0 -1
- package/dist/ZoomOutOutlined-BY_CCwq7.js +0 -2
- package/dist/ZoomOutOutlined-BY_CCwq7.js.map +0 -1
- package/dist/tembo-notify-B-mUpU8q.js +0 -2
- package/dist/tembo-notify-B-mUpU8q.js.map +0 -1
- package/dist/tembo-notify-C4_8DSSc.js +0 -2
- package/dist/tembo-notify-C4_8DSSc.js.map +0 -1
- package/dist/theme-provider-Ca4P0Hcp.js +0 -11
- package/dist/theme-provider-Ca4P0Hcp.js.map +0 -1
- package/dist/theme-provider-RhAw3jw_.js +0 -11
- package/dist/theme-provider-RhAw3jw_.js.map +0 -1
- /package/dist/theme/{colors.d.ts → deprecated/colors.d.ts} +0 -0
- /package/dist/theme/{colors.js → deprecated/colors.js} +0 -0
- /package/dist/theme/{constants.d.ts → deprecated/constants.d.ts} +0 -0
- /package/dist/theme/{constants.js → deprecated/constants.js} +0 -0
|
@@ -1,18 +1,89 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useEffect } from 'react';
|
|
3
|
-
import { ToastContainer } from 'react-toastify';
|
|
4
|
-
import { useTemboTheme } from '../../theme/index.js';
|
|
4
|
+
import { ToastContainer, } from 'react-toastify';
|
|
5
5
|
import { TemboNotify } from './tembo-notify.js';
|
|
6
|
+
import { useNewTemboTheme } from '../../theme/theme-provider.js';
|
|
6
7
|
/**
|
|
7
|
-
* Toast container
|
|
8
|
-
* Reinitializes when theme changes to respect color/constant overrides
|
|
8
|
+
* Toast container with Tembo styling
|
|
9
9
|
*/
|
|
10
|
-
const TemboToastContainer = (
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
const TemboToastContainer = (_a) => {
|
|
11
|
+
var { showCloseButton = false, showProgressBar = false } = _a, rest = __rest(_a, ["showCloseButton", "showProgressBar"]);
|
|
12
|
+
const { colors, constants } = useNewTemboTheme();
|
|
13
13
|
useEffect(() => {
|
|
14
14
|
TemboNotify.init(colors, constants);
|
|
15
15
|
}, [colors, constants]);
|
|
16
|
-
return _jsx(ToastContainer, Object.assign({},
|
|
16
|
+
return (_jsxs(_Fragment, { children: [_jsx(ToastContainer, Object.assign({ closeButton: showCloseButton, hideProgressBar: !showProgressBar }, rest)), _jsx("style", { children: `
|
|
17
|
+
.Toastify__toast {
|
|
18
|
+
font-family: ${constants.typography.fontFamily};
|
|
19
|
+
line-height: 1.5;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center; /* center icon + content */
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.Toastify__toast-body {
|
|
25
|
+
padding: 0;
|
|
26
|
+
margin: 0;
|
|
27
|
+
display: flex;
|
|
28
|
+
align-items: flex-start;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.Toastify__toast-icon {
|
|
32
|
+
width: 18px;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
margin-inline-end: 6px; /* tighter spacing */
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.Toastify__progress-bar {
|
|
40
|
+
display: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.Toastify__close-button {
|
|
44
|
+
opacity: 0.5;
|
|
45
|
+
transition: opacity 0.2s ease;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.Toastify__close-button:hover {
|
|
49
|
+
opacity: 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Force progress bar hidden in case someone enables it unintentionally */
|
|
53
|
+
.Toastify__progress-bar {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* Smooth entrance animation */
|
|
58
|
+
@keyframes toastSlideIn {
|
|
59
|
+
from {
|
|
60
|
+
transform: translateX(110%);
|
|
61
|
+
opacity: 0;
|
|
62
|
+
}
|
|
63
|
+
to {
|
|
64
|
+
transform: translateX(0);
|
|
65
|
+
opacity: 1;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.Toastify__toast--top-right {
|
|
70
|
+
animation: toastSlideIn 0.3s ease-out;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/* Optional: full-width mobile behaviour */
|
|
74
|
+
@media (max-width: 480px) {
|
|
75
|
+
.Toastify__toast-container--top-right {
|
|
76
|
+
right: 0;
|
|
77
|
+
left: 0;
|
|
78
|
+
padding: 0;
|
|
79
|
+
width: 100vw;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.Toastify__toast {
|
|
83
|
+
margin-bottom: 0;
|
|
84
|
+
border-radius: 0;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
` })] }));
|
|
17
88
|
};
|
|
18
89
|
export default TemboToastContainer;
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var n=require("./theme-provider-XqWasApp.js"),e=require("@ebay/nice-modal-react"),t=require("tslib"),s=require("react"),i=require("react-toastify"),o=require("./tembo-notify-C2pwp3tl.js");function r(n){return n&&n.__esModule?n:{default:n}}require("antd"),require("./InfoCircleOutlined-DR9DmuN-.js"),require("./CloseCircleOutlined-CMilRURi.js");var a=r(e);const l=e=>n.jsxRuntimeExports.jsx(a.default.Provider,{children:e.children}),d=e=>{var{showCloseButton:r=!1,showProgressBar:a=!1}=e,l=t.__rest(e,["showCloseButton","showProgressBar"]);const{colors:d,constants:c}=n.useNewTemboTheme();return s.useEffect(()=>{o.TemboNotify.init(d,c)},[d,c]),n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(i.ToastContainer,Object.assign({closeButton:r,hideProgressBar:!a},l)),n.jsxRuntimeExports.jsx("style",{children:`\n .Toastify__toast {\n font-family: ${c.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:e,mode:t,antdThemeOverrides:s})=>n.jsxRuntimeExports.jsx(n.TemboThemeProvider,{mode:t,antdThemeOverrides:s,children:n.jsxRuntimeExports.jsxs(l,{children:[e,n.jsxRuntimeExports.jsx(d,{})]})});
|
|
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/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","
|
|
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","useNewTemboTheme","useEffect","TemboNotify","init","_jsxs","_Fragment","ToastContainer","Object","assign","closeButton","hideProgressBar","typography","fontFamily","mode","antdThemeOverrides","TemboThemeProvider"],"mappings":"gXAGA,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,qBAM9B,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,ovECtCW,EAC/DrB,WACAsB,OACAC,wBAGI1B,EAAAA,kBAAAA,IAAC2B,EAAAA,mBAAkB,CACfF,KAAMA,EACNC,mBAAoBA,WAEpBV,EAAAA,kBAAAA,KAAClB,EAAkB,CAAAK,SAAA,CACdA,EACDH,EAAAA,kBAAAA,IAACI,EAAmB"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as
|
|
1
|
+
import{j as n,u as t,T as o}from"./theme-provider-slJZwhTc.js";import e from"@ebay/nice-modal-react";import{__rest as i}from"tslib";import{useEffect as s}from"react";import{ToastContainer as r}from"react-toastify";import{T as a}from"./tembo-notify-vrLE3jqe.js";import"antd";import"./InfoCircleOutlined-Hx86sClq.js";import"./CloseCircleOutlined-CSHx89Jn.js";const l=t=>n.jsx(e.Provider,{children:t.children}),m=o=>{var{showCloseButton:e=!1,showProgressBar:l=!1}=o,m=i(o,["showCloseButton","showProgressBar"]);const{colors:d,constants:c}=t();return s(()=>{a.init(d,c)},[d,c]),n.jsxs(n.Fragment,{children:[n.jsx(r,Object.assign({closeButton:e,hideProgressBar:!l},m)),n.jsx("style",{children:`\n .Toastify__toast {\n font-family: ${c.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 `})]})},d=({children:t,mode:e,antdThemeOverrides:i})=>n.jsx(o,{mode:e,antdThemeOverrides:i,children:n.jsxs(l,{children:[t,n.jsx(m,{})]})});export{d 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/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","
|
|
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","useNewTemboTheme","useEffect","TemboNotify","init","_jsxs","_Fragment","ToastContainer","Object","assign","closeButton","hideProgressBar","typography","fontFamily","TemboUIProviders","mode","antdThemeOverrides","TemboThemeProvider"],"mappings":"qWAGA,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,2tECtC3CC,EAAsD,EAC/DtB,WACAuB,OACAC,wBAGI3B,EAAAA,IAAC4B,EAAkB,CACfF,KAAMA,EACNC,mBAAoBA,WAEpBX,EAAAA,KAAClB,EAAkB,CAAAK,SAAA,CACdA,EACDH,EAAAA,IAACI,EAAmB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("../tembo-notify-
|
|
1
|
+
"use strict";var e=require("../tembo-notify-C2pwp3tl.js");require("tslib"),require("../theme-provider-XqWasApp.js"),require("react"),require("react-toastify"),require("../InfoCircleOutlined-DR9DmuN-.js"),require("../CloseCircleOutlined-CMilRURi.js"),require("antd"),exports.TemboNotify=e.TemboNotify,exports.buildToastConfigs=e.buildToastConfigs;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{T as TemboNotify,b as buildToastConfigs}from"../tembo-notify-
|
|
1
|
+
export{T as TemboNotify,b as buildToastConfigs}from"../tembo-notify-vrLE3jqe.js";import"tslib";import"../theme-provider-slJZwhTc.js";import"react";import"react-toastify";import"../InfoCircleOutlined-Hx86sClq.js";import"../CloseCircleOutlined-CSHx89Jn.js";import"antd";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/providers.d.ts
CHANGED
|
@@ -1,37 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TemboThemeProviderProps } from './theme/
|
|
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
|
-
}
|
|
2
|
+
import { TemboThemeProviderProps } from './theme/theme-provider.js';
|
|
12
3
|
/**
|
|
13
4
|
* Top-level provider that wires up theme, modal and notifications
|
|
14
5
|
* 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
6
|
*/
|
|
37
|
-
export declare const TemboUIProviders: React.FC<
|
|
7
|
+
export declare const TemboUIProviders: React.FC<TemboThemeProviderProps>;
|
package/dist/providers.js
CHANGED
|
@@ -1,32 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import TemboModalProvider from './features/dialogs/modal-provider.js';
|
|
3
3
|
import TemboToastContainer from './features/notifications/toast-container.js';
|
|
4
|
-
import { TemboThemeProvider } from './theme/
|
|
4
|
+
import { TemboThemeProvider } from './theme/theme-provider.js';
|
|
5
5
|
/**
|
|
6
6
|
* Top-level provider that wires up theme, modal and notifications
|
|
7
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
8
|
*/
|
|
30
|
-
export const TemboUIProviders = ({ children,
|
|
31
|
-
return (_jsx(TemboThemeProvider, {
|
|
9
|
+
export const TemboUIProviders = ({ children, mode, antdThemeOverrides }) => {
|
|
10
|
+
return (_jsx(TemboThemeProvider, { mode: mode, antdThemeOverrides: antdThemeOverrides, children: _jsxs(TemboModalProvider, { children: [children, _jsx(TemboToastContainer, {})] }) }));
|
|
32
11
|
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";var t=require("tslib"),s=require("./theme-provider-XqWasApp.js"),i=require("react-toastify"),o=require("./InfoCircleOutlined-DR9DmuN-.js"),e=require("./CloseCircleOutlined-CMilRURi.js");function n(t){if(t&&t.__esModule)return t;var s=Object.create(null);return t&&Object.keys(t).forEach(function(i){if("default"!==i){var o=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(s,i,o.get?o:{enumerable:!0,get:function(){return t[i]}})}}),s.default=t,Object.freeze(s)}var r=n(require("react")),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function l(){return l=Object.assign?Object.assign.bind():function(t){for(var s=1;s<arguments.length;s++){var i=arguments[s];for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])}return t},l.apply(this,arguments)}const c=(t,s)=>r.createElement(o.Icon,l({},t,{ref:s,icon:a})),g=r.forwardRef(c);
|
|
2
|
+
/** */"production"!==process.env.NODE_ENV&&(g.displayName="LoadingOutlined");const u=(t,i)=>{const n={position:"top-right",autoClose:4e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,closeButton:!1,style:{fontFamily:i.typography.fontFamily.base,fontSize:14,borderRadius:10,padding:"10px 14px",boxShadow:"0 12px 24px rgba(15, 23, 42, 0.12)",border:"none",minHeight:56,backgroundColor:t.surface.overlay,color:t.text.primary,display:"flex",alignItems:"center",gap:8}},r=Object.assign(Object.assign({},n),{icon:s.jsxRuntimeExports.jsx(o.RefIcon$2,{style:{fontSize:18,color:t.semantic.success.main}}),className:"toast-success"}),a=Object.assign(Object.assign({},n),{icon:s.jsxRuntimeExports.jsx(e.RefIcon,{style:{fontSize:18,color:t.semantic.error.main}}),className:"toast-error"}),l=Object.assign(Object.assign({},n),{icon:s.jsxRuntimeExports.jsx(o.RefIcon$1,{style:{fontSize:18,color:t.semantic.warning.main}}),className:"toast-warning"}),c=Object.assign(Object.assign({},n),{icon:s.jsxRuntimeExports.jsx(o.RefIcon,{style:{fontSize:18,color:t.semantic.info.main}}),className:"toast-info"});return{loadingConfig:Object.assign(Object.assign({},n),{icon:s.jsxRuntimeExports.jsx(g,{style:{fontSize:18,color:t.neutral[4]}}),autoClose:!1,closeButton:!1,hideProgressBar:!0,className:"toast-loading"}),infoConfig:c,warningConfig:l,errorConfig:a,successConfig:r,baseConfig:n,colors:t}},f={position:"top-right",autoClose:4e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,closeButton:!1};class d{static init(t,s){this.configs=u(t,s)}static getConfigs(){return this.configs}static formatMessage(t){if(t&&"object"==typeof t&&!("$$typeof"in t)){const i=!!t.title,o=!!t.description;return i&&o?s.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[s.jsxRuntimeExports.jsx("div",{style:{fontWeight:500,fontSize:14},children:t.title}),s.jsxRuntimeExports.jsx("div",{style:{fontSize:13,fontWeight:400,opacity:.96},children:t.description})]}):i&&!o?s.jsxRuntimeExports.jsx("div",{style:{fontWeight:500,fontSize:14},children:t.title}):!i&&o?s.jsxRuntimeExports.jsx("div",{style:{fontSize:13,fontWeight:500},children:t.description}):""}return t}static buildOptions(s,i){const o=i||{},{duration:e,toastId:n,onClick:r,onClose:a}=o,l=t.__rest(o,["duration","toastId","onClick","onClose"]),c=null!=s?s:f;return Object.assign(Object.assign(Object.assign({},c),l),{toastId:n,autoClose:void 0!==e?e||!1:c.autoClose,onClick:r,onClose:a})}static getSuccessConfig(){var t,s;const i=this.getConfigs();return null!==(s=null!==(t=null==i?void 0:i.successConfig)&&void 0!==t?t:null==i?void 0:i.baseConfig)&&void 0!==s?s:void 0}static getErrorConfig(){var t,s;const i=this.getConfigs();return null!==(s=null!==(t=null==i?void 0:i.errorConfig)&&void 0!==t?t:null==i?void 0:i.baseConfig)&&void 0!==s?s:void 0}static getWarningConfig(){var t,s;const i=this.getConfigs();return null!==(s=null!==(t=null==i?void 0:i.warningConfig)&&void 0!==t?t:null==i?void 0:i.baseConfig)&&void 0!==s?s:void 0}static getInfoConfig(){var t,s;const i=this.getConfigs();return null!==(s=null!==(t=null==i?void 0:i.infoConfig)&&void 0!==t?t:null==i?void 0:i.baseConfig)&&void 0!==s?s:void 0}static getLoadingConfig(){var t,s;const i=this.getConfigs();return null!==(s=null!==(t=null==i?void 0:i.loadingConfig)&&void 0!==t?t:null==i?void 0:i.baseConfig)&&void 0!==s?s:void 0}static success(t,s){const o=this.formatMessage(t),e=this.buildOptions(this.getSuccessConfig(),s);return i.toast.success(o,e)}static error(t,s){const o=this.formatMessage(t),e=this.buildOptions(this.getErrorConfig(),s);return i.toast.error(o,e)}static warning(t,s){const o=this.formatMessage(t),e=this.buildOptions(this.getWarningConfig(),s);return i.toast.warning(o,e)}static info(t,s){const o=this.formatMessage(t),e=this.buildOptions(this.getInfoConfig(),s);return i.toast.info(o,e)}static loading(s,o){var e;const n=this.formatMessage(s),r=o||{},{toastId:a,onClick:l,onClose:c}=r,g=t.__rest(r,["toastId","onClick","onClose"]),u=null!==(e=this.getLoadingConfig())&&void 0!==e?e:f;return i.toast.loading(n,Object.assign(Object.assign(Object.assign({},u),g),{toastId:a,onClick:l,onClose:c}))}static update(t,s){var o,e;const n=this.getConfigs(),r=s.type&&n?{success:n.successConfig,error:n.errorConfig,warning:n.warningConfig,info:n.infoConfig}[s.type]:void 0,a=s.message?this.formatMessage(s.message):s.render;i.toast.update(t,Object.assign({render:a,type:s.type,isLoading:!1,autoClose:null!==(e=null!==(o=s.autoClose)&&void 0!==o?o:null==r?void 0:r.autoClose)&&void 0!==e?e:f.autoClose},null!=r?r:{}))}static dismiss(t){i.toast.dismiss(t)}static dismissAll(){i.toast.dismiss()}static isActive(t){return i.toast.isActive(t)}}d.configs=null,exports.TemboNotify=d,exports.buildToastConfigs=u;
|
|
3
|
+
//# sourceMappingURL=tembo-notify-C2pwp3tl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tembo-notify-C2pwp3tl.js","sources":["../node_modules/@ant-design/icons-svg/es/asn/LoadingOutlined.js","../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js","../src/features/notifications/toast-config.tsx","../src/features/notifications/tembo-notify.tsx"],"sourcesContent":["// This icon file is generated automatically.\nvar LoadingOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"0 0 1024 1024\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z\" } }] }, \"name\": \"loading\", \"theme\": \"outlined\" };\nexport default LoadingOutlined;\n","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport LoadingOutlinedSvg from \"@ant-design/icons-svg/es/asn/LoadingOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst LoadingOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: LoadingOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(LoadingOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'LoadingOutlined';\n}\nexport default RefIcon;",null,null],"names":["LoadingOutlined","icon","tag","attrs","viewBox","focusable","children","d","name","theme","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","props","ref","React","createElement","AntdIcon","LoadingOutlinedSvg","RefIcon","forwardRef","process","env","NODE_ENV","displayName","buildToastConfigs","colors","constants","baseConfig","position","autoClose","hideProgressBar","closeOnClick","pauseOnHover","draggable","closeButton","style","fontFamily","typography","base","fontSize","borderRadius","padding","boxShadow","border","minHeight","backgroundColor","surface","overlay","color","text","primary","display","alignItems","gap","successConfig","_jsx","CheckCircleOutlined","semantic","success","main","className","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","neutral","FALLBACK_BASE_CONFIG","TemboNotify","init","configs","getConfigs","formatMessage","message","hasTitle","title","hasDescription","description","_jsxs","flexDirection","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":"8fACIA,EAAkB,CAAEC,KAAQ,CAAEC,IAAO,MAAOC,MAAS,CAAEC,QAAW,gBAAiBC,UAAa,SAAWC,SAAY,CAAC,CAAEJ,IAAO,OAAQC,MAAS,CAAEI,EAAK,kUAAsUC,KAAQ,UAAWC,MAAS,YCD/f,SAASC,IAAiS,OAApRA,EAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,EAAcP,OAAOS,UAAUC,eAAeC,KAAKJ,EAAQC,KAAQL,E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,cACjBS,MAAOY,EAAQd,YACfK,QAASS,EAAQX,cACjBK,KAAMM,EAAQR,YAChBqB,EAAQuB,WACRd,EAEJO,EAAUhB,EAAQV,QAClBnE,KAAKkE,cAAcW,EAAQV,SAC3BU,EAAQwB,OAEdN,QAAME,OAAOC,iBACTG,OAAQR,EACRO,KAAMvB,EAAQuB,KACdE,WAAW,EACXpF,UAEyB,QADrBsE,EAAiB,QAAjBV,EAAAD,EAAQ3D,iBAAS,IAAA4D,EAAAA,EACjBqB,eAAAA,EAAYjF,iBAAS,IAAAsE,EAAAA,EACrB3B,EAAqB3C,WACrBiF,QAAAA,EAAc,CAAA,GAE1B,CAEA,cAAOI,CAAQL,GACXH,EAAAA,MAAMQ,QAAQL,EAClB,CAEA,iBAAOM,GACHT,EAAAA,MAAMQ,SACV,CAEA,eAAOE,CAASP,GACZ,OAAOH,EAAAA,MAAMU,SAASP,EAC1B,EAxLepC,EAAAE,QAA+B","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{__rest as s}from"tslib";import{j as i}from"./theme-provider-slJZwhTc.js";import{toast as t}from"react-toastify";import{I as o,b as n,a as e,R as a}from"./InfoCircleOutlined-Hx86sClq.js";import{R as r}from"./CloseCircleOutlined-CSHx89Jn.js";import*as l from"react";var c={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function g(){return g=Object.assign?Object.assign.bind():function(s){for(var i=1;i<arguments.length;i++){var t=arguments[i];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(s[o]=t[o])}return s},g.apply(this,arguments)}const d=(s,i)=>l.createElement(o,g({},s,{ref:i,icon:c})),f=l.forwardRef(d);
|
|
2
|
+
/** */"production"!==process.env.NODE_ENV&&(f.displayName="LoadingOutlined");const u=(s,t)=>{const o={position:"top-right",autoClose:4e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,closeButton:!1,style:{fontFamily:t.typography.fontFamily.base,fontSize:14,borderRadius:10,padding:"10px 14px",boxShadow:"0 12px 24px rgba(15, 23, 42, 0.12)",border:"none",minHeight:56,backgroundColor:s.surface.overlay,color:s.text.primary,display:"flex",alignItems:"center",gap:8}},l=Object.assign(Object.assign({},o),{icon:i.jsx(n,{style:{fontSize:18,color:s.semantic.success.main}}),className:"toast-success"}),c=Object.assign(Object.assign({},o),{icon:i.jsx(r,{style:{fontSize:18,color:s.semantic.error.main}}),className:"toast-error"}),g=Object.assign(Object.assign({},o),{icon:i.jsx(e,{style:{fontSize:18,color:s.semantic.warning.main}}),className:"toast-warning"}),d=Object.assign(Object.assign({},o),{icon:i.jsx(a,{style:{fontSize:18,color:s.semantic.info.main}}),className:"toast-info"});return{loadingConfig:Object.assign(Object.assign({},o),{icon:i.jsx(f,{style:{fontSize:18,color:s.neutral[4]}}),autoClose:!1,closeButton:!1,hideProgressBar:!0,className:"toast-loading"}),infoConfig:d,warningConfig:g,errorConfig:c,successConfig:l,baseConfig:o,colors:s}},C={position:"top-right",autoClose:4e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,closeButton:!1};class v{static init(s,i){this.configs=u(s,i)}static getConfigs(){return this.configs}static formatMessage(s){if(s&&"object"==typeof s&&!("$$typeof"in s)){const t=!!s.title,o=!!s.description;return t&&o?i.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[i.jsx("div",{style:{fontWeight:500,fontSize:14},children:s.title}),i.jsx("div",{style:{fontSize:13,fontWeight:400,opacity:.96},children:s.description})]}):t&&!o?i.jsx("div",{style:{fontWeight:500,fontSize:14},children:s.title}):!t&&o?i.jsx("div",{style:{fontSize:13,fontWeight:500},children:s.description}):""}return s}static buildOptions(i,t){const o=t||{},{duration:n,toastId:e,onClick:a,onClose:r}=o,l=s(o,["duration","toastId","onClick","onClose"]),c=null!=i?i:C;return Object.assign(Object.assign(Object.assign({},c),l),{toastId:e,autoClose:void 0!==n?n||!1:c.autoClose,onClick:a,onClose:r})}static getSuccessConfig(){var s,i;const t=this.getConfigs();return null!==(i=null!==(s=null==t?void 0:t.successConfig)&&void 0!==s?s:null==t?void 0:t.baseConfig)&&void 0!==i?i:void 0}static getErrorConfig(){var s,i;const t=this.getConfigs();return null!==(i=null!==(s=null==t?void 0:t.errorConfig)&&void 0!==s?s:null==t?void 0:t.baseConfig)&&void 0!==i?i:void 0}static getWarningConfig(){var s,i;const t=this.getConfigs();return null!==(i=null!==(s=null==t?void 0:t.warningConfig)&&void 0!==s?s:null==t?void 0:t.baseConfig)&&void 0!==i?i:void 0}static getInfoConfig(){var s,i;const t=this.getConfigs();return null!==(i=null!==(s=null==t?void 0:t.infoConfig)&&void 0!==s?s:null==t?void 0:t.baseConfig)&&void 0!==i?i:void 0}static getLoadingConfig(){var s,i;const t=this.getConfigs();return null!==(i=null!==(s=null==t?void 0:t.loadingConfig)&&void 0!==s?s:null==t?void 0:t.baseConfig)&&void 0!==i?i:void 0}static success(s,i){const o=this.formatMessage(s),n=this.buildOptions(this.getSuccessConfig(),i);return t.success(o,n)}static error(s,i){const o=this.formatMessage(s),n=this.buildOptions(this.getErrorConfig(),i);return t.error(o,n)}static warning(s,i){const o=this.formatMessage(s),n=this.buildOptions(this.getWarningConfig(),i);return t.warning(o,n)}static info(s,i){const o=this.formatMessage(s),n=this.buildOptions(this.getInfoConfig(),i);return t.info(o,n)}static loading(i,o){var n;const e=this.formatMessage(i),a=o||{},{toastId:r,onClick:l,onClose:c}=a,g=s(a,["toastId","onClick","onClose"]),d=null!==(n=this.getLoadingConfig())&&void 0!==n?n:C;return t.loading(e,Object.assign(Object.assign(Object.assign({},d),g),{toastId:r,onClick:l,onClose:c}))}static update(s,i){var o,n;const e=this.getConfigs(),a=i.type&&e?{success:e.successConfig,error:e.errorConfig,warning:e.warningConfig,info:e.infoConfig}[i.type]:void 0,r=i.message?this.formatMessage(i.message):i.render;t.update(s,Object.assign({render:r,type:i.type,isLoading:!1,autoClose:null!==(n=null!==(o=i.autoClose)&&void 0!==o?o: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)}}v.configs=null;export{v as T,u as b};
|
|
3
|
+
//# sourceMappingURL=tembo-notify-vrLE3jqe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tembo-notify-vrLE3jqe.js","sources":["../node_modules/@ant-design/icons-svg/es/asn/LoadingOutlined.js","../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js","../src/features/notifications/toast-config.tsx","../src/features/notifications/tembo-notify.tsx"],"sourcesContent":["// This icon file is generated automatically.\nvar LoadingOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"0 0 1024 1024\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z\" } }] }, \"name\": \"loading\", \"theme\": \"outlined\" };\nexport default LoadingOutlined;\n","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport LoadingOutlinedSvg from \"@ant-design/icons-svg/es/asn/LoadingOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst LoadingOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: LoadingOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(LoadingOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'LoadingOutlined';\n}\nexport default RefIcon;",null,null],"names":["LoadingOutlined","icon","tag","attrs","viewBox","focusable","children","d","name","theme","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","props","ref","React","createElement","AntdIcon","LoadingOutlinedSvg","RefIcon","forwardRef","process","env","NODE_ENV","displayName","buildToastConfigs","colors","constants","baseConfig","position","autoClose","hideProgressBar","closeOnClick","pauseOnHover","draggable","closeButton","style","fontFamily","typography","base","fontSize","borderRadius","padding","boxShadow","border","minHeight","backgroundColor","surface","overlay","color","text","primary","display","alignItems","gap","successConfig","_jsx","CheckCircleOutlined","semantic","success","main","className","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","neutral","FALLBACK_BASE_CONFIG","TemboNotify","init","configs","getConfigs","formatMessage","message","hasTitle","title","hasDescription","description","_jsxs","flexDirection","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":"+QACA,IAAIA,EAAkB,CAAEC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,EAAoC,QAAvB8D,EAAA9E,KAAK4F,0BAAkB,IAAAd,EAAAA,EAAIjB,EAE9C,OAAOkC,EAAMC,QAAQH,+CACd7E,GACAmE,GAAW,CACdH,UACAC,UACAC,YAER,CAEA,aAAOe,CAAOC,EAAQrB,WAMlB,MAAMb,EAAUhE,KAAKiE,aAEfkC,EACFtB,EAAQuB,MAAQpC,EACV,CACEjB,QAASiB,EAAQrB,cACjBS,MAAOY,EAAQd,YACfK,QAASS,EAAQX,cACjBK,KAAMM,EAAQR,YAChBqB,EAAQuB,WACRd,EAEJO,EAAUhB,EAAQV,QAClBnE,KAAKkE,cAAcW,EAAQV,SAC3BU,EAAQwB,OAEdN,EAAME,OAAOC,iBACTG,OAAQR,EACRO,KAAMvB,EAAQuB,KACdE,WAAW,EACXpF,UAEyB,QADrBsE,EAAiB,QAAjBV,EAAAD,EAAQ3D,iBAAS,IAAA4D,EAAAA,EACjBqB,eAAAA,EAAYjF,iBAAS,IAAAsE,EAAAA,EACrB3B,EAAqB3C,WACrBiF,QAAAA,EAAc,CAAA,GAE1B,CAEA,cAAOI,CAAQL,GACXH,EAAMQ,QAAQL,EAClB,CAEA,iBAAOM,GACHT,EAAMQ,SACV,CAEA,eAAOE,CAASP,GACZ,OAAOH,EAAMU,SAASP,EAC1B,EAxLepC,EAAAE,QAA+B","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ThemeConfig } from 'antd';
|
|
3
|
+
import { TemboColorPalette, TemboColorOverrides, ThemeMode } from './colors.js';
|
|
4
|
+
import { TemboUIConstants, TemboUIConstantsOverrides } from './constants.js';
|
|
5
|
+
/**
|
|
6
|
+
* Shape of the theme context exposed via useTemboTheme()
|
|
7
|
+
*/
|
|
8
|
+
export interface LegacyTemboThemeContextValue {
|
|
9
|
+
colors: TemboColorPalette;
|
|
10
|
+
constants: TemboUIConstants;
|
|
11
|
+
mode: ThemeMode;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Props for TemboThemeProvider
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* // Basic usage
|
|
18
|
+
* <TemboThemeProvider>
|
|
19
|
+
* <App />
|
|
20
|
+
* </TemboThemeProvider>
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* // With dark mode
|
|
24
|
+
* <TemboThemeProvider mode="dark">
|
|
25
|
+
* <App />
|
|
26
|
+
* </TemboThemeProvider>
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* // With color overrides
|
|
30
|
+
* <TemboThemeProvider
|
|
31
|
+
* colors={{
|
|
32
|
+
* primary: { main: '#007bff' },
|
|
33
|
+
* action: { main: '#28a745' }
|
|
34
|
+
* }}
|
|
35
|
+
* >
|
|
36
|
+
* <App />
|
|
37
|
+
* </TemboThemeProvider>
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* // With all customizations
|
|
41
|
+
* <TemboThemeProvider
|
|
42
|
+
* mode="dark"
|
|
43
|
+
* colors={{ primary: { main: '#007bff' } }}
|
|
44
|
+
* constants={{ radius: { base: 8 } }}
|
|
45
|
+
* themeOverrides={{
|
|
46
|
+
* components: {
|
|
47
|
+
* Button: { controlHeight: 40 }
|
|
48
|
+
* }
|
|
49
|
+
* }}
|
|
50
|
+
* >
|
|
51
|
+
* <App />
|
|
52
|
+
* </TemboThemeProvider>
|
|
53
|
+
*/
|
|
54
|
+
export interface LegacyTemboThemeProviderProps {
|
|
55
|
+
children: React.ReactNode;
|
|
56
|
+
/** Theme mode - 'light' or 'dark' */
|
|
57
|
+
mode?: ThemeMode;
|
|
58
|
+
/** Color palette overrides - supports deep partial overrides */
|
|
59
|
+
colors?: TemboColorOverrides;
|
|
60
|
+
/** UI constants overrides - supports deep partial overrides */
|
|
61
|
+
constants?: TemboUIConstantsOverrides;
|
|
62
|
+
/** Raw Ant Design ThemeConfig overrides for advanced customization */
|
|
63
|
+
themeOverrides?: Partial<ThemeConfig>;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* TemboThemeProvider
|
|
67
|
+
*
|
|
68
|
+
* Wraps your application to provide theming through React context and Ant Design's ConfigProvider.
|
|
69
|
+
* Merges default colors/constants with host overrides and configures Ant Design components.
|
|
70
|
+
* Supports light and dark mode through the mode prop.
|
|
71
|
+
*
|
|
72
|
+
* All child components can access theme values via the useTemboTheme() hook.
|
|
73
|
+
*/
|
|
74
|
+
export declare const LegacyTemboThemeProvider: React.FC<LegacyTemboThemeProviderProps>;
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated
|
|
77
|
+
* Hook to access the active Tembo theme
|
|
78
|
+
*
|
|
79
|
+
* Returns the merged color palette, UI constants, and current theme mode.
|
|
80
|
+
* Components should always use this hook instead of importing defaults directly.
|
|
81
|
+
*
|
|
82
|
+
* @returns Theme context containing colors, constants, and mode
|
|
83
|
+
*
|
|
84
|
+
* @example
|
|
85
|
+
* function MyComponent() {
|
|
86
|
+
* const { colors, constants, mode } = useTemboTheme();
|
|
87
|
+
*
|
|
88
|
+
* return (
|
|
89
|
+
* <div style={{
|
|
90
|
+
* color: colors.text.primary,
|
|
91
|
+
* padding: constants.spacing.md,
|
|
92
|
+
* borderRadius: constants.radius.base,
|
|
93
|
+
* backgroundColor: colors.neutral.lightest
|
|
94
|
+
* }}>
|
|
95
|
+
* Current theme: {mode}
|
|
96
|
+
* </div>
|
|
97
|
+
* );
|
|
98
|
+
* }
|
|
99
|
+
*/
|
|
100
|
+
export declare const useTemboTheme: () => LegacyTemboThemeContextValue;
|