@campxdev/react-blueprint 1.1.8 → 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.
- package/package.json +2 -2
- package/src/AppContent.tsx +6 -6
- package/src/assets/fonts/heebo/index.ts +2 -2
- package/src/assets/fonts/poppins/index.ts +5 -5
- package/src/assets/images/gif/index.ts +4 -0
- package/src/assets/images/gif/upload-file.gif +0 -0
- package/src/assets/images/gif/uploading-file.gif +0 -0
- package/src/components/Assets/ErrorPages/InternalServerError.tsx +7 -7
- package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +7 -7
- package/src/components/Assets/ErrorPages/NoItemFound.tsx +7 -7
- package/src/components/Assets/ErrorPages/PageNotFound.tsx +5 -5
- package/src/components/Assets/ErrorPages/UnAuthorized.tsx +6 -6
- package/src/components/Assets/ErrorPages/styles.tsx +15 -15
- package/src/components/Assets/Icons/IconComponents/AcademicIcon.tsx +7 -1
- package/src/components/Assets/Icons/IconComponents/ActiveDevicesIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/AdminIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/AdministratorIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/AlertFilledIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ArrowBackIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/AttachmentIcon.tsx +32 -0
- package/src/components/Assets/Icons/IconComponents/BulbIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/CampxFullLogoIcon.tsx +3 -3
- package/src/components/Assets/Icons/IconComponents/CampxIcon.tsx +2 -2
- package/src/components/Assets/Icons/IconComponents/CareerIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/CheckedCheckBoxIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/CheckedRadioIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ClogWheelIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/CollapseIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/CrossIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/DashBoardIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/DeleteIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/DeviceIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/DocumentIcon.tsx +52 -0
- package/src/components/Assets/Icons/IconComponents/DownloadIcon.tsx +52 -0
- package/src/components/Assets/Icons/IconComponents/EditIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ExamResultIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ExcelIcon.tsx +56 -0
- package/src/components/Assets/Icons/IconComponents/ExpandIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ExportIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/FilterIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/HelpIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/HomeIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ImageIcon.tsx +44 -0
- package/src/components/Assets/Icons/IconComponents/InfoFilledIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/InfoIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/InstitutionsIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/LeftIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/LocationIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/LogoutIcon.tsx +2 -2
- package/src/components/Assets/Icons/IconComponents/NavigationIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/NoteIcon.tsx +7 -1
- package/src/components/Assets/Icons/IconComponents/NotificationIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/PdfIcon.tsx +52 -0
- package/src/components/Assets/Icons/IconComponents/ProductFeaturesIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ProfileIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/RedirectIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/RedoIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/RightIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/SaveIcon.tsx +39 -39
- package/src/components/Assets/Icons/IconComponents/SearchIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ShareIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/SuccessFilledIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/TicketsIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/UncheckCheckBoxIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/UncheckedRadioIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/ViewIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/VisibiityOffIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/VisibilityIcon.tsx +1 -1
- package/src/components/Assets/Icons/IconComponents/WarningFilledIcon.tsx +1 -1
- package/src/components/Assets/Icons/Icons.tsx +12 -0
- package/src/components/Assets/export.ts +6 -6
- package/src/components/Charts/BarChart/BarChart.tsx +17 -19
- package/src/components/Charts/LineChart/LineChart.tsx +12 -14
- package/src/components/Charts/PieChart/PieChart.tsx +8 -8
- package/src/components/Charts/TreeMap/TreeMap.tsx +15 -15
- package/src/components/Charts/export.ts +4 -4
- package/src/components/Charts/types/types.ts +3 -3
- package/src/components/DataDisplay/Accordion/Accordion.tsx +2 -0
- package/src/components/DataDisplay/Avatar/Avatar.tsx +14 -3
- package/src/components/DataDisplay/Card/Card.tsx +18 -18
- package/src/components/DataDisplay/Card/styles.tsx +24 -25
- package/src/components/DataDisplay/Chips/Chips.tsx +14 -14
- package/src/components/DataDisplay/DataTable/DataTable.tsx +4 -1
- package/src/components/DataDisplay/DataTable/TablePagination.tsx +10 -10
- package/src/components/DataDisplay/SidePanel/SidePanel.tsx +1 -1
- package/src/components/DataDisplay/Typography/Typography.tsx +1 -1
- package/src/components/Feedback/Alert/Alert.tsx +8 -8
- package/src/components/Feedback/Snackbar/Snackbar.tsx +27 -27
- package/src/components/Feedback/Spinner/Spinner.tsx +2 -2
- package/src/components/Feedback/Tooltip/Tooltip.tsx +6 -6
- package/src/components/Feedback/Tutorial/Tutorial.tsx +45 -45
- package/src/components/Feedback/export.ts +5 -0
- package/src/components/Image/Image.tsx +8 -8
- package/src/components/Input/Button/Button.tsx +2 -2
- package/src/components/Input/DatePicker/DatePicker.tsx +18 -4
- package/src/components/Input/FormActions/FormActions.tsx +15 -4
- package/src/components/Input/FormControlWrapper/FormControlWrapper.tsx +20 -5
- package/src/components/Input/HelpButton/HelpButton.stories.tsx +9 -9
- package/src/components/Input/HelpButton/HelpButton.tsx +4 -4
- package/src/components/Input/IconButtons/IconButtons/DeleteButton.tsx +2 -2
- package/src/components/Input/IconButtons/IconButtons/EditButton.tsx +2 -2
- package/src/components/Input/IconButtons/IconButtons/RedirectButton.tsx +2 -2
- package/src/components/Input/IconButtons/IconButtons/ViewButton.tsx +2 -2
- package/src/components/Input/LabelWrapper/LabelWrapper.tsx +5 -5
- package/src/components/Input/MultiCheckBox/MultiCheckBox.tsx +6 -6
- package/src/components/Input/OtpInput/OtpInput.tsx +17 -17
- package/src/components/Input/PasswordField/PasswordField.tsx +8 -8
- package/src/components/Input/RadioGroup/RadioGroup.tsx +5 -5
- package/src/components/Input/SearchBar/SearchBar.tsx +20 -20
- package/src/components/Input/SingleCheckBox/SIngleCheckBox.tsx +5 -5
- package/src/components/Input/SingleSelect/SingleSelect.tsx +39 -6
- package/src/components/Input/Switch/Switch.tsx +1 -1
- package/src/components/Input/TextField/TextField.tsx +3 -3
- package/src/components/Input/TimePicker/TimePicker.tsx +18 -4
- package/src/components/Input/components/FetchingOptionsLoader.tsx +3 -3
- package/src/components/Input/styles.tsx +6 -6
- package/src/components/Layout/AppHeader/AppHeader.tsx +10 -12
- package/src/components/Layout/AppHeader/AppHeaderActions/CogWheelMenu.tsx +5 -5
- package/src/components/Layout/AppHeader/AppHeaderActions/HeaderActions.tsx +6 -6
- package/src/components/Layout/AppHeader/AppHeaderActions/SwitchInstitution.tsx +37 -37
- package/src/components/Layout/AppHeader/AppHeaderActions/UserBox.tsx +28 -28
- package/src/components/Layout/AppHeader/styles/styles.tsx +24 -24
- package/src/components/Layout/PageHeader/PageHeader.tsx +8 -3
- package/src/components/Layout/TabsLayout/Tabs.tsx +16 -16
- package/src/components/Layout/TabsLayout/TabsLayout.tsx +6 -6
- package/src/components/Layout/export.ts +4 -0
- package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +35 -23
- package/src/components/Navigation/ConfirmDialog/ConfirmDialog.tsx +43 -48
- package/src/components/Navigation/Dialog/Dialog.tsx +33 -0
- package/src/components/Navigation/DialogButton/DialogButton.tsx +17 -81
- package/src/components/Navigation/DropDownMenu/DropDownButton.tsx +4 -4
- package/src/components/Navigation/DropDownMenu/DropDownIcon.tsx +4 -4
- package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +8 -8
- package/src/components/Navigation/DropDownMenu/DropdownMenuItem.tsx +3 -3
- package/src/components/Navigation/DropDownMenu/styles.tsx +13 -13
- package/src/components/Navigation/PreviewFiles/PreviewFiles.tsx +165 -0
- package/src/components/Navigation/Sidebar/Components.tsx +18 -18
- package/src/components/Navigation/Sidebar/MenuItem.tsx +1 -1
- package/src/components/Navigation/Sidebar/SubMenuItem.tsx +2 -1
- package/src/components/Navigation/Sidebar/interfaces.ts +1 -1
- package/src/components/Navigation/Sidebar/styles.tsx +64 -64
- package/src/components/Navigation/Stepper/Stepper.tsx +5 -5
- package/src/components/Navigation/Stepper/StepperComponents.tsx +15 -15
- package/src/components/Navigation/TabsContainer/TabsContainer.tsx +4 -4
- package/src/components/Navigation/UploadDialog/LoadingUploadDialogContainer.tsx +23 -0
- package/src/components/Navigation/UploadDialog/Styles.tsx +34 -0
- package/src/components/Navigation/UploadDialog/UploadDialog.tsx +143 -0
- package/src/components/Navigation/UploadDialog/UploadDialogContainer.tsx +82 -0
- package/src/components/Navigation/{exports.ts → export.ts} +4 -0
- package/src/components/export.ts +7 -7
- package/src/index.tsx +2 -2
- package/src/store/activeStore.ts +1 -1
- package/src/stories/Assets/Icons.stories.tsx +6 -6
- package/src/stories/Charts/BarChart.stories.tsx +56 -56
- package/src/stories/Charts/LineChart.stories.tsx +49 -49
- package/src/stories/Charts/PieChart.stories.tsx +53 -53
- package/src/stories/Charts/Treemap.stories.tsx +122 -122
- package/src/stories/DataDisplay/AccordionGroup.stories.tsx +11 -12
- package/src/stories/DataDisplay/Card.stories.tsx +34 -34
- package/src/stories/DataDisplay/Chips.stories.tsx +10 -10
- package/src/stories/DataDisplay/CircularAvatar.stories.tsx +6 -6
- package/src/stories/DataDisplay/DataTable.stories.tsx +32 -32
- package/src/stories/DataDisplay/SidePanel.stories.tsx +14 -14
- package/src/stories/DataDisplay/SquareAvatar.stories.tsx +15 -15
- package/src/stories/DesignSystem/colorTokens.stories.tsx +10 -10
- package/src/stories/DesignSystem/typography.stories.tsx +19 -19
- package/src/stories/Feedback/Alert.stories.tsx +9 -9
- package/src/stories/Feedback/Snackbar.stories.tsx +11 -11
- package/src/stories/Feedback/Spinner.stories.tsx +4 -4
- package/src/stories/Feedback/Tooltip.stories.tsx +5 -5
- package/src/stories/Feedback/Tutorial.stories.tsx +13 -13
- package/src/stories/Input/Button.stories.tsx +26 -26
- package/src/stories/Input/DatePicker.stories.tsx +48 -8
- package/src/stories/Input/IconButtons.stories.tsx +6 -6
- package/src/stories/Input/MultiCheckBox.stories.tsx +15 -15
- package/src/stories/Input/OtpInput.stories.tsx +5 -5
- package/src/stories/Input/Password.stories.tsx +7 -7
- package/src/stories/Input/RadioGroup.stories.tsx +14 -14
- package/src/stories/Input/SearchBar.stories.tsx +10 -10
- package/src/stories/Input/SingleCheckBox.stories.tsx +7 -7
- package/src/stories/Input/SingleSelect.stories.tsx +47 -47
- package/src/stories/Input/Switch.stories.tsx +22 -22
- package/src/stories/Input/TextField.stories.tsx +47 -47
- package/src/stories/Input/TimePicker.stories.tsx +44 -7
- package/src/stories/Layout/AppHeader.stories.tsx +13 -13
- package/src/stories/Layout/TabsLayout.stories.tsx +24 -24
- package/src/stories/Navigation/ConfirmDialog.stories.tsx +12 -2
- package/src/stories/Navigation/DialogButton.stories.tsx +38 -45
- package/src/stories/Navigation/DropDownMenu.stories.tsx +24 -24
- package/src/stories/Navigation/FloatingSidebar.stories.tsx +23 -23
- package/src/stories/Navigation/ImportDialog.stories.tsx +45 -0
- package/src/stories/Navigation/PreviewFiles.stories.tsx +80 -0
- package/src/stories/Navigation/Stepper.stories.tsx +15 -15
- package/src/stories/Navigation/TabsContainer.stories.tsx +11 -11
- package/src/themes/MuiThemeProvider.tsx +3 -3
- package/src/themes/colorTokens/colorPalette.tsx +38 -38
- package/src/themes/colorTokens/darkColorTokens.tsx +1 -1
- package/src/themes/colorTokens/lightColorTokens.ts +1 -1
- package/src/themes/commonTheme.ts +13 -3
- package/src/themes/customCssBaseline.ts +2 -2
- package/src/themes/darkTheme.ts +4 -4
- package/src/themes/export.ts +3 -3
- package/src/themes/lightTheme.ts +4 -4
- package/src/utils/constants.ts +5 -5
- package/src/utils/logout.ts +8 -8
- package/src/components/Feedback/exports.ts +0 -5
- package/src/components/Layout/exports.ts +0 -4
- package/src/stories/Navigation/Breadcrumbs.stories.tsx +0 -34
- package/src/utils/campxAxios.ts +0 -18
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import MoreVertIcon from
|
|
2
|
-
import { IconButton } from
|
|
3
|
-
import { Meta, StoryObj } from
|
|
4
|
-
import { Icons } from
|
|
5
|
-
import { DropDownButton } from
|
|
6
|
-
import { DropDownIcon } from
|
|
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
|
|
11
|
-
import { DropdownMenuItem } from
|
|
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:
|
|
15
|
+
title: 'Navigation/DropDownMenu',
|
|
16
16
|
component: DropdownMenu,
|
|
17
|
-
tags: [
|
|
17
|
+
tags: ['autodocs'],
|
|
18
18
|
argTypes: {
|
|
19
19
|
anchor: {
|
|
20
20
|
description:
|
|
21
|
-
|
|
22
|
-
control:
|
|
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:
|
|
26
|
+
control: 'object',
|
|
27
27
|
},
|
|
28
28
|
menuListProps: {
|
|
29
|
-
description:
|
|
30
|
-
control:
|
|
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={
|
|
55
|
+
label={'Register'}
|
|
56
56
|
onClick={() => {}}
|
|
57
57
|
/>,
|
|
58
58
|
|
|
59
|
-
<DropdownMenuItem label={
|
|
59
|
+
<DropdownMenuItem label={'Active Devices'} onClick={() => {}} />,
|
|
60
60
|
],
|
|
61
61
|
menuListProps: {
|
|
62
|
-
sx: { width:
|
|
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={
|
|
84
|
+
label={'Register'}
|
|
85
85
|
onClick={() => {
|
|
86
|
-
window.open(
|
|
86
|
+
window.open('/payment', '_blank');
|
|
87
87
|
}}
|
|
88
88
|
/>,
|
|
89
89
|
|
|
90
90
|
<DropdownMenuItem
|
|
91
91
|
icon={<Icons.HelpIcon />}
|
|
92
|
-
label={
|
|
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={
|
|
108
|
+
label={'Student Payments'}
|
|
109
109
|
onClick={() => {
|
|
110
|
-
window.open(
|
|
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:
|
|
130
|
+
iconProps: { color: 'secondary' },
|
|
131
131
|
outlined: false,
|
|
132
132
|
}}
|
|
133
133
|
/>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { Box } from
|
|
2
|
-
import { Meta, StoryObj } from
|
|
3
|
-
import { Icons, Sidebar } from
|
|
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:
|
|
7
|
+
title: 'Navigation/FloatingSidebar',
|
|
8
8
|
component: Sidebar,
|
|
9
9
|
decorators: [
|
|
10
10
|
(Story) => (
|
|
11
11
|
<Box
|
|
12
12
|
sx={{
|
|
13
|
-
display:
|
|
14
|
-
width:
|
|
15
|
-
height:
|
|
16
|
-
overflow:
|
|
17
|
-
position:
|
|
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: [
|
|
24
|
+
tags: ['autodocs'],
|
|
25
25
|
parameters: {
|
|
26
|
-
layout:
|
|
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:
|
|
35
|
-
{ name:
|
|
34
|
+
{ name: 'Admin', path: '/admin', icon: <Icons.AdminIcon size={20} /> },
|
|
35
|
+
{ name: 'UMS', path: '/ums', icon: <Icons.UmsIcon size={20} /> },
|
|
36
36
|
{
|
|
37
|
-
name:
|
|
38
|
-
path:
|
|
37
|
+
name: 'Payments',
|
|
38
|
+
path: '/payments',
|
|
39
39
|
icon: <Icons.PayxIcon size={20} />,
|
|
40
40
|
},
|
|
41
|
-
{ name:
|
|
42
|
-
{ name:
|
|
41
|
+
{ name: 'Exams', path: '/exams', icon: <Icons.ExamxIcon size={20} /> },
|
|
42
|
+
{ name: 'HRMS', path: '/hrms', icon: <Icons.PeoplexIcon size={20} /> },
|
|
43
43
|
{
|
|
44
|
-
name:
|
|
45
|
-
path:
|
|
44
|
+
name: 'Enroll',
|
|
45
|
+
path: '/enroll',
|
|
46
46
|
icon: <Icons.EnrollxIcon size={20} />,
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
name:
|
|
50
|
-
path:
|
|
49
|
+
name: 'Commute',
|
|
50
|
+
path: '/commute',
|
|
51
51
|
icon: <Icons.CommutexIcon size={20} />,
|
|
52
52
|
},
|
|
53
53
|
{
|
|
54
|
-
name:
|
|
55
|
-
path:
|
|
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
|
|
2
|
-
import { Stepper } from
|
|
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:
|
|
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:
|
|
16
|
+
label: 'Semester Configuration',
|
|
17
17
|
description:
|
|
18
|
-
|
|
18
|
+
'Configure Credits, Tuition Fee Requirements, Registration Dates',
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
|
-
label:
|
|
21
|
+
label: 'Semester Calender',
|
|
22
22
|
description:
|
|
23
|
-
|
|
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:
|
|
27
|
-
description:
|
|
26
|
+
label: 'Students and Sections',
|
|
27
|
+
description: 'Add or move students to their respective sections',
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
|
-
label:
|
|
30
|
+
label: 'Courses',
|
|
31
31
|
description:
|
|
32
|
-
|
|
32
|
+
'Verify the courses that are going to be taught in this semester',
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
label:
|
|
36
|
-
description:
|
|
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:
|
|
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:
|
|
60
|
+
orientation: 'horizontal',
|
|
61
61
|
},
|
|
62
62
|
};
|
|
63
63
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { Box } from
|
|
2
|
-
import { Meta, StoryObj } from
|
|
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
|
|
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:
|
|
11
|
+
title: 'Navigation/TabsContainer',
|
|
12
12
|
component: TabsContainer,
|
|
13
|
-
tags: [
|
|
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:
|
|
32
|
-
label:
|
|
31
|
+
key: '1',
|
|
32
|
+
label: 'Personal Details',
|
|
33
33
|
component: <Box>First Year</Box>,
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
|
-
key:
|
|
37
|
-
label:
|
|
36
|
+
key: '2',
|
|
37
|
+
label: 'Overview',
|
|
38
38
|
component: <>Second Year</>,
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
key:
|
|
42
|
-
label:
|
|
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
|
|
2
|
-
import { ReactNode } from
|
|
3
|
-
import { lightTheme } from
|
|
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:
|
|
4
|
-
Violet200:
|
|
5
|
-
Violet250:
|
|
6
|
-
Violet300:
|
|
7
|
-
Violet400:
|
|
8
|
-
Violet450:
|
|
9
|
-
Violet500:
|
|
10
|
-
Violet550:
|
|
11
|
-
Violet600:
|
|
12
|
-
Violet700:
|
|
13
|
-
Violet800:
|
|
14
|
-
Violet900:
|
|
15
|
-
Crimson:
|
|
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:
|
|
19
|
-
White70:
|
|
20
|
-
White:
|
|
21
|
-
Grey100:
|
|
22
|
-
Grey200:
|
|
23
|
-
Grey500:
|
|
24
|
-
Black50:
|
|
25
|
-
Black70:
|
|
26
|
-
Black:
|
|
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:
|
|
30
|
-
BlueGrey400:
|
|
31
|
-
BlueGrey600:
|
|
32
|
-
BlueGrey800:
|
|
29
|
+
BlueGrey100: '#F7F8FA',
|
|
30
|
+
BlueGrey400: '#293640',
|
|
31
|
+
BlueGrey600: '#1D2127',
|
|
32
|
+
BlueGrey800: '#161A1D',
|
|
33
33
|
},
|
|
34
34
|
UtilityColors: {
|
|
35
|
-
Green:
|
|
36
|
-
Blue:
|
|
37
|
-
Orange:
|
|
38
|
-
Red:
|
|
39
|
-
Pink:
|
|
40
|
-
Yellow:
|
|
41
|
-
Green20:
|
|
42
|
-
Blue20:
|
|
43
|
-
Orange20:
|
|
44
|
-
Red20:
|
|
45
|
-
Pink20:
|
|
46
|
-
LightYellow:
|
|
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
|
};
|
|
@@ -124,9 +124,10 @@ export const getCommonTheme = (mode: Theme) => {
|
|
|
124
124
|
styleOverrides: {
|
|
125
125
|
root: {
|
|
126
126
|
fontFamily: 'poppins',
|
|
127
|
-
fontWeight:
|
|
127
|
+
fontWeight: 500,
|
|
128
128
|
fontSize: '16px',
|
|
129
|
-
padding:
|
|
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: '
|
|
377
|
+
maxHeight: '40px',
|
|
368
378
|
},
|
|
369
379
|
overflowY: 'auto',
|
|
370
380
|
},
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { heeboMedium, heeboSemiBold } from
|
|
1
|
+
import { heeboMedium, heeboSemiBold } from '../assets/fonts/heebo';
|
|
2
2
|
import {
|
|
3
3
|
boldPoppins,
|
|
4
4
|
mediumPoppins,
|
|
5
5
|
semiboldPoppins,
|
|
6
|
-
} from
|
|
6
|
+
} from '../assets/fonts/poppins';
|
|
7
7
|
|
|
8
8
|
export const customCssBaseline = `
|
|
9
9
|
@font-face {
|
package/src/themes/darkTheme.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { createTheme } from
|
|
1
|
+
import { createTheme } from '@mui/material/styles';
|
|
2
2
|
|
|
3
|
-
import { DarkColorTokens } from
|
|
4
|
-
import { Theme, getCommonTheme } from
|
|
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:
|
|
8
|
+
mode: 'dark',
|
|
9
9
|
...DarkColorTokens,
|
|
10
10
|
},
|
|
11
11
|
...getCommonTheme(Theme.DARK),
|
package/src/themes/export.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { darkTheme } from
|
|
2
|
-
import { lightTheme } from
|
|
1
|
+
import { darkTheme } from './darkTheme';
|
|
2
|
+
import { lightTheme } from './lightTheme';
|
|
3
3
|
|
|
4
|
-
export * from
|
|
4
|
+
export * from './MuiThemeProvider';
|
|
5
5
|
export { darkTheme, lightTheme };
|
package/src/themes/lightTheme.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createTheme } from
|
|
2
|
-
import { LightColorTokens } from
|
|
3
|
-
import { Theme, getCommonTheme } from
|
|
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:
|
|
7
|
+
mode: 'light',
|
|
8
8
|
...LightColorTokens,
|
|
9
9
|
},
|
|
10
10
|
...getCommonTheme(Theme.LIGHT),
|
package/src/utils/constants.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Cookies from
|
|
1
|
+
import Cookies from 'js-cookie';
|
|
2
2
|
|
|
3
|
-
export const isDevelopment: boolean = process.env.NODE_ENV ===
|
|
4
|
-
export const urlTenantKey = window.location.pathname.split(
|
|
5
|
-
export const institutionKey = window.location.pathname.split(
|
|
6
|
-
export const sessionKey = Cookies.get(
|
|
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');
|