@campxdev/react-blueprint 1.1.6 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/.prettierrc +8 -0
  2. package/package.json +4 -1
  3. package/src/App.tsx +17 -38
  4. package/src/components/Assets/Icons/IconComponents/AcademicIcon.tsx +41 -0
  5. package/src/components/Assets/Icons/IconComponents/AccordionArrow.tsx +23 -0
  6. package/src/components/Assets/Icons/IconComponents/NoteIcon.tsx +41 -0
  7. package/src/components/Assets/Icons/Icons.tsx +65 -58
  8. package/src/components/Charts/BarChart/BarChart.tsx +33 -9
  9. package/src/components/Charts/LineChart/LineChart.tsx +10 -4
  10. package/src/components/Charts/PieChart/PieChart.tsx +3 -2
  11. package/src/components/Charts/TreeMap/TreeMap.tsx +1 -0
  12. package/src/components/Charts/export.ts +4 -0
  13. package/src/components/Charts/types/types.ts +12 -2
  14. package/src/components/DataDisplay/Accordion/Accordion.tsx +42 -46
  15. package/src/components/DataDisplay/AccordionGroup/AccordionGroup.tsx +30 -0
  16. package/src/components/DataDisplay/Avatar/Avatar.tsx +18 -29
  17. package/src/components/DataDisplay/Card/Card.tsx +29 -8
  18. package/src/components/DataDisplay/DataTable/DataTable.tsx +14 -6
  19. package/src/components/DataDisplay/export.ts +6 -5
  20. package/src/components/DataDisplay/styles.tsx +2 -3
  21. package/src/components/Feedback/Snackbar/Snackbar.tsx +6 -5
  22. package/src/components/Input/DatePicker/DatePicker.tsx +58 -0
  23. package/src/components/Input/FormActions/FormActions.tsx +49 -0
  24. package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +70 -0
  25. package/src/components/Input/IconButtons/IconButtons.tsx +4 -4
  26. package/src/components/Input/LabelWrapper/LabelWrapper.tsx +1 -1
  27. package/src/components/Input/SingleSelect/SingleSelect.tsx +43 -54
  28. package/src/components/Input/{Chips/Chips.tsx → Tags/Tags.tsx} +14 -14
  29. package/src/components/Input/TimePicker/TimePicker.tsx +39 -0
  30. package/src/components/Input/export.ts +13 -8
  31. package/src/components/Layout/PageContent/PageContent.tsx +16 -0
  32. package/src/components/Layout/PageHeader/PageHeader.tsx +46 -0
  33. package/src/components/Navigation/DropDownMenu/DropDownButton.tsx +5 -5
  34. package/src/components/Navigation/Sidebar/Components.tsx +97 -0
  35. package/src/components/Navigation/Sidebar/MenuItem.tsx +76 -104
  36. package/src/components/Navigation/Sidebar/Sidebar.tsx +150 -55
  37. package/src/components/Navigation/Sidebar/SubMenuItem.tsx +34 -0
  38. package/src/components/Navigation/Sidebar/interfaces.ts +35 -12
  39. package/src/components/Navigation/Sidebar/styles.tsx +2 -2
  40. package/src/components/Navigation/exports.ts +2 -0
  41. package/src/components/export.ts +1 -1
  42. package/src/stories/DataDisplay/AccordionGroup.stories.tsx +131 -0
  43. package/src/stories/Input/DatePicker.stories.tsx +138 -0
  44. package/src/stories/Input/{Chips.stories.tsx → Tags.stories.tsx} +17 -17
  45. package/src/stories/Input/TimePicker.stories.tsx +123 -0
  46. package/src/themes/commonTheme.ts +171 -155
  47. package/src/components/DataDisplay/Accordion/utils/StandardImageList.tsx +0 -70
  48. package/src/components/Navigation/Sidebar/DropdownItem.tsx +0 -34
  49. package/src/stories/DataDisplay/Accordion.stories.tsx +0 -62
package/.prettierrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "bracketSpacing": true,
3
+ "singleQuote": true,
4
+ "trailingComma": "all",
5
+ "useTabs": false,
6
+ "bracketSameLine": false
7
+ }
8
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/react-blueprint",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
4
  "main": "./export.ts",
5
5
  "private": false,
6
6
  "dependencies": {
@@ -10,6 +10,7 @@
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",
package/src/App.tsx CHANGED
@@ -1,30 +1,19 @@
1
- import { useState } from "react";
2
- import "./App.css";
3
- import Chips from "./components/DataDisplay/Chips/Chips";
4
- import { IconButtons } from "./components/Input/IconButtons/IconButtons";
5
- import {
6
- AppHeader,
7
- Button,
8
- SearchBar,
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
- label: "Chip1",
17
- value: 1,
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: "20px" }} variant="contained">
28
+ <Button sx={{ marginTop: '20px' }} variant="contained">
40
29
  Click Here to Login
41
30
  </Button>
42
31
  }
43
32
  />
44
- <SearchBar onSearch={() => {}} value={""} placeholder="Search by Name" />
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, "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;
@@ -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 { ActiveDevicesIcon } from "./IconComponents/ActiveDevicesIcon";
2
- import { AdminIcon } from "./IconComponents/AdminIcon";
3
- import { AdministratorIcon } from "./IconComponents/AdministratorIcon";
4
- import { ErrorFilledIcon } from "./IconComponents/AlertFilledIcon";
5
- import { AppsIcon } from "./IconComponents/AppsIcon";
6
- import { ArrowBackIcon } from "./IconComponents/ArrowBackIcon";
7
- import { BulbIcon } from "./IconComponents/BulbIcon";
8
- import { CampxFullLogoIcon } from "./IconComponents/CampxFullLogoIcon";
9
- import { CampxIcon } from "./IconComponents/CampxIcon";
10
- import { CareerIcon } from "./IconComponents/CareerIcon";
11
- import { CheckedCheckboxIcon } from "./IconComponents/CheckedCheckBoxIcon";
12
- import { CheckedRadioIcon } from "./IconComponents/CheckedRadioIcon";
13
- import { ClogWheelIcon } from "./IconComponents/ClogWheelIcon";
14
- import { CollapseIcon } from "./IconComponents/CollapseIcon";
15
- import { CommutexIcon } from "./IconComponents/CommutexIcon";
16
- import { CompletedStateIcon } from "./IconComponents/CompletedStateIcon";
17
- import { CrossIcon } from "./IconComponents/CrossIcon";
18
- import { CrossIcon2 } from "./IconComponents/CrossIcon2";
19
- import { DashBoardIcon } from "./IconComponents/DashBoardIcon";
20
- import { DeleteIcon } from "./IconComponents/DeleteIcon";
21
- import { DeviceIcon } from "./IconComponents/DeviceIcon";
22
- import { EditIcon } from "./IconComponents/EditIcon";
23
- import { EnrollxIcon } from "./IconComponents/EnrollxIcon";
24
- import { ExamResultIcon } from "./IconComponents/ExamResultIcon";
25
- import { ExamxIcon } from "./IconComponents/ExamxIcon";
26
- import { ExpandIcon } from "./IconComponents/ExpandIcon";
27
- import { ExportIcon } from "./IconComponents/ExportIcon";
28
- import { FilterIcon } from "./IconComponents/FilterIcon";
29
- import { HelpIcon } from "./IconComponents/HelpIcon";
30
- import { HomeIcon } from "./IconComponents/HomeIcon";
31
- import { HostelxIcon } from "./IconComponents/HostelxIcon";
32
- import { InfoFilledIcon } from "./IconComponents/InfoFilledIcon";
33
- import { InfoIcon } from "./IconComponents/InfoIcon";
34
- import { InstitutionsIcon } from "./IconComponents/InstitutionsIcon";
35
- import { LeftIcon } from "./IconComponents/LeftIcon";
36
- import { LocationIcon } from "./IconComponents/LocationIcon";
37
- import { LogoutIcon } from "./IconComponents/LogoutIcon";
38
- import { NavigationIcon } from "./IconComponents/NavigationIcon";
39
- import { NotificationIcon } from "./IconComponents/NotificationIcon";
40
- import { PayxIcon } from "./IconComponents/PayxIcon";
41
- import { PeoplexIcon } from "./IconComponents/PeoplexIcon";
42
- import { ProductFeaturesIcon } from "./IconComponents/ProductFeaturesIcon";
43
- import { ProfileIcon } from "./IconComponents/ProfileIcon";
44
- import { RedirectIcon } from "./IconComponents/RedirectIcon";
45
- import { RedoIcon } from "./IconComponents/RedoIcon";
46
- import { RightIcon } from "./IconComponents/RightIcon";
47
- import { SaveIcon } from "./IconComponents/SaveIcon";
48
- import { SearchIcon } from "./IconComponents/SearchIcon";
49
- import { ShareIcon } from "./IconComponents/ShareIcon";
50
- import { SuccessFilledIcon } from "./IconComponents/SuccessFilledIcon";
51
- import { TicketsIcon } from "./IconComponents/TicketsIcon";
52
- import { UmsIcon } from "./IconComponents/UmsIcon";
53
- import { UnCheckedCheckboxIcon } from "./IconComponents/UncheckCheckBoxIcon";
54
- import { UnCheckedRadioIcon } from "./IconComponents/UncheckedRadioIcon";
55
- import { ViewIcon } from "./IconComponents/ViewIcon";
56
- import { VisibilityOffIcon } from "./IconComponents/VisibiityOffIcon";
57
- import { VisibilityIcon } from "./IconComponents/VisibilityIcon";
58
- import { WarningFilledIcon } from "./IconComponents/WarningFilledIcon";
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
- barGap?: number;
30
- barSize?: number;
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.primary,
96
+ color: theme.palette.text.secondary,
91
97
  }}
92
98
  contentStyle={{
93
- color: theme.palette.text.secondary,
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.dark}
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 type="number" stroke={theme.palette.primary.dark}>
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 type="number" stroke={theme.palette.primary.dark}>
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.dark}
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.primary,
77
+ color: theme.palette.text.secondary,
78
78
  }}
79
79
  contentStyle={{
80
- color: theme.palette.text.secondary,
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.dark}
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 type="number" stroke={theme.palette.primary.dark}>
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}
@@ -52,11 +52,12 @@ export const PieChart = ({
52
52
  {showToolTip && (
53
53
  <Tooltip
54
54
  itemStyle={{
55
- color: theme.palette.text.primary,
55
+ color: theme.palette.text.secondary,
56
56
  }}
57
57
  contentStyle={{
58
- color: theme.palette.text.secondary,
58
+ color: theme.palette.text.primary,
59
59
  backgroundColor: theme.palette.background.paper,
60
+ borderColor: theme.palette.border.primary,
60
61
  borderRadius: "5px",
61
62
  padding: "5px 10px",
62
63
  }}
@@ -146,6 +146,7 @@ const CustomTooltip = ({ active, payload }: any) => {
146
146
 
147
147
  export const StyledContainer = styled(Box)(({ theme }) => ({
148
148
  backgroundColor: theme.palette.background.paper,
149
+ borderColor: theme.palette.border.primary,
149
150
  borderRadius: "5px",
150
151
  padding: "5px 10px",
151
152
  }));
@@ -0,0 +1,4 @@
1
+ export * from "./BarChart/BarChart";
2
+ export * from "./LineChart/LineChart";
3
+ export * from "./TreeMap/TreeMap";
4
+ export * from "./PieChart/PieChart";
@@ -30,6 +30,16 @@ export type LabelProps = {
30
30
  angle?: number;
31
31
  };
32
32
 
33
+ export type BaseAxisProps = {
34
+ xAxis?: TickProps;
35
+ yAxis?: TickProps;
36
+ };
37
+
38
+ export type TickProps = {
39
+ angle?: number;
40
+ tickMargin?: number;
41
+ };
42
+
33
43
  export type LegendProps = {
34
44
  width?: number;
35
45
  height?: number;
@@ -38,6 +48,6 @@ export type LegendProps = {
38
48
  verticalAlign?: VerticalAlignmentType;
39
49
  iconSize?: number;
40
50
  iconType?: IconType;
41
- margin: MarginProps;
42
- className: string;
51
+ margin?: MarginProps;
52
+ className?: string;
43
53
  };