@campxdev/react-blueprint 1.7.7 → 1.7.8
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/package.json +1 -1
- package/src/assets/images/svg/index.ts +1 -1
- package/src/components/Assets/ErrorPages/InternalServerError.tsx +2 -2
- package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +2 -2
- package/src/components/Assets/ErrorPages/NoItemFound.tsx +2 -2
- package/src/components/Assets/ErrorPages/PageNotFound.tsx +2 -2
- package/src/components/Assets/ErrorPages/UnAuthorized.tsx +2 -2
- package/src/components/Assets/Icons/IconComponents/HamburgerMenuIcon.tsx +20 -0
- package/src/components/Assets/Icons/IconComponents/ObeIcon.tsx +3 -3
- package/src/components/Assets/Icons/IconComponents/ReportIssueIcon.tsx +53 -0
- package/src/components/Assets/Icons/Icons.tsx +4 -0
- package/src/components/DataDisplay/DataTable/DataTable.tsx +1 -3
- package/src/components/DataDisplay/EmptyIllustration/EmptyIllustration.tsx +2 -2
- package/src/components/DataDisplay/StatusCard/StatusCard.tsx +67 -0
- package/src/components/DataDisplay/export.ts +1 -0
- package/src/components/Feedback/Snackbar/Snackbar.tsx +37 -26
- package/src/components/Input/SingleSelect/components/SingleInput.tsx +13 -10
- package/src/components/Layout/AppHeader/AppHeader.tsx +39 -22
- package/src/components/Layout/AppHeader/styles/styles.tsx +13 -1
- package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +4 -0
- package/src/components/Navigation/PreviewFiles/PreviewFiles.tsx +115 -21
- package/src/components/Navigation/Sidebar/MenuBar.tsx +176 -0
- package/src/components/Navigation/Sidebar/Sidebar.tsx +94 -190
- package/src/components/Navigation/Sidebar/styles.tsx +24 -9
- package/src/components/Navigation/TabsContainer/TabsContainer.tsx +4 -0
- package/src/components/Navigation/UploadDialog/Styles.tsx +1 -1
- package/src/components/Navigation/UploadDialog/UploadDialog.tsx +17 -27
- package/src/components/Navigation/UploadDialog/UploadDialogContainer.tsx +9 -7
- package/src/stories/DataDisplay/StatusCard.stories.tsx +62 -0
- package/src/stories/Input/SingleSelect.stories.tsx +6 -1
- package/src/stories/Navigation/PreviewFiles.stories.tsx +33 -64
- package/src/stories/Navigation/TabsContainer.stories.tsx +11 -1
- package/src/themes/commonTheme.ts +7 -4
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Svgs } from '../../../assets/export';
|
|
2
2
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
3
3
|
import { Button } from '../../export';
|
|
4
4
|
import { CenterBox } from './styles';
|
|
@@ -8,7 +8,7 @@ export const InternalServerError = ({ resetBoundary }: any) => {
|
|
|
8
8
|
<>
|
|
9
9
|
<CenterBox>
|
|
10
10
|
<img
|
|
11
|
-
src={serverErrorImage}
|
|
11
|
+
src={Svgs.serverErrorImage}
|
|
12
12
|
alt="page not found"
|
|
13
13
|
width={'350px'}
|
|
14
14
|
style={{ margin: '20px' }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Svgs } from '../../../assets/images/svg';
|
|
2
2
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
3
3
|
import { Button } from '../../export';
|
|
4
4
|
import { CenterBox } from './styles';
|
|
@@ -8,7 +8,7 @@ export const NoInterneConnection = ({ resetBoundary }: any) => {
|
|
|
8
8
|
<>
|
|
9
9
|
<CenterBox>
|
|
10
10
|
<img
|
|
11
|
-
src={noConnectionImage}
|
|
11
|
+
src={Svgs.noConnectionImage}
|
|
12
12
|
alt="page not found"
|
|
13
13
|
width={'350px'}
|
|
14
14
|
style={{ margin: '20px' }}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { Svgs } from '../../../assets/images/svg';
|
|
4
4
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
5
5
|
import { CenterBox } from './styles';
|
|
6
6
|
|
|
@@ -16,7 +16,7 @@ export const NoItemFound = ({
|
|
|
16
16
|
return (
|
|
17
17
|
<CenterBox>
|
|
18
18
|
<img
|
|
19
|
-
src={emptyImage}
|
|
19
|
+
src={Svgs.emptyImage}
|
|
20
20
|
alt="page not found"
|
|
21
21
|
width="350px"
|
|
22
22
|
style={{ margin: '20px' }}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Svgs } from '../../../assets/images/svg';
|
|
2
2
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
3
3
|
import { CenterBox } from './styles';
|
|
4
4
|
|
|
@@ -7,7 +7,7 @@ export const PageNotFound = () => {
|
|
|
7
7
|
<>
|
|
8
8
|
<CenterBox>
|
|
9
9
|
<img
|
|
10
|
-
src={emptyImage}
|
|
10
|
+
src={Svgs.emptyImage}
|
|
11
11
|
alt="page not found"
|
|
12
12
|
width={'350px'}
|
|
13
13
|
style={{ margin: '20px' }}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Svgs } from '../../../assets/images/svg';
|
|
3
3
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
4
4
|
import { CenterBox } from './styles';
|
|
5
5
|
|
|
@@ -8,7 +8,7 @@ export const UnAuthorized = ({ component }: { component?: ReactNode }) => {
|
|
|
8
8
|
<>
|
|
9
9
|
<CenterBox>
|
|
10
10
|
<img
|
|
11
|
-
src={unauthorizedImage}
|
|
11
|
+
src={Svgs.unauthorizedImage}
|
|
12
12
|
alt="page not found"
|
|
13
13
|
width={'350px'}
|
|
14
14
|
style={{ margin: '20px' }}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { useTheme } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export const HamburgerMenuIcon = ({ size = 16 }) => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const color = theme.palette.text.primary;
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<svg
|
|
9
|
+
width={size}
|
|
10
|
+
height={size}
|
|
11
|
+
viewBox="0 0 16 16"
|
|
12
|
+
fill="none"
|
|
13
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
14
|
+
>
|
|
15
|
+
<rect y="0.800049" width="16" height="1.6" rx="0.8" fill={color} />
|
|
16
|
+
<rect y="7.19995" width="16" height="1.6" rx="0.8" fill={color} />
|
|
17
|
+
<rect y="13.6" width="16" height="1.6" rx="0.8" fill={color} />
|
|
18
|
+
</svg>
|
|
19
|
+
);
|
|
20
|
+
};
|
|
@@ -11,19 +11,19 @@ export const ObeIcon = ({ size = 16 }) => {
|
|
|
11
11
|
d="M17.4082 9.35687C17.2428 9.35577 17.0845 9.28958 16.9675 9.1726C16.8505 9.05563 16.7843 8.89729 16.7832 8.73187V6.3402L9.99989 2.9477L3.21655 6.3402V8.73187C3.21546 8.89729 3.14926 9.05563 3.03229 9.1726C2.91531 9.28958 2.75698 9.35577 2.59155 9.35687C2.42613 9.35577 2.26779 9.28958 2.15082 9.1726C2.03384 9.05563 1.96764 8.89729 1.96655 8.73187V5.95687C1.96719 5.84046 2.00029 5.72654 2.06212 5.6279C2.12395 5.52927 2.21206 5.44984 2.31655 5.39853L9.72489 1.6977C9.811 1.65251 9.9068 1.62891 10.0041 1.62891C10.1013 1.62891 10.1971 1.65251 10.2832 1.6977L17.6916 5.3977C17.7949 5.45042 17.8821 5.53019 17.9437 5.62851C18.0053 5.72682 18.0392 5.84002 18.0416 5.95603V8.73103C18.0373 8.89696 17.9689 9.05478 17.8509 9.17144C17.7328 9.28811 17.5742 9.35455 17.4082 9.35687Z"
|
|
12
12
|
fill="#121212"
|
|
13
13
|
stroke="#121212"
|
|
14
|
-
|
|
14
|
+
strokeWidth="0.4"
|
|
15
15
|
/>
|
|
16
16
|
<path
|
|
17
17
|
d="M9.99989 19.5414C9.90426 19.5411 9.81005 19.5182 9.72489 19.4747L2.31655 15.7747C2.21318 15.722 2.12604 15.6423 2.06441 15.5439C2.00277 15.4456 1.96896 15.3324 1.96655 15.2164V12.4414C1.96764 12.276 2.03384 12.1176 2.15082 12.0007C2.26779 11.8837 2.42613 11.8175 2.59155 11.8164C2.75698 11.8175 2.91531 11.8837 3.03229 12.0007C3.14926 12.1176 3.21546 12.276 3.21655 12.4414V14.8331L9.99989 18.2247L16.7832 14.8331V12.4414C16.7832 12.2756 16.8491 12.1167 16.9663 11.9995C17.0835 11.8823 17.2425 11.8164 17.4082 11.8164C17.574 11.8164 17.7329 11.8823 17.8502 11.9995C17.9674 12.1167 18.0332 12.2756 18.0332 12.4414V15.2164C18.0326 15.3328 17.9995 15.4467 17.9377 15.5454C17.8758 15.644 17.7877 15.7234 17.6832 15.7747L10.2749 19.4747C10.1897 19.5182 10.0955 19.5411 9.99989 19.5414Z"
|
|
18
18
|
fill="#121212"
|
|
19
19
|
stroke="#121212"
|
|
20
|
-
|
|
20
|
+
strokeWidth="0.4"
|
|
21
21
|
/>
|
|
22
22
|
<path
|
|
23
23
|
d="M10.0001 14.9078C9.14465 14.9078 8.30845 14.6542 7.59721 14.1789C6.88597 13.7037 6.33162 13.0282 6.00427 12.2379C5.67692 11.4476 5.59127 10.578 5.75815 9.73905C5.92504 8.90008 6.33695 8.12944 6.94181 7.52458C7.54668 6.91972 8.31732 6.5078 9.15629 6.34092C9.99525 6.17404 10.8649 6.25969 11.6552 6.58704C12.4454 6.91438 13.1209 7.46873 13.5962 8.17997C14.0714 8.89122 14.3251 9.72741 14.3251 10.5828C14.3228 11.7292 13.8665 12.828 13.0559 13.6386C12.2452 14.4492 11.1464 14.9056 10.0001 14.9078ZM10.0001 7.50781C9.39187 7.50781 8.79735 7.68816 8.29167 8.02605C7.78599 8.36393 7.39186 8.84418 7.15912 9.40606C6.92638 9.96795 6.86549 10.5862 6.98414 11.1827C7.10279 11.7792 7.39565 12.3271 7.8257 12.7572C8.25574 13.1872 8.80366 13.4801 9.40015 13.5987C9.99664 13.7174 10.6149 13.6565 11.1768 13.4237C11.7387 13.191 12.2189 12.7969 12.5568 12.2912C12.8947 11.7855 13.0751 11.191 13.0751 10.5828C13.0742 9.76754 12.7499 8.98592 12.1734 8.40944C11.5969 7.83295 10.8153 7.5087 10.0001 7.50781Z"
|
|
24
24
|
fill="#121212"
|
|
25
25
|
stroke="#121212"
|
|
26
|
-
|
|
26
|
+
strokeWidth="0.4"
|
|
27
27
|
/>
|
|
28
28
|
</svg>
|
|
29
29
|
);
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { useTheme } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export const ReportIssueIcon = ({ size = 16 }) => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const color = theme.palette.text.primary;
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
width={size}
|
|
9
|
+
height={size}
|
|
10
|
+
viewBox="0 0 16 16"
|
|
11
|
+
fill="none"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
>
|
|
14
|
+
<g clip-path="url(#clip0_436_6962)">
|
|
15
|
+
<path
|
|
16
|
+
d="M14.6667 15.1666H1.33334C1.201 15.1658 1.07433 15.1128 0.980748 15.0192C0.887168 14.9256 0.834209 14.799 0.833336 14.6666C0.834209 14.5343 0.887168 14.4076 0.980748 14.314C1.07433 14.2205 1.201 14.1675 1.33334 14.1666H14.6667C14.799 14.1675 14.9257 14.2205 15.0193 14.314C15.1128 14.4076 15.1658 14.5343 15.1667 14.6666C15.1658 14.799 15.1128 14.9256 15.0193 15.0192C14.9257 15.1128 14.799 15.1658 14.6667 15.1666Z"
|
|
17
|
+
fill={color}
|
|
18
|
+
stroke={color}
|
|
19
|
+
strokeWidth="0.4"
|
|
20
|
+
/>
|
|
21
|
+
<path
|
|
22
|
+
d="M14 15.1667H2C1.86766 15.1658 1.74099 15.1128 1.64741 15.0193C1.55383 14.9257 1.50087 14.799 1.5 14.6667V10C1.5 8.27609 2.18482 6.62279 3.40381 5.40381C4.62279 4.18482 6.27609 3.5 8 3.5C9.72391 3.5 11.3772 4.18482 12.5962 5.40381C13.8152 6.62279 14.5 8.27609 14.5 10V14.6667C14.4991 14.799 14.4462 14.9257 14.3526 15.0193C14.259 15.1128 14.1323 15.1658 14 15.1667ZM2.5 14.1667H13.5V10C13.5 8.54131 12.9205 7.14236 11.8891 6.11091C10.8576 5.07946 9.45869 4.5 8 4.5C6.54131 4.5 5.14236 5.07946 4.11091 6.11091C3.07946 7.14236 2.5 8.54131 2.5 10V14.1667Z"
|
|
23
|
+
fill={color}
|
|
24
|
+
stroke={color}
|
|
25
|
+
strokeWidth="0.4"
|
|
26
|
+
/>
|
|
27
|
+
<path
|
|
28
|
+
d="M8 2.50004C7.86766 2.49917 7.74099 2.44621 7.64741 2.35263C7.55383 2.25905 7.50087 2.13238 7.5 2.00004V1.33337C7.50087 1.20104 7.55383 1.07437 7.64741 0.980786C7.74099 0.887206 7.86766 0.834248 8 0.833374C8.13234 0.834248 8.25901 0.887206 8.35259 0.980786C8.44617 1.07437 8.49913 1.20104 8.5 1.33337V2.00004C8.49913 2.13238 8.44617 2.25905 8.35259 2.35263C8.25901 2.44621 8.13234 2.49917 8 2.50004Z"
|
|
29
|
+
fill={color}
|
|
30
|
+
stroke={color}
|
|
31
|
+
strokeWidth="0.4"
|
|
32
|
+
/>
|
|
33
|
+
<path
|
|
34
|
+
d="M3.33267 3.83534C3.26698 3.83558 3.20191 3.82273 3.14125 3.79755C3.08058 3.77237 3.02554 3.73535 2.97933 3.68867L2.31267 3.02201C2.21878 2.9283 2.16597 2.80113 2.16584 2.66848C2.16572 2.53583 2.21829 2.40856 2.312 2.31467C2.40571 2.22079 2.53288 2.16797 2.66553 2.16785C2.79818 2.16772 2.92545 2.2203 3.01933 2.31401L3.686 2.98067C3.77899 3.07477 3.83113 3.20172 3.83113 3.33401C3.83113 3.46629 3.77899 3.59325 3.686 3.68734C3.6399 3.73426 3.58491 3.77152 3.52424 3.79693C3.46357 3.82234 3.39844 3.8354 3.33267 3.83534Z"
|
|
35
|
+
fill={color}
|
|
36
|
+
stroke={color}
|
|
37
|
+
strokeWidth="0.4"
|
|
38
|
+
/>
|
|
39
|
+
<path
|
|
40
|
+
d="M12.666 3.83535C12.6003 3.83558 12.5352 3.82273 12.4746 3.79755C12.4139 3.77237 12.3589 3.73536 12.3127 3.68868C12.2197 3.59459 12.1675 3.46763 12.1675 3.33535C12.1675 3.20306 12.2197 3.07611 12.3127 2.98201L12.9793 2.31535C13.0741 2.22703 13.1995 2.17894 13.329 2.18123C13.4585 2.18352 13.5821 2.23599 13.6737 2.3276C13.7654 2.41921 13.8178 2.5428 13.8201 2.67233C13.8224 2.80187 13.7743 2.92723 13.686 3.02201L13.0193 3.68868C12.9731 3.73536 12.9181 3.77237 12.8574 3.79755C12.7967 3.82273 12.7317 3.83558 12.666 3.83535Z"
|
|
41
|
+
fill={color}
|
|
42
|
+
stroke={color}
|
|
43
|
+
strokeWidth="0.4"
|
|
44
|
+
/>
|
|
45
|
+
</g>
|
|
46
|
+
<defs>
|
|
47
|
+
<clipPath id="clip0_436_6962">
|
|
48
|
+
<rect width="16" height="16" fill="white" />
|
|
49
|
+
</clipPath>
|
|
50
|
+
</defs>
|
|
51
|
+
</svg>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
@@ -57,6 +57,7 @@ import { ExportIcon } from './IconComponents/ExportIcon';
|
|
|
57
57
|
import { ExportMenuIcon } from './IconComponents/ExportMenuIcon';
|
|
58
58
|
import { FeePaymentIcon } from './IconComponents/FeePaymentIcon';
|
|
59
59
|
import { FilterIcon } from './IconComponents/FilterIcon';
|
|
60
|
+
import { HamburgerMenuIcon } from './IconComponents/HamburgerMenuIcon';
|
|
60
61
|
import { HandoutsIcon } from './IconComponents/HandoutsIcon';
|
|
61
62
|
import { HelpIcon } from './IconComponents/HelpIcon';
|
|
62
63
|
import { HomeIcon } from './IconComponents/HomeIcon';
|
|
@@ -93,6 +94,7 @@ import { RedirectIcon } from './IconComponents/RedirectIcon';
|
|
|
93
94
|
import { RedoIcon } from './IconComponents/RedoIcon';
|
|
94
95
|
import { RegistrationIcon } from './IconComponents/RegistrationsIcon';
|
|
95
96
|
import { RejectIcon } from './IconComponents/RejectIcon';
|
|
97
|
+
import { ReportIssueIcon } from './IconComponents/ReportIssueIcon';
|
|
96
98
|
import { ReportIcon } from './IconComponents/ReportsIcon';
|
|
97
99
|
import { ResourcesIcon } from './IconComponents/ResourcesIcon';
|
|
98
100
|
import { RightIcon } from './IconComponents/RightIcon';
|
|
@@ -131,6 +133,7 @@ export const Icons = {
|
|
|
131
133
|
RedoIcon,
|
|
132
134
|
WhatsappIcon,
|
|
133
135
|
AssignmentIcon,
|
|
136
|
+
ReportIssueIcon,
|
|
134
137
|
SmsIcon,
|
|
135
138
|
EmailIcon,
|
|
136
139
|
TextLocalIcon,
|
|
@@ -243,6 +246,7 @@ export const Icons = {
|
|
|
243
246
|
OnlineTransactionIcon,
|
|
244
247
|
OpenPaymentsIcon,
|
|
245
248
|
TransactionCardIcon,
|
|
249
|
+
HamburgerMenuIcon,
|
|
246
250
|
ObeIcon,
|
|
247
251
|
SettlementsIcon,
|
|
248
252
|
DownArrow,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Stack, styled
|
|
1
|
+
import { Stack, styled } from '@mui/material';
|
|
2
2
|
import {
|
|
3
3
|
DataGrid as MuiDataGrid,
|
|
4
4
|
DataGridProps as MuiDataGridProps,
|
|
@@ -38,8 +38,6 @@ export const DataTable = (props: DataTableProps) => {
|
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
-
const theme = useTheme();
|
|
42
|
-
|
|
43
41
|
return (
|
|
44
42
|
<MuiDataGrid
|
|
45
43
|
disableColumnFilter
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Box, styled, SxProps, TypographyOwnProps } from '@mui/material';
|
|
2
|
-
import {
|
|
2
|
+
import { Svgs } from '../../../assets/images/svg';
|
|
3
3
|
|
|
4
4
|
import { Typography } from '../export';
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ export const EmptyIllustration = ({
|
|
|
26
26
|
<>
|
|
27
27
|
<CenterBox sx={containerProps}>
|
|
28
28
|
<img
|
|
29
|
-
src={emptyImage}
|
|
29
|
+
src={Svgs.emptyImage}
|
|
30
30
|
alt="no-items"
|
|
31
31
|
width={imageSize}
|
|
32
32
|
style={{ margin: '20px' }}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Box, styled, Theme, useTheme } from '@mui/material';
|
|
2
|
+
import { Typography } from '../../export';
|
|
3
|
+
|
|
4
|
+
export type StatusCardProps = {
|
|
5
|
+
color: 'green' | 'red' | 'orange' | 'yellow' | 'blue' | 'pink';
|
|
6
|
+
text: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export const StatusCard = ({ color, text }: StatusCardProps) => {
|
|
10
|
+
const theme = useTheme();
|
|
11
|
+
const { textColor, backgroundColor } = getStatusColor(color, theme);
|
|
12
|
+
return (
|
|
13
|
+
<StatusContainer backgroundColor={backgroundColor}>
|
|
14
|
+
<Typography variant="label2" color={textColor}>
|
|
15
|
+
{text}
|
|
16
|
+
</Typography>
|
|
17
|
+
</StatusContainer>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
const StatusContainer = styled(Box)(
|
|
22
|
+
({ backgroundColor }: { backgroundColor: string }) => ({
|
|
23
|
+
borderRadius: '5px',
|
|
24
|
+
padding: '4px 12px',
|
|
25
|
+
backgroundColor,
|
|
26
|
+
}),
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const getStatusColor = (color: string, theme: Theme) => {
|
|
30
|
+
switch (color) {
|
|
31
|
+
case 'green':
|
|
32
|
+
return {
|
|
33
|
+
textColor: theme.palette.highlight.highlightGreen,
|
|
34
|
+
backgroundColor: theme.palette.highlight.greenBackground,
|
|
35
|
+
};
|
|
36
|
+
case 'red':
|
|
37
|
+
return {
|
|
38
|
+
textColor: theme.palette.highlight.highlightRed,
|
|
39
|
+
backgroundColor: theme.palette.highlight.redBackground,
|
|
40
|
+
};
|
|
41
|
+
case 'orange':
|
|
42
|
+
return {
|
|
43
|
+
textColor: theme.palette.highlight.highlightOrange,
|
|
44
|
+
backgroundColor: theme.palette.highlight.orangeBackground,
|
|
45
|
+
};
|
|
46
|
+
case 'yellow':
|
|
47
|
+
return {
|
|
48
|
+
textColor: theme.palette.highlight.highlightYellow,
|
|
49
|
+
backgroundColor: theme.palette.highlight.yellowBackground,
|
|
50
|
+
};
|
|
51
|
+
case 'blue':
|
|
52
|
+
return {
|
|
53
|
+
textColor: theme.palette.highlight.highlightBlue,
|
|
54
|
+
backgroundColor: theme.palette.highlight.blueBackground,
|
|
55
|
+
};
|
|
56
|
+
case 'pink':
|
|
57
|
+
return {
|
|
58
|
+
textColor: theme.palette.highlight.highlightPink,
|
|
59
|
+
backgroundColor: theme.palette.highlight.pinkBackground,
|
|
60
|
+
};
|
|
61
|
+
default:
|
|
62
|
+
return {
|
|
63
|
+
textColor: theme.palette.highlight.highlightRed,
|
|
64
|
+
backgroundColor: theme.palette.highlight.redBackground,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
};
|
|
@@ -7,5 +7,6 @@ export * from './DataTable/DataTable';
|
|
|
7
7
|
export * from './EditableDataTable/EditableDataTable';
|
|
8
8
|
export * from './EmptyIllustration/EmptyIllustration';
|
|
9
9
|
export * from './SidePanel/SidePanel';
|
|
10
|
+
export * from './StatusCard/StatusCard';
|
|
10
11
|
export * from './Timeline/Timeline';
|
|
11
12
|
export * from './Typography/Typography';
|
|
@@ -69,42 +69,53 @@ export const Snackbar = ({ ...props }: SnackbarProps) => {
|
|
|
69
69
|
|
|
70
70
|
return (
|
|
71
71
|
<MuiSnackbar open={props.open} onClose={props.onClose} {...props}>
|
|
72
|
-
<
|
|
73
|
-
direction="row"
|
|
74
|
-
borderRadius="5px"
|
|
75
|
-
justifyContent="space-between"
|
|
76
|
-
alignItems="flex-start"
|
|
77
|
-
gap={1}
|
|
72
|
+
<Box
|
|
78
73
|
sx={{
|
|
79
74
|
height: '90px',
|
|
80
75
|
width: '480px',
|
|
81
|
-
backgroundColor:
|
|
76
|
+
backgroundColor: theme.palette.surface.paperBackground,
|
|
77
|
+
borderRadius: '5px',
|
|
82
78
|
}}
|
|
83
79
|
>
|
|
84
|
-
<
|
|
80
|
+
<Stack
|
|
81
|
+
height="100%"
|
|
82
|
+
direction="row"
|
|
83
|
+
borderRadius="5px"
|
|
84
|
+
gap="8px"
|
|
85
85
|
sx={{
|
|
86
|
-
|
|
87
|
-
height: '100%',
|
|
88
|
-
backgroundColor: getColor(props.severity),
|
|
89
|
-
borderRadius: '5px 0px 0px 5px',
|
|
86
|
+
backgroundColor: getBackGroundColor(props.severity),
|
|
90
87
|
}}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
88
|
+
>
|
|
89
|
+
<Box
|
|
90
|
+
sx={{
|
|
91
|
+
width: '10px',
|
|
92
|
+
height: '100%',
|
|
93
|
+
backgroundColor: getColor(props.severity),
|
|
94
|
+
borderRadius: '5px 0px 0px 5px',
|
|
95
|
+
}}
|
|
96
|
+
/>
|
|
97
|
+
<Stack
|
|
98
|
+
width="100%"
|
|
99
|
+
height="100%"
|
|
100
|
+
direction={'row'}
|
|
101
|
+
alignItems="center"
|
|
102
|
+
>
|
|
103
|
+
<Stack direction="row" gap={1} justifyContent="space-evenly">
|
|
104
|
+
<Box sx={{ marginTop: '2px' }}>{getIcon(props.severity)}</Box>
|
|
105
|
+
<Stack direction={'column'}>
|
|
106
|
+
<Typography variant="subtitle2">
|
|
107
|
+
{capitalize(props.severity)}
|
|
108
|
+
</Typography>
|
|
109
|
+
<Typography variant="body2">{props.message}</Typography>
|
|
110
|
+
</Stack>
|
|
100
111
|
</Stack>
|
|
101
112
|
</Stack>
|
|
102
|
-
</Stack>
|
|
103
113
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
114
|
+
<IconButton sx={{ margin: '25px' }} onClick={handleClose}>
|
|
115
|
+
<Icons.CrossIcon2 />
|
|
116
|
+
</IconButton>
|
|
117
|
+
</Stack>
|
|
118
|
+
</Box>
|
|
108
119
|
</MuiSnackbar>
|
|
109
120
|
);
|
|
110
121
|
};
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
InputAdornment,
|
|
5
5
|
Autocomplete as MuiAutocomplete,
|
|
6
6
|
Paper,
|
|
7
|
+
Stack,
|
|
7
8
|
} from '@mui/material';
|
|
8
9
|
import { debounce, startCase } from 'lodash';
|
|
9
10
|
import { SyntheticEvent, useMemo } from 'react';
|
|
@@ -124,16 +125,18 @@ export const SingleInput = ({
|
|
|
124
125
|
renderOption={(props, option: any) => {
|
|
125
126
|
return (
|
|
126
127
|
<Box component="li" {...props} margin="4px 0px" key={option.value}>
|
|
127
|
-
<
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
128
|
+
<Stack>
|
|
129
|
+
<Typography variant="subtitle3">
|
|
130
|
+
{dbLabelProps.useLabelStartCase
|
|
131
|
+
? startCase(option.label)
|
|
132
|
+
: option.label}
|
|
133
|
+
</Typography>
|
|
134
|
+
<Typography variant="caption">
|
|
135
|
+
{dbLabelProps.useSubLabelStartCase
|
|
136
|
+
? startCase(option?.subLabel)
|
|
137
|
+
: option?.subLabel}
|
|
138
|
+
</Typography>
|
|
139
|
+
</Stack>
|
|
137
140
|
</Box>
|
|
138
141
|
);
|
|
139
142
|
}}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
import { Stack } from '@mui/material';
|
|
1
|
+
import { IconButton, Stack, useMediaQuery, useTheme } from '@mui/material';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { ReportIssueIcon } from '../../Assets/Icons/IconComponents/ReportIssueIcon';
|
|
3
4
|
import { Typography } from '../../DataDisplay/Typography/Typography';
|
|
4
5
|
import { Button } from '../../export';
|
|
5
6
|
import UserBox from './AppHeaderActions/UserBox';
|
|
6
|
-
import { StyledHeader } from './styles/styles';
|
|
7
|
+
import { StyledDivider, StyledHeader } from './styles/styles';
|
|
7
8
|
|
|
8
9
|
export interface AppHeaderProps {
|
|
9
10
|
actions?: ReactNode[];
|
|
10
11
|
appsMenu?: ReactNode;
|
|
11
12
|
clientLogoUrl?: string;
|
|
12
|
-
clientName
|
|
13
|
+
clientName?: string;
|
|
13
14
|
userFullName: string;
|
|
14
15
|
designation?: string;
|
|
15
16
|
collapsed: boolean;
|
|
@@ -31,9 +32,17 @@ export const AppHeader = ({
|
|
|
31
32
|
institutionsData,
|
|
32
33
|
showActiveDevices = true,
|
|
33
34
|
}: AppHeaderProps) => {
|
|
35
|
+
const theme = useTheme();
|
|
36
|
+
const isSmallScreen = useMediaQuery(theme.breakpoints.down('md'));
|
|
37
|
+
|
|
38
|
+
const handleReportIssue = () => {
|
|
39
|
+
window.open('https://helpdesk.campx.in/helpdesk/my-tickets', '_blank');
|
|
40
|
+
};
|
|
34
41
|
return (
|
|
35
42
|
<StyledHeader collapsed={collapsed} className="appHeader">
|
|
36
|
-
<Typography variant={'subtitle2'}>
|
|
43
|
+
<Typography variant={isSmallScreen ? 'subtitle3' : 'subtitle2'}>
|
|
44
|
+
{clientName}
|
|
45
|
+
</Typography>
|
|
37
46
|
<Stack alignItems={'center'} gap={'12px'} flexDirection={'row'}>
|
|
38
47
|
{/* <StyledIconButton>
|
|
39
48
|
<a
|
|
@@ -45,25 +54,33 @@ export const AppHeader = ({
|
|
|
45
54
|
<HelpIcon size={20} />
|
|
46
55
|
</a>
|
|
47
56
|
</StyledIconButton> */}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
57
|
+
{isSmallScreen ? (
|
|
58
|
+
<>
|
|
59
|
+
<IconButton
|
|
60
|
+
sx={{ padding: '0px' }}
|
|
61
|
+
className="reportAnIssue"
|
|
62
|
+
onClick={handleReportIssue}
|
|
63
|
+
>
|
|
64
|
+
<ReportIssueIcon />
|
|
65
|
+
</IconButton>
|
|
66
|
+
<StyledDivider flexItem />
|
|
67
|
+
</>
|
|
68
|
+
) : (
|
|
69
|
+
<Button
|
|
70
|
+
variant="outlined"
|
|
71
|
+
className="reportAnIssue"
|
|
72
|
+
onClick={handleReportIssue}
|
|
63
73
|
>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
<Typography
|
|
75
|
+
variant="button"
|
|
76
|
+
sx={{
|
|
77
|
+
fontWeight: 'bold',
|
|
78
|
+
}}
|
|
79
|
+
>
|
|
80
|
+
Report an Issue
|
|
81
|
+
</Typography>
|
|
82
|
+
</Button>
|
|
83
|
+
)}
|
|
67
84
|
<UserBox
|
|
68
85
|
fullName={userFullName}
|
|
69
86
|
actions={actions}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Box, styled } from '@mui/material';
|
|
1
|
+
import { Box, Divider, styled } from '@mui/material';
|
|
2
2
|
import { Link } from 'react-router-dom';
|
|
3
3
|
|
|
4
4
|
export const StyledHeader = styled('header')(
|
|
@@ -13,9 +13,21 @@ export const StyledHeader = styled('header')(
|
|
|
13
13
|
justifyContent: 'space-between',
|
|
14
14
|
padding: '0 32px',
|
|
15
15
|
borderRadius: '8px',
|
|
16
|
+
|
|
17
|
+
[theme.breakpoints.down('md')]: {
|
|
18
|
+
height: '50px',
|
|
19
|
+
minHeight: '50px',
|
|
20
|
+
padding: '0 12px',
|
|
21
|
+
},
|
|
16
22
|
}),
|
|
17
23
|
);
|
|
18
24
|
|
|
25
|
+
export const StyledDivider = styled(Divider)(({ theme }) => ({
|
|
26
|
+
orientation: 'vertical',
|
|
27
|
+
margin: '8px 0px',
|
|
28
|
+
border: `0.5px solid ${theme.palette.border.primary}`,
|
|
29
|
+
}));
|
|
30
|
+
|
|
19
31
|
export const StyledActionBox = styled(Box)(({ theme }) => ({
|
|
20
32
|
marginRight: '20px',
|
|
21
33
|
display: 'flex',
|
|
@@ -58,6 +58,10 @@ const BreadcrumbContainer = styled(Stack)(({ theme }) => ({
|
|
|
58
58
|
height: '52px',
|
|
59
59
|
paddingLeft: '12px',
|
|
60
60
|
backgroundColor: theme.palette.surface.defaultBackground,
|
|
61
|
+
|
|
62
|
+
[theme.breakpoints.down('md')]: {
|
|
63
|
+
paddingLeft: '0px',
|
|
64
|
+
},
|
|
61
65
|
}));
|
|
62
66
|
|
|
63
67
|
const BreadcrumbLink = styled(Link)(({ theme }) => ({
|