@temboplus/frontend-react-core 0.1.3-beta.13 → 0.1.3-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/alerts/index.cjs.js +1 -1
- package/dist/alerts/index.cjs.js.map +1 -1
- package/dist/alerts/index.js +1 -1
- package/dist/alerts/index.js.map +1 -1
- package/dist/dialogs/index.cjs.js +3 -3
- package/dist/dialogs/index.cjs.js.map +1 -1
- package/dist/dialogs/index.js +3 -3
- package/dist/dialogs/index.js.map +1 -1
- package/dist/features/alerts/alert.js +18 -18
- package/dist/features/dialogs/tembo-confirm.js +11 -11
- package/dist/features/notifications/tembo-notify.d.ts +3 -2
- package/dist/features/notifications/toast-config.d.ts +4 -3
- package/dist/features/notifications/toast-config.js +7 -7
- package/dist/features/notifications/toast-container.js +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/notifications/index.cjs.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/tembo-notify-8__PpMV9.js +3 -0
- package/dist/tembo-notify-8__PpMV9.js.map +1 -0
- package/dist/tembo-notify-DrVkWFXZ.js +3 -0
- package/dist/tembo-notify-DrVkWFXZ.js.map +1 -0
- package/dist/theme/index.cjs.js +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/theme-config.d.ts +3 -3
- package/dist/theme/theme-config.js +44 -89
- package/dist/theme/theme-provider.d.ts +3 -3
- package/dist/theme/theme-provider.js +5 -7
- package/dist/theme/tokens/{color.d.ts → colors.d.ts} +32 -17
- package/dist/theme/tokens/{color.js → colors.js} +65 -46
- package/dist/theme/tokens/constants.d.ts +15 -42
- package/dist/theme/tokens/constants.js +43 -40
- package/dist/theme-provider-BP-1aQ22.js +11 -0
- package/dist/theme-provider-BP-1aQ22.js.map +1 -0
- package/dist/theme-provider-Ck6qg6WJ.js +2 -0
- package/dist/theme-provider-Ck6qg6WJ.js.map +1 -0
- package/dist/theme-provider-Cpt7os8V.js +2 -0
- package/dist/theme-provider-Cpt7os8V.js.map +1 -0
- package/dist/theme-provider-CvaUdBY_.js +11 -0
- package/dist/theme-provider-CvaUdBY_.js.map +1 -0
- package/package.json +1 -1
- package/dist/tembo-notify-CW2KXwZW.js +0 -3
- package/dist/tembo-notify-CW2KXwZW.js.map +0 -1
- package/dist/tembo-notify-EJeawMJ_.js +0 -3
- package/dist/tembo-notify-EJeawMJ_.js.map +0 -1
- package/dist/theme-provider-BVd_oFrl.js +0 -11
- package/dist/theme-provider-BVd_oFrl.js.map +0 -1
- package/dist/theme-provider-dbf4ZeQO.js +0 -11
- package/dist/theme-provider-dbf4ZeQO.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tembo-notify-8__PpMV9.js","sources":["../node_modules/@ant-design/icons-svg/es/asn/LoadingOutlined.js","../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js","../src/features/notifications/toast-config.tsx","../src/features/notifications/tembo-notify.tsx"],"sourcesContent":["// This icon file is generated automatically.\nvar LoadingOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"0 0 1024 1024\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z\" } }] }, \"name\": \"loading\", \"theme\": \"outlined\" };\nexport default LoadingOutlined;\n","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport LoadingOutlinedSvg from \"@ant-design/icons-svg/es/asn/LoadingOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst LoadingOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: LoadingOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(LoadingOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'LoadingOutlined';\n}\nexport default RefIcon;",null,null],"names":["LoadingOutlined","icon","tag","attrs","viewBox","focusable","children","d","name","theme","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","props","ref","React","createElement","AntdIcon","LoadingOutlinedSvg","RefIcon","forwardRef","process","env","NODE_ENV","displayName","buildToastConfigs","colors","constants","baseConfig","position","autoClose","hideProgressBar","closeOnClick","pauseOnHover","draggable","closeButton","style","fontFamily","typography","base","fontSize","borderRadius","padding","boxShadow","border","minHeight","backgroundColor","surface","overlay","color","text","primary","display","alignItems","gap","successConfig","_jsx","CheckCircleOutlined","semantic","success","main","subtle","contrast","className","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","neutral","FALLBACK_BASE_CONFIG","TemboNotify","init","configs","getConfigs","formatMessage","message","hasTitle","title","hasDescription","description","_jsxs","flexDirection","fontWeight","opacity","buildOptions","options","_a","duration","toastId","onClick","onClose","restOptions","__rest","effectiveBase","undefined","getSuccessConfig","_b","getErrorConfig","getWarningConfig","getInfoConfig","getLoadingConfig","content","toastOptions","toast","loading","update","id","typeConfig","type","render","isLoading","dismiss","dismissAll","isActive"],"mappings":"8fACIA,EAAkB,CAAEC,KAAQ,CAAEC,IAAO,MAA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V,QAClBrE,KAAKoE,cAAcW,EAAQV,SAC3BU,EAAQwB,OAEdN,QAAME,OAAOC,iBACTG,OAAQR,EACRO,KAAMvB,EAAQuB,KACdE,WAAW,EACXtF,UAEyB,QADrBwE,EAAiB,QAAjBV,EAAAD,EAAQ7D,iBAAS,IAAA8D,EAAAA,EACjBqB,eAAAA,EAAYnF,iBAAS,IAAAwE,EAAAA,EACrB3B,EAAqB7C,WACrBmF,QAAAA,EAAc,CAAA,GAE1B,CAEA,cAAOI,CAAQL,GACXH,EAAAA,MAAMQ,QAAQL,EAClB,CAEA,iBAAOM,GACHT,EAAAA,MAAMQ,SACV,CAEA,eAAOE,CAASP,GACZ,OAAOH,EAAAA,MAAMU,SAASP,EAC1B,EAxLepC,EAAAE,QAA+B","x_google_ignoreList":[0,1]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{__rest as s}from"tslib";import{j as t}from"./theme-provider-BP-1aQ22.js";import{toast as o}from"react-toastify";import{I as i,b as n,a as e,R as a}from"./InfoCircleOutlined-Hx86sClq.js";import{R as r}from"./CloseCircleOutlined-CSHx89Jn.js";import*as l from"react";var c={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function g(){return g=Object.assign?Object.assign.bind():function(s){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(s[i]=o[i])}return s},g.apply(this,arguments)}const d=(s,t)=>l.createElement(i,g({},s,{ref:t,icon:c})),u=l.forwardRef(d);
|
|
2
|
+
/** */"production"!==process.env.NODE_ENV&&(u.displayName="LoadingOutlined");const f=(s,o)=>{const i={position:"top-right",autoClose:4e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,closeButton:!1,style:{fontFamily:o.typography.fontFamily.base,fontSize:14,borderRadius:10,padding:"10px 14px",boxShadow:"0 12px 24px rgba(15, 23, 42, 0.12)",border:"none",minHeight:56,backgroundColor:s.surface.overlay,color:s.text.primary,display:"flex",alignItems:"center",gap:8}},l=Object.assign(Object.assign({},i),{icon:t.jsx(n,{style:{fontSize:18,color:s.semantic.success.main}}),style:Object.assign(Object.assign({},i.style),{backgroundColor:s.semantic.success.subtle,color:s.semantic.success.contrast}),className:"toast-success"}),c=Object.assign(Object.assign({},i),{icon:t.jsx(r,{style:{fontSize:18,color:s.semantic.error.main}}),style:Object.assign(Object.assign({},i.style),{backgroundColor:s.semantic.error.subtle,color:s.semantic.error.contrast}),className:"toast-error"}),g=Object.assign(Object.assign({},i),{icon:t.jsx(e,{style:{fontSize:18,color:s.semantic.warning.main}}),style:Object.assign(Object.assign({},i.style),{backgroundColor:s.semantic.warning.subtle,color:s.semantic.warning.contrast}),className:"toast-warning"}),d=Object.assign(Object.assign({},i),{icon:t.jsx(a,{style:{fontSize:18,color:s.semantic.info.main}}),style:Object.assign(Object.assign({},i.style),{backgroundColor:s.surface.overlay,color:s.text.primary}),className:"toast-info"});return{loadingConfig:Object.assign(Object.assign({},i),{icon:t.jsx(u,{style:{fontSize:18,color:s.neutral[4]}}),style:Object.assign(Object.assign({},i.style),{backgroundColor:s.surface.overlay,color:s.text.primary}),autoClose:!1,closeButton:!1,hideProgressBar:!0,className:"toast-loading"}),infoConfig:d,warningConfig:g,errorConfig:c,successConfig:l,baseConfig:i,colors:s}},C={position:"top-right",autoClose:4e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,closeButton:!1};class b{static init(s,t){this.configs=f(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.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[t.jsx("div",{style:{fontWeight:600,fontSize:14},children:s.title}),t.jsx("div",{style:{fontSize:13,fontWeight:400,opacity:.95},children:s.description})]}):o&&!i?t.jsx("div",{style:{fontWeight:600,fontSize:14},children:s.title}):!o&&i?t.jsx("div",{style:{fontSize:13,fontWeight:500},children:s.description}):""}return s}static buildOptions(t,o){const i=o||{},{duration:n,toastId:e,onClick:a,onClose:r}=i,l=s(i,["duration","toastId","onClick","onClose"]),c=null!=t?t:C;return Object.assign(Object.assign(Object.assign({},c),l),{toastId:e,autoClose:void 0!==n?n||!1:c.autoClose,onClick:a,onClose:r})}static getSuccessConfig(){var s,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),n=this.buildOptions(this.getSuccessConfig(),t);return o.success(i,n)}static error(s,t){const i=this.formatMessage(s),n=this.buildOptions(this.getErrorConfig(),t);return o.error(i,n)}static warning(s,t){const i=this.formatMessage(s),n=this.buildOptions(this.getWarningConfig(),t);return o.warning(i,n)}static info(s,t){const i=this.formatMessage(s),n=this.buildOptions(this.getInfoConfig(),t);return o.info(i,n)}static loading(t,i){var n;const e=this.formatMessage(t),a=i||{},{toastId:r,onClick:l,onClose:c}=a,g=s(a,["toastId","onClick","onClose"]),d=null!==(n=this.getLoadingConfig())&&void 0!==n?n:C;return o.loading(e,Object.assign(Object.assign(Object.assign({},d),g),{toastId:r,onClick:l,onClose:c}))}static update(s,t){var i,n;const e=this.getConfigs(),a=t.type&&e?{success:e.successConfig,error:e.errorConfig,warning:e.warningConfig,info:e.infoConfig}[t.type]:void 0,r=t.message?this.formatMessage(t.message):t.render;o.update(s,Object.assign({render:r,type:t.type,isLoading:!1,autoClose:null!==(n=null!==(i=t.autoClose)&&void 0!==i?i:null==a?void 0:a.autoClose)&&void 0!==n?n:C.autoClose},null!=a?a:{}))}static dismiss(s){o.dismiss(s)}static dismissAll(){o.dismiss()}static isActive(s){return o.isActive(s)}}b.configs=null;export{b as T,f as b};
|
|
3
|
+
//# sourceMappingURL=tembo-notify-DrVkWFXZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tembo-notify-DrVkWFXZ.js","sources":["../node_modules/@ant-design/icons-svg/es/asn/LoadingOutlined.js","../node_modules/@ant-design/icons/es/icons/LoadingOutlined.js","../src/features/notifications/toast-config.tsx","../src/features/notifications/tembo-notify.tsx"],"sourcesContent":["// This icon file is generated automatically.\nvar LoadingOutlined = { \"icon\": { \"tag\": \"svg\", \"attrs\": { \"viewBox\": \"0 0 1024 1024\", \"focusable\": \"false\" }, \"children\": [{ \"tag\": \"path\", \"attrs\": { \"d\": \"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z\" } }] }, \"name\": \"loading\", \"theme\": \"outlined\" };\nexport default LoadingOutlined;\n","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n// GENERATE BY ./scripts/generate.ts\n// DON NOT EDIT IT MANUALLY\n\nimport * as React from 'react';\nimport LoadingOutlinedSvg from \"@ant-design/icons-svg/es/asn/LoadingOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst LoadingOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: LoadingOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(LoadingOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'LoadingOutlined';\n}\nexport default RefIcon;",null,null],"names":["LoadingOutlined","icon","tag","attrs","viewBox","focusable","children","d","name","theme","_extends","Object","assign","bind","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","props","ref","React","createElement","AntdIcon","LoadingOutlinedSvg","RefIcon","forwardRef","process","env","NODE_ENV","displayName","buildToastConfigs","colors","constants","baseConfig","position","autoClose","hideProgressBar","closeOnClick","pauseOnHover","draggable","closeButton","style","fontFamily","typography","base","fontSize","borderRadius","padding","boxShadow","border","minHeight","backgroundColor","surface","overlay","color","text","primary","display","alignItems","gap","successConfig","_jsx","CheckCircleOutlined","semantic","success","main","subtle","contrast","className","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","neutral","FALLBACK_BASE_CONFIG","TemboNotify","init","configs","getConfigs","formatMessage","message","hasTitle","title","hasDescription","description","_jsxs","flexDirection","fontWeight","opacity","buildOptions","options","_a","duration","toastId","onClick","onClose","restOptions","__rest","effectiveBase","undefined","getSuccessConfig","_b","getErrorConfig","getWarningConfig","getInfoConfig","getLoadingConfig","content","toastOptions","toast","loading","update","id","typeConfig","type","render","isLoading","dismiss","dismissAll","isActive"],"mappings":"+QACA,IAAIA,EAAkB,CAAEC,KAAQ,CAAEC,IAAO,MAAOC,MAAS,CAAEC,QAAW,gBAAiBC,UAAa,SAAWC,SAAY,CAAC,CAAEJ,IAAO,OAAQC,MAAS,CAAEI,EAAK,kUAAsUC,KAAQ,UAAWC,MAAS,YCD/f,SAASC,IAAiS,OAApRA,EAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,EAAcP,OAAOS,UAAUC,eAAeC,KAAKJ,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,GAAU,CAAE,OAAOL,CAAQ,EAAUJ,EAASa,MAAMC,KAAMR,UAAY,CAOlV,MAAMhB,EAAkB,CAACyB,EAAOC,IAAqBC,EAAMC,cAAcC,EAAUnB,EAAS,CAAA,EAAIe,EAAO,CACrGC,IAAKA,EACLzB,KAAM6B,KAIFC,EAAuBJ,EAAMK,WAAWhC;4oBACjB,eAAzBiC,QAAQC,IAAIC,WACdJ,EAAQK,YAAc,yBCJXC,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,WAAWE,KAC5CC,SAAU,GACVC,aAAc,GACdC,QAAS,YACTC,UAAW,qCACXC,OAAQ,OACRC,UAAW,GACXC,gBAAiBpB,EAAOqB,QAAQC,QAChCC,MAAOvB,EAAOwB,KAAKC,QACn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ACjBW,MAAOY,EAAQd,YACfK,QAASS,EAAQX,cACjBK,KAAMM,EAAQR,YAChBqB,EAAQuB,WACRd,EAEJO,EAAUhB,EAAQV,QAClBrE,KAAKoE,cAAcW,EAAQV,SAC3BU,EAAQwB,OAEdN,EAAME,OAAOC,iBACTG,OAAQR,EACRO,KAAMvB,EAAQuB,KACdE,WAAW,EACXtF,UAEyB,QADrBwE,EAAiB,QAAjBV,EAAAD,EAAQ7D,iBAAS,IAAA8D,EAAAA,EACjBqB,eAAAA,EAAYnF,iBAAS,IAAAwE,EAAAA,EACrB3B,EAAqB7C,WACrBmF,QAAAA,EAAc,CAAA,GAE1B,CAEA,cAAOI,CAAQL,GACXH,EAAMQ,QAAQL,EAClB,CAEA,iBAAOM,GACHT,EAAMQ,SACV,CAEA,eAAOE,CAASP,GACZ,OAAOH,EAAMU,SAASP,EAC1B,EAxLepC,EAAAE,QAA+B","x_google_ignoreList":[0,1]}
|
package/dist/theme/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("../theme-provider-
|
|
1
|
+
"use strict";var e=require("../theme-provider-Ck6qg6WJ.js"),r=require("../theme-provider-CvaUdBY_.js");require("react"),require("antd"),require("lodash"),exports.LegacyTemboThemeProvider=e.LegacyTemboThemeProvider,exports.buildColorPalette=e.buildColorPalette,exports.buildUIConstants=e.buildUIConstants,exports.defaultColorPalette=e.defaultColorPalette,exports.defaultUIConstants=e.defaultUIConstants,exports.useTemboTheme=e.useTemboTheme,exports.TemboThemeProvider=r.TemboThemeProvider,exports.useNewTemboTheme=r.useNewTemboTheme;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/theme/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{L as LegacyTemboThemeProvider,
|
|
1
|
+
export{L as LegacyTemboThemeProvider,b as buildColorPalette,c as buildUIConstants,d as defaultColorPalette,a as defaultUIConstants,u as useTemboTheme}from"../theme-provider-Cpt7os8V.js";export{T as TemboThemeProvider,u as useNewTemboTheme}from"../theme-provider-BP-1aQ22.js";import"react";import"antd";import"lodash";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ThemeConfig } from 'antd';
|
|
2
|
-
import { ColorPalette } from './tokens/
|
|
3
|
-
import {
|
|
2
|
+
import { ColorPalette } from './tokens/colors.js';
|
|
3
|
+
import { UIConstants } from './tokens/constants.js';
|
|
4
4
|
/**
|
|
5
5
|
* Build comprehensive Ant Design theme from Tembo tokens
|
|
6
6
|
*/
|
|
7
|
-
export declare const buildAntDTheme: (colors: ColorPalette, constants:
|
|
7
|
+
export declare const buildAntDTheme: (colors: ColorPalette, constants: UIConstants) => ThemeConfig;
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
import { buildDarkModeConstants } from './tokens/constants.js';
|
|
2
1
|
/**
|
|
3
2
|
* Build comprehensive Ant Design theme from Tembo tokens
|
|
4
3
|
*/
|
|
5
4
|
export const buildAntDTheme = (colors, constants) => {
|
|
6
5
|
const isDark = colors.mode === 'dark';
|
|
7
|
-
const componentShadow = isDark
|
|
8
|
-
? buildDarkModeConstants().componentShadow
|
|
9
|
-
: constants.componentShadow;
|
|
10
6
|
return {
|
|
11
7
|
token: {
|
|
12
8
|
// ============================================
|
|
@@ -143,7 +139,7 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
143
139
|
// ============================================
|
|
144
140
|
boxShadow: constants.shadow.none,
|
|
145
141
|
boxShadowSecondary: constants.shadow.none,
|
|
146
|
-
boxShadowTertiary:
|
|
142
|
+
boxShadowTertiary: constants.shadow.card,
|
|
147
143
|
// ============================================
|
|
148
144
|
// MOTION
|
|
149
145
|
// ============================================
|
|
@@ -195,16 +191,12 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
195
191
|
colorErrorHover: colors.semantic.error.main,
|
|
196
192
|
colorErrorActive: colors.semantic.error.main,
|
|
197
193
|
dangerShadow: 'none',
|
|
198
|
-
// Sizing
|
|
199
|
-
controlHeight: 40,
|
|
200
|
-
controlHeightLG: 48,
|
|
201
|
-
controlHeightSM: 32,
|
|
202
194
|
paddingContentHorizontal: constants.spacing[4],
|
|
203
195
|
paddingContentVertical: constants.spacing[2],
|
|
204
196
|
// Styling
|
|
205
|
-
borderRadius: constants.
|
|
206
|
-
borderRadiusLG: constants.
|
|
207
|
-
borderRadiusSM: constants.
|
|
197
|
+
borderRadius: constants.radius.button,
|
|
198
|
+
borderRadiusLG: constants.radius.button,
|
|
199
|
+
borderRadiusSM: constants.radius.button,
|
|
208
200
|
fontWeight: constants.typography.fontWeight.medium,
|
|
209
201
|
fontSize: constants.typography.fontSize.base,
|
|
210
202
|
},
|
|
@@ -223,15 +215,12 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
223
215
|
activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
|
|
224
216
|
errorActiveShadow: `0 0 0 2px ${colors.semantic.error.subtle}`,
|
|
225
217
|
warningActiveShadow: `0 0 0 2px ${colors.semantic.warning.subtle}`,
|
|
226
|
-
controlHeight: 40,
|
|
227
|
-
controlHeightLG: 48,
|
|
228
|
-
controlHeightSM: 32,
|
|
229
218
|
paddingBlock: constants.spacing[2],
|
|
230
219
|
paddingInline: constants.spacing[3],
|
|
231
220
|
paddingInlineLG: constants.spacing[4],
|
|
232
|
-
borderRadius: constants.
|
|
233
|
-
borderRadiusLG: constants.
|
|
234
|
-
borderRadiusSM: constants.
|
|
221
|
+
borderRadius: constants.radius.input,
|
|
222
|
+
borderRadiusLG: constants.radius.input,
|
|
223
|
+
borderRadiusSM: constants.radius.input,
|
|
235
224
|
},
|
|
236
225
|
InputNumber: {
|
|
237
226
|
colorBgContainer: colors.surface.card,
|
|
@@ -241,8 +230,7 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
241
230
|
colorIcon: colors.text.tertiary,
|
|
242
231
|
colorIconHover: colors.text.secondary,
|
|
243
232
|
activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
|
|
244
|
-
|
|
245
|
-
borderRadius: constants.componentRadius.input,
|
|
233
|
+
borderRadius: constants.radius.input,
|
|
246
234
|
handleVisible: true,
|
|
247
235
|
},
|
|
248
236
|
Select: {
|
|
@@ -259,13 +247,10 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
259
247
|
optionSelectedBg: colors.surface.selected,
|
|
260
248
|
optionSelectedColor: colors.text.primary,
|
|
261
249
|
optionActiveBg: colors.surface.interactive,
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
borderRadiusLG: constants.componentRadius.input,
|
|
267
|
-
borderRadiusSM: constants.componentRadius.input,
|
|
268
|
-
boxShadowSecondary: componentShadow.dropdown,
|
|
250
|
+
borderRadius: constants.radius.input,
|
|
251
|
+
borderRadiusLG: constants.radius.input,
|
|
252
|
+
borderRadiusSM: constants.radius.input,
|
|
253
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
269
254
|
},
|
|
270
255
|
DatePicker: {
|
|
271
256
|
colorBgContainer: colors.surface.card,
|
|
@@ -278,8 +263,7 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
278
263
|
cellHoverBg: colors.surface.interactive,
|
|
279
264
|
cellActiveWithRangeBg: colors.semantic.info.subtle,
|
|
280
265
|
colorPrimary: colors.link.default,
|
|
281
|
-
|
|
282
|
-
borderRadius: constants.componentRadius.input,
|
|
266
|
+
borderRadius: constants.radius.input,
|
|
283
267
|
},
|
|
284
268
|
Checkbox: {
|
|
285
269
|
colorPrimary: colors.link.default,
|
|
@@ -297,7 +281,6 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
297
281
|
colorBgContainer: colors.surface.card,
|
|
298
282
|
colorIcon: colors.text.tertiary,
|
|
299
283
|
colorIconHover: colors.text.secondary,
|
|
300
|
-
dotSize: 8,
|
|
301
284
|
},
|
|
302
285
|
Switch: {
|
|
303
286
|
colorPrimary: colors.link.default,
|
|
@@ -306,7 +289,6 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
306
289
|
colorTextTertiary: colors.text.tertiary,
|
|
307
290
|
colorIcon: colors.text.tertiary,
|
|
308
291
|
colorIconHover: colors.text.secondary,
|
|
309
|
-
handleSize: 18,
|
|
310
292
|
},
|
|
311
293
|
Slider: {
|
|
312
294
|
colorPrimary: colors.link.default,
|
|
@@ -326,7 +308,6 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
326
308
|
Form: {
|
|
327
309
|
labelColor: colors.text.primary,
|
|
328
310
|
labelFontSize: constants.typography.fontSize.base,
|
|
329
|
-
labelHeight: 32,
|
|
330
311
|
labelColonMarginInlineEnd: constants.spacing[2],
|
|
331
312
|
labelColonMarginInlineStart: constants.spacing[1],
|
|
332
313
|
itemMarginBottom: constants.spacing[4],
|
|
@@ -356,9 +337,9 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
356
337
|
cellPaddingInline: constants.spacing[4],
|
|
357
338
|
cellPaddingBlockSM: constants.spacing[2],
|
|
358
339
|
cellPaddingInlineSM: constants.spacing[3],
|
|
359
|
-
borderRadius: constants.
|
|
360
|
-
borderRadiusLG: constants.
|
|
361
|
-
headerBorderRadius: constants.
|
|
340
|
+
borderRadius: constants.radius.card,
|
|
341
|
+
borderRadiusLG: constants.radius.card,
|
|
342
|
+
headerBorderRadius: constants.radius.card,
|
|
362
343
|
footerBg: colors.surface.page,
|
|
363
344
|
},
|
|
364
345
|
Descriptions: {
|
|
@@ -375,9 +356,9 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
375
356
|
colorBorderSecondary: colors.border.default,
|
|
376
357
|
colorTextHeading: colors.text.primary,
|
|
377
358
|
colorTextDescription: colors.text.secondary,
|
|
378
|
-
boxShadowTertiary:
|
|
379
|
-
borderRadius: constants.
|
|
380
|
-
borderRadiusLG: constants.
|
|
359
|
+
boxShadowTertiary: constants.shadow.card,
|
|
360
|
+
borderRadius: constants.radius.card,
|
|
361
|
+
borderRadiusLG: constants.radius.card,
|
|
381
362
|
padding: constants.spacing[4],
|
|
382
363
|
paddingLG: constants.spacing[6],
|
|
383
364
|
},
|
|
@@ -389,9 +370,7 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
389
370
|
},
|
|
390
371
|
Timeline: {
|
|
391
372
|
tailColor: colors.border.default,
|
|
392
|
-
tailWidth: 2,
|
|
393
373
|
dotBg: colors.surface.card,
|
|
394
|
-
dotBorderWidth: 2,
|
|
395
374
|
itemPaddingBottom: constants.spacing[5],
|
|
396
375
|
},
|
|
397
376
|
Tag: {
|
|
@@ -399,7 +378,7 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
399
378
|
defaultColor: colors.text.primary,
|
|
400
379
|
colorBorder: colors.border.default,
|
|
401
380
|
colorText: colors.text.primary,
|
|
402
|
-
borderRadiusSM: constants.
|
|
381
|
+
borderRadiusSM: constants.radius.sm,
|
|
403
382
|
fontSize: constants.typography.fontSize.sm,
|
|
404
383
|
fontSizeSM: constants.typography.fontSize.xs,
|
|
405
384
|
},
|
|
@@ -410,18 +389,12 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
410
389
|
colorInfo: colors.semantic.info.main,
|
|
411
390
|
colorWarning: colors.semantic.warning.main,
|
|
412
391
|
textFontSize: constants.typography.fontSize.xs,
|
|
413
|
-
textFontSizeSM: 10,
|
|
414
|
-
indicatorHeight: 6,
|
|
415
|
-
indicatorHeightSM: 6,
|
|
416
392
|
},
|
|
417
393
|
Avatar: {
|
|
418
394
|
colorBgContainer: colors.neutral[2],
|
|
419
395
|
colorText: colors.text.secondary,
|
|
420
396
|
colorTextLightSolid: colors.text.inverse,
|
|
421
|
-
|
|
422
|
-
containerSizeLG: 40,
|
|
423
|
-
containerSizeSM: 24,
|
|
424
|
-
borderRadius: constants.componentRadius.avatar,
|
|
397
|
+
borderRadius: constants.radius.avatar,
|
|
425
398
|
groupOverlapping: -8,
|
|
426
399
|
groupSpace: constants.spacing[1],
|
|
427
400
|
},
|
|
@@ -431,7 +404,7 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
431
404
|
fullBg: colors.surface.card,
|
|
432
405
|
fullPanelBg: colors.surface.card,
|
|
433
406
|
itemActiveBg: colors.semantic.info.subtle,
|
|
434
|
-
borderRadius: constants.
|
|
407
|
+
borderRadius: constants.radius.card,
|
|
435
408
|
},
|
|
436
409
|
Collapse: {
|
|
437
410
|
colorBgContainer: colors.surface.card,
|
|
@@ -439,19 +412,15 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
439
412
|
headerBg: colors.surface.page,
|
|
440
413
|
headerPadding: `${constants.spacing[3]}px ${constants.spacing[4]}px`,
|
|
441
414
|
contentPadding: `${constants.spacing[4]}px ${constants.spacing[4]}px`,
|
|
442
|
-
borderRadiusLG: constants.
|
|
415
|
+
borderRadiusLG: constants.radius.card,
|
|
443
416
|
},
|
|
444
417
|
Carousel: {
|
|
445
418
|
colorBgContainer: colors.surface.card,
|
|
446
|
-
dotWidth: 8,
|
|
447
|
-
dotHeight: 8,
|
|
448
|
-
dotActiveWidth: 24,
|
|
449
419
|
},
|
|
450
420
|
Tree: {
|
|
451
421
|
colorBgContainer: colors.surface.card,
|
|
452
422
|
nodeHoverBg: colors.surface.interactive,
|
|
453
423
|
nodeSelectedBg: colors.surface.selected,
|
|
454
|
-
titleHeight: 32,
|
|
455
424
|
borderRadius: constants.radius.sm,
|
|
456
425
|
},
|
|
457
426
|
// ========================================
|
|
@@ -472,7 +441,7 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
472
441
|
colorInfoText: colors.semantic.info.main,
|
|
473
442
|
defaultPadding: `${constants.spacing[3]}px ${constants.spacing[4]}px`,
|
|
474
443
|
withDescriptionPadding: `${constants.spacing[4]}px ${constants.spacing[5]}px`,
|
|
475
|
-
borderRadiusLG: constants.
|
|
444
|
+
borderRadiusLG: constants.radius.card,
|
|
476
445
|
},
|
|
477
446
|
Modal: {
|
|
478
447
|
contentBg: colors.surface.overlay,
|
|
@@ -480,13 +449,13 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
480
449
|
footerBg: colors.surface.overlay,
|
|
481
450
|
titleColor: colors.text.primary,
|
|
482
451
|
colorBgMask: isDark ? 'rgba(0, 0, 0, 0.65)' : 'rgba(0, 0, 0, 0.45)',
|
|
483
|
-
borderRadiusLG: constants.
|
|
484
|
-
boxShadow:
|
|
452
|
+
borderRadiusLG: constants.radius.modal,
|
|
453
|
+
boxShadow: constants.shadow.modal,
|
|
485
454
|
},
|
|
486
455
|
Drawer: {
|
|
487
456
|
colorBgElevated: colors.surface.overlay,
|
|
488
457
|
colorBgMask: isDark ? 'rgba(0, 0, 0, 0.65)' : 'rgba(0, 0, 0, 0.45)',
|
|
489
|
-
borderRadiusLG: constants.
|
|
458
|
+
borderRadiusLG: constants.radius.modal,
|
|
490
459
|
footerPaddingBlock: constants.spacing[4],
|
|
491
460
|
footerPaddingInline: constants.spacing[6],
|
|
492
461
|
},
|
|
@@ -494,22 +463,22 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
494
463
|
colorBgElevated: colors.surface.overlay,
|
|
495
464
|
colorText: colors.text.primary,
|
|
496
465
|
colorTextHeading: colors.text.primary,
|
|
497
|
-
borderRadiusLG: constants.
|
|
498
|
-
boxShadow:
|
|
466
|
+
borderRadiusLG: constants.radius.card,
|
|
467
|
+
boxShadow: constants.shadow.popover,
|
|
499
468
|
padding: constants.spacing[4],
|
|
500
469
|
paddingContentHorizontal: constants.spacing[4],
|
|
501
470
|
},
|
|
502
471
|
Message: {
|
|
503
472
|
contentBg: colors.surface.overlay,
|
|
504
473
|
contentPadding: `${constants.spacing[2]}px ${constants.spacing[4]}px`,
|
|
505
|
-
borderRadiusLG: constants.
|
|
506
|
-
boxShadow:
|
|
474
|
+
borderRadiusLG: constants.radius.card,
|
|
475
|
+
boxShadow: constants.shadow.popover,
|
|
507
476
|
},
|
|
508
477
|
Popconfirm: {
|
|
509
478
|
colorBgElevated: colors.surface.overlay,
|
|
510
479
|
colorWarning: colors.semantic.warning.main,
|
|
511
|
-
borderRadiusLG: constants.
|
|
512
|
-
boxShadowSecondary:
|
|
480
|
+
borderRadiusLG: constants.radius.card,
|
|
481
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
513
482
|
},
|
|
514
483
|
Progress: {
|
|
515
484
|
defaultColor: colors.link.default,
|
|
@@ -557,12 +526,8 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
557
526
|
darkItemHoverColor: colors.absolute.white,
|
|
558
527
|
darkItemSelectedBg: colors.link.default,
|
|
559
528
|
darkItemSelectedColor: colors.absolute.white,
|
|
560
|
-
itemBorderRadius: constants.
|
|
561
|
-
itemHeight: 40,
|
|
529
|
+
itemBorderRadius: constants.radius.input,
|
|
562
530
|
itemPaddingInline: constants.spacing[4],
|
|
563
|
-
iconSize: 16,
|
|
564
|
-
collapsedIconSize: 16,
|
|
565
|
-
collapsedWidth: 64,
|
|
566
531
|
},
|
|
567
532
|
Breadcrumb: {
|
|
568
533
|
itemColor: colors.text.secondary,
|
|
@@ -582,8 +547,6 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
582
547
|
itemBg: colors.surface.card,
|
|
583
548
|
itemLinkBg: colors.surface.card,
|
|
584
549
|
itemInputBg: colors.surface.card,
|
|
585
|
-
itemSize: 32,
|
|
586
|
-
itemSizeSM: 24,
|
|
587
550
|
borderRadius: constants.radius.sm,
|
|
588
551
|
},
|
|
589
552
|
Steps: {
|
|
@@ -591,9 +554,6 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
591
554
|
colorText: colors.text.secondary,
|
|
592
555
|
colorTextDescription: colors.text.tertiary,
|
|
593
556
|
colorBorderSecondary: colors.border.default,
|
|
594
|
-
dotSize: 8,
|
|
595
|
-
iconSize: 32,
|
|
596
|
-
iconSizeSM: 24,
|
|
597
557
|
},
|
|
598
558
|
Tabs: {
|
|
599
559
|
colorPrimary: colors.link.default,
|
|
@@ -620,9 +580,9 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
620
580
|
colorBgElevated: colors.surface.overlay,
|
|
621
581
|
controlItemBgHover: colors.surface.interactive,
|
|
622
582
|
controlItemBgActive: colors.surface.selected,
|
|
623
|
-
boxShadowSecondary:
|
|
583
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
624
584
|
paddingBlock: constants.spacing[1],
|
|
625
|
-
borderRadiusLG: constants.
|
|
585
|
+
borderRadiusLG: constants.radius.card,
|
|
626
586
|
},
|
|
627
587
|
// ========================================
|
|
628
588
|
// LAYOUT
|
|
@@ -633,16 +593,12 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
633
593
|
colorBgTrigger: colors.absolute.black,
|
|
634
594
|
siderBg: colors.absolute.black,
|
|
635
595
|
headerBg: colors.surface.card,
|
|
636
|
-
headerHeight: 64,
|
|
637
596
|
headerPadding: `0 ${constants.spacing[6]}px`,
|
|
638
597
|
footerBg: colors.surface.card,
|
|
639
598
|
footerPadding: `${constants.spacing[6]}px ${constants.spacing[12]}px`,
|
|
640
599
|
bodyBg: colors.surface.page,
|
|
641
|
-
triggerHeight: 48,
|
|
642
600
|
triggerBg: colors.absolute.black,
|
|
643
601
|
triggerColor: colors.absolute.white,
|
|
644
|
-
zeroTriggerWidth: 36,
|
|
645
|
-
zeroTriggerHeight: 42,
|
|
646
602
|
lightSiderBg: colors.surface.card,
|
|
647
603
|
lightTriggerBg: colors.surface.card,
|
|
648
604
|
lightTriggerColor: colors.text.primary,
|
|
@@ -650,7 +606,6 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
650
606
|
Divider: {
|
|
651
607
|
colorSplit: colors.border.subtle,
|
|
652
608
|
colorText: colors.text.tertiary,
|
|
653
|
-
orientationMargin: 0.05,
|
|
654
609
|
verticalMarginInline: constants.spacing[2],
|
|
655
610
|
},
|
|
656
611
|
// ========================================
|
|
@@ -680,13 +635,13 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
680
635
|
colorBgSpotlight: colors.neutral[4],
|
|
681
636
|
colorTextLightSolid: colors.text.inverse,
|
|
682
637
|
borderRadius: constants.radius.sm,
|
|
683
|
-
boxShadowSecondary:
|
|
638
|
+
boxShadowSecondary: constants.shadow.tooltip,
|
|
684
639
|
},
|
|
685
640
|
Popover: {
|
|
686
641
|
colorBgElevated: colors.surface.overlay,
|
|
687
642
|
colorText: colors.text.primary,
|
|
688
|
-
borderRadiusLG: constants.
|
|
689
|
-
boxShadowSecondary:
|
|
643
|
+
borderRadiusLG: constants.radius.card,
|
|
644
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
690
645
|
padding: constants.spacing[3],
|
|
691
646
|
},
|
|
692
647
|
Image: {
|
|
@@ -707,14 +662,14 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
707
662
|
Tour: {
|
|
708
663
|
colorBgElevated: colors.surface.overlay,
|
|
709
664
|
colorPrimary: colors.link.default,
|
|
710
|
-
borderRadius: constants.
|
|
711
|
-
boxShadowSecondary:
|
|
665
|
+
borderRadius: constants.radius.card,
|
|
666
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
712
667
|
},
|
|
713
668
|
FloatButton: {
|
|
714
669
|
colorBgElevated: colors.surface.overlay,
|
|
715
670
|
colorPrimary: colors.link.default,
|
|
716
|
-
borderRadiusLG: constants.
|
|
717
|
-
boxShadow:
|
|
671
|
+
borderRadiusLG: constants.radius.avatar,
|
|
672
|
+
boxShadow: constants.shadow.popover,
|
|
718
673
|
},
|
|
719
674
|
Segmented: {
|
|
720
675
|
colorBgLayout: colors.neutral[2],
|
|
@@ -732,7 +687,7 @@ export const buildAntDTheme = (colors, constants) => {
|
|
|
732
687
|
colorBorder: colors.border.default,
|
|
733
688
|
controlItemBgHover: colors.surface.interactive,
|
|
734
689
|
controlItemBgActive: colors.surface.selected,
|
|
735
|
-
boxShadowSecondary:
|
|
690
|
+
boxShadowSecondary: constants.shadow.popover,
|
|
736
691
|
},
|
|
737
692
|
Transfer: {
|
|
738
693
|
colorBgContainer: colors.surface.card,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ThemeConfig } from 'antd';
|
|
3
|
-
import {
|
|
4
|
-
import { ColorPalette, ThemeMode } from './tokens/
|
|
3
|
+
import { UIConstants } from './tokens/constants.js';
|
|
4
|
+
import { ColorPalette, ThemeMode } from './tokens/colors.js';
|
|
5
5
|
/**
|
|
6
6
|
* Theme context value - now includes constants!
|
|
7
7
|
*/
|
|
8
8
|
export interface TemboTheme {
|
|
9
9
|
colors: ColorPalette;
|
|
10
|
-
constants:
|
|
10
|
+
constants: UIConstants;
|
|
11
11
|
mode: ThemeMode;
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
@@ -3,10 +3,10 @@ import React from 'react';
|
|
|
3
3
|
import { ConfigProvider } from 'antd';
|
|
4
4
|
import { defaultUIConstants } from './tokens/constants.js';
|
|
5
5
|
import { buildAntDTheme } from './theme-config.js';
|
|
6
|
-
import { buildColorPalette } from './tokens/
|
|
6
|
+
import { buildColorPalette } from './tokens/colors.js';
|
|
7
7
|
const TemboThemeContext = React.createContext({
|
|
8
8
|
colors: buildColorPalette('light'),
|
|
9
|
-
constants: defaultUIConstants,
|
|
9
|
+
constants: defaultUIConstants,
|
|
10
10
|
mode: 'light',
|
|
11
11
|
});
|
|
12
12
|
/**
|
|
@@ -14,17 +14,15 @@ const TemboThemeContext = React.createContext({
|
|
|
14
14
|
*/
|
|
15
15
|
export const TemboThemeProvider = ({ children, mode = 'light', antdThemeOverrides, }) => {
|
|
16
16
|
const colors = React.useMemo(() => buildColorPalette(mode), [mode]);
|
|
17
|
-
const constants = React.useMemo(() => defaultUIConstants,
|
|
18
|
-
[]);
|
|
17
|
+
const constants = React.useMemo(() => defaultUIConstants, []);
|
|
19
18
|
const antdTheme = React.useMemo(() => {
|
|
20
19
|
var _a, _b;
|
|
21
|
-
const baseTheme = buildAntDTheme(colors, constants);
|
|
20
|
+
const baseTheme = buildAntDTheme(colors, constants);
|
|
22
21
|
if (!antdThemeOverrides)
|
|
23
22
|
return baseTheme;
|
|
24
23
|
return Object.assign(Object.assign({}, baseTheme), { token: Object.assign(Object.assign({}, baseTheme.token), ((_a = antdThemeOverrides.token) !== null && _a !== void 0 ? _a : {})), components: Object.assign(Object.assign({}, baseTheme.components), ((_b = antdThemeOverrides.components) !== null && _b !== void 0 ? _b : {})) });
|
|
25
24
|
}, [colors, constants, antdThemeOverrides]);
|
|
26
|
-
const contextValue = React.useMemo(() => ({ colors, constants, mode }),
|
|
27
|
-
[colors, constants, mode]);
|
|
25
|
+
const contextValue = React.useMemo(() => ({ colors, constants, mode }), [colors, constants, mode]);
|
|
28
26
|
return (_jsx(TemboThemeContext.Provider, { value: contextValue, children: _jsx(ConfigProvider, { theme: antdTheme, children: children }) }));
|
|
29
27
|
};
|
|
30
28
|
/**
|
|
@@ -4,12 +4,10 @@
|
|
|
4
4
|
* Monochrome-first design system with purposeful color usage.
|
|
5
5
|
*
|
|
6
6
|
* Philosophy:
|
|
7
|
-
* -
|
|
8
|
-
* -
|
|
9
|
-
* - Standard blue for links
|
|
7
|
+
* - 6 neutral tones for optimal contrast and clean mapping
|
|
8
|
+
* - Monochrome foundation with semantic color accents
|
|
9
|
+
* - Standard blue for links and focus states
|
|
10
10
|
* - Theme-aware: entire system adapts to light/dark mode
|
|
11
|
-
*
|
|
12
|
-
* Inspired by: Wise, Linear, Apple HIG
|
|
13
11
|
*/
|
|
14
12
|
export type ThemeMode = 'light' | 'dark';
|
|
15
13
|
/**
|
|
@@ -30,19 +28,24 @@ export interface ColorScale {
|
|
|
30
28
|
export interface ColorPalette {
|
|
31
29
|
mode: ThemeMode;
|
|
32
30
|
/**
|
|
33
|
-
* Monochrome foundation -
|
|
31
|
+
* Monochrome foundation - 6 neutral tones
|
|
34
32
|
* Theme-aware: inverts in dark mode
|
|
33
|
+
* Optimized for accessibility with proper contrast ratios
|
|
35
34
|
*
|
|
36
|
-
* 1 = Brightest (backgrounds)
|
|
37
|
-
* 2 =
|
|
38
|
-
* 3 =
|
|
39
|
-
* 4 =
|
|
35
|
+
* 1 = Brightest (pure backgrounds)
|
|
36
|
+
* 2 = Very light (page backgrounds)
|
|
37
|
+
* 3 = Light (hover states, subtle borders)
|
|
38
|
+
* 4 = Medium (default borders)
|
|
39
|
+
* 5 = Dark (secondary text, strong borders)
|
|
40
|
+
* 6 = Darkest (primary text, actions)
|
|
40
41
|
*/
|
|
41
42
|
neutral: {
|
|
42
43
|
1: string;
|
|
43
44
|
2: string;
|
|
44
45
|
3: string;
|
|
45
46
|
4: string;
|
|
47
|
+
5: string;
|
|
48
|
+
6: string;
|
|
46
49
|
};
|
|
47
50
|
/**
|
|
48
51
|
* Absolute colors - never change
|
|
@@ -53,7 +56,7 @@ export interface ColorPalette {
|
|
|
53
56
|
};
|
|
54
57
|
/**
|
|
55
58
|
* Links - standard web colors
|
|
56
|
-
*
|
|
59
|
+
* Also used for focus rings (blue is universal web standard)
|
|
57
60
|
*/
|
|
58
61
|
link: {
|
|
59
62
|
/** Default link color - standard blue */
|
|
@@ -88,8 +91,7 @@ export interface ColorPalette {
|
|
|
88
91
|
orange: ColorScale;
|
|
89
92
|
};
|
|
90
93
|
/**
|
|
91
|
-
* Surface hierarchy
|
|
92
|
-
* Convenience tokens for common surfaces
|
|
94
|
+
* Surface hierarchy
|
|
93
95
|
*/
|
|
94
96
|
surface: {
|
|
95
97
|
/** Main page background */
|
|
@@ -106,18 +108,18 @@ export interface ColorPalette {
|
|
|
106
108
|
nested: string;
|
|
107
109
|
};
|
|
108
110
|
/**
|
|
109
|
-
* Border colors
|
|
111
|
+
* Border colors
|
|
110
112
|
*/
|
|
111
113
|
border: {
|
|
112
114
|
/** Subtle borders - dividers, separators */
|
|
113
115
|
subtle: string;
|
|
114
116
|
/** Default borders - form inputs, cards */
|
|
115
117
|
default: string;
|
|
116
|
-
/** Strong borders - emphasis
|
|
118
|
+
/** Strong borders - emphasis */
|
|
117
119
|
strong: string;
|
|
118
120
|
};
|
|
119
121
|
/**
|
|
120
|
-
* Text colors
|
|
122
|
+
* Text colors
|
|
121
123
|
*/
|
|
122
124
|
text: {
|
|
123
125
|
/** Primary text - headlines, body copy */
|
|
@@ -131,6 +133,20 @@ export interface ColorPalette {
|
|
|
131
133
|
/** Text on dark backgrounds */
|
|
132
134
|
inverse: string;
|
|
133
135
|
};
|
|
136
|
+
/**
|
|
137
|
+
* Monochrome actions - for buttons and interactive elements
|
|
138
|
+
* Inverts automatically with theme mode
|
|
139
|
+
*/
|
|
140
|
+
action: {
|
|
141
|
+
/** Default action background */
|
|
142
|
+
default: string;
|
|
143
|
+
/** Hover state background */
|
|
144
|
+
hover: string;
|
|
145
|
+
/** Disabled state background */
|
|
146
|
+
disabled: string;
|
|
147
|
+
/** Text/icons on action backgrounds */
|
|
148
|
+
contrast: string;
|
|
149
|
+
};
|
|
134
150
|
}
|
|
135
151
|
/**
|
|
136
152
|
* Build color palette for given theme mode
|
|
@@ -146,7 +162,6 @@ export declare const lightPalette: ColorPalette;
|
|
|
146
162
|
export declare const darkPalette: ColorPalette;
|
|
147
163
|
/**
|
|
148
164
|
* Color palette overrides (for custom theming)
|
|
149
|
-
* Allows partial overrides while maintaining type safety
|
|
150
165
|
*/
|
|
151
166
|
export type ColorOverrides = {
|
|
152
167
|
neutral?: Partial<ColorPalette['neutral']>;
|