@artibet/react-mui-components 2.6.2 → 2.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/core/index.js +1 -1
  2. package/package.json +1 -1
package/core/index.js CHANGED
@@ -1 +1 @@
1
- import e from"react";import{Typography as o,Alert as t,Box as r}from"@mui/material";import{Done as n,Close as i}from"@mui/icons-material";import"date-fns";import"date-fns/locale";var a=function(t){var r=t.label,n=void 0===r?"":r,i=t.color,a=void 0===i?"white":i,l=t.backgroundColor,d=void 0===l?"#888888":l,c=t.paddingX,u=void 0===c?"10px":c,m=t.paddingY,s=void 0===m?"5px":m,v=t.borderRadius,p=void 0===v?"10px":v,f=t.fontSize,g=void 0===f?"14px":f,x=t.width,b={text:{display:"inline-block",textAlign:"center",backgroundColor:d,paddingX:u,paddingY:s,borderRadius:p,width:void 0===x?"auto":x,color:a,fontSize:g}};return e.createElement(o,{sx:b.text},n)},l=function(o){var r=o.errors,n=o.marginBottom,i=void 0===n?3:n;return 0===Object.keys(r).length?null:e.createElement(e.Fragment,null,Object.keys(r).map((function(o,n){return e.createElement(t,{sx:{marginBottom:i},key:n,severity:"error"},r[o])})))},d=function(o){var t=o.on,r=o.showOn,a=void 0===r||r,l=o.showOff,d=void 0===l||l,c=o.size,u=void 0===c?24:c;return Boolean(t)?a?e.createElement(n,{color:"success",sx:{fontSize:u}}):null:d?e.createElement(i,{color:"error",sx:{fontSize:u}}):null},c=function(o){var t=o.status,r=o.showYes,n=void 0===r||r,i=o.showNo,l=void 0===i||i,d=o.width,c=void 0===d?80:d;return Boolean(t)?n&&e.createElement(a,{label:"ΝΑΙ",backgroundColor:"green",fontSize:"12px",paddingX:"5px",width:c}):l&&e.createElement(a,{label:"ΟΧΙ",backgroundColor:"red",fontSize:"12px",paddingX:"5px",width:c})},u=function(o){var t,n=o.amount,i=o.align,a=void 0===i?"left":i;return e.createElement(r,{sx:{textAlign:a}},(t=n,new Intl.NumberFormat("el-GR",{style:"currency",currency:"EUR"}).format(t)))};export{u as Currency,a as MyChip,l as ShowErrors,d as StatusIcon,c as YesNoChip};
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};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artibet/react-mui-components",
3
- "version": "2.6.2",
3
+ "version": "2.6.3",
4
4
  "description": "Various react components build with mui library",
5
5
  "main": "./core/index.js",
6
6
  "scripts": {