@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.
- package/.vscode/settings.json +5 -1
- package/craco.config.js +18 -0
- package/package.json +6 -5
- 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/confirmation-alert.gif +0 -0
- package/src/assets/images/gif/delete-confirmation-alert.gif +0 -0
- package/src/assets/images/gif/index.ts +11 -0
- package/src/assets/images/gif/upload-file.gif +0 -0
- package/src/assets/images/gif/uploading-file.gif +0 -0
- package/src/assets/images/svg/index.ts +5 -21
- 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 +74 -0
- 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/export.ts +13 -0
- package/src/components/export.ts +7 -7
- package/src/contexts/Providers.tsx +2 -2
- 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 +90 -0
- 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/tsconfig.json +2 -6
- package/src/assets/images/admin.png +0 -0
- package/src/assets/images/campx_logo__full_primary.png +0 -0
- package/src/assets/images/collegex.png +0 -0
- package/src/assets/images/commutex.png +0 -0
- package/src/assets/images/enrollx.png +0 -0
- package/src/assets/images/examx.png +0 -0
- package/src/assets/images/hostelx copy.png +0 -0
- package/src/assets/images/hostelx.png +0 -0
- package/src/assets/images/index.ts +0 -25
- package/src/assets/images/payx.png +0 -0
- package/src/assets/images/pepolex.png +0 -0
- package/src/assets/images/svg/campx-logo.svg +0 -32
- package/src/assets/images/svg/commutex_small.svg +0 -11
- package/src/assets/images/svg/enroll_logo.svg +0 -9
- package/src/assets/images/svg/exams_small.svg +0 -12
- package/src/assets/images/svg/help-icon.svg +0 -8
- package/src/assets/images/svg/hostel_small.svg +0 -13
- package/src/assets/images/svg/payx_small.svg +0 -16
- package/src/assets/images/svg/people_small.svg +0 -9
- package/src/assets/images/svg/squareSmall.svg +0 -9
- package/src/assets/images/svg/square_small.svg +0 -9
- package/src/components/Feedback/exports.ts +0 -5
- package/src/components/Layout/exports.ts +0 -4
- package/src/components/Navigation/exports.ts +0 -10
- package/src/stories/Navigation/Breadcrumbs.stories.tsx +0 -34
- package/src/utils/applications.ts +0 -140
- package/src/utils/campxAxios.ts +0 -18
- package/src/utils/imageMap.ts +0 -22
|
@@ -1,56 +1,56 @@
|
|
|
1
1
|
// Import React and other necessary elements
|
|
2
|
-
import { Meta } from
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
3
|
|
|
4
4
|
// Make sure your TextField import is correct
|
|
5
|
-
import { InputAdornment as MuiInputAdornment } from
|
|
6
|
-
import { Icons } from
|
|
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
|
|
10
|
+
} from '../../components/Feedback/Tooltip/Tooltip';
|
|
11
11
|
import {
|
|
12
12
|
TextField,
|
|
13
13
|
TextFieldProps,
|
|
14
|
-
} from
|
|
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:
|
|
18
|
+
title: 'Input/TextField',
|
|
19
19
|
component: TextField,
|
|
20
|
-
tags: [
|
|
20
|
+
tags: ['autodocs'],
|
|
21
21
|
argTypes: {
|
|
22
22
|
name: {
|
|
23
|
-
control:
|
|
24
|
-
description:
|
|
23
|
+
control: 'text',
|
|
24
|
+
description: 'The name of the input field, used in form submissions.',
|
|
25
25
|
},
|
|
26
26
|
label: {
|
|
27
|
-
control:
|
|
28
|
-
description:
|
|
27
|
+
control: 'text',
|
|
28
|
+
description: 'The label text displayed above the input field.',
|
|
29
29
|
},
|
|
30
30
|
value: {
|
|
31
|
-
control:
|
|
32
|
-
description:
|
|
31
|
+
control: 'text',
|
|
32
|
+
description: 'The input value of the TextField.',
|
|
33
33
|
},
|
|
34
34
|
required: {
|
|
35
|
-
control:
|
|
36
|
-
description:
|
|
35
|
+
control: 'boolean',
|
|
36
|
+
description: 'Specifies if the field is required for form submission.',
|
|
37
37
|
},
|
|
38
38
|
placeholder: {
|
|
39
|
-
control:
|
|
40
|
-
description:
|
|
39
|
+
control: 'text',
|
|
40
|
+
description: 'The placeholder value of the TextField.',
|
|
41
41
|
},
|
|
42
42
|
disabled: {
|
|
43
|
-
control:
|
|
44
|
-
description:
|
|
43
|
+
control: 'boolean',
|
|
44
|
+
description: 'Controls whether the TextField is disabled or not.',
|
|
45
45
|
},
|
|
46
46
|
helperText: {
|
|
47
|
-
control:
|
|
47
|
+
control: 'text',
|
|
48
48
|
description:
|
|
49
|
-
|
|
49
|
+
'Helper text that appears below the text field to provide additional guidance.',
|
|
50
50
|
},
|
|
51
51
|
error: {
|
|
52
|
-
control:
|
|
53
|
-
description:
|
|
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:
|
|
63
|
-
name:
|
|
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:
|
|
74
|
-
name:
|
|
75
|
-
value:
|
|
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:
|
|
85
|
-
name:
|
|
86
|
-
value:
|
|
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:
|
|
95
|
-
value:
|
|
96
|
-
placeholder:
|
|
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:
|
|
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:
|
|
114
|
+
label: 'Pan Card',
|
|
115
115
|
required: true,
|
|
116
|
-
value:
|
|
117
|
-
color:
|
|
118
|
-
helperText:
|
|
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:
|
|
126
|
+
label: 'Pan Card',
|
|
127
127
|
required: true,
|
|
128
|
-
value:
|
|
129
|
-
color:
|
|
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:
|
|
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
|
-
|
|
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: {
|
|
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: {
|
|
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: {
|
|
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: {
|
|
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: {
|
|
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: (
|
|
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: {
|
|
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
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
|
2
2
|
|
|
3
|
-
import { Box } from
|
|
3
|
+
import { Box } from '@mui/material';
|
|
4
4
|
import {
|
|
5
5
|
AppHeader,
|
|
6
6
|
AppHeaderProps,
|
|
7
|
-
} from
|
|
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:
|
|
11
|
+
title: 'Layout/AppHeader',
|
|
12
12
|
component: AppHeader,
|
|
13
|
-
tags: [
|
|
13
|
+
tags: ['autodocs'],
|
|
14
14
|
argTypes: {
|
|
15
15
|
actions: {
|
|
16
|
-
control:
|
|
17
|
-
description:
|
|
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:
|
|
31
|
-
height:
|
|
32
|
-
alignContent:
|
|
33
|
-
justifyContent:
|
|
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:
|
|
40
|
+
clientName: 'Anurag University',
|
|
41
41
|
actions: [<p>asdjflsf</p>],
|
|
42
42
|
// appsMenu: <AppsMenu apps={["exams", "square", "admin"]} />,
|
|
43
|
-
userFullName:
|
|
43
|
+
userFullName: 'Srikanth Yellapragada',
|
|
44
44
|
collapsed: false,
|
|
45
45
|
},
|
|
46
46
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Meta, StoryObj } from
|
|
2
|
-
import { TabsLayout } from
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
2
|
+
import { TabsLayout } from '../../components/export';
|
|
3
3
|
|
|
4
4
|
const meta: Meta<typeof TabsLayout> = {
|
|
5
|
-
title:
|
|
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:
|
|
18
|
-
title:
|
|
19
|
-
permissionKey:
|
|
17
|
+
path: 'degrees',
|
|
18
|
+
title: 'Degrees',
|
|
19
|
+
permissionKey: 'degreesPermission',
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
|
-
path:
|
|
23
|
-
title:
|
|
24
|
-
permissionKey:
|
|
22
|
+
path: 'calendar',
|
|
23
|
+
title: 'Academic Calendar',
|
|
24
|
+
permissionKey: 'calendarPermission',
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
|
-
path:
|
|
28
|
-
title:
|
|
29
|
-
permissionKey:
|
|
27
|
+
path: 'programs',
|
|
28
|
+
title: 'Programs',
|
|
29
|
+
permissionKey: 'programsPermission',
|
|
30
30
|
},
|
|
31
31
|
{
|
|
32
|
-
path:
|
|
33
|
-
title:
|
|
34
|
-
permissionKey:
|
|
32
|
+
path: 'semester',
|
|
33
|
+
title: 'Semester',
|
|
34
|
+
permissionKey: 'semesterPermission',
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
|
-
path:
|
|
38
|
-
title:
|
|
39
|
-
permissionKey:
|
|
37
|
+
path: 'courses',
|
|
38
|
+
title: 'Courses',
|
|
39
|
+
permissionKey: 'coursesPermission',
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
|
-
path:
|
|
43
|
-
title:
|
|
44
|
-
permissionKey:
|
|
42
|
+
path: 'professors',
|
|
43
|
+
title: 'Professors',
|
|
44
|
+
permissionKey: 'professorsPermission',
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
path:
|
|
48
|
-
title:
|
|
49
|
-
permissionKey:
|
|
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
|
|
2
|
-
import { Meta, StoryObj } from
|
|
1
|
+
import { Box, Button, Typography } from '@mui/material';
|
|
2
|
+
import { Meta, StoryObj } from '@storybook/react/*';
|
|
3
3
|
import DialogButton, {
|
|
4
4
|
DialogButtonProps,
|
|
5
|
-
} from
|
|
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:
|
|
9
|
+
title: 'Navigation/DialogButton',
|
|
10
10
|
component: DialogButton,
|
|
11
|
-
tags: [
|
|
11
|
+
tags: ['autodocs'],
|
|
12
12
|
argTypes: {
|
|
13
13
|
anchor: {
|
|
14
14
|
description:
|
|
15
|
-
|
|
16
|
-
control:
|
|
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
|
-
|
|
21
|
-
control:
|
|
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
|
-
|
|
31
|
-
control:
|
|
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:
|
|
52
|
-
width:
|
|
46
|
+
height: '100px',
|
|
47
|
+
width: '100px',
|
|
53
48
|
}}
|
|
54
49
|
></Box>
|
|
55
50
|
</>
|
|
56
51
|
),
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
title:
|
|
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:
|
|
77
|
-
width:
|
|
71
|
+
height: '500px',
|
|
72
|
+
width: '100px',
|
|
78
73
|
}}
|
|
79
74
|
></Box>
|
|
80
75
|
</>
|
|
81
76
|
),
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
title:
|
|
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>
|
|
94
|
+
<Typography>Hello</Typography>
|
|
100
95
|
</>
|
|
101
96
|
),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
title:
|
|
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:
|
|
122
|
-
width:
|
|
116
|
+
height: '500px',
|
|
117
|
+
width: '100px',
|
|
123
118
|
}}
|
|
124
119
|
></Box>
|
|
125
120
|
</>
|
|
126
121
|
),
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
title:
|
|
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:
|
|
147
|
-
width:
|
|
141
|
+
height: '500px',
|
|
142
|
+
width: '100px',
|
|
148
143
|
}}
|
|
149
144
|
></Box>
|
|
150
145
|
</>
|
|
151
146
|
),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
},
|
|
155
|
-
title: "Add Title Name",
|
|
147
|
+
maxWidth: 'xl',
|
|
148
|
+
title: 'Add Title Name',
|
|
156
149
|
},
|
|
157
150
|
};
|