@artibet/react-mui-components 2.6.2 → 2.6.3
Sign up to get free protection for your applications and to get access to all the features.
- package/core/index.js +1 -1
- package/package.json +1 -1
package/core/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import e from"react";import{Typography as
|
1
|
+
import e from"react";import{Typography as t,Alert as n,Box as r,Button as o,Stack as i}from"@mui/material";import{Done as l,Close as a}from"@mui/icons-material";import"date-fns";import"date-fns/locale";import{ImArrowLeft as c}from"react-icons/im";var u=function(n){var r=n.label,o=void 0===r?"":r,i=n.color,l=void 0===i?"white":i,a=n.backgroundColor,c=void 0===a?"#888888":a,u=n.paddingX,s=void 0===u?"10px":u,d=n.paddingY,m=void 0===d?"5px":d,f=n.borderRadius,p=void 0===f?"10px":f,v=n.fontSize,g=void 0===v?"14px":v,x=n.width,E={text:{display:"inline-block",textAlign:"center",backgroundColor:c,paddingX:s,paddingY:m,borderRadius:p,width:void 0===x?"auto":x,color:l,fontSize:g}};return e.createElement(t,{sx:E.text},o)},s=function(t){var r=t.errors,o=t.marginBottom,i=void 0===o?3:o;return 0===Object.keys(r).length?null:e.createElement(e.Fragment,null,Object.keys(r).map((function(t,o){return e.createElement(n,{sx:{marginBottom:i},key:o,severity:"error"},r[t])})))},d=function(t){var n=t.on,r=t.showOn,o=void 0===r||r,i=t.showOff,c=void 0===i||i,u=t.size,s=void 0===u?24:u;return Boolean(n)?o?e.createElement(l,{color:"success",sx:{fontSize:s}}):null:c?e.createElement(a,{color:"error",sx:{fontSize:s}}):null},m=function(t){var n=t.status,r=t.showYes,o=void 0===r||r,i=t.showNo,l=void 0===i||i,a=t.width,c=void 0===a?80:a;return Boolean(n)?o&&e.createElement(u,{label:"ΝΑΙ",backgroundColor:"green",fontSize:"12px",paddingX:"5px",width:c}):l&&e.createElement(u,{label:"ΟΧΙ",backgroundColor:"red",fontSize:"12px",paddingX:"5px",width:c})},f=function(t){var n,o=t.amount,i=t.align,l=void 0===i?"left":i;return e.createElement(r,{sx:{textAlign:l}},(n=o,new Intl.NumberFormat("el-GR",{style:"currency",currency:"EUR"}).format(n)))},p=function(n){var l=n.position,a=void 0===l?"top":l,u=n.label,s=void 0===u?"ΕΠΙΣΤΡΟΦΗ":u;return e.createElement(r,{sx:{marginBottom:1}},"bottom"===a&&e.createElement("hr",null),e.createElement(r,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center"}},e.createElement(o,{color:"warning",onClick:function(){return history.back()}},e.createElement(i,{direction:"row",spacing:1,sx:{alignItems:"center"}},e.createElement(c,null),e.createElement(t,null,s)))),"top"===a&&e.createElement("hr",null))};function v(){return v=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},v.apply(this,arguments)}var g=function(n){var l=n.title,a=n.titlePosition,u=void 0===a?"right":a,s=n.showReturnButton,d=void 0===s||s,m=n.returnButtonLabel,f=void 0===m?"ΕΠΙΣΤΡΟΦΗ":m,p=n.onReturn,g=void 0===p?null:p,x=n.titleProps,E=void 0===x?{}:x,b=n.returnButtonProps,h=void 0===b?{}:b,w=e.createElement(o,v({color:"warning",onClick:g?g():function(){return history.back()}},h),e.createElement(i,{direction:"row",spacing:1,sx:{alignItems:"center"}},e.createElement(c,null),e.createElement(t,null,f))),y=e.createElement(t,v({variant:"h6"},E),l),k="space-between";return d||(k="left"===u?"flex-start":"flex-end"),e.createElement(e.Fragment,null,e.createElement(r,{sx:{display:"flex",justifyContent:{justifyContent:k},alignItems:"center"}},"left"===u&&y,d&&w,"right"===u&&y),e.createElement("hr",null))};export{f as Currency,p as GoBack,u as MyChip,g as PageTitle,s as ShowErrors,d as StatusIcon,m as YesNoChip};
|