@temboplus/frontend-react-core 0.1.3-beta.11 → 0.1.3-beta.12
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.js +1 -1
- package/dist/dialogs/index.cjs.js +1 -1
- package/dist/dialogs/index.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/notifications/index.cjs.js +1 -1
- package/dist/notifications/index.js +1 -1
- package/dist/providers.d.ts +0 -21
- package/dist/providers.js +0 -21
- package/dist/{tembo-notify-Bh92g5d-.js → tembo-notify-BUN8_mKb.js} +2 -2
- package/dist/{tembo-notify-Bh92g5d-.js.map → tembo-notify-BUN8_mKb.js.map} +1 -1
- package/dist/{tembo-notify-D_LOB3jW.js → tembo-notify-D0uYvwZP.js} +2 -2
- package/dist/{tembo-notify-D_LOB3jW.js.map → tembo-notify-D0uYvwZP.js.map} +1 -1
- package/dist/theme/index.cjs.js +1 -1
- package/dist/theme/index.js +1 -1
- package/dist/theme/theme-config.js +19 -0
- package/dist/theme/theme-provider.d.ts +0 -62
- package/dist/theme/theme-provider.js +0 -62
- package/dist/{theme-provider-DH1PzDC8.js → theme-provider-BsQRkig_.js} +3 -3
- package/dist/theme-provider-BsQRkig_.js.map +1 -0
- package/dist/theme-provider-C44BTeC4.js +11 -0
- package/dist/theme-provider-C44BTeC4.js.map +1 -0
- package/package.json +1 -1
- package/dist/theme-provider-C31WJ-NK.js +0 -11
- package/dist/theme-provider-C31WJ-NK.js.map +0 -1
- package/dist/theme-provider-DH1PzDC8.js.map +0 -1
package/dist/alerts/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("../theme-provider-
|
|
1
|
+
"use strict";var e=require("../theme-provider-C44BTeC4.js"),r=require("antd");require("lodash");var o=require("../InfoCircleOutlined-DR9DmuN-.js"),t=require("../CloseCircleOutlined-CMilRURi.js");require("react");const{Text:n}=r.Typography;exports.TemboAlert=({type:s="info",message:i,description:c,icon:x,showIcon:l=!0,style:a})=>{const{colors:d,constants:u}=e.useTemboTheme(),g=(e=>{switch(e){case"success":return{background:d.success.bg,border:d.success.main,iconColor:d.success.main,textColor:d.success.text};case"warning":return{background:d.warning.bg,border:d.warning.main,iconColor:d.warning.main,textColor:d.warning.text};case"error":return{background:d.error.bg,border:d.error.main,iconColor:d.error.main,textColor:d.error.text};default:return{background:d.info.bg,border:d.info.main,iconColor:d.info.main,textColor:d.info.text}}})(s),p=x||(r=>{switch(r){case"success":return e.jsxRuntimeExports.jsx(o.RefIcon$2,{});case"warning":return e.jsxRuntimeExports.jsx(o.RefIcon$1,{});case"error":return e.jsxRuntimeExports.jsx(t.RefIcon,{});default:return e.jsxRuntimeExports.jsx(o.RefIcon,{})}})(s),j=l?22:0;return e.jsxRuntimeExports.jsx("div",{style:Object.assign({width:"100%",padding:"12px 16px",backgroundColor:g.background,borderRadius:u.radius.sm,borderLeft:`3px solid ${g.border}`},a),children:e.jsxRuntimeExports.jsxs(r.Space,{direction:"vertical",size:i?6:0,style:{width:"100%"},children:[i&&e.jsxRuntimeExports.jsxs(r.Flex,{gap:8,align:"center",children:[l&&e.jsxRuntimeExports.jsx("div",{style:{color:g.iconColor,fontSize:14,lineHeight:1},children:p}),"string"==typeof i?e.jsxRuntimeExports.jsx(n,{strong:!0,style:{fontSize:13,color:g.textColor,lineHeight:1.4},children:i}):i]}),c&&e.jsxRuntimeExports.jsxs(r.Flex,{gap:8,align:"flex-start",children:[!i&&l&&e.jsxRuntimeExports.jsx("div",{style:{color:g.iconColor,fontSize:14,lineHeight:1,marginTop:1},children:p}),"string"==typeof c?e.jsxRuntimeExports.jsx(n,{style:{fontSize:12,color:d.text.secondary,lineHeight:1.5,paddingLeft:i&&l?j:0},children:c}):e.jsxRuntimeExports.jsx("div",{style:{fontSize:12,color:d.text.secondary,lineHeight:1.5,paddingLeft:i&&l?j:0},children:c})]})]})})};
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/alerts/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as r,j as e}from"../theme-provider-
|
|
1
|
+
import{u as r,j as e}from"../theme-provider-BsQRkig_.js";import{Typography as o,Space as n,Flex as t}from"antd";import"lodash";import{R as i,a as s,b as c}from"../InfoCircleOutlined-Hx86sClq.js";import{R as a}from"../CloseCircleOutlined-CSHx89Jn.js";import"react";const{Text:l}=o,d=({type:o="info",message:d,description:g,icon:x,showIcon:u=!0,style:f})=>{const{colors:m,constants:h}=r(),p=(r=>{switch(r){case"success":return{background:m.success.bg,border:m.success.main,iconColor:m.success.main,textColor:m.success.text};case"warning":return{background:m.warning.bg,border:m.warning.main,iconColor:m.warning.main,textColor:m.warning.text};case"error":return{background:m.error.bg,border:m.error.main,iconColor:m.error.main,textColor:m.error.text};default:return{background:m.info.bg,border:m.info.main,iconColor:m.info.main,textColor:m.info.text}}})(o),b=x||(r=>{switch(r){case"success":return e.jsx(c,{});case"warning":return e.jsx(s,{});case"error":return e.jsx(a,{});default:return e.jsx(i,{})}})(o),j=u?22:0;return e.jsx("div",{style:Object.assign({width:"100%",padding:"12px 16px",backgroundColor:p.background,borderRadius:h.radius.sm,borderLeft:`3px solid ${p.border}`},f),children:e.jsxs(n,{direction:"vertical",size:d?6:0,style:{width:"100%"},children:[d&&e.jsxs(t,{gap:8,align:"center",children:[u&&e.jsx("div",{style:{color:p.iconColor,fontSize:14,lineHeight:1},children:b}),"string"==typeof d?e.jsx(l,{strong:!0,style:{fontSize:13,color:p.textColor,lineHeight:1.4},children:d}):d]}),g&&e.jsxs(t,{gap:8,align:"flex-start",children:[!d&&u&&e.jsx("div",{style:{color:p.iconColor,fontSize:14,lineHeight:1,marginTop:1},children:b}),"string"==typeof g?e.jsx(l,{style:{fontSize:12,color:m.text.secondary,lineHeight:1.5,paddingLeft:d&&u?j:0},children:g}):e.jsx("div",{style:{fontSize:12,color:m.text.secondary,lineHeight:1.5,paddingLeft:d&&u?j:0},children:g})]})]})})};export{d as TemboAlert};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("../theme-provider-
|
|
1
|
+
"use strict";var e=require("../theme-provider-C44BTeC4.js"),t=require("antd"),n=require("@ebay/nice-modal-react");require("lodash");var s=require("../InfoCircleOutlined-DR9DmuN-.js"),r=require("react");function o(e){return e&&e.__esModule?e:{default:e}}function c(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,s.get?s:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var a=o(n),i=c(r),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},u.apply(this,arguments)}const m=(e,t)=>i.createElement(s.Icon,u({},e,{ref:t,icon:l})),x=i.forwardRef(m);
|
|
2
2
|
/** */"production"!==process.env.NODE_ENV&&(x.displayName="QuestionCircleOutlined");var d={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"};function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},j.apply(this,arguments)}const p=(e,t)=>i.createElement(s.Icon,j({},e,{ref:t,icon:d})),f=i.forwardRef(p);
|
|
3
3
|
/** */"production"!==process.env.NODE_ENV&&(f.displayName="WarningOutlined");const g=a.default.create(s=>{var r,o,c;const a=n.useModal();return e.jsxRuntimeExports.jsx(t.Modal,{open:a.visible,title:s.title,onOk:async()=>{s.onOk&&await s.onOk(),a.resolve(!0),a.remove()},onCancel:()=>{s.onCancel&&s.onCancel(),a.resolve(!1),a.remove()},okText:null!==(r=s.okText)&&void 0!==r?r:"OK",cancelText:null!==(o=s.cancelText)&&void 0!==o?o:"Cancel",okButtonProps:{danger:s.okDanger,type:null!==(c=s.okType)&&void 0!==c?c:"primary"},centered:!0,destroyOnClose:!0,children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",gap:12,alignItems:"flex-start"},children:[s.icon&&e.jsxRuntimeExports.jsx("div",{style:{fontSize:22,marginTop:2},children:s.icon}),e.jsxRuntimeExports.jsx("div",{style:{flex:1},children:s.content})]})})});const h=()=>{const{colors:t}=e.useTemboTheme();return e.jsxRuntimeExports.jsx(s.RefIcon$1,{style:{color:t.error.main}})},b=()=>{const{colors:t}=e.useTemboTheme();return e.jsxRuntimeExports.jsx(f,{style:{color:t.warning.main}})},v=()=>{const{colors:t}=e.useTemboTheme();return e.jsxRuntimeExports.jsx(s.RefIcon,{style:{color:t.info.main}})},y=()=>{const{colors:t}=e.useTemboTheme();return e.jsxRuntimeExports.jsx(s.RefIcon$2,{style:{color:t.success.main}})},O=()=>{const{colors:t}=e.useTemboTheme();return e.jsxRuntimeExports.jsx(x,{style:{color:t.primary.main}})};exports.ConfirmDialog=g,exports.TemboConfirm=class{static async danger(t){return a.default.show(g,Object.assign(Object.assign({},t),{icon:e.jsxRuntimeExports.jsx(h,{}),okDanger:!0,okType:"primary"}))}static async warning(t){return a.default.show(g,Object.assign(Object.assign({},t),{icon:e.jsxRuntimeExports.jsx(b,{})}))}static async info(t){return a.default.show(g,Object.assign(Object.assign({},t),{icon:e.jsxRuntimeExports.jsx(v,{})}))}static async success(t){return a.default.show(g,Object.assign(Object.assign({},t),{icon:e.jsxRuntimeExports.jsx(y,{})}))}static async confirm(t){return a.default.show(g,Object.assign(Object.assign({},t),{icon:e.jsxRuntimeExports.jsx(O,{})}))}};
|
|
4
4
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/dialogs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,u as n}from"../theme-provider-
|
|
1
|
+
import{j as e,u as n}from"../theme-provider-BsQRkig_.js";import{Modal as t}from"antd";import s,{useModal as r}from"@ebay/nice-modal-react";import"lodash";import{I as o,a as c,R as a,b as i}from"../InfoCircleOutlined-Hx86sClq.js";import*as l from"react";var m={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"};function p(){return p=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},p.apply(this,arguments)}const d=(e,n)=>l.createElement(o,p({},e,{ref:n,icon:m})),u=l.forwardRef(d);
|
|
2
2
|
/** */"production"!==process.env.NODE_ENV&&(u.displayName="QuestionCircleOutlined");var g={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M464 720a48 48 0 1096 0 48 48 0 10-96 0zm16-304v184c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V416c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8zm475.7 440l-416-720c-6.2-10.7-16.9-16-27.7-16s-21.6 5.3-27.7 16l-416 720C56 877.4 71.4 904 96 904h832c24.6 0 40-26.6 27.7-48zm-783.5-27.9L512 239.9l339.8 588.2H172.2z"}}]},name:"warning",theme:"outlined"};function j(){return j=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s])}return e},j.apply(this,arguments)}const f=(e,n)=>l.createElement(o,j({},e,{ref:n,icon:g})),y=l.forwardRef(f);
|
|
3
3
|
/** */"production"!==process.env.NODE_ENV&&(y.displayName="WarningOutlined");const v=s.create(n=>{var s,o,c;const a=r();return e.jsx(t,{open:a.visible,title:n.title,onOk:async()=>{n.onOk&&await n.onOk(),a.resolve(!0),a.remove()},onCancel:()=>{n.onCancel&&n.onCancel(),a.resolve(!1),a.remove()},okText:null!==(s=n.okText)&&void 0!==s?s:"OK",cancelText:null!==(o=n.cancelText)&&void 0!==o?o:"Cancel",okButtonProps:{danger:n.okDanger,type:null!==(c=n.okType)&&void 0!==c?c:"primary"},centered:!0,destroyOnClose:!0,children:e.jsxs("div",{style:{display:"flex",gap:12,alignItems:"flex-start"},children:[n.icon&&e.jsx("div",{style:{fontSize:22,marginTop:2},children:n.icon}),e.jsx("div",{style:{flex:1},children:n.content})]})})});class h{static async danger(n){return s.show(v,Object.assign(Object.assign({},n),{icon:e.jsx(O,{}),okDanger:!0,okType:"primary"}))}static async warning(n){return s.show(v,Object.assign(Object.assign({},n),{icon:e.jsx(x,{})}))}static async info(n){return s.show(v,Object.assign(Object.assign({},n),{icon:e.jsx(b,{})}))}static async success(n){return s.show(v,Object.assign(Object.assign({},n),{icon:e.jsx(w,{})}))}static async confirm(n){return s.show(v,Object.assign(Object.assign({},n),{icon:e.jsx(C,{})}))}}const O=()=>{const{colors:t}=n();return e.jsx(c,{style:{color:t.error.main}})},x=()=>{const{colors:t}=n();return e.jsx(y,{style:{color:t.warning.main}})},b=()=>{const{colors:t}=n();return e.jsx(a,{style:{color:t.info.main}})},w=()=>{const{colors:t}=n();return e.jsx(i,{style:{color:t.success.main}})},C=()=>{const{colors:t}=n();return e.jsx(u,{style:{color:t.primary.main}})};export{v as ConfirmDialog,h as TemboConfirm};
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var n=require("./theme-provider-
|
|
1
|
+
"use strict";var n=require("./theme-provider-C44BTeC4.js"),e=require("@ebay/nice-modal-react"),t=require("tslib"),s=require("react"),i=require("react-toastify");require("lodash");var r=require("./tembo-notify-D0uYvwZP.js");function o(n){return n&&n.__esModule?n:{default:n}}require("antd"),require("./InfoCircleOutlined-DR9DmuN-.js"),require("./CloseCircleOutlined-CMilRURi.js");var a=o(e);const l=e=>n.jsxRuntimeExports.jsx(a.default.Provider,{children:e.children}),d=e=>{var{showCloseButton:o=!1,showProgressBar:a=!1}=e,l=t.__rest(e,["showCloseButton","showProgressBar"]);const{colors:d,constants:c}=n.useTemboTheme();return s.useEffect(()=>{r.TemboNotify.init(d,c)},[d,c]),n.jsxRuntimeExports.jsxs(n.jsxRuntimeExports.Fragment,{children:[n.jsxRuntimeExports.jsx(i.ToastContainer,Object.assign({closeButton:o,hideProgressBar:!a},l)),n.jsxRuntimeExports.jsx("style",{children:`\n .Toastify__toast {\n font-family: ${c.typography.fontFamily};\n line-height: 1.5;\n display: flex;\n align-items: center; /* center icon + content */\n }\n\n .Toastify__toast-body {\n padding: 0;\n margin: 0;\n display: flex;\n align-items: flex-start;\n }\n\n .Toastify__toast-icon {\n width: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-inline-end: 6px; /* tighter spacing */\n }\n\n .Toastify__progress-bar {\n display: none;\n }\n\n .Toastify__close-button {\n opacity: 0.5;\n transition: opacity 0.2s ease;\n }\n\n .Toastify__close-button:hover {\n opacity: 1;\n }\n\n /* Force progress bar hidden in case someone enables it unintentionally */\n .Toastify__progress-bar {\n display: none;\n }\n\n /* Smooth entrance animation */\n @keyframes toastSlideIn {\n from {\n transform: translateX(110%);\n opacity: 0;\n }\n to {\n transform: translateX(0);\n opacity: 1;\n }\n }\n\n .Toastify__toast--top-right {\n animation: toastSlideIn 0.3s ease-out;\n }\n\n /* Optional: full-width mobile behaviour */\n @media (max-width: 480px) {\n .Toastify__toast-container--top-right {\n right: 0;\n left: 0;\n padding: 0;\n width: 100vw;\n }\n\n .Toastify__toast {\n margin-bottom: 0;\n border-radius: 0;\n }\n }\n `})]})};exports.TemboUIProviders=({children:e,mode:t,antdThemeOverrides:s})=>n.jsxRuntimeExports.jsx(n.TemboThemeProvider,{mode:t,antdThemeOverrides:s,children:n.jsxRuntimeExports.jsxs(l,{children:[e,n.jsxRuntimeExports.jsx(d,{})]})});
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../src/features/dialogs/modal-provider.tsx","../src/features/notifications/toast-container.tsx","../src/providers.tsx"],"sourcesContent":[null,null,null],"names":["TemboModalProvider","props","_jsx","NiceModal","Provider","children","TemboToastContainer","_a","showCloseButton","showProgressBar","rest","__rest","colors","constants","useTemboTheme","useEffect","TemboNotify","init","_jsxs","_Fragment","ToastContainer","Object","assign","closeButton","hideProgressBar","typography","fontFamily","mode","antdThemeOverrides","TemboThemeProvider"],"mappings":"sYAGA,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,
|
|
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","mode","antdThemeOverrides","TemboThemeProvider"],"mappings":"sYAGA,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,ovECtCW,EAC/DrB,WACAsB,OACAC,wBAGI1B,EAAAA,kBAAAA,IAAC2B,EAAAA,mBAAkB,CACfF,KAAMA,EACNC,mBAAoBA,WAEpBV,EAAAA,kBAAAA,KAAClB,EAAkB,CAAAK,SAAA,CACdA,EACDH,EAAAA,kBAAAA,IAACI,EAAmB"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{j as n,u as t,T as o}from"./theme-provider-
|
|
1
|
+
import{j as n,u as t,T as o}from"./theme-provider-BsQRkig_.js";import i from"@ebay/nice-modal-react";import{__rest as e}from"tslib";import{useEffect as s}from"react";import{ToastContainer as r}from"react-toastify";import"lodash";import{T as a}from"./tembo-notify-BUN8_mKb.js";import"antd";import"./InfoCircleOutlined-Hx86sClq.js";import"./CloseCircleOutlined-CSHx89Jn.js";const l=t=>n.jsx(i.Provider,{children:t.children}),m=o=>{var{showCloseButton:i=!1,showProgressBar:l=!1}=o,m=e(o,["showCloseButton","showProgressBar"]);const{colors:d,constants:c}=t();return s(()=>{a.init(d,c)},[d,c]),n.jsxs(n.Fragment,{children:[n.jsx(r,Object.assign({closeButton:i,hideProgressBar:!l},m)),n.jsx("style",{children:`\n .Toastify__toast {\n font-family: ${c.typography.fontFamily};\n line-height: 1.5;\n display: flex;\n align-items: center; /* center icon + content */\n }\n\n .Toastify__toast-body {\n padding: 0;\n margin: 0;\n display: flex;\n align-items: flex-start;\n }\n\n .Toastify__toast-icon {\n width: 18px;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-inline-end: 6px; /* tighter spacing */\n }\n\n .Toastify__progress-bar {\n display: none;\n }\n\n .Toastify__close-button {\n opacity: 0.5;\n transition: opacity 0.2s ease;\n }\n\n .Toastify__close-button:hover {\n opacity: 1;\n }\n\n /* Force progress bar hidden in case someone enables it unintentionally */\n .Toastify__progress-bar {\n display: none;\n }\n\n /* Smooth entrance animation */\n @keyframes toastSlideIn {\n from {\n transform: translateX(110%);\n opacity: 0;\n }\n to {\n transform: translateX(0);\n opacity: 1;\n }\n }\n\n .Toastify__toast--top-right {\n animation: toastSlideIn 0.3s ease-out;\n }\n\n /* Optional: full-width mobile behaviour */\n @media (max-width: 480px) {\n .Toastify__toast-container--top-right {\n right: 0;\n left: 0;\n padding: 0;\n width: 100vw;\n }\n\n .Toastify__toast {\n margin-bottom: 0;\n border-radius: 0;\n }\n }\n `})]})},d=({children:t,mode:i,antdThemeOverrides:e})=>n.jsx(o,{mode:i,antdThemeOverrides:e,children:n.jsxs(l,{children:[t,n.jsx(m,{})]})});export{d as TemboUIProviders};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.esm.js","sources":["../src/features/dialogs/modal-provider.tsx","../src/features/notifications/toast-container.tsx","../src/providers.tsx"],"sourcesContent":[null,null,null],"names":["TemboModalProvider","props","_jsx","NiceModal","Provider","children","TemboToastContainer","_a","showCloseButton","showProgressBar","rest","__rest","colors","constants","useTemboTheme","useEffect","TemboNotify","init","_jsxs","_Fragment","ToastContainer","Object","assign","closeButton","hideProgressBar","typography","fontFamily","TemboUIProviders","mode","antdThemeOverrides","TemboThemeProvider"],"mappings":"oXAGA,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,
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../src/features/dialogs/modal-provider.tsx","../src/features/notifications/toast-container.tsx","../src/providers.tsx"],"sourcesContent":[null,null,null],"names":["TemboModalProvider","props","_jsx","NiceModal","Provider","children","TemboToastContainer","_a","showCloseButton","showProgressBar","rest","__rest","colors","constants","useTemboTheme","useEffect","TemboNotify","init","_jsxs","_Fragment","ToastContainer","Object","assign","closeButton","hideProgressBar","typography","fontFamily","TemboUIProviders","mode","antdThemeOverrides","TemboThemeProvider"],"mappings":"oXAGA,MAAMA,EAAmDC,GAC9CC,EAAAA,IAACC,EAAUC,mBAAUH,EAAMI,WCsBhCC,EAA2DC,IAAA,IAAAC,gBAC7DA,GAAkB,EAAKC,gBACvBA,GAAkB,GAAKF,EACpBG,EAAIC,EAAAJ,EAHsD,CAAA,kBAAA,oBAK7D,MAAMK,OAAEA,EAAMC,UAAEA,GAAcC,IAM9B,OAJAC,EAAU,KACNC,EAAYC,KAAKL,EAAQC,IAC1B,CAACD,EAAQC,IAGRK,EAAAA,KAAAC,EAAAA,SAAA,CAAAd,SAAA,CACIH,EAAAA,IAACkB,EAAcC,OAAAC,OAAA,CACXC,YAAaf,EACbgB,iBAAkBf,GACdC,IAGRR,EAAAA,IAAA,QAAA,CAAAG,SAAQ,0EAEeQ,EAAUY,WAAWC,2tECtC3CC,EAAsD,EAC/DtB,WACAuB,OACAC,wBAGI3B,EAAAA,IAAC4B,EAAkB,CACfF,KAAMA,EACNC,mBAAoBA,WAEpBX,EAAAA,KAAClB,EAAkB,CAAAK,SAAA,CACdA,EACDH,EAAAA,IAACI,EAAmB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("../tembo-notify-
|
|
1
|
+
"use strict";var e=require("../tembo-notify-D0uYvwZP.js");require("tslib"),require("../theme-provider-C44BTeC4.js"),require("react"),require("react-toastify"),require("lodash"),require("../InfoCircleOutlined-DR9DmuN-.js"),require("../CloseCircleOutlined-CMilRURi.js"),require("antd"),exports.TemboNotify=e.TemboNotify,exports.buildToastConfigs=e.buildToastConfigs;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{T as TemboNotify,b as buildToastConfigs}from"../tembo-notify-
|
|
1
|
+
export{T as TemboNotify,b as buildToastConfigs}from"../tembo-notify-BUN8_mKb.js";import"tslib";import"../theme-provider-BsQRkig_.js";import"react";import"react-toastify";import"lodash";import"../InfoCircleOutlined-Hx86sClq.js";import"../CloseCircleOutlined-CSHx89Jn.js";import"antd";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/providers.d.ts
CHANGED
|
@@ -3,26 +3,5 @@ import { TemboThemeProviderProps } from './theme/theme-provider.js';
|
|
|
3
3
|
/**
|
|
4
4
|
* Top-level provider that wires up theme, modal and notifications
|
|
5
5
|
* for all Tembo UI components.
|
|
6
|
-
*
|
|
7
|
-
* Supports theme customization through colors and constants props.
|
|
8
|
-
* TemboToastContainer automatically syncs with theme changes.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* // Basic usage
|
|
13
|
-
* <TemboUIProviders>
|
|
14
|
-
* <App />
|
|
15
|
-
* </TemboUIProviders>
|
|
16
|
-
*
|
|
17
|
-
* // With custom colors
|
|
18
|
-
* <TemboUIProviders
|
|
19
|
-
* colors={{
|
|
20
|
-
* primary: { main: '#007bff' },
|
|
21
|
-
* action: { main: '#28a745' }
|
|
22
|
-
* }}
|
|
23
|
-
* >
|
|
24
|
-
* <App />
|
|
25
|
-
* </TemboUIProviders>
|
|
26
|
-
* ```
|
|
27
6
|
*/
|
|
28
7
|
export declare const TemboUIProviders: React.FC<TemboThemeProviderProps>;
|
package/dist/providers.js
CHANGED
|
@@ -5,27 +5,6 @@ import { TemboThemeProvider } from './theme/theme-provider.js';
|
|
|
5
5
|
/**
|
|
6
6
|
* Top-level provider that wires up theme, modal and notifications
|
|
7
7
|
* for all Tembo UI components.
|
|
8
|
-
*
|
|
9
|
-
* Supports theme customization through colors and constants props.
|
|
10
|
-
* TemboToastContainer automatically syncs with theme changes.
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* // Basic usage
|
|
15
|
-
* <TemboUIProviders>
|
|
16
|
-
* <App />
|
|
17
|
-
* </TemboUIProviders>
|
|
18
|
-
*
|
|
19
|
-
* // With custom colors
|
|
20
|
-
* <TemboUIProviders
|
|
21
|
-
* colors={{
|
|
22
|
-
* primary: { main: '#007bff' },
|
|
23
|
-
* action: { main: '#28a745' }
|
|
24
|
-
* }}
|
|
25
|
-
* >
|
|
26
|
-
* <App />
|
|
27
|
-
* </TemboUIProviders>
|
|
28
|
-
* ```
|
|
29
8
|
*/
|
|
30
9
|
export const TemboUIProviders = ({ children, mode, antdThemeOverrides }) => {
|
|
31
10
|
return (_jsx(TemboThemeProvider, { mode: mode, antdThemeOverrides: antdThemeOverrides, children: _jsxs(TemboModalProvider, { children: [children, _jsx(TemboToastContainer, {})] }) }));
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{__rest as s}from"tslib";import{j as t}from"./theme-provider-
|
|
1
|
+
import{__rest as s}from"tslib";import{j as t}from"./theme-provider-BsQRkig_.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})),f=l.forwardRef(d);
|
|
2
2
|
/** */"production"!==process.env.NODE_ENV&&(f.displayName="LoadingOutlined");const u=(s,o)=>{const i={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}},l=Object.assign(Object.assign({},i),{icon:t.jsx(n,{style:{fontSize:18,color:s.success.main}}),style:Object.assign(Object.assign({},i.style),{backgroundColor:s.success.bg,color:s.success.text}),className:"toast-success"}),c=Object.assign(Object.assign({},i),{icon:t.jsx(r,{style:{fontSize:18,color:s.error.main}}),style:Object.assign(Object.assign({},i.style),{backgroundColor:s.error.bg,color:s.error.text}),className:"toast-error"}),g=Object.assign(Object.assign({},i),{icon:t.jsx(e,{style:{fontSize:18,color:s.warning.main}}),style:Object.assign(Object.assign({},i.style),{backgroundColor:s.warning.bg,color:s.warning.text}),className:"toast-warning"}),d=Object.assign(Object.assign({},i),{icon:t.jsx(a,{style:{fontSize:18,color:s.info.main}}),style:Object.assign(Object.assign({},i.style),{backgroundColor:s.surface.elevated,color:s.text.primary}),className:"toast-info"});return{loadingConfig:Object.assign(Object.assign({},i),{icon:t.jsx(f,{style:{fontSize:18,color:s.primary.main}}),style:Object.assign(Object.assign({},i.style),{backgroundColor:s.surface.elevated,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=u(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,u as b};
|
|
3
|
-
//# sourceMappingURL=tembo-notify-
|
|
3
|
+
//# sourceMappingURL=tembo-notify-BUN8_mKb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tembo-notify-
|
|
1
|
+
{"version":3,"file":"tembo-notify-BUN8_mKb.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","fontSize","borderRadius","padding","boxShadow","border","minHeight","backgroundColor","surface","elevated","color","text","primary","display","alignItems","gap","successConfig","_jsx","CheckCircleOutlined","success","main","bg","className","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","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,yBCLXC,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,IAOPC,EAAavD,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EACZ4B,GAAU,CACbvC,KACIkE,EAAAA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ClBjE,KAAKgE,cAAcW,EAAQV,SAC3BU,EAAQwB,OAEdN,EAAME,OAAOC,iBACTG,OAAQR,EACRO,KAAMvB,EAAQuB,KACdE,WAAW,EACXlF,UAEyB,QADrBoE,EAAiB,QAAjBV,EAAAD,EAAQzD,iBAAS,IAAA0D,EAAAA,EACjBqB,eAAAA,EAAY/E,iBAAS,IAAAoE,EAAAA,EACrB3B,EAAqBzC,WACrB+E,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]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var t=require("tslib"),s=require("./theme-provider-
|
|
1
|
+
"use strict";var t=require("tslib"),s=require("./theme-provider-C44BTeC4.js"),o=require("react-toastify"),e=require("./InfoCircleOutlined-DR9DmuN-.js"),i=require("./CloseCircleOutlined-CMilRURi.js");function n(t){if(t&&t.__esModule)return t;var s=Object.create(null);return t&&Object.keys(t).forEach(function(o){if("default"!==o){var e=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(s,o,e.get?e:{enumerable:!0,get:function(){return t[o]}})}}),s.default=t,Object.freeze(s)}var r=n(require("react")),a={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function c(){return c=Object.assign?Object.assign.bind():function(t){for(var s=1;s<arguments.length;s++){var o=arguments[s];for(var e in o)Object.prototype.hasOwnProperty.call(o,e)&&(t[e]=o[e])}return t},c.apply(this,arguments)}const l=(t,s)=>r.createElement(e.Icon,c({},t,{ref:s,icon:a})),g=r.forwardRef(l);
|
|
2
2
|
/** */"production"!==process.env.NODE_ENV&&(g.displayName="LoadingOutlined");const u=(t,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:t.surface.elevated,color:t.text.primary,display:"flex",alignItems:"center",gap:8}},r=Object.assign(Object.assign({},n),{icon:s.jsxRuntimeExports.jsx(e.RefIcon$2,{style:{fontSize:18,color:t.success.main}}),style:Object.assign(Object.assign({},n.style),{backgroundColor:t.success.bg,color:t.success.text}),className:"toast-success"}),a=Object.assign(Object.assign({},n),{icon:s.jsxRuntimeExports.jsx(i.RefIcon,{style:{fontSize:18,color:t.error.main}}),style:Object.assign(Object.assign({},n.style),{backgroundColor:t.error.bg,color:t.error.text}),className:"toast-error"}),c=Object.assign(Object.assign({},n),{icon:s.jsxRuntimeExports.jsx(e.RefIcon$1,{style:{fontSize:18,color:t.warning.main}}),style:Object.assign(Object.assign({},n.style),{backgroundColor:t.warning.bg,color:t.warning.text}),className:"toast-warning"}),l=Object.assign(Object.assign({},n),{icon:s.jsxRuntimeExports.jsx(e.RefIcon,{style:{fontSize:18,color:t.info.main}}),style:Object.assign(Object.assign({},n.style),{backgroundColor:t.surface.elevated,color:t.text.primary}),className:"toast-info"});return{loadingConfig:Object.assign(Object.assign({},n),{icon:s.jsxRuntimeExports.jsx(g,{style:{fontSize:18,color:t.primary.main}}),style:Object.assign(Object.assign({},n.style),{backgroundColor:t.surface.elevated,color:t.text.primary}),autoClose:!1,closeButton:!1,hideProgressBar:!0,className:"toast-loading"}),infoConfig:l,warningConfig:c,errorConfig:a,successConfig:r,baseConfig:n,colors:t}},d={position:"top-right",autoClose:4e3,hideProgressBar:!0,closeOnClick:!0,pauseOnHover:!0,draggable:!0,closeButton:!1};class f{static init(t,s){this.configs=u(t,s)}static getConfigs(){return this.configs}static formatMessage(t){if(t&&"object"==typeof t&&!("$$typeof"in t)){const o=!!t.title,e=!!t.description;return o&&e?s.jsxRuntimeExports.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[s.jsxRuntimeExports.jsx("div",{style:{fontWeight:600,fontSize:14},children:t.title}),s.jsxRuntimeExports.jsx("div",{style:{fontSize:13,fontWeight:400,opacity:.95},children:t.description})]}):o&&!e?s.jsxRuntimeExports.jsx("div",{style:{fontWeight:600,fontSize:14},children:t.title}):!o&&e?s.jsxRuntimeExports.jsx("div",{style:{fontSize:13,fontWeight:500},children:t.description}):""}return t}static buildOptions(s,o){const e=o||{},{duration:i,toastId:n,onClick:r,onClose:a}=e,c=t.__rest(e,["duration","toastId","onClick","onClose"]),l=null!=s?s:d;return Object.assign(Object.assign(Object.assign({},l),c),{toastId:n,autoClose:void 0!==i?i||!1:l.autoClose,onClick:r,onClose:a})}static getSuccessConfig(){var t,s;const o=this.getConfigs();return null!==(s=null!==(t=null==o?void 0:o.successConfig)&&void 0!==t?t:null==o?void 0:o.baseConfig)&&void 0!==s?s:void 0}static getErrorConfig(){var t,s;const o=this.getConfigs();return null!==(s=null!==(t=null==o?void 0:o.errorConfig)&&void 0!==t?t:null==o?void 0:o.baseConfig)&&void 0!==s?s:void 0}static getWarningConfig(){var t,s;const o=this.getConfigs();return null!==(s=null!==(t=null==o?void 0:o.warningConfig)&&void 0!==t?t:null==o?void 0:o.baseConfig)&&void 0!==s?s:void 0}static getInfoConfig(){var t,s;const o=this.getConfigs();return null!==(s=null!==(t=null==o?void 0:o.infoConfig)&&void 0!==t?t:null==o?void 0:o.baseConfig)&&void 0!==s?s:void 0}static getLoadingConfig(){var t,s;const o=this.getConfigs();return null!==(s=null!==(t=null==o?void 0:o.loadingConfig)&&void 0!==t?t:null==o?void 0:o.baseConfig)&&void 0!==s?s:void 0}static success(t,s){const e=this.formatMessage(t),i=this.buildOptions(this.getSuccessConfig(),s);return o.toast.success(e,i)}static error(t,s){const e=this.formatMessage(t),i=this.buildOptions(this.getErrorConfig(),s);return o.toast.error(e,i)}static warning(t,s){const e=this.formatMessage(t),i=this.buildOptions(this.getWarningConfig(),s);return o.toast.warning(e,i)}static info(t,s){const e=this.formatMessage(t),i=this.buildOptions(this.getInfoConfig(),s);return o.toast.info(e,i)}static loading(s,e){var i;const n=this.formatMessage(s),r=e||{},{toastId:a,onClick:c,onClose:l}=r,g=t.__rest(r,["toastId","onClick","onClose"]),u=null!==(i=this.getLoadingConfig())&&void 0!==i?i:d;return o.toast.loading(n,Object.assign(Object.assign(Object.assign({},u),g),{toastId:a,onClick:c,onClose:l}))}static update(t,s){var e,i;const n=this.getConfigs(),r=s.type&&n?{success:n.successConfig,error:n.errorConfig,warning:n.warningConfig,info:n.infoConfig}[s.type]:void 0,a=s.message?this.formatMessage(s.message):s.render;o.toast.update(t,Object.assign({render:a,type:s.type,isLoading:!1,autoClose:null!==(i=null!==(e=s.autoClose)&&void 0!==e?e:null==r?void 0:r.autoClose)&&void 0!==i?i:d.autoClose},null!=r?r:{}))}static dismiss(t){o.toast.dismiss(t)}static dismissAll(){o.toast.dismiss()}static isActive(t){return o.toast.isActive(t)}}f.configs=null,exports.TemboNotify=f,exports.buildToastConfigs=u;
|
|
3
|
-
//# sourceMappingURL=tembo-notify-
|
|
3
|
+
//# sourceMappingURL=tembo-notify-D0uYvwZP.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tembo-notify-
|
|
1
|
+
{"version":3,"file":"tembo-notify-D0uYvwZP.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","fontSize","borderRadius","padding","boxShadow","border","minHeight","backgroundColor","surface","elevated","color","text","primary","display","alignItems","gap","successConfig","_jsx","CheckCircleOutlined","success","main","bg","className","errorConfig","CloseCircleOutlined","error","warningConfig","ExclamationCircleOutlined","warning","infoConfig","InfoCircleOutlined","info","loadingConfig","FALLBACK_BASE_CONFIG","TemboNotify","init","configs","getConfigs","formatMessage","message","hasTitle","title","hasDescription","description","_jsxs","flexDirection","fontWeight","opacity","buildOptions","options","_a","duration","toastId","onClick","onClose","restOptions","__rest","effectiveBase","undefined","getSuccessConfig","_b","getErrorConfig","getWarningConfig","getInfoConfig","getLoadingConfig","content","toastOptions","toast","loading","update","id","typeConfig","type","render","isLoading","dismiss","dismissAll","isActive"],"mappings":"8fACIA,EAAkB,CAAEC,KAAQ,CAAEC,IAAO,MAAOC,MAAS,CAAEC,QAAW,gBAAiBC,UAAa,SAAWC,SAAY,CAAC,CAAEJ,IAAO,OAAQC,MAAS,CAAEI,EAAK,kUAAsUC,KAAQ,UAAWC,MAAS,YCD/f,SAASC,IAAiS,OAApRA,EAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,EAAcP,OAAOS,UAAUC,eAAeC,KAAKJ,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,GAAU,CAAE,OAAOL,CAAQ,EAAUJ,EAASa,MAAMC,KAAMR,UAAY,CAOlV,MAAMhB,EAAkB,CAACyB,EAAOC,IAAqBC,EAAMC,cAAcC,OAAUnB,EAAS,CAAA,EAAIe,EAAO,CACrGC,IAAKA,EACLzB,KAAM6B,KAIFC,EAAuBJ,EAAMK,WAAWhC;4oBACjB,eAAzBiC,QAA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,EAAwBU,SACnC,MAAMgB,EAAU3F,KAAKgE,cAAcC,GAC7BqB,EAAgDX,GAAW,CAAA,GAA3DG,QAAEA,EAAOC,QAAEA,EAAOC,QAAEA,GAAOM,EAAKL,EAAWC,EAAAA,OAAAI,EAA3C,CAAA,UAAA,UAAA,YACAtE,EAAoC,QAAvB4D,EAAA5E,KAAK0F,0BAAkB,IAAAd,EAAAA,EAAIjB,EAE9C,OAAOkC,EAAAA,MAAMC,QAAQH,+CACd3E,GACAiE,GAAW,CACdH,UACAC,UACAC,YAER,CAEA,aAAOe,CAAOC,EAAQrB,WAMlB,MAAMb,EAAU9D,KAAK+D,aAEfkC,EACFtB,EAAQuB,MAAQpC,EACV,CACIjB,QAASiB,EAAQpB,cACjBS,MAAOW,EAAQb,YACfK,QAASQ,EAAQV,cACjBK,KAAMK,EAAQP,YAChBoB,EAAQuB,WACVd,EAEJO,EAAUhB,EAAQV,QAClBjE,KAAKgE,cAAcW,EAAQV,SAC3BU,EAAQwB,OAEdN,QAAME,OAAOC,iBACTG,OAAQR,EACRO,KAAMvB,EAAQuB,KACdE,WAAW,EACXlF,UAEyB,QADrBoE,EAAiB,QAAjBV,EAAAD,EAAQzD,iBAAS,IAAA0D,EAAAA,EACjBqB,eAAAA,EAAY/E,iBAAS,IAAAoE,EAAAA,EACrB3B,EAAqBzC,WACrB+E,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]}
|
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-C44BTeC4.js");require("react"),require("antd"),require("lodash"),exports.LegacyTemboThemeProvider=e.LegacyTemboThemeProvider,exports.TemboThemeProvider=e.TemboThemeProvider,exports.buildColorPalette=e.buildColorPalette,exports.buildUIConstants=e.buildUIConstants,exports.defaultColorPalette=e.defaultColorPalette,exports.defaultUIConstants=e.defaultUIConstants,exports.useNewTemboTheme=e.useNewTemboTheme,exports.useTemboTheme=e.useTemboTheme;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/theme/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export{L as LegacyTemboThemeProvider,T as TemboThemeProvider,b as buildColorPalette,c as buildUIConstants,d as defaultColorPalette,a as defaultUIConstants,e as useNewTemboTheme,u as useTemboTheme}from"../theme-provider-
|
|
1
|
+
export{L as LegacyTemboThemeProvider,T as TemboThemeProvider,b as buildColorPalette,c as buildUIConstants,d as defaultColorPalette,a as defaultUIConstants,e as useNewTemboTheme,u as useTemboTheme}from"../theme-provider-BsQRkig_.js";import"react";import"antd";import"lodash";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -217,6 +217,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
217
217
|
colorBorder: colors.border.default,
|
|
218
218
|
colorText: colors.text.primary,
|
|
219
219
|
colorTextPlaceholder: colors.text.tertiary,
|
|
220
|
+
colorIcon: colors.text.tertiary,
|
|
221
|
+
colorIconHover: colors.text.secondary,
|
|
220
222
|
hoverBorderColor: colors.border.strong,
|
|
221
223
|
activeBorderColor: colors.link.default,
|
|
222
224
|
activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
|
|
@@ -227,6 +229,7 @@ export const buildAntDTheme = (colors) => {
|
|
|
227
229
|
controlHeightSM: 32,
|
|
228
230
|
paddingBlock: spacing[2],
|
|
229
231
|
paddingInline: spacing[3],
|
|
232
|
+
paddingInlineLG: spacing[4],
|
|
230
233
|
borderRadius: componentRadius.input,
|
|
231
234
|
borderRadiusLG: componentRadius.input,
|
|
232
235
|
borderRadiusSM: componentRadius.input,
|
|
@@ -236,6 +239,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
236
239
|
colorBorder: colors.border.default,
|
|
237
240
|
hoverBorderColor: colors.border.strong,
|
|
238
241
|
activeBorderColor: colors.link.default,
|
|
242
|
+
colorIcon: colors.text.tertiary,
|
|
243
|
+
colorIconHover: colors.text.secondary,
|
|
239
244
|
activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
|
|
240
245
|
controlHeight: 40,
|
|
241
246
|
borderRadius: componentRadius.input,
|
|
@@ -247,6 +252,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
247
252
|
colorBorder: colors.border.default,
|
|
248
253
|
colorText: colors.text.primary,
|
|
249
254
|
colorTextPlaceholder: colors.text.tertiary,
|
|
255
|
+
colorIcon: colors.text.tertiary,
|
|
256
|
+
colorIconHover: colors.text.secondary,
|
|
250
257
|
hoverBorderColor: colors.border.strong,
|
|
251
258
|
controlItemBgHover: colors.surface.interactive,
|
|
252
259
|
activeBorderColor: colors.link.default,
|
|
@@ -266,6 +273,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
266
273
|
colorBorder: colors.border.default,
|
|
267
274
|
hoverBorderColor: colors.border.strong,
|
|
268
275
|
activeBorderColor: colors.link.default,
|
|
276
|
+
colorIcon: colors.text.tertiary,
|
|
277
|
+
colorIconHover: colors.text.secondary,
|
|
269
278
|
activeShadow: `0 0 0 2px ${colors.semantic.info.subtle}`,
|
|
270
279
|
cellHoverBg: colors.surface.interactive,
|
|
271
280
|
cellActiveWithRangeBg: colors.semantic.info.subtle,
|
|
@@ -278,6 +287,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
278
287
|
colorPrimaryHover: colors.link.hover,
|
|
279
288
|
colorBorder: colors.border.default,
|
|
280
289
|
colorBgContainer: colors.surface.card,
|
|
290
|
+
colorIcon: colors.text.tertiary,
|
|
291
|
+
colorIconHover: colors.text.secondary,
|
|
281
292
|
borderRadiusSM: radius.sm,
|
|
282
293
|
},
|
|
283
294
|
Radio: {
|
|
@@ -285,6 +296,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
285
296
|
colorPrimaryHover: colors.link.hover,
|
|
286
297
|
colorBorder: colors.border.default,
|
|
287
298
|
colorBgContainer: colors.surface.card,
|
|
299
|
+
colorIcon: colors.text.tertiary,
|
|
300
|
+
colorIconHover: colors.text.secondary,
|
|
288
301
|
dotSize: 8,
|
|
289
302
|
},
|
|
290
303
|
Switch: {
|
|
@@ -292,12 +305,16 @@ export const buildAntDTheme = (colors) => {
|
|
|
292
305
|
colorPrimaryHover: colors.link.hover,
|
|
293
306
|
colorTextQuaternary: colors.text.disabled,
|
|
294
307
|
colorTextTertiary: colors.text.tertiary,
|
|
308
|
+
colorIcon: colors.text.tertiary,
|
|
309
|
+
colorIconHover: colors.text.secondary,
|
|
295
310
|
handleSize: 18,
|
|
296
311
|
},
|
|
297
312
|
Slider: {
|
|
298
313
|
colorPrimary: colors.link.default,
|
|
299
314
|
colorPrimaryBorder: colors.link.default,
|
|
300
315
|
colorPrimaryBorderHover: colors.link.hover,
|
|
316
|
+
colorIcon: colors.text.tertiary,
|
|
317
|
+
colorIconHover: colors.text.secondary,
|
|
301
318
|
handleColor: colors.surface.card,
|
|
302
319
|
handleActiveColor: colors.surface.card,
|
|
303
320
|
railBg: colors.neutral[2],
|
|
@@ -316,6 +333,8 @@ export const buildAntDTheme = (colors) => {
|
|
|
316
333
|
itemMarginBottom: componentSpacing.form.itemGap,
|
|
317
334
|
verticalLabelPadding: `0 0 ${componentSpacing.form.labelGap}px`,
|
|
318
335
|
labelRequiredMarkColor: colors.semantic.error.main,
|
|
336
|
+
colorIcon: colors.text.tertiary,
|
|
337
|
+
colorIconHover: colors.text.secondary,
|
|
319
338
|
},
|
|
320
339
|
// ========================================
|
|
321
340
|
// DATA DISPLAY
|
|
@@ -23,26 +23,6 @@ export interface TemboThemeProviderProps {
|
|
|
23
23
|
*
|
|
24
24
|
* Wraps your application with monochrome-first theming system.
|
|
25
25
|
* Supports seamless light/dark mode switching.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* ```tsx
|
|
29
|
-
* // Basic usage
|
|
30
|
-
* <TemboThemeProvider>
|
|
31
|
-
* <App />
|
|
32
|
-
* </TemboThemeProvider>
|
|
33
|
-
*
|
|
34
|
-
* // Dark mode
|
|
35
|
-
* <TemboThemeProvider mode="dark">
|
|
36
|
-
* <App />
|
|
37
|
-
* </TemboThemeProvider>
|
|
38
|
-
*
|
|
39
|
-
* // With state management for toggling
|
|
40
|
-
* const [mode, setMode] = useState<ThemeMode>('light');
|
|
41
|
-
*
|
|
42
|
-
* <TemboThemeProvider mode={mode}>
|
|
43
|
-
* <App onToggleTheme={() => setMode(m => m === 'light' ? 'dark' : 'light')} />
|
|
44
|
-
* </TemboThemeProvider>
|
|
45
|
-
* ```
|
|
46
26
|
*/
|
|
47
27
|
export declare const TemboThemeProvider: React.FC<TemboThemeProviderProps>;
|
|
48
28
|
/**
|
|
@@ -50,47 +30,5 @@ export declare const TemboThemeProvider: React.FC<TemboThemeProviderProps>;
|
|
|
50
30
|
*
|
|
51
31
|
* Returns the active color palette and theme mode.
|
|
52
32
|
* Use this in components that need direct access to theme tokens.
|
|
53
|
-
*
|
|
54
|
-
* @example
|
|
55
|
-
* ```tsx
|
|
56
|
-
* function MyComponent() {
|
|
57
|
-
* const { colors, mode } = useTemboTheme();
|
|
58
|
-
*
|
|
59
|
-
* return (
|
|
60
|
-
* <div style={{
|
|
61
|
-
* color: colors.text.primary,
|
|
62
|
-
* backgroundColor: colors.surface.card,
|
|
63
|
-
* padding: spacing[4],
|
|
64
|
-
* }}>
|
|
65
|
-
* Current theme: {mode}
|
|
66
|
-
* </div>
|
|
67
|
-
* );
|
|
68
|
-
* }
|
|
69
|
-
* ```
|
|
70
|
-
*
|
|
71
|
-
* @example
|
|
72
|
-
* ```tsx
|
|
73
|
-
* // Using secondary colors for data visualization
|
|
74
|
-
* function ProductCard({ type }: { type: string }) {
|
|
75
|
-
* const { colors } = useTemboTheme();
|
|
76
|
-
*
|
|
77
|
-
* const colorMap = {
|
|
78
|
-
* savings: colors.secondary.blue,
|
|
79
|
-
* investment: colors.secondary.purple,
|
|
80
|
-
* credit: colors.secondary.pink,
|
|
81
|
-
* };
|
|
82
|
-
*
|
|
83
|
-
* const color = colorMap[type] || colors.secondary.blue;
|
|
84
|
-
*
|
|
85
|
-
* return (
|
|
86
|
-
* <div style={{
|
|
87
|
-
* borderLeft: `4px solid ${color.main}`,
|
|
88
|
-
* backgroundColor: color.subtle,
|
|
89
|
-
* }}>
|
|
90
|
-
* Product content
|
|
91
|
-
* </div>
|
|
92
|
-
* );
|
|
93
|
-
* }
|
|
94
|
-
* ```
|
|
95
33
|
*/
|
|
96
34
|
export declare const useNewTemboTheme: () => TemboTheme;
|
|
@@ -12,26 +12,6 @@ const TemboThemeContext = React.createContext({
|
|
|
12
12
|
*
|
|
13
13
|
* Wraps your application with monochrome-first theming system.
|
|
14
14
|
* Supports seamless light/dark mode switching.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```tsx
|
|
18
|
-
* // Basic usage
|
|
19
|
-
* <TemboThemeProvider>
|
|
20
|
-
* <App />
|
|
21
|
-
* </TemboThemeProvider>
|
|
22
|
-
*
|
|
23
|
-
* // Dark mode
|
|
24
|
-
* <TemboThemeProvider mode="dark">
|
|
25
|
-
* <App />
|
|
26
|
-
* </TemboThemeProvider>
|
|
27
|
-
*
|
|
28
|
-
* // With state management for toggling
|
|
29
|
-
* const [mode, setMode] = useState<ThemeMode>('light');
|
|
30
|
-
*
|
|
31
|
-
* <TemboThemeProvider mode={mode}>
|
|
32
|
-
* <App onToggleTheme={() => setMode(m => m === 'light' ? 'dark' : 'light')} />
|
|
33
|
-
* </TemboThemeProvider>
|
|
34
|
-
* ```
|
|
35
15
|
*/
|
|
36
16
|
export const TemboThemeProvider = ({ children, mode = 'light', antdThemeOverrides, }) => {
|
|
37
17
|
// Build color palette for current mode
|
|
@@ -54,47 +34,5 @@ export const TemboThemeProvider = ({ children, mode = 'light', antdThemeOverride
|
|
|
54
34
|
*
|
|
55
35
|
* Returns the active color palette and theme mode.
|
|
56
36
|
* Use this in components that need direct access to theme tokens.
|
|
57
|
-
*
|
|
58
|
-
* @example
|
|
59
|
-
* ```tsx
|
|
60
|
-
* function MyComponent() {
|
|
61
|
-
* const { colors, mode } = useTemboTheme();
|
|
62
|
-
*
|
|
63
|
-
* return (
|
|
64
|
-
* <div style={{
|
|
65
|
-
* color: colors.text.primary,
|
|
66
|
-
* backgroundColor: colors.surface.card,
|
|
67
|
-
* padding: spacing[4],
|
|
68
|
-
* }}>
|
|
69
|
-
* Current theme: {mode}
|
|
70
|
-
* </div>
|
|
71
|
-
* );
|
|
72
|
-
* }
|
|
73
|
-
* ```
|
|
74
|
-
*
|
|
75
|
-
* @example
|
|
76
|
-
* ```tsx
|
|
77
|
-
* // Using secondary colors for data visualization
|
|
78
|
-
* function ProductCard({ type }: { type: string }) {
|
|
79
|
-
* const { colors } = useTemboTheme();
|
|
80
|
-
*
|
|
81
|
-
* const colorMap = {
|
|
82
|
-
* savings: colors.secondary.blue,
|
|
83
|
-
* investment: colors.secondary.purple,
|
|
84
|
-
* credit: colors.secondary.pink,
|
|
85
|
-
* };
|
|
86
|
-
*
|
|
87
|
-
* const color = colorMap[type] || colors.secondary.blue;
|
|
88
|
-
*
|
|
89
|
-
* return (
|
|
90
|
-
* <div style={{
|
|
91
|
-
* borderLeft: `4px solid ${color.main}`,
|
|
92
|
-
* backgroundColor: color.subtle,
|
|
93
|
-
* }}>
|
|
94
|
-
* Product content
|
|
95
|
-
* </div>
|
|
96
|
-
* );
|
|
97
|
-
* }
|
|
98
|
-
* ```
|
|
99
37
|
*/
|
|
100
38
|
export const useNewTemboTheme = () => React.useContext(TemboThemeContext);
|