@artibet/react-mui-components 2.0.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- package/core/index.js +1 -0
- package/package.json +5 -6
- package/utils/index.js +1 -1
package/core/index.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
import e from"react";import{Typography as o,Alert as r}from"@mui/material";import{Done as t,Close as n}from"@mui/icons-material";var i=function(r){var t=r.label,n=void 0===t?"":t,i=r.color,a=void 0===i?"white":i,d=r.backgroundColor,l=void 0===d?"#888888":d,c=r.paddingX,u=void 0===c?"10px":c,m=r.paddingY,s=void 0===m?"5px":m,v=r.borderRadius,p=void 0===v?"10px":v,f=r.fontSize,g=void 0===f?"14px":f,x=r.width,b={text:{display:"inline-block",textAlign:"center",backgroundColor:l,paddingX:u,paddingY:s,borderRadius:p,width:void 0===x?"auto":x,color:a,fontSize:g}};return e.createElement(o,{sx:b.text},n)},a=function(o){var t=o.errors,n=o.marginBottom,i=void 0===n?3:n;return 0===Object.keys(t).length?null:e.createElement(e.Fragment,null,Object.keys(t).map((function(o,n){return e.createElement(r,{sx:{marginBottom:i},key:n,severity:"error"},t[o])})))},d=function(o){var r=o.on,i=o.showOn,a=void 0===i||i,d=o.showOff,l=void 0===d||d,c=o.size,u=void 0===c?24:c;return Boolean(r)?a?e.createElement(t,{color:"success",sx:{fontSize:u}}):null:l?e.createElement(n,{color:"error",sx:{fontSize:u}}):null},l=function(o){var r=o.status,t=o.showYes,n=void 0===t||t;o.showNo;var a=o.width,d=void 0===a?80:a;return Boolean(r)?n&&e.createElement(i,{label:"ΝΑΙ",backgroundColor:"green",fontSize:"12px",paddingX:"5px",width:d}):n&&e.createElement(i,{label:"ΟΧΙ",backgroundColor:"red",fontSize:"12px",paddingX:"5px",width:d})};export{i as MyChip,a as ShowErrors,d as StatusIcon,l as YesNoChip};
|
package/package.json
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
{
|
2
2
|
"name": "@artibet/react-mui-components",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.1.1",
|
4
4
|
"description": "Various react components build with mui library",
|
5
|
-
"main": "index.js",
|
5
|
+
"main": "./core/index.js",
|
6
6
|
"scripts": {
|
7
7
|
"rollup": "rollup -c"
|
8
8
|
},
|
@@ -37,6 +37,7 @@
|
|
37
37
|
"yup": "^1.2.0"
|
38
38
|
},
|
39
39
|
"files": [
|
40
|
+
"core",
|
40
41
|
"hooks",
|
41
42
|
"utils"
|
42
43
|
],
|
@@ -52,16 +53,14 @@
|
|
52
53
|
"@rollup/plugin-node-resolve": "^15.2.1",
|
53
54
|
"@rollup/plugin-terser": "^0.4.3",
|
54
55
|
"@rollup/plugin-typescript": "^11.1.3",
|
56
|
+
"rollup-plugin-postcss": "^4.0.2",
|
55
57
|
"date-fns": "^2.30.0",
|
56
58
|
"nprogress": "^0.2.0",
|
57
59
|
"react-color": "^2.19.3",
|
58
60
|
"react-hook-form": "^7.45.4",
|
59
|
-
"rollup-plugin-import-css": "^3.3.1",
|
60
61
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
61
62
|
"typescript": "^5.2.2",
|
62
63
|
"yup": "^1.2.0"
|
63
64
|
},
|
64
|
-
"dependencies": {
|
65
|
-
"rollup-plugin-postcss": "^4.0.2"
|
66
|
-
}
|
65
|
+
"dependencies": {}
|
67
66
|
}
|
package/utils/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{parseISO as n,format as t,getMonth as r,formatISO as e}from"date-fns";import{el as o}from"date-fns/locale";var u=function(n){return n?parseInt(n).toLocaleString():0},c=/^$|^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
|
1
|
+
import{parseISO as n,format as t,getMonth as r,formatISO as e}from"date-fns";import{el as o}from"date-fns/locale";var u=function(n){return n?parseInt(n).toLocaleString():0},c=/^$|^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,a=function(n){return 0===n?"ΟΧΙ":1===n?"ΝΑΙ":null},l=function(t){if(!t)return null;var r=n(t);return"Invalid Date"==r?null:r},y=function(r){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/";return r?t(n(r),"dd".concat(e,"MM").concat(e,"yyyy")):""},i=function(r){return t(n(r,{locale:o}),"HH:mm")},f=function(r){return r?t(n(r,{locale:o}),"dd/MM/yyyy, HH:mm"):""},d=function(n){return t(n,"dd/MM/yyyy")},m=function(n){return t(n,"yyyy-MM-dd",{locale:o})},M=function(n){return n?t(n,"yyyy-MM-dd HH:mm",{locale:o}):null},v=function(n){var e=r(n);return t(n,"eeee, d ".concat(genikiOfMonth[e]," yyyy"),{locale:o})},p=function(n){return n?e(n):""},s=function(n,t){var r;return function(){for(var e=arguments.length,o=new Array(e),u=0;u<e;u++)o[u]=arguments[u];r&&clearTimeout(r),r=setTimeout((function(){n.apply(void 0,o)}),t)}};export{c as emailRegEx,y as formatDate,f as formatDateTime,d as formatFnsDate,m as formatFnsDbDate,M as formatFnsDbDatetime,v as formatFnsFullDate,u as formatInteger,i as formatTime,s as myDebounce,l as parseDate,p as toISOString,a as yesno};
|