@campxdev/react-blueprint 0.1.15 → 0.1.17

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 (62) hide show
  1. package/.storybook/preview.tsx +3 -3
  2. package/package.json +15 -14
  3. package/src/components/DataDisplay/DataTable/DataTable.stories.tsx +34 -17
  4. package/src/components/DataDisplay/DataTable/DataTable.tsx +32 -7
  5. package/src/components/DataDisplay/DataTable/TablePagination.tsx +60 -6
  6. package/src/components/DataDisplay/styles.tsx +2 -0
  7. package/src/components/DropDownMenu/DropDownButton.tsx +3 -25
  8. package/src/components/DropDownMenu/DropDownMenu.stories.tsx +34 -31
  9. package/src/components/DropDownMenu/DropDownMenu.tsx +4 -4
  10. package/src/components/DropDownMenu/DropdownMenuItem.tsx +25 -0
  11. package/src/components/DropDownMenu/styles.tsx +1 -7
  12. package/src/components/Icons/IconComponents/AppsIcon.tsx +36 -0
  13. package/src/components/Icons/IconComponents/CareerIcon.tsx +24 -0
  14. package/src/components/Icons/IconComponents/ClogWheelIcon.tsx +38 -0
  15. package/src/components/Icons/IconComponents/DashBoardIcon.tsx +65 -0
  16. package/src/components/Icons/IconComponents/ExamResultIcon.tsx +26 -0
  17. package/src/components/Icons/IconComponents/HelpIcon.tsx +57 -0
  18. package/src/components/Icons/IconComponents/HomeIcon.tsx +52 -0
  19. package/src/components/Icons/IconComponents/LeftIcon.tsx +72 -0
  20. package/src/components/Icons/IconComponents/LogoutIcon.tsx +66 -0
  21. package/src/components/Icons/IconComponents/NotificationIcon.tsx +29 -0
  22. package/src/components/Icons/IconComponents/RightIcon.tsx +65 -0
  23. package/src/components/Icons/IconComponents/TicketsIcon.tsx +74 -0
  24. package/src/components/Icons/Icons.stories.tsx +21 -0
  25. package/src/components/Icons/Icons.tsx +14 -0
  26. package/src/components/Icons/export.ts +26 -0
  27. package/src/components/Input/Button/Button.tsx +10 -8
  28. package/src/components/Input/LabelWrapper/LabelWrapper.tsx +35 -0
  29. package/src/components/Input/SingleSelect/SingleSelect.stories.tsx +85 -36
  30. package/src/components/Input/SingleSelect/SingleSelect.tsx +17 -69
  31. package/src/components/Input/TextField/TextField.tsx +9 -5
  32. package/src/components/Input/components/FetchingOptionsLoader.tsx +16 -4
  33. package/src/components/Input/styles.tsx +9 -1
  34. package/src/components/Layout/Header/AppHeader.stories.tsx +5 -5
  35. package/src/components/Layout/Header/AppsMenu.tsx +2 -2
  36. package/src/components/Layout/Header/HeaderActions/CogWheelMenu.tsx +4 -4
  37. package/src/components/Layout/Header/HeaderActions/HeaderActions.tsx +2 -2
  38. package/src/components/Layout/Header/HeaderActions/UserBox.tsx +33 -18
  39. package/src/components/Layout/LayoutWrapper/LayoutWrapper.stories.tsx +33 -8
  40. package/src/components/Layout/LayoutWrapper/LayoutWrapper.tsx +3 -3
  41. package/src/components/Layout/LayoutWrapper/styles.tsx +1 -1
  42. package/src/components/Layout/PageContent/PageContent.stories.tsx +26 -0
  43. package/src/components/Layout/PageContent/PageContent.tsx +8 -2
  44. package/src/components/Layout/SideNavigation/SideNavigation.stories.tsx +57 -0
  45. package/src/components/Layout/SideNavigation/SideNavigation.tsx +28 -18
  46. package/src/components/Layout/SideNavigation/styles/styles.tsx +7 -2
  47. package/src/components/Layout/Spinner/Spinner.css +1 -1
  48. package/src/components/Layout/Spinner/Spinner.stories.tsx +1 -1
  49. package/src/components/Layout/Spinner/Spinner.tsx +1 -1
  50. package/src/components/Modals/DialogButton.tsx +1 -1
  51. package/src/components/TabsContainer/TabsContainer.stories.tsx +48 -0
  52. package/src/components/TabsContainer/TabsContainer.tsx +58 -0
  53. package/src/components/export.ts +1 -0
  54. package/src/themes/commonTheme.ts +60 -20
  55. package/src/themes/darkTheme.ts +2 -3
  56. package/src/themes/lightTheme.ts +2 -3
  57. package/src/utils/campxAxios.ts +1 -1
  58. package/tsconfig.json +1 -3
  59. package/types/theme.d.ts +41 -0
  60. package/src/assets/images/icons.tsx +0 -427
  61. package/src/components/DropDownMenu/MenuItemButton.tsx +0 -24
  62. package/src/components/Input/Label/Label.tsx +0 -11
@@ -0,0 +1,65 @@
1
+ import { useTheme } from "@mui/material";
2
+
3
+ export const DashBoardIcon = () => {
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="16"
10
+ height="16"
11
+ viewBox="0 0 16 16"
12
+ style={{
13
+ stroke: color,
14
+ }}
15
+ >
16
+ <g
17
+ id="vuesax_linear_chart-2"
18
+ data-name="vuesax/linear/chart-2"
19
+ transform="translate(-236 -188)"
20
+ >
21
+ <g id="chart-2" transform="translate(236 188)">
22
+ <path
23
+ id="Vector"
24
+ d="M4.667,13.333h4c3.333,0,4.667-1.333,4.667-4.667v-4C13.333,1.333,12,0,8.667,0h-4C1.333,0,0,1.333,0,4.667v4C0,12,1.333,13.333,4.667,13.333Z"
25
+ transform="translate(1.333 1.333)"
26
+ fill="none"
27
+ stroke={color}
28
+ stroke-linecap="round"
29
+ stroke-linejoin="round"
30
+ stroke-width="1.2"
31
+ />
32
+ <path
33
+ id="Vector-2"
34
+ data-name="Vector"
35
+ d="M1.333,8.667A1.337,1.337,0,0,0,2.667,7.333v-6A1.333,1.333,0,0,0,0,1.333v6A1.333,1.333,0,0,0,1.333,8.667Z"
36
+ transform="translate(9 3.667)"
37
+ fill="none"
38
+ stroke={color}
39
+ stroke-linecap="round"
40
+ stroke-linejoin="round"
41
+ stroke-width="1.2"
42
+ />
43
+ <path
44
+ id="Vector-3"
45
+ data-name="Vector"
46
+ d="M1.333,5A1.337,1.337,0,0,0,2.667,3.667V1.333A1.333,1.333,0,0,0,0,1.333V3.667A1.333,1.333,0,0,0,1.333,5Z"
47
+ transform="translate(4.333 7.333)"
48
+ fill="none"
49
+ stroke={color}
50
+ stroke-linecap="round"
51
+ stroke-linejoin="round"
52
+ stroke-width="1.2"
53
+ />
54
+ <path
55
+ id="Vector-4"
56
+ data-name="Vector"
57
+ d="M0,0H16V16H0Z"
58
+ fill="none"
59
+ opacity="0"
60
+ />
61
+ </g>
62
+ </g>
63
+ </svg>
64
+ );
65
+ };
@@ -0,0 +1,26 @@
1
+ import { useTheme } from "@mui/material";
2
+
3
+ export const ExamResultIcon = () => {
4
+ const theme = useTheme();
5
+ const color = theme.palette.text.primary;
6
+ return (
7
+ <>
8
+ <svg
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ width="14.3"
11
+ height="20.3"
12
+ viewBox="0 0 15.3 20.3"
13
+ style={{
14
+ fill: color,
15
+ }}
16
+ >
17
+ <path
18
+ id="mobile"
19
+ d="M13.833,0H7.167A4.172,4.172,0,0,0,3,4.167V15.833A4.172,4.172,0,0,0,7.167,20h6.667A4.172,4.172,0,0,0,18,15.833V4.167A4.172,4.172,0,0,0,13.833,0Zm2.5,15.833a2.5,2.5,0,0,1-2.5,2.5h-2.5V17.5a.833.833,0,1,0-1.667,0v.833h-2.5a2.5,2.5,0,0,1-2.5-2.5V4.167a2.5,2.5,0,0,1,2.5-2.5h6.667a2.5,2.5,0,0,1,2.5,2.5Zm-2.5-2.5a.833.833,0,0,1-.833.833H8A.833.833,0,1,1,8,12.5h5A.833.833,0,0,1,13.833,13.333Zm-5-2.5A.833.833,0,0,0,9.667,10V9.167h1.667V10A.833.833,0,0,0,13,10V6.667a2.5,2.5,0,1,0-5,0V10A.833.833,0,0,0,8.833,10.833Zm1.667-5a.833.833,0,0,1,.833.833V7.5H9.667V6.667A.833.833,0,0,1,10.5,5.833Z"
20
+ transform="translate(-2.85 0.15)"
21
+ stroke-width="0.3"
22
+ />
23
+ </svg>
24
+ </>
25
+ );
26
+ };
@@ -0,0 +1,57 @@
1
+ import { useTheme } from "@mui/material";
2
+
3
+ export const HelpIcon = () => {
4
+ const theme = useTheme();
5
+ const color = theme.palette.text.primary;
6
+ return (
7
+ <svg
8
+ id="message-question"
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ width="20"
11
+ height="20"
12
+ viewBox="0 0 20 20"
13
+ style={{
14
+ stroke: color,
15
+ }}
16
+ >
17
+ <g id="message-question-2" data-name="message-question">
18
+ <path
19
+ id="Vector"
20
+ d="M12.5,16.667H4.1A3.877,3.877,0,0,1,0,12.593V4.074A3.893,3.893,0,0,1,4.167,0H12.5a3.893,3.893,0,0,1,4.167,4.074v8.52A3.893,3.893,0,0,1,12.5,16.667Z"
21
+ transform="translate(1.667 2.025)"
22
+ fill="none"
23
+ stroke-linecap="round"
24
+ stroke-linejoin="round"
25
+ stroke-width="1.5"
26
+ />
27
+ <path
28
+ id="Vector-2"
29
+ data-name="Vector"
30
+ d="M2.245,6.086V5.8A2.119,2.119,0,0,1,3.382,4,2.073,2.073,0,0,0,4.491,2.245,2.245,2.245,0,0,0,0,2.245"
31
+ transform="translate(7.755 5.594)"
32
+ fill="none"
33
+ stroke-linecap="round"
34
+ stroke-linejoin="round"
35
+ stroke-width="1.5"
36
+ />
37
+ <path
38
+ id="Vector-3"
39
+ data-name="Vector"
40
+ d="M0,0H20V20H0Z"
41
+ fill="none"
42
+ opacity="0"
43
+ />
44
+ <path
45
+ id="Vector-4"
46
+ data-name="Vector"
47
+ d="M.5.5H.508"
48
+ transform="translate(9.499 14.414)"
49
+ fill="none"
50
+ stroke-linecap="round"
51
+ stroke-linejoin="round"
52
+ stroke-width="1.5"
53
+ />
54
+ </g>
55
+ </svg>
56
+ );
57
+ };
@@ -0,0 +1,52 @@
1
+ import { useTheme } from "@mui/material";
2
+
3
+ export const HomeIcon = () => {
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="16"
10
+ height="16"
11
+ viewBox="0 0 16 16"
12
+ style={{
13
+ stroke: color,
14
+ }}
15
+ >
16
+ <g
17
+ id="vuesax_linear_home-2"
18
+ data-name="vuesax/linear/home-2"
19
+ transform="translate(-620 -188)"
20
+ >
21
+ <g id="home-2" transform="translate(620 188)">
22
+ <path
23
+ id="Vector"
24
+ d="M4.68.548l-3.593,2.8A3.172,3.172,0,0,0,0,5.562V10.5a2.817,2.817,0,0,0,2.807,2.813h7.72a2.815,2.815,0,0,0,2.807-2.807V5.655a3.149,3.149,0,0,0-1.2-2.3L8.013.468A2.991,2.991,0,0,0,4.68.548Z"
25
+ transform="translate(1.333 1.345)"
26
+ fill="none"
27
+ stroke-linecap="round"
28
+ stroke-linejoin="round"
29
+ stroke-width="1.2"
30
+ />
31
+ <path
32
+ id="Vector-2"
33
+ data-name="Vector"
34
+ d="M0,2V0"
35
+ transform="translate(8 9.993)"
36
+ fill="none"
37
+ stroke-linecap="round"
38
+ stroke-linejoin="round"
39
+ stroke-width="1.2"
40
+ />
41
+ <path
42
+ id="Vector-3"
43
+ data-name="Vector"
44
+ d="M0,0H16V16H0Z"
45
+ fill="none"
46
+ opacity="0"
47
+ />
48
+ </g>
49
+ </g>
50
+ </svg>
51
+ );
52
+ };
@@ -0,0 +1,72 @@
1
+ import { useTheme } from "@mui/material";
2
+
3
+ export const LeftIcon = () => {
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="24"
10
+ height="24"
11
+ viewBox="0 0 24 24"
12
+ style={{
13
+ stroke: color,
14
+ }}
15
+ >
16
+ <g
17
+ id="vuesax_linear_logout"
18
+ data-name="vuesax/linear/logout"
19
+ transform="translate(-364 -444)"
20
+ >
21
+ <g id="logout">
22
+ <g
23
+ id="Group_5120"
24
+ data-name="Group 5120"
25
+ transform="translate(373.659 453.381)"
26
+ >
27
+ <path
28
+ id="Vector"
29
+ d="M2.682,5.363,0,2.682,2.682,0"
30
+ transform="translate(0)"
31
+ fill="none"
32
+ stroke-linecap="round"
33
+ stroke-linejoin="round"
34
+ stroke-width="1.5"
35
+ />
36
+ <path
37
+ id="Vector-2"
38
+ data-name="Vector"
39
+ d="M10.653,0H0"
40
+ transform="translate(0.073 2.682)"
41
+ fill="none"
42
+ stroke-linecap="round"
43
+ stroke-linejoin="round"
44
+ stroke-width="1.5"
45
+ />
46
+ </g>
47
+ <path
48
+ id="Vector-3"
49
+ data-name="Vector"
50
+ d="M8.38,16.76A8.015,8.015,0,0,1,0,8.38,8.015,8.015,0,0,1,8.38,0"
51
+ transform="translate(367.374 447.62)"
52
+ fill="none"
53
+ stroke-linecap="round"
54
+ stroke-linejoin="round"
55
+ stroke-width="1.5"
56
+ />
57
+ <path
58
+ id="Vector-4"
59
+ data-name="Vector"
60
+ d="M0,0H24V24H0Z"
61
+ transform="translate(388 468) rotate(180)"
62
+ fill="none"
63
+ stroke-linecap="round"
64
+ stroke-linejoin="round"
65
+ stroke-width="1.5"
66
+ opacity="0"
67
+ />
68
+ </g>
69
+ </g>
70
+ </svg>
71
+ );
72
+ };
@@ -0,0 +1,66 @@
1
+ import { useTheme } from "@mui/material";
2
+ import { useState } from "react";
3
+
4
+ interface LogoutIconProps {
5
+ hoverColor?: string;
6
+ }
7
+
8
+ export const LogoutIcon: React.FC<LogoutIconProps> = ({ hoverColor }) => {
9
+ const theme = useTheme();
10
+ const [isHovered, setIsHovered] = useState(false);
11
+ const defaultColor = theme.palette.text.primary;
12
+
13
+ return (
14
+ <svg
15
+ xmlns="http://www.w3.org/2000/svg"
16
+ width="24"
17
+ height="24"
18
+ viewBox="0 0 24 24"
19
+ onMouseEnter={() => setIsHovered(true)}
20
+ onMouseLeave={() => setIsHovered(false)}
21
+ style={{
22
+ stroke: isHovered && hoverColor ? hoverColor : defaultColor,
23
+ }}
24
+ >
25
+ <g id="logout" transform="translate(0 0)">
26
+ <path
27
+ id="Vector"
28
+ d="M12.6,5.07C12.29,1.47,10.44,0,6.39,0H6.26C1.79,0,0,1.79,0,6.26v6.52c0,4.47,1.79,6.26,6.26,6.26h.13c4.02,0,5.87-1.45,6.2-4.99"
29
+ transform="translate(2.5 2.49)"
30
+ fill="none"
31
+ strokeLinecap="round"
32
+ strokeLinejoin="round"
33
+ strokeWidth="1.2"
34
+ />
35
+ <path
36
+ id="Vector-2"
37
+ data-name="Vector"
38
+ d="M0,0H11.38"
39
+ transform="translate(9 12)"
40
+ fill="none"
41
+ strokeLinecap="round"
42
+ strokeLinejoin="round"
43
+ strokeWidth="1.2"
44
+ />
45
+ <path
46
+ id="Vector-3"
47
+ data-name="Vector"
48
+ d="M0,0,3.35,3.35,0,6.7"
49
+ transform="translate(18.15 8.65)"
50
+ fill="none"
51
+ strokeLinecap="round"
52
+ strokeLinejoin="round"
53
+ strokeWidth="1.2"
54
+ />
55
+ <path
56
+ id="Vector-4"
57
+ data-name="Vector"
58
+ d="M0,24H24V0H0Z"
59
+ transform="translate(0 0)"
60
+ fill="none"
61
+ opacity="0"
62
+ />
63
+ </g>
64
+ </svg>
65
+ );
66
+ };
@@ -0,0 +1,29 @@
1
+ import { useTheme } from "@mui/material";
2
+
3
+ export const NotificationIcon = () => {
4
+ const theme = useTheme();
5
+ const color = theme.palette.text.primary;
6
+ return (
7
+ <>
8
+ <svg
9
+ xmlns="http://www.w3.org/2000/svg"
10
+ width="20"
11
+ height="20"
12
+ viewBox="0 0 20 20"
13
+ style={{
14
+ stroke: color,
15
+ }}
16
+ >
17
+ <path
18
+ id="bell_10_"
19
+ data-name="bell (10)"
20
+ d="M18.958,11.384l-1.583-5.7a7.767,7.767,0,0,0-15.064.395L1.085,11.595a4.166,4.166,0,0,0,4.067,5.07H6.08a4.166,4.166,0,0,0,8.166,0h.7a4.166,4.166,0,0,0,4.015-5.281Zm-8.795,6.948a2.5,2.5,0,0,1-2.346-1.666H12.51A2.5,2.5,0,0,1,10.163,18.332Zm6.771-4.32A2.481,2.481,0,0,1,14.944,15H5.152a2.5,2.5,0,0,1-2.44-3.042L3.937,6.444a6.1,6.1,0,0,1,11.832-.31l1.583,5.7a2.481,2.481,0,0,1-.418,2.181Z"
21
+ transform="translate(-0.95 -0.002)"
22
+ fill="none"
23
+ stroke-linecap="round"
24
+ stroke-linejoin="round"
25
+ />
26
+ </svg>
27
+ </>
28
+ );
29
+ };
@@ -0,0 +1,65 @@
1
+ import { useTheme } from "@mui/material";
2
+
3
+ export const RightIcon = () => {
4
+ const theme = useTheme();
5
+ const color = theme.palette.text.primary;
6
+ return (
7
+ <svg
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ id="vuesax_linear_logout"
10
+ data-name="vuesax/linear/logout"
11
+ width="24"
12
+ height="24"
13
+ viewBox="0 0 24 24"
14
+ style={{
15
+ stroke: color,
16
+ }}
17
+ >
18
+ <g id="logout">
19
+ <g
20
+ id="Group_5120"
21
+ data-name="Group 5120"
22
+ transform="translate(3.614 9.381)"
23
+ >
24
+ <path
25
+ id="Vector"
26
+ d="M0,5.363,2.682,2.682,0,0"
27
+ transform="translate(8.045)"
28
+ fill="none"
29
+ stroke-linecap="round"
30
+ stroke-linejoin="round"
31
+ stroke-width="1.5"
32
+ />
33
+ <path
34
+ id="Vector-2"
35
+ data-name="Vector"
36
+ d="M0,0H10.653"
37
+ transform="translate(0 2.682)"
38
+ fill="none"
39
+ stroke-linecap="round"
40
+ stroke-linejoin="round"
41
+ stroke-width="1.5"
42
+ />
43
+ </g>
44
+ <path
45
+ id="Vector-3"
46
+ data-name="Vector"
47
+ d="M0,16.76A8.015,8.015,0,0,0,8.38,8.38,8.015,8.015,0,0,0,0,0"
48
+ transform="translate(12.246 3.62)"
49
+ fill="none"
50
+ stroke-linecap="round"
51
+ stroke-linejoin="round"
52
+ stroke-width="1.5"
53
+ />
54
+ <path
55
+ id="Vector-4"
56
+ data-name="Vector"
57
+ d="M0,24H24V0H0Z"
58
+ transform="translate(0 0)"
59
+ fill="none"
60
+ opacity="0"
61
+ />
62
+ </g>
63
+ </svg>
64
+ );
65
+ };
@@ -0,0 +1,74 @@
1
+ import { useTheme } from "@mui/material";
2
+
3
+ export const TicketsIcon = () => {
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="16"
10
+ height="16"
11
+ viewBox="0 0 16 16"
12
+ >
13
+ <g
14
+ id="vuesax_linear_profile-add"
15
+ data-name="vuesax/linear/profile-add"
16
+ transform="translate(-364 -252)"
17
+ >
18
+ <g id="profile-add" transform="translate(364 252)">
19
+ <path
20
+ id="Vector"
21
+ d="M2.667,0H0"
22
+ transform="translate(9.667 13)"
23
+ fill="none"
24
+ stroke={color}
25
+ stroke-linecap="round"
26
+ stroke-linejoin="round"
27
+ stroke-width="1.2"
28
+ />
29
+ <path
30
+ id="Vector-2"
31
+ data-name="Vector"
32
+ d="M0,2.667V0"
33
+ transform="translate(11 11.667)"
34
+ fill="none"
35
+ stroke={color}
36
+ stroke-linecap="round"
37
+ stroke-linejoin="round"
38
+ stroke-width="1.2"
39
+ />
40
+ <path
41
+ id="Vector-3"
42
+ data-name="Vector"
43
+ d="M3.067,5.913a1.212,1.212,0,0,0-.22,0,2.957,2.957,0,1,1,.22,0Z"
44
+ transform="translate(5.04 1.333)"
45
+ fill="none"
46
+ stroke={color}
47
+ stroke-linecap="round"
48
+ stroke-linejoin="round"
49
+ stroke-width="1.2"
50
+ />
51
+ <path
52
+ id="Vector-4"
53
+ data-name="Vector"
54
+ d="M4.55,5.753a6.1,6.1,0,0,1-3.34-.92A2.187,2.187,0,0,1,1.21.92a6.511,6.511,0,0,1,6.673,0"
55
+ transform="translate(3.443 8.787)"
56
+ fill="none"
57
+ stroke={color}
58
+ stroke-linecap="round"
59
+ stroke-linejoin="round"
60
+ stroke-width="1.2"
61
+ />
62
+ <path
63
+ id="Vector-5"
64
+ data-name="Vector"
65
+ d="M0,0H16V16H0Z"
66
+ transform="translate(16 16) rotate(180)"
67
+ fill="none"
68
+ opacity="0"
69
+ />
70
+ </g>
71
+ </g>
72
+ </svg>
73
+ );
74
+ };
@@ -0,0 +1,21 @@
1
+ // Import React and other necessary elements
2
+ import { Meta, StoryObj } from "@storybook/react/*";
3
+
4
+ import IconsStory from "./Icons";
5
+
6
+ export default {
7
+ title: "Assets/Icons",
8
+ component: IconsStory,
9
+ tags: ["autodocs"],
10
+ argTypes: {},
11
+ } as Meta<typeof IconsStory>;
12
+
13
+ type Story = StoryObj<typeof IconsStory>;
14
+
15
+ export const Icon: Story = {
16
+ render: (args: any) => (
17
+ <>
18
+ <IconsStory />
19
+ </>
20
+ ),
21
+ };
@@ -0,0 +1,14 @@
1
+ import { Stack } from "@mui/material";
2
+ import { Icons } from "./export";
3
+
4
+ export const IconsStory = () => {
5
+ return (
6
+ <Stack gap={2} direction={"row"}>
7
+ {Object.values(Icons).map((Icon) => (
8
+ <Icon />
9
+ ))}
10
+ </Stack>
11
+ );
12
+ };
13
+
14
+ export default IconsStory;
@@ -0,0 +1,26 @@
1
+ import { AppsIcon } from "./IconComponents/AppsIcon";
2
+ import { CareerIcon } from "./IconComponents/CareerIcon";
3
+ import { ClogWheelIcon } from "./IconComponents/ClogWheelIcon";
4
+ import { DashBoardIcon } from "./IconComponents/DashBoardIcon";
5
+ import { ExamResultIcon } from "./IconComponents/ExamResultIcon";
6
+ import { HelpIcon } from "./IconComponents/HelpIcon";
7
+ import { HomeIcon } from "./IconComponents/HomeIcon";
8
+ import { LeftIcon } from "./IconComponents/LeftIcon";
9
+ import { LogoutIcon } from "./IconComponents/LogoutIcon";
10
+ import { NotificationIcon } from "./IconComponents/NotificationIcon";
11
+ import { RightIcon } from "./IconComponents/RightIcon";
12
+ import { TicketsIcon } from "./IconComponents/TicketsIcon";
13
+ export const Icons = {
14
+ AppsIcon: AppsIcon,
15
+ CareerIcon: CareerIcon,
16
+ ClogWheelIcon: ClogWheelIcon,
17
+ DashBoardIcon: DashBoardIcon,
18
+ HelpIcon: HelpIcon,
19
+ HomeIcon: HomeIcon,
20
+ LeftIcon: LeftIcon,
21
+ ExamResultIcon: ExamResultIcon,
22
+ NotificationIcon: NotificationIcon,
23
+ RightIcon: RightIcon,
24
+ LogoutIcon: LogoutIcon,
25
+ TicketsIcon: TicketsIcon,
26
+ };
@@ -6,12 +6,14 @@ import "./ButtonLoader.css";
6
6
 
7
7
  export type ButtonProps = { loading: boolean } & MuiButtonProps;
8
8
 
9
- export const Button = (props: ButtonProps) => {
10
- if (props.loading)
11
- return (
12
- <MuiButton {...props} onClick={() => {}}>
13
- <div className="buttonLoader"></div>
14
- </MuiButton>
15
- );
16
- return <MuiButton {...props} />;
9
+ export const Button = ({ loading = false, ...props }: ButtonProps) => {
10
+ return (
11
+ <MuiButton
12
+ {...props}
13
+ endIcon={loading ? <div className="buttonLoader"></div> : props.endIcon}
14
+ disabled={props.disabled || loading}
15
+ >
16
+ {props.children}
17
+ </MuiButton>
18
+ );
17
19
  };
@@ -0,0 +1,35 @@
1
+ import { Stack, StackProps, Typography, useTheme } from "@mui/material";
2
+ import { ReactNode } from "react";
3
+
4
+ export const LabelWrapper = ({
5
+ required,
6
+ name,
7
+ children,
8
+ containerProps,
9
+ label,
10
+ }: {
11
+ required: boolean;
12
+ name?: string;
13
+ label?: ReactNode | string;
14
+ children: ReactNode;
15
+ containerProps?: StackProps;
16
+ }) => {
17
+ const theme = useTheme();
18
+ return (
19
+ <Stack margin="15px 20px" {...containerProps} gap={1}>
20
+ {typeof label === "string" ? (
21
+ <Typography htmlFor={name} component="label" variant="label1">
22
+ {label}
23
+ {required && (
24
+ <span style={{ color: `${theme.palette.highlight.main}` }}>
25
+ {" *"}
26
+ </span>
27
+ )}
28
+ </Typography>
29
+ ) : (
30
+ label
31
+ )}
32
+ {children}
33
+ </Stack>
34
+ );
35
+ };