@ukpc-lib/react 0.2.11 → 0.2.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/Colors-4ad88021.js +29 -0
- package/dist/Colors-51ce6654.cjs +1 -0
- package/dist/components/index.cjs +25 -25
- package/dist/components/index.js +43 -42
- package/dist/{index.module-1e1600c5.js → index.module-91685508.js} +1161 -1196
- package/dist/{index.module-1924da8e.cjs → index.module-dcaddd18.cjs} +35 -35
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +14 -14
- package/dist/theme/index.cjs +1 -0
- package/dist/theme/index.js +577 -0
- package/package.json +8 -2
- package/web-components-bundle/global-menu/index.cjs +1 -1
- package/web-components-bundle/global-menu/index.js +1 -1
- package/web-components-bundle/global-topbar/index.cjs +1 -1
- package/web-components-bundle/global-topbar/index.js +2 -2
- package/web-components-bundle/has-permission/index.cjs +1 -1
- package/web-components-bundle/has-permission/index.js +2 -2
- package/web-components-bundle/{index-178bf236.cjs → index-0c76b789.cjs} +68 -68
- package/web-components-bundle/{index-75324537.js → index-200424a6.js} +18 -28
- package/web-components-bundle/{index-374bf205.cjs → index-661a7bdb.cjs} +1 -1
- package/web-components-bundle/{index-1b59168e.js → index-fb164b1a.js} +5922 -5925
package/dist/share/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../index.module-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../index.module-dcaddd18.cjs"),d=require("axios"),i=require("react/jsx-runtime"),g=require("react");require("moment");require("@r2wc/react-to-web-component");const f=require("react-router-dom");require("react-dom");require("@mui/material");function q({config:t,pushError:n=o.pushError}){const r=d.create(t);r.interceptors.request.use(async e=>(e.headers={Accept:"application/json","Content-Type":"application/json"},e),e=>Promise.reject(e)),r.interceptors.response.use(e=>e,async e=>s(e));async function s(e){var l,P,p,h;console.error("Error 🚨:",e);const a=e.config,u=(P=(l=e.response)==null?void 0:l.data)==null?void 0:P.errorMessage,m=u===o.ERROR_MESSAGE.TOKEN_EXPIRED;return((p=e.response)==null?void 0:p.status)===401?m&&!a._retry?(a._retry=!0,r.post("/authentication/api/v1/auth/refresh-token").then(()=>r(a)).catch(()=>o.login(t.baseURL))):((!u||!m)&&o.login(t.baseURL),Promise.reject("Unauthorized! Please login again.")):(((h=e.response)==null?void 0:h.status)===403?n(o.t("errorMessage.403")):n(o.t(`${u}`)||"Something went wrong!"),Promise.reject(e.response.data))}return r}const R=t=>{const[n,r]=g.useState([]);return g.useEffect(()=>{d.get(`${t}/user-management/api/v1/users/my-account/permissions`,{withCredentials:!0}).then(s=>r(s.data)).catch(s=>{console.error("Getting user permission error:",s)})},[t]),n},c=t=>(n,r)=>{const s=R(t);return r?n.every(e=>s==null?void 0:s.includes(e)):n.some(e=>s==null?void 0:s.includes(e))},j=({baseUrl:t,accessWith:n,requireAll:r,children:s})=>c(t)(n,r)?i.jsx(i.Fragment,{children:s}):null,v=({accessWith:t,requireAll:n,baseUrl:r,unAuthorizedPath:s,children:e})=>c(r)(t,n)?i.jsx(i.Fragment,{children:e}):i.jsx(f.Navigate,{to:s,replace:!0});exports.AuthProvider=o.AuthProvider;exports.TranslationProvider=o.TranslationProvider;exports.search=o.search;exports.useAuth=o.useAuth;exports.useTranslation=o.useTranslation;exports.HasPermission=j;exports.PermissionRoute=v;exports.getAxiosInstance=q;exports.getUseHasPermission=c;exports.useGetPermission=R;
|
package/dist/share/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { A as f, t as l, p as E, E as R } from "../index.module-91685508.js";
|
|
2
|
+
import { F as L, T as N, m as O, G as b, u as z } from "../index.module-91685508.js";
|
|
3
3
|
import P from "axios";
|
|
4
4
|
import { jsx as a, Fragment as g } from "react/jsx-runtime";
|
|
5
5
|
import { useState as y, useEffect as v } from "react";
|
|
@@ -8,7 +8,7 @@ import "@r2wc/react-to-web-component";
|
|
|
8
8
|
import { Navigate as x } from "react-router-dom";
|
|
9
9
|
import "react-dom";
|
|
10
10
|
import "@mui/material";
|
|
11
|
-
function
|
|
11
|
+
function k({
|
|
12
12
|
config: t,
|
|
13
13
|
pushError: n = E
|
|
14
14
|
}) {
|
|
@@ -24,14 +24,14 @@ function U({
|
|
|
24
24
|
async (e) => s(e)
|
|
25
25
|
);
|
|
26
26
|
async function s(e) {
|
|
27
|
-
var c,
|
|
27
|
+
var c, m, p, h;
|
|
28
28
|
console.error("Error 🚨:", e);
|
|
29
|
-
const o = e.config, i = (
|
|
30
|
-
return ((
|
|
29
|
+
const o = e.config, i = (m = (c = e.response) == null ? void 0 : c.data) == null ? void 0 : m.errorMessage, u = i === R.TOKEN_EXPIRED;
|
|
30
|
+
return ((p = e.response) == null ? void 0 : p.status) === 401 ? u && !o._retry ? (o._retry = !0, r.post("/authentication/api/v1/auth/refresh-token").then(() => r(o)).catch(() => f(t.baseURL))) : ((!i || !u) && f(t.baseURL), Promise.reject("Unauthorized! Please login again.")) : (((h = e.response) == null ? void 0 : h.status) === 403 ? n(l("errorMessage.403")) : n(l(`${i}`) || "Something went wrong!"), Promise.reject(e.response.data));
|
|
31
31
|
}
|
|
32
32
|
return r;
|
|
33
33
|
}
|
|
34
|
-
const
|
|
34
|
+
const A = (t) => {
|
|
35
35
|
const [n, r] = y([]);
|
|
36
36
|
return v(() => {
|
|
37
37
|
P.get(`${t}/user-management/api/v1/users/my-account/permissions`, {
|
|
@@ -41,18 +41,18 @@ const j = (t) => {
|
|
|
41
41
|
});
|
|
42
42
|
}, [t]), n;
|
|
43
43
|
}, d = (t) => (n, r) => {
|
|
44
|
-
const s =
|
|
44
|
+
const s = A(t);
|
|
45
45
|
return r ? n.every(
|
|
46
46
|
(e) => s == null ? void 0 : s.includes(e)
|
|
47
47
|
) : n.some(
|
|
48
48
|
(e) => s == null ? void 0 : s.includes(e)
|
|
49
49
|
);
|
|
50
|
-
},
|
|
50
|
+
}, q = ({
|
|
51
51
|
baseUrl: t,
|
|
52
52
|
accessWith: n,
|
|
53
53
|
requireAll: r,
|
|
54
54
|
children: s
|
|
55
|
-
}) => d(t)(n, r) ? /* @__PURE__ */ a(g, { children: s }) : null,
|
|
55
|
+
}) => d(t)(n, r) ? /* @__PURE__ */ a(g, { children: s }) : null, C = ({
|
|
56
56
|
accessWith: t,
|
|
57
57
|
requireAll: n,
|
|
58
58
|
baseUrl: r,
|
|
@@ -61,13 +61,13 @@ const j = (t) => {
|
|
|
61
61
|
}) => d(r)(t, n) ? /* @__PURE__ */ a(g, { children: e }) : /* @__PURE__ */ a(x, { to: s, replace: !0 });
|
|
62
62
|
export {
|
|
63
63
|
L as AuthProvider,
|
|
64
|
-
|
|
65
|
-
|
|
64
|
+
q as HasPermission,
|
|
65
|
+
C as PermissionRoute,
|
|
66
66
|
N as TranslationProvider,
|
|
67
|
-
|
|
67
|
+
k as getAxiosInstance,
|
|
68
68
|
d as getUseHasPermission,
|
|
69
69
|
O as search,
|
|
70
70
|
b as useAuth,
|
|
71
|
-
|
|
71
|
+
A as useGetPermission,
|
|
72
72
|
z as useTranslation
|
|
73
73
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../Colors-51ce6654.cjs"),v=require("react/jsx-runtime"),m=require("@mui/material"),a=require("react");var h={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},g=a.createContext&&a.createContext(h),O=["attr","size","title"];function M(e,r){if(e==null)return{};var t=P(e,r),i,o;if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(o=0;o<n.length;o++)i=n[o],!(r.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(e,i)&&(t[i]=e[i])}return t}function P(e,r){if(e==null)return{};var t={},i=Object.keys(e),o,n;for(n=0;n<i.length;n++)o=i[n],!(r.indexOf(o)>=0)&&(t[o]=e[o]);return t}function d(){return d=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},d.apply(this,arguments)}function s(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);r&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),t.push.apply(t,i)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?s(Object(t),!0).forEach(function(i){C(e,i,t[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):s(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))})}return e}function C(e,r,t){return r=S(r),r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function S(e){var r=w(e,"string");return typeof r=="symbol"?r:String(r)}function w(e,r){if(typeof e!="object"||e===null)return e;var t=e[Symbol.toPrimitive];if(t!==void 0){var i=t.call(e,r||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(r==="string"?String:Number)(e)}function b(e){return e&&e.map((r,t)=>a.createElement(r.tag,l({key:t},r.attr),b(r.child)))}function f(e){return r=>a.createElement(k,d({attr:l({},e.attr)},r),b(e.child))}function k(e){var r=t=>{var{attr:i,size:o,title:n}=e,x=M(e,O),p=o||t.size||"1em",u;return t.className&&(u=t.className),e.className&&(u=(u?u+" ":"")+e.className),a.createElement("svg",d({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,x,{className:u,style:l(l({color:e.color||t.color},t.style),e.style),height:p,width:p,xmlns:"http://www.w3.org/2000/svg"}),n&&a.createElement("title",null,n),e.children)};return g!==void 0?a.createElement(g.Consumer,null,t=>r(t)):r(h)}function z(e){return f({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M689 165.1L308.2 493.5c-10.9 9.4-10.9 27.5 0 37L689 858.9c14.2 12.2 35 1.2 35-18.5V183.6c0-19.7-20.8-30.7-35-18.5z"},child:[]}]})(e)}function j(e){return f({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z"},child:[]}]})(e)}const y=({colors:e=c.color})=>m.createTheme({palette:{primary:{main:e.primary300},secondary:{main:e.secondary},warning:{main:e.warning},error:{main:e.danger}},typography:{fontFamily:"TT Firs Neue Trl",button:{textTransform:"none",fontSize:"0.875rem",fontWeight:400,boxShadow:"none"},body1:{fontSize:"0.875rem",fontWeight:400},body2:{fontSize:"0.75rem"},h6:{fontSize:"0.875rem",fontWeight:500},h5:{fontSize:"1rem",fontWeight:500},h4:{fontSize:"1.25rem",fontWeight:500},h3:{fontSize:"1.5rem",fontWeight:500},h2:{fontSize:"2rem",fontWeight:500},h1:{fontSize:"2.5rem",fontWeight:500},subtitle1:{fontSize:"0.75rem"},subtitle2:{fontSize:"0.625rem"}},components:{MuiIconButton:{styleOverrides:{root:{},sizeSmall:{}}},MuiButton:{styleOverrides:{root:{boxShadow:"none !important",padding:"8px 32px",borderWidth:1,borderRadius:3,fontWeight:400}},variants:[{props:{variant:"primary"},style:{backgroundColor:e.primary300,color:e.buttonText,"&:hover":{backgroundColor:e.primary500,color:e.white},"&.Mui-disabled":{backgroundColor:e.grey200}}},{props:{variant:"confirm"},style:{backgroundColor:e.danger,color:e.white,"&:hover":{backgroundColor:e.dangerDark},"&.Mui-disabled":{backgroundColor:e.grey200}}},{props:{variant:"cancel"},style:{backgroundColor:e.grey300,color:e.textPrimary,"&:hover":{backgroundColor:e.grey400}}},{props:{variant:"outlined"},style:{color:e.primary500,border:"1px solid",borderColor:e.primary400,"&:hover":{backgroundColor:"inherit"}}},{props:{variant:"outlinedPrimary"},style:{color:e.primary500,border:"1px solid",borderColor:e.primary400,"&:hover":{backgroundColor:"inherit"}}},{props:{variant:"outLinedDanger"},style:{color:e.danger,border:"1px solid",borderColor:e.danger,"&:hover":{backgroundColor:"inherit"}}}]},MuiAppBar:{styleOverrides:{root:{backgroundColor:e.appBarBgColor,color:e.appBarColor}}},MuiSelect:{defaultProps:{MenuProps:{PaperProps:{sx:{boxShadow:"none",border:1,borderStyle:"solid",borderColor:e.grey300,mt:"5px"}},MenuListProps:{sx:{padding:"5px","& .MuiMenuItem-root":{fontWeight:400,minHeight:0,borderRadius:"5px","&:hover":{backgroundColor:e.grey100},"&.Mui-selected":{backgroundColor:e.primary200}}}}}},styleOverrides:{select:{padding:"9.94px 5px 9.94px 15px"}}},MuiPaginationItem:{defaultProps:{components:{previous:z,next:j}},styleOverrides:{root:{"& svg":{width:"10px"},border:"none",fontSize:"14px",lineHeight:"1.5rem",borderRadius:"7px","&.Mui-selected":{backgroundColor:e.primary200},"&.MuiPaginationItem-previousNext":{backgroundColor:e.grey200}}}},MuiChip:{styleOverrides:{root:{borderRadius:"5px",fontSize:"10px",lineHeight:"12px",fontWeight:400,"& .MuiChip-label":{lineHeight:"normal"}},avatar:{width:"10px"},colorSuccess:{color:e.success,backgroundColor:e.successLight},colorWarning:{color:e.warning,backgroundColor:e.warningLight},colorError:{color:e.danger,backgroundColor:e.dangerLight},colorSecondary:{color:e.linkPrimary,backgroundColor:e.linkLight}}},MuiTab:{styleOverrides:{root:{background:e.grey200,borderTopLeftRadius:"8px",borderTopRightRadius:"8px",marginRight:"5px",minWidth:"200px",flexDirection:"row",alignContent:"center",gap:"8px",textTransform:"capitalize","& svg":{mb:"0 !important"},padding:0,height:"32px",minHeight:"auto",fontSize:"12px","& .chart-icon":{fill:e.grey600},"& .detail-icon":{stroke:e.grey600}}}},MuiDrawer:{defaultProps:{},styleOverrides:{root:{"&.MuiDrawer-paper":{overflowY:"unset"},"& .MuiDrawer-paper":{zIndex:9},"&.MuiPaper-root":{border:"none",background:e.grey100,pt:12,zIndex:9}}}},MuiTextField:{defaultProps:{InputProps:{sx:{"& .Mui-disabled":{background:e.grey200}}},InputLabelProps:{shrink:!0}},styleOverrides:{root:{backgroundColor:e.white,"& .MuiOutlinedInput-input":{padding:"0px 16px 0px 12px",fontWeight:400,height:40,fontSize:"14px",border:1,borderRadius:4,"&::placeholder":{color:e.grey600}},"& .MuiFormLabel-root":{color:e.textPrimary},"& .MuiFormLabel-asterisk":{color:e.danger}}}},MuiFormGroup:{styleOverrides:{root:{}}},MuiFormHelperText:{defaultProps:{sx:{fontSize:12}},styleOverrides:{}},MuiAutocomplete:{defaultProps:{sx:{"& .MuiPaper-root":{padding:"5px"}}},styleOverrides:{root:{"& .MuiSvgIcon-root":{width:"20px",height:"20px"},"& .MuiAutocomplete-tag":{margin:0},"& .MuiButtonBase-root":{marginRight:"2px !important",height:"max-content",padding:"2px"},"& .MuiOutlinedInput-root":{padding:"7.45px 55px 7.45px 10px !important"},"& svg":{},"& #checkboxes-tags-demo":{padding:"6px 4px"},"& .MuiAutocomplete-endAdornment":{top:"calc(50% - 12px)"}}}},MuiTableHead:{styleOverrides:{root:{"& th":{fontSize:"14px",padding:"8px 16px"}}}},MuiTableBody:{styleOverrides:{root:{"& th,td":{fontSize:"14px",padding:"8px 16px",height:"45px"},"& .MuiTableCell-root":{borderBottom:`1px solid ${e.grey300}`}}}},MuiRadio:{defaultProps:{sx:{"&.MuiButtonBase-root":{padding:"5px"}}},styleOverrides:{root:{"& .MuiSvgIcon-root":{fontSize:16},color:e.grey600,"&.Mui-checked":{color:e.success},"&.Mui-disabled":{color:e.grey600}}}},MuiTooltip:{defaultProps:{placement:"top",arrow:!0}}}}),T=e=>{const r=y({});return v.jsx(m.ThemeProvider,{theme:r,children:e.children})};exports.color=c.color;exports.SaasThemeProvider=T;exports.createCustomTheme=y;
|
|
@@ -0,0 +1,577 @@
|
|
|
1
|
+
import { c as b } from "../Colors-4ad88021.js";
|
|
2
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
3
|
+
import { createTheme as x, ThemeProvider as v } from "@mui/material";
|
|
4
|
+
import a from "react";
|
|
5
|
+
var c = {
|
|
6
|
+
color: void 0,
|
|
7
|
+
size: void 0,
|
|
8
|
+
className: void 0,
|
|
9
|
+
style: void 0,
|
|
10
|
+
attr: void 0
|
|
11
|
+
}, g = a.createContext && /* @__PURE__ */ a.createContext(c), O = ["attr", "size", "title"];
|
|
12
|
+
function M(e, r) {
|
|
13
|
+
if (e == null)
|
|
14
|
+
return {};
|
|
15
|
+
var t = P(e, r), i, o;
|
|
16
|
+
if (Object.getOwnPropertySymbols) {
|
|
17
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
18
|
+
for (o = 0; o < n.length; o++)
|
|
19
|
+
i = n[o], !(r.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(e, i) && (t[i] = e[i]);
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
}
|
|
23
|
+
function P(e, r) {
|
|
24
|
+
if (e == null)
|
|
25
|
+
return {};
|
|
26
|
+
var t = {}, i = Object.keys(e), o, n;
|
|
27
|
+
for (n = 0; n < i.length; n++)
|
|
28
|
+
o = i[n], !(r.indexOf(o) >= 0) && (t[o] = e[o]);
|
|
29
|
+
return t;
|
|
30
|
+
}
|
|
31
|
+
function u() {
|
|
32
|
+
return u = Object.assign ? Object.assign.bind() : function(e) {
|
|
33
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
34
|
+
var t = arguments[r];
|
|
35
|
+
for (var i in t)
|
|
36
|
+
Object.prototype.hasOwnProperty.call(t, i) && (e[i] = t[i]);
|
|
37
|
+
}
|
|
38
|
+
return e;
|
|
39
|
+
}, u.apply(this, arguments);
|
|
40
|
+
}
|
|
41
|
+
function s(e, r) {
|
|
42
|
+
var t = Object.keys(e);
|
|
43
|
+
if (Object.getOwnPropertySymbols) {
|
|
44
|
+
var i = Object.getOwnPropertySymbols(e);
|
|
45
|
+
r && (i = i.filter(function(o) {
|
|
46
|
+
return Object.getOwnPropertyDescriptor(e, o).enumerable;
|
|
47
|
+
})), t.push.apply(t, i);
|
|
48
|
+
}
|
|
49
|
+
return t;
|
|
50
|
+
}
|
|
51
|
+
function p(e) {
|
|
52
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
53
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
54
|
+
r % 2 ? s(Object(t), !0).forEach(function(i) {
|
|
55
|
+
C(e, i, t[i]);
|
|
56
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : s(Object(t)).forEach(function(i) {
|
|
57
|
+
Object.defineProperty(e, i, Object.getOwnPropertyDescriptor(t, i));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
return e;
|
|
61
|
+
}
|
|
62
|
+
function C(e, r, t) {
|
|
63
|
+
return r = w(r), r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
|
|
64
|
+
}
|
|
65
|
+
function w(e) {
|
|
66
|
+
var r = S(e, "string");
|
|
67
|
+
return typeof r == "symbol" ? r : String(r);
|
|
68
|
+
}
|
|
69
|
+
function S(e, r) {
|
|
70
|
+
if (typeof e != "object" || e === null)
|
|
71
|
+
return e;
|
|
72
|
+
var t = e[Symbol.toPrimitive];
|
|
73
|
+
if (t !== void 0) {
|
|
74
|
+
var i = t.call(e, r || "default");
|
|
75
|
+
if (typeof i != "object")
|
|
76
|
+
return i;
|
|
77
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
78
|
+
}
|
|
79
|
+
return (r === "string" ? String : Number)(e);
|
|
80
|
+
}
|
|
81
|
+
function m(e) {
|
|
82
|
+
return e && e.map((r, t) => /* @__PURE__ */ a.createElement(r.tag, p({
|
|
83
|
+
key: t
|
|
84
|
+
}, r.attr), m(r.child)));
|
|
85
|
+
}
|
|
86
|
+
function f(e) {
|
|
87
|
+
return (r) => /* @__PURE__ */ a.createElement(k, u({
|
|
88
|
+
attr: p({}, e.attr)
|
|
89
|
+
}, r), m(e.child));
|
|
90
|
+
}
|
|
91
|
+
function k(e) {
|
|
92
|
+
var r = (t) => {
|
|
93
|
+
var {
|
|
94
|
+
attr: i,
|
|
95
|
+
size: o,
|
|
96
|
+
title: n
|
|
97
|
+
} = e, h = M(e, O), l = o || t.size || "1em", d;
|
|
98
|
+
return t.className && (d = t.className), e.className && (d = (d ? d + " " : "") + e.className), /* @__PURE__ */ a.createElement("svg", u({
|
|
99
|
+
stroke: "currentColor",
|
|
100
|
+
fill: "currentColor",
|
|
101
|
+
strokeWidth: "0"
|
|
102
|
+
}, t.attr, i, h, {
|
|
103
|
+
className: d,
|
|
104
|
+
style: p(p({
|
|
105
|
+
color: e.color || t.color
|
|
106
|
+
}, t.style), e.style),
|
|
107
|
+
height: l,
|
|
108
|
+
width: l,
|
|
109
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
110
|
+
}), n && /* @__PURE__ */ a.createElement("title", null, n), e.children);
|
|
111
|
+
};
|
|
112
|
+
return g !== void 0 ? /* @__PURE__ */ a.createElement(g.Consumer, null, (t) => r(t)) : r(c);
|
|
113
|
+
}
|
|
114
|
+
function z(e) {
|
|
115
|
+
return f({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M689 165.1L308.2 493.5c-10.9 9.4-10.9 27.5 0 37L689 858.9c14.2 12.2 35 1.2 35-18.5V183.6c0-19.7-20.8-30.7-35-18.5z" }, child: [] }] })(e);
|
|
116
|
+
}
|
|
117
|
+
function j(e) {
|
|
118
|
+
return f({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M715.8 493.5L335 165.1c-14.2-12.2-35-1.2-35 18.5v656.8c0 19.7 20.8 30.7 35 18.5l380.8-328.4c10.9-9.4 10.9-27.6 0-37z" }, child: [] }] })(e);
|
|
119
|
+
}
|
|
120
|
+
const T = ({ colors: e = b }) => x({
|
|
121
|
+
palette: {
|
|
122
|
+
primary: {
|
|
123
|
+
main: e.primary300
|
|
124
|
+
},
|
|
125
|
+
secondary: {
|
|
126
|
+
main: e.secondary
|
|
127
|
+
},
|
|
128
|
+
warning: {
|
|
129
|
+
main: e.warning
|
|
130
|
+
},
|
|
131
|
+
error: {
|
|
132
|
+
main: e.danger
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
typography: {
|
|
136
|
+
fontFamily: "TT Firs Neue Trl",
|
|
137
|
+
button: {
|
|
138
|
+
textTransform: "none",
|
|
139
|
+
// padding: '0.75rem 1rem',
|
|
140
|
+
fontSize: "0.875rem",
|
|
141
|
+
// lineHeight: '1rem',
|
|
142
|
+
// height: 'fit-content',
|
|
143
|
+
// // fontFamily: '',
|
|
144
|
+
// borderRadius: 5,
|
|
145
|
+
fontWeight: 400,
|
|
146
|
+
boxShadow: "none"
|
|
147
|
+
},
|
|
148
|
+
body1: {
|
|
149
|
+
fontSize: "0.875rem",
|
|
150
|
+
fontWeight: 400
|
|
151
|
+
},
|
|
152
|
+
body2: {
|
|
153
|
+
fontSize: "0.75rem"
|
|
154
|
+
},
|
|
155
|
+
h6: {
|
|
156
|
+
fontSize: "0.875rem",
|
|
157
|
+
fontWeight: 500
|
|
158
|
+
},
|
|
159
|
+
h5: {
|
|
160
|
+
fontSize: "1rem",
|
|
161
|
+
fontWeight: 500
|
|
162
|
+
},
|
|
163
|
+
h4: {
|
|
164
|
+
fontSize: "1.25rem",
|
|
165
|
+
fontWeight: 500
|
|
166
|
+
},
|
|
167
|
+
h3: {
|
|
168
|
+
fontSize: "1.5rem",
|
|
169
|
+
fontWeight: 500
|
|
170
|
+
},
|
|
171
|
+
h2: {
|
|
172
|
+
fontSize: "2rem",
|
|
173
|
+
fontWeight: 500
|
|
174
|
+
},
|
|
175
|
+
h1: {
|
|
176
|
+
fontSize: "2.5rem",
|
|
177
|
+
fontWeight: 500
|
|
178
|
+
},
|
|
179
|
+
subtitle1: {
|
|
180
|
+
fontSize: "0.75rem"
|
|
181
|
+
},
|
|
182
|
+
subtitle2: {
|
|
183
|
+
fontSize: "0.625rem"
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
components: {
|
|
187
|
+
MuiIconButton: {
|
|
188
|
+
styleOverrides: {
|
|
189
|
+
root: {},
|
|
190
|
+
sizeSmall: {}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
MuiButton: {
|
|
194
|
+
styleOverrides: {
|
|
195
|
+
root: {
|
|
196
|
+
boxShadow: "none !important",
|
|
197
|
+
padding: "8px 32px",
|
|
198
|
+
borderWidth: 1,
|
|
199
|
+
borderRadius: 3,
|
|
200
|
+
fontWeight: 400
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
variants: [
|
|
204
|
+
{
|
|
205
|
+
props: { variant: "primary" },
|
|
206
|
+
style: {
|
|
207
|
+
backgroundColor: e.primary300,
|
|
208
|
+
color: e.buttonText,
|
|
209
|
+
"&:hover": {
|
|
210
|
+
backgroundColor: e.primary500,
|
|
211
|
+
color: e.white
|
|
212
|
+
},
|
|
213
|
+
"&.Mui-disabled": {
|
|
214
|
+
backgroundColor: e.grey200
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
props: { variant: "confirm" },
|
|
220
|
+
style: {
|
|
221
|
+
backgroundColor: e.danger,
|
|
222
|
+
color: e.white,
|
|
223
|
+
"&:hover": {
|
|
224
|
+
backgroundColor: e.dangerDark
|
|
225
|
+
},
|
|
226
|
+
"&.Mui-disabled": {
|
|
227
|
+
backgroundColor: e.grey200
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
props: { variant: "cancel" },
|
|
233
|
+
style: {
|
|
234
|
+
backgroundColor: e.grey300,
|
|
235
|
+
color: e.textPrimary,
|
|
236
|
+
"&:hover": {
|
|
237
|
+
backgroundColor: e.grey400
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
props: { variant: "outlined" },
|
|
243
|
+
style: {
|
|
244
|
+
color: e.primary500,
|
|
245
|
+
border: "1px solid",
|
|
246
|
+
borderColor: e.primary400,
|
|
247
|
+
"&:hover": {
|
|
248
|
+
backgroundColor: "inherit"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
props: { variant: "outlinedPrimary" },
|
|
254
|
+
style: {
|
|
255
|
+
color: e.primary500,
|
|
256
|
+
border: "1px solid",
|
|
257
|
+
borderColor: e.primary400,
|
|
258
|
+
"&:hover": {
|
|
259
|
+
backgroundColor: "inherit"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
props: { variant: "outLinedDanger" },
|
|
265
|
+
style: {
|
|
266
|
+
color: e.danger,
|
|
267
|
+
border: "1px solid",
|
|
268
|
+
borderColor: e.danger,
|
|
269
|
+
"&:hover": {
|
|
270
|
+
backgroundColor: "inherit"
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
]
|
|
275
|
+
},
|
|
276
|
+
MuiAppBar: {
|
|
277
|
+
styleOverrides: {
|
|
278
|
+
root: {
|
|
279
|
+
backgroundColor: e.appBarBgColor,
|
|
280
|
+
color: e.appBarColor
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
MuiSelect: {
|
|
285
|
+
defaultProps: {
|
|
286
|
+
MenuProps: {
|
|
287
|
+
PaperProps: {
|
|
288
|
+
sx: {
|
|
289
|
+
boxShadow: "none",
|
|
290
|
+
border: 1,
|
|
291
|
+
borderStyle: "solid",
|
|
292
|
+
borderColor: e.grey300,
|
|
293
|
+
mt: "5px"
|
|
294
|
+
}
|
|
295
|
+
},
|
|
296
|
+
MenuListProps: {
|
|
297
|
+
sx: {
|
|
298
|
+
padding: "5px",
|
|
299
|
+
"& .MuiMenuItem-root": {
|
|
300
|
+
fontWeight: 400,
|
|
301
|
+
minHeight: 0,
|
|
302
|
+
borderRadius: "5px",
|
|
303
|
+
"&:hover": {
|
|
304
|
+
backgroundColor: e.grey100
|
|
305
|
+
},
|
|
306
|
+
"&.Mui-selected": {
|
|
307
|
+
// fontWeight: 500,
|
|
308
|
+
// color: color.darkPrimary,
|
|
309
|
+
backgroundColor: e.primary200
|
|
310
|
+
}
|
|
311
|
+
// [breakpoints.down('sm')]: {
|
|
312
|
+
// padding:0
|
|
313
|
+
// },
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
styleOverrides: {
|
|
320
|
+
select: {
|
|
321
|
+
padding: "9.94px 5px 9.94px 15px"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
MuiPaginationItem: {
|
|
326
|
+
defaultProps: {
|
|
327
|
+
components: {
|
|
328
|
+
previous: z,
|
|
329
|
+
next: j
|
|
330
|
+
}
|
|
331
|
+
},
|
|
332
|
+
styleOverrides: {
|
|
333
|
+
root: {
|
|
334
|
+
"& svg": {
|
|
335
|
+
width: "10px"
|
|
336
|
+
},
|
|
337
|
+
border: "none",
|
|
338
|
+
fontSize: "14px",
|
|
339
|
+
lineHeight: "1.5rem",
|
|
340
|
+
borderRadius: "7px",
|
|
341
|
+
"&.Mui-selected": {
|
|
342
|
+
backgroundColor: e.primary200
|
|
343
|
+
},
|
|
344
|
+
"&.MuiPaginationItem-previousNext": {
|
|
345
|
+
backgroundColor: e.grey200
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
MuiChip: {
|
|
351
|
+
styleOverrides: {
|
|
352
|
+
root: {
|
|
353
|
+
borderRadius: "5px",
|
|
354
|
+
fontSize: "10px",
|
|
355
|
+
lineHeight: "12px",
|
|
356
|
+
fontWeight: 400,
|
|
357
|
+
"& .MuiChip-label": {
|
|
358
|
+
lineHeight: "normal"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
avatar: {
|
|
362
|
+
width: "10px"
|
|
363
|
+
},
|
|
364
|
+
colorSuccess: {
|
|
365
|
+
color: e.success,
|
|
366
|
+
backgroundColor: e.successLight
|
|
367
|
+
},
|
|
368
|
+
colorWarning: {
|
|
369
|
+
color: e.warning,
|
|
370
|
+
backgroundColor: e.warningLight
|
|
371
|
+
},
|
|
372
|
+
colorError: {
|
|
373
|
+
color: e.danger,
|
|
374
|
+
backgroundColor: e.dangerLight
|
|
375
|
+
},
|
|
376
|
+
colorSecondary: {
|
|
377
|
+
color: e.linkPrimary,
|
|
378
|
+
backgroundColor: e.linkLight
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
MuiTab: {
|
|
383
|
+
styleOverrides: {
|
|
384
|
+
root: {
|
|
385
|
+
background: e.grey200,
|
|
386
|
+
borderTopLeftRadius: "8px",
|
|
387
|
+
borderTopRightRadius: "8px",
|
|
388
|
+
marginRight: "5px",
|
|
389
|
+
minWidth: "200px",
|
|
390
|
+
flexDirection: "row",
|
|
391
|
+
alignContent: "center",
|
|
392
|
+
gap: "8px",
|
|
393
|
+
textTransform: "capitalize",
|
|
394
|
+
"& svg": {
|
|
395
|
+
mb: "0 !important"
|
|
396
|
+
},
|
|
397
|
+
padding: 0,
|
|
398
|
+
height: "32px",
|
|
399
|
+
minHeight: "auto",
|
|
400
|
+
fontSize: "12px",
|
|
401
|
+
"& .chart-icon": {
|
|
402
|
+
fill: e.grey600
|
|
403
|
+
},
|
|
404
|
+
"& .detail-icon": {
|
|
405
|
+
stroke: e.grey600
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
},
|
|
410
|
+
MuiDrawer: {
|
|
411
|
+
defaultProps: {},
|
|
412
|
+
styleOverrides: {
|
|
413
|
+
root: {
|
|
414
|
+
"&.MuiDrawer-paper": {
|
|
415
|
+
overflowY: "unset"
|
|
416
|
+
},
|
|
417
|
+
"& .MuiDrawer-paper": {
|
|
418
|
+
zIndex: 9
|
|
419
|
+
},
|
|
420
|
+
"&.MuiPaper-root": {
|
|
421
|
+
border: "none",
|
|
422
|
+
background: e.grey100,
|
|
423
|
+
pt: 12,
|
|
424
|
+
zIndex: 9
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
MuiTextField: {
|
|
430
|
+
defaultProps: {
|
|
431
|
+
InputProps: {
|
|
432
|
+
sx: {
|
|
433
|
+
"& .Mui-disabled": {
|
|
434
|
+
background: e.grey200
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
},
|
|
438
|
+
InputLabelProps: {
|
|
439
|
+
shrink: !0
|
|
440
|
+
}
|
|
441
|
+
},
|
|
442
|
+
styleOverrides: {
|
|
443
|
+
root: {
|
|
444
|
+
backgroundColor: e.white,
|
|
445
|
+
"& .MuiOutlinedInput-input": {
|
|
446
|
+
padding: "0px 16px 0px 12px",
|
|
447
|
+
fontWeight: 400,
|
|
448
|
+
height: 40,
|
|
449
|
+
fontSize: "14px",
|
|
450
|
+
border: 1,
|
|
451
|
+
borderRadius: 4,
|
|
452
|
+
"&::placeholder": {
|
|
453
|
+
color: e.grey600
|
|
454
|
+
}
|
|
455
|
+
},
|
|
456
|
+
"& .MuiFormLabel-root": {
|
|
457
|
+
color: e.textPrimary
|
|
458
|
+
},
|
|
459
|
+
"& .MuiFormLabel-asterisk": {
|
|
460
|
+
color: e.danger
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
},
|
|
465
|
+
MuiFormGroup: {
|
|
466
|
+
styleOverrides: {
|
|
467
|
+
root: {
|
|
468
|
+
// position: 'relative',
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
},
|
|
472
|
+
MuiFormHelperText: {
|
|
473
|
+
defaultProps: {
|
|
474
|
+
sx: {
|
|
475
|
+
fontSize: 12
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
styleOverrides: {}
|
|
479
|
+
},
|
|
480
|
+
MuiAutocomplete: {
|
|
481
|
+
defaultProps: {
|
|
482
|
+
sx: {
|
|
483
|
+
"& .MuiPaper-root": {
|
|
484
|
+
padding: "5px"
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
},
|
|
488
|
+
styleOverrides: {
|
|
489
|
+
root: {
|
|
490
|
+
"& .MuiSvgIcon-root": {
|
|
491
|
+
width: "20px",
|
|
492
|
+
height: "20px"
|
|
493
|
+
},
|
|
494
|
+
"& .MuiAutocomplete-tag": {
|
|
495
|
+
margin: 0
|
|
496
|
+
},
|
|
497
|
+
"& .MuiButtonBase-root": {
|
|
498
|
+
marginRight: "2px !important",
|
|
499
|
+
height: "max-content",
|
|
500
|
+
padding: "2px"
|
|
501
|
+
},
|
|
502
|
+
"& .MuiOutlinedInput-root": {
|
|
503
|
+
padding: "7.45px 55px 7.45px 10px !important"
|
|
504
|
+
},
|
|
505
|
+
"& svg": {},
|
|
506
|
+
"& #checkboxes-tags-demo": {
|
|
507
|
+
padding: "6px 4px"
|
|
508
|
+
},
|
|
509
|
+
"& .MuiAutocomplete-endAdornment": {
|
|
510
|
+
top: "calc(50% - 12px)"
|
|
511
|
+
}
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
},
|
|
515
|
+
MuiTableHead: {
|
|
516
|
+
styleOverrides: {
|
|
517
|
+
root: {
|
|
518
|
+
"& th": {
|
|
519
|
+
fontSize: "14px",
|
|
520
|
+
padding: "8px 16px"
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
},
|
|
525
|
+
MuiTableBody: {
|
|
526
|
+
styleOverrides: {
|
|
527
|
+
root: {
|
|
528
|
+
"& th,td": {
|
|
529
|
+
fontSize: "14px",
|
|
530
|
+
padding: "8px 16px",
|
|
531
|
+
height: "45px"
|
|
532
|
+
},
|
|
533
|
+
"& .MuiTableCell-root": {
|
|
534
|
+
borderBottom: `1px solid ${e.grey300}`
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
}
|
|
538
|
+
},
|
|
539
|
+
MuiRadio: {
|
|
540
|
+
defaultProps: {
|
|
541
|
+
sx: {
|
|
542
|
+
"&.MuiButtonBase-root": {
|
|
543
|
+
padding: "5px"
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
styleOverrides: {
|
|
548
|
+
root: {
|
|
549
|
+
"& .MuiSvgIcon-root": {
|
|
550
|
+
fontSize: 16
|
|
551
|
+
},
|
|
552
|
+
color: e.grey600,
|
|
553
|
+
"&.Mui-checked": {
|
|
554
|
+
color: e.success
|
|
555
|
+
},
|
|
556
|
+
"&.Mui-disabled": {
|
|
557
|
+
color: e.grey600
|
|
558
|
+
}
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
},
|
|
562
|
+
MuiTooltip: {
|
|
563
|
+
defaultProps: {
|
|
564
|
+
placement: "top",
|
|
565
|
+
arrow: !0
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
}), R = (e) => {
|
|
570
|
+
const r = T({});
|
|
571
|
+
return /* @__PURE__ */ y(v, { theme: r, children: e.children });
|
|
572
|
+
};
|
|
573
|
+
export {
|
|
574
|
+
R as SaasThemeProvider,
|
|
575
|
+
b as color,
|
|
576
|
+
T as createCustomTheme
|
|
577
|
+
};
|