@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,12 +1,12 @@
1
1
  // HelpButton.tsx
2
- import React from "react";
3
- import { IconButton } from "@mui/material";
4
- import { Icons } from "../../export";
2
+ import React from 'react';
3
+ import { IconButton } from '@mui/material';
4
+ import { Icons } from '../../export';
5
5
 
6
6
  const HelpButton = () => {
7
7
  return (
8
8
  <IconButton
9
- href={"https://campx.atlassian.net/servicedesk/customer/portal/2"}
9
+ href={'https://campx.atlassian.net/servicedesk/customer/portal/2'}
10
10
  target="_blank"
11
11
  >
12
12
  <Icons.HelpIcon />
@@ -1,5 +1,5 @@
1
- import { ButtonProps, IconButton } from "@mui/material";
2
- import { Icons } from "../../../export";
1
+ import { ButtonProps, IconButton } from '@mui/material';
2
+ import { Icons } from '../../../export';
3
3
 
4
4
  export function DeleteButton({ disabled, ...props }: ButtonProps) {
5
5
  return (
@@ -1,5 +1,5 @@
1
- import { ButtonProps, IconButton } from "@mui/material";
2
- import { Icons } from "../../../export";
1
+ import { ButtonProps, IconButton } from '@mui/material';
2
+ import { Icons } from '../../../export';
3
3
 
4
4
  export function EditButton({ disabled, ...props }: ButtonProps) {
5
5
  return (
@@ -1,5 +1,5 @@
1
- import { ButtonProps, IconButton } from "@mui/material";
2
- import { Icons } from "../../../export";
1
+ import { ButtonProps, IconButton } from '@mui/material';
2
+ import { Icons } from '../../../export';
3
3
 
4
4
  export function RedirectButton({ disabled, ...props }: ButtonProps) {
5
5
  return (
@@ -1,5 +1,5 @@
1
- import { ButtonProps, IconButton } from "@mui/material";
2
- import { Icons } from "../../../export";
1
+ import { ButtonProps, IconButton } from '@mui/material';
2
+ import { Icons } from '../../../export';
3
3
 
4
4
  export function ViewButton({ disabled, ...props }: ButtonProps) {
5
5
  return (
@@ -1,5 +1,5 @@
1
- import { Stack, StackProps, Typography, useTheme } from "@mui/material";
2
- import { ReactNode } from "react";
1
+ import { Stack, StackProps, Typography, useTheme } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
3
 
4
4
  export const LabelWrapper = ({
5
5
  required,
@@ -16,13 +16,13 @@ export const LabelWrapper = ({
16
16
  }) => {
17
17
  const theme = useTheme();
18
18
  return (
19
- <Stack margin={" 8px 12px"} {...containerProps}>
20
- {typeof label === "string" ? (
19
+ <Stack margin={' 8px 12px'} {...containerProps}>
20
+ {typeof label === 'string' ? (
21
21
  <Typography htmlFor={name} component="label" variant="label1">
22
22
  {label}
23
23
  {required && (
24
24
  <span style={{ color: `${theme.palette.tertiary.main}` }}>
25
- {" *"}
25
+ {' *'}
26
26
  </span>
27
27
  )}
28
28
  </Typography>
@@ -1,15 +1,15 @@
1
- import { Stack, StackProps } from "@mui/material";
2
- import { ResponsiveStyleValue } from "@mui/system";
3
- import { ReactNode } from "react";
4
- import { LabelWrapper } from "../LabelWrapper/LabelWrapper";
5
- import { SingleCheckBox } from "../SingleCheckBox/SIngleCheckBox";
1
+ import { Stack, StackProps } from '@mui/material';
2
+ import { ResponsiveStyleValue } from '@mui/system';
3
+ import { ReactNode } from 'react';
4
+ import { LabelWrapper } from '../LabelWrapper/LabelWrapper';
5
+ import { SingleCheckBox } from '../SingleCheckBox/SIngleCheckBox';
6
6
 
7
7
  export type MultiCheckboxProps = {
8
8
  containerProps?: StackProps;
9
9
  options: Array<{ label: ReactNode; value: any }>;
10
10
  label: string;
11
11
  direction?: ResponsiveStyleValue<
12
- "row" | "row-reverse" | "column" | "column-reverse"
12
+ 'row' | 'row-reverse' | 'column' | 'column-reverse'
13
13
  >;
14
14
  values: any[];
15
15
  onChange: (values: any[]) => void;
@@ -1,21 +1,21 @@
1
- import React, { useState, useRef } from "react";
1
+ import React, { useState, useRef } from 'react';
2
2
 
3
3
  interface OtpInputProps {
4
4
  length: number;
5
5
  onChangeOtp: (otp: string) => void;
6
6
  }
7
7
 
8
- const OtpInput = ({ length, onChangeOtp }:OtpInputProps) => {
9
- const [otp, setOtp] = useState<string[]>(Array(length).fill(""));
8
+ const OtpInput = ({ length, onChangeOtp }: OtpInputProps) => {
9
+ const [otp, setOtp] = useState<string[]>(Array(length).fill(''));
10
10
  const inputRefs = useRef<HTMLInputElement[]>([]);
11
11
 
12
12
  const handleChange = (element: HTMLInputElement, index: number) => {
13
13
  const value = element.value;
14
- if (/^[0-9]$/.test(value) || value === "") {
14
+ if (/^[0-9]$/.test(value) || value === '') {
15
15
  const newOtp = [...otp];
16
16
  newOtp[index] = value;
17
17
  setOtp(newOtp);
18
- onChangeOtp(newOtp.join(""));
18
+ onChangeOtp(newOtp.join(''));
19
19
 
20
20
  if (value && index < length - 1) {
21
21
  inputRefs.current[index + 1].focus();
@@ -25,17 +25,17 @@ const OtpInput = ({ length, onChangeOtp }:OtpInputProps) => {
25
25
 
26
26
  const handleKeyDown = (
27
27
  event: React.KeyboardEvent<HTMLInputElement>,
28
- index: number
28
+ index: number,
29
29
  ) => {
30
- if (event.key === "Backspace" && !otp[index] && index > 0) {
30
+ if (event.key === 'Backspace' && !otp[index] && index > 0) {
31
31
  inputRefs.current[index - 1].focus();
32
32
  }
33
33
  };
34
34
 
35
35
  const handlePaste = (event: React.ClipboardEvent<HTMLInputElement>) => {
36
36
  event.preventDefault();
37
- const paste = event.clipboardData.getData("text");
38
- const digits = paste.split("").filter((char) => /^[0-9]$/.test(char));
37
+ const paste = event.clipboardData.getData('text');
38
+ const digits = paste.split('').filter((char) => /^[0-9]$/.test(char));
39
39
 
40
40
  if (digits.length > 0) {
41
41
  const newOtp = [...otp];
@@ -50,30 +50,30 @@ const OtpInput = ({ length, onChangeOtp }:OtpInputProps) => {
50
50
  }
51
51
 
52
52
  setOtp(newOtp);
53
- onChangeOtp(newOtp.join(""));
53
+ onChangeOtp(newOtp.join(''));
54
54
  inputRefs.current[Math.min(focusIndex + 1, length - 1)].focus();
55
55
  }
56
56
  };
57
57
 
58
58
  return (
59
- <div style={{ display: "flex", gap: "10px" }}>
59
+ <div style={{ display: 'flex', gap: '10px' }}>
60
60
  {otp.map((value, index) => (
61
61
  <input
62
- className="MuiOtpInput"
62
+ className="MuiOtpInput"
63
63
  key={index}
64
64
  ref={(el) => (inputRefs.current[index] = el!)}
65
65
  type="text"
66
- value={value ? "" : ""}
66
+ value={value ? '' : ''}
67
67
  onChange={(e) => handleChange(e.target, index)}
68
68
  onKeyDown={(e) => handleKeyDown(e, index)}
69
69
  onPaste={handlePaste}
70
70
  data-index={index}
71
71
  maxLength={1}
72
72
  style={{
73
- width: "40px",
74
- height: "40px",
75
- textAlign: "center",
76
- fontSize: "20px",
73
+ width: '40px',
74
+ height: '40px',
75
+ textAlign: 'center',
76
+ fontSize: '20px',
77
77
  }}
78
78
  />
79
79
  ))}
@@ -4,12 +4,12 @@ import {
4
4
  TextField as MuiTextField,
5
5
  TextFieldProps as MuiTextFieldProps,
6
6
  StackProps,
7
- } from "@mui/material";
8
- import { useState } from "react";
9
- import { VisibilityOffIcon } from "../../Assets/Icons/IconComponents/VisibiityOffIcon";
10
- import { VisibilityIcon } from "../../Assets/Icons/IconComponents/VisibilityIcon";
11
- import { Typography } from "../../export";
12
- import { LabelWrapper } from "../LabelWrapper/LabelWrapper";
7
+ } from '@mui/material';
8
+ import { useState } from 'react';
9
+ import { VisibilityOffIcon } from '../../Assets/Icons/IconComponents/VisibiityOffIcon';
10
+ import { VisibilityIcon } from '../../Assets/Icons/IconComponents/VisibilityIcon';
11
+ import { Typography } from '../../export';
12
+ import { LabelWrapper } from '../LabelWrapper/LabelWrapper';
13
13
 
14
14
  export type PasswordFieldProps = {
15
15
  containerProps?: StackProps;
@@ -24,7 +24,7 @@ export const PasswordField = ({
24
24
  required = false,
25
25
  containerProps,
26
26
  description,
27
- type = "text",
27
+ type = 'text',
28
28
  ...rest
29
29
  }: PasswordFieldProps) => {
30
30
  const [showPassword, setShowPassword] = useState(false);
@@ -45,7 +45,7 @@ export const PasswordField = ({
45
45
  label={label}
46
46
  name={name}
47
47
  onChange={onChange}
48
- type={!showPassword ? "password" : "text"}
48
+ type={!showPassword ? 'password' : 'text'}
49
49
  InputProps={{
50
50
  endAdornment: (
51
51
  <InputAdornment position="end">
@@ -4,11 +4,11 @@ import {
4
4
  RadioGroupProps as MuiRadioGroupProps,
5
5
  Radio,
6
6
  StackProps,
7
- } from "@mui/material";
8
- import { ReactNode } from "react";
9
- import { Typography } from "../../DataDisplay/Typography/Typography";
10
- import { Icons } from "../../export";
11
- import { LabelWrapper } from "../LabelWrapper/LabelWrapper";
7
+ } from '@mui/material';
8
+ import { ReactNode } from 'react';
9
+ import { Typography } from '../../DataDisplay/Typography/Typography';
10
+ import { Icons } from '../../export';
11
+ import { LabelWrapper } from '../LabelWrapper/LabelWrapper';
12
12
 
13
13
  export type RadioGroupProps = {
14
14
  containerProps?: StackProps;
@@ -3,10 +3,10 @@ import {
3
3
  TextField,
4
4
  TextFieldProps,
5
5
  styled,
6
- } from "@mui/material";
7
- import { debounce } from "lodash";
8
- import { ReactNode, useMemo, useState } from "react";
9
- import { SearchIcon } from "../../Assets/Icons/IconComponents/SearchIcon";
6
+ } from '@mui/material';
7
+ import { debounce } from 'lodash';
8
+ import { ReactNode, useMemo, useState } from 'react';
9
+ import { SearchIcon } from '../../Assets/Icons/IconComponents/SearchIcon';
10
10
 
11
11
  export type SearchBarProps = {
12
12
  placeholder?: string;
@@ -16,9 +16,9 @@ export type SearchBarProps = {
16
16
  } & TextFieldProps;
17
17
 
18
18
  export const SearchBar = ({
19
- placeholder = "Search by Name",
19
+ placeholder = 'Search by Name',
20
20
  label,
21
- value = "",
21
+ value = '',
22
22
  onSearch,
23
23
  ...rest
24
24
  }: SearchBarProps) => {
@@ -55,27 +55,27 @@ const StyledTextField = styled(TextField)(({ theme }) => ({
55
55
  margin: 0,
56
56
  height: 40,
57
57
  backgroundColor: theme.palette.surface.grey,
58
- ".MuiFormControl-root": {
58
+ '.MuiFormControl-root': {
59
59
  margin: 0,
60
- height: "100%",
60
+ height: '100%',
61
61
  },
62
- ".MuiOutlinedInput-root": {
63
- height: "100%",
64
- padding: "5px, 10px",
65
- display: "flex",
66
- alignItems: "center",
62
+ '.MuiOutlinedInput-root': {
63
+ height: '100%',
64
+ padding: '5px, 10px',
65
+ display: 'flex',
66
+ alignItems: 'center',
67
67
  },
68
- ".MuiInputBase-input": {
69
- height: "100%",
70
- fontSize: "14px",
71
- "&::placeholder": {
68
+ '.MuiInputBase-input': {
69
+ height: '100%',
70
+ fontSize: '14px',
71
+ '&::placeholder': {
72
72
  color: theme.palette.text.tertiary,
73
- fontSize: "14px",
73
+ fontSize: '14px',
74
74
  opacity: 1,
75
75
  },
76
76
  },
77
- ".MuiOutlinedInput-notchedOutline": {
78
- height: "100%",
77
+ '.MuiOutlinedInput-notchedOutline': {
78
+ height: '100%',
79
79
  top: 0,
80
80
  borderColor: theme.palette.border.primary,
81
81
  },
@@ -3,10 +3,10 @@ import {
3
3
  Checkbox as MuiCheckbox,
4
4
  CheckboxProps as MuiCheckboxProps,
5
5
  useTheme,
6
- } from "@mui/material";
7
- import { ReactNode } from "react";
8
- import { Typography } from "../../DataDisplay/Typography/Typography";
9
- import { Icons } from "../../export";
6
+ } from '@mui/material';
7
+ import { ReactNode } from 'react';
8
+ import { Typography } from '../../DataDisplay/Typography/Typography';
9
+ import { Icons } from '../../export';
10
10
 
11
11
  export type CheckboxProps = {
12
12
  label: ReactNode;
@@ -36,7 +36,7 @@ export const SingleCheckBox = ({
36
36
  {label}
37
37
  {required && (
38
38
  <span style={{ color: `${theme.palette.tertiary.main}` }}>
39
- {" *"}
39
+ {' *'}
40
40
  </span>
41
41
  )}
42
42
  </Typography>
@@ -1,5 +1,11 @@
1
1
  import { axios as campxAxios } from '@campxdev/campx-web-utils';
2
- import { BaseSelectProps, Box, Autocomplete as MuiAutocomplete, Paper, PaperProps } from '@mui/material';
2
+ import {
3
+ BaseSelectProps,
4
+ Box,
5
+ Autocomplete as MuiAutocomplete,
6
+ Paper,
7
+ PaperProps,
8
+ } from '@mui/material';
3
9
  import axios from 'axios';
4
10
  import _ from 'lodash';
5
11
  import { useEffect, useReducer } from 'react';
@@ -50,7 +56,13 @@ enum SingleSelectActionsTypes {
50
56
  APPEND_INTERNAL_OPTIONS = 'append_internal_options',
51
57
  CHANGE_HAS_MORE_FLAG = 'change_has_more_flag',
52
58
  }
53
- const singleSelectReducer = (state: any, { actionType, stateChanges }: { actionType: SingleSelectActionsTypes; stateChanges?: any }) => {
59
+ const singleSelectReducer = (
60
+ state: any,
61
+ {
62
+ actionType,
63
+ stateChanges,
64
+ }: { actionType: SingleSelectActionsTypes; stateChanges?: any },
65
+ ) => {
54
66
  switch (actionType) {
55
67
  case SingleSelectActionsTypes.OPEN: {
56
68
  return { ...state, open: true };
@@ -133,7 +145,15 @@ export const SingleSelect = ({
133
145
  offset: 0,
134
146
  hasMore: true,
135
147
  });
136
- const { open, loadingInternalOptions, loadingInitialInternalOptions, internalOptions, limit, offset, hasMore } = state;
148
+ const {
149
+ open,
150
+ loadingInternalOptions,
151
+ loadingInitialInternalOptions,
152
+ internalOptions,
153
+ limit,
154
+ offset,
155
+ hasMore,
156
+ } = state;
137
157
 
138
158
  const internalAxios = useCampxAxios ? campxAxios : axios;
139
159
 
@@ -178,7 +198,12 @@ export const SingleSelect = ({
178
198
 
179
199
  const handleScroll = async (event: any) => {
180
200
  const listboxNode = event.currentTarget;
181
- if (listboxNode.scrollTop + listboxNode.clientHeight >= listboxNode.scrollHeight - 1 && hasMore && optionsApiEndPoint) {
201
+ if (
202
+ listboxNode.scrollTop + listboxNode.clientHeight >=
203
+ listboxNode.scrollHeight - 1 &&
204
+ hasMore &&
205
+ optionsApiEndPoint
206
+ ) {
182
207
  dispatch({
183
208
  actionType: SingleSelectActionsTypes.LOAD_INTERNAL_OPTIONS_START,
184
209
  });
@@ -234,7 +259,8 @@ export const SingleSelect = ({
234
259
  if (value && optionsApiEndPoint) {
235
260
  fetchInitialOptions().finally(() => {
236
261
  dispatch({
237
- actionType: SingleSelectActionsTypes.LOAD_INITIAL_INTERNAL_OPTIONS_END,
262
+ actionType:
263
+ SingleSelectActionsTypes.LOAD_INITIAL_INTERNAL_OPTIONS_END,
238
264
  });
239
265
  });
240
266
  }
@@ -263,7 +289,14 @@ export const SingleSelect = ({
263
289
  autoFocus={true}
264
290
  value={state.internalOptionsMap[value]}
265
291
  renderInput={(params) => (
266
- <TextField {...params} label={label} required={required} name={name} error={error} helperText={helperText} />
292
+ <TextField
293
+ {...params}
294
+ label={label}
295
+ required={required}
296
+ name={name}
297
+ error={error}
298
+ helperText={helperText}
299
+ />
267
300
  )}
268
301
  PaperComponent={CustomPaper}
269
302
  renderOption={(props, option: any) => {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Switch as MuiSwitch,
3
3
  SwitchProps as MuiSwitchProps,
4
- } from "@mui/material";
4
+ } from '@mui/material';
5
5
 
6
6
  export type SwitchProps = {} & MuiSwitchProps;
7
7
  export const Switch = (props: SwitchProps) => {
@@ -2,9 +2,9 @@ import {
2
2
  TextField as MuiTextField,
3
3
  TextFieldProps as MuiTextFieldProps,
4
4
  StackProps,
5
- } from "@mui/material";
6
- import { Typography } from "../../export";
7
- import { LabelWrapper } from "../LabelWrapper/LabelWrapper";
5
+ } from '@mui/material';
6
+ import { Typography } from '../../export';
7
+ import { LabelWrapper } from '../LabelWrapper/LabelWrapper';
8
8
 
9
9
  export type TextFieldProps = {
10
10
  containerProps?: StackProps;
@@ -1,8 +1,14 @@
1
1
  import { PickerValidDate } from '@mui/x-date-pickers';
2
- import { TimePicker as MuiTimePicker, TimePickerProps as MuiTimePickerProps } from '@mui/x-date-pickers/TimePicker';
2
+ import {
3
+ TimePicker as MuiTimePicker,
4
+ TimePickerProps as MuiTimePickerProps,
5
+ } from '@mui/x-date-pickers/TimePicker';
3
6
  import { LabelWrapper } from '../LabelWrapper/LabelWrapper';
4
7
 
5
- type TimePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false> = {
8
+ type TimePickerProps<
9
+ TDate extends PickerValidDate,
10
+ TEnableAccessibleFieldDOMStructure extends boolean = false,
11
+ > = {
6
12
  format?: 'hh:mm a' | 'HH:mm' | 'HH:mm:ss a' | 'HH:mm:ss';
7
13
  views?: ('hours' | 'minutes' | 'seconds')[];
8
14
  helperText?: string;
@@ -11,7 +17,10 @@ type TimePickerProps<TDate extends PickerValidDate, TEnableAccessibleFieldDOMStr
11
17
  containerProps?: any;
12
18
  } & MuiTimePickerProps<TDate, TEnableAccessibleFieldDOMStructure>;
13
19
 
14
- export const TimePicker = <TDate extends PickerValidDate, TEnableAccessibleFieldDOMStructure extends boolean = false>({
20
+ export const TimePicker = <
21
+ TDate extends PickerValidDate,
22
+ TEnableAccessibleFieldDOMStructure extends boolean = false,
23
+ >({
15
24
  label,
16
25
  name,
17
26
  value,
@@ -24,7 +33,12 @@ export const TimePicker = <TDate extends PickerValidDate, TEnableAccessibleField
24
33
  ...rest
25
34
  }: TimePickerProps<TDate, TEnableAccessibleFieldDOMStructure>) => {
26
35
  return (
27
- <LabelWrapper label={label} required={required} name={name} containerProps={containerProps}>
36
+ <LabelWrapper
37
+ label={label}
38
+ required={required}
39
+ name={name}
40
+ containerProps={containerProps}
41
+ >
28
42
  <MuiTimePicker
29
43
  defaultValue={value}
30
44
  format={format}
@@ -1,6 +1,6 @@
1
- import { Typography } from "../../DataDisplay/Typography/Typography";
2
- import { Spinner } from "../../Feedback/Spinner/Spinner";
3
- import { FetchingOptionsLoaderContainer } from "../styles";
1
+ import { Typography } from '../../DataDisplay/Typography/Typography';
2
+ import { Spinner } from '../../Feedback/Spinner/Spinner';
3
+ import { FetchingOptionsLoaderContainer } from '../styles';
4
4
 
5
5
  export const FetchingOptionsLoader = ({ loading }: { loading: boolean }) => {
6
6
  return loading ? (
@@ -1,14 +1,14 @@
1
- import { Box, Stack, styled } from "@mui/material";
1
+ import { Box, Stack, styled } from '@mui/material';
2
2
 
3
3
  export const OptionContainer = styled(Box)(({ theme }) => ({
4
- display: "flex",
5
- flexDirection: "column",
4
+ display: 'flex',
5
+ flexDirection: 'column',
6
6
  borderBottom: `1px solid ${theme.palette.secondary.main}`,
7
- width: "100%",
8
- padding: "5px 0px",
7
+ width: '100%',
8
+ padding: '5px 0px',
9
9
  }));
10
10
 
11
11
  export const FetchingOptionsLoaderContainer = styled(Stack)(({ theme }) => ({
12
12
  backgroundColor: theme.palette.background.default,
13
- maxHeight: "32px",
13
+ maxHeight: '32px',
14
14
  }));
@@ -1,11 +1,9 @@
1
- import { Stack } from "@mui/material";
2
- import { ReactNode } from "react";
3
- import { HelpIcon } from "../../Assets/Icons/IconComponents/HelpIcon";
4
- import { Typography } from "../../DataDisplay/Typography/Typography";
5
- import { StyledIconButton } from "../../Navigation/DropDownMenu/styles";
6
- import UserBox from "./AppHeaderActions/UserBox";
7
- import { StyledHeader } from "./styles/styles";
8
- import { Button } from "../../export";
1
+ import { Stack } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
+ import { Typography } from '../../DataDisplay/Typography/Typography';
4
+ import { Button } from '../../export';
5
+ import UserBox from './AppHeaderActions/UserBox';
6
+ import { StyledHeader } from './styles/styles';
9
7
 
10
8
  export interface AppHeaderProps {
11
9
  actions?: ReactNode[];
@@ -24,7 +22,7 @@ export const AppHeader = ({
24
22
  actions = [],
25
23
  profileSx = {},
26
24
  clientLogoUrl,
27
- designation = "",
25
+ designation = '',
28
26
  clientName,
29
27
  userFullName,
30
28
  collapsed,
@@ -33,8 +31,8 @@ export const AppHeader = ({
33
31
  }: AppHeaderProps) => {
34
32
  return (
35
33
  <StyledHeader collapsed={collapsed} className="appHeader">
36
- <Typography variant={"subtitle2"}>{clientName}</Typography>
37
- <Stack alignItems={"center"} gap={"12px"} flexDirection={"row"}>
34
+ <Typography variant={'subtitle2'}>{clientName}</Typography>
35
+ <Stack alignItems={'center'} gap={'12px'} flexDirection={'row'}>
38
36
  {/* <StyledIconButton>
39
37
  <a
40
38
  href={"https://campx.atlassian.net/servicedesk/customer/portal/2"}
@@ -53,7 +51,7 @@ export const AppHeader = ({
53
51
  <Typography
54
52
  variant="button"
55
53
  sx={{
56
- fontWeight: "bold",
54
+ fontWeight: 'bold',
57
55
  }}
58
56
  >
59
57
  Report an Issue
@@ -1,7 +1,7 @@
1
- import { Divider, IconButton } from "@mui/material";
2
- import { ReactNode } from "react";
3
- import { DropdownMenu } from "../../../Navigation/DropDownMenu/DropDownMenu";
4
- import { Icons } from "../../../export";
1
+ import { Divider, IconButton } from '@mui/material';
2
+ import { ReactNode } from 'react';
3
+ import { DropdownMenu } from '../../../Navigation/DropDownMenu/DropDownMenu';
4
+ import { Icons } from '../../../export';
5
5
  // import { clogWheel } from "../../../../assets/images";
6
6
  // import DropDownButton from "../../../DropDownButton/DropDownButton";
7
7
 
@@ -13,7 +13,7 @@ const CogWheelMenu = ({ menu }: { menu: ReactNode[] }) => {
13
13
  orientation="vertical"
14
14
  variant="middle"
15
15
  flexItem
16
- sx={{ height: "20px" }}
16
+ sx={{ height: '20px' }}
17
17
  />
18
18
  </div>
19
19
 
@@ -1,9 +1,9 @@
1
1
  // HeaderActions.tsx
2
2
 
3
- import { Divider, Stack } from "@mui/material";
4
- import { ReactNode } from "react";
5
- import CogWheelMenu from "./CogWheelMenu";
6
- import UserBox from "./UserBox";
3
+ import { Divider, Stack } from '@mui/material';
4
+ import { ReactNode } from 'react';
5
+ import CogWheelMenu from './CogWheelMenu';
6
+ import UserBox from './UserBox';
7
7
 
8
8
  export interface HeaderActionsProps {
9
9
  cogWheelMenu: ReactNode[];
@@ -27,7 +27,7 @@ const HeaderActions = ({
27
27
  fullName,
28
28
  designation,
29
29
  userBoxActions = [],
30
- profileUrl = "",
30
+ profileUrl = '',
31
31
  actions = [],
32
32
  profileSx = {},
33
33
  avatar = {},
@@ -44,7 +44,7 @@ const HeaderActions = ({
44
44
  orientation="vertical"
45
45
  variant="middle"
46
46
  flexItem
47
- sx={{ height: "20px" }}
47
+ sx={{ height: '20px' }}
48
48
  />
49
49
  </>
50
50
  ))}