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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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-BL6A5RSq.js +2 -0
  6. package/dist/ZoomOutOutlined-BL6A5RSq.js.map +1 -0
  7. package/dist/ZoomOutOutlined-BY_CCwq7.js +2 -0
  8. package/dist/ZoomOutOutlined-BY_CCwq7.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 +124 -0
  44. package/dist/features/notifications/tembo-notify.js +149 -0
  45. package/dist/features/notifications/toast-config.d.ts +15 -0
  46. package/dist/features/notifications/toast-config.js +53 -0
  47. package/dist/features/notifications/toast-container.d.ts +9 -0
  48. package/dist/features/notifications/toast-container.js +18 -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-C-QGduBt.js +2 -0
  63. package/dist/tembo-notify-C-QGduBt.js.map +1 -0
  64. package/dist/tembo-notify-D-uOV3t0.js +2 -0
  65. package/dist/tembo-notify-D-uOV3t0.js.map +1 -0
  66. package/dist/theme/colors.d.ts +246 -0
  67. package/dist/theme/colors.js +138 -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 +87 -0
  76. package/dist/theme/theme-provider.js +398 -0
  77. package/dist/theme-provider-D_oV1J_K.js +11 -0
  78. package/dist/theme-provider-D_oV1J_K.js.map +1 -0
  79. package/dist/theme-provider-Dqvy24OD.js +11 -0
  80. package/dist/theme-provider-Dqvy24OD.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 e=require("./theme-provider-Dqvy24OD.js"),r=require("@ebay/nice-modal-react"),t=require("react"),s=require("react-toastify");require("lodash");var i=require("./tembo-notify-D-uOV3t0.js");function o(e){return e&&e.__esModule?e:{default:e}}require("antd"),require("./InfoCircleOutlined-B7d2aRfV.js"),require("./ZoomOutOutlined-BY_CCwq7.js");var n=o(r);const u=r=>e.jsxRuntimeExports.jsx(n.default.Provider,{children:r.children}),c=r=>{const{colors:o,constants:n}=e.useTemboTheme();return t.useEffect(()=>{i.TemboNotify.init(o,n)},[o,n]),e.jsxRuntimeExports.jsx(s.ToastContainer,Object.assign({},r))};exports.TemboUIProviders=({children:r,colors:t,constants:s,themeOverrides:i})=>e.jsxRuntimeExports.jsx(e.TemboThemeProvider,{colors:t,constants:s,themeOverrides:i,children:e.jsxRuntimeExports.jsxs(u,{children:[r,e.jsxRuntimeExports.jsx(c,{})]})});
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -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,EAAKK,SACAC,QAAQC,OAAO,IAAIC,MAAM,8BAE3BF,QAAQG,aAAQC,GAKzB,OAFgBC,EAAAA,eAAeC,oBAAoBV,GAG1CI,QAAQG,QAAQP,GAGlBI,QAAQC,OACb,IAAIC,MACF,+JA+EmCK,GAChC,CACLb,EACAC,WAEA,MAAMa,EAAsBb,aAAK,EAALA,EAAOE,WAAWC,OAG9C,IAAKU,EACH,OAAId,EAAKK,SACAC,QAAQC,OAAO,IAAIC,MAAM,gCAE3BF,QAAQG,aAAQC,GAIzB,MAAMK,EAAuCD,EAqMlCE,QAAQ,OAAQ,IAnM3B,GAAIH,EAAa,CAMf,GALgBF,EAAAA,eAAeM,sBAC7BF,EACAF,GAIA,OAAOP,QAAQG,QAAQM,GAGzB,MAAMG,EAAuC,QAAzBC,EAAAC,EAAAA,QAAQC,KAAKR,UAAY,IAAAM,OAAA,EAAAA,EAAEG,KACzCC,EAiMZ,SAAoCV,GAOlC,MAN4C,CAC1CW,GAAI,iDACJC,GAAI,mEAIaZ,IAAgB,sCACrC,CAzMyBa,CAA2Bb,GAE9C,OAAOP,QAAQC,OACb,IAAIC,MAAM,WAAWU,4BAAsCK,MAQ/D,OAJgBZ,EAAAA,eAAegB,mCAC7BZ,GAIOT,QAAQG,QAAQM,GAGlBT,QAAQC,OAAO,IAAIC,MAAM,4DAkFJ,CAACoB,EAAkC,MACjE,MAAMC,aACJA,EAAe,MAAKC,qBACpBA,EAAoBC,WACpBA,EAAUC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lBhD,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","colors","constants","useTemboTheme","useEffect","TemboNotify","init","ToastContainer","Object","assign","themeOverrides","TemboThemeProvider","_jsxs"],"mappings":"+WAGA,MAAMA,EAAmDC,GAC9CC,EAAAA,kBAAAA,IAACC,EAAAA,QAAUC,mBAAUH,EAAMI,WCOhCC,EAA2DL,IAC7D,MAAMM,OAAEA,EAAMC,UAAEA,GAAcC,kBAO9B,OAJAC,EAAAA,UAAU,KACNC,cAAYC,KAAKL,EAAQC,IAC1B,CAACD,EAAQC,IAELN,EAAAA,kBAAAA,IAACW,EAAAA,eAAcC,OAAAC,OAAA,CAAA,EAAKd,8BCwBkC,EAC7DI,WACAE,SACAC,YACAQ,oBAGId,EAAAA,kBAAAA,IAACe,qBAAkB,CACfV,OAAQA,EACRC,UAAWA,EACXQ,eAAgBA,EAAcX,SAE9Ba,EAAAA,kBAAAA,KAAClB,EAAkB,CAAAK,SAAA,CACdA,EACDH,EAAAA,kBAAAA,IAACI,EAAmB,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from "./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 r,u as o,T as t}from"./theme-provider-D_oV1J_K.js";import s from"@ebay/nice-modal-react";import{useEffect as e}from"react";import{ToastContainer as i}from"react-toastify";import"lodash";import{T as n}from"./tembo-notify-C-QGduBt.js";import"antd";import"./InfoCircleOutlined-DYs90hdV.js";import"./ZoomOutOutlined-BL6A5RSq.js";const m=o=>r.jsx(s.Provider,{children:o.children}),c=t=>{const{colors:s,constants:m}=o();return e(()=>{n.init(s,m)},[s,m]),r.jsx(i,Object.assign({},t))},a=({children:o,colors:s,constants:e,themeOverrides:i})=>r.jsx(t,{colors:s,constants:e,themeOverrides:i,children:r.jsxs(m,{children:[o,r.jsx(c,{})]})});export{a as TemboUIProviders};
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -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,OAA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AQC,OACb,IAAIC,MACF,sEAMM,OAARyC,GAAgBO,EAAeE,SAAST,GACnC3C,QAAQC,OACb,IAAIC,MACFuC,GACA,4BAA2BG,aAAU,EAAVA,EAAYS,QAASV,qCAO1C,OAARE,GAAgBK,EAAeI,YAAYT,GACtC7C,QAAQC,OACb,IAAIC,MACFwC,GACA,2BAA0BI,aAAU,EAAVA,EAAYO,QAASR,oCAO9C7C,QAAQG,QAAQ+C,EAAeK,uBAxC7BvD,QAAQC,OACb,IAAIC,MACFsC,GACA"}
1
+ {"version":3,"file":"index.esm.js","sources":["../src/features/dialogs/modal-provider.tsx","../src/features/notifications/toast-container.tsx","../src/providers.tsx"],"sourcesContent":[null,null,null],"names":["TemboModalProvider","props","_jsx","NiceModal","Provider","children","TemboToastContainer","colors","constants","useTemboTheme","useEffect","TemboNotify","init","ToastContainer","Object","assign","TemboUIProviders","themeOverrides","TemboThemeProvider","_jsxs"],"mappings":"iVAGA,MAAMA,EAAmDC,GAC9CC,EAAAA,IAACC,EAAUC,mBAAUH,EAAMI,WCOhCC,EAA2DL,IAC7D,MAAMM,OAAEA,EAAMC,UAAEA,GAAcC,IAO9B,OAJAC,EAAU,KACNC,EAAYC,KAAKL,EAAQC,IAC1B,CAACD,EAAQC,IAELN,EAAAA,IAACW,EAAcC,OAAAC,OAAA,CAAA,EAAKd,KCwBlBe,EAAoD,EAC7DX,WACAE,SACAC,YACAS,oBAGIf,EAAAA,IAACgB,EAAkB,CACfX,OAAQA,EACRC,UAAWA,EACXS,eAAgBA,EAAcZ,SAE9Bc,EAAAA,KAACnB,EAAkB,CAAAK,SAAA,CACdA,EACDH,EAAAA,IAACI,EAAmB,CAAA"}
package/dist/index.js ADDED
@@ -0,0 +1 @@
1
+ export * from "./providers.js";
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("../tembo-notify-D-uOV3t0.js");require("../theme-provider-Dqvy24OD.js"),require("react"),require("react-toastify"),require("lodash"),require("../InfoCircleOutlined-B7d2aRfV.js"),require("../ZoomOutOutlined-BY_CCwq7.js"),require("antd"),exports.TemboNotify=e.TemboNotify,exports.buildToastConfigs=e.buildToastConfigs;
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1 @@
1
+ export * from "../features/notifications";
@@ -0,0 +1,2 @@
1
+ export{T as TemboNotify,b as buildToastConfigs}from"../tembo-notify-C-QGduBt.js";import"../theme-provider-D_oV1J_K.js";import"react";import"react-toastify";import"lodash";import"../InfoCircleOutlined-DYs90hdV.js";import"../ZoomOutOutlined-BL6A5RSq.js";import"antd";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { TemboThemeProviderProps } from './theme/index.js';
3
+ export interface TemboUIProvidersProps {
4
+ children: React.ReactNode;
5
+ /** Color palette overrides */
6
+ colors?: TemboThemeProviderProps['colors'];
7
+ /** UI constants overrides */
8
+ constants?: TemboThemeProviderProps['constants'];
9
+ /** Raw Ant Design theme overrides */
10
+ themeOverrides?: TemboThemeProviderProps['themeOverrides'];
11
+ }
12
+ /**
13
+ * Top-level provider that wires up theme, modal and notifications
14
+ * for all Tembo UI components.
15
+ *
16
+ * Supports theme customization through colors and constants props.
17
+ * TemboToastContainer automatically syncs with theme changes.
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * // Basic usage
22
+ * <TemboUIProviders>
23
+ * <App />
24
+ * </TemboUIProviders>
25
+ *
26
+ * // With custom colors
27
+ * <TemboUIProviders
28
+ * colors={{
29
+ * primary: { main: '#007bff' },
30
+ * action: { main: '#28a745' }
31
+ * }}
32
+ * >
33
+ * <App />
34
+ * </TemboUIProviders>
35
+ * ```
36
+ */
37
+ export declare const TemboUIProviders: React.FC<TemboUIProvidersProps>;
@@ -0,0 +1,32 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import TemboModalProvider from './features/dialogs/modal-provider.js';
3
+ import TemboToastContainer from './features/notifications/toast-container.js';
4
+ import { TemboThemeProvider } from './theme/index.js';
5
+ /**
6
+ * Top-level provider that wires up theme, modal and notifications
7
+ * for all Tembo UI components.
8
+ *
9
+ * Supports theme customization through colors and constants props.
10
+ * TemboToastContainer automatically syncs with theme changes.
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * // Basic usage
15
+ * <TemboUIProviders>
16
+ * <App />
17
+ * </TemboUIProviders>
18
+ *
19
+ * // With custom colors
20
+ * <TemboUIProviders
21
+ * colors={{
22
+ * primary: { main: '#007bff' },
23
+ * action: { main: '#28a745' }
24
+ * }}
25
+ * >
26
+ * <App />
27
+ * </TemboUIProviders>
28
+ * ```
29
+ */
30
+ export const TemboUIProviders = ({ children, colors, constants, themeOverrides, }) => {
31
+ return (_jsx(TemboThemeProvider, { colors: colors, constants: constants, themeOverrides: themeOverrides, children: _jsxs(TemboModalProvider, { children: [children, _jsx(TemboToastContainer, {})] }) }));
32
+ };
@@ -0,0 +1,2 @@
1
+ import{toast as o}from"react-toastify";import{j as s}from"./theme-provider-D_oV1J_K.js";import{b as i,c as n,R as t,a as e}from"./InfoCircleOutlined-DYs90hdV.js";import"./ZoomOutOutlined-BL6A5RSq.js";const l=(o,l)=>{const r={position:"top-right",autoClose:4e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,style:{fontFamily:l.typography.fontFamily,fontSize:l.typography.fontSize.base,borderRadius:l.radius.base}},a=Object.assign(Object.assign({},r),{icon:s.jsx(i,{style:{fontSize:20,color:o.success.main}}),style:Object.assign(Object.assign({},r.style),{border:`1px solid ${o.success.border}`})}),c=Object.assign(Object.assign({},r),{icon:s.jsx(n,{style:{fontSize:20,color:o.error.main}}),style:Object.assign(Object.assign({},r.style),{border:`1px solid ${o.error.border}`}),autoClose:6e3}),g=Object.assign(Object.assign({},r),{icon:s.jsx(t,{style:{fontSize:20,color:o.warning.main}}),style:Object.assign(Object.assign({},r.style),{border:`1px solid ${o.warning.border}`})}),u=Object.assign(Object.assign({},r),{icon:s.jsx(e,{style:{fontSize:20,color:o.info.main}}),style:Object.assign(Object.assign({},r.style),{border:`1px solid ${o.info.border}`})});return{loadingConfig:Object.assign(Object.assign({},r),{autoClose:!1,closeButton:!1}),infoConfig:u,warningConfig:g,errorConfig:c,successConfig:a,baseConfig:r}};class r{static init(o,s){this.configs=l(o,s)}static getConfigs(){if(!this.configs)throw new Error("TemboNotify not initialized. Call TemboNotify.init(colors, constants) before using notifications.");return this.configs}static success(s,i){var n;const t=this.getConfigs();return o.success(s,Object.assign(Object.assign({},t.successConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.successConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static error(s,i){var n;const t=this.getConfigs();return o.error(s,Object.assign(Object.assign({},t.errorConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.errorConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static warning(s,i){var n;const t=this.getConfigs();return o.warning(s,Object.assign(Object.assign({},t.warningConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.warningConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static info(s,i){var n;const t=this.getConfigs();return o.info(s,Object.assign(Object.assign({},t.infoConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.infoConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static loading(s,i){const n=this.getConfigs();return o.loading(s,Object.assign(Object.assign({},n.loadingConfig),{position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static update(s,i){var n;const t=this.getConfigs(),e=i.type?{success:t.successConfig,error:t.errorConfig,warning:t.warningConfig,info:t.infoConfig}[i.type]:void 0;o.update(s,Object.assign({render:i.message,type:i.type,isLoading:!1,autoClose:null!==(n=i.autoClose)&&void 0!==n?n:null==e?void 0:e.autoClose},e))}static dismiss(s){o.dismiss(s)}static dismissAll(){o.dismiss()}static isActive(s){return o.isActive(s)}static promise(s,i,n){var t,e;const l=this.getConfigs();return o.promise(s,{pending:Object.assign({render:i.pending},l.loadingConfig),success:Object.assign(Object.assign({render:i.success},l.successConfig),{autoClose:null!==(t=null==n?void 0:n.duration)&&void 0!==t?t:l.successConfig.autoClose}),error:Object.assign(Object.assign({render:i.error},l.errorConfig),{autoClose:null!==(e=null==n?void 0:n.duration)&&void 0!==e?e:l.errorConfig.autoClose})},{position:null==n?void 0:n.position})}}r.configs=null;export{r as T,l as b};
2
+ //# sourceMappingURL=tembo-notify-C-QGduBt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tembo-notify-C-QGduBt.js","sources":["../src/features/notifications/toast-config.tsx","../src/features/notifications/tembo-notify.tsx"],"sourcesContent":[null,null],"names":["buildToastConfigs","colors","constants","baseConfig","position","autoClose","hideProgressBar","closeOnClick","pauseOnHover","draggable","progress","undefined","style","fontFamily","typography","fontSize","base","borderRadius","radius","successConfig","Object","assign","icon","_jsx","CheckCircleOutlined","color","success","main","border","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","closeButton","TemboNotify","init","this","configs","getConfigs","Error","message","options","toast","_a","duration","onClick","onClose","loading","update","id","config","type","render","isLoading","dismiss","dismissAll","isActive","promise","messages","pending","_b"],"mappings":"8MAaaA,EAAoB,CAACC,EAA2BC,KAIzD,MAAMC,EAA2B,CAC7BC,SAAU,YACVC,UAAW,IACXC,iBAAiB,EACjBC,cAAc,EACdC,cAAc,EACdC,WAAW,EACXC,cAA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AA,CACHqC,OAAQM,EAASC,SACdtB,EAAQL,eAEfZ,QAAON,OAAAC,OAAAD,OAAAC,OAAA,CACHqC,OAAQM,EAAStC,SACbiB,EAAQxB,eAAqB,CACjCd,UAA4B,QAAjB4C,EAAAF,aAAO,EAAPA,EAASG,gBAAQ,IAAAD,EAAAA,EAAIN,EAAQxB,cAAcd,YAE1D0B,MAAKX,OAAAC,OAAAD,OAAAC,OAAA,CACDqC,OAAQM,EAASjC,OACdY,EAAQd,aAAW,CACtBxB,UAA4B,QAAjB6D,EAAAnB,aAAO,EAAPA,EAASG,gBAAQ,IAAAgB,EAAAA,EAAIvB,EAAQd,YAAYxB,aAG5D,CACID,SAAU2C,aAAO,EAAPA,EAAS3C,YA1KhBoC,EAAAG,QAA+B"}
@@ -0,0 +1,2 @@
1
+ "use strict";var o=require("react-toastify"),s=require("./theme-provider-Dqvy24OD.js"),i=require("./InfoCircleOutlined-B7d2aRfV.js");require("./ZoomOutOutlined-BY_CCwq7.js");const n=(o,n)=>{const t={position:"top-right",autoClose:4e3,hideProgressBar:!1,closeOnClick:!0,pauseOnHover:!0,draggable:!0,progress:void 0,style:{fontFamily:n.typography.fontFamily,fontSize:n.typography.fontSize.base,borderRadius:n.radius.base}},e=Object.assign(Object.assign({},t),{icon:s.jsxRuntimeExports.jsx(i.RefIcon$2,{style:{fontSize:20,color:o.success.main}}),style:Object.assign(Object.assign({},t.style),{border:`1px solid ${o.success.border}`})}),r=Object.assign(Object.assign({},t),{icon:s.jsxRuntimeExports.jsx(i.RefIcon$3,{style:{fontSize:20,color:o.error.main}}),style:Object.assign(Object.assign({},t.style),{border:`1px solid ${o.error.border}`}),autoClose:6e3}),l=Object.assign(Object.assign({},t),{icon:s.jsxRuntimeExports.jsx(i.RefIcon,{style:{fontSize:20,color:o.warning.main}}),style:Object.assign(Object.assign({},t.style),{border:`1px solid ${o.warning.border}`})}),a=Object.assign(Object.assign({},t),{icon:s.jsxRuntimeExports.jsx(i.RefIcon$1,{style:{fontSize:20,color:o.info.main}}),style:Object.assign(Object.assign({},t.style),{border:`1px solid ${o.info.border}`})});return{loadingConfig:Object.assign(Object.assign({},t),{autoClose:!1,closeButton:!1}),infoConfig:a,warningConfig:l,errorConfig:r,successConfig:e,baseConfig:t}};class t{static init(o,s){this.configs=n(o,s)}static getConfigs(){if(!this.configs)throw new Error("TemboNotify not initialized. Call TemboNotify.init(colors, constants) before using notifications.");return this.configs}static success(s,i){var n;const t=this.getConfigs();return o.toast.success(s,Object.assign(Object.assign({},t.successConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.successConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static error(s,i){var n;const t=this.getConfigs();return o.toast.error(s,Object.assign(Object.assign({},t.errorConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.errorConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static warning(s,i){var n;const t=this.getConfigs();return o.toast.warning(s,Object.assign(Object.assign({},t.warningConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.warningConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static info(s,i){var n;const t=this.getConfigs();return o.toast.info(s,Object.assign(Object.assign({},t.infoConfig),{autoClose:null!==(n=null==i?void 0:i.duration)&&void 0!==n?n:t.infoConfig.autoClose,position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static loading(s,i){const n=this.getConfigs();return o.toast.loading(s,Object.assign(Object.assign({},n.loadingConfig),{position:null==i?void 0:i.position,onClick:null==i?void 0:i.onClick,onClose:null==i?void 0:i.onClose}))}static update(s,i){var n;const t=this.getConfigs(),e=i.type?{success:t.successConfig,error:t.errorConfig,warning:t.warningConfig,info:t.infoConfig}[i.type]:void 0;o.toast.update(s,Object.assign({render:i.message,type:i.type,isLoading:!1,autoClose:null!==(n=i.autoClose)&&void 0!==n?n:null==e?void 0:e.autoClose},e))}static dismiss(s){o.toast.dismiss(s)}static dismissAll(){o.toast.dismiss()}static isActive(s){return o.toast.isActive(s)}static promise(s,i,n){var t,e;const r=this.getConfigs();return o.toast.promise(s,{pending:Object.assign({render:i.pending},r.loadingConfig),success:Object.assign(Object.assign({render:i.success},r.successConfig),{autoClose:null!==(t=null==n?void 0:n.duration)&&void 0!==t?t:r.successConfig.autoClose}),error:Object.assign(Object.assign({render:i.error},r.errorConfig),{autoClose:null!==(e=null==n?void 0:n.duration)&&void 0!==e?e:r.errorConfig.autoClose})},{position:null==n?void 0:n.position})}}t.configs=null,exports.TemboNotify=t,exports.buildToastConfigs=n;
2
+ //# sourceMappingURL=tembo-notify-D-uOV3t0.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tembo-notify-D-uOV3t0.js","sources":["../src/features/notifications/toast-config.tsx","../src/features/notifications/tembo-notify.tsx"],"sourcesContent":[null,null],"names":["buildToastConfigs","colors","constants","baseConfig","position","autoClose","hideProgressBar","closeOnClick","pauseOnHover","draggable","progress","undefined","style","fontFamily","typography","fontSize","base","borderRadius","radius","successConfig","Object","assign","icon","_jsx","CheckCircleOutlined","color","success","main","border","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","closeButton","TemboNotify","init","this","configs","getConfigs","Error","message","options","toast","_a","duration","onClick","onClose","loading","update","id","config","type","render","isLoading","dismiss","dismissAll","isActive","promise","messages","pending","_b"],"mappings":"oLAaaA,EAAoB,CAACC,EAA2BC,KAIzD,MAAMC,EAA2B,CAC7BC,SAAU,YACVC,UAAW,IACXC,iBAAiB,EACjBC,cAAc,EACdC,cAAc,EACdC,WAAW,EACXC,cAAUC,EACVC,MAAO,CACHC,WAAYX,EAAUY,WAAWD,WACjCE,SAAUb,EAAUY,WAAWC,SAASC,KACxCC,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A,CACHqC,OAAQM,EAASC,SACdtB,EAAQL,eAEfZ,QAAON,OAAAC,OAAAD,OAAAC,OAAA,CACHqC,OAAQM,EAAStC,SACbiB,EAAQxB,eAAqB,CACjCd,UAA4B,QAAjB4C,EAAAF,aAAO,EAAPA,EAASG,gBAAQ,IAAAD,EAAAA,EAAIN,EAAQxB,cAAcd,YAE1D0B,MAAKX,OAAAC,OAAAD,OAAAC,OAAA,CACDqC,OAAQM,EAASjC,OACdY,EAAQd,aAAW,CACtBxB,UAA4B,QAAjB6D,EAAAnB,aAAO,EAAPA,EAASG,gBAAQ,IAAAgB,EAAAA,EAAIvB,EAAQd,YAAYxB,aAG5D,CACID,SAAU2C,aAAO,EAAPA,EAAS3C,YA1KhBoC,EAAAG,QAA+B"}
@@ -0,0 +1,246 @@
1
+ /**
2
+ * Tembo Color Palette
3
+ *
4
+ * Organized following Ant Design's token hierarchy:
5
+ * - Seed tokens (primary, action) → Map tokens (surfaces, components) → Alias tokens (text, borders)
6
+ * - Named by purpose, not by specific color values
7
+ * - Supports theming through consistent semantic structure
8
+ *
9
+ * @example
10
+ * // Usage in components
11
+ * const { colors } = useTemboTheme();
12
+ * style={{ color: colors.text.primary, backgroundColor: colors.surface.main }}
13
+ */
14
+ export interface TemboColorPalette {
15
+ /**
16
+ * Primary brand colors
17
+ * Used for main brand identity, primary buttons, and key UI elements
18
+ */
19
+ primary: {
20
+ /** Base primary color - used for primary buttons and key branding elements */
21
+ main: string;
22
+ /** Hover state for primary interactive elements */
23
+ hover: string;
24
+ /** Active/pressed state for primary interactive elements */
25
+ active: string;
26
+ /** Lighter variant for backgrounds and subtle emphasis */
27
+ light: string;
28
+ /** Even lighter variant for very subtle backgrounds */
29
+ lighter: string;
30
+ /** Text color that maintains contrast on primary backgrounds (typically white) */
31
+ contrast: string;
32
+ };
33
+ /**
34
+ * Action/Interactive colors
35
+ * Used for links, secondary actions, and interactive elements that aren't primary
36
+ */
37
+ action: {
38
+ /** Base action color - used for links, secondary buttons, and interactive elements */
39
+ main: string;
40
+ hover: string;
41
+ active: string;
42
+ /** Light background for action-related content (e.g. info badges, highlighted areas) */
43
+ light: string;
44
+ lighter: string;
45
+ /** Disabled state for action elements */
46
+ disabled: string;
47
+ /** Text color on action backgrounds */
48
+ contrast: string;
49
+ };
50
+ /**
51
+ * Neutral color scale
52
+ * Foundation for backgrounds, borders, and subtle UI elements
53
+ * Numbered 50-950 where 50 is lightest and 950 is darkest
54
+ */
55
+ neutral: {
56
+ /** Near white - for subtle backgrounds */
57
+ 50: string;
58
+ 100: string;
59
+ 200: string;
60
+ 300: string;
61
+ 400: string;
62
+ /** Mid-point gray - useful for borders and dividers */
63
+ 500: string;
64
+ 600: string;
65
+ 700: string;
66
+ 800: string;
67
+ 900: string;
68
+ /** Near black - for dark backgrounds or text */
69
+ 950: string;
70
+ };
71
+ /**
72
+ * Success colors
73
+ * Indicate successful operations, positive states, and confirmations
74
+ */
75
+ success: {
76
+ /** Main success color - for success buttons, icons, and indicators */
77
+ main: string;
78
+ /** Light background for success messages and alerts */
79
+ bg: string;
80
+ /** Border for success containers */
81
+ border: string;
82
+ /** Text color for success messages */
83
+ text: string;
84
+ };
85
+ /**
86
+ * Error colors
87
+ * Indicate errors, failures, and destructive actions
88
+ */
89
+ error: {
90
+ /** Main error color - for error states and destructive actions */
91
+ main: string;
92
+ /** Light background for error messages and alerts */
93
+ bg: string;
94
+ border: string;
95
+ text: string;
96
+ };
97
+ /**
98
+ * Warning colors
99
+ * Indicate caution, warnings, and important information requiring attention
100
+ */
101
+ warning: {
102
+ /** Main warning color */
103
+ main: string;
104
+ bg: string;
105
+ border: string;
106
+ text: string;
107
+ };
108
+ /**
109
+ * Info colors
110
+ * For informational messages and neutral call-outs
111
+ */
112
+ info: {
113
+ main: string;
114
+ bg: string;
115
+ border: string;
116
+ text: string;
117
+ };
118
+ /**
119
+ * Surface colors
120
+ * Backgrounds and containers throughout the application
121
+ */
122
+ surface: {
123
+ /** Main page background */
124
+ background: string;
125
+ /** Default surface/container background (cards, panels) */
126
+ main: string;
127
+ /** Elevated surfaces (modals, popovers) - typically with shadow */
128
+ elevated: string;
129
+ /** Hover state for interactive surfaces */
130
+ hover: string;
131
+ /** Very subtle background for nested content */
132
+ subtle: string;
133
+ };
134
+ /**
135
+ * Text colors
136
+ * For all text content with varying emphasis levels
137
+ */
138
+ text: {
139
+ /** Primary text - body copy, headings */
140
+ primary: string;
141
+ /** Secondary text - supporting information, labels */
142
+ secondary: string;
143
+ /** Tertiary text - de-emphasized content, helper text */
144
+ tertiary: string;
145
+ /** Quaternary text - least emphasis, subtle information */
146
+ quaternary: string;
147
+ /** Disabled text state */
148
+ disabled: string;
149
+ /** Text on dark backgrounds */
150
+ inverse: string;
151
+ };
152
+ /**
153
+ * Border colors
154
+ * For separators, outlines, and component boundaries
155
+ */
156
+ border: {
157
+ /** Default border color */
158
+ main: string;
159
+ /** Lighter border for subtle separation */
160
+ light: string;
161
+ /** Stronger border for emphasis */
162
+ strong: string;
163
+ /** Dividing lines between sections */
164
+ divider: string;
165
+ };
166
+ /**
167
+ * Component-specific colors
168
+ * Pre-defined color combinations for common components
169
+ */
170
+ components: {
171
+ /** Button color tokens */
172
+ button: {
173
+ primary: {
174
+ bg: string;
175
+ hover: string;
176
+ text: string;
177
+ };
178
+ default: {
179
+ bg: string;
180
+ border: string;
181
+ text: string;
182
+ hover: string;
183
+ };
184
+ };
185
+ /** Form input color tokens */
186
+ input: {
187
+ bg: string;
188
+ border: string;
189
+ borderHover: string;
190
+ borderFocus: string;
191
+ placeholder: string;
192
+ };
193
+ /** Table color tokens */
194
+ table: {
195
+ bg: string;
196
+ headerBg: string;
197
+ headerText: string;
198
+ border: string;
199
+ rowHover: string;
200
+ };
201
+ /** Navigation sidebar tokens */
202
+ sidebar: {
203
+ /** Dark sidebar background */
204
+ bg: string;
205
+ hover: string;
206
+ selected: string;
207
+ text: string;
208
+ textSecondary: string;
209
+ };
210
+ };
211
+ /**
212
+ * Utility colors
213
+ * Absolute color values for special cases
214
+ */
215
+ utility: {
216
+ white: string;
217
+ black: string;
218
+ transparent: string;
219
+ /** Link color (often aliases action.main) */
220
+ link: string;
221
+ linkHover: string;
222
+ linkActive: string;
223
+ };
224
+ }
225
+ /**
226
+ * Partial color overrides
227
+ * Allows deep partial overrides for theming
228
+ */
229
+ export type TemboColorOverrides = DeepPartial<TemboColorPalette>;
230
+ /**
231
+ * Default Tembo color palette
232
+ * Light theme with professional, accessible colors
233
+ */
234
+ export declare const defaultColorPalette: TemboColorPalette;
235
+ /**
236
+ * Build a complete color palette by merging overrides with defaults
237
+ * Performs deep merge to allow partial nested overrides
238
+ *
239
+ * @param overrides - Partial color palette overrides
240
+ * @returns Complete color palette with overrides applied
241
+ */
242
+ export declare const buildColorPalette: (overrides?: TemboColorOverrides) => TemboColorPalette;
243
+ type DeepPartial<T> = {
244
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
245
+ };
246
+ export {};
@@ -0,0 +1,138 @@
1
+ import { merge } from "lodash";
2
+ /**
3
+ * Default Tembo color palette
4
+ * Light theme with professional, accessible colors
5
+ */
6
+ export const defaultColorPalette = {
7
+ primary: {
8
+ main: '#000000',
9
+ hover: '#1a1a1a',
10
+ active: '#000000',
11
+ light: '#666666',
12
+ lighter: '#999999',
13
+ contrast: '#FFFFFF',
14
+ },
15
+ action: {
16
+ main: '#1a6985',
17
+ hover: '#145268',
18
+ active: '#0f3d4f',
19
+ light: '#e8f2f5',
20
+ lighter: '#f4f9fa',
21
+ disabled: '#a3c9d6',
22
+ contrast: '#FFFFFF',
23
+ },
24
+ neutral: {
25
+ 50: '#ffffff',
26
+ 100: '#fafafa',
27
+ 200: '#f5f5f5',
28
+ 300: '#f0f0f0',
29
+ 400: '#e5e5e5',
30
+ 500: '#d4d4d4',
31
+ 600: '#b3b3b3',
32
+ 700: '#999999',
33
+ 800: '#666666',
34
+ 900: '#1a1a1a',
35
+ 950: '#000000',
36
+ },
37
+ success: {
38
+ main: '#10b981',
39
+ bg: '#ecfdf5',
40
+ border: '#a7f3d0',
41
+ text: '#047857',
42
+ },
43
+ error: {
44
+ main: '#ef4444',
45
+ bg: '#fef2f2',
46
+ border: '#fecaca',
47
+ text: '#dc2626',
48
+ },
49
+ warning: {
50
+ main: '#f59e0b',
51
+ bg: '#fffbeb',
52
+ border: '#fde68a',
53
+ text: '#d97706',
54
+ },
55
+ info: {
56
+ main: '#1a6985',
57
+ bg: '#e8f2f5',
58
+ border: '#b8d9e6',
59
+ text: '#0f3d4f',
60
+ },
61
+ surface: {
62
+ background: '#ffffff',
63
+ main: '#ffffff',
64
+ elevated: '#ffffff',
65
+ hover: '#fafafa',
66
+ subtle: '#f9fafb',
67
+ },
68
+ text: {
69
+ primary: '#000000',
70
+ secondary: '#666666',
71
+ tertiary: '#999999',
72
+ quaternary: '#b3b3b3',
73
+ disabled: '#d4d4d4',
74
+ inverse: '#ffffff',
75
+ },
76
+ border: {
77
+ main: '#e5e5e5',
78
+ light: '#f0f0f0',
79
+ strong: '#d4d4d4',
80
+ divider: '#e5e5e5',
81
+ },
82
+ components: {
83
+ button: {
84
+ primary: {
85
+ bg: '#1a6985',
86
+ hover: '#145268',
87
+ text: '#FFFFFF',
88
+ },
89
+ default: {
90
+ bg: '#FFFFFF',
91
+ border: '#d4d4d4',
92
+ text: '#000000',
93
+ hover: '#fafafa',
94
+ },
95
+ },
96
+ input: {
97
+ bg: '#ffffff',
98
+ border: '#d4d4d4',
99
+ borderHover: '#999999',
100
+ borderFocus: '#1a6985',
101
+ placeholder: '#999999',
102
+ },
103
+ table: {
104
+ bg: '#ffffff',
105
+ headerBg: '#fafafa',
106
+ headerText: '#000000',
107
+ border: '#e5e5e5',
108
+ rowHover: '#fafafa',
109
+ },
110
+ sidebar: {
111
+ bg: '#000000',
112
+ hover: 'rgba(255, 255, 255, 0.08)',
113
+ selected: 'rgba(255, 255, 255, 0.12)',
114
+ text: '#FFFFFF',
115
+ textSecondary: 'rgba(255, 255, 255, 0.65)',
116
+ },
117
+ },
118
+ utility: {
119
+ white: '#ffffff',
120
+ black: '#000000',
121
+ transparent: 'transparent',
122
+ link: '#1a6985',
123
+ linkHover: '#145268',
124
+ linkActive: '#0f3d4f',
125
+ },
126
+ };
127
+ /**
128
+ * Build a complete color palette by merging overrides with defaults
129
+ * Performs deep merge to allow partial nested overrides
130
+ *
131
+ * @param overrides - Partial color palette overrides
132
+ * @returns Complete color palette with overrides applied
133
+ */
134
+ export const buildColorPalette = (overrides) => {
135
+ if (!overrides)
136
+ return defaultColorPalette;
137
+ return merge(defaultColorPalette, overrides);
138
+ };