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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/{ZoomOutOutlined-BY_CCwq7.js → ZoomOutOutlined-CW-jqBMI.js} +2 -2
  2. package/dist/{ZoomOutOutlined-BY_CCwq7.js.map → ZoomOutOutlined-CW-jqBMI.js.map} +1 -1
  3. package/dist/{ZoomOutOutlined-BL6A5RSq.js → ZoomOutOutlined-Pw8hpWWK.js} +2 -2
  4. package/dist/{ZoomOutOutlined-BL6A5RSq.js.map → ZoomOutOutlined-Pw8hpWWK.js.map} +1 -1
  5. package/dist/alerts/index.cjs.js +1 -1
  6. package/dist/alerts/index.js +1 -1
  7. package/dist/dialogs/index.cjs.js +1 -1
  8. package/dist/dialogs/index.js +1 -1
  9. package/dist/features/notifications/tembo-notify.d.ts +50 -45
  10. package/dist/features/notifications/tembo-notify.js +70 -42
  11. package/dist/features/notifications/toast-config.d.ts +2 -1
  12. package/dist/features/notifications/toast-config.js +20 -16
  13. package/dist/features/notifications/toast-container.d.ts +2 -2
  14. package/dist/features/notifications/toast-container.js +102 -4
  15. package/dist/index.cjs.js +1 -1
  16. package/dist/index.cjs.js.map +1 -1
  17. package/dist/index.esm.js +1 -1
  18. package/dist/index.esm.js.map +1 -1
  19. package/dist/notifications/index.cjs.js +1 -1
  20. package/dist/notifications/index.js +1 -1
  21. package/dist/tembo-notify-CQLeeHrK.js +2 -0
  22. package/dist/tembo-notify-CQLeeHrK.js.map +1 -0
  23. package/dist/tembo-notify-k9u2UVuM.js +2 -0
  24. package/dist/tembo-notify-k9u2UVuM.js.map +1 -0
  25. package/dist/theme/colors.d.ts +55 -23
  26. package/dist/theme/colors.js +192 -118
  27. package/dist/theme/index.cjs.js +1 -1
  28. package/dist/theme/index.js +1 -1
  29. package/dist/theme/theme-provider.d.ts +18 -6
  30. package/dist/theme/theme-provider.js +27 -21
  31. package/dist/theme-provider-Ca4P0Hcp.js +11 -0
  32. package/dist/theme-provider-Ca4P0Hcp.js.map +1 -0
  33. package/dist/theme-provider-RhAw3jw_.js +11 -0
  34. package/dist/theme-provider-RhAw3jw_.js.map +1 -0
  35. package/package.json +1 -1
  36. package/dist/tembo-notify-C-QGduBt.js +0 -2
  37. package/dist/tembo-notify-C-QGduBt.js.map +0 -1
  38. package/dist/tembo-notify-D-uOV3t0.js +0 -2
  39. package/dist/tembo-notify-D-uOV3t0.js.map +0 -1
  40. package/dist/theme-provider-D_oV1J_K.js +0 -11
  41. package/dist/theme-provider-D_oV1J_K.js.map +0 -1
  42. package/dist/theme-provider-Dqvy24OD.js +0 -11
  43. package/dist/theme-provider-Dqvy24OD.js.map +0 -1
@@ -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","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"}
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","_jsxs","ToastContainer","typography","fontFamily","success","main","error","warning","info","themeOverrides","TemboThemeProvider"],"mappings":"gYAGA,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,IAGRK,EAAAA,kBAAAA,6CACIX,EAAAA,kBAAAA,IAACY,EAAAA,gCAAmBb,IACpBC,EAAAA,kBAAAA,IAAA,QAAA,CAAAG,SAAQ,6IAGeG,EAAUO,WAAWC,g5BA4BtBT,EAAOU,QAAQC,gJAIfX,EAAOY,MAAMD,kJAIbX,EAAOa,QAAQF,+IAIfX,EAAOc,KAAKH,o6DCtBmB,EAC7Db,WACAE,SACAC,YACAc,oBAGIpB,EAAAA,kBAAAA,IAACqB,qBAAkB,CACfhB,OAAQA,EACRC,UAAWA,EACXc,eAAgBA,EAAcjB,SAE9BQ,EAAAA,kBAAAA,KAACb,EAAkB,CAAAK,SAAA,CACdA,EACDH,EAAAA,kBAAAA,IAACI,EAAmB,CAAA"}
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
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};
1
+ import{j as n,u as t,T as o}from"./theme-provider-Ca4P0Hcp.js";import s from"@ebay/nice-modal-react";import{useEffect as a}from"react";import{ToastContainer as r}from"react-toastify";import"lodash";import{T as i}from"./tembo-notify-k9u2UVuM.js";import"antd";import"tslib";import"./InfoCircleOutlined-DYs90hdV.js";import"./ZoomOutOutlined-Pw8hpWWK.js";const e=t=>n.jsx(s.Provider,{children:t.children}),m=o=>{const{colors:s,constants:e}=t();return a(()=>{i.init(s,e)},[s,e]),n.jsxs(n.Fragment,{children:[n.jsx(r,Object.assign({},o)),n.jsx("style",{children:`\n /* Supabase-inspired professional toast styles */\n .Toastify__toast {\n font-family: ${e.typography.fontFamily};\n line-height: 1.5;\n }\n \n .Toastify__toast-body {\n padding: 0;\n }\n \n .Toastify__toast-icon {\n width: 18px;\n margin-inline-end: 12px;\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 /* Progress bar styling by type */\n .Toastify__progress-bar {\n height: 3px;\n }\n \n .toast-progress-success .Toastify__progress-bar {\n background: ${s.success.main};\n }\n \n .toast-progress-error .Toastify__progress-bar {\n background: ${s.error.main};\n }\n \n .toast-progress-warning .Toastify__progress-bar {\n background: ${s.warning.main};\n }\n \n .toast-progress-info .Toastify__progress-bar {\n background: ${s.info.main};\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 .Toastify__toast--top-left {\n animation: toastSlideIn 0.3s ease-out;\n }\n \n .Toastify__toast--top-center {\n animation: toastSlideIn 0.3s ease-out;\n }\n \n /* Smooth exit animation */\n @keyframes toastSlideOut {\n from {\n transform: translateX(0);\n opacity: 1;\n }\n to {\n transform: translateX(110%);\n opacity: 0;\n }\n }\n \n .Toastify__toast--top-right.Toastify__toast--removing {\n animation: toastSlideOut 0.3s ease-in forwards;\n }\n \n /* Responsive spacing */\n @media only screen and (max-width: 480px) {\n .Toastify__toast-container {\n padding: 0;\n width: 100vw;\n }\n \n .Toastify__toast {\n margin-bottom: 0;\n border-radius: 0;\n }\n }\n `})]})},p=({children:t,colors:s,constants:a,themeOverrides:r})=>n.jsx(o,{colors:s,constants:a,themeOverrides:r,children:n.jsxs(e,{children:[t,n.jsx(m,{})]})});export{p as TemboUIProviders};
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -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","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"}
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","_jsxs","ToastContainer","typography","fontFamily","success","main","error","warning","info","TemboUIProviders","themeOverrides","TemboThemeProvider"],"mappings":"+VAGA,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,IAGRK,EAAAA,2BACIX,EAAAA,IAACY,mBAAmBb,IACpBC,EAAAA,IAAA,QAAA,CAAAG,SAAQ,6IAGeG,EAAUO,WAAWC,g5BA4BtBT,EAAOU,QAAQC,gJAIfX,EAAOY,MAAMD,kJAIbX,EAAOa,QAAQF,+IAIfX,EAAOc,KAAKH,24DCtBjCI,EAAoD,EAC7DjB,WACAE,SACAC,YACAe,oBAGIrB,EAAAA,IAACsB,EAAkB,CACfjB,OAAQA,EACRC,UAAWA,EACXe,eAAgBA,EAAclB,SAE9BQ,EAAAA,KAACb,EAAkB,CAAAK,SAAA,CACdA,EACDH,EAAAA,IAACI,EAAmB,CAAA"}
@@ -1,2 +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;
1
+ "use strict";var e=require("../tembo-notify-CQLeeHrK.js");require("../theme-provider-RhAw3jw_.js"),require("react"),require("react-toastify"),require("lodash"),require("tslib"),require("../InfoCircleOutlined-B7d2aRfV.js"),require("../ZoomOutOutlined-CW-jqBMI.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-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";
1
+ export{T as TemboNotify,b as buildToastConfigs}from"../tembo-notify-k9u2UVuM.js";import"../theme-provider-Ca4P0Hcp.js";import"react";import"react-toastify";import"lodash";import"tslib";import"../InfoCircleOutlined-DYs90hdV.js";import"../ZoomOutOutlined-Pw8hpWWK.js";import"antd";
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";var s=require("tslib"),o=require("./theme-provider-RhAw3jw_.js"),t=require("react-toastify"),e=require("./InfoCircleOutlined-B7d2aRfV.js"),i=require("./ZoomOutOutlined-CW-jqBMI.js");const r=(s,t)=>{const r={position:"top-right",autoClose:4e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,style:{fontFamily:t.typography.fontFamily,fontSize:14,borderRadius:8,padding:"12px 16px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",border:"1px solid",minHeight:56}},n=Object.assign(Object.assign({},r),{icon:o.jsxRuntimeExports.jsx(e.RefIcon$2,{style:{fontSize:18,color:s.success.main}}),style:Object.assign(Object.assign({},r.style),{backgroundColor:s.surface.main,borderColor:s.success.border,color:s.text.primary}),className:"toast-success",progressClassName:"toast-progress-success"}),a=Object.assign(Object.assign({},r),{icon:o.jsxRuntimeExports.jsx(e.RefIcon$3,{style:{fontSize:18,color:s.error.main}}),style:Object.assign(Object.assign({},r.style),{backgroundColor:s.surface.main,borderColor:s.error.border,color:s.text.primary}),className:"toast-error",progressClassName:"toast-progress-error",autoClose:6e3}),c=Object.assign(Object.assign({},r),{icon:o.jsxRuntimeExports.jsx(e.RefIcon,{style:{fontSize:18,color:s.warning.main}}),style:Object.assign(Object.assign({},r.style),{backgroundColor:s.surface.main,borderColor:s.warning.border,color:s.text.primary}),className:"toast-warning",progressClassName:"toast-progress-warning"}),l=Object.assign(Object.assign({},r),{icon:o.jsxRuntimeExports.jsx(e.RefIcon$1,{style:{fontSize:18,color:s.info.main}}),style:Object.assign(Object.assign({},r.style),{backgroundColor:s.surface.main,borderColor:s.info.border,color:s.text.primary}),className:"toast-info",progressClassName:"toast-progress-info"});return{loadingConfig:Object.assign(Object.assign({},r),{icon:o.jsxRuntimeExports.jsx(i.RefIcon$2,{style:{fontSize:18,color:s.primary.main}}),style:Object.assign(Object.assign({},r.style),{backgroundColor:s.surface.main,borderColor:s.border.main,color:s.text.primary}),className:"toast-loading",autoClose:!1,closeButton:!1,hideProgressBar:!0}),infoConfig:l,warningConfig:c,errorConfig:a,successConfig:n,baseConfig:r,colors:s}};class n{static init(s,o){this.configs=r(s,o)}static getConfigs(){if(!this.configs)throw new Error("TemboNotify not initialized. Call TemboNotify.init(colors, constants) before using notifications.");return this.configs}static formatMessage(s){return s&&"object"==typeof s&&"title"in s?o.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[o.jsxRuntimeExports.jsx("div",{style:{fontWeight:600,fontSize:14},children:s.title}),s.description&&o.jsxRuntimeExports.jsx("div",{style:{fontSize:13,opacity:.9},children:s.description})]}):s}static buildOptions(o,t){const e=t||{},{duration:i,toastId:r,onClick:n,onClose:a}=e,c=s.__rest(e,["duration","toastId","onClick","onClose"]);return Object.assign(Object.assign(Object.assign({},o),c),{toastId:r,autoClose:void 0!==i?i||!1:o.autoClose,onClick:n,onClose:a})}static success(s,o){const e=this.getConfigs(),i=this.formatMessage(s),r=this.buildOptions(e.successConfig,o);return t.toast.success(i,r)}static error(s,o){const e=this.getConfigs(),i=this.formatMessage(s),r=this.buildOptions(e.errorConfig,o);return t.toast.error(i,r)}static warning(s,o){const e=this.getConfigs(),i=this.formatMessage(s),r=this.buildOptions(e.warningConfig,o);return t.toast.warning(i,r)}static info(s,o){const e=this.getConfigs(),i=this.formatMessage(s),r=this.buildOptions(e.infoConfig,o);return t.toast.info(i,r)}static loading(o,e){const i=this.getConfigs(),r=this.formatMessage(o),n=e||{},{toastId:a,onClick:c,onClose:l}=n,g=s.__rest(n,["toastId","onClick","onClose"]);return t.toast.loading(r,Object.assign(Object.assign(Object.assign({},i.loadingConfig),g),{toastId:a,onClick:c,onClose:l}))}static update(s,o){var e;const i=this.getConfigs(),r=o.type?{success:i.successConfig,error:i.errorConfig,warning:i.warningConfig,info:i.infoConfig}[o.type]:void 0,n=o.message?this.formatMessage(o.message):o.render;t.toast.update(s,Object.assign({render:n,type:o.type,isLoading:!1,autoClose:null!==(e=o.autoClose)&&void 0!==e?e:null==r?void 0:r.autoClose},r))}static dismiss(s){t.toast.dismiss(s)}static dismissAll(){t.toast.dismiss()}static isActive(s){return t.toast.isActive(s)}static promise(s,o,e){var i,r;const n=this.getConfigs();return t.toast.promise(s,{pending:Object.assign({render:this.formatMessage(o.pending)},n.loadingConfig),success:Object.assign(Object.assign({render:s=>{const t="function"==typeof o.success?o.success(s):o.success;return this.formatMessage(t)}},n.successConfig),{autoClose:null!==(i=null==e?void 0:e.duration)&&void 0!==i?i:n.successConfig.autoClose}),error:Object.assign(Object.assign({render:s=>{const t="function"==typeof o.error?o.error(s):o.error;return this.formatMessage(t)}},n.errorConfig),{autoClose:null!==(r=null==e?void 0:e.duration)&&void 0!==r?r:n.errorConfig.autoClose})},{position:null==e?void 0:e.position,toastId:null==e?void 0:e.toastId})}}n.configs=null,exports.TemboNotify=n,exports.buildToastConfigs=r;
2
+ //# sourceMappingURL=tembo-notify-CQLeeHrK.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tembo-notify-CQLeeHrK.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","style","fontFamily","typography","fontSize","borderRadius","padding","boxShadow","border","minHeight","successConfig","Object","assign","icon","_jsx","CheckCircleOutlined","color","success","main","backgroundColor","surface","borderColor","text","primary","className","progressClassName","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","LoadingOutlined","closeButton","TemboNotify","init","this","configs","getConfigs","Error","formatMessage","message","_jsxs","display","flexDirection","gap","children","fontWeight","title","description","opacity","buildOptions","options","_a","duration","toastId","onClick","onClose","restOptions","__rest","undefined","content","toastOptions","toast","loading","update","id","config","type","render","isLoading","dismiss","dismissAll","isActive","promise","messages","pending","data","msg","_b"],"mappings":"yMAcaA,EAAoB,CAACC,EAA2BC,KAIzD,MAAMC,EAA2B,CAC7BC,SAAU,YACVC,UAAW,IACXC,iBAAiB,EACjBC,cAAc,EACdC,cAAc,EACdC,WAAW,EACXC,MAAO,CACHC,WAAYT,EAAUU,WAAWD,WACjCE,SAAU,GACVC,aAAc,EACdC,QAAS,YACTC,UAAW,iCACXC,OAAQ,YACRC,UAAW,KAObC,EAAaC,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACZlB,GAAU,CACbmB,KAAMC,wBAACC,EAAAA,UAAmB,CAACd,MAAO,CAAEG,SAAU,GAAIY,MAAOxB,EAAOyB,QAAQC,QACxEjB,MAAKU,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACElB,EAAWO,OAAK,CACnBkB,gBAAiB3B,EAAO4B,QAAQF,KAChCG,YAAa7B,EAAOyB,QAAQT,OAC5BQ,MAAOxB,EAAO8B,KAAKC,UAEvBC,UAAW,gBACXC,kBAAmB,2BAMjBC,EAAWf,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACVlB,GAAU,CACbmB,KAAMC,EAAAA,kBAAAA,IAACa,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EAAE3D,OAAAC,OAAA,CACX6D,OAAQR,EACRO,KAAMhB,EAAQgB,KACdE,WAAW,EACX9E,kBAAW6D,EAAAD,EAAQ5D,yBAAa2E,aAAM,EAANA,EAAQ3E,WACrC2E,IAOX,cAAOI,CAAQL,GACXH,EAAAA,MAAMQ,QAAQL,GAMlB,iBAAOM,GACHT,EAAAA,MAAMQ,UAMV,eAAOE,CAASP,GACZ,OAAOH,EAAAA,MAAMU,SAASP,GAM1B,cAAOQ,CACHA,EACAC,EAKAvB,WAEA,MAAMf,EAAUD,KAAKE,aAErB,OAAOyB,EAAAA,MAAMW,QACTA,EACA,CACIE,QAAOrE,OAAAC,OAAA,CACH6D,OAAQjC,KAAKI,cAAcmC,EAASC,UACjCvC,EAAQN,eAEflB,qCACIwD,OAASQ,IACL,MAAMC,EAAkC,mBAArBH,EAAS9D,QACtB8D,EAAS9D,QAAQgE,GACjBF,EAAS9D,QACf,OAAOuB,KAAKI,cAAcsC,KAE1BzC,EAAQ/B,gBACZd,UAA4B,UAAjB4D,aAAO,EAAPA,EAASE,gBAAQ,IAAAD,EAAAA,EAAIhB,EAAQ/B,cAAcd,YAE1DgC,mCACI6C,OAAS7C,IACL,MAAMsD,EAAgC,mBAAnBH,EAASnD,MACtBmD,EAASnD,MAAMA,GACfmD,EAASnD,MACf,OAAOY,KAAKI,cAAcsC,KAE3BzC,EAAQf,cACX9B,UAA4B,UAAjB4D,aAAO,EAAPA,EAASE,gBAAQ,IAAAyB,EAAAA,EAAI1C,EAAQf,YAAY9B,aAG5D,CACID,SAAU6D,aAAO,EAAPA,EAAS7D,SACnBgE,QAASH,aAAO,EAAPA,EAASG,WA3NfrB,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 e,R as r,a as n}from"./InfoCircleOutlined-DYs90hdV.js";import{b as a}from"./ZoomOutOutlined-Pw8hpWWK.js";const c=(s,t)=>{const c={position:"top-right",autoClose:4e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,style:{fontFamily:t.typography.fontFamily,fontSize:14,borderRadius:8,padding:"12px 16px",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",border:"1px solid",minHeight:56}},l=Object.assign(Object.assign({},c),{icon:o.jsx(i,{style:{fontSize:18,color:s.success.main}}),style:Object.assign(Object.assign({},c.style),{backgroundColor:s.surface.main,borderColor:s.success.border,color:s.text.primary}),className:"toast-success",progressClassName:"toast-progress-success"}),g=Object.assign(Object.assign({},c),{icon:o.jsx(e,{style:{fontSize:18,color:s.error.main}}),style:Object.assign(Object.assign({},c.style),{backgroundColor:s.surface.main,borderColor:s.error.border,color:s.text.primary}),className:"toast-error",progressClassName:"toast-progress-error",autoClose:6e3}),f=Object.assign(Object.assign({},c),{icon:o.jsx(r,{style:{fontSize:18,color:s.warning.main}}),style:Object.assign(Object.assign({},c.style),{backgroundColor:s.surface.main,borderColor:s.warning.border,color:s.text.primary}),className:"toast-warning",progressClassName:"toast-progress-warning"}),d=Object.assign(Object.assign({},c),{icon:o.jsx(n,{style:{fontSize:18,color:s.info.main}}),style:Object.assign(Object.assign({},c.style),{backgroundColor:s.surface.main,borderColor:s.info.border,color:s.text.primary}),className:"toast-info",progressClassName:"toast-progress-info"});return{loadingConfig:Object.assign(Object.assign({},c),{icon:o.jsx(a,{style:{fontSize:18,color:s.primary.main}}),style:Object.assign(Object.assign({},c.style),{backgroundColor:s.surface.main,borderColor:s.border.main,color:s.text.primary}),className:"toast-loading",autoClose:!1,closeButton:!1,hideProgressBar:!0}),infoConfig:d,warningConfig:f,errorConfig:g,successConfig:l,baseConfig:c,colors:s}};class l{static init(s,o){this.configs=c(s,o)}static getConfigs(){if(!this.configs)throw new Error("TemboNotify not initialized. Call TemboNotify.init(colors, constants) before using notifications.");return this.configs}static formatMessage(s){return s&&"object"==typeof s&&"title"in s?o.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[o.jsx("div",{style:{fontWeight:600,fontSize:14},children:s.title}),s.description&&o.jsx("div",{style:{fontSize:13,opacity:.9},children:s.description})]}):s}static buildOptions(o,t){const i=t||{},{duration:e,toastId:r,onClick:n,onClose:a}=i,c=s(i,["duration","toastId","onClick","onClose"]);return Object.assign(Object.assign(Object.assign({},o),c),{toastId:r,autoClose:void 0!==e?e||!1:o.autoClose,onClick:n,onClose:a})}static success(s,o){const i=this.getConfigs(),e=this.formatMessage(s),r=this.buildOptions(i.successConfig,o);return t.success(e,r)}static error(s,o){const i=this.getConfigs(),e=this.formatMessage(s),r=this.buildOptions(i.errorConfig,o);return t.error(e,r)}static warning(s,o){const i=this.getConfigs(),e=this.formatMessage(s),r=this.buildOptions(i.warningConfig,o);return t.warning(e,r)}static info(s,o){const i=this.getConfigs(),e=this.formatMessage(s),r=this.buildOptions(i.infoConfig,o);return t.info(e,r)}static loading(o,i){const e=this.getConfigs(),r=this.formatMessage(o),n=i||{},{toastId:a,onClick:c,onClose:l}=n,g=s(n,["toastId","onClick","onClose"]);return t.loading(r,Object.assign(Object.assign(Object.assign({},e.loadingConfig),g),{toastId:a,onClick:c,onClose:l}))}static update(s,o){var i;const e=this.getConfigs(),r=o.type?{success:e.successConfig,error:e.errorConfig,warning:e.warningConfig,info:e.infoConfig}[o.type]:void 0,n=o.message?this.formatMessage(o.message):o.render;t.update(s,Object.assign({render:n,type:o.type,isLoading:!1,autoClose:null!==(i=o.autoClose)&&void 0!==i?i:null==r?void 0:r.autoClose},r))}static dismiss(s){t.dismiss(s)}static dismissAll(){t.dismiss()}static isActive(s){return t.isActive(s)}static promise(s,o,i){var e,r;const n=this.getConfigs();return t.promise(s,{pending:Object.assign({render:this.formatMessage(o.pending)},n.loadingConfig),success:Object.assign(Object.assign({render:s=>{const t="function"==typeof o.success?o.success(s):o.success;return this.formatMessage(t)}},n.successConfig),{autoClose:null!==(e=null==i?void 0:i.duration)&&void 0!==e?e:n.successConfig.autoClose}),error:Object.assign(Object.assign({render:s=>{const t="function"==typeof o.error?o.error(s):o.error;return this.formatMessage(t)}},n.errorConfig),{autoClose:null!==(r=null==i?void 0:i.duration)&&void 0!==r?r:n.errorConfig.autoClose})},{position:null==i?void 0:i.position,toastId:null==i?void 0:i.toastId})}}l.configs=null;export{l as T,c as b};
2
+ //# sourceMappingURL=tembo-notify-k9u2UVuM.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tembo-notify-k9u2UVuM.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","style","fontFamily","typography","fontSize","borderRadius","padding","boxShadow","border","minHeight","successConfig","Object","assign","icon","_jsx","CheckCircleOutlined","color","success","main","backgroundColor","surface","borderColor","text","primary","className","progressClassName","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","LoadingOutlined","closeButton","TemboNotify","init","this","configs","getConfigs","Error","formatMessage","message","_jsxs","display","flexDirection","gap","children","fontWeight","title","description","opacity","buildOptions","options","_a","duration","toastId","onClick","onClose","restOptions","__rest","undefined","content","toastOptions","toast","loading","update","id","config","type","render","isLoading","dismiss","dismissAll","isActive","promise","messages","pending","data","msg","_b"],"mappings":"yPAcaA,EAAoB,CAACC,EAA2BC,KAIzD,MAAMC,EAA2B,CAC7BC,SAAU,YACVC,UAAW,IACXC,iBAAiB,EACjBC,cAAc,EACdC,cAAc,EACdC,WAAW,EACXC,MAAO,CACHC,WAAYT,EAAUU,WAAWD,WACjCE,SAAU,GACVC,aAAc,EACdC,QAAS,YACTC,UAAW,iCACXC,OAAQ,YACRC,UAAW,KAObC,EAAaC,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACZlB,GAAU,CACbmB,KAAMC,MAACC,EAAmB,CAACd,MAAO,CAAEG,SAAU,GAAIY,MAAOxB,E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-5,11 +5,12 @@
5
5
  * - Seed tokens (primary, action) → Map tokens (surfaces, components) → Alias tokens (text, borders)
6
6
  * - Named by purpose, not by specific color values
7
7
  * - Supports theming through consistent semantic structure
8
+ * - Theme-aware: neutral scale adapts to light/dark mode
8
9
  *
9
10
  * @example
10
11
  * // Usage in components
11
12
  * const { colors } = useTemboTheme();
12
- * style={{ color: colors.text.primary, backgroundColor: colors.surface.main }}
13
+ * style={{ color: colors.text.primary, backgroundColor: colors.neutral.lightest }}
13
14
  */
14
15
  export interface TemboColorPalette {
15
16
  /**
@@ -48,25 +49,54 @@ export interface TemboColorPalette {
48
49
  contrast: string;
49
50
  };
50
51
  /**
51
- * Neutral color scale
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
52
64
  * Foundation for backgrounds, borders, and subtle UI elements
53
- * Numbered 50-950 where 50 is lightest and 950 is darkest
65
+ * 0 = brightest in current theme, 10 = dimmest in current theme
54
66
  */
55
67
  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;
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;
70
100
  };
71
101
  /**
72
102
  * Success colors
@@ -210,11 +240,9 @@ export interface TemboColorPalette {
210
240
  };
211
241
  /**
212
242
  * Utility colors
213
- * Absolute color values for special cases
243
+ * Special purpose color values
214
244
  */
215
245
  utility: {
216
- white: string;
217
- black: string;
218
246
  transparent: string;
219
247
  /** Link color (often aliases action.main) */
220
248
  link: string;
@@ -228,8 +256,11 @@ export interface TemboColorPalette {
228
256
  */
229
257
  export type TemboColorOverrides = DeepPartial<TemboColorPalette>;
230
258
  /**
231
- * Default Tembo color palette
232
- * Light theme with professional, accessible colors
259
+ * Theme mode
260
+ */
261
+ export type ThemeMode = 'light' | 'dark';
262
+ /**
263
+ * Default color palette for light theme
233
264
  */
234
265
  export declare const defaultColorPalette: TemboColorPalette;
235
266
  /**
@@ -237,9 +268,10 @@ export declare const defaultColorPalette: TemboColorPalette;
237
268
  * Performs deep merge to allow partial nested overrides
238
269
  *
239
270
  * @param overrides - Partial color palette overrides
271
+ * @param mode - Theme mode ('light' or 'dark')
240
272
  * @returns Complete color palette with overrides applied
241
273
  */
242
- export declare const buildColorPalette: (overrides?: TemboColorOverrides) => TemboColorPalette;
274
+ export declare const buildColorPalette: (overrides?: TemboColorOverrides, mode?: ThemeMode) => TemboColorPalette;
243
275
  type DeepPartial<T> = {
244
276
  [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
245
277
  };
@@ -1,138 +1,212 @@
1
1
  import { merge } from "lodash";
2
2
  /**
3
- * Default Tembo color palette
4
- * Light theme with professional, accessible colors
3
+ * Base color values for light theme
4
+ * These are the actual color values that get mapped to the palette
5
5
  */
6
- export const defaultColorPalette = {
7
- primary: {
8
- main: '#000000',
9
- hover: '#1a1a1a',
10
- active: '#000000',
11
- light: '#666666',
12
- lighter: '#999999',
13
- contrast: '#FFFFFF',
14
- },
15
- action: {
16
- main: '#1a6985',
17
- hover: '#145268',
18
- active: '#0f3d4f',
19
- light: '#e8f2f5',
20
- lighter: '#f4f9fa',
21
- disabled: '#a3c9d6',
22
- contrast: '#FFFFFF',
23
- },
6
+ const lightModeColors = {
24
7
  neutral: {
25
- 50: '#ffffff',
26
- 100: '#fafafa',
27
- 200: '#f5f5f5',
28
- 300: '#f0f0f0',
29
- 400: '#e5e5e5',
30
- 500: '#d4d4d4',
31
- 600: '#b3b3b3',
32
- 700: '#999999',
33
- 800: '#666666',
34
- 900: '#1a1a1a',
35
- 950: '#000000',
36
- },
37
- success: {
38
- main: '#10b981',
39
- bg: '#ecfdf5',
40
- border: '#a7f3d0',
41
- text: '#047857',
42
- },
43
- error: {
44
- main: '#ef4444',
45
- bg: '#fef2f2',
46
- border: '#fecaca',
47
- text: '#dc2626',
48
- },
49
- warning: {
50
- main: '#f59e0b',
51
- bg: '#fffbeb',
52
- border: '#fde68a',
53
- text: '#d97706',
8
+ 0: '#ffffff',
9
+ 1: '#fafafa',
10
+ 2: '#f5f5f5',
11
+ 3: '#f0f0f0',
12
+ 4: '#e5e5e5',
13
+ 5: '#d4d4d4',
14
+ 6: '#b3b3b3',
15
+ 7: '#999999',
16
+ 8: '#666666',
17
+ 9: '#1a1a1a',
18
+ 10: '#000000',
54
19
  },
55
- info: {
56
- main: '#1a6985',
57
- bg: '#e8f2f5',
58
- border: '#b8d9e6',
59
- text: '#0f3d4f',
60
- },
61
- surface: {
62
- background: '#ffffff',
63
- main: '#ffffff',
64
- elevated: '#ffffff',
65
- hover: '#fafafa',
66
- subtle: '#f9fafb',
67
- },
68
- text: {
69
- primary: '#000000',
70
- secondary: '#666666',
71
- tertiary: '#999999',
72
- quaternary: '#b3b3b3',
73
- disabled: '#d4d4d4',
74
- inverse: '#ffffff',
75
- },
76
- border: {
77
- main: '#e5e5e5',
78
- light: '#f0f0f0',
79
- strong: '#d4d4d4',
80
- divider: '#e5e5e5',
20
+ };
21
+ /**
22
+ * Base color values for dark theme
23
+ * Inverted neutral scale for dark mode
24
+ */
25
+ const darkModeColors = {
26
+ neutral: {
27
+ 0: '#000000',
28
+ 1: '#1a1a1a',
29
+ 2: '#666666',
30
+ 3: '#999999',
31
+ 4: '#b3b3b3',
32
+ 5: '#d4d4d4',
33
+ 6: '#e5e5e5',
34
+ 7: '#f0f0f0',
35
+ 8: '#f5f5f5',
36
+ 9: '#fafafa',
37
+ 10: '#ffffff',
81
38
  },
82
- components: {
83
- button: {
84
- primary: {
85
- bg: '#1a6985',
86
- hover: '#145268',
87
- text: '#FFFFFF',
88
- },
89
- default: {
90
- bg: '#FFFFFF',
91
- border: '#d4d4d4',
92
- text: '#000000',
93
- hover: '#fafafa',
94
- },
39
+ };
40
+ /**
41
+ * Build default color palette for a given theme mode
42
+ *
43
+ * @param mode - 'light' or 'dark'
44
+ * @returns Complete color palette with theme-aware neutral scale
45
+ */
46
+ const buildDefaultPalette = (mode) => {
47
+ const modeColors = mode === 'light' ? lightModeColors : darkModeColors;
48
+ return {
49
+ primary: {
50
+ main: '#000000',
51
+ hover: '#1a1a1a',
52
+ active: '#000000',
53
+ light: '#666666',
54
+ lighter: '#999999',
55
+ contrast: '#FFFFFF',
95
56
  },
96
- input: {
97
- bg: '#ffffff',
98
- border: '#d4d4d4',
99
- borderHover: '#999999',
100
- borderFocus: '#1a6985',
101
- placeholder: '#999999',
57
+ action: {
58
+ main: '#1a6985',
59
+ hover: '#145268',
60
+ active: '#0f3d4f',
61
+ light: '#e8f2f5',
62
+ lighter: '#f4f9fa',
63
+ disabled: '#a3c9d6',
64
+ contrast: '#FFFFFF',
102
65
  },
103
- table: {
104
- bg: '#ffffff',
105
- headerBg: '#fafafa',
106
- headerText: '#000000',
107
- border: '#e5e5e5',
108
- rowHover: '#fafafa',
66
+ absolute: {
67
+ white: '#ffffff',
68
+ black: '#000000',
109
69
  },
110
- sidebar: {
111
- bg: '#000000',
112
- hover: 'rgba(255, 255, 255, 0.08)',
113
- selected: 'rgba(255, 255, 255, 0.12)',
114
- text: '#FFFFFF',
115
- textSecondary: 'rgba(255, 255, 255, 0.65)',
70
+ neutral: {
71
+ // Numeric scale (theme-aware)
72
+ 0: modeColors.neutral[0],
73
+ 1: modeColors.neutral[1],
74
+ 2: modeColors.neutral[2],
75
+ 3: modeColors.neutral[3],
76
+ 4: modeColors.neutral[4],
77
+ 5: modeColors.neutral[5],
78
+ 6: modeColors.neutral[6],
79
+ 7: modeColors.neutral[7],
80
+ 8: modeColors.neutral[8],
81
+ 9: modeColors.neutral[9],
82
+ 10: modeColors.neutral[10],
83
+ // Convenient aliases (map to numeric scale)
84
+ brightest: modeColors.neutral[0],
85
+ lightest: modeColors.neutral[1],
86
+ lighter: modeColors.neutral[2],
87
+ light: modeColors.neutral[3],
88
+ medium: modeColors.neutral[5],
89
+ dark: modeColors.neutral[7],
90
+ darker: modeColors.neutral[8],
91
+ darkest: modeColors.neutral[9],
92
+ dimmest: modeColors.neutral[10],
116
93
  },
117
- },
118
- utility: {
119
- white: '#ffffff',
120
- black: '#000000',
121
- transparent: 'transparent',
122
- link: '#1a6985',
123
- linkHover: '#145268',
124
- linkActive: '#0f3d4f',
125
- },
94
+ success: {
95
+ main: '#10b981',
96
+ bg: '#ecfdf5',
97
+ border: '#a7f3d0',
98
+ text: '#047857',
99
+ },
100
+ error: {
101
+ main: '#ef4444',
102
+ bg: '#fef2f2',
103
+ border: '#fecaca',
104
+ text: '#dc2626',
105
+ },
106
+ warning: {
107
+ main: '#f59e0b',
108
+ bg: '#fffbeb',
109
+ border: '#fde68a',
110
+ text: '#d97706',
111
+ },
112
+ info: {
113
+ main: '#1a6985',
114
+ bg: '#e8f2f5',
115
+ border: '#b8d9e6',
116
+ text: '#0f3d4f',
117
+ },
118
+ surface: {
119
+ background: modeColors.neutral[0],
120
+ main: modeColors.neutral[0],
121
+ elevated: modeColors.neutral[0],
122
+ hover: modeColors.neutral[1],
123
+ subtle: modeColors.neutral[1],
124
+ },
125
+ text: {
126
+ primary: modeColors.neutral[10],
127
+ secondary: modeColors.neutral[8],
128
+ tertiary: modeColors.neutral[7],
129
+ quaternary: modeColors.neutral[6],
130
+ disabled: modeColors.neutral[5],
131
+ inverse: modeColors.neutral[0],
132
+ },
133
+ border: {
134
+ main: modeColors.neutral[4],
135
+ light: modeColors.neutral[3],
136
+ strong: modeColors.neutral[5],
137
+ divider: modeColors.neutral[4],
138
+ },
139
+ components: {
140
+ button: {
141
+ primary: {
142
+ bg: '#1a6985',
143
+ hover: '#145268',
144
+ text: '#FFFFFF',
145
+ },
146
+ default: {
147
+ bg: modeColors.neutral[0],
148
+ border: modeColors.neutral[5],
149
+ text: modeColors.neutral[10],
150
+ hover: modeColors.neutral[1],
151
+ },
152
+ },
153
+ input: {
154
+ bg: modeColors.neutral[0],
155
+ border: modeColors.neutral[5],
156
+ borderHover: modeColors.neutral[7],
157
+ borderFocus: '#1a6985',
158
+ placeholder: modeColors.neutral[7],
159
+ },
160
+ table: {
161
+ bg: modeColors.neutral[0],
162
+ headerBg: modeColors.neutral[1],
163
+ headerText: modeColors.neutral[10],
164
+ border: modeColors.neutral[4],
165
+ rowHover: modeColors.neutral[1],
166
+ },
167
+ sidebar: {
168
+ bg: '#000000',
169
+ hover: 'rgba(255, 255, 255, 0.08)',
170
+ selected: 'rgba(255, 255, 255, 0.12)',
171
+ text: '#FFFFFF',
172
+ textSecondary: 'rgba(255, 255, 255, 0.65)',
173
+ },
174
+ },
175
+ utility: {
176
+ transparent: 'transparent',
177
+ link: '#1a6985',
178
+ linkHover: '#145268',
179
+ linkActive: '#0f3d4f',
180
+ },
181
+ };
126
182
  };
183
+ /**
184
+ * Default color palette for light theme
185
+ */
186
+ export const defaultColorPalette = buildDefaultPalette('light');
127
187
  /**
128
188
  * Build a complete color palette by merging overrides with defaults
129
189
  * Performs deep merge to allow partial nested overrides
130
190
  *
131
191
  * @param overrides - Partial color palette overrides
192
+ * @param mode - Theme mode ('light' or 'dark')
132
193
  * @returns Complete color palette with overrides applied
133
194
  */
134
- export const buildColorPalette = (overrides) => {
195
+ export const buildColorPalette = (overrides, mode = 'light') => {
196
+ const basePalette = buildDefaultPalette(mode);
135
197
  if (!overrides)
136
- return defaultColorPalette;
137
- return merge(defaultColorPalette, overrides);
198
+ return basePalette;
199
+ const merged = merge({}, basePalette, overrides);
200
+ // After merging, ensure neutral aliases are synced with numeric values
201
+ // This handles cases where overrides might change the numeric scale
202
+ merged.neutral.brightest = merged.neutral[0];
203
+ merged.neutral.lightest = merged.neutral[1];
204
+ merged.neutral.lighter = merged.neutral[2];
205
+ merged.neutral.light = merged.neutral[3];
206
+ merged.neutral.medium = merged.neutral[5];
207
+ merged.neutral.dark = merged.neutral[7];
208
+ merged.neutral.darker = merged.neutral[8];
209
+ merged.neutral.darkest = merged.neutral[9];
210
+ merged.neutral.dimmest = merged.neutral[10];
211
+ return merged;
138
212
  };
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../theme-provider-Dqvy24OD.js");require("react"),require("antd"),require("lodash"),exports.TemboThemeProvider=e.TemboThemeProvider,exports.buildColorPalette=e.buildColorPalette,exports.buildUIConstants=e.buildUIConstants,exports.defaultColorPalette=e.defaultColorPalette,exports.defaultUIConstants=e.defaultUIConstants,exports.useTemboTheme=e.useTemboTheme;
1
+ "use strict";var e=require("../theme-provider-RhAw3jw_.js");require("react"),require("antd"),require("lodash"),exports.TemboThemeProvider=e.TemboThemeProvider,exports.buildColorPalette=e.buildColorPalette,exports.buildUIConstants=e.buildUIConstants,exports.defaultColorPalette=e.defaultColorPalette,exports.defaultUIConstants=e.defaultUIConstants,exports.useTemboTheme=e.useTemboTheme;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1,2 +1,2 @@
1
- export{T as TemboThemeProvider,b as buildColorPalette,c as buildUIConstants,d as defaultColorPalette,a as defaultUIConstants,u as useTemboTheme}from"../theme-provider-D_oV1J_K.js";import"react";import"antd";import"lodash";
1
+ export{T as TemboThemeProvider,b as buildColorPalette,c as buildUIConstants,d as defaultColorPalette,a as defaultUIConstants,u as useTemboTheme}from"../theme-provider-Ca4P0Hcp.js";import"react";import"antd";import"lodash";
2
2
  //# sourceMappingURL=index.js.map