@campxdev/react-blueprint 1.1.6 → 1.1.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/.prettierrc +8 -0
- package/.vscode/settings.json +5 -1
- package/craco.config.js +18 -0
- package/package.json +9 -5
- package/src/App.tsx +17 -38
- package/src/assets/images/gif/confirmation-alert.gif +0 -0
- package/src/assets/images/gif/delete-confirmation-alert.gif +0 -0
- package/src/assets/images/gif/index.ts +7 -0
- package/src/assets/images/svg/index.ts +5 -21
- package/src/components/Assets/Icons/IconComponents/AcademicIcon.tsx +41 -0
- package/src/components/Assets/Icons/IconComponents/AccordionArrow.tsx +23 -0
- package/src/components/Assets/Icons/IconComponents/NoteIcon.tsx +41 -0
- package/src/components/Assets/Icons/Icons.tsx +65 -58
- package/src/components/Charts/BarChart/BarChart.tsx +33 -9
- package/src/components/Charts/LineChart/LineChart.tsx +10 -4
- package/src/components/Charts/PieChart/PieChart.tsx +3 -2
- package/src/components/Charts/TreeMap/TreeMap.tsx +1 -0
- package/src/components/Charts/export.ts +4 -0
- package/src/components/Charts/types/types.ts +12 -2
- package/src/components/DataDisplay/Accordion/Accordion.tsx +42 -46
- package/src/components/DataDisplay/AccordionGroup/AccordionGroup.tsx +30 -0
- package/src/components/DataDisplay/Avatar/Avatar.tsx +18 -29
- package/src/components/DataDisplay/Card/Card.tsx +29 -8
- package/src/components/DataDisplay/DataTable/DataTable.tsx +14 -6
- package/src/components/DataDisplay/export.ts +6 -5
- package/src/components/DataDisplay/styles.tsx +2 -3
- package/src/components/Feedback/Snackbar/Snackbar.tsx +6 -5
- package/src/components/Input/DatePicker/DatePicker.tsx +58 -0
- package/src/components/Input/FormActions/FormActions.tsx +49 -0
- package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +70 -0
- package/src/components/Input/IconButtons/IconButtons.tsx +4 -4
- package/src/components/Input/LabelWrapper/LabelWrapper.tsx +1 -1
- package/src/components/Input/SingleSelect/SingleSelect.tsx +43 -54
- package/src/components/Input/{Chips/Chips.tsx → Tags/Tags.tsx} +14 -14
- package/src/components/Input/TimePicker/TimePicker.tsx +39 -0
- package/src/components/Input/export.ts +13 -8
- package/src/components/Layout/PageContent/PageContent.tsx +16 -0
- package/src/components/Layout/PageHeader/PageHeader.tsx +46 -0
- package/src/components/Navigation/ConfirmDialog/ConfirmDialog.tsx +79 -0
- package/src/components/Navigation/DropDownMenu/DropDownButton.tsx +5 -5
- package/src/components/Navigation/Sidebar/Components.tsx +97 -0
- package/src/components/Navigation/Sidebar/MenuItem.tsx +76 -104
- package/src/components/Navigation/Sidebar/Sidebar.tsx +150 -55
- package/src/components/Navigation/Sidebar/SubMenuItem.tsx +34 -0
- package/src/components/Navigation/Sidebar/interfaces.ts +35 -12
- package/src/components/Navigation/Sidebar/styles.tsx +2 -2
- package/src/components/Navigation/exports.ts +9 -8
- package/src/components/export.ts +1 -1
- package/src/contexts/Providers.tsx +2 -2
- package/src/stories/DataDisplay/AccordionGroup.stories.tsx +131 -0
- package/src/stories/Input/DatePicker.stories.tsx +138 -0
- package/src/stories/Input/{Chips.stories.tsx → Tags.stories.tsx} +17 -17
- package/src/stories/Input/TimePicker.stories.tsx +123 -0
- package/src/stories/Navigation/ConfirmDialog.stories.tsx +80 -0
- package/src/themes/commonTheme.ts +171 -155
- package/tsconfig.json +2 -6
- package/src/assets/images/admin.png +0 -0
- package/src/assets/images/campx_logo__full_primary.png +0 -0
- package/src/assets/images/collegex.png +0 -0
- package/src/assets/images/commutex.png +0 -0
- package/src/assets/images/enrollx.png +0 -0
- package/src/assets/images/examx.png +0 -0
- package/src/assets/images/hostelx copy.png +0 -0
- package/src/assets/images/hostelx.png +0 -0
- package/src/assets/images/index.ts +0 -25
- package/src/assets/images/payx.png +0 -0
- package/src/assets/images/pepolex.png +0 -0
- package/src/assets/images/svg/campx-logo.svg +0 -32
- package/src/assets/images/svg/commutex_small.svg +0 -11
- package/src/assets/images/svg/enroll_logo.svg +0 -9
- package/src/assets/images/svg/exams_small.svg +0 -12
- package/src/assets/images/svg/help-icon.svg +0 -8
- package/src/assets/images/svg/hostel_small.svg +0 -13
- package/src/assets/images/svg/payx_small.svg +0 -16
- package/src/assets/images/svg/people_small.svg +0 -9
- package/src/assets/images/svg/squareSmall.svg +0 -9
- package/src/assets/images/svg/square_small.svg +0 -9
- package/src/components/DataDisplay/Accordion/utils/StandardImageList.tsx +0 -70
- package/src/components/Navigation/Sidebar/DropdownItem.tsx +0 -34
- package/src/stories/DataDisplay/Accordion.stories.tsx +0 -62
- package/src/utils/applications.ts +0 -140
- package/src/utils/imageMap.ts +0 -22
package/.prettierrc
ADDED
package/.vscode/settings.json
CHANGED
package/craco.config.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const { getLoader, loaderByName } = require('@craco/craco');
|
|
3
|
+
const packages = [];
|
|
4
|
+
packages.push(path.dirname(require.resolve('@campxdev/campx-web-utils')));
|
|
5
|
+
packages.push(path.dirname(require.resolve('@campxdev/react-blueprint')));
|
|
6
|
+
module.exports = {
|
|
7
|
+
webpack: {
|
|
8
|
+
configure: (webpackConfig) => {
|
|
9
|
+
const { isFound, match } = getLoader(webpackConfig, loaderByName('babel-loader'));
|
|
10
|
+
if (isFound) {
|
|
11
|
+
const include = Array.isArray(match.loader.include) ? match.loader.include : [match.loader.include];
|
|
12
|
+
match.loader.include = include.concat(packages);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
return webpackConfig;
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
package/package.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@campxdev/react-blueprint",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.8",
|
|
4
4
|
"main": "./export.ts",
|
|
5
5
|
"private": false,
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@campxdev/campx-web-utils": "0.1.
|
|
7
|
+
"@campxdev/campx-web-utils": "0.1.18",
|
|
8
8
|
"@emotion/react": "^11.11.4",
|
|
9
9
|
"@emotion/styled": "^11.11.5",
|
|
10
10
|
"@mui/icons-material": "^5.15.20",
|
|
11
11
|
"@mui/material": "^5.15.20",
|
|
12
12
|
"@mui/x-data-grid": "^7.5.1",
|
|
13
|
+
"@mui/x-date-pickers": "^7.12.1",
|
|
13
14
|
"@storybook/addon-backgrounds": "^8.2.6",
|
|
14
15
|
"@storybook/addon-designs": "^8.0.3",
|
|
15
16
|
"@testing-library/jest-dom": "^5.14.1",
|
|
@@ -21,6 +22,7 @@
|
|
|
21
22
|
"@types/react-dom": "^18.3.0",
|
|
22
23
|
"@types/react-router-dom": "^5.3.3",
|
|
23
24
|
"axios": "^1.7.2",
|
|
25
|
+
"date-fns": "^3.6.0",
|
|
24
26
|
"framer-motion": "^11.2.9",
|
|
25
27
|
"global": "^4.4.0",
|
|
26
28
|
"js-cookie": "^3.0.5",
|
|
@@ -29,6 +31,7 @@
|
|
|
29
31
|
"react": "^18.3.1",
|
|
30
32
|
"react-dom": "^18.3.1",
|
|
31
33
|
"react-error-boundary": "^3.1.4",
|
|
34
|
+
"react-hook-form": "^7.52.0",
|
|
32
35
|
"react-joyride": "^2.8.2",
|
|
33
36
|
"react-query": "^3.39.3",
|
|
34
37
|
"react-router-dom": "^6.24.0",
|
|
@@ -40,9 +43,9 @@
|
|
|
40
43
|
"yalc": "^1.0.0-pre.53"
|
|
41
44
|
},
|
|
42
45
|
"scripts": {
|
|
43
|
-
"start": "
|
|
44
|
-
"build": "
|
|
45
|
-
"test": "
|
|
46
|
+
"start": "craco start",
|
|
47
|
+
"build": "craco build",
|
|
48
|
+
"test": "craco test",
|
|
46
49
|
"eject": "react-scripts eject",
|
|
47
50
|
"storybook": "storybook dev -p 6006",
|
|
48
51
|
"build-storybook": "storybook build"
|
|
@@ -69,6 +72,7 @@
|
|
|
69
72
|
"devDependencies": {
|
|
70
73
|
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
71
74
|
"@chromatic-com/storybook": "^1.6.1",
|
|
75
|
+
"@craco/craco": "^7.1.0",
|
|
72
76
|
"@storybook/addon-essentials": "^8.2.6",
|
|
73
77
|
"@storybook/addon-interactions": "^8.2.6",
|
|
74
78
|
"@storybook/addon-links": "^8.2.6",
|
package/src/App.tsx
CHANGED
|
@@ -1,30 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
UnAuthorized,
|
|
10
|
-
} from "./components/export";
|
|
11
|
-
import Providers from "./contexts/Providers";
|
|
1
|
+
import { Button } from '@mui/material';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import './App.css';
|
|
4
|
+
import Chips from './components/DataDisplay/Chips/Chips';
|
|
5
|
+
import { Tags } from './components/Input/Tags/Tags';
|
|
6
|
+
import { AppHeader, SearchBar, UnAuthorized } from './components/export';
|
|
7
|
+
import Providers from './contexts/Providers';
|
|
8
|
+
|
|
12
9
|
function App() {
|
|
13
10
|
const [selected, setSelected] = useState<string | number | string[]>([]);
|
|
14
11
|
const sampleChips = [
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
label: "Chip2",
|
|
21
|
-
value: 2,
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
label: "Chip3",
|
|
25
|
-
value: 3,
|
|
26
|
-
},
|
|
12
|
+
{ label: 'Chip1', value: 1 },
|
|
13
|
+
{ label: 'Chip2', value: 2 },
|
|
14
|
+
{ label: 'Chip3', value: 3 },
|
|
27
15
|
];
|
|
16
|
+
|
|
28
17
|
return (
|
|
29
18
|
<Providers>
|
|
30
19
|
<AppHeader
|
|
@@ -36,34 +25,24 @@ function App() {
|
|
|
36
25
|
/>
|
|
37
26
|
<UnAuthorized
|
|
38
27
|
component={
|
|
39
|
-
<Button sx={{ marginTop:
|
|
28
|
+
<Button sx={{ marginTop: '20px' }} variant="contained">
|
|
40
29
|
Click Here to Login
|
|
41
30
|
</Button>
|
|
42
31
|
}
|
|
43
32
|
/>
|
|
44
|
-
<SearchBar onSearch={() => {}} value={
|
|
33
|
+
<SearchBar onSearch={() => {}} value={''} placeholder="Search by Name" />
|
|
45
34
|
<Chips
|
|
46
35
|
list={sampleChips}
|
|
47
36
|
singleSelection={false}
|
|
48
37
|
selected={selected}
|
|
49
38
|
onSelected={(selectedValue) => {
|
|
50
|
-
console.log(selectedValue,
|
|
51
|
-
setSelected(selectedValue);
|
|
52
|
-
}}
|
|
53
|
-
/>
|
|
54
|
-
<IconButtons.ViewButton />
|
|
55
|
-
<IconButtons.EditButton />
|
|
56
|
-
<IconButtons.DeleteButton />
|
|
57
|
-
<Chips
|
|
58
|
-
list={sampleChips}
|
|
59
|
-
singleSelection={false}
|
|
60
|
-
selected={selected}
|
|
61
|
-
onSelected={(selectedValue) => {
|
|
62
|
-
console.log(selectedValue, "selectedValue");
|
|
39
|
+
console.log(selectedValue, 'selectedValue');
|
|
63
40
|
setSelected(selectedValue);
|
|
64
41
|
}}
|
|
65
42
|
/>
|
|
43
|
+
<Tags tags={sampleChips} />
|
|
66
44
|
</Providers>
|
|
67
45
|
);
|
|
68
46
|
}
|
|
47
|
+
|
|
69
48
|
export default App;
|
|
Binary file
|
|
Binary file
|
|
@@ -1,29 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import helpIcon from "./help-icon.svg";
|
|
7
|
-
import hostelSmall from "./hostel_small.svg";
|
|
8
|
-
import internalServerError from "./Internalserverimage.svg";
|
|
9
|
-
import noConnection from "./no-connection.svg";
|
|
10
|
-
import payxSmall from "./payx_small.svg";
|
|
11
|
-
import peopleSmall from "./people_small.svg";
|
|
12
|
-
import squareSmall from "./square_small.svg";
|
|
13
|
-
import unAuthorized from "./unauthorized.svg";
|
|
1
|
+
import emptyListImage from './Emptylistmage.svg';
|
|
2
|
+
import errorCactus from './error-cactus.svg';
|
|
3
|
+
import internalServerError from './Internalserverimage.svg';
|
|
4
|
+
import noConnection from './no-connection.svg';
|
|
5
|
+
import unAuthorized from './unauthorized.svg';
|
|
14
6
|
|
|
15
7
|
export {
|
|
16
|
-
commuteSmall,
|
|
17
8
|
emptyListImage,
|
|
18
|
-
enrollSmall,
|
|
19
9
|
errorCactus,
|
|
20
|
-
examsSmall,
|
|
21
|
-
helpIcon,
|
|
22
|
-
hostelSmall,
|
|
23
10
|
internalServerError,
|
|
24
11
|
noConnection,
|
|
25
|
-
payxSmall,
|
|
26
|
-
peopleSmall,
|
|
27
|
-
squareSmall,
|
|
28
12
|
unAuthorized,
|
|
29
13
|
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useTheme } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export const AcademicsIcon = () => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const color = theme.palette.text.primary;
|
|
6
|
+
return (
|
|
7
|
+
<>
|
|
8
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9
|
+
<path
|
|
10
|
+
d="M10.0001 18.3986C9.75295 18.4012 9.50914 18.3411 9.29147 18.2239C7.39801 17.2642 5.36941 16.5986 3.27547 16.2499L3.03414 16.2166C2.48868 16.133 1.99007 15.8601 1.62581 15.4456C1.26154 15.0311 1.05489 14.5016 1.04214 13.9499V3.88322C1.03855 3.56619 1.10171 3.25195 1.22751 2.96092C1.35332 2.66989 1.53895 2.40859 1.77234 2.194C2.00573 1.9794 2.28167 1.81632 2.58221 1.71534C2.88276 1.61436 3.20118 1.57775 3.5168 1.60789C5.68976 1.86244 7.78803 2.55725 9.68347 3.64989L9.88347 3.76656C9.95755 3.79813 10.0407 3.80098 10.1168 3.77455L10.2501 3.69122C12.1495 2.5944 14.2492 1.88898 16.4255 1.61656H16.5255C16.8345 1.59029 17.1455 1.62937 17.4384 1.73125C17.7313 1.83314 17.9995 1.99553 18.2255 2.20789C18.4599 2.42226 18.6465 2.68374 18.7728 2.97521C18.8992 3.26668 18.9626 3.58156 18.9588 3.89922V13.9579C18.9471 14.5111 18.7397 15.0423 18.3736 15.4572C18.0075 15.8722 17.5063 16.144 16.9588 16.2246L16.6841 16.2579C14.5975 16.6056 12.5766 17.2715 10.6921 18.2326C10.4801 18.3478 10.2414 18.4051 10.0001 18.3986ZM3.3168 2.84989C3.05807 2.84665 2.8078 2.94199 2.6168 3.11655C2.51238 3.21476 2.42957 3.33367 2.37367 3.46567C2.31777 3.59768 2.29 3.73988 2.29214 3.88322V13.9499C2.30335 14.1985 2.39842 14.4359 2.56186 14.6236C2.72529 14.8112 2.94745 14.938 3.19214 14.9832L3.44214 15.0166C5.67583 15.3843 7.83989 16.0925 9.8588 17.1166C9.92936 17.1477 10.0078 17.1564 10.0835 17.1412C12.1066 16.1007 14.2803 15.3838 16.5255 15.0166L16.8088 14.9832C17.0541 14.9392 17.277 14.8128 17.4406 14.6249C17.6043 14.437 17.6989 14.1989 17.7088 13.9499V3.89122C17.711 3.7467 17.6832 3.60329 17.6274 3.46999C17.5715 3.33668 17.4887 3.21636 17.3841 3.11655C17.2752 3.02111 17.1484 2.94835 17.011 2.90256C16.8737 2.85677 16.7285 2.83886 16.5841 2.84989H16.4841C14.5277 3.11065 12.6402 3.74722 10.9255 4.72456L10.7921 4.81656C10.5576 4.95487 10.2905 5.02848 10.0182 5.02988C9.74592 5.03129 9.47812 4.96044 9.24214 4.82456L9.04214 4.70789C7.30552 3.72903 5.3948 3.09794 3.4168 2.84989H3.3168Z"
|
|
11
|
+
style={{ stroke: color, fill: color }}
|
|
12
|
+
stroke-width="0.4"
|
|
13
|
+
/>
|
|
14
|
+
<path
|
|
15
|
+
d="M10.0003 17.7002C9.83492 17.6991 9.67658 17.633 9.55955 17.5161C9.44252 17.3992 9.37622 17.2409 9.375 17.0755V4.57553C9.37605 4.41 9.44227 4.25156 9.55931 4.13451C9.67636 4.01746 9.83481 3.95124 10.0003 3.9502C10.1659 3.95124 10.3243 4.01746 10.4414 4.13451C10.5584 4.25156 10.6246 4.41 10.6257 4.57553V17.0755C10.6258 17.1576 10.6096 17.239 10.5782 17.3148C10.5468 17.3907 10.5008 17.4596 10.4427 17.5177C10.3846 17.5757 10.3156 17.6217 10.2397 17.653C10.1638 17.6843 10.0824 17.7004 10.0003 17.7002Z"
|
|
16
|
+
style={{
|
|
17
|
+
fill: color,
|
|
18
|
+
stroke: color,
|
|
19
|
+
}}
|
|
20
|
+
stroke-width="0.4"
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
d="M6.45898 7.7002H4.58432C4.41891 7.69915 4.26056 7.63302 4.14353 7.51612C4.0265 7.39922 3.96021 7.24094 3.95898 7.07553C3.96003 6.91 4.02625 6.75156 4.1433 6.63451C4.26035 6.51746 4.41879 6.45124 4.58432 6.4502H6.45898C6.62451 6.45124 6.78296 6.51746 6.9 6.63451C7.01705 6.75156 7.08327 6.91 7.08432 7.07553C7.08309 7.24094 7.0168 7.39922 6.89977 7.51612C6.78274 7.63302 6.62439 7.69915 6.45898 7.7002Z"
|
|
24
|
+
style={{
|
|
25
|
+
fill: color,
|
|
26
|
+
stroke: color,
|
|
27
|
+
}}
|
|
28
|
+
stroke-width="0.4"
|
|
29
|
+
/>
|
|
30
|
+
<path
|
|
31
|
+
d="M7.08432 10.2002H4.58432C4.41891 10.1991 4.26056 10.133 4.14353 10.0161C4.0265 9.89922 3.96021 9.74094 3.95898 9.57553C3.96003 9.41 4.02625 9.25156 4.1433 9.13451C4.26035 9.01746 4.41879 8.95124 4.58432 8.9502H7.08432C7.24984 8.95124 7.40829 9.01746 7.52534 9.13451C7.64238 9.25156 7.7086 9.41 7.70965 9.57553C7.70843 9.74094 7.64213 9.89922 7.5251 10.0161C7.40808 10.133 7.24973 10.1991 7.08432 10.2002Z"
|
|
32
|
+
style={{
|
|
33
|
+
fill: color,
|
|
34
|
+
stroke: color,
|
|
35
|
+
}}
|
|
36
|
+
stroke-width="0.4"
|
|
37
|
+
/>
|
|
38
|
+
</svg>
|
|
39
|
+
</>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { useTheme } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export const AccordionArrow = ({ size = 16 }) => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const color = theme.palette.text.primary;
|
|
6
|
+
return (
|
|
7
|
+
<svg
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
width={size}
|
|
10
|
+
height={size}
|
|
11
|
+
viewBox="0 0 16 16"
|
|
12
|
+
style={{
|
|
13
|
+
fill: color,
|
|
14
|
+
stroke: color,
|
|
15
|
+
}}
|
|
16
|
+
>
|
|
17
|
+
<path
|
|
18
|
+
d="M8.0006 11.9334L7.99752 11.9334C7.81529 11.9321 7.64033 11.8632 7.50626 11.7407L7.49841 11.7359L7.48101 11.7185L1.61434 5.85188L1.61432 5.85186C1.47684 5.71434 1.39961 5.52784 1.39961 5.33339C1.39961 5.13894 1.47684 4.95244 1.61432 4.81492L1.61436 4.81488C1.75188 4.6774 1.93838 4.60017 2.13283 4.60017C2.32728 4.60017 2.51378 4.6774 2.6513 4.81488L2.65132 4.8149L7.99896 10.1625L13.3455 4.81544L13.3456 4.81541C13.4831 4.67794 13.6696 4.6007 13.864 4.6007C14.0585 4.6007 14.245 4.67794 14.3825 4.81541L14.3825 4.81546C14.52 4.95298 14.5972 5.13947 14.5972 5.33392C14.5972 5.52838 14.52 5.71487 14.3825 5.85239L14.3825 5.85241L8.51585 11.7191L8.4929 11.742L8.48332 11.7468C8.35073 11.8653 8.17921 11.9319 8.0006 11.9334Z"
|
|
19
|
+
stroke-width="0.4"
|
|
20
|
+
/>
|
|
21
|
+
</svg>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useTheme } from '@mui/material';
|
|
2
|
+
|
|
3
|
+
export const NoteIcon = ({ size = 16 }) => {
|
|
4
|
+
const theme = useTheme();
|
|
5
|
+
const color = theme.palette.text.primary;
|
|
6
|
+
|
|
7
|
+
return (
|
|
8
|
+
<svg width={size} height={size} viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
9
|
+
<path
|
|
10
|
+
d="M5.3335 3.83301C5.20116 3.83213 5.07449 3.77918 4.98091 3.6856C4.88733 3.59202 4.83437 3.46535 4.8335 3.33301V1.33301C4.83437 1.20067 4.88733 1.074 4.98091 0.98042C5.07449 0.88684 5.20116 0.833881 5.3335 0.833008C5.46583 0.833881 5.5925 0.88684 5.68608 0.98042C5.77966 1.074 5.83262 1.20067 5.8335 1.33301V3.33301C5.83262 3.46535 5.77966 3.59202 5.68608 3.6856C5.5925 3.77918 5.46583 3.83213 5.3335 3.83301Z"
|
|
11
|
+
fill={color}
|
|
12
|
+
stroke="#121212"
|
|
13
|
+
stroke-width="0.4"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
d="M10.6665 3.83301C10.5342 3.83213 10.4075 3.77918 10.3139 3.6856C10.2203 3.59202 10.1674 3.46535 10.1665 3.33301V1.33301C10.1674 1.20067 10.2203 1.074 10.3139 0.98042C10.4075 0.88684 10.5342 0.833881 10.6665 0.833008C10.7988 0.833881 10.9255 0.88684 11.0191 0.98042C11.1127 1.074 11.1656 1.20067 11.1665 1.33301V3.33301C11.1656 3.46535 11.1127 3.59202 11.0191 3.6856C10.9255 3.77918 10.7988 3.83213 10.6665 3.83301Z"
|
|
17
|
+
fill={color}
|
|
18
|
+
stroke="#121212"
|
|
19
|
+
stroke-width="0.4"
|
|
20
|
+
/>
|
|
21
|
+
<path
|
|
22
|
+
d="M9.99984 9.16699H4.6665C4.53417 9.16612 4.4075 9.11316 4.31392 9.01958C4.22034 8.926 4.16738 8.79933 4.1665 8.66699C4.16738 8.53465 4.22034 8.40798 4.31392 8.3144C4.4075 8.22082 4.53417 8.16787 4.6665 8.16699H9.99984C10.1322 8.16787 10.2588 8.22082 10.3524 8.3144C10.446 8.40798 10.499 8.53465 10.4998 8.66699C10.499 8.79933 10.446 8.926 10.3524 9.01958C10.2588 9.11316 10.1322 9.16612 9.99984 9.16699Z"
|
|
23
|
+
fill={color}
|
|
24
|
+
stroke="#121212"
|
|
25
|
+
stroke-width="0.4"
|
|
26
|
+
/>
|
|
27
|
+
<path
|
|
28
|
+
d="M7.99984 11.833H4.6665C4.53417 11.8321 4.4075 11.7792 4.31392 11.6856C4.22034 11.592 4.16738 11.4653 4.1665 11.333C4.16738 11.2007 4.22034 11.074 4.31392 10.9804C4.4075 10.8868 4.53417 10.8339 4.6665 10.833H7.99984C8.13218 10.8339 8.25885 10.8868 8.35243 10.9804C8.446 11.074 8.49896 11.2007 8.49984 11.333C8.49896 11.4653 8.446 11.592 8.35243 11.6856C8.25885 11.7792 8.13218 11.8321 7.99984 11.833Z"
|
|
29
|
+
fill={color}
|
|
30
|
+
stroke="#121212"
|
|
31
|
+
stroke-width="0.4"
|
|
32
|
+
/>
|
|
33
|
+
<path
|
|
34
|
+
d="M10 15.1663H6C2.25333 15.1663 1.5 13.3997 1.5 10.5463V6.43301C1.5 3.27301 2.56667 1.98634 5.30667 1.83301H10.6933C13.4333 1.98634 14.5 3.27301 14.5 6.43301V10.5463C14.5 13.3997 13.7467 15.1663 10 15.1663ZM5.33333 2.83301C3.46667 2.93967 2.5 3.52634 2.5 6.43301V10.5463C2.5 13.0997 2.98667 14.1663 6 14.1663H10C13.0133 14.1663 13.5 13.0997 13.5 10.5463V6.43301C13.5 3.53301 12.54 2.93967 10.6533 2.83301H5.33333Z"
|
|
35
|
+
fill={color}
|
|
36
|
+
stroke="#121212"
|
|
37
|
+
stroke-width="0.4"
|
|
38
|
+
/>
|
|
39
|
+
</svg>
|
|
40
|
+
);
|
|
41
|
+
};
|
|
@@ -1,62 +1,67 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
1
|
+
import { AcademicsIcon } from './IconComponents/AcademicIcon';
|
|
2
|
+
import { AccordionArrow } from './IconComponents/AccordionArrow';
|
|
3
|
+
import { ActiveDevicesIcon } from './IconComponents/ActiveDevicesIcon';
|
|
4
|
+
import { AdminIcon } from './IconComponents/AdminIcon';
|
|
5
|
+
import { AdministratorIcon } from './IconComponents/AdministratorIcon';
|
|
6
|
+
import { ErrorFilledIcon } from './IconComponents/AlertFilledIcon';
|
|
7
|
+
import { AppsIcon } from './IconComponents/AppsIcon';
|
|
8
|
+
import { ArrowBackIcon } from './IconComponents/ArrowBackIcon';
|
|
9
|
+
import { BulbIcon } from './IconComponents/BulbIcon';
|
|
10
|
+
import { CampxFullLogoIcon } from './IconComponents/CampxFullLogoIcon';
|
|
11
|
+
import { CampxIcon } from './IconComponents/CampxIcon';
|
|
12
|
+
import { CareerIcon } from './IconComponents/CareerIcon';
|
|
13
|
+
import { CheckedCheckboxIcon } from './IconComponents/CheckedCheckBoxIcon';
|
|
14
|
+
import { CheckedRadioIcon } from './IconComponents/CheckedRadioIcon';
|
|
15
|
+
import { ClogWheelIcon } from './IconComponents/ClogWheelIcon';
|
|
16
|
+
import { CollapseIcon } from './IconComponents/CollapseIcon';
|
|
17
|
+
import { CommutexIcon } from './IconComponents/CommutexIcon';
|
|
18
|
+
import { CompletedStateIcon } from './IconComponents/CompletedStateIcon';
|
|
19
|
+
import { CrossIcon } from './IconComponents/CrossIcon';
|
|
20
|
+
import { CrossIcon2 } from './IconComponents/CrossIcon2';
|
|
21
|
+
import { DashBoardIcon } from './IconComponents/DashBoardIcon';
|
|
22
|
+
import { DeleteIcon } from './IconComponents/DeleteIcon';
|
|
23
|
+
import { DeviceIcon } from './IconComponents/DeviceIcon';
|
|
24
|
+
import { EditIcon } from './IconComponents/EditIcon';
|
|
25
|
+
import { EnrollxIcon } from './IconComponents/EnrollxIcon';
|
|
26
|
+
import { ExamResultIcon } from './IconComponents/ExamResultIcon';
|
|
27
|
+
import { ExamxIcon } from './IconComponents/ExamxIcon';
|
|
28
|
+
import { ExpandIcon } from './IconComponents/ExpandIcon';
|
|
29
|
+
import { ExportIcon } from './IconComponents/ExportIcon';
|
|
30
|
+
import { FilterIcon } from './IconComponents/FilterIcon';
|
|
31
|
+
import { HelpIcon } from './IconComponents/HelpIcon';
|
|
32
|
+
import { HomeIcon } from './IconComponents/HomeIcon';
|
|
33
|
+
import { HostelxIcon } from './IconComponents/HostelxIcon';
|
|
34
|
+
import { InfoFilledIcon } from './IconComponents/InfoFilledIcon';
|
|
35
|
+
import { InfoIcon } from './IconComponents/InfoIcon';
|
|
36
|
+
import { InstitutionsIcon } from './IconComponents/InstitutionsIcon';
|
|
37
|
+
import { LeftIcon } from './IconComponents/LeftIcon';
|
|
38
|
+
import { LocationIcon } from './IconComponents/LocationIcon';
|
|
39
|
+
import { LogoutIcon } from './IconComponents/LogoutIcon';
|
|
40
|
+
import { NavigationIcon } from './IconComponents/NavigationIcon';
|
|
41
|
+
import { NoteIcon } from './IconComponents/NoteIcon';
|
|
42
|
+
import { NotificationIcon } from './IconComponents/NotificationIcon';
|
|
43
|
+
import { PayxIcon } from './IconComponents/PayxIcon';
|
|
44
|
+
import { PeoplexIcon } from './IconComponents/PeoplexIcon';
|
|
45
|
+
import { ProductFeaturesIcon } from './IconComponents/ProductFeaturesIcon';
|
|
46
|
+
import { ProfileIcon } from './IconComponents/ProfileIcon';
|
|
47
|
+
import { RedirectIcon } from './IconComponents/RedirectIcon';
|
|
48
|
+
import { RedoIcon } from './IconComponents/RedoIcon';
|
|
49
|
+
import { RightIcon } from './IconComponents/RightIcon';
|
|
50
|
+
import { SaveIcon } from './IconComponents/SaveIcon';
|
|
51
|
+
import { SearchIcon } from './IconComponents/SearchIcon';
|
|
52
|
+
import { ShareIcon } from './IconComponents/ShareIcon';
|
|
53
|
+
import { SuccessFilledIcon } from './IconComponents/SuccessFilledIcon';
|
|
54
|
+
import { TicketsIcon } from './IconComponents/TicketsIcon';
|
|
55
|
+
import { UmsIcon } from './IconComponents/UmsIcon';
|
|
56
|
+
import { UnCheckedCheckboxIcon } from './IconComponents/UncheckCheckBoxIcon';
|
|
57
|
+
import { UnCheckedRadioIcon } from './IconComponents/UncheckedRadioIcon';
|
|
58
|
+
import { ViewIcon } from './IconComponents/ViewIcon';
|
|
59
|
+
import { VisibilityOffIcon } from './IconComponents/VisibiityOffIcon';
|
|
60
|
+
import { VisibilityIcon } from './IconComponents/VisibilityIcon';
|
|
61
|
+
import { WarningFilledIcon } from './IconComponents/WarningFilledIcon';
|
|
62
|
+
|
|
59
63
|
export const Icons = {
|
|
64
|
+
NoteIcon,
|
|
60
65
|
RedoIcon,
|
|
61
66
|
ArrowBackIcon,
|
|
62
67
|
CollapseIcon,
|
|
@@ -79,6 +84,7 @@ export const Icons = {
|
|
|
79
84
|
AlertFilledIcon: ErrorFilledIcon,
|
|
80
85
|
CrossIcon2,
|
|
81
86
|
LogoutIcon,
|
|
87
|
+
AccordionArrow,
|
|
82
88
|
TicketsIcon,
|
|
83
89
|
FilterIcon,
|
|
84
90
|
ExportIcon,
|
|
@@ -115,4 +121,5 @@ export const Icons = {
|
|
|
115
121
|
EditIcon,
|
|
116
122
|
ViewIcon,
|
|
117
123
|
RedirectIcon,
|
|
124
|
+
AcademicsIcon,
|
|
118
125
|
};
|
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
} from "recharts";
|
|
12
12
|
import {
|
|
13
13
|
AxisLabelProps,
|
|
14
|
+
BaseAxisProps,
|
|
14
15
|
CartesianGridProps,
|
|
15
16
|
LegendProps,
|
|
16
17
|
MarginProps,
|
|
@@ -26,12 +27,14 @@ export type BarChartProps = {
|
|
|
26
27
|
dataKey: string;
|
|
27
28
|
data: any[];
|
|
28
29
|
bars: BarItem[];
|
|
29
|
-
|
|
30
|
-
|
|
30
|
+
domain?: any[];
|
|
31
|
+
barGap?: number | string;
|
|
32
|
+
barSize?: number | string;
|
|
31
33
|
showToolTip?: boolean;
|
|
32
34
|
showLegend?: boolean;
|
|
33
35
|
cartesianGrid?: CartesianGridProps;
|
|
34
36
|
axisLabelProps?: AxisLabelProps;
|
|
37
|
+
baseAxisProps?: BaseAxisProps;
|
|
35
38
|
legendSx?: LegendProps;
|
|
36
39
|
containerSx?: SxProps;
|
|
37
40
|
margin?: MarginProps;
|
|
@@ -51,12 +54,14 @@ export const BarChart = ({
|
|
|
51
54
|
margin,
|
|
52
55
|
layout = "horizontal",
|
|
53
56
|
dataKey,
|
|
57
|
+
domain = [0, "auto"],
|
|
54
58
|
data,
|
|
55
59
|
bars,
|
|
56
60
|
barGap = 10,
|
|
57
61
|
barSize = 20,
|
|
58
62
|
showToolTip = true,
|
|
59
63
|
showLegend = true,
|
|
64
|
+
baseAxisProps,
|
|
60
65
|
cartesianGrid = { showCartesianGrid: false },
|
|
61
66
|
axisLabelProps,
|
|
62
67
|
legendSx,
|
|
@@ -68,7 +73,7 @@ export const BarChart = ({
|
|
|
68
73
|
const theme = useTheme();
|
|
69
74
|
|
|
70
75
|
return (
|
|
71
|
-
<Stack alignItems={"center"} sx={{ ...containerSx }}>
|
|
76
|
+
<Stack alignItems={"center"} sx={{ ...containerSx }} width={"fit-content"}>
|
|
72
77
|
<Typography variant={"h5"} align={"center"} sx={{ ...titleSx }}>
|
|
73
78
|
{title}
|
|
74
79
|
</Typography>
|
|
@@ -86,12 +91,14 @@ export const BarChart = ({
|
|
|
86
91
|
)}
|
|
87
92
|
{showToolTip && (
|
|
88
93
|
<Tooltip
|
|
94
|
+
cursor={{ fill: theme.palette.secondary.light, fillOpacity: "50%" }}
|
|
89
95
|
itemStyle={{
|
|
90
|
-
color: theme.palette.text.
|
|
96
|
+
color: theme.palette.text.secondary,
|
|
91
97
|
}}
|
|
92
98
|
contentStyle={{
|
|
93
|
-
color: theme.palette.text.
|
|
99
|
+
color: theme.palette.text.primary,
|
|
94
100
|
backgroundColor: theme.palette.background.paper,
|
|
101
|
+
borderColor: theme.palette.border.primary,
|
|
95
102
|
borderRadius: "5px",
|
|
96
103
|
padding: "5px 10px",
|
|
97
104
|
}}
|
|
@@ -106,7 +113,10 @@ export const BarChart = ({
|
|
|
106
113
|
<XAxis
|
|
107
114
|
type="category"
|
|
108
115
|
dataKey={dataKey}
|
|
109
|
-
stroke={theme.palette.primary
|
|
116
|
+
stroke={theme.palette.border.primary}
|
|
117
|
+
tick={{ fill: theme.palette.text.tertiary }}
|
|
118
|
+
angle={baseAxisProps?.xAxis?.angle}
|
|
119
|
+
tickMargin={baseAxisProps?.xAxis?.tickMargin}
|
|
110
120
|
>
|
|
111
121
|
<Label
|
|
112
122
|
{...xLabel}
|
|
@@ -114,7 +124,13 @@ export const BarChart = ({
|
|
|
114
124
|
style={{ fill: theme.palette.text.primary }}
|
|
115
125
|
/>
|
|
116
126
|
</XAxis>
|
|
117
|
-
<YAxis
|
|
127
|
+
<YAxis
|
|
128
|
+
type="number"
|
|
129
|
+
stroke={theme.palette.border.primary}
|
|
130
|
+
tick={{ fill: theme.palette.text.tertiary }}
|
|
131
|
+
tickMargin={baseAxisProps?.yAxis?.tickMargin}
|
|
132
|
+
domain={domain}
|
|
133
|
+
>
|
|
118
134
|
{yLabel && (
|
|
119
135
|
<Label
|
|
120
136
|
offset={10}
|
|
@@ -129,7 +145,13 @@ export const BarChart = ({
|
|
|
129
145
|
</>
|
|
130
146
|
) : (
|
|
131
147
|
<>
|
|
132
|
-
<XAxis
|
|
148
|
+
<XAxis
|
|
149
|
+
type="number"
|
|
150
|
+
stroke={theme.palette.border.primary}
|
|
151
|
+
tick={{ fill: theme.palette.text.tertiary }}
|
|
152
|
+
angle={baseAxisProps?.xAxis?.angle}
|
|
153
|
+
tickMargin={baseAxisProps?.xAxis?.tickMargin}
|
|
154
|
+
>
|
|
133
155
|
<Label
|
|
134
156
|
{...xLabel}
|
|
135
157
|
dy={xLabel?.dy}
|
|
@@ -139,7 +161,9 @@ export const BarChart = ({
|
|
|
139
161
|
<YAxis
|
|
140
162
|
dataKey={dataKey}
|
|
141
163
|
type="category"
|
|
142
|
-
stroke={theme.palette.primary
|
|
164
|
+
stroke={theme.palette.border.primary}
|
|
165
|
+
tick={{ fill: theme.palette.text.tertiary }}
|
|
166
|
+
tickMargin={baseAxisProps?.yAxis?.tickMargin}
|
|
143
167
|
>
|
|
144
168
|
{yLabel && (
|
|
145
169
|
<Label
|
|
@@ -74,11 +74,12 @@ export const LineChart = ({
|
|
|
74
74
|
{showToolTip && (
|
|
75
75
|
<Tooltip
|
|
76
76
|
itemStyle={{
|
|
77
|
-
color: theme.palette.text.
|
|
77
|
+
color: theme.palette.text.secondary,
|
|
78
78
|
}}
|
|
79
79
|
contentStyle={{
|
|
80
|
-
color: theme.palette.text.
|
|
80
|
+
color: theme.palette.text.primary,
|
|
81
81
|
backgroundColor: theme.palette.background.paper,
|
|
82
|
+
borderColor: theme.palette.border.primary,
|
|
82
83
|
borderRadius: "5px",
|
|
83
84
|
padding: "5px 10px",
|
|
84
85
|
}}
|
|
@@ -90,7 +91,8 @@ export const LineChart = ({
|
|
|
90
91
|
padding={"gap"}
|
|
91
92
|
type="category"
|
|
92
93
|
dataKey={dataKey}
|
|
93
|
-
stroke={theme.palette.primary
|
|
94
|
+
stroke={theme.palette.border.primary}
|
|
95
|
+
tick={{ fill: theme.palette.text.tertiary }}
|
|
94
96
|
>
|
|
95
97
|
<Label
|
|
96
98
|
{...xLabel}
|
|
@@ -98,7 +100,11 @@ export const LineChart = ({
|
|
|
98
100
|
style={{ fill: theme.palette.text.primary }}
|
|
99
101
|
/>
|
|
100
102
|
</XAxis>
|
|
101
|
-
<YAxis
|
|
103
|
+
<YAxis
|
|
104
|
+
type="number"
|
|
105
|
+
stroke={theme.palette.border.primary}
|
|
106
|
+
tick={{ fill: theme.palette.text.tertiary }}
|
|
107
|
+
>
|
|
102
108
|
{yLabel && (
|
|
103
109
|
<Label
|
|
104
110
|
offset={10}
|