@temboplus/frontend-react-core 0.1.3-beta.29 → 0.1.3-beta.30
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("../theme-provider-XqWasApp.js"),t=require("antd"),n=require("@ebay/nice-modal-react");require("../theme-provider-slTbQLX5.js"),require("lodash");var r=require("../InfoCircleOutlined-DR9DmuN-.js"),s=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 r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var a=o(n),i=c(s),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 r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const m=(e,t)=>i.createElement(r.Icon,u({},e,{ref:t,icon:l})),
|
|
2
|
-
/** */"production"!==process.env.NODE_ENV&&(
|
|
3
|
-
/** */"production"!==process.env.NODE_ENV&&(x.displayName="WarningOutlined");const g=a.default.create(r=>{var s,o,c;const a=n.useModal();return e.jsxRuntimeExports.jsx(t.Modal,{open:a.visible,title:r.title,onOk:async()=>{r.onOk&&await r.onOk(),a.resolve(!0),a.remove()},onCancel:()=>{r.onCancel&&r.onCancel(),a.resolve(!1),a.remove()},okText:null!==(
|
|
1
|
+
"use strict";var e=require("../theme-provider-XqWasApp.js"),t=require("antd"),n=require("@ebay/nice-modal-react");require("../theme-provider-slTbQLX5.js"),require("lodash");var r=require("../InfoCircleOutlined-DR9DmuN-.js"),s=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 r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var a=o(n),i=c(s),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 r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},u.apply(this,arguments)}const m=(e,t)=>i.createElement(r.Icon,u({},e,{ref:t,icon:l})),f=i.forwardRef(m);
|
|
2
|
+
/** */"production"!==process.env.NODE_ENV&&(f.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 r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j.apply(this,arguments)}const p=(e,t)=>i.createElement(r.Icon,j({},e,{ref:t,icon:d})),x=i.forwardRef(p);
|
|
3
|
+
/** */"production"!==process.env.NODE_ENV&&(x.displayName="WarningOutlined");const g=a.default.create(r=>{var s,o,c;const a=n.useModal(),{colors:i}=e.useNewTemboTheme(),l={type:null!==(s=r.okType)&&void 0!==s?s:"primary"};return r.okDanger&&(l.danger=!0,l.style={backgroundColor:i.semantic.error.main,borderColor:i.semantic.error.main,color:i.semantic.error.contrast}),e.jsxRuntimeExports.jsx(t.Modal,{open:a.visible,title:r.title,onOk:async()=>{r.onOk&&await r.onOk(),a.resolve(!0),a.remove()},onCancel:()=>{r.onCancel&&r.onCancel(),a.resolve(!1),a.remove()},okText:null!==(o=r.okText)&&void 0!==o?o:"OK",cancelText:null!==(c=r.cancelText)&&void 0!==c?c:"Cancel",okButtonProps:l,centered:!0,destroyOnHidden:!0,children:e.jsxRuntimeExports.jsxs(t.Flex,{align:"center",justify:"start",gap:"small",children:[r.icon&&r.icon,r.content]})})});const b=()=>{const{colors:t}=e.useNewTemboTheme();return e.jsxRuntimeExports.jsx(r.RefIcon$1,{style:{color:t.semantic.error.main,fontSize:20}})},h=()=>{const{colors:t}=e.useNewTemboTheme();return e.jsxRuntimeExports.jsx(x,{style:{color:t.semantic.warning.main,fontSize:20}})},O=()=>{const{colors:t}=e.useNewTemboTheme();return e.jsxRuntimeExports.jsx(r.RefIcon,{style:{color:t.semantic.info.main,fontSize:20}})},v=()=>{const{colors:t}=e.useNewTemboTheme();return e.jsxRuntimeExports.jsx(r.RefIcon$2,{style:{color:t.semantic.success.main,fontSize:20}})},y=()=>{const{colors:t}=e.useNewTemboTheme();return e.jsxRuntimeExports.jsx(f,{style:{color:t.neutral[4],fontSize:20}})};exports.ConfirmDialog=g,exports.TemboConfirm=class{static async danger(t){return a.default.show(g,Object.assign(Object.assign({},t),{icon:e.jsxRuntimeExports.jsx(b,{}),okDanger:!0,okType:"primary"}))}static async warning(t){return a.default.show(g,Object.assign(Object.assign({},t),{icon:e.jsxRuntimeExports.jsx(h,{})}))}static async info(t){return a.default.show(g,Object.assign(Object.assign({},t),{icon:e.jsxRuntimeExports.jsx(O,{})}))}static async success(t){return a.default.show(g,Object.assign(Object.assign({},t),{icon:e.jsxRuntimeExports.jsx(v,{})}))}static async confirm(t){return a.default.show(g,Object.assign(Object.assign({},t),{icon:e.jsxRuntimeExports.jsx(y,{})}))}};
|
|
4
4
|
//# sourceMappingURL=index.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs.js","sources":["../../node_modules/@ant-design/icons-svg/es/asn/QuestionCircleOutlined.js","../../node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js","../../node_modules/@ant-design/icons-svg/es/asn/WarningOutlined.js","../../node_modules/@ant-design/icons/es/icons/WarningOutlined.js","../../src/features/dialogs/tembo-confirm.tsx"],"sourcesContent":["// This icon file is generated automatically.\nvar QuestionCircleOutlined = { \"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\" };\nexport default QuestionCircleOutlined;\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 QuestionCircleOutlinedSvg from \"@ant-design/icons-svg/es/asn/QuestionCircleOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst QuestionCircleOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: QuestionCircleOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(QuestionCircleOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'QuestionCircleOutlined';\n}\nexport default RefIcon;","// This icon file is generated automatically.\nvar WarningOutlined = { \"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\" };\nexport default WarningOutlined;\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 WarningOutlinedSvg from \"@ant-design/icons-svg/es/asn/WarningOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst WarningOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: WarningOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(WarningOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'WarningOutlined';\n}\nexport default RefIcon;",null],"names":["QuestionCircleOutlined","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","QuestionCircleOutlinedSvg","RefIcon","forwardRef","process","env","NODE_ENV","displayName","WarningOutlined","WarningOutlinedSvg","ConfirmDialog","NiceModal","create","modal","useModal","_jsx","Modal","open","visible","title","onOk","async","resolve","remove","onCancel","okText","_a","cancelText","_b","okButtonProps","danger","okDanger","type","_c","okType","centered","destroyOnHidden","_jsxs","Flex","align","justify","gap","content","DangerIcon","colors","useNewTemboTheme","ExclamationCircleOutlined","style","color","semantic","error","main","WarningIcon","warning","InfoIcon","InfoCircleOutlined","info","SuccessIcon","CheckCircleOutlined","success","QuestionIcon","neutral","show","confirm"],"mappings":"qlBACIA,EAAyB,CAAEC,KAAQ,CAAEC,IAAO,MAAOC,MAAS,CAAEC,QAAW,gBAAiBC,UAAa,SAAWC,SAAY,CAAC,CAAEJ,IAAO,OAAQC,MAAS,CAAEI,EAAK,kLAAqL,CAAEL,IAAO,OAAQC,MAAS,CAAEI,EAAK,saAA0aC,KAAQ,kBAAmBC,MAAS,YCDx0B,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,EAAyB,CAACyB,EAAOC,IAAqBC,EAAMC,cAAcC,OAAUnB,EAAS,CAAA,EAAIe,EAAO,CAC5GC,IAAKA,EACLzB,KAAM6B,KAIFC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AAW,CAAA,KAE1B,CAKA,iBAAaI,CAAK5D,GACd,OAAOe,EAAAA,QAAUmD,KAAKpD,EAAa5B,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAC5Ba,GAAK,CACRxB,KAAM2C,EAAAA,kBAAAA,IAACuC,EAAQ,CAAA,KAEvB,CAKA,oBAAaK,CAAQ/D,GACjB,OAAOe,EAAAA,QAAUmD,KAAKpD,EAAa5B,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAC5Ba,GAAK,CACRxB,KAAM2C,EAAAA,kBAAAA,IAAC0C,EAAW,CAAA,KAE1B,CAKA,oBAAaM,CAAQnE,GACjB,OAAOe,EAAAA,QAAUmD,KAAKpD,EAAa5B,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAC5Ba,GAAK,CACRxB,KAAM2C,EAAAA,kBAAAA,IAAC6C,EAAY,CAAA,KAE3B","x_google_ignoreList":[0,1,2,3]}
|
|
1
|
+
{"version":3,"file":"index.cjs.js","sources":["../../node_modules/@ant-design/icons-svg/es/asn/QuestionCircleOutlined.js","../../node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js","../../node_modules/@ant-design/icons-svg/es/asn/WarningOutlined.js","../../node_modules/@ant-design/icons/es/icons/WarningOutlined.js","../../src/features/dialogs/tembo-confirm.tsx"],"sourcesContent":["// This icon file is generated automatically.\nvar QuestionCircleOutlined = { \"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\" };\nexport default QuestionCircleOutlined;\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 QuestionCircleOutlinedSvg from \"@ant-design/icons-svg/es/asn/QuestionCircleOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst QuestionCircleOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: QuestionCircleOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(QuestionCircleOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'QuestionCircleOutlined';\n}\nexport default RefIcon;","// This icon file is generated automatically.\nvar WarningOutlined = { \"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\" };\nexport default WarningOutlined;\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 WarningOutlinedSvg from \"@ant-design/icons-svg/es/asn/WarningOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst WarningOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: WarningOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(WarningOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'WarningOutlined';\n}\nexport default RefIcon;",null],"names":["QuestionCircleOutlined","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","QuestionCircleOutlinedSvg","RefIcon","forwardRef","process","env","NODE_ENV","displayName","WarningOutlined","WarningOutlinedSvg","ConfirmDialog","NiceModal","create","modal","useModal","colors","useNewTemboTheme","okButtonProps","type","_a","okType","okDanger","danger","style","backgroundColor","semantic","error","main","borderColor","color","contrast","_jsx","Modal","open","visible","title","onOk","async","resolve","remove","onCancel","okText","_b","cancelText","_c","centered","destroyOnHidden","_jsxs","Flex","align","justify","gap","content","DangerIcon","ExclamationCircleOutlined","fontSize","WarningIcon","warning","InfoIcon","InfoCircleOutlined","info","SuccessIcon","CheckCircleOutlined","success","QuestionIcon","neutral","show","confirm"],"mappings":"qlBACIA,EAAyB,CAAEC,KAAQ,CAAEC,IAAO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B,OAAOe,EAAAA,QAAUuD,KAAKxD,EAAa5B,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAC5Ba,GAAK,CACRxB,KAAM2D,EAAAA,kBAAAA,IAAC8B,EAAW,CAAA,KAE1B,CAKA,oBAAaM,CAAQvE,GACjB,OAAOe,EAAAA,QAAUuD,KAAKxD,EAAa5B,OAAAC,OAAAD,OAAAC,OAAA,CAAA,EAC5Ba,GAAK,CACRxB,KAAM2D,EAAAA,kBAAAA,IAACiC,EAAY,CAAA,KAE3B","x_google_ignoreList":[0,1,2,3]}
|
package/dist/dialogs/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
2
|
-
/** */"production"!==process.env.NODE_ENV&&(g.displayName="QuestionCircleOutlined");var
|
|
3
|
-
/** */"production"!==process.env.NODE_ENV&&(v.displayName="WarningOutlined");const
|
|
1
|
+
import{u as e,j as n}from"../theme-provider-slJZwhTc.js";import{Modal as t,Flex as r}from"antd";import o,{useModal as s}from"@ebay/nice-modal-react";import"../theme-provider-c4R_KW4X.js";import"lodash";import{I as c,a,R as i,b as l}from"../InfoCircleOutlined-Hx86sClq.js";import*as m from"react";var u={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 r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},p.apply(this,arguments)}const d=(e,n)=>m.createElement(c,p({},e,{ref:n,icon:u})),g=m.forwardRef(d);
|
|
2
|
+
/** */"production"!==process.env.NODE_ENV&&(g.displayName="QuestionCircleOutlined");var f={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 r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},j.apply(this,arguments)}const h=(e,n)=>m.createElement(c,j({},e,{ref:n,icon:f})),v=m.forwardRef(h);
|
|
3
|
+
/** */"production"!==process.env.NODE_ENV&&(v.displayName="WarningOutlined");const y=o.create(o=>{var c,a,i;const l=s(),{colors:m}=e(),u={type:null!==(c=o.okType)&&void 0!==c?c:"primary"};return o.okDanger&&(u.danger=!0,u.style={backgroundColor:m.semantic.error.main,borderColor:m.semantic.error.main,color:m.semantic.error.contrast}),n.jsx(t,{open:l.visible,title:o.title,onOk:async()=>{o.onOk&&await o.onOk(),l.resolve(!0),l.remove()},onCancel:()=>{o.onCancel&&o.onCancel(),l.resolve(!1),l.remove()},okText:null!==(a=o.okText)&&void 0!==a?a:"OK",cancelText:null!==(i=o.cancelText)&&void 0!==i?i:"Cancel",okButtonProps:u,centered:!0,destroyOnHidden:!0,children:n.jsxs(r,{align:"center",justify:"start",gap:"small",children:[o.icon&&o.icon,o.content]})})});class O{static async danger(e){return o.show(y,Object.assign(Object.assign({},e),{icon:n.jsx(b,{}),okDanger:!0,okType:"primary"}))}static async warning(e){return o.show(y,Object.assign(Object.assign({},e),{icon:n.jsx(x,{})}))}static async info(e){return o.show(y,Object.assign(Object.assign({},e),{icon:n.jsx(w,{})}))}static async success(e){return o.show(y,Object.assign(Object.assign({},e),{icon:n.jsx(z,{})}))}static async confirm(e){return o.show(y,Object.assign(Object.assign({},e),{icon:n.jsx(C,{})}))}}const b=()=>{const{colors:t}=e();return n.jsx(a,{style:{color:t.semantic.error.main,fontSize:20}})},x=()=>{const{colors:t}=e();return n.jsx(v,{style:{color:t.semantic.warning.main,fontSize:20}})},w=()=>{const{colors:t}=e();return n.jsx(i,{style:{color:t.semantic.info.main,fontSize:20}})},z=()=>{const{colors:t}=e();return n.jsx(l,{style:{color:t.semantic.success.main,fontSize:20}})},C=()=>{const{colors:t}=e();return n.jsx(g,{style:{color:t.neutral[4],fontSize:20}})};export{y as ConfirmDialog,O as TemboConfirm};
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../node_modules/@ant-design/icons-svg/es/asn/QuestionCircleOutlined.js","../../node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js","../../node_modules/@ant-design/icons-svg/es/asn/WarningOutlined.js","../../node_modules/@ant-design/icons/es/icons/WarningOutlined.js","../../src/features/dialogs/tembo-confirm.tsx"],"sourcesContent":["// This icon file is generated automatically.\nvar QuestionCircleOutlined = { \"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\" };\nexport default QuestionCircleOutlined;\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 QuestionCircleOutlinedSvg from \"@ant-design/icons-svg/es/asn/QuestionCircleOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst QuestionCircleOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: QuestionCircleOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(QuestionCircleOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'QuestionCircleOutlined';\n}\nexport default RefIcon;","// This icon file is generated automatically.\nvar WarningOutlined = { \"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\" };\nexport default WarningOutlined;\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 WarningOutlinedSvg from \"@ant-design/icons-svg/es/asn/WarningOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst WarningOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: WarningOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(WarningOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'WarningOutlined';\n}\nexport default RefIcon;",null],"names":["QuestionCircleOutlined","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","QuestionCircleOutlinedSvg","RefIcon","forwardRef","process","env","NODE_ENV","displayName","WarningOutlined","WarningOutlinedSvg","ConfirmDialog","NiceModal","create","modal","useModal","
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../node_modules/@ant-design/icons-svg/es/asn/QuestionCircleOutlined.js","../../node_modules/@ant-design/icons/es/icons/QuestionCircleOutlined.js","../../node_modules/@ant-design/icons-svg/es/asn/WarningOutlined.js","../../node_modules/@ant-design/icons/es/icons/WarningOutlined.js","../../src/features/dialogs/tembo-confirm.tsx"],"sourcesContent":["// This icon file is generated automatically.\nvar QuestionCircleOutlined = { \"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\" };\nexport default QuestionCircleOutlined;\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 QuestionCircleOutlinedSvg from \"@ant-design/icons-svg/es/asn/QuestionCircleOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst QuestionCircleOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: QuestionCircleOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(QuestionCircleOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'QuestionCircleOutlined';\n}\nexport default RefIcon;","// This icon file is generated automatically.\nvar WarningOutlined = { \"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\" };\nexport default WarningOutlined;\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 WarningOutlinedSvg from \"@ant-design/icons-svg/es/asn/WarningOutlined\";\nimport AntdIcon from \"../components/AntdIcon\";\nconst WarningOutlined = (props, ref) => /*#__PURE__*/React.createElement(AntdIcon, _extends({}, props, {\n ref: ref,\n icon: WarningOutlinedSvg\n}));\n\n/** */\nconst RefIcon = /*#__PURE__*/React.forwardRef(WarningOutlined);\nif (process.env.NODE_ENV !== 'production') {\n RefIcon.displayName = 'WarningOutlined';\n}\nexport default RefIcon;",null],"names":["QuestionCircleOutlined","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","QuestionCircleOutlinedSvg","RefIcon","forwardRef","process","env","NODE_ENV","displayName","WarningOutlined","WarningOutlinedSvg","ConfirmDialog","NiceModal","create","modal","useModal","colors","useNewTemboTheme","okButtonProps","type","_a","okType","okDanger","danger","style","backgroundColor","semantic","error","main","borderColor","color","contrast","_jsx","Modal","open","visible","title","onOk","async","resolve","remove","onCancel","okText","_b","cancelText","_c","centered","destroyOnHidden","_jsxs","Flex","align","justify","gap","content","TemboConfirm","show","DangerIcon","warning","WarningIcon","info","InfoIcon","success","SuccessIcon","confirm","QuestionIcon","ExclamationCircleOutlined","fontSize","InfoCircleOutlined","CheckCircleOutlined","neutral"],"mappings":"wSACA,IAAIA,EAAyB,CAAEC,KAAQ,CAAEC,IAAO,MAAOC,MAAS,CAAEC,QAAW,gBAAiBC,UAAa,SAAWC,SAAY,CAAC,CAAEJ,IAAO,OAAQC,MAAS,CAAEI,EAAK,kLAAqL,CAAEL,IAAO,OAAQC,MAAS,CAAEI,EAAK,saAA0aC,KAAQ,kBAAmBC,MAAS,YCDx0B,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,EAAyB,CAACyB,EAAOC,IAAqBC,EAAMC,cAAcC,EAAUnB,EAAS,CAAA,EAAI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AA,EAC5Ba,GAAK,CACRxB,KAAM2D,EAAAA,IAACgC,EAAY,CAAA,KAE3B,EAIJ,MAAMR,EAAuB,KACzB,MAAMxC,OAAEA,GAAWC,IACnB,OAAOe,EAAAA,IAACiC,EAAyB,CAACzC,MAAO,CAAEM,MAAOd,EAAOU,SAASC,MAAMC,KAAMsC,SAAU,OAGtFR,EAAwB,KAC1B,MAAM1C,OAAEA,GAAWC,IACnB,OAAOe,EAAAA,IAACvB,EAAe,CAACe,MAAO,CAAEM,MAAOd,EAAOU,SAAS+B,QAAQ7B,KAAMsC,SAAU,OAG9EN,EAAqB,KACvB,MAAM5C,OAAEA,GAAWC,IACnB,OAAOe,EAAAA,IAACmC,EAAkB,CAAC3C,MAAO,CAAEM,MAAOd,EAAOU,SAASiC,KAAK/B,KAAMsC,SAAU,OAG9EJ,EAAwB,KAC1B,MAAM9C,OAAEA,GAAWC,IACnB,OAAOe,EAAAA,IAACoC,EAAmB,CAAC5C,MAAO,CAAEM,MAAOd,EAAOU,SAASmC,QAAQjC,KAAMsC,SAAU,OAGlFF,EAAyB,KAC3B,MAAMhD,OAAEA,GAAWC,IACnB,OAAOe,MAAC5D,EAAsB,CAACoD,MAAO,CAAEM,MAAOd,EAAOqD,QAAQ,GAAIH,SAAU","x_google_ignoreList":[0,1,2,3]}
|
|
@@ -9,6 +9,7 @@ import { useNewTemboTheme } from '../../theme/index.js';
|
|
|
9
9
|
export const ConfirmDialog = NiceModal.create((props) => {
|
|
10
10
|
var _a, _b, _c;
|
|
11
11
|
const modal = useModal();
|
|
12
|
+
const { colors } = useNewTemboTheme();
|
|
12
13
|
const handleOk = async () => {
|
|
13
14
|
if (props.onOk) {
|
|
14
15
|
await props.onOk();
|
|
@@ -23,10 +24,20 @@ export const ConfirmDialog = NiceModal.create((props) => {
|
|
|
23
24
|
modal.resolve(false);
|
|
24
25
|
modal.remove();
|
|
25
26
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
// Build okButtonProps with proper styling for danger buttons
|
|
28
|
+
const okButtonProps = {
|
|
29
|
+
type: (_a = props.okType) !== null && _a !== void 0 ? _a : 'primary',
|
|
30
|
+
};
|
|
31
|
+
if (props.okDanger) {
|
|
32
|
+
okButtonProps.danger = true;
|
|
33
|
+
// Ensure proper contrast: white text on red background
|
|
34
|
+
okButtonProps.style = {
|
|
35
|
+
backgroundColor: colors.semantic.error.main,
|
|
36
|
+
borderColor: colors.semantic.error.main,
|
|
37
|
+
color: colors.semantic.error.contrast,
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return (_jsx(Modal, { open: modal.visible, title: props.title, onOk: handleOk, onCancel: handleCancel, okText: (_b = props.okText) !== null && _b !== void 0 ? _b : 'OK', cancelText: (_c = props.cancelText) !== null && _c !== void 0 ? _c : 'Cancel', okButtonProps: okButtonProps, centered: true, destroyOnHidden: true, children: _jsxs(Flex, { align: 'center', justify: 'start', gap: "small", children: [props.icon && (props.icon), props.content] }) }));
|
|
30
41
|
});
|
|
31
42
|
/**
|
|
32
43
|
* TemboConfirm - Unified confirmation dialog system
|
|
@@ -59,8 +70,6 @@ export class TemboConfirm {
|
|
|
59
70
|
* Show a danger/destructive confirmation dialog (red OK button)
|
|
60
71
|
*/
|
|
61
72
|
static async danger(props) {
|
|
62
|
-
// We need to get colors from context, but static methods can't use hooks
|
|
63
|
-
// Solution: Accept colors as optional param or use a wrapper component
|
|
64
73
|
return NiceModal.show(ConfirmDialog, Object.assign(Object.assign({}, props), { icon: _jsx(DangerIcon, {}), okDanger: true, okType: 'primary' }));
|
|
65
74
|
}
|
|
66
75
|
/**
|
|
@@ -91,21 +100,21 @@ export class TemboConfirm {
|
|
|
91
100
|
// Icon wrapper components that use the theme hook
|
|
92
101
|
const DangerIcon = () => {
|
|
93
102
|
const { colors } = useNewTemboTheme();
|
|
94
|
-
return _jsx(ExclamationCircleOutlined, { style: { color: colors.semantic.error.main } });
|
|
103
|
+
return _jsx(ExclamationCircleOutlined, { style: { color: colors.semantic.error.main, fontSize: 20 } });
|
|
95
104
|
};
|
|
96
105
|
const WarningIcon = () => {
|
|
97
106
|
const { colors } = useNewTemboTheme();
|
|
98
|
-
return _jsx(WarningOutlined, { style: { color: colors.semantic.warning.main } });
|
|
107
|
+
return _jsx(WarningOutlined, { style: { color: colors.semantic.warning.main, fontSize: 20 } });
|
|
99
108
|
};
|
|
100
109
|
const InfoIcon = () => {
|
|
101
110
|
const { colors } = useNewTemboTheme();
|
|
102
|
-
return _jsx(InfoCircleOutlined, { style: { color: colors.semantic.info.main } });
|
|
111
|
+
return _jsx(InfoCircleOutlined, { style: { color: colors.semantic.info.main, fontSize: 20 } });
|
|
103
112
|
};
|
|
104
113
|
const SuccessIcon = () => {
|
|
105
114
|
const { colors } = useNewTemboTheme();
|
|
106
|
-
return _jsx(CheckCircleOutlined, { style: { color: colors.semantic.success.main } });
|
|
115
|
+
return _jsx(CheckCircleOutlined, { style: { color: colors.semantic.success.main, fontSize: 20 } });
|
|
107
116
|
};
|
|
108
117
|
const QuestionIcon = () => {
|
|
109
118
|
const { colors } = useNewTemboTheme();
|
|
110
|
-
return _jsx(QuestionCircleOutlined, { style: { color: colors.neutral[4] } });
|
|
119
|
+
return _jsx(QuestionCircleOutlined, { style: { color: colors.neutral[4], fontSize: 20 } });
|
|
111
120
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temboplus/frontend-react-core",
|
|
3
|
-
"version": "0.1.3-beta.
|
|
3
|
+
"version": "0.1.3-beta.30",
|
|
4
4
|
"repository": "https://github.com/TemboPlus-Frontend/temboplus-frontend-react-core",
|
|
5
5
|
"author": "Okello Gerald",
|
|
6
6
|
"license": "ISC",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"@types/lodash": "^4.17.21",
|
|
60
60
|
"@types/react": "^19.2.7",
|
|
61
61
|
"@types/react-dom": "^19.2.3",
|
|
62
|
-
"@vitest/coverage-v8": "^4.0.
|
|
62
|
+
"@vitest/coverage-v8": "^4.0.15",
|
|
63
63
|
"autoprefixer": "^10.4.22",
|
|
64
64
|
"less": "^4.4.2",
|
|
65
65
|
"postcss": "^8.5.6",
|
|
@@ -68,15 +68,17 @@
|
|
|
68
68
|
"rollup-plugin-postcss": "^4.0.2",
|
|
69
69
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
70
70
|
"typescript": "^5.9.3",
|
|
71
|
-
"vitest": "^4.0.
|
|
71
|
+
"vitest": "^4.0.15"
|
|
72
72
|
},
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@ebay/nice-modal-react": "^1.2.13",
|
|
75
|
-
"@temboplus/frontend-core": "^0.2.20-beta.2",
|
|
76
75
|
"antd": "6.0.0",
|
|
77
76
|
"lodash": "^4.17.21",
|
|
78
77
|
"react": "^19.1.0",
|
|
79
78
|
"react-dom": "^19.1.0",
|
|
80
79
|
"react-toastify": "^11.0.5"
|
|
80
|
+
},
|
|
81
|
+
"dependencies": {
|
|
82
|
+
"@temboplus/frontend-core": "^0.2.20-beta.6"
|
|
81
83
|
}
|
|
82
84
|
}
|