@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.
Files changed (86) hide show
  1. package/dist/InfoCircleOutlined-B7d2aRfV.js +7 -0
  2. package/dist/InfoCircleOutlined-B7d2aRfV.js.map +1 -0
  3. package/dist/InfoCircleOutlined-DYs90hdV.js +7 -0
  4. package/dist/InfoCircleOutlined-DYs90hdV.js.map +1 -0
  5. package/dist/ZoomOutOutlined-CW-jqBMI.js +2 -0
  6. package/dist/ZoomOutOutlined-CW-jqBMI.js.map +1 -0
  7. package/dist/ZoomOutOutlined-Pw8hpWWK.js +2 -0
  8. package/dist/ZoomOutOutlined-Pw8hpWWK.js.map +1 -0
  9. package/dist/alerts/index.cjs.js +2 -0
  10. package/dist/alerts/index.cjs.js.map +1 -0
  11. package/dist/alerts/index.d.ts +1 -0
  12. package/dist/alerts/index.js +2 -0
  13. package/dist/alerts/index.js.map +1 -0
  14. package/dist/dialogs/index.cjs.js +2 -0
  15. package/dist/dialogs/index.cjs.js.map +1 -0
  16. package/dist/dialogs/index.d.ts +1 -0
  17. package/dist/dialogs/index.js +2 -0
  18. package/dist/dialogs/index.js.map +1 -0
  19. package/dist/features/alerts/alert.d.ts +12 -0
  20. package/dist/features/alerts/alert.js +95 -0
  21. package/dist/features/alerts/index.d.ts +1 -0
  22. package/dist/features/alerts/index.js +1 -0
  23. package/dist/features/dialogs/index.d.ts +1 -0
  24. package/dist/features/dialogs/index.js +1 -0
  25. package/dist/features/dialogs/modal-provider.d.ts +3 -0
  26. package/dist/features/dialogs/modal-provider.js +6 -0
  27. package/dist/features/dialogs/tembo-confirm.d.ts +63 -0
  28. package/dist/features/dialogs/tembo-confirm.js +111 -0
  29. package/dist/features/input-validation/account-name-validator.d.ts +13 -0
  30. package/dist/features/input-validation/account-name-validator.js +28 -0
  31. package/dist/features/input-validation/account-number-validator.d.ts +13 -0
  32. package/dist/features/input-validation/account-number-validator.js +65 -0
  33. package/dist/{antd-validators.d.ts → features/input-validation/amount-validator.d.ts} +1 -62
  34. package/dist/features/input-validation/amount-validator.js +100 -0
  35. package/dist/features/input-validation/index.d.ts +5 -0
  36. package/dist/features/input-validation/index.js +5 -0
  37. package/dist/features/input-validation/phone-number-validator.d.ts +25 -0
  38. package/dist/features/input-validation/phone-number-validator.js +79 -0
  39. package/dist/features/input-validation/swift-code-validator.d.ts +13 -0
  40. package/dist/features/input-validation/swift-code-validator.js +38 -0
  41. package/dist/features/notifications/index.d.ts +3 -0
  42. package/dist/features/notifications/index.js +3 -0
  43. package/dist/features/notifications/tembo-notify.d.ts +50 -0
  44. package/dist/features/notifications/tembo-notify.js +140 -0
  45. package/dist/features/notifications/toast-config.d.ts +12 -0
  46. package/dist/features/notifications/toast-config.js +60 -0
  47. package/dist/features/notifications/toast-container.d.ts +19 -0
  48. package/dist/features/notifications/toast-container.js +89 -0
  49. package/dist/index.cjs.js +1 -1
  50. package/dist/index.cjs.js.map +1 -1
  51. package/dist/index.d.ts +1 -1
  52. package/dist/index.esm.js +1 -1
  53. package/dist/index.esm.js.map +1 -1
  54. package/dist/index.js +1 -0
  55. package/dist/notifications/index.cjs.js +2 -0
  56. package/dist/notifications/index.cjs.js.map +1 -0
  57. package/dist/notifications/index.d.ts +1 -0
  58. package/dist/notifications/index.js +2 -0
  59. package/dist/notifications/index.js.map +1 -0
  60. package/dist/providers.d.ts +37 -0
  61. package/dist/providers.js +32 -0
  62. package/dist/tembo-notify-Bp14qngd.js +2 -0
  63. package/dist/tembo-notify-Bp14qngd.js.map +1 -0
  64. package/dist/tembo-notify-h5Xn66oA.js +2 -0
  65. package/dist/tembo-notify-h5Xn66oA.js.map +1 -0
  66. package/dist/theme/colors.d.ts +278 -0
  67. package/dist/theme/colors.js +212 -0
  68. package/dist/theme/constants.d.ts +143 -0
  69. package/dist/theme/constants.js +82 -0
  70. package/dist/theme/index.cjs.js +2 -0
  71. package/dist/theme/index.cjs.js.map +1 -0
  72. package/dist/theme/index.d.ts +3 -0
  73. package/dist/theme/index.js +2 -0
  74. package/dist/theme/index.js.map +1 -0
  75. package/dist/theme/theme-provider.d.ts +99 -0
  76. package/dist/theme/theme-provider.js +404 -0
  77. package/dist/theme-provider-Ca4P0Hcp.js +11 -0
  78. package/dist/theme-provider-Ca4P0Hcp.js.map +1 -0
  79. package/dist/theme-provider-RhAw3jw_.js +11 -0
  80. package/dist/theme-provider-RhAw3jw_.js.map +1 -0
  81. package/dist/validation/index.cjs.js +2 -0
  82. package/dist/validation/index.cjs.js.map +1 -0
  83. package/dist/validation/index.d.ts +1 -0
  84. package/dist/validation/index.js +2 -0
  85. package/dist/validation/index.js.map +1 -0
  86. package/package.json +31 -7
package/dist/index.cjs.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("@temboplus/frontend-core");exports.ACCOUNT_NAME_VALIDATOR=(r,o)=>{const n=null==o?void 0:o.toString().trim();if(!n)return r.required?Promise.reject(new Error("Account name is required.")):Promise.resolve(void 0);return e.BankValidation.validateAccountName(n)?Promise.resolve(n):Promise.reject(new Error("Invalid account name. Please enter a valid full name with at least two words (e.g., 'John Smith', 'Anna-Marie Johnson')."))},exports.ACCOUNT_NUMBER_VALIDATOR=r=>(o,n)=>{var t;const i=null==n?void 0:n.toString().trim();if(!i)return o.required?Promise.reject(new Error("Account number is required.")):Promise.resolve(void 0);const a=i.replace(/\s+/g,"");if(r){if(e.BankValidation.validateAccountNumber(a,r))return Promise.resolve(a);const o=null===(t=e.Country.from(r))||void 0===t?void 0:t.name,n=function(e){return{TZ:"Account number should be 9-19 characters long.",KE:"Account number should be 10, 12, or 15 alphanumeric characters."}[e]||"Please enter a valid account number."}(r);return Promise.reject(new Error(`Invalid ${o} account number format. ${n}`))}return e.BankValidation.validateAccountNumberForAnyCountry(a)?Promise.resolve(a):Promise.reject(new Error("Invalid account number format"))},exports.AMOUNT_VALIDATOR=(r={})=>{const{currencyCode:o="TZS",invalidFormatMessage:n,minMessage:t,maxMessage:i}=r,{min:a,max:u}=e.Amount.getTransactionLimits(o),s=void 0!==r.min?r.min:a,l=void 0!==r.max?r.max:u;return(r,m)=>{const d=null==m?void 0:m.toString().trim();if(!d)return r.required?Promise.reject(new Error("Amount is required.")):Promise.resolve(void 0);const c=e.Amount.from(d,o);return c?c.isNegative()?Promise.reject(new Error("Negative amounts are not allowed. Please enter a positive amount.")):null!==s&&c.lessThan(s)?Promise.reject(new Error(t||`Amount must be at least ${(null==a?void 0:a.label)||s}. Please enter a higher amount.`)):null!==l&&c.greaterThan(l)?Promise.reject(new Error(i||`Amount must not exceed ${(null==u?void 0:u.label)||l}. Please enter a lower amount.`)):Promise.resolve(c.formattedNumericValue):Promise.reject(new Error(n||'Invalid amount format. Please enter a valid monetary amount (e.g., "1000", "1,234.56").'))}},exports.MOBILE_PHONE_VALIDATOR=r=>(o,n)=>{var t;const i=null==n?void 0:n.toString().trim();if(!i)return o.required?Promise.reject(new Error("Mobile phone number is required.")):Promise.resolve(void 0);const a=e.PhoneNumberFactory.create(i,{defaultCountry:r});if(!a)return Promise.reject(new Error("This phone number is invalid."));if(e.PhoneNumberFactory.checkPayoutEligibility(a))return Promise.resolve((null==a?void 0:a.e164Format)||i);if(r){const o=null===(t=e.Country.from(r))||void 0===t?void 0:t.name;return Promise.reject(new Error(`Invalid ${o} phone number format. Please enter a valid ${o} phone number.`))}return Promise.reject(new Error("This phone number is invalid."))},exports.PHONE_NUMBER_VALIDATOR=r=>(o,n)=>{var t;const i=null==n?void 0:n.toString().trim();if(!i)return o.required?Promise.reject(new Error("Phone number is required.")):Promise.resolve(void 0);if(e.PhoneNumberFactory.canCreate(i,{defaultCountry:r})){const o=e.PhoneNumberFactory.create(i,{defaultCountry:r});return Promise.resolve((null==o?void 0:o.e164Format)||i)}if(r){const o=null===(t=e.Country.from(r))||void 0===t?void 0:t.name;return Promise.reject(new Error(`Invalid ${o} phone number format. Please enter a valid ${o} phone number.`))}return Promise.reject(new Error("This phone number is invalid."))},exports.SWIFT_CODE_VALIDATOR=r=>(o,n)=>{var t;const i=null==n?void 0:n.toString().trim().toUpperCase();if(!i)return o.required?Promise.reject(new Error("SWIFT code is required.")):Promise.resolve(void 0);if(r){if(e.BankValidation.validateSwiftCode(i,r))return Promise.resolve(i);const o=null===(t=e.Country.from(r))||void 0===t?void 0:t.name;return Promise.reject(new Error(`Invalid ${o} SWIFT code. Please enter a valid ${o} bank SWIFT/BIC code.`))}return e.BankValidation.validateSwiftCodeForAnyCountry(i)?Promise.resolve(i):Promise.reject(new Error("Invalid SWIFT code. Please enter a valid supported bank SWIFT/BIC code."))};
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../src/antd-validators.ts"],"sourcesContent":[null],"names":["rule","value","accountNameString","toString","trim","required","Promise","reject","Error","resolve","undefined","BankValidation","validateAccountName","countryCode","accountNumberString","normalizedAccountNumber","replace","validateAccountNumber","countryName","_a","Country","from","name","formatHint","TZ","KE","getAccountNumberFormatHint","validateAccountNumberForAnyCountry","options","currencyCode","invalidFormatMessage","minMessage","maxMessage","min","defaultMin","max","defaultMax","Amount","getTransactionLimits","amountString","amountInstance","isNegative","lessThan","label","greaterThan","formattedNumericValue","phoneString","phoneInstance","PhoneNumberFactory","create","defaultCountry","checkPayoutEligibility","e164Format","canCreate","swiftCodeString","toUpperCase","validateSwiftCode","validateSwiftCodeForAnyCountry"],"mappings":"sFAiIsC,CACpCA,EACAC,KAEA,MAAMC,EAAoBD,aAAK,EAALA,EAAOE,WAAWC,OAG5C,IAAKF,EACH,OAAIF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aAAQC,GAOzB,GAJgBsC,EAAAA,mBAAmBK,UAAUP,EAAa,CACxDI,eAAgBrC,IAGL,CAEX,MAAMkC,EAAgBC,EAAAA,mBAAmBC,OAAOH,EAAa,CAC3DI,eAAgBrC,IAElB,OAAOP,QAAQG,SAAQsC,aAAa,EAAbA,EAAeK,aAAcN,GAGtD,GAAIjC,EAAa,CACf,MAAMK,EAAuC,QAAzBC,EAAAC,EAAAA,QAAQC,KAAKR,UAAY,IAAAM,OAAA,EAAAA,EAAEG,KAC/C,OAAOhB,QAAQC,OACb,IAAIC,MACF,WAAWU,+CAAyDA,oBAK1E,OAAOZ,QAAQC,OAAO,IAAIC,MAAM,gEAgHCK,GAC5B,CACLb,EACAC,WAEA,MAAMqD,EAAkBrD,aAAK,EAALA,EAAOE,WAAWC,OAAOmD,cAGjD,IAAKD,EACH,OAAItD,EAAKK,SACAC,QAAQC,OAAO,IAAIC,MAAM,4BAE3BF,QAAQG,aAAQC,GAGzB,GAAIG,EAAa,CAMf,GALgBF,EAAAA,eAAe6C,kBAC7BF,EACAzC,GAIA,OAAOP,QAAQG,QAAQ6C,GAGzB,MAAMpC,EAAuC,QAAzBC,EAAAC,EAAAA,QAAQC,KAAKR,UAAY,IAAAM,OAAA,EAAAA,EAAEG,KAC/C,OAAOhB,QAAQC,OACb,IAAIC,MACF,WAAWU,sCAAgDA,2BAQjE,OAFEP,EAAAA,eAAe8C,+BAA+BH,GAGvChD,QAAQG,QAAQ6C,GAGlBhD,QAAQC,OACb,IAAIC,MACF"}
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 "./antd-validators";
1
+ export * from "./providers.js";
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import{PhoneNumberFactory as e,Country as r,BankValidation as o,Amount as n}from"@temboplus/frontend-core";const i=o=>(n,i)=>{var t;const a=null==i?void 0:i.toString().trim();if(!a)return n.required?Promise.reject(new Error("Phone number is required.")):Promise.resolve(void 0);if(e.canCreate(a,{defaultCountry:o})){const r=e.create(a,{defaultCountry:o});return Promise.resolve((null==r?void 0:r.e164Format)||a)}if(o){const e=null===(t=r.from(o))||void 0===t?void 0:t.name;return Promise.reject(new Error(`Invalid ${e} phone number format. Please enter a valid ${e} phone number.`))}return Promise.reject(new Error("This phone number is invalid."))},t=o=>(n,i)=>{var t;const a=null==i?void 0:i.toString().trim();if(!a)return n.required?Promise.reject(new Error("Mobile phone number is required.")):Promise.resolve(void 0);const s=e.create(a,{defaultCountry:o});if(!s)return Promise.reject(new Error("This phone number is invalid."));if(e.checkPayoutEligibility(s))return Promise.resolve((null==s?void 0:s.e164Format)||a);if(o){const e=null===(t=r.from(o))||void 0===t?void 0:t.name;return Promise.reject(new Error(`Invalid ${e} phone number format. Please enter a valid ${e} phone number.`))}return Promise.reject(new Error("This phone number is invalid."))},a=(e,r)=>{const n=null==r?void 0:r.toString().trim();if(!n)return e.required?Promise.reject(new Error("Account name is required.")):Promise.resolve(void 0);return o.validateAccountName(n)?Promise.resolve(n):Promise.reject(new Error("Invalid account name. Please enter a valid full name with at least two words (e.g., 'John Smith', 'Anna-Marie Johnson')."))},s=e=>(n,i)=>{var t;const a=null==i?void 0:i.toString().trim().toUpperCase();if(!a)return n.required?Promise.reject(new Error("SWIFT code is required.")):Promise.resolve(void 0);if(e){if(o.validateSwiftCode(a,e))return Promise.resolve(a);const n=null===(t=r.from(e))||void 0===t?void 0:t.name;return Promise.reject(new Error(`Invalid ${n} SWIFT code. Please enter a valid ${n} bank SWIFT/BIC code.`))}return o.validateSwiftCodeForAnyCountry(a)?Promise.resolve(a):Promise.reject(new Error("Invalid SWIFT code. Please enter a valid supported bank SWIFT/BIC code."))},u=e=>(n,i)=>{var t;const a=null==i?void 0:i.toString().trim();if(!a)return n.required?Promise.reject(new Error("Account number is required.")):Promise.resolve(void 0);const s=a.replace(/\s+/g,"");if(e){if(o.validateAccountNumber(s,e))return Promise.resolve(s);const n=null===(t=r.from(e))||void 0===t?void 0:t.name,i=function(e){return{TZ:"Account number should be 9-19 characters long.",KE:"Account number should be 10, 12, or 15 alphanumeric characters."}[e]||"Please enter a valid account number."}(e);return Promise.reject(new Error(`Invalid ${n} account number format. ${i}`))}return o.validateAccountNumberForAnyCountry(s)?Promise.resolve(s):Promise.reject(new Error("Invalid account number format"))},m=(e={})=>{const{currencyCode:r="TZS",invalidFormatMessage:o,minMessage:i,maxMessage:t}=e,{min:a,max:s}=n.getTransactionLimits(r),u=void 0!==e.min?e.min:a,m=void 0!==e.max?e.max:s;return(e,l)=>{const c=null==l?void 0:l.toString().trim();if(!c)return e.required?Promise.reject(new Error("Amount is required.")):Promise.resolve(void 0);const d=n.from(c,r);return d?d.isNegative()?Promise.reject(new Error("Negative amounts are not allowed. Please enter a positive amount.")):null!==u&&d.lessThan(u)?Promise.reject(new Error(i||`Amount must be at least ${(null==a?void 0:a.label)||u}. Please enter a higher amount.`)):null!==m&&d.greaterThan(m)?Promise.reject(new Error(t||`Amount must not exceed ${(null==s?void 0:s.label)||m}. Please enter a lower amount.`)):Promise.resolve(d.formattedNumericValue):Promise.reject(new Error(o||'Invalid amount format. Please enter a valid monetary amount (e.g., "1000", "1,234.56").'))}};export{a as ACCOUNT_NAME_VALIDATOR,u as ACCOUNT_NUMBER_VALIDATOR,m as AMOUNT_VALIDATOR,t as MOBILE_PHONE_VALIDATOR,i as PHONE_NUMBER_VALIDATOR,s as SWIFT_CODE_VALIDATOR};
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
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../src/antd-validators.ts"],"sourcesContent":[null],"names":["PHONE_NUMBER_VALIDATOR","countryCode","rule","value","phoneString","toString","trim","required","Promise","reject","Error","resolve","undefined","PhoneNumberFactory","canCreate","defaultCountry","phoneInstance","create","e164Format","countryName","_a","Country","from","name","MOBILE_PHONE_VALIDATOR","checkPayoutEligibility","ACCOUNT_NAME_VALIDATOR","accountNameString","BankValidation","validateAccountName","SWIFT_CODE_VALIDATOR","swiftCodeString","toUpperCase","validateSwiftCode","validateSwiftCodeForAnyCountry","ACCOUNT_NUMBER_VALIDATOR","accountNumberString","normalizedAccountNumber","replace","validateAccountNumber","formatHint","TZ","KE","getAccountNumberFormatHint","validateAccountNumberForAnyCountry","AMOUNT_VALIDATOR","options","currencyCode","invalidFormatMessage","minMessage","maxMessage","min","defaultMin","max","defaultMax","Amount","getTransactionLimits","amountString","amountInstance","isNegative","lessThan","label","greaterThan","formattedNumericValue"],"mappings":"2GAqBO,MAAMA,EAA0BC,GAC9B,CACLC,EACAC,WAEA,MAAMC,EAAcD,aAAK,EAALA,EAAOE,WAAWC,OAGtC,IAAKF,EACH,OAAIF,EAAKK,SACAC,QAAQC,OAAO,IAAIC,MAAM,8BAE3BF,QAAQG,aAAQC,GAOzB,GAJgBC,EAAmBC,UAAUV,EAAa,CACxDW,eAAgBd,IAGL,CAEX,MAAMe,EAAgBH,EAAmBI,OAAOb,EAAa,CAC3DW,eAAgBd,IAElB,OAAOO,QAAQG,SAAQK,aAAa,EAAbA,EAAeE,aAAcd,GAGtD,GAAIH,EAAa,CACf,MAAMkB,EAAuC,QAAzBC,EAAAC,EAAQC,KAAKrB,UAAY,IAAAmB,OAAA,EAAAA,EAAEG,KAC/C,OAAOf,QAAQC,OACb,IAAIC,MACF,WAAWS,+CAAyDA,oBAK1E,OAAOX,QAAQC,OAAO,IAAIC,MAAM,mCAevBc,EAA0BvB,GAC9B,CACLC,EACAC,WAEA,MAAMC,EAAcD,aAAK,EAALA,EAAOE,WAAWC,OAGtC,IAAKF,EACH,OAAIF,EAAKK,SACAC,QAAQC,OAAO,IAAIC,MAAM,qCAE3BF,QAAQG,aAAQC,GAGzB,MAAMI,EAAgBH,EAAmBI,OAAOb,EAAa,CAC3DW,eAAgBd,IAGlB,IAAKe,EACH,OAAOR,QAAQC,OAAO,IAAIC,MAAM,kCAMlC,GAFEG,EAAmBY,uBAAuBT,GAG1C,OAAOR,QAAQG,SAAQK,aAAa,EAAbA,EAAeE,aAAcd,GAGtD,GAAIH,EAAa,CACf,MAAMkB,EAAuC,QAAzBC,EAAAC,EAAQC,KAAKrB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"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,CAC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AC,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","dismiss","dismissAll","isActive"],"mappings":"oPAUaA,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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AQR,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 {};