@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,33 +1,33 @@
1
- import MoreVertIcon from "@mui/icons-material/MoreVert";
2
- import { IconButton } from "@mui/material";
3
- import { Meta, StoryObj } from "@storybook/react";
4
- import { Icons } from "../../components/Assets/Icons/Icons";
5
- import { DropDownButton } from "../../components/Navigation/DropDownMenu/DropDownButton";
6
- import { DropDownIcon } from "../../components/Navigation/DropDownMenu/DropDownIcon";
1
+ import MoreVertIcon from '@mui/icons-material/MoreVert';
2
+ import { IconButton } from '@mui/material';
3
+ import { Meta, StoryObj } from '@storybook/react';
4
+ import { Icons } from '../../components/Assets/Icons/Icons';
5
+ import { DropDownButton } from '../../components/Navigation/DropDownMenu/DropDownButton';
6
+ import { DropDownIcon } from '../../components/Navigation/DropDownMenu/DropDownIcon';
7
7
  import {
8
8
  DropdownMenu,
9
9
  DropdownMenuProps,
10
- } from "../../components/Navigation/DropDownMenu/DropDownMenu";
11
- import { DropdownMenuItem } from "../../components/Navigation/DropDownMenu/DropdownMenuItem";
10
+ } from '../../components/Navigation/DropDownMenu/DropDownMenu';
11
+ import { DropdownMenuItem } from '../../components/Navigation/DropDownMenu/DropdownMenuItem';
12
12
 
13
13
  // Define the default export with Meta type including the component type
14
14
  const meta: Meta<typeof DropdownMenu> = {
15
- title: "Navigation/DropDownMenu",
15
+ title: 'Navigation/DropDownMenu',
16
16
  component: DropdownMenu,
17
- tags: ["autodocs"],
17
+ tags: ['autodocs'],
18
18
  argTypes: {
19
19
  anchor: {
20
20
  description:
21
- "A function that returns a React node used as the dropdown anchor. It provides a method to open the dropdown.",
22
- control: "object",
21
+ 'A function that returns a React node used as the dropdown anchor. It provides a method to open the dropdown.',
22
+ control: 'object',
23
23
  },
24
24
  menuProps: {
25
25
  description: 'Props to pass to the Menu component, except for "open".',
26
- control: "object",
26
+ control: 'object',
27
27
  },
28
28
  menuListProps: {
29
- description: "Props to pass to the MenuList component.",
30
- control: "object",
29
+ description: 'Props to pass to the MenuList component.',
30
+ control: 'object',
31
31
  },
32
32
  },
33
33
  };
@@ -52,14 +52,14 @@ export const Primary: Story = {
52
52
  menu: [
53
53
  <DropdownMenuItem
54
54
  icon={<Icons.HelpIcon />}
55
- label={"Register"}
55
+ label={'Register'}
56
56
  onClick={() => {}}
57
57
  />,
58
58
 
59
- <DropdownMenuItem label={"Active Devices"} onClick={() => {}} />,
59
+ <DropdownMenuItem label={'Active Devices'} onClick={() => {}} />,
60
60
  ],
61
61
  menuListProps: {
62
- sx: { width: "20px" },
62
+ sx: { width: '20px' },
63
63
  },
64
64
  },
65
65
  };
@@ -81,15 +81,15 @@ export const WithButtonLoading: Story = {
81
81
  menu: [
82
82
  <DropdownMenuItem
83
83
  icon={<Icons.HelpIcon />}
84
- label={"Register"}
84
+ label={'Register'}
85
85
  onClick={() => {
86
- window.open("/payment", "_blank");
86
+ window.open('/payment', '_blank');
87
87
  }}
88
88
  />,
89
89
 
90
90
  <DropdownMenuItem
91
91
  icon={<Icons.HelpIcon />}
92
- label={"Register"}
92
+ label={'Register'}
93
93
  onClick={() => {}}
94
94
  />,
95
95
  ],
@@ -105,9 +105,9 @@ export const WithDefaultIcon: Story = {
105
105
  ),
106
106
  menu: [
107
107
  <DropdownMenuItem
108
- label={"Student Payments"}
108
+ label={'Student Payments'}
109
109
  onClick={() => {
110
- window.open("/payment", "_blank");
110
+ window.open('/payment', '_blank');
111
111
  }}
112
112
  />,
113
113
  ],
@@ -127,7 +127,7 @@ export const WithIcon: Story = {
127
127
  <MoreVertIcon />
128
128
  </IconButton>
129
129
  ),
130
- iconProps: { color: "secondary" },
130
+ iconProps: { color: 'secondary' },
131
131
  outlined: false,
132
132
  }}
133
133
  />
@@ -1,29 +1,29 @@
1
- import { Box } from "@mui/material";
2
- import { Meta, StoryObj } from "@storybook/react";
3
- import { Icons, Sidebar } from "../../components/export";
1
+ import { Box } from '@mui/material';
2
+ import { Meta, StoryObj } from '@storybook/react';
3
+ import { Icons, Sidebar } from '../../components/export';
4
4
 
5
5
  // Define the default export Sidebar Meta type including the component type
6
6
  const meta: Meta<typeof Sidebar> = {
7
- title: "Navigation/FloatingSidebar",
7
+ title: 'Navigation/FloatingSidebar',
8
8
  component: Sidebar,
9
9
  decorators: [
10
10
  (Story) => (
11
11
  <Box
12
12
  sx={{
13
- display: "flex",
14
- width: "100vw",
15
- height: "100vh",
16
- overflow: "hidden",
17
- position: "relative",
13
+ display: 'flex',
14
+ width: '100vw',
15
+ height: '100vh',
16
+ overflow: 'hidden',
17
+ position: 'relative',
18
18
  }}
19
19
  >
20
20
  <Story />
21
21
  </Box>
22
22
  ),
23
23
  ],
24
- tags: ["autodocs"],
24
+ tags: ['autodocs'],
25
25
  parameters: {
26
- layout: "fullscreen", // Ensures that the story takes the full screen
26
+ layout: 'fullscreen', // Ensures that the story takes the full screen
27
27
  },
28
28
  };
29
29
 
@@ -31,28 +31,28 @@ export default meta;
31
31
  type Story = StoryObj<typeof Sidebar>;
32
32
 
33
33
  const mainMenu = [
34
- { name: "Admin", path: "/admin", icon: <Icons.AdminIcon size={20} /> },
35
- { name: "UMS", path: "/ums", icon: <Icons.UmsIcon size={20} /> },
34
+ { name: 'Admin', path: '/admin', icon: <Icons.AdminIcon size={20} /> },
35
+ { name: 'UMS', path: '/ums', icon: <Icons.UmsIcon size={20} /> },
36
36
  {
37
- name: "Payments",
38
- path: "/payments",
37
+ name: 'Payments',
38
+ path: '/payments',
39
39
  icon: <Icons.PayxIcon size={20} />,
40
40
  },
41
- { name: "Exams", path: "/exams", icon: <Icons.ExamxIcon size={20} /> },
42
- { name: "HRMS", path: "/hrms", icon: <Icons.PeoplexIcon size={20} /> },
41
+ { name: 'Exams', path: '/exams', icon: <Icons.ExamxIcon size={20} /> },
42
+ { name: 'HRMS', path: '/hrms', icon: <Icons.PeoplexIcon size={20} /> },
43
43
  {
44
- name: "Enroll",
45
- path: "/enroll",
44
+ name: 'Enroll',
45
+ path: '/enroll',
46
46
  icon: <Icons.EnrollxIcon size={20} />,
47
47
  },
48
48
  {
49
- name: "Commute",
50
- path: "/commute",
49
+ name: 'Commute',
50
+ path: '/commute',
51
51
  icon: <Icons.CommutexIcon size={20} />,
52
52
  },
53
53
  {
54
- name: "Hostels",
55
- path: "/hostels",
54
+ name: 'Hostels',
55
+ path: '/hostels',
56
56
  icon: <Icons.HostelxIcon size={20} />,
57
57
  },
58
58
  ];
@@ -0,0 +1,45 @@
1
+ // UploadDialog.stories.js
2
+ import { Button } from '@mui/material';
3
+ import { action } from '@storybook/addon-actions';
4
+ import { StoryFn } from '@storybook/react/*';
5
+ import { UploadDialog, UploadDialogProps } from '../../components/export';
6
+
7
+ export default {
8
+ title: 'Navigation/UploadDialog',
9
+ component: UploadDialog,
10
+ argTypes: {
11
+ anchor: { control: false },
12
+ onDialogOpen: { action: 'onDialogOpen' },
13
+ onDialogClose: { action: 'onDialogClose' },
14
+ onUpload: { action: 'onUpload' },
15
+ acceptFileType: { control: 'text' },
16
+ loading: { control: 'boolean' },
17
+ },
18
+ };
19
+
20
+ const Template: StoryFn<UploadDialogProps> = (args: any) => (
21
+ <UploadDialog
22
+ {...args}
23
+ anchor={({ open }: { open: () => void }) => (
24
+ <Button onClick={open}>Open Upload Dialog</Button>
25
+ )}
26
+ />
27
+ );
28
+
29
+ export const Default = Template.bind({});
30
+ Default.args = {
31
+ sampleFileUrl: 'https://example.com/sample-file.pdf',
32
+ onUpload: action('onUpload'),
33
+ };
34
+
35
+ export const Loading = Template.bind({});
36
+ Loading.args = {
37
+ ...Default.args,
38
+ loading: true,
39
+ };
40
+
41
+ export const AcceptFileType = Template.bind({});
42
+ AcceptFileType.args = {
43
+ ...Default.args,
44
+ acceptFileType: '.pdf',
45
+ };
@@ -0,0 +1,80 @@
1
+ import { Box } from '@mui/material';
2
+ import { Meta, StoryFn } from '@storybook/react';
3
+ import { useState } from 'react';
4
+ import { PreviewFiles, PreviewFilesProps } from '../../components/export';
5
+
6
+ export default {
7
+ title: 'Navigation/PreviewFiles',
8
+ component: PreviewFiles,
9
+ argTypes: {
10
+ files: { control: 'object' },
11
+ label: { control: 'text' },
12
+ },
13
+ } as Meta<PreviewFilesProps>;
14
+
15
+ const createTestFile = (name: string, type: string, size: number): File => {
16
+ return new File(['dummy content'], name, {
17
+ type: type,
18
+ lastModified: Date.now(),
19
+ });
20
+ };
21
+
22
+ const imageFile = createTestFile('image.jpg', 'image/jpeg', 1024 * 1024);
23
+ const pdfFile = createTestFile(
24
+ 'document.pdf',
25
+ 'application/pdf',
26
+ 2 * 1024 * 1024,
27
+ );
28
+ const excelFile = createTestFile(
29
+ 'spreadsheet.xlsx',
30
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
31
+ 512 * 1024,
32
+ );
33
+ const wordFile = createTestFile(
34
+ 'report.docx',
35
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
36
+ 3 * 1024 * 1024,
37
+ );
38
+ const txtFile = createTestFile('notes.txt', 'text/plain', 10 * 1024);
39
+
40
+ const Template: StoryFn<PreviewFilesProps> = (args) => {
41
+ const [files, setFiles] = useState<PreviewFilesProps['files']>(args.files);
42
+
43
+ const handleSetFiles: PreviewFilesProps['setFiles'] = (newFiles: any) => {
44
+ if (typeof newFiles === 'function') {
45
+ setFiles(newFiles(files));
46
+ } else {
47
+ setFiles(newFiles);
48
+ }
49
+ };
50
+
51
+ return (
52
+ <Box sx={{ width: '400px', padding: '20px' }}>
53
+ <PreviewFiles {...args} files={files} setFiles={handleSetFiles} />
54
+ </Box>
55
+ );
56
+ };
57
+
58
+ export const MultipleFiles = Template.bind({});
59
+ MultipleFiles.args = {
60
+ files: [imageFile, pdfFile, excelFile, wordFile, txtFile],
61
+ label: 'Multiple Files',
62
+ };
63
+
64
+ export const SingleFile = Template.bind({});
65
+ SingleFile.args = {
66
+ files: pdfFile,
67
+ label: 'Single File',
68
+ };
69
+
70
+ export const NoFile = Template.bind({});
71
+ NoFile.args = {
72
+ files: null,
73
+ label: 'No File',
74
+ };
75
+
76
+ export const CustomLabel = Template.bind({});
77
+ CustomLabel.args = {
78
+ files: [imageFile, pdfFile],
79
+ label: 'Custom Label for Files',
80
+ };
@@ -1,8 +1,8 @@
1
- import { Meta, StoryObj } from "@storybook/react/*";
2
- import { Stepper } from "../../components/Navigation/Stepper/Stepper";
1
+ import { Meta, StoryObj } from '@storybook/react/*';
2
+ import { Stepper } from '../../components/Navigation/Stepper/Stepper';
3
3
 
4
4
  const meta: Meta<typeof Stepper> = {
5
- title: "Navigation/Stepper",
5
+ title: 'Navigation/Stepper',
6
6
  component: Stepper,
7
7
  argTypes: {},
8
8
  };
@@ -13,33 +13,33 @@ type Story = StoryObj<typeof Stepper>;
13
13
 
14
14
  const steps = [
15
15
  {
16
- label: "Semester Configuration",
16
+ label: 'Semester Configuration',
17
17
  description:
18
- "Configure Credits, Tuition Fee Requirements, Registration Dates",
18
+ 'Configure Credits, Tuition Fee Requirements, Registration Dates',
19
19
  },
20
20
  {
21
- label: "Semester Calender",
21
+ label: 'Semester Calender',
22
22
  description:
23
- "Manage the timeline of the semester. Add new or edit the following events as per the semester needs",
23
+ 'Manage the timeline of the semester. Add new or edit the following events as per the semester needs',
24
24
  },
25
25
  {
26
- label: "Students and Sections",
27
- description: "Add or move students to their respective sections",
26
+ label: 'Students and Sections',
27
+ description: 'Add or move students to their respective sections',
28
28
  },
29
29
  {
30
- label: "Courses",
30
+ label: 'Courses',
31
31
  description:
32
- "Verify the courses that are going to be taught in this semester",
32
+ 'Verify the courses that are going to be taught in this semester',
33
33
  },
34
34
  {
35
- label: "Assign Faculty",
36
- description: "Assign Faculty to the available subjects",
35
+ label: 'Assign Faculty',
36
+ description: 'Assign Faculty to the available subjects',
37
37
  },
38
38
  ];
39
39
 
40
40
  export const VerticalStepper: Story = {
41
41
  args: {
42
- orientation: "vertical",
42
+ orientation: 'vertical',
43
43
  steps,
44
44
  activeStep: 2,
45
45
  },
@@ -57,7 +57,7 @@ export const VerticalStepperWithNoDescription: Story = {
57
57
  export const HorizontalStepper: Story = {
58
58
  args: {
59
59
  ...VerticalStepper.args,
60
- orientation: "horizontal",
60
+ orientation: 'horizontal',
61
61
  },
62
62
  };
63
63
 
@@ -1,16 +1,16 @@
1
- import { Box } from "@mui/material";
2
- import { Meta, StoryObj } from "@storybook/react";
1
+ import { Box } from '@mui/material';
2
+ import { Meta, StoryObj } from '@storybook/react';
3
3
 
4
4
  import {
5
5
  TabsContainer,
6
6
  TabsContainerProps,
7
- } from "../../components/Navigation/TabsContainer/TabsContainer";
7
+ } from '../../components/Navigation/TabsContainer/TabsContainer';
8
8
 
9
9
  // Define the default export with Meta type including the component type
10
10
  const meta: Meta<typeof TabsContainer> = {
11
- title: "Navigation/TabsContainer",
11
+ title: 'Navigation/TabsContainer',
12
12
  component: TabsContainer,
13
- tags: ["autodocs"],
13
+ tags: ['autodocs'],
14
14
  // argTypes: {
15
15
  // menu: {
16
16
  // control: "object",
@@ -28,18 +28,18 @@ export const Primary: Story = {
28
28
  args: {
29
29
  tabs: [
30
30
  {
31
- key: "1",
32
- label: "Personal Details",
31
+ key: '1',
32
+ label: 'Personal Details',
33
33
  component: <Box>First Year</Box>,
34
34
  },
35
35
  {
36
- key: "2",
37
- label: "Overview",
36
+ key: '2',
37
+ label: 'Overview',
38
38
  component: <>Second Year</>,
39
39
  },
40
40
  {
41
- key: "3",
42
- label: "year 3",
41
+ key: '3',
42
+ label: 'year 3',
43
43
  component: <>Third Year</>,
44
44
  },
45
45
  ],
@@ -1,6 +1,6 @@
1
- import { CssBaseline, ThemeProvider } from "@mui/material";
2
- import { ReactNode } from "react";
3
- import { lightTheme } from "./lightTheme";
1
+ import { CssBaseline, ThemeProvider } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
+ import { lightTheme } from './lightTheme';
4
4
 
5
5
  export const MuiThemeProvider = ({
6
6
  children,
@@ -1,48 +1,48 @@
1
1
  export const ColorPalette = {
2
2
  BrandColors: {
3
- Violet100: "#F0F0F5",
4
- Violet200: "#E0E0E7",
5
- Violet250: "#D0D0E3",
6
- Violet300: "#9E9DEB",
7
- Violet400: "#9E9DEB",
8
- Violet450: "#7B7ACC",
9
- Violet500: "#656599",
10
- Violet550: "#4D508A",
11
- Violet600: "#323167",
12
- Violet700: "#303259",
13
- Violet800: "#1E1E45",
14
- Violet900: "#1D1E3B",
15
- Crimson: "#D4483E",
3
+ Violet100: '#F0F0F5',
4
+ Violet200: '#E0E0E7',
5
+ Violet250: '#D0D0E3',
6
+ Violet300: '#9E9DEB',
7
+ Violet400: '#9E9DEB',
8
+ Violet450: '#7B7ACC',
9
+ Violet500: '#656599',
10
+ Violet550: '#4D508A',
11
+ Violet600: '#323167',
12
+ Violet700: '#303259',
13
+ Violet800: '#1E1E45',
14
+ Violet900: '#1D1E3B',
15
+ Crimson: '#D4483E',
16
16
  },
17
17
  GreyColors: {
18
- White50: "#FFFFFF80",
19
- White70: "#FFFFFFB3",
20
- White: "#FFFFFF",
21
- Grey100: "#F2F2F2",
22
- Grey200: "#CECECE",
23
- Grey500: "#333333",
24
- Black50: "#12121280",
25
- Black70: "#121212B3",
26
- Black: "#121212",
18
+ White50: '#FFFFFF80',
19
+ White70: '#FFFFFFB3',
20
+ White: '#FFFFFF',
21
+ Grey100: '#F2F2F2',
22
+ Grey200: '#CECECE',
23
+ Grey500: '#333333',
24
+ Black50: '#12121280',
25
+ Black70: '#121212B3',
26
+ Black: '#121212',
27
27
  },
28
28
  BlueGreyColors: {
29
- BlueGrey100: "#F7F8FA",
30
- BlueGrey400: "#293640",
31
- BlueGrey600: "#1D2127",
32
- BlueGrey800: "#161A1D",
29
+ BlueGrey100: '#F7F8FA',
30
+ BlueGrey400: '#293640',
31
+ BlueGrey600: '#1D2127',
32
+ BlueGrey800: '#161A1D',
33
33
  },
34
34
  UtilityColors: {
35
- Green: "#88B053",
36
- Blue: "#4BAABE",
37
- Orange: "#ED9035",
38
- Red: "#F2353C",
39
- Pink: "#EA4A6B",
40
- Yellow: "#F4C100",
41
- Green20: "#88B05333",
42
- Blue20: "#4BAABE33",
43
- Orange20: "#ED903533",
44
- Red20: "#F2353C33",
45
- Pink20: "#EA4A6B33",
46
- LightYellow: "#F4C10033",
35
+ Green: '#88B053',
36
+ Blue: '#4BAABE',
37
+ Orange: '#ED9035',
38
+ Red: '#F2353C',
39
+ Pink: '#EA4A6B',
40
+ Yellow: '#F4C100',
41
+ Green20: '#88B05333',
42
+ Blue20: '#4BAABE33',
43
+ Orange20: '#ED903533',
44
+ Red20: '#F2353C33',
45
+ Pink20: '#EA4A6B33',
46
+ LightYellow: '#F4C10033',
47
47
  },
48
48
  };
@@ -1,4 +1,4 @@
1
- import { ColorPalette } from "./colorPalette";
1
+ import { ColorPalette } from './colorPalette';
2
2
 
3
3
  export const DarkColorTokens = {
4
4
  primary: {
@@ -1,4 +1,4 @@
1
- import { ColorPalette } from "./colorPalette";
1
+ import { ColorPalette } from './colorPalette';
2
2
 
3
3
  export const LightColorTokens = {
4
4
  primary: {
@@ -124,9 +124,10 @@ export const getCommonTheme = (mode: Theme) => {
124
124
  styleOverrides: {
125
125
  root: {
126
126
  fontFamily: 'poppins',
127
- fontWeight: 400,
127
+ fontWeight: 500,
128
128
  fontSize: '16px',
129
- padding: 0,
129
+ padding: '12px 16px',
130
+ backgroundColor: ColorTokens.surface.grey,
130
131
  },
131
132
  paper: {
132
133
  elevation: 2,
@@ -134,6 +135,14 @@ export const getCommonTheme = (mode: Theme) => {
134
135
  },
135
136
  },
136
137
  },
138
+ MuiDialogContent: {
139
+ styleOverrides: {
140
+ root: {
141
+ padding: '0px',
142
+ margin: '16px',
143
+ },
144
+ },
145
+ },
137
146
  MuiChip: {
138
147
  styleOverrides: {
139
148
  root: {
@@ -154,6 +163,7 @@ export const getCommonTheme = (mode: Theme) => {
154
163
  styleOverrides: {
155
164
  root: {
156
165
  boxShadow: 'none',
166
+
157
167
  border: `1px solid ${ColorTokens.border.primary}`,
158
168
  borderRadius: '8px',
159
169
  },
@@ -364,7 +374,7 @@ export const getCommonTheme = (mode: Theme) => {
364
374
  root: {
365
375
  '& .MuiOutlinedInput-root .MuiAutocomplete-input': {
366
376
  padding: 0,
367
- maxHeight: '100px',
377
+ maxHeight: '40px',
368
378
  },
369
379
  overflowY: 'auto',
370
380
  },
@@ -1,9 +1,9 @@
1
- import { heeboMedium, heeboSemiBold } from "../assets/fonts/heebo";
1
+ import { heeboMedium, heeboSemiBold } from '../assets/fonts/heebo';
2
2
  import {
3
3
  boldPoppins,
4
4
  mediumPoppins,
5
5
  semiboldPoppins,
6
- } from "../assets/fonts/poppins";
6
+ } from '../assets/fonts/poppins';
7
7
 
8
8
  export const customCssBaseline = `
9
9
  @font-face {
@@ -1,11 +1,11 @@
1
- import { createTheme } from "@mui/material/styles";
1
+ import { createTheme } from '@mui/material/styles';
2
2
 
3
- import { DarkColorTokens } from "./colorTokens/darkColorTokens";
4
- import { Theme, getCommonTheme } from "./commonTheme";
3
+ import { DarkColorTokens } from './colorTokens/darkColorTokens';
4
+ import { Theme, getCommonTheme } from './commonTheme';
5
5
 
6
6
  export const darkTheme = createTheme({
7
7
  palette: {
8
- mode: "dark",
8
+ mode: 'dark',
9
9
  ...DarkColorTokens,
10
10
  },
11
11
  ...getCommonTheme(Theme.DARK),
@@ -1,5 +1,5 @@
1
- import { darkTheme } from "./darkTheme";
2
- import { lightTheme } from "./lightTheme";
1
+ import { darkTheme } from './darkTheme';
2
+ import { lightTheme } from './lightTheme';
3
3
 
4
- export * from "./MuiThemeProvider";
4
+ export * from './MuiThemeProvider';
5
5
  export { darkTheme, lightTheme };
@@ -1,10 +1,10 @@
1
- import { createTheme } from "@mui/material/styles";
2
- import { LightColorTokens } from "./colorTokens/lightColorTokens";
3
- import { Theme, getCommonTheme } from "./commonTheme";
1
+ import { createTheme } from '@mui/material/styles';
2
+ import { LightColorTokens } from './colorTokens/lightColorTokens';
3
+ import { Theme, getCommonTheme } from './commonTheme';
4
4
 
5
5
  export const lightTheme = createTheme({
6
6
  palette: {
7
- mode: "light",
7
+ mode: 'light',
8
8
  ...LightColorTokens,
9
9
  },
10
10
  ...getCommonTheme(Theme.LIGHT),
@@ -1,6 +1,6 @@
1
- import Cookies from "js-cookie";
1
+ import Cookies from 'js-cookie';
2
2
 
3
- export const isDevelopment: boolean = process.env.NODE_ENV === "development";
4
- export const urlTenantKey = window.location.pathname.split("/")[1];
5
- export const institutionKey = window.location.pathname.split("/")[2];
6
- export const sessionKey = Cookies.get("campx_session_key");
3
+ export const isDevelopment: boolean = process.env.NODE_ENV === 'development';
4
+ export const urlTenantKey = window.location.pathname.split('/')[1];
5
+ export const institutionKey = window.location.pathname.split('/')[2];
6
+ export const sessionKey = Cookies.get('campx_session_key');