@campxdev/react-blueprint 1.1.8 → 1.1.10

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 (209) hide show
  1. package/package.json +2 -2
  2. package/src/AppContent.tsx +6 -6
  3. package/src/assets/fonts/heebo/index.ts +2 -2
  4. package/src/assets/fonts/poppins/index.ts +5 -5
  5. package/src/assets/images/gif/index.ts +4 -0
  6. package/src/assets/images/gif/upload-file.gif +0 -0
  7. package/src/assets/images/gif/uploading-file.gif +0 -0
  8. package/src/components/Assets/ErrorPages/InternalServerError.tsx +7 -7
  9. package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +7 -7
  10. package/src/components/Assets/ErrorPages/NoItemFound.tsx +7 -7
  11. package/src/components/Assets/ErrorPages/PageNotFound.tsx +5 -5
  12. package/src/components/Assets/ErrorPages/UnAuthorized.tsx +6 -6
  13. package/src/components/Assets/ErrorPages/styles.tsx +15 -15
  14. package/src/components/Assets/Icons/IconComponents/AcademicIcon.tsx +7 -1
  15. package/src/components/Assets/Icons/IconComponents/ActiveDevicesIcon.tsx +1 -1
  16. package/src/components/Assets/Icons/IconComponents/AdminIcon.tsx +1 -1
  17. package/src/components/Assets/Icons/IconComponents/AdministratorIcon.tsx +1 -1
  18. package/src/components/Assets/Icons/IconComponents/AlertFilledIcon.tsx +1 -1
  19. package/src/components/Assets/Icons/IconComponents/ArrowBackIcon.tsx +1 -1
  20. package/src/components/Assets/Icons/IconComponents/AttachmentIcon.tsx +32 -0
  21. package/src/components/Assets/Icons/IconComponents/BulbIcon.tsx +1 -1
  22. package/src/components/Assets/Icons/IconComponents/CampxFullLogoIcon.tsx +3 -3
  23. package/src/components/Assets/Icons/IconComponents/CampxIcon.tsx +2 -2
  24. package/src/components/Assets/Icons/IconComponents/CareerIcon.tsx +1 -1
  25. package/src/components/Assets/Icons/IconComponents/CheckedCheckBoxIcon.tsx +1 -1
  26. package/src/components/Assets/Icons/IconComponents/CheckedRadioIcon.tsx +1 -1
  27. package/src/components/Assets/Icons/IconComponents/ClogWheelIcon.tsx +1 -1
  28. package/src/components/Assets/Icons/IconComponents/CollapseIcon.tsx +1 -1
  29. package/src/components/Assets/Icons/IconComponents/CrossIcon.tsx +1 -1
  30. package/src/components/Assets/Icons/IconComponents/DashBoardIcon.tsx +1 -1
  31. package/src/components/Assets/Icons/IconComponents/DeleteIcon.tsx +1 -1
  32. package/src/components/Assets/Icons/IconComponents/DeviceIcon.tsx +1 -1
  33. package/src/components/Assets/Icons/IconComponents/DocumentIcon.tsx +52 -0
  34. package/src/components/Assets/Icons/IconComponents/DownloadIcon.tsx +52 -0
  35. package/src/components/Assets/Icons/IconComponents/EditIcon.tsx +1 -1
  36. package/src/components/Assets/Icons/IconComponents/ExamResultIcon.tsx +1 -1
  37. package/src/components/Assets/Icons/IconComponents/ExcelIcon.tsx +56 -0
  38. package/src/components/Assets/Icons/IconComponents/ExpandIcon.tsx +1 -1
  39. package/src/components/Assets/Icons/IconComponents/ExportIcon.tsx +1 -1
  40. package/src/components/Assets/Icons/IconComponents/FilterIcon.tsx +1 -1
  41. package/src/components/Assets/Icons/IconComponents/HelpIcon.tsx +1 -1
  42. package/src/components/Assets/Icons/IconComponents/HomeIcon.tsx +1 -1
  43. package/src/components/Assets/Icons/IconComponents/ImageIcon.tsx +44 -0
  44. package/src/components/Assets/Icons/IconComponents/InfoFilledIcon.tsx +1 -1
  45. package/src/components/Assets/Icons/IconComponents/InfoIcon.tsx +1 -1
  46. package/src/components/Assets/Icons/IconComponents/InstitutionsIcon.tsx +1 -1
  47. package/src/components/Assets/Icons/IconComponents/LeftIcon.tsx +1 -1
  48. package/src/components/Assets/Icons/IconComponents/LocationIcon.tsx +1 -1
  49. package/src/components/Assets/Icons/IconComponents/LogoutIcon.tsx +2 -2
  50. package/src/components/Assets/Icons/IconComponents/NavigationIcon.tsx +1 -1
  51. package/src/components/Assets/Icons/IconComponents/NoteIcon.tsx +7 -1
  52. package/src/components/Assets/Icons/IconComponents/NotificationIcon.tsx +1 -1
  53. package/src/components/Assets/Icons/IconComponents/PdfIcon.tsx +52 -0
  54. package/src/components/Assets/Icons/IconComponents/ProductFeaturesIcon.tsx +1 -1
  55. package/src/components/Assets/Icons/IconComponents/ProfileIcon.tsx +1 -1
  56. package/src/components/Assets/Icons/IconComponents/RedirectIcon.tsx +1 -1
  57. package/src/components/Assets/Icons/IconComponents/RedoIcon.tsx +1 -1
  58. package/src/components/Assets/Icons/IconComponents/RightIcon.tsx +1 -1
  59. package/src/components/Assets/Icons/IconComponents/SaveIcon.tsx +39 -39
  60. package/src/components/Assets/Icons/IconComponents/SearchIcon.tsx +1 -1
  61. package/src/components/Assets/Icons/IconComponents/ShareIcon.tsx +1 -1
  62. package/src/components/Assets/Icons/IconComponents/SuccessFilledIcon.tsx +1 -1
  63. package/src/components/Assets/Icons/IconComponents/TicketsIcon.tsx +1 -1
  64. package/src/components/Assets/Icons/IconComponents/UncheckCheckBoxIcon.tsx +1 -1
  65. package/src/components/Assets/Icons/IconComponents/UncheckedRadioIcon.tsx +1 -1
  66. package/src/components/Assets/Icons/IconComponents/ViewIcon.tsx +1 -1
  67. package/src/components/Assets/Icons/IconComponents/VisibiityOffIcon.tsx +1 -1
  68. package/src/components/Assets/Icons/IconComponents/VisibilityIcon.tsx +1 -1
  69. package/src/components/Assets/Icons/IconComponents/WarningFilledIcon.tsx +1 -1
  70. package/src/components/Assets/Icons/Icons.tsx +12 -0
  71. package/src/components/Assets/export.ts +6 -6
  72. package/src/components/Charts/BarChart/BarChart.tsx +17 -19
  73. package/src/components/Charts/LineChart/LineChart.tsx +12 -14
  74. package/src/components/Charts/PieChart/PieChart.tsx +8 -8
  75. package/src/components/Charts/TreeMap/TreeMap.tsx +15 -15
  76. package/src/components/Charts/export.ts +4 -4
  77. package/src/components/Charts/types/types.ts +3 -3
  78. package/src/components/DataDisplay/Accordion/Accordion.tsx +2 -0
  79. package/src/components/DataDisplay/Avatar/Avatar.tsx +14 -3
  80. package/src/components/DataDisplay/Card/Card.tsx +18 -18
  81. package/src/components/DataDisplay/Card/styles.tsx +24 -25
  82. package/src/components/DataDisplay/Chips/Chips.tsx +14 -14
  83. package/src/components/DataDisplay/DataTable/DataTable.tsx +4 -1
  84. package/src/components/DataDisplay/DataTable/TablePagination.tsx +10 -10
  85. package/src/components/DataDisplay/SidePanel/SidePanel.tsx +1 -1
  86. package/src/components/DataDisplay/Typography/Typography.tsx +1 -1
  87. package/src/components/Feedback/Alert/Alert.tsx +8 -8
  88. package/src/components/Feedback/Snackbar/Snackbar.tsx +27 -27
  89. package/src/components/Feedback/Spinner/Spinner.tsx +2 -2
  90. package/src/components/Feedback/Tooltip/Tooltip.tsx +6 -6
  91. package/src/components/Feedback/Tutorial/Tutorial.tsx +45 -45
  92. package/src/components/Feedback/export.ts +5 -0
  93. package/src/components/Image/Image.tsx +8 -8
  94. package/src/components/Input/Button/Button.tsx +2 -2
  95. package/src/components/Input/DatePicker/DatePicker.tsx +18 -4
  96. package/src/components/Input/FormActions/FormActions.tsx +15 -4
  97. package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +20 -5
  98. package/src/components/Input/HelpButton/HelpButton.stories.tsx +9 -9
  99. package/src/components/Input/HelpButton/HelpButton.tsx +4 -4
  100. package/src/components/Input/IconButtons/IconButtons/DeleteButton.tsx +2 -2
  101. package/src/components/Input/IconButtons/IconButtons/EditButton.tsx +2 -2
  102. package/src/components/Input/IconButtons/IconButtons/RedirectButton.tsx +2 -2
  103. package/src/components/Input/IconButtons/IconButtons/ViewButton.tsx +2 -2
  104. package/src/components/Input/LabelWrapper/LabelWrapper.tsx +5 -5
  105. package/src/components/Input/MultiCheckBox/MultiCheckBox.tsx +6 -6
  106. package/src/components/Input/OtpInput/OtpInput.tsx +17 -17
  107. package/src/components/Input/PasswordField/PasswordField.tsx +8 -8
  108. package/src/components/Input/RadioGroup/RadioGroup.tsx +5 -5
  109. package/src/components/Input/SearchBar/SearchBar.tsx +20 -20
  110. package/src/components/Input/SingleCheckBox/SIngleCheckBox.tsx +5 -5
  111. package/src/components/Input/SingleSelect/SingleSelect.tsx +39 -6
  112. package/src/components/Input/Switch/Switch.tsx +1 -1
  113. package/src/components/Input/TextField/TextField.tsx +3 -3
  114. package/src/components/Input/TimePicker/TimePicker.tsx +18 -4
  115. package/src/components/Input/components/FetchingOptionsLoader.tsx +3 -3
  116. package/src/components/Input/styles.tsx +6 -6
  117. package/src/components/Layout/AppHeader/AppHeader.tsx +10 -12
  118. package/src/components/Layout/AppHeader/AppHeaderActions/CogWheelMenu.tsx +5 -5
  119. package/src/components/Layout/AppHeader/AppHeaderActions/HeaderActions.tsx +6 -6
  120. package/src/components/Layout/AppHeader/AppHeaderActions/SwitchInstitution.tsx +37 -37
  121. package/src/components/Layout/AppHeader/AppHeaderActions/UserBox.tsx +28 -28
  122. package/src/components/Layout/AppHeader/styles/styles.tsx +24 -24
  123. package/src/components/Layout/PageHeader/PageHeader.tsx +8 -3
  124. package/src/components/Layout/TabsLayout/Tabs.tsx +16 -16
  125. package/src/components/Layout/TabsLayout/TabsLayout.tsx +6 -6
  126. package/src/components/Layout/export.ts +4 -0
  127. package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +35 -23
  128. package/src/components/Navigation/ConfirmDialog/ConfirmDialog.tsx +43 -48
  129. package/src/components/Navigation/Dialog/Dialog.tsx +33 -0
  130. package/src/components/Navigation/DialogButton/DialogButton.tsx +17 -81
  131. package/src/components/Navigation/DropDownMenu/DropDownButton.tsx +4 -4
  132. package/src/components/Navigation/DropDownMenu/DropDownIcon.tsx +4 -4
  133. package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +8 -8
  134. package/src/components/Navigation/DropDownMenu/DropdownMenuItem.tsx +3 -3
  135. package/src/components/Navigation/DropDownMenu/styles.tsx +13 -13
  136. package/src/components/Navigation/PreviewFiles/PreviewFiles.tsx +165 -0
  137. package/src/components/Navigation/Sidebar/Components.tsx +18 -18
  138. package/src/components/Navigation/Sidebar/MenuItem.tsx +1 -1
  139. package/src/components/Navigation/Sidebar/SubMenuItem.tsx +2 -1
  140. package/src/components/Navigation/Sidebar/interfaces.ts +1 -1
  141. package/src/components/Navigation/Sidebar/styles.tsx +64 -64
  142. package/src/components/Navigation/Stepper/Stepper.tsx +5 -5
  143. package/src/components/Navigation/Stepper/StepperComponents.tsx +15 -15
  144. package/src/components/Navigation/TabsContainer/TabsContainer.tsx +4 -4
  145. package/src/components/Navigation/UploadDialog/LoadingUploadDialogContainer.tsx +23 -0
  146. package/src/components/Navigation/UploadDialog/Styles.tsx +34 -0
  147. package/src/components/Navigation/UploadDialog/UploadDialog.tsx +143 -0
  148. package/src/components/Navigation/UploadDialog/UploadDialogContainer.tsx +82 -0
  149. package/src/components/Navigation/{exports.ts → export.ts} +4 -0
  150. package/src/components/export.ts +7 -7
  151. package/src/index.tsx +2 -2
  152. package/src/store/activeStore.ts +1 -1
  153. package/src/stories/Assets/Icons.stories.tsx +6 -6
  154. package/src/stories/Charts/BarChart.stories.tsx +56 -56
  155. package/src/stories/Charts/LineChart.stories.tsx +49 -49
  156. package/src/stories/Charts/PieChart.stories.tsx +53 -53
  157. package/src/stories/Charts/Treemap.stories.tsx +122 -122
  158. package/src/stories/DataDisplay/AccordionGroup.stories.tsx +11 -12
  159. package/src/stories/DataDisplay/Card.stories.tsx +34 -34
  160. package/src/stories/DataDisplay/Chips.stories.tsx +10 -10
  161. package/src/stories/DataDisplay/CircularAvatar.stories.tsx +6 -6
  162. package/src/stories/DataDisplay/DataTable.stories.tsx +32 -32
  163. package/src/stories/DataDisplay/SidePanel.stories.tsx +14 -14
  164. package/src/stories/DataDisplay/SquareAvatar.stories.tsx +15 -15
  165. package/src/stories/DesignSystem/colorTokens.stories.tsx +10 -10
  166. package/src/stories/DesignSystem/typography.stories.tsx +19 -19
  167. package/src/stories/Feedback/Alert.stories.tsx +9 -9
  168. package/src/stories/Feedback/Snackbar.stories.tsx +11 -11
  169. package/src/stories/Feedback/Spinner.stories.tsx +4 -4
  170. package/src/stories/Feedback/Tooltip.stories.tsx +5 -5
  171. package/src/stories/Feedback/Tutorial.stories.tsx +13 -13
  172. package/src/stories/Input/Button.stories.tsx +26 -26
  173. package/src/stories/Input/DatePicker.stories.tsx +48 -8
  174. package/src/stories/Input/IconButtons.stories.tsx +6 -6
  175. package/src/stories/Input/MultiCheckBox.stories.tsx +15 -15
  176. package/src/stories/Input/OtpInput.stories.tsx +5 -5
  177. package/src/stories/Input/Password.stories.tsx +7 -7
  178. package/src/stories/Input/RadioGroup.stories.tsx +14 -14
  179. package/src/stories/Input/SearchBar.stories.tsx +10 -10
  180. package/src/stories/Input/SingleCheckBox.stories.tsx +7 -7
  181. package/src/stories/Input/SingleSelect.stories.tsx +47 -47
  182. package/src/stories/Input/Switch.stories.tsx +22 -22
  183. package/src/stories/Input/TextField.stories.tsx +47 -47
  184. package/src/stories/Input/TimePicker.stories.tsx +44 -7
  185. package/src/stories/Layout/AppHeader.stories.tsx +13 -13
  186. package/src/stories/Layout/TabsLayout.stories.tsx +24 -24
  187. package/src/stories/Navigation/ConfirmDialog.stories.tsx +12 -2
  188. package/src/stories/Navigation/DialogButton.stories.tsx +38 -45
  189. package/src/stories/Navigation/DropDownMenu.stories.tsx +24 -24
  190. package/src/stories/Navigation/FloatingSidebar.stories.tsx +23 -23
  191. package/src/stories/Navigation/ImportDialog.stories.tsx +45 -0
  192. package/src/stories/Navigation/PreviewFiles.stories.tsx +80 -0
  193. package/src/stories/Navigation/Stepper.stories.tsx +15 -15
  194. package/src/stories/Navigation/TabsContainer.stories.tsx +11 -11
  195. package/src/themes/MuiThemeProvider.tsx +3 -3
  196. package/src/themes/colorTokens/colorPalette.tsx +38 -38
  197. package/src/themes/colorTokens/darkColorTokens.tsx +1 -1
  198. package/src/themes/colorTokens/lightColorTokens.ts +1 -1
  199. package/src/themes/commonTheme.ts +13 -3
  200. package/src/themes/customCssBaseline.ts +2 -2
  201. package/src/themes/darkTheme.ts +4 -4
  202. package/src/themes/export.ts +3 -3
  203. package/src/themes/lightTheme.ts +4 -4
  204. package/src/utils/constants.ts +5 -5
  205. package/src/utils/logout.ts +8 -8
  206. package/src/components/Feedback/exports.ts +0 -5
  207. package/src/components/Layout/exports.ts +0 -4
  208. package/src/stories/Navigation/Breadcrumbs.stories.tsx +0 -34
  209. package/src/utils/campxAxios.ts +0 -18
@@ -1,4 +1,4 @@
1
- import { Stack, SxProps, Typography, useTheme } from "@mui/material";
1
+ import { Stack, SxProps, Typography, useTheme } from '@mui/material';
2
2
  import {
3
3
  Bar,
4
4
  CartesianGrid,
@@ -8,15 +8,15 @@ import {
8
8
  Tooltip,
9
9
  XAxis,
10
10
  YAxis,
11
- } from "recharts";
11
+ } from 'recharts';
12
12
  import {
13
13
  AxisLabelProps,
14
14
  BaseAxisProps,
15
15
  CartesianGridProps,
16
16
  LegendProps,
17
17
  MarginProps,
18
- } from "../types/types";
19
- import { LayoutType } from "recharts/types/util/types";
18
+ } from '../types/types';
19
+ import { LayoutType } from 'recharts/types/util/types';
20
20
 
21
21
  export type BarChartProps = {
22
22
  title?: string;
@@ -47,14 +47,14 @@ type BarItem = {
47
47
  };
48
48
 
49
49
  export const BarChart = ({
50
- title = "Bar Chart",
50
+ title = 'Bar Chart',
51
51
  titleSx,
52
52
  width = 700,
53
53
  height = 500,
54
54
  margin,
55
- layout = "horizontal",
55
+ layout = 'horizontal',
56
56
  dataKey,
57
- domain = [0, "auto"],
57
+ domain = [0, 'auto'],
58
58
  data,
59
59
  bars,
60
60
  barGap = 10,
@@ -68,20 +68,20 @@ export const BarChart = ({
68
68
  containerSx,
69
69
  }: BarChartProps) => {
70
70
  const { showCartesianGrid, size } = cartesianGrid;
71
- const isVerticalLayout = layout === "vertical";
71
+ const isVerticalLayout = layout === 'vertical';
72
72
  const { xLabel, yLabel } = axisLabelProps ?? {};
73
73
  const theme = useTheme();
74
74
 
75
75
  return (
76
- <Stack alignItems={"center"} sx={{ ...containerSx }} width={"fit-content"}>
77
- <Typography variant={"h5"} align={"center"} sx={{ ...titleSx }}>
76
+ <Stack alignItems={'center'} sx={{ ...containerSx }} width={'fit-content'}>
77
+ <Typography variant={'h5'} align={'center'} sx={{ ...titleSx }}>
78
78
  {title}
79
79
  </Typography>
80
80
  <ReBarChart
81
81
  width={width}
82
82
  height={height}
83
83
  margin={margin}
84
- layout={isVerticalLayout ? "horizontal" : "vertical"}
84
+ layout={isVerticalLayout ? 'horizontal' : 'vertical'}
85
85
  data={data}
86
86
  barGap={barGap}
87
87
  barSize={barSize}
@@ -91,7 +91,7 @@ export const BarChart = ({
91
91
  )}
92
92
  {showToolTip && (
93
93
  <Tooltip
94
- cursor={{ fill: theme.palette.secondary.light, fillOpacity: "50%" }}
94
+ cursor={{ fill: theme.palette.secondary.light, fillOpacity: '50%' }}
95
95
  itemStyle={{
96
96
  color: theme.palette.text.secondary,
97
97
  }}
@@ -99,15 +99,13 @@ export const BarChart = ({
99
99
  color: theme.palette.text.primary,
100
100
  backgroundColor: theme.palette.background.paper,
101
101
  borderColor: theme.palette.border.primary,
102
- borderRadius: "5px",
103
- padding: "5px 10px",
102
+ borderRadius: '5px',
103
+ padding: '5px 10px',
104
104
  }}
105
105
  />
106
106
  )}
107
107
  {showLegend && <Legend {...legendSx} />}
108
- {bars?.map((item, index) => (
109
- <Bar key={index} {...item} />
110
- ))}
108
+ {bars?.map((item, index) => <Bar key={index} {...item} />)}
111
109
  {isVerticalLayout ? (
112
110
  <>
113
111
  <XAxis
@@ -134,7 +132,7 @@ export const BarChart = ({
134
132
  {yLabel && (
135
133
  <Label
136
134
  offset={10}
137
- position={"insideLeft"}
135
+ position={'insideLeft'}
138
136
  {...yLabel}
139
137
  angle={yLabel.angle ?? -90}
140
138
  dx={yLabel?.dx}
@@ -168,7 +166,7 @@ export const BarChart = ({
168
166
  {yLabel && (
169
167
  <Label
170
168
  offset={10}
171
- position={"insideLeft"}
169
+ position={'insideLeft'}
172
170
  {...yLabel}
173
171
  angle={yLabel.angle ?? -90}
174
172
  dx={yLabel?.dx}
@@ -1,4 +1,4 @@
1
- import { Box, Stack, SxProps, Typography, useTheme } from "@mui/material";
1
+ import { Box, Stack, SxProps, Typography, useTheme } from '@mui/material';
2
2
  import {
3
3
  Bar,
4
4
  CartesianGrid,
@@ -9,14 +9,14 @@ import {
9
9
  Tooltip,
10
10
  XAxis,
11
11
  YAxis,
12
- } from "recharts";
12
+ } from 'recharts';
13
13
  import {
14
14
  AxisLabelProps,
15
15
  CartesianGridProps,
16
16
  LegendProps,
17
17
  MarginProps,
18
- } from "../types/types";
19
- import { CurveType } from "recharts/types/shape/Curve";
18
+ } from '../types/types';
19
+ import { CurveType } from 'recharts/types/shape/Curve';
20
20
 
21
21
  export type LineChartProps = {
22
22
  title?: string;
@@ -43,7 +43,7 @@ type LineItem = {
43
43
  };
44
44
 
45
45
  export const LineChart = ({
46
- title = "Line Chart",
46
+ title = 'Line Chart',
47
47
  titleSx,
48
48
  width = 700,
49
49
  height = 500,
@@ -63,8 +63,8 @@ export const LineChart = ({
63
63
  const theme = useTheme();
64
64
 
65
65
  return (
66
- <Stack alignItems={"center"} sx={containerSx}>
67
- <Typography variant={"h5"} align={"center"} sx={titleSx}>
66
+ <Stack alignItems={'center'} sx={containerSx}>
67
+ <Typography variant={'h5'} align={'center'} sx={titleSx}>
68
68
  {title}
69
69
  </Typography>
70
70
  <ReLineChart width={width} height={height} margin={margin} data={data}>
@@ -80,15 +80,15 @@ export const LineChart = ({
80
80
  color: theme.palette.text.primary,
81
81
  backgroundColor: theme.palette.background.paper,
82
82
  borderColor: theme.palette.border.primary,
83
- borderRadius: "5px",
84
- padding: "5px 10px",
83
+ borderRadius: '5px',
84
+ padding: '5px 10px',
85
85
  }}
86
86
  />
87
87
  )}
88
88
  {showLegend && <Legend {...legendSx} />}
89
89
 
90
90
  <XAxis
91
- padding={"gap"}
91
+ padding={'gap'}
92
92
  type="category"
93
93
  dataKey={dataKey}
94
94
  stroke={theme.palette.border.primary}
@@ -108,7 +108,7 @@ export const LineChart = ({
108
108
  {yLabel && (
109
109
  <Label
110
110
  offset={10}
111
- position={"insideLeft"}
111
+ position={'insideLeft'}
112
112
  {...yLabel}
113
113
  angle={yLabel.angle ?? -90}
114
114
  dx={yLabel?.dx}
@@ -116,9 +116,7 @@ export const LineChart = ({
116
116
  />
117
117
  )}
118
118
  </YAxis>
119
- {lines?.map((item, index) => (
120
- <Line key={index} {...item} />
121
- ))}
119
+ {lines?.map((item, index) => <Line key={index} {...item} />)}
122
120
  </ReLineChart>
123
121
  </Stack>
124
122
  );
@@ -1,6 +1,6 @@
1
- import { Stack, SxProps, Typography, useTheme } from "@mui/material";
2
- import { Cell, Legend, Pie, PieChart as RePieChart, Tooltip } from "recharts";
3
- import { LegendProps, MarginProps } from "../types/types";
1
+ import { Stack, SxProps, Typography, useTheme } from '@mui/material';
2
+ import { Cell, Legend, Pie, PieChart as RePieChart, Tooltip } from 'recharts';
3
+ import { LegendProps, MarginProps } from '../types/types';
4
4
 
5
5
  export type PieChartProps = {
6
6
  title?: string;
@@ -29,7 +29,7 @@ type PieProps = {
29
29
  };
30
30
 
31
31
  export const PieChart = ({
32
- title = "Pie Chart",
32
+ title = 'Pie Chart',
33
33
  titleSx,
34
34
  margin,
35
35
  width = 500,
@@ -58,13 +58,13 @@ export const PieChart = ({
58
58
  color: theme.palette.text.primary,
59
59
  backgroundColor: theme.palette.background.paper,
60
60
  borderColor: theme.palette.border.primary,
61
- borderRadius: "5px",
62
- padding: "5px 10px",
61
+ borderRadius: '5px',
62
+ padding: '5px 10px',
63
63
  }}
64
64
  />
65
65
  )}
66
66
  {showLegend && <Legend {...legendSx} />}
67
- <Pie {...pie1} cx={pie1?.cx ?? "50%"} cy={pie1?.cy ?? "50%"}>
67
+ <Pie {...pie1} cx={pie1?.cx ?? '50%'} cy={pie1?.cy ?? '50%'}>
68
68
  {pie1?.data.map((entry, index) => (
69
69
  <Cell
70
70
  key={`cell-${index}`}
@@ -77,7 +77,7 @@ export const PieChart = ({
77
77
  ))}
78
78
  </Pie>
79
79
  {pie2 && (
80
- <Pie {...pie2} cx={pie2?.cx ?? "50%"} cy={pie2?.cy ?? "50%"}>
80
+ <Pie {...pie2} cx={pie2?.cx ?? '50%'} cy={pie2?.cy ?? '50%'}>
81
81
  {pie2?.data.map((entry, index) => (
82
82
  <Cell
83
83
  key={`cell-${index}`}
@@ -5,10 +5,10 @@ import {
5
5
  SxProps,
6
6
  Typography,
7
7
  useTheme,
8
- } from "@mui/material";
9
- import { Treemap as ReTreeMap, Tooltip } from "recharts";
10
- import { AnimationTiming } from "recharts/types/util/types";
11
- import { MarginProps } from "../types/types";
8
+ } from '@mui/material';
9
+ import { Treemap as ReTreeMap, Tooltip } from 'recharts';
10
+ import { AnimationTiming } from 'recharts/types/util/types';
11
+ import { MarginProps } from '../types/types';
12
12
 
13
13
  interface TreeMapProps {
14
14
  title?: string;
@@ -30,25 +30,25 @@ interface TreeMapProps {
30
30
  }
31
31
 
32
32
  const TreeMap = ({
33
- title = "Tree Map",
33
+ title = 'Tree Map',
34
34
  titleSx,
35
35
  data,
36
36
  dataKey,
37
37
  width = 400,
38
38
  height = 200,
39
39
  aspectRatio,
40
- fill = "#F8C12D",
41
- stroke = "#fff",
40
+ fill = '#F8C12D',
41
+ stroke = '#fff',
42
42
  colors,
43
43
  showToolTip = true,
44
- animationEasing = "linear",
44
+ animationEasing = 'linear',
45
45
  isAnimationActive = false,
46
46
  treeMapStyle,
47
47
  containerSx,
48
48
  }: TreeMapProps) => {
49
49
  return (
50
- <Stack alignItems={"center"} sx={{ ...containerSx }}>
51
- <Typography variant={"h5"} align={"center"} sx={{ ...titleSx }}>
50
+ <Stack alignItems={'center'} sx={{ ...containerSx }}>
51
+ <Typography variant={'h5'} align={'center'} sx={{ ...titleSx }}>
52
52
  {title}
53
53
  </Typography>
54
54
  <ReTreeMap
@@ -101,7 +101,7 @@ const CustomizedContent = (props: any) => {
101
101
  ? colors[
102
102
  Math.floor((index / root.children.length) * colors.length)
103
103
  ]
104
- : "#ffffff00",
104
+ : '#ffffff00',
105
105
  stroke: theme.palette.surface.grey,
106
106
  strokeWidth: 2,
107
107
  strokeOpacity: 1,
@@ -132,9 +132,9 @@ const CustomTooltip = ({ active, payload }: any) => {
132
132
  <Typography variant="caption">
133
133
  <span>{`${payload[0].payload.name}`}</span>
134
134
  <span
135
- style={{ fontWeight: "bold", color: theme.palette.text.primary }}
135
+ style={{ fontWeight: 'bold', color: theme.palette.text.primary }}
136
136
  >
137
- {"\xa0\xa0" + `${payload[0].value}`}
137
+ {'\xa0\xa0' + `${payload[0].value}`}
138
138
  </span>
139
139
  </Typography>
140
140
  </StyledContainer>
@@ -147,6 +147,6 @@ const CustomTooltip = ({ active, payload }: any) => {
147
147
  export const StyledContainer = styled(Box)(({ theme }) => ({
148
148
  backgroundColor: theme.palette.background.paper,
149
149
  borderColor: theme.palette.border.primary,
150
- borderRadius: "5px",
151
- padding: "5px 10px",
150
+ borderRadius: '5px',
151
+ padding: '5px 10px',
152
152
  }));
@@ -1,4 +1,4 @@
1
- export * from "./BarChart/BarChart";
2
- export * from "./LineChart/LineChart";
3
- export * from "./TreeMap/TreeMap";
4
- export * from "./PieChart/PieChart";
1
+ export * from './BarChart/BarChart';
2
+ export * from './LineChart/LineChart';
3
+ export * from './TreeMap/TreeMap';
4
+ export * from './PieChart/PieChart';
@@ -1,10 +1,10 @@
1
- import { SxProps } from "@mui/material";
1
+ import { SxProps } from '@mui/material';
2
2
  import {
3
3
  HorizontalAlignmentType,
4
4
  IconType,
5
5
  VerticalAlignmentType,
6
- } from "recharts/types/component/DefaultLegendContent";
7
- import { LayoutType } from "recharts/types/util/types";
6
+ } from 'recharts/types/component/DefaultLegendContent';
7
+ import { LayoutType } from 'recharts/types/util/types';
8
8
 
9
9
  export type CartesianGridProps = {
10
10
  showCartesianGrid: boolean;
@@ -23,9 +23,11 @@ export type AccordionProps = {
23
23
  export const Accordion = (props: AccordionProps) => {
24
24
  const { index, expanded, title, content, actions, onChange, ...restProps } =
25
25
  props;
26
+
26
27
  return (
27
28
  <MuiAccordion
28
29
  key={index}
30
+ onChange={onChange}
29
31
  expanded={typeof expanded == 'number' ? expanded === index : expanded}
30
32
  {...restProps}
31
33
  >
@@ -1,4 +1,9 @@
1
- import { Avatar as MuiAvatar, AvatarProps as MuiAvatarProps, styled, useTheme } from '@mui/material';
1
+ import {
2
+ Avatar as MuiAvatar,
3
+ AvatarProps as MuiAvatarProps,
4
+ styled,
5
+ useTheme,
6
+ } from '@mui/material';
2
7
  import { Typography } from '../Typography/Typography';
3
8
 
4
9
  export type CircularAvatarProps = {
@@ -33,7 +38,11 @@ export type SquareAvatarProps = {
33
38
  onlyStartLetters: boolean;
34
39
  } & Omit<MuiAvatarProps, 'sx'>;
35
40
 
36
- export const SquareAvatar = ({ onlyStartLetters = false, text, ...rest }: SquareAvatarProps) => {
41
+ export const SquareAvatar = ({
42
+ onlyStartLetters = false,
43
+ text,
44
+ ...rest
45
+ }: SquareAvatarProps) => {
37
46
  const stringAvatar = (text: string) => {
38
47
  if (!text) return '';
39
48
  return text
@@ -53,7 +62,9 @@ export const SquareAvatar = ({ onlyStartLetters = false, text, ...rest }: Square
53
62
 
54
63
  return (
55
64
  <StyledSquareAvatar variant="square" {...rest}>
56
- <Typography variant="h6">{onlyStartLetters ? stringAvatar(text) : text}</Typography>
65
+ <Typography variant="h6">
66
+ {onlyStartLetters ? stringAvatar(text) : text}
67
+ </Typography>
57
68
  </StyledSquareAvatar>
58
69
  );
59
70
  };
@@ -1,4 +1,4 @@
1
- import { ChevronRight, MoreHoriz } from "@mui/icons-material";
1
+ import { ChevronRight, MoreHoriz } from '@mui/icons-material';
2
2
 
3
3
  import {
4
4
  CardContent,
@@ -7,10 +7,10 @@ import {
7
7
  Stack,
8
8
  SxProps,
9
9
  Typography,
10
- } from "@mui/material";
11
- import { Variant } from "@mui/material/styles/createTypography";
12
- import { ReactNode } from "react";
13
- import { DropDownIcon, DropdownMenu } from "../../export";
10
+ } from '@mui/material';
11
+ import { Variant } from '@mui/material/styles/createTypography';
12
+ import { ReactNode } from 'react';
13
+ import { DropDownIcon, DropdownMenu } from '../../export';
14
14
  import {
15
15
  StyledButton,
16
16
  StyledCardActions,
@@ -20,7 +20,7 @@ import {
20
20
  StyledImage,
21
21
  StyledStack,
22
22
  StyledStatusText,
23
- } from "./styles";
23
+ } from './styles';
24
24
 
25
25
  export interface CardProps {
26
26
  title: string;
@@ -35,7 +35,7 @@ export interface CardProps {
35
35
  {
36
36
  title: string;
37
37
  value: string;
38
- }
38
+ },
39
39
  ];
40
40
  titleProps?: {
41
41
  variant: Variant;
@@ -69,10 +69,10 @@ export const Card = ({
69
69
  headerSx,
70
70
  moreOptions,
71
71
  titleProps = {
72
- variant: "subtitle2",
72
+ variant: 'subtitle2',
73
73
  },
74
74
  captionProps = {
75
- variant: "caption",
75
+ variant: 'caption',
76
76
  },
77
77
  icon,
78
78
  menu = [],
@@ -85,14 +85,14 @@ export const Card = ({
85
85
  <MuiCard sx={cardSx}>
86
86
  {imageSrc && <StyledImage src={imageSrc} alt="Card image" />}
87
87
  <StyledHeader sx={headerSx}>
88
- <Stack gap={"8px"} flexDirection={"row"}>
88
+ <Stack gap={'8px'} flexDirection={'row'}>
89
89
  {checkBox && (
90
90
  <StyledStack>
91
91
  <Checkbox />
92
92
  </StyledStack>
93
93
  )}
94
94
 
95
- <Stack justifyContent={"center"}>
95
+ <Stack justifyContent={'center'}>
96
96
  <Typography variant={titleProps.variant} sx={titleProps.sx}>
97
97
  {title}
98
98
  </Typography>
@@ -101,10 +101,10 @@ export const Card = ({
101
101
  </Typography>
102
102
  </Stack>
103
103
  </Stack>
104
- <Stack flexDirection={"row"} gap={"12px"} alignItems={"center"}>
104
+ <Stack flexDirection={'row'} gap={'12px'} alignItems={'center'}>
105
105
  {status && (
106
106
  <StyledStatusText variant="label2" sx={statusSx}>
107
- {status}{" "}
107
+ {status}{' '}
108
108
  </StyledStatusText>
109
109
  )}
110
110
  {moreOptions && (
@@ -117,7 +117,7 @@ export const Card = ({
117
117
  icon: (
118
118
  <StyledIcon>{icon ? icon : <MoreHoriz />}</StyledIcon>
119
119
  ),
120
- iconProps: { color: "secondary" },
120
+ iconProps: { color: 'secondary' },
121
121
  outlined: false,
122
122
  }}
123
123
  />
@@ -132,9 +132,9 @@ export const Card = ({
132
132
  <CardContent>
133
133
  <Stack
134
134
  sx={{
135
- display: "grid",
136
- gridTemplateColumns: "1fr 1fr",
137
- gap: "20px",
135
+ display: 'grid',
136
+ gridTemplateColumns: '1fr 1fr',
137
+ gap: '20px',
138
138
  }}
139
139
  >
140
140
  {fields.map((field, index) => (
@@ -157,7 +157,7 @@ export const Card = ({
157
157
  onClick={handleClick}
158
158
  endIcon={footer?.endIcon ?? <ChevronRight />}
159
159
  >
160
- {footer?.buttonText ?? "View"}
160
+ {footer?.buttonText ?? 'View'}
161
161
  </StyledButton>
162
162
  </StyledCardActions>
163
163
  )}
@@ -9,50 +9,49 @@ import {
9
9
  Stack,
10
10
  styled,
11
11
  Typography,
12
- } from "@mui/material";
12
+ } from '@mui/material';
13
13
 
14
14
  export const StyledCardActions = styled(CardActions)(({ theme }) => ({
15
15
  //${} add border color
16
16
  borderTop: `1px solid ${theme.palette.border.primary}`,
17
- padding: "0",
17
+ padding: '0',
18
18
  }));
19
19
 
20
20
  export const StyledButton = styled(Button)(({ theme }) => ({
21
- display: "flex",
22
- alignItems: "center",
23
- justifyContent: "space-between",
24
- width: "100%",
25
- padding: "8px 16px",
26
-
21
+ display: 'flex',
22
+ alignItems: 'center',
23
+ justifyContent: 'space-between',
24
+ width: '100%',
25
+ padding: '8px 16px',
27
26
  }));
28
27
 
29
- export const StyledImage = styled("img")(({ theme }) => ({
30
- height: "216px",
31
- width: "385px",
32
- objectFit: "cover",
28
+ export const StyledImage = styled('img')(({ theme }) => ({
29
+ height: '216px',
30
+ width: '385px',
31
+ objectFit: 'cover',
33
32
  }));
34
33
 
35
34
  export const StyledHeader = styled(Stack)(({ theme }) => ({
36
- padding: "12px 16px",
37
- flexDirection: "row",
38
- justifyContent: "space-between",
39
- alignItems: "center",
35
+ padding: '12px 16px',
36
+ flexDirection: 'row',
37
+ justifyContent: 'space-between',
38
+ alignItems: 'center',
40
39
  }));
41
40
 
42
41
  export const StyledStack = styled(Stack)(({ theme }) => ({
43
- width: "50px",
44
- height: "50px",
42
+ width: '50px',
43
+ height: '50px',
45
44
  backgroundColor: theme.palette.surface.grey,
46
- borderRadius: "50%",
47
- justifyContent: "center",
48
- alignItems: "center",
45
+ borderRadius: '50%',
46
+ justifyContent: 'center',
47
+ alignItems: 'center',
49
48
  }));
50
49
 
51
50
  export const StyledStatusText = styled(Typography)(({ theme }) => ({
52
51
  color: theme.palette.highlight.highlightBlue,
53
- padding: "5px 10px",
52
+ padding: '5px 10px',
54
53
  backgroundColor: theme.palette.highlight.blueBackground,
55
- borderRadius: "4px",
54
+ borderRadius: '4px',
56
55
  }));
57
56
 
58
57
  export const StyledIcon = styled(IconButton)(({ theme }) => ({
@@ -60,6 +59,6 @@ export const StyledIcon = styled(IconButton)(({ theme }) => ({
60
59
  }));
61
60
 
62
61
  export const StyledDivider = styled(Divider)(({ theme }) => ({
63
- orientation: "vertical",
64
- border: "1px solid #CECECE",
62
+ orientation: 'vertical',
63
+ border: '1px solid #CECECE',
65
64
  }));
@@ -1,11 +1,11 @@
1
- import { Chip, Stack, styled } from "@mui/material";
2
- import { ReactNode, useEffect, useState } from "react";
1
+ import { Chip, Stack, styled } from '@mui/material';
2
+ import { ReactNode, useEffect, useState } from 'react';
3
3
 
4
4
  interface ChipsProps {
5
5
  list: { label: string | ReactNode; value: string | number }[];
6
6
  selected: string[] | string | number;
7
7
  onSelected: (selected: string[] | string | number) => void;
8
- direction?: "row" | "column";
8
+ direction?: 'row' | 'column';
9
9
  singleSelection?: boolean;
10
10
  toggle?: boolean;
11
11
  }
@@ -14,12 +14,12 @@ export default function Chips({
14
14
  list = [],
15
15
  selected: _selected,
16
16
  onSelected,
17
- direction = "row",
17
+ direction = 'row',
18
18
  singleSelection = true,
19
19
  toggle = false,
20
20
  }: ChipsProps) {
21
21
  const [selected, setSelected] = useState<string | number | string[]>(
22
- singleSelection ? "" : []
22
+ singleSelection ? '' : [],
23
23
  );
24
24
 
25
25
  useEffect(() => {
@@ -29,8 +29,8 @@ export default function Chips({
29
29
  const handleChange = (value: string | number) => {
30
30
  if (singleSelection) {
31
31
  if (selected === value && !toggle) {
32
- setSelected("");
33
- onSelected("");
32
+ setSelected('');
33
+ onSelected('');
34
34
  } else {
35
35
  setSelected(value);
36
36
  onSelected(value);
@@ -42,7 +42,7 @@ export default function Chips({
42
42
 
43
43
  if (selectedStr.includes(valueStr)) {
44
44
  const newSelected = selected.filter(
45
- (item) => item.toString() !== valueStr
45
+ (item) => item.toString() !== valueStr,
46
46
  );
47
47
  setSelected(newSelected);
48
48
  onSelected(newSelected);
@@ -69,7 +69,7 @@ export default function Chips({
69
69
  color="primary"
70
70
  label={item.label}
71
71
  clickable
72
- variant={isSelected(item.value) ? "outlined" : "filled"}
72
+ variant={isSelected(item.value) ? 'outlined' : 'filled'}
73
73
  onClick={() => handleChange(item.value)}
74
74
  />
75
75
  ))}
@@ -78,14 +78,14 @@ export default function Chips({
78
78
  }
79
79
 
80
80
  const StyledChip = styled(Chip)(({ theme }) => ({
81
- minWidth: "100px",
81
+ minWidth: '100px',
82
82
  color: theme.palette.text.primary,
83
83
  background: theme.palette.surface.grey,
84
- "&.MuiButtonBase-root.MuiChip-filled": {
84
+ '&.MuiButtonBase-root.MuiChip-filled': {
85
85
  borderColor: theme.palette.primary.main,
86
86
  },
87
- height: "40px",
88
- fontSize: "14px",
87
+ height: '40px',
88
+ fontSize: '14px',
89
89
  fontWeight: 500,
90
- borderRadius: "20px",
90
+ borderRadius: '20px',
91
91
  }));
@@ -1,5 +1,8 @@
1
1
  import { Stack, styled } from '@mui/material';
2
- import { DataGrid as MuiDataGrid, DataGridProps as MuiDataGridProps } from '@mui/x-data-grid';
2
+ import {
3
+ DataGrid as MuiDataGrid,
4
+ DataGridProps as MuiDataGridProps,
5
+ } from '@mui/x-data-grid';
3
6
  import { DataGridContainer } from '../styles';
4
7
  import { TablePagination } from './TablePagination';
5
8