@campxdev/react-blueprint 1.1.7 → 1.1.9

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 (240) hide show
  1. package/.vscode/settings.json +5 -1
  2. package/craco.config.js +18 -0
  3. package/package.json +6 -5
  4. package/src/AppContent.tsx +6 -6
  5. package/src/assets/fonts/heebo/index.ts +2 -2
  6. package/src/assets/fonts/poppins/index.ts +5 -5
  7. package/src/assets/images/gif/confirmation-alert.gif +0 -0
  8. package/src/assets/images/gif/delete-confirmation-alert.gif +0 -0
  9. package/src/assets/images/gif/index.ts +11 -0
  10. package/src/assets/images/gif/upload-file.gif +0 -0
  11. package/src/assets/images/gif/uploading-file.gif +0 -0
  12. package/src/assets/images/svg/index.ts +5 -21
  13. package/src/components/Assets/ErrorPages/InternalServerError.tsx +7 -7
  14. package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +7 -7
  15. package/src/components/Assets/ErrorPages/NoItemFound.tsx +7 -7
  16. package/src/components/Assets/ErrorPages/PageNotFound.tsx +5 -5
  17. package/src/components/Assets/ErrorPages/UnAuthorized.tsx +6 -6
  18. package/src/components/Assets/ErrorPages/styles.tsx +15 -15
  19. package/src/components/Assets/Icons/IconComponents/AcademicIcon.tsx +7 -1
  20. package/src/components/Assets/Icons/IconComponents/ActiveDevicesIcon.tsx +1 -1
  21. package/src/components/Assets/Icons/IconComponents/AdminIcon.tsx +1 -1
  22. package/src/components/Assets/Icons/IconComponents/AdministratorIcon.tsx +1 -1
  23. package/src/components/Assets/Icons/IconComponents/AlertFilledIcon.tsx +1 -1
  24. package/src/components/Assets/Icons/IconComponents/ArrowBackIcon.tsx +1 -1
  25. package/src/components/Assets/Icons/IconComponents/AttachmentIcon.tsx +32 -0
  26. package/src/components/Assets/Icons/IconComponents/BulbIcon.tsx +1 -1
  27. package/src/components/Assets/Icons/IconComponents/CampxFullLogoIcon.tsx +3 -3
  28. package/src/components/Assets/Icons/IconComponents/CampxIcon.tsx +2 -2
  29. package/src/components/Assets/Icons/IconComponents/CareerIcon.tsx +1 -1
  30. package/src/components/Assets/Icons/IconComponents/CheckedCheckBoxIcon.tsx +1 -1
  31. package/src/components/Assets/Icons/IconComponents/CheckedRadioIcon.tsx +1 -1
  32. package/src/components/Assets/Icons/IconComponents/ClogWheelIcon.tsx +1 -1
  33. package/src/components/Assets/Icons/IconComponents/CollapseIcon.tsx +1 -1
  34. package/src/components/Assets/Icons/IconComponents/CrossIcon.tsx +1 -1
  35. package/src/components/Assets/Icons/IconComponents/DashBoardIcon.tsx +1 -1
  36. package/src/components/Assets/Icons/IconComponents/DeleteIcon.tsx +1 -1
  37. package/src/components/Assets/Icons/IconComponents/DeviceIcon.tsx +1 -1
  38. package/src/components/Assets/Icons/IconComponents/DocumentIcon.tsx +52 -0
  39. package/src/components/Assets/Icons/IconComponents/DownloadIcon.tsx +52 -0
  40. package/src/components/Assets/Icons/IconComponents/EditIcon.tsx +1 -1
  41. package/src/components/Assets/Icons/IconComponents/ExamResultIcon.tsx +1 -1
  42. package/src/components/Assets/Icons/IconComponents/ExcelIcon.tsx +56 -0
  43. package/src/components/Assets/Icons/IconComponents/ExpandIcon.tsx +1 -1
  44. package/src/components/Assets/Icons/IconComponents/ExportIcon.tsx +1 -1
  45. package/src/components/Assets/Icons/IconComponents/FilterIcon.tsx +1 -1
  46. package/src/components/Assets/Icons/IconComponents/HelpIcon.tsx +1 -1
  47. package/src/components/Assets/Icons/IconComponents/HomeIcon.tsx +1 -1
  48. package/src/components/Assets/Icons/IconComponents/ImageIcon.tsx +44 -0
  49. package/src/components/Assets/Icons/IconComponents/InfoFilledIcon.tsx +1 -1
  50. package/src/components/Assets/Icons/IconComponents/InfoIcon.tsx +1 -1
  51. package/src/components/Assets/Icons/IconComponents/InstitutionsIcon.tsx +1 -1
  52. package/src/components/Assets/Icons/IconComponents/LeftIcon.tsx +1 -1
  53. package/src/components/Assets/Icons/IconComponents/LocationIcon.tsx +1 -1
  54. package/src/components/Assets/Icons/IconComponents/LogoutIcon.tsx +2 -2
  55. package/src/components/Assets/Icons/IconComponents/NavigationIcon.tsx +1 -1
  56. package/src/components/Assets/Icons/IconComponents/NoteIcon.tsx +7 -1
  57. package/src/components/Assets/Icons/IconComponents/NotificationIcon.tsx +1 -1
  58. package/src/components/Assets/Icons/IconComponents/PdfIcon.tsx +52 -0
  59. package/src/components/Assets/Icons/IconComponents/ProductFeaturesIcon.tsx +1 -1
  60. package/src/components/Assets/Icons/IconComponents/ProfileIcon.tsx +1 -1
  61. package/src/components/Assets/Icons/IconComponents/RedirectIcon.tsx +1 -1
  62. package/src/components/Assets/Icons/IconComponents/RedoIcon.tsx +1 -1
  63. package/src/components/Assets/Icons/IconComponents/RightIcon.tsx +1 -1
  64. package/src/components/Assets/Icons/IconComponents/SaveIcon.tsx +39 -39
  65. package/src/components/Assets/Icons/IconComponents/SearchIcon.tsx +1 -1
  66. package/src/components/Assets/Icons/IconComponents/ShareIcon.tsx +1 -1
  67. package/src/components/Assets/Icons/IconComponents/SuccessFilledIcon.tsx +1 -1
  68. package/src/components/Assets/Icons/IconComponents/TicketsIcon.tsx +1 -1
  69. package/src/components/Assets/Icons/IconComponents/UncheckCheckBoxIcon.tsx +1 -1
  70. package/src/components/Assets/Icons/IconComponents/UncheckedRadioIcon.tsx +1 -1
  71. package/src/components/Assets/Icons/IconComponents/ViewIcon.tsx +1 -1
  72. package/src/components/Assets/Icons/IconComponents/VisibiityOffIcon.tsx +1 -1
  73. package/src/components/Assets/Icons/IconComponents/VisibilityIcon.tsx +1 -1
  74. package/src/components/Assets/Icons/IconComponents/WarningFilledIcon.tsx +1 -1
  75. package/src/components/Assets/Icons/Icons.tsx +12 -0
  76. package/src/components/Assets/export.ts +6 -6
  77. package/src/components/Charts/BarChart/BarChart.tsx +17 -19
  78. package/src/components/Charts/LineChart/LineChart.tsx +12 -14
  79. package/src/components/Charts/PieChart/PieChart.tsx +8 -8
  80. package/src/components/Charts/TreeMap/TreeMap.tsx +15 -15
  81. package/src/components/Charts/export.ts +4 -4
  82. package/src/components/Charts/types/types.ts +3 -3
  83. package/src/components/DataDisplay/Accordion/Accordion.tsx +2 -0
  84. package/src/components/DataDisplay/Avatar/Avatar.tsx +14 -3
  85. package/src/components/DataDisplay/Card/Card.tsx +18 -18
  86. package/src/components/DataDisplay/Card/styles.tsx +24 -25
  87. package/src/components/DataDisplay/Chips/Chips.tsx +14 -14
  88. package/src/components/DataDisplay/DataTable/DataTable.tsx +4 -1
  89. package/src/components/DataDisplay/DataTable/TablePagination.tsx +10 -10
  90. package/src/components/DataDisplay/SidePanel/SidePanel.tsx +1 -1
  91. package/src/components/DataDisplay/Typography/Typography.tsx +1 -1
  92. package/src/components/Feedback/Alert/Alert.tsx +8 -8
  93. package/src/components/Feedback/Snackbar/Snackbar.tsx +27 -27
  94. package/src/components/Feedback/Spinner/Spinner.tsx +2 -2
  95. package/src/components/Feedback/Tooltip/Tooltip.tsx +6 -6
  96. package/src/components/Feedback/Tutorial/Tutorial.tsx +45 -45
  97. package/src/components/Feedback/export.ts +5 -0
  98. package/src/components/Image/Image.tsx +8 -8
  99. package/src/components/Input/Button/Button.tsx +2 -2
  100. package/src/components/Input/DatePicker/DatePicker.tsx +18 -4
  101. package/src/components/Input/FormActions/FormActions.tsx +15 -4
  102. package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +20 -5
  103. package/src/components/Input/HelpButton/HelpButton.stories.tsx +9 -9
  104. package/src/components/Input/HelpButton/HelpButton.tsx +4 -4
  105. package/src/components/Input/IconButtons/IconButtons/DeleteButton.tsx +2 -2
  106. package/src/components/Input/IconButtons/IconButtons/EditButton.tsx +2 -2
  107. package/src/components/Input/IconButtons/IconButtons/RedirectButton.tsx +2 -2
  108. package/src/components/Input/IconButtons/IconButtons/ViewButton.tsx +2 -2
  109. package/src/components/Input/LabelWrapper/LabelWrapper.tsx +5 -5
  110. package/src/components/Input/MultiCheckBox/MultiCheckBox.tsx +6 -6
  111. package/src/components/Input/OtpInput/OtpInput.tsx +17 -17
  112. package/src/components/Input/PasswordField/PasswordField.tsx +8 -8
  113. package/src/components/Input/RadioGroup/RadioGroup.tsx +5 -5
  114. package/src/components/Input/SearchBar/SearchBar.tsx +20 -20
  115. package/src/components/Input/SingleCheckBox/SIngleCheckBox.tsx +5 -5
  116. package/src/components/Input/SingleSelect/SingleSelect.tsx +39 -6
  117. package/src/components/Input/Switch/Switch.tsx +1 -1
  118. package/src/components/Input/TextField/TextField.tsx +3 -3
  119. package/src/components/Input/TimePicker/TimePicker.tsx +18 -4
  120. package/src/components/Input/components/FetchingOptionsLoader.tsx +3 -3
  121. package/src/components/Input/styles.tsx +6 -6
  122. package/src/components/Layout/AppHeader/AppHeader.tsx +10 -12
  123. package/src/components/Layout/AppHeader/AppHeaderActions/CogWheelMenu.tsx +5 -5
  124. package/src/components/Layout/AppHeader/AppHeaderActions/HeaderActions.tsx +6 -6
  125. package/src/components/Layout/AppHeader/AppHeaderActions/SwitchInstitution.tsx +37 -37
  126. package/src/components/Layout/AppHeader/AppHeaderActions/UserBox.tsx +28 -28
  127. package/src/components/Layout/AppHeader/styles/styles.tsx +24 -24
  128. package/src/components/Layout/PageHeader/PageHeader.tsx +8 -3
  129. package/src/components/Layout/TabsLayout/Tabs.tsx +16 -16
  130. package/src/components/Layout/TabsLayout/TabsLayout.tsx +6 -6
  131. package/src/components/Layout/export.ts +4 -0
  132. package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +35 -23
  133. package/src/components/Navigation/ConfirmDialog/ConfirmDialog.tsx +74 -0
  134. package/src/components/Navigation/Dialog/Dialog.tsx +33 -0
  135. package/src/components/Navigation/DialogButton/DialogButton.tsx +17 -81
  136. package/src/components/Navigation/DropDownMenu/DropDownButton.tsx +4 -4
  137. package/src/components/Navigation/DropDownMenu/DropDownIcon.tsx +4 -4
  138. package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +8 -8
  139. package/src/components/Navigation/DropDownMenu/DropdownMenuItem.tsx +3 -3
  140. package/src/components/Navigation/DropDownMenu/styles.tsx +13 -13
  141. package/src/components/Navigation/PreviewFiles/PreviewFiles.tsx +165 -0
  142. package/src/components/Navigation/Sidebar/Components.tsx +18 -18
  143. package/src/components/Navigation/Sidebar/MenuItem.tsx +1 -1
  144. package/src/components/Navigation/Sidebar/SubMenuItem.tsx +2 -1
  145. package/src/components/Navigation/Sidebar/interfaces.ts +1 -1
  146. package/src/components/Navigation/Sidebar/styles.tsx +64 -64
  147. package/src/components/Navigation/Stepper/Stepper.tsx +5 -5
  148. package/src/components/Navigation/Stepper/StepperComponents.tsx +15 -15
  149. package/src/components/Navigation/TabsContainer/TabsContainer.tsx +4 -4
  150. package/src/components/Navigation/UploadDialog/LoadingUploadDialogContainer.tsx +23 -0
  151. package/src/components/Navigation/UploadDialog/Styles.tsx +34 -0
  152. package/src/components/Navigation/UploadDialog/UploadDialog.tsx +143 -0
  153. package/src/components/Navigation/UploadDialog/UploadDialogContainer.tsx +82 -0
  154. package/src/components/Navigation/export.ts +13 -0
  155. package/src/components/export.ts +7 -7
  156. package/src/contexts/Providers.tsx +2 -2
  157. package/src/index.tsx +2 -2
  158. package/src/store/activeStore.ts +1 -1
  159. package/src/stories/Assets/Icons.stories.tsx +6 -6
  160. package/src/stories/Charts/BarChart.stories.tsx +56 -56
  161. package/src/stories/Charts/LineChart.stories.tsx +49 -49
  162. package/src/stories/Charts/PieChart.stories.tsx +53 -53
  163. package/src/stories/Charts/Treemap.stories.tsx +122 -122
  164. package/src/stories/DataDisplay/AccordionGroup.stories.tsx +11 -12
  165. package/src/stories/DataDisplay/Card.stories.tsx +34 -34
  166. package/src/stories/DataDisplay/Chips.stories.tsx +10 -10
  167. package/src/stories/DataDisplay/CircularAvatar.stories.tsx +6 -6
  168. package/src/stories/DataDisplay/DataTable.stories.tsx +32 -32
  169. package/src/stories/DataDisplay/SidePanel.stories.tsx +14 -14
  170. package/src/stories/DataDisplay/SquareAvatar.stories.tsx +15 -15
  171. package/src/stories/DesignSystem/colorTokens.stories.tsx +10 -10
  172. package/src/stories/DesignSystem/typography.stories.tsx +19 -19
  173. package/src/stories/Feedback/Alert.stories.tsx +9 -9
  174. package/src/stories/Feedback/Snackbar.stories.tsx +11 -11
  175. package/src/stories/Feedback/Spinner.stories.tsx +4 -4
  176. package/src/stories/Feedback/Tooltip.stories.tsx +5 -5
  177. package/src/stories/Feedback/Tutorial.stories.tsx +13 -13
  178. package/src/stories/Input/Button.stories.tsx +26 -26
  179. package/src/stories/Input/DatePicker.stories.tsx +48 -8
  180. package/src/stories/Input/IconButtons.stories.tsx +6 -6
  181. package/src/stories/Input/MultiCheckBox.stories.tsx +15 -15
  182. package/src/stories/Input/OtpInput.stories.tsx +5 -5
  183. package/src/stories/Input/Password.stories.tsx +7 -7
  184. package/src/stories/Input/RadioGroup.stories.tsx +14 -14
  185. package/src/stories/Input/SearchBar.stories.tsx +10 -10
  186. package/src/stories/Input/SingleCheckBox.stories.tsx +7 -7
  187. package/src/stories/Input/SingleSelect.stories.tsx +47 -47
  188. package/src/stories/Input/Switch.stories.tsx +22 -22
  189. package/src/stories/Input/TextField.stories.tsx +47 -47
  190. package/src/stories/Input/TimePicker.stories.tsx +44 -7
  191. package/src/stories/Layout/AppHeader.stories.tsx +13 -13
  192. package/src/stories/Layout/TabsLayout.stories.tsx +24 -24
  193. package/src/stories/Navigation/ConfirmDialog.stories.tsx +90 -0
  194. package/src/stories/Navigation/DialogButton.stories.tsx +38 -45
  195. package/src/stories/Navigation/DropDownMenu.stories.tsx +24 -24
  196. package/src/stories/Navigation/FloatingSidebar.stories.tsx +23 -23
  197. package/src/stories/Navigation/ImportDialog.stories.tsx +45 -0
  198. package/src/stories/Navigation/PreviewFiles.stories.tsx +80 -0
  199. package/src/stories/Navigation/Stepper.stories.tsx +15 -15
  200. package/src/stories/Navigation/TabsContainer.stories.tsx +11 -11
  201. package/src/themes/MuiThemeProvider.tsx +3 -3
  202. package/src/themes/colorTokens/colorPalette.tsx +38 -38
  203. package/src/themes/colorTokens/darkColorTokens.tsx +1 -1
  204. package/src/themes/colorTokens/lightColorTokens.ts +1 -1
  205. package/src/themes/commonTheme.ts +13 -3
  206. package/src/themes/customCssBaseline.ts +2 -2
  207. package/src/themes/darkTheme.ts +4 -4
  208. package/src/themes/export.ts +3 -3
  209. package/src/themes/lightTheme.ts +4 -4
  210. package/src/utils/constants.ts +5 -5
  211. package/src/utils/logout.ts +8 -8
  212. package/tsconfig.json +2 -6
  213. package/src/assets/images/admin.png +0 -0
  214. package/src/assets/images/campx_logo__full_primary.png +0 -0
  215. package/src/assets/images/collegex.png +0 -0
  216. package/src/assets/images/commutex.png +0 -0
  217. package/src/assets/images/enrollx.png +0 -0
  218. package/src/assets/images/examx.png +0 -0
  219. package/src/assets/images/hostelx copy.png +0 -0
  220. package/src/assets/images/hostelx.png +0 -0
  221. package/src/assets/images/index.ts +0 -25
  222. package/src/assets/images/payx.png +0 -0
  223. package/src/assets/images/pepolex.png +0 -0
  224. package/src/assets/images/svg/campx-logo.svg +0 -32
  225. package/src/assets/images/svg/commutex_small.svg +0 -11
  226. package/src/assets/images/svg/enroll_logo.svg +0 -9
  227. package/src/assets/images/svg/exams_small.svg +0 -12
  228. package/src/assets/images/svg/help-icon.svg +0 -8
  229. package/src/assets/images/svg/hostel_small.svg +0 -13
  230. package/src/assets/images/svg/payx_small.svg +0 -16
  231. package/src/assets/images/svg/people_small.svg +0 -9
  232. package/src/assets/images/svg/squareSmall.svg +0 -9
  233. package/src/assets/images/svg/square_small.svg +0 -9
  234. package/src/components/Feedback/exports.ts +0 -5
  235. package/src/components/Layout/exports.ts +0 -4
  236. package/src/components/Navigation/exports.ts +0 -10
  237. package/src/stories/Navigation/Breadcrumbs.stories.tsx +0 -34
  238. package/src/utils/applications.ts +0 -140
  239. package/src/utils/campxAxios.ts +0 -18
  240. package/src/utils/imageMap.ts +0 -22
@@ -1,56 +1,56 @@
1
1
  // Import React and other necessary elements
2
- import { Meta } from "@storybook/react";
2
+ import { Meta } from '@storybook/react';
3
3
 
4
4
  // Make sure your TextField import is correct
5
- import { InputAdornment as MuiInputAdornment } from "@mui/material";
6
- import { Icons } from "../../components/Assets/Icons/Icons";
5
+ import { InputAdornment as MuiInputAdornment } from '@mui/material';
6
+ import { Icons } from '../../components/Assets/Icons/Icons';
7
7
  import {
8
8
  ToolTipContent,
9
9
  Tooltip,
10
- } from "../../components/Feedback/Tooltip/Tooltip";
10
+ } from '../../components/Feedback/Tooltip/Tooltip';
11
11
  import {
12
12
  TextField,
13
13
  TextFieldProps,
14
- } from "../../components/Input/TextField/TextField";
14
+ } from '../../components/Input/TextField/TextField';
15
15
 
16
16
  // Define the default export with Meta type including the component type
17
17
  export default {
18
- title: "Input/TextField",
18
+ title: 'Input/TextField',
19
19
  component: TextField,
20
- tags: ["autodocs"],
20
+ tags: ['autodocs'],
21
21
  argTypes: {
22
22
  name: {
23
- control: "text",
24
- description: "The name of the input field, used in form submissions.",
23
+ control: 'text',
24
+ description: 'The name of the input field, used in form submissions.',
25
25
  },
26
26
  label: {
27
- control: "text",
28
- description: "The label text displayed above the input field.",
27
+ control: 'text',
28
+ description: 'The label text displayed above the input field.',
29
29
  },
30
30
  value: {
31
- control: "text",
32
- description: "The input value of the TextField.",
31
+ control: 'text',
32
+ description: 'The input value of the TextField.',
33
33
  },
34
34
  required: {
35
- control: "boolean",
36
- description: "Specifies if the field is required for form submission.",
35
+ control: 'boolean',
36
+ description: 'Specifies if the field is required for form submission.',
37
37
  },
38
38
  placeholder: {
39
- control: "text",
40
- description: "The placeholder value of the TextField.",
39
+ control: 'text',
40
+ description: 'The placeholder value of the TextField.',
41
41
  },
42
42
  disabled: {
43
- control: "boolean",
44
- description: "Controls whether the TextField is disabled or not.",
43
+ control: 'boolean',
44
+ description: 'Controls whether the TextField is disabled or not.',
45
45
  },
46
46
  helperText: {
47
- control: "text",
47
+ control: 'text',
48
48
  description:
49
- "Helper text that appears below the text field to provide additional guidance.",
49
+ 'Helper text that appears below the text field to provide additional guidance.',
50
50
  },
51
51
  error: {
52
- control: "boolean",
53
- description: "Shows how the error message is shown",
52
+ control: 'boolean',
53
+ description: 'Shows how the error message is shown',
54
54
  },
55
55
  },
56
56
  } as Meta<typeof TextField>;
@@ -59,20 +59,20 @@ export default {
59
59
  export const Primary = {
60
60
  render: (args: TextFieldProps) => <TextField {...args} />,
61
61
  args: {
62
- label: "First Name",
63
- name: "firstName",
64
- value: "",
62
+ label: 'First Name',
63
+ name: 'firstName',
64
+ value: '',
65
65
  required: true,
66
- helperText: "",
66
+ helperText: '',
67
67
  },
68
68
  };
69
69
 
70
70
  export const Disabled = {
71
71
  render: (args: TextFieldProps) => <TextField {...args} />,
72
72
  args: {
73
- label: "Disabled Input",
74
- name: "disabledInput",
75
- value: "Disabled",
73
+ label: 'Disabled Input',
74
+ name: 'disabledInput',
75
+ value: 'Disabled',
76
76
  required: false,
77
77
  disabled: true,
78
78
  },
@@ -81,9 +81,9 @@ export const Disabled = {
81
81
  export const WithValue = {
82
82
  render: (args: TextFieldProps) => <TextField {...args} />,
83
83
  args: {
84
- label: "Last Name",
85
- name: "lastName",
86
- value: "Doe",
84
+ label: 'Last Name',
85
+ name: 'lastName',
86
+ value: 'Doe',
87
87
  required: false,
88
88
  },
89
89
  };
@@ -91,18 +91,18 @@ export const WithValue = {
91
91
  export const InputWithPlaceholder = {
92
92
  render: (args: TextFieldProps) => <TextField {...args} />,
93
93
  args: {
94
- label: "Mobile",
95
- value: "",
96
- placeholder: "10 digit phone number",
94
+ label: 'Mobile',
95
+ value: '',
96
+ placeholder: '10 digit phone number',
97
97
  },
98
98
  };
99
99
 
100
100
  export const ErrorInput = {
101
101
  render: (args: TextFieldProps) => <TextField {...args} />,
102
102
  args: {
103
- label: "First Name",
103
+ label: 'First Name',
104
104
  required: true,
105
- value: "",
105
+ value: '',
106
106
  error: true,
107
107
  helperText: "Name can't be empty",
108
108
  },
@@ -111,11 +111,11 @@ export const ErrorInput = {
111
111
  export const SuccessInput = {
112
112
  render: (args: TextFieldProps) => <TextField {...args} />,
113
113
  args: {
114
- label: "Pan Card",
114
+ label: 'Pan Card',
115
115
  required: true,
116
- value: "KAHPS9888B",
117
- color: "success",
118
- helperText: "Pan Card Successfully Verified",
116
+ value: 'KAHPS9888B',
117
+ color: 'success',
118
+ helperText: 'Pan Card Successfully Verified',
119
119
  focused: true,
120
120
  },
121
121
  };
@@ -123,10 +123,10 @@ export const SuccessInput = {
123
123
  export const WarningInput = {
124
124
  render: (args: TextFieldProps) => <TextField {...args} />,
125
125
  args: {
126
- label: "Pan Card",
126
+ label: 'Pan Card',
127
127
  required: true,
128
- value: "KAHPS9888B",
129
- color: "warning",
128
+ value: 'KAHPS9888B',
129
+ color: 'warning',
130
130
  helperText: `Pan Card doesn't match with the provided name`,
131
131
  focused: true,
132
132
  },
@@ -135,7 +135,7 @@ export const WarningInput = {
135
135
  export const InfoInput = {
136
136
  render: (args: TextFieldProps) => <TextField {...args} />,
137
137
  args: {
138
- label: "Info",
138
+ label: 'Info',
139
139
  required: true,
140
140
  InputProps: {
141
141
  endAdornment: (
@@ -144,7 +144,7 @@ export const InfoInput = {
144
144
  title={
145
145
  <ToolTipContent
146
146
  message={
147
- "This is the info tooltip !! This is the info tooltip !! This is the info tooltip !!"
147
+ 'This is the info tooltip !! This is the info tooltip !! This is the info tooltip !!'
148
148
  }
149
149
  />
150
150
  }
@@ -21,7 +21,11 @@ export default meta;
21
21
  type Story = StoryObj<typeof TimePicker>;
22
22
 
23
23
  export const Primary: Story = {
24
- args: { label: 'Time Picker (Hours Minutes Meridian)', name: 'time-picker', required: true },
24
+ args: {
25
+ label: 'Time Picker (Hours Minutes Meridian)',
26
+ name: 'time-picker',
27
+ required: true,
28
+ },
25
29
  };
26
30
 
27
31
  export const Secondary: Story = {
@@ -53,7 +57,12 @@ export const Quaternary: Story = {
53
57
  };
54
58
 
55
59
  export const WithDefaultValue: Story = {
56
- args: { ...Primary.args, label: 'With Default Value', required: false, value: new Date('2024/9/15 15:30') },
60
+ args: {
61
+ ...Primary.args,
62
+ label: 'With Default Value',
63
+ required: false,
64
+ value: new Date('2024/9/15 15:30'),
65
+ },
57
66
  };
58
67
 
59
68
  export const WithPlaceHolderHelperText: Story = {
@@ -67,15 +76,34 @@ export const WithPlaceHolderHelperText: Story = {
67
76
  };
68
77
 
69
78
  export const WithDifferentTimeSteps: Story = {
70
- args: { ...Primary.args, label: 'With Time Steps', required: false, timeSteps: { hours: 2, minutes: 15 } },
79
+ args: {
80
+ ...Primary.args,
81
+ label: 'With Time Steps',
82
+ required: false,
83
+ timeSteps: { hours: 2, minutes: 15 },
84
+ },
71
85
  };
72
86
 
73
87
  export const DisablePast: Story = {
74
- args: { ...Primary.args, label: 'Disable Past', format: 'HH:mm', ampm: false, required: false, disablePast: true },
88
+ args: {
89
+ ...Primary.args,
90
+ label: 'Disable Past',
91
+ format: 'HH:mm',
92
+ ampm: false,
93
+ required: false,
94
+ disablePast: true,
95
+ },
75
96
  };
76
97
 
77
98
  export const DisableFuture: Story = {
78
- args: { ...Primary.args, label: 'Disable Future', format: 'HH:mm', ampm: false, required: false, disableFuture: true },
99
+ args: {
100
+ ...Primary.args,
101
+ label: 'Disable Future',
102
+ format: 'HH:mm',
103
+ ampm: false,
104
+ required: false,
105
+ disableFuture: true,
106
+ },
79
107
  };
80
108
 
81
109
  export const MinimumTime: Story = {
@@ -106,7 +134,10 @@ export const DisableSpecificTime: Story = {
106
134
  label: 'Disable Specific Time (12AM - 9AM)',
107
135
  ampm: false,
108
136
  required: false,
109
- shouldDisableTime: (time: Date, clockType: 'hours' | 'minutes' | 'seconds') => {
137
+ shouldDisableTime: (
138
+ time: Date,
139
+ clockType: 'hours' | 'minutes' | 'seconds',
140
+ ) => {
110
141
  if (clockType === 'hours') {
111
142
  const today = startOfDay(new Date());
112
143
  const startTime = today;
@@ -119,5 +150,11 @@ export const DisableSpecificTime: Story = {
119
150
  };
120
151
 
121
152
  export const ReadOnly: Story = {
122
- args: { ...Primary.args, label: 'Read Only', required: false, disabled: true, value: new Date('2024/9/15 15:30') },
153
+ args: {
154
+ ...Primary.args,
155
+ label: 'Read Only',
156
+ required: false,
157
+ disabled: true,
158
+ value: new Date('2024/9/15 15:30'),
159
+ },
123
160
  };
@@ -1,20 +1,20 @@
1
- import { Meta, StoryObj } from "@storybook/react";
1
+ import { Meta, StoryObj } from '@storybook/react';
2
2
 
3
- import { Box } from "@mui/material";
3
+ import { Box } from '@mui/material';
4
4
  import {
5
5
  AppHeader,
6
6
  AppHeaderProps,
7
- } from "../../components/Layout/AppHeader/AppHeader";
7
+ } from '../../components/Layout/AppHeader/AppHeader';
8
8
 
9
9
  // Define the default export with Meta type including the component type
10
10
  const meta: Meta<typeof AppHeader> = {
11
- title: "Layout/AppHeader",
11
+ title: 'Layout/AppHeader',
12
12
  component: AppHeader,
13
- tags: ["autodocs"],
13
+ tags: ['autodocs'],
14
14
  argTypes: {
15
15
  actions: {
16
- control: "object",
17
- description: "Custom actions to be displayed.",
16
+ control: 'object',
17
+ description: 'Custom actions to be displayed.',
18
18
  },
19
19
  },
20
20
  };
@@ -27,20 +27,20 @@ export const Primary: Story = {
27
27
  render: (args: AppHeaderProps) => (
28
28
  <Box
29
29
  sx={{
30
- width: "100%",
31
- height: "300px",
32
- alignContent: "center",
33
- justifyContent: "center",
30
+ width: '100%',
31
+ height: '300px',
32
+ alignContent: 'center',
33
+ justifyContent: 'center',
34
34
  }}
35
35
  >
36
36
  <AppHeader {...args} />
37
37
  </Box>
38
38
  ),
39
39
  args: {
40
- clientName: "Anurag University",
40
+ clientName: 'Anurag University',
41
41
  actions: [<p>asdjflsf</p>],
42
42
  // appsMenu: <AppsMenu apps={["exams", "square", "admin"]} />,
43
- userFullName: "Srikanth Yellapragada",
43
+ userFullName: 'Srikanth Yellapragada',
44
44
  collapsed: false,
45
45
  },
46
46
  };
@@ -1,8 +1,8 @@
1
- import { Meta, StoryObj } from "@storybook/react/*";
2
- import { TabsLayout } from "../../components/export";
1
+ import { Meta, StoryObj } from '@storybook/react/*';
2
+ import { TabsLayout } from '../../components/export';
3
3
 
4
4
  const meta: Meta<typeof TabsLayout> = {
5
- title: "Layout/TabsLayout",
5
+ title: 'Layout/TabsLayout',
6
6
  component: TabsLayout,
7
7
  argTypes: {},
8
8
  };
@@ -14,39 +14,39 @@ export const Primary: Story = {
14
14
  args: {
15
15
  menu: [
16
16
  {
17
- path: "degrees",
18
- title: "Degrees",
19
- permissionKey: "degreesPermission",
17
+ path: 'degrees',
18
+ title: 'Degrees',
19
+ permissionKey: 'degreesPermission',
20
20
  },
21
21
  {
22
- path: "calendar",
23
- title: "Academic Calendar",
24
- permissionKey: "calendarPermission",
22
+ path: 'calendar',
23
+ title: 'Academic Calendar',
24
+ permissionKey: 'calendarPermission',
25
25
  },
26
26
  {
27
- path: "programs",
28
- title: "Programs",
29
- permissionKey: "programsPermission",
27
+ path: 'programs',
28
+ title: 'Programs',
29
+ permissionKey: 'programsPermission',
30
30
  },
31
31
  {
32
- path: "semester",
33
- title: "Semester",
34
- permissionKey: "semesterPermission",
32
+ path: 'semester',
33
+ title: 'Semester',
34
+ permissionKey: 'semesterPermission',
35
35
  },
36
36
  {
37
- path: "courses",
38
- title: "Courses",
39
- permissionKey: "coursesPermission",
37
+ path: 'courses',
38
+ title: 'Courses',
39
+ permissionKey: 'coursesPermission',
40
40
  },
41
41
  {
42
- path: "professors",
43
- title: "Professors",
44
- permissionKey: "professorsPermission",
42
+ path: 'professors',
43
+ title: 'Professors',
44
+ permissionKey: 'professorsPermission',
45
45
  },
46
46
  {
47
- path: "Faculties",
48
- title: "Faculties",
49
- permissionKey: "facultiesPermission",
47
+ path: 'Faculties',
48
+ title: 'Faculties',
49
+ permissionKey: 'facultiesPermission',
50
50
  },
51
51
  ],
52
52
  },
@@ -0,0 +1,90 @@
1
+ import { Button } from '@mui/material';
2
+ import { Meta, StoryObj } from '@storybook/react';
3
+ import { useState } from 'react';
4
+ import { ConfirmDialog, ConfirmDialogProps } from '../../components/export';
5
+
6
+ const meta: Meta<typeof ConfirmDialog> = {
7
+ title: 'Navigation/ConfirmDialog',
8
+ component: ConfirmDialog,
9
+ tags: ['autodocs'],
10
+ argTypes: {
11
+ isOpen: {
12
+ description: 'Controls the visibility of the dialog',
13
+ },
14
+ title: {
15
+ description: 'Title text of the dialog',
16
+ control: 'text',
17
+ },
18
+ message: {
19
+ description: 'Message text displayed in the dialog',
20
+ control: 'text',
21
+ },
22
+ type: {
23
+ description: "Type of confirmation dialog ('confirm' or 'delete')",
24
+ control: {
25
+ type: 'select',
26
+ options: ['confirm', 'delete'],
27
+ },
28
+ },
29
+ onConfirm: {
30
+ description: 'Function to execute on confirm',
31
+ action: 'confirmed',
32
+ },
33
+ onCancel: {
34
+ description: 'Function to execute on cancel',
35
+ action: 'canceled',
36
+ },
37
+ },
38
+ };
39
+
40
+ export default meta;
41
+
42
+ type Story = StoryObj<typeof ConfirmDialog>;
43
+
44
+ export const Default: Story = {
45
+ render: (args: ConfirmDialogProps) => {
46
+ const [open, setOpen] = useState(false);
47
+ return (
48
+ <>
49
+ <Button variant="contained" onClick={() => setOpen(true)}>
50
+ Show Confirm Dialog
51
+ </Button>
52
+ <ConfirmDialog
53
+ {...args}
54
+ isOpen={open}
55
+ onCancel={() => setOpen(false)}
56
+ onConfirm={() => setOpen(false)}
57
+ />
58
+ </>
59
+ );
60
+ },
61
+ args: {
62
+ title: 'Are you sure?',
63
+ message: 'Do you really want to perform this action?',
64
+ type: 'confirm',
65
+ },
66
+ };
67
+
68
+ export const DeleteConfirmation: Story = {
69
+ render: (args: ConfirmDialogProps) => {
70
+ const [open, setOpen] = useState(false);
71
+ return (
72
+ <>
73
+ <Button variant="contained" onClick={() => setOpen(true)}>
74
+ Show Delete Confirm Dialog
75
+ </Button>
76
+ <ConfirmDialog
77
+ {...args}
78
+ isOpen={open}
79
+ onCancel={() => setOpen(false)}
80
+ onConfirm={() => setOpen(false)}
81
+ />
82
+ </>
83
+ );
84
+ },
85
+ args: {
86
+ title: 'Confirm Delete',
87
+ message: 'Are you sure you want to delete this item?',
88
+ type: 'delete',
89
+ },
90
+ };
@@ -1,34 +1,29 @@
1
- import { Box, Button, Typography } from "@mui/material";
2
- import { Meta, StoryObj } from "@storybook/react/*";
1
+ import { Box, Button, Typography } from '@mui/material';
2
+ import { Meta, StoryObj } from '@storybook/react/*';
3
3
  import DialogButton, {
4
4
  DialogButtonProps,
5
- } from "../../components/Navigation/DialogButton/DialogButton";
5
+ } from '../../components/Navigation/DialogButton/DialogButton';
6
6
 
7
7
  // Define the default export with Meta type including the component type
8
8
  const meta: Meta<typeof DialogButton> = {
9
- title: "Navigation/DialogButton",
9
+ title: 'Navigation/DialogButton',
10
10
  component: DialogButton,
11
- tags: ["autodocs"],
11
+ tags: ['autodocs'],
12
12
  argTypes: {
13
13
  anchor: {
14
14
  description:
15
- "A function that returns a React node used as the dropdown anchor. It provides a method to open the dialog.",
16
- control: "object",
15
+ 'A function that returns a React node used as the dropdown anchor. It provides a method to open the dialog.',
16
+ control: 'object',
17
17
  },
18
18
  content: {
19
19
  description:
20
- "A function that returns a React node used as the dialog content. It provides a method to close the dialog.",
21
- control: "object",
22
- },
23
- dialogProps: {
24
- description:
25
- "Props to pass to the MUI Dialog component. Allows customization of the dialog's appearance and behavior.",
26
- control: "object",
20
+ 'A function that returns a React node used as the dialog content. It provides a method to close the dialog.',
21
+ control: 'object',
27
22
  },
28
23
  title: {
29
24
  description:
30
- "The title of the dialog. This can be a string or a React node.",
31
- control: "text",
25
+ 'The title of the dialog. This can be a string or a React node.',
26
+ control: 'text',
32
27
  },
33
28
  },
34
29
  };
@@ -48,16 +43,16 @@ export const WithMaxWidthXs: Story = {
48
43
  <>
49
44
  <Box
50
45
  sx={{
51
- height: "100px",
52
- width: "100px",
46
+ height: '100px',
47
+ width: '100px',
53
48
  }}
54
49
  ></Box>
55
50
  </>
56
51
  ),
57
- dialogProps: {
58
- maxWidth: "xs",
59
- },
60
- title: "Add Title Name",
52
+
53
+ maxWidth: 'xs',
54
+
55
+ title: 'Add Title Name',
61
56
  },
62
57
  };
63
58
 
@@ -73,16 +68,16 @@ export const WithMaxWidthSm: Story = {
73
68
  <>
74
69
  <Box
75
70
  sx={{
76
- height: "500px",
77
- width: "100px",
71
+ height: '500px',
72
+ width: '100px',
78
73
  }}
79
74
  ></Box>
80
75
  </>
81
76
  ),
82
- dialogProps: {
83
- maxWidth: "sm",
84
- },
85
- title: "Add Title Name",
77
+
78
+ maxWidth: 'sm',
79
+
80
+ title: 'Add Title Name',
86
81
  },
87
82
  };
88
83
 
@@ -96,13 +91,13 @@ export const WithMaxWidthMd: Story = {
96
91
  ),
97
92
  content: ({ close }: { close: (e: any) => void }) => (
98
93
  <>
99
- <Typography> Hello</Typography>
94
+ <Typography>Hello</Typography>
100
95
  </>
101
96
  ),
102
- dialogProps: {
103
- maxWidth: "md",
104
- },
105
- title: "Add Title Name",
97
+
98
+ maxWidth: 'md',
99
+
100
+ title: 'Add Title Name',
106
101
  },
107
102
  };
108
103
 
@@ -118,16 +113,16 @@ export const WithMaxWidthLg: Story = {
118
113
  <>
119
114
  <Box
120
115
  sx={{
121
- height: "500px",
122
- width: "100px",
116
+ height: '500px',
117
+ width: '100px',
123
118
  }}
124
119
  ></Box>
125
120
  </>
126
121
  ),
127
- dialogProps: {
128
- maxWidth: "lg",
129
- },
130
- title: "Add Title Name",
122
+
123
+ maxWidth: 'lg',
124
+
125
+ title: 'Add Title Name',
131
126
  },
132
127
  };
133
128
 
@@ -143,15 +138,13 @@ export const WithMaxWidthXl: Story = {
143
138
  <>
144
139
  <Box
145
140
  sx={{
146
- height: "500px",
147
- width: "100px",
141
+ height: '500px',
142
+ width: '100px',
148
143
  }}
149
144
  ></Box>
150
145
  </>
151
146
  ),
152
- dialogProps: {
153
- maxWidth: "xl",
154
- },
155
- title: "Add Title Name",
147
+ maxWidth: 'xl',
148
+ title: 'Add Title Name',
156
149
  },
157
150
  };