@campxdev/shared 0.1.0
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/.eslintrc.js +34 -0
- package/.prettierrc +10 -0
- package/.storybook/main.js +16 -0
- package/.storybook/preview.js +9 -0
- package/antd.customize.less +73 -0
- package/exports.ts +20 -0
- package/package.json +78 -0
- package/public/dean.JPG +0 -0
- package/public/download.png +0 -0
- package/public/illustrations/bookmark.svg +19 -0
- package/public/illustrations/girl-writing.png +0 -0
- package/public/illustrations/whiteboard.svg +24 -0
- package/public/images/AnimatedUploadFile.gif +0 -0
- package/public/images/doc@2x.png +0 -0
- package/public/images/greenTick.png +0 -0
- package/public/images/jpg.png +0 -0
- package/public/images/paperclip@2x.png +0 -0
- package/public/images/pdf.png +0 -0
- package/public/images/ppt.png +0 -0
- package/public/images/profileImage.jpg +0 -0
- package/public/images/profileImage.png +0 -0
- package/public/index.html +50 -0
- package/public/logo.png +0 -0
- package/public/logo_campx_full.png +0 -0
- package/public/logo_square.svg +21 -0
- package/public/omr_sign.jpg +0 -0
- package/src/App.tsx +35 -0
- package/src/assets/fonts/avenir/Avenir.ttc +0 -0
- package/src/assets/fonts/avenir/index.ts +2 -0
- package/src/assets/fonts/poppins/Poppins-Bold.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-Italic.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-Light.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-LightItalic.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-Medium.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-MediumItalic.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-Regular.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-SemiBold.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-SemiBoldItalic.ttf +0 -0
- package/src/assets/fonts/poppins/index.ts +7 -0
- package/src/assets/images/File bundle-bro.svg +122 -0
- package/src/assets/images/Filebundle.png +0 -0
- package/src/assets/images/NoPart.png +0 -0
- package/src/assets/images/ResultProcess.png +0 -0
- package/src/assets/images/ResultProcess.svg +99 -0
- package/src/assets/images/attachment.svg +1 -0
- package/src/assets/images/avatar.png +0 -0
- package/src/assets/images/index.ts +19 -0
- package/src/assets/images/pdf.png +0 -0
- package/src/assets/images/taskAttachment.png +0 -0
- package/src/assets/images/welcomeimage.jpg +0 -0
- package/src/assets/static_files/External_Marks_Import .xlsx +0 -0
- package/src/assets/static_files/Leads_Sample.xlsx +0 -0
- package/src/assets/static_files/Subject_Topic_Import_Sheet.xlsx +0 -0
- package/src/assets/static_files/admissions_Sample.xlsx +0 -0
- package/src/assets/static_files/barcodes_template.xlsx +0 -0
- package/src/assets/static_files/hostel_rooms_import.xlsx +0 -0
- package/src/assets/static_files/index.ts +24 -0
- package/src/assets/static_files/sample_admissions.xlsx +0 -0
- package/src/assets/static_files/sample_admissions_report.xlsx +0 -0
- package/src/assets/static_files/sample_curriculum_subjects_template.xlsx +0 -0
- package/src/assets/static_files/sample_import_students_new.xlsx +0 -0
- package/src/assets/static_files/sample_internal_marks.xlsx +0 -0
- package/src/assets/static_files/sample_student_subjects_template.xlsx +0 -0
- package/src/components/ActionButton.tsx +28 -0
- package/src/components/Attachment.tsx +26 -0
- package/src/components/AutocompleteSearch/AutocompleteSearch.tsx +57 -0
- package/src/components/AutocompleteSearch/index.tsx +1 -0
- package/src/components/Breadcrumbs.tsx +73 -0
- package/src/components/Card.tsx +97 -0
- package/src/components/CardsGrid.tsx +28 -0
- package/src/components/Chips.tsx +77 -0
- package/src/components/Detail.tsx +15 -0
- package/src/components/DetailsGrid.tsx +52 -0
- package/src/components/DividerHeading.tsx +40 -0
- package/src/components/DrawerWrapper/DialogWrapper.tsx +63 -0
- package/src/components/DrawerWrapper/DrawerTemplate.tsx +53 -0
- package/src/components/DrawerWrapper/DrawerWrapper.tsx +53 -0
- package/src/components/DropDownButton.tsx +184 -0
- package/src/components/ErrorBoundary.js +45 -0
- package/src/components/ErrorBox.tsx +42 -0
- package/src/components/FloatingContainer.tsx +26 -0
- package/src/components/FullCalendar/Actions.tsx +162 -0
- package/src/components/FullCalendar/FullCalendarWrapper.tsx +54 -0
- package/src/components/HookForm/AutoCompleteSearch.tsx +143 -0
- package/src/components/HookForm/DatePicker.tsx +65 -0
- package/src/components/HookForm/DateTimePicker.tsx +70 -0
- package/src/components/HookForm/FormLabel.tsx +14 -0
- package/src/components/HookForm/MultiCheckbox.tsx +82 -0
- package/src/components/HookForm/MultiSelect.tsx +100 -0
- package/src/components/HookForm/RadioGroup.tsx +113 -0
- package/src/components/HookForm/SingleCheckbox.tsx +46 -0
- package/src/components/HookForm/SingleSelect.tsx +93 -0
- package/src/components/HookForm/TextField.tsx +74 -0
- package/src/components/HookForm/TimePicker.tsx +82 -0
- package/src/components/HookForm/index.ts +23 -0
- package/src/components/IconButtons/IconButtons.tsx +137 -0
- package/src/components/IconButtons/Icons.tsx +269 -0
- package/src/components/IconButtons/assets/edit.svg +4 -0
- package/src/components/IconButtons/assets/eye.svg +6 -0
- package/src/components/IconButtons/assets/trash.svg +7 -0
- package/src/components/IconButtons/index.tsx +8 -0
- package/src/components/IconLabel.tsx +37 -0
- package/src/components/Image/Image.tsx +43 -0
- package/src/components/Image/broken-image.png +0 -0
- package/src/components/Image/index.tsx +1 -0
- package/src/components/ImageUpload.tsx +98 -0
- package/src/components/Input/AutoCompleteSearch.tsx +143 -0
- package/src/components/Input/DatePicker.tsx +60 -0
- package/src/components/Input/DateRangePicker.tsx +131 -0
- package/src/components/Input/DateTimePicker.tsx +70 -0
- package/src/components/Input/FormLabel.tsx +14 -0
- package/src/components/Input/MultiCheckbox.tsx +79 -0
- package/src/components/Input/MultiSelect.tsx +52 -0
- package/src/components/Input/RadioGroup.tsx +55 -0
- package/src/components/Input/SingleCheckbox.tsx +23 -0
- package/src/components/Input/SingleSelect.tsx +139 -0
- package/src/components/Input/TextField.tsx +50 -0
- package/src/components/Input/TimePicker.tsx +82 -0
- package/src/components/Input/index.ts +26 -0
- package/src/components/JsonPreview/JsonPreview.tsx +7 -0
- package/src/components/JsonPreview/index.tsx +1 -0
- package/src/components/LabelValue/LabelValue.tsx +21 -0
- package/src/components/LabelValue/index.tsx +1 -0
- package/src/components/Layout/ChangePassword.tsx +49 -0
- package/src/components/Layout/Header/AppHeader.tsx +150 -0
- package/src/components/Layout/Header/CogWheelMenu.tsx +35 -0
- package/src/components/Layout/Header/FreshDeskHelpButton.tsx +19 -0
- package/src/components/Layout/Header/MainAppHeader.tsx +6 -0
- package/src/components/Layout/Header/Notification.tsx +13 -0
- package/src/components/Layout/Header/UserBox.tsx +51 -0
- package/src/components/Layout/Header/applications.tsx +39 -0
- package/src/components/Layout/Header/icons.tsx +57 -0
- package/src/components/Layout/Header/index.tsx +1 -0
- package/src/components/Layout/Header/styles.tsx +48 -0
- package/src/components/LinearProgress/LinearProgress.tsx +27 -0
- package/src/components/LinearProgress/index.tsx +1 -0
- package/src/components/MediaRow/MediaRow.tsx +69 -0
- package/src/components/MediaRow/index.tsx +1 -0
- package/src/components/MenuButton.tsx +105 -0
- package/src/components/ModalButtons/DialogButton.tsx +84 -0
- package/src/components/ModalButtons/DrawerButton.tsx +89 -0
- package/src/components/ModalButtons/index.tsx +4 -0
- package/src/components/NoDataIllustration/NoDataIllustration.tsx +32 -0
- package/src/components/NoDataIllustration/index.tsx +1 -0
- package/src/components/PageContent.tsx +14 -0
- package/src/components/PageHeader.tsx +52 -0
- package/src/components/PopupConfirm/ConfirmContextProvider.tsx +22 -0
- package/src/components/PopupConfirm/PopupConfirm.tsx +33 -0
- package/src/components/PopupConfirm/index.tsx +1 -0
- package/src/components/PopupConfirm/useConfirm.ts +47 -0
- package/src/components/Row/Row.tsx +24 -0
- package/src/components/Row/index.tsx +1 -0
- package/src/components/SearchBar/SearchBar.tsx +53 -0
- package/src/components/SearchBar/index.tsx +1 -0
- package/src/components/Spinner.tsx +18 -0
- package/src/components/StepsHeader/StepsHeader.tsx +115 -0
- package/src/components/StepsHeader/index.tsx +1 -0
- package/src/components/Styled/OutlinedIconButton.tsx +7 -0
- package/src/components/Styled/index.tsx +1 -0
- package/src/components/StyledTableContainer.tsx +33 -0
- package/src/components/Swiper/Swiper.tsx +39 -0
- package/src/components/Swiper/index.tsx +1 -0
- package/src/components/SwitchButton/SwitchButton.tsx +41 -0
- package/src/components/SwitchButton/index.tsx +1 -0
- package/src/components/TableComponent/BatchActionsHeader.tsx +58 -0
- package/src/components/TableComponent/Icons/index.tsx +50 -0
- package/src/components/TableComponent/ReactTable.tsx +293 -0
- package/src/components/TableComponent/RenderTableBody.tsx +65 -0
- package/src/components/TableComponent/TableFooter/TableFooter.tsx +102 -0
- package/src/components/TableComponent/TableFooter/index.tsx +1 -0
- package/src/components/TableComponent/TableFooter/styles.tsx +28 -0
- package/src/components/TableComponent/index.tsx +219 -0
- package/src/components/TableComponent/no-data-illu.svg +1 -0
- package/src/components/TableComponent/react-table-config.d.ts +129 -0
- package/src/components/TableComponent/styles.tsx +173 -0
- package/src/components/TableComponent/types.ts +57 -0
- package/src/components/Tabs/Tabs.tsx +52 -0
- package/src/components/Tabs/TabsContainer.tsx +50 -0
- package/src/components/Tabs/index.tsx +1 -0
- package/src/components/Tabs/styles.tsx +55 -0
- package/src/components/ToastContainer/ToastContainer.tsx +42 -0
- package/src/components/ToastContainer/index.tsx +1 -0
- package/src/components/UploadButton/UploadButton.tsx +98 -0
- package/src/components/UploadButton/index.tsx +1 -0
- package/src/components/UploadButton/types.ts +14 -0
- package/src/components/UploadDocument/UploadDocument.tsx +108 -0
- package/src/components/UploadDocument/index.tsx +1 -0
- package/src/components/UploadFileDialog/UploadFileDialog.tsx +240 -0
- package/src/components/UploadFileDialog/index.tsx +1 -0
- package/src/components/index.ts +59 -0
- package/src/config/axios.ts +138 -0
- package/src/constants/UIConstants.ts +97 -0
- package/src/constants/formValidations.ts +6 -0
- package/src/constants/index.ts +4 -0
- package/src/constants/permissions.ts +67 -0
- package/src/constants/validateMessages.ts +12 -0
- package/src/contexts/Providers.tsx +24 -0
- package/src/contexts/QueryClientProvider.tsx +22 -0
- package/src/hooks/index.ts +2 -0
- package/src/hooks/useFetch.ts +53 -0
- package/src/hooks/useRouter.ts +31 -0
- package/src/index.tsx +9 -0
- package/src/layouts/ComponentsLayout.tsx +3 -0
- package/src/pages/LoginPage/LoginPage.tsx +166 -0
- package/src/pages/LoginPage/index.ts +1 -0
- package/src/pages/LoginPage/styles.tsx +121 -0
- package/src/pages/index.ts +4 -0
- package/src/permissions/PageWithPermission.tsx +58 -0
- package/src/permissions/PermissionDeniedPage.tsx +23 -0
- package/src/permissions/PermissionsStore.ts +289 -0
- package/src/permissions/ValidateAccess.tsx +18 -0
- package/src/permissions/index.ts +3 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/shared-state/AssetsStore.ts +15 -0
- package/src/shared-state/UserStore.ts +13 -0
- package/src/shared-state/index.ts +3 -0
- package/src/stories/Button.stories.tsx +41 -0
- package/src/stories/Button.tsx +48 -0
- package/src/stories/Header.stories.tsx +25 -0
- package/src/stories/Header.tsx +56 -0
- package/src/stories/Introduction.stories.mdx +211 -0
- package/src/stories/Page.stories.tsx +26 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/TextField.stories.tsx +18 -0
- package/src/stories/TextField.tsx +49 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +69 -0
- package/src/theme/App.less +3 -0
- package/src/theme/MuiThemeProvider.tsx +11 -0
- package/src/theme/customCssBaseline.ts +78 -0
- package/src/theme/index.css +75 -0
- package/src/theme/muiTheme.ts +516 -0
- package/src/theme/theme.d.ts +75 -0
- package/src/utils/alphabet.ts +23 -0
- package/src/utils/arrayPadEnd.ts +3 -0
- package/src/utils/formatCurrency.ts +9 -0
- package/src/utils/getUrlParams.ts +5 -0
- package/src/utils/index.ts +6 -0
- package/src/utils/ordinalSuffixOf.ts +14 -0
- package/src/utils/romanize.ts +40 -0
- package/src/utils/withRouteWrapper.tsx +25 -0
- package/src/utils/withSuspense.tsx +6 -0
- package/styled-components.tsx +60 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { avenirFont } from '../assets/fonts/avenir'
|
|
2
|
+
import {
|
|
3
|
+
lightPoppins,
|
|
4
|
+
mediumPoppins,
|
|
5
|
+
regularPoppins,
|
|
6
|
+
semiboldPoppins,
|
|
7
|
+
} from '../assets/fonts/poppins'
|
|
8
|
+
|
|
9
|
+
const uniCode =
|
|
10
|
+
'U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF'
|
|
11
|
+
|
|
12
|
+
export const customCssBaseline = `
|
|
13
|
+
html, body {
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
font-family: Avenir, sans-serif;
|
|
16
|
+
font-weight: 400;
|
|
17
|
+
}
|
|
18
|
+
@font-face {
|
|
19
|
+
font-family: Avenir;
|
|
20
|
+
src: url(${avenirFont});
|
|
21
|
+
font-display: swap;
|
|
22
|
+
font-weight: 400;
|
|
23
|
+
}
|
|
24
|
+
@font-face {
|
|
25
|
+
font-family: Poppins;
|
|
26
|
+
src: url(${lightPoppins}) format('truetype');
|
|
27
|
+
unicodeRange: ${uniCode};
|
|
28
|
+
font-display: swap;
|
|
29
|
+
font-weight: 300;
|
|
30
|
+
}
|
|
31
|
+
@font-face {
|
|
32
|
+
font-family: Poppins;
|
|
33
|
+
src: url(${mediumPoppins}) format('truetype');
|
|
34
|
+
unicodeRange: ${uniCode};
|
|
35
|
+
font-display: swap;
|
|
36
|
+
font-weight: 500;
|
|
37
|
+
}
|
|
38
|
+
@font-face {
|
|
39
|
+
font-family: Poppins;
|
|
40
|
+
src: url(${regularPoppins}) format('truetype');
|
|
41
|
+
unicodeRange: ${uniCode};
|
|
42
|
+
font-display: swap;
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
}
|
|
45
|
+
@font-face {
|
|
46
|
+
font-family: Poppins;
|
|
47
|
+
src: url(${semiboldPoppins}) format('truetype');
|
|
48
|
+
unicodeRange: ${uniCode};
|
|
49
|
+
font-display: swap;
|
|
50
|
+
font-weight: 600;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.Toastify__toast {
|
|
54
|
+
border-radius: 10px;
|
|
55
|
+
padding: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.Toastify__toast-body {
|
|
59
|
+
font-family: Poppins;
|
|
60
|
+
font-size: 16px;
|
|
61
|
+
line-height: 1.5;
|
|
62
|
+
color: #fff;
|
|
63
|
+
font-weight: 600;
|
|
64
|
+
padding: 0;
|
|
65
|
+
margin: 0;
|
|
66
|
+
height: 64px;
|
|
67
|
+
align-items: stretch;
|
|
68
|
+
}
|
|
69
|
+
.Toastify__toast-body > div:last-child {
|
|
70
|
+
align-self: center;
|
|
71
|
+
margin-left: 30px;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.Toastify__toast > button > svg {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
`
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/* @import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap'); */
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--primary-main: rgb(30, 25, 245);
|
|
5
|
+
--secondary-dark: #121212;
|
|
6
|
+
--secondary-light: #1d1d1d;
|
|
7
|
+
--bg-gray-light: #f2f2f2;
|
|
8
|
+
--orange-primary: #ffaf20;
|
|
9
|
+
--primary-light: #eef8fe;
|
|
10
|
+
--secondary-color: #233659;
|
|
11
|
+
--success-color: #52c41a;
|
|
12
|
+
--warning-color: #faad14;
|
|
13
|
+
--error-color: #f5222d;
|
|
14
|
+
--link-color: #1890ff;
|
|
15
|
+
--heading-color: rgba(0, 0, 0, 0.85);
|
|
16
|
+
--disabled-color: rgba(0, 0, 0, 0.25);
|
|
17
|
+
--border-color-base: #d9d9d9;
|
|
18
|
+
--body-background: #fff;
|
|
19
|
+
--component-background: #fff;
|
|
20
|
+
/* TYPOGRAPHY */
|
|
21
|
+
--text-white: #fff;
|
|
22
|
+
--text-color: rgba(0, 0, 0, 0.65);
|
|
23
|
+
--text-color-secondary: rgba(0, 0, 0, 0.45);
|
|
24
|
+
|
|
25
|
+
--toastify-color-info: #3498db;
|
|
26
|
+
--toastify-color-success: #7eb872;
|
|
27
|
+
--toastify-color-warning: #f1c40f;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@font-face {
|
|
31
|
+
font-family: Avenir;
|
|
32
|
+
src: url('../assets/fonts/avenir/Avenir.ttc');
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@font-face {
|
|
36
|
+
font-family: Poppins;
|
|
37
|
+
src: url('../assets/fonts/poppins/Poppins-SemiBold.otf');
|
|
38
|
+
}
|
|
39
|
+
@font-face {
|
|
40
|
+
font-family: Poppins;
|
|
41
|
+
src: url('../assets/fonts/poppins/Poppins-Medium.otf');
|
|
42
|
+
}
|
|
43
|
+
@font-face {
|
|
44
|
+
font-family: Poppins;
|
|
45
|
+
src: url('../assets/fonts/poppins/Poppins-Light.otf');
|
|
46
|
+
}
|
|
47
|
+
@font-face {
|
|
48
|
+
font-family: Poppins;
|
|
49
|
+
src: url('../assets/fonts/poppins/Poppins-Regular.otf');
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.Toastify__toast {
|
|
53
|
+
border-radius: 10px;
|
|
54
|
+
padding: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.Toastify__toast-body {
|
|
58
|
+
font-family: Poppins;
|
|
59
|
+
font-size: 16px;
|
|
60
|
+
line-height: 1.5;
|
|
61
|
+
color: #fff;
|
|
62
|
+
font-weight: 600;
|
|
63
|
+
padding: 0;
|
|
64
|
+
margin: 0;
|
|
65
|
+
height: 64px;
|
|
66
|
+
align-items: stretch;
|
|
67
|
+
}
|
|
68
|
+
.Toastify__toast-body > div:last-child {
|
|
69
|
+
align-self: center;
|
|
70
|
+
margin-left: 30px;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.Toastify__toast > button > svg {
|
|
74
|
+
display: none;
|
|
75
|
+
}
|
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
import { alpha, darken, lighten } from '@mui/material'
|
|
2
|
+
import { red } from '@mui/material/colors'
|
|
3
|
+
import { createTheme } from '@mui/material/styles'
|
|
4
|
+
import { customCssBaseline } from './customCssBaseline'
|
|
5
|
+
|
|
6
|
+
const borderRadius = {
|
|
7
|
+
small: '5px',
|
|
8
|
+
large: '10px',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const PRIMARY_FONT = 'Avenir'
|
|
12
|
+
const SECONDARY_FONT = 'Poppins'
|
|
13
|
+
|
|
14
|
+
const themeColors = {
|
|
15
|
+
primary: '#1E19F5',
|
|
16
|
+
secondary: '#121212',
|
|
17
|
+
secondaryLight: '#1212121A',
|
|
18
|
+
success: '#57CA22',
|
|
19
|
+
warning: '#FFA319',
|
|
20
|
+
error: '#BC2C3D',
|
|
21
|
+
info: '#33C2FF',
|
|
22
|
+
black: '#223354',
|
|
23
|
+
white: '#ffffff',
|
|
24
|
+
primaryAlt: '#000C57',
|
|
25
|
+
yellow: '#FFAF20',
|
|
26
|
+
green: '#99C15B',
|
|
27
|
+
grayLight: '#F2F2F2',
|
|
28
|
+
pureBlack: '#000000',
|
|
29
|
+
pureWhite: '#ffffff',
|
|
30
|
+
secondaryDark: '#EFEFEF',
|
|
31
|
+
offsetBlue: '#149ECD',
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const colors = {
|
|
35
|
+
primary: {
|
|
36
|
+
main: themeColors.primary,
|
|
37
|
+
light: alpha(themeColors.primary, 0.5),
|
|
38
|
+
lighter: alpha(themeColors.primary, 0.1),
|
|
39
|
+
},
|
|
40
|
+
secondary: {
|
|
41
|
+
main: themeColors.secondary,
|
|
42
|
+
light: themeColors.grayLight,
|
|
43
|
+
lighter: themeColors.secondaryLight,
|
|
44
|
+
dark: themeColors.secondaryDark,
|
|
45
|
+
},
|
|
46
|
+
common: {
|
|
47
|
+
green: themeColors.green,
|
|
48
|
+
yellow: themeColors.yellow,
|
|
49
|
+
black: themeColors.pureBlack,
|
|
50
|
+
white: themeColors.pureWhite,
|
|
51
|
+
blue: themeColors.offsetBlue,
|
|
52
|
+
},
|
|
53
|
+
error: {
|
|
54
|
+
lighter: alpha(themeColors.error, 0.1),
|
|
55
|
+
light: lighten(themeColors.error, 0.3),
|
|
56
|
+
main: themeColors.error,
|
|
57
|
+
dark: darken(themeColors.error, 0.2),
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
const borders = {
|
|
62
|
+
primary: `1px solid ${themeColors.primary}`,
|
|
63
|
+
grayLight: `1px solid ${themeColors.secondaryLight}`,
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// A custom theme for this app
|
|
67
|
+
const muiTheme = createTheme({
|
|
68
|
+
typography: {
|
|
69
|
+
fontFamily: ['Poppins', 'Avenir', 'sans-serif'].join(','),
|
|
70
|
+
},
|
|
71
|
+
borders: {
|
|
72
|
+
...borders,
|
|
73
|
+
},
|
|
74
|
+
palette: {
|
|
75
|
+
primary: {
|
|
76
|
+
dark: '#1E19F5',
|
|
77
|
+
main: colors.primary.main,
|
|
78
|
+
light: colors.primary.light,
|
|
79
|
+
lighter: colors.primary.lighter,
|
|
80
|
+
},
|
|
81
|
+
secondary: {
|
|
82
|
+
main: '#121212',
|
|
83
|
+
light: colors.secondary.light,
|
|
84
|
+
dark: themeColors.secondaryDark,
|
|
85
|
+
lighter: themeColors.secondaryLight,
|
|
86
|
+
},
|
|
87
|
+
common: {
|
|
88
|
+
green: themeColors.green,
|
|
89
|
+
yellow: themeColors.yellow,
|
|
90
|
+
blue: themeColors.offsetBlue,
|
|
91
|
+
},
|
|
92
|
+
error: {
|
|
93
|
+
main: red.A400,
|
|
94
|
+
},
|
|
95
|
+
text: {
|
|
96
|
+
primary: '#121212',
|
|
97
|
+
secondary: '#959595',
|
|
98
|
+
disabled: '#12121280',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
components: {
|
|
102
|
+
MuiTypography: {
|
|
103
|
+
styleOverrides: {
|
|
104
|
+
root: {
|
|
105
|
+
color: '#121212',
|
|
106
|
+
fontSize: '14px',
|
|
107
|
+
fontWeight: 500,
|
|
108
|
+
fontFamily: PRIMARY_FONT,
|
|
109
|
+
},
|
|
110
|
+
h1: {
|
|
111
|
+
fontSize: '18px',
|
|
112
|
+
fontWeight: 600,
|
|
113
|
+
fontFamily: SECONDARY_FONT,
|
|
114
|
+
},
|
|
115
|
+
h3: {
|
|
116
|
+
fontSize: '16px',
|
|
117
|
+
fontWeight: 600,
|
|
118
|
+
fontFamily: SECONDARY_FONT,
|
|
119
|
+
},
|
|
120
|
+
h5: {
|
|
121
|
+
fontSize: '14px',
|
|
122
|
+
fontWeight: 500,
|
|
123
|
+
fontFamily: SECONDARY_FONT,
|
|
124
|
+
},
|
|
125
|
+
h6: {
|
|
126
|
+
fontSize: '15px',
|
|
127
|
+
fontWeight: 600,
|
|
128
|
+
fontFamily: SECONDARY_FONT,
|
|
129
|
+
},
|
|
130
|
+
paragraph: {
|
|
131
|
+
fontSize: '16px',
|
|
132
|
+
marginBottom: 0,
|
|
133
|
+
},
|
|
134
|
+
body2: {
|
|
135
|
+
fontWeight: 600,
|
|
136
|
+
},
|
|
137
|
+
subtitle1: {
|
|
138
|
+
fontSize: '12px',
|
|
139
|
+
fontWeight: 400,
|
|
140
|
+
color: '#959595',
|
|
141
|
+
},
|
|
142
|
+
subtitle2: {
|
|
143
|
+
fontSize: '13px',
|
|
144
|
+
fontWeight: 400,
|
|
145
|
+
color: '#959595',
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
MuiButton: {
|
|
150
|
+
defaultProps: {
|
|
151
|
+
variant: 'contained',
|
|
152
|
+
disableRipple: true,
|
|
153
|
+
disableElevation: true,
|
|
154
|
+
disableFocusRipple: true,
|
|
155
|
+
disableTouchRipple: true,
|
|
156
|
+
},
|
|
157
|
+
styleOverrides: {
|
|
158
|
+
root: {
|
|
159
|
+
fontFamily: SECONDARY_FONT,
|
|
160
|
+
height: '40px',
|
|
161
|
+
padding: '10px 36px',
|
|
162
|
+
textTransform: 'capitalize',
|
|
163
|
+
fontWeight: 600,
|
|
164
|
+
borderRadius: borderRadius.small,
|
|
165
|
+
'&.MuiButton-sizeSmall': {
|
|
166
|
+
padding: '6px 8px',
|
|
167
|
+
height: '32px',
|
|
168
|
+
fontSize: '13px',
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
MuiButtonBase: {
|
|
174
|
+
defaultProps: {
|
|
175
|
+
disableRipple: true,
|
|
176
|
+
},
|
|
177
|
+
styleOverrides: {
|
|
178
|
+
root: {
|
|
179
|
+
fontFamily: SECONDARY_FONT,
|
|
180
|
+
'&.MuiButton-textSizeSmall': {
|
|
181
|
+
padding: '6px 8px',
|
|
182
|
+
height: '32px',
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
},
|
|
187
|
+
MuiOutlinedInput: {
|
|
188
|
+
styleOverrides: {
|
|
189
|
+
root: {
|
|
190
|
+
fontSize: '14px',
|
|
191
|
+
minHeight: '50px',
|
|
192
|
+
borderRadius: borderRadius.large,
|
|
193
|
+
'&.MuiInputBase-sizeSmall': {
|
|
194
|
+
minHeight: '30px',
|
|
195
|
+
},
|
|
196
|
+
'& .MuiInputAdornment-positionEnd.MuiInputAdornment-outlined': {
|
|
197
|
+
paddingRight: 2,
|
|
198
|
+
},
|
|
199
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
|
200
|
+
borderColor: alpha(colors.common.black, 0.15),
|
|
201
|
+
'& legend': {
|
|
202
|
+
'& > span': {
|
|
203
|
+
paddingRight: 2,
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
'&:hover .MuiOutlinedInput-notchedOutline': {
|
|
208
|
+
borderColor: alpha(colors.common.black, 0.3),
|
|
209
|
+
},
|
|
210
|
+
'&.Mui-focused .MuiOutlinedInput-notchedOutline': {
|
|
211
|
+
borderColor: colors.primary.main,
|
|
212
|
+
borderWidth: '0.5px',
|
|
213
|
+
'& :hover': {
|
|
214
|
+
borderColor: colors.primary.main,
|
|
215
|
+
borderWidth: '0.5px',
|
|
216
|
+
},
|
|
217
|
+
},
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
MuiAutocomplete: {
|
|
222
|
+
styleOverrides: {
|
|
223
|
+
tag: {
|
|
224
|
+
margin: 1,
|
|
225
|
+
},
|
|
226
|
+
root: {
|
|
227
|
+
'.MuiAutocomplete-inputRoot.MuiOutlinedInput-root .MuiAutocomplete-endAdornment':
|
|
228
|
+
{
|
|
229
|
+
right: 14,
|
|
230
|
+
},
|
|
231
|
+
'& .MuiAutocomplete-tag': {
|
|
232
|
+
border: '1px solid #D1D1D1',
|
|
233
|
+
background: '#F8F8F8',
|
|
234
|
+
borderRadius: '5px',
|
|
235
|
+
height: '38px',
|
|
236
|
+
'& .MuiSvgIcon-root': {
|
|
237
|
+
fontSize: '15px',
|
|
238
|
+
marginLeft: '5px',
|
|
239
|
+
fontWeight: 700,
|
|
240
|
+
color: colors.secondary.main,
|
|
241
|
+
'&:hover': {
|
|
242
|
+
color: alpha(colors.secondary.main, 0.8),
|
|
243
|
+
},
|
|
244
|
+
},
|
|
245
|
+
},
|
|
246
|
+
'& .MuiInputBase-root': {
|
|
247
|
+
padding: '5px',
|
|
248
|
+
},
|
|
249
|
+
},
|
|
250
|
+
clearIndicator: {
|
|
251
|
+
background: colors.error.lighter,
|
|
252
|
+
borderRadius: '5px',
|
|
253
|
+
color: colors.error.main,
|
|
254
|
+
marginRight: 8,
|
|
255
|
+
|
|
256
|
+
'&:hover': {
|
|
257
|
+
background: colors.error.lighter,
|
|
258
|
+
color: colors.error.dark,
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
popupIndicator: {
|
|
262
|
+
color: alpha(colors.common.black, 0.5),
|
|
263
|
+
|
|
264
|
+
'&:hover': {
|
|
265
|
+
background: colors.primary.lighter,
|
|
266
|
+
color: colors.primary.main,
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
MuiSwitch: {
|
|
272
|
+
styleOverrides: {
|
|
273
|
+
root: {
|
|
274
|
+
height: '20px',
|
|
275
|
+
padding: 0,
|
|
276
|
+
'& .MuiSwitch-switchBase': {
|
|
277
|
+
padding: 0,
|
|
278
|
+
transitionDuration: '300ms',
|
|
279
|
+
'&.Mui-checked': {
|
|
280
|
+
color: colors.common.green,
|
|
281
|
+
'& .MuiSwitch-thumb': {
|
|
282
|
+
marginLeft: '0px',
|
|
283
|
+
},
|
|
284
|
+
'& + .MuiSwitch-track': {
|
|
285
|
+
opacity: '1',
|
|
286
|
+
border: `0.5px solid ${colors.common.green}`,
|
|
287
|
+
background: '#EDEDED 0% 0% no-repeat padding-box',
|
|
288
|
+
},
|
|
289
|
+
'&.Mui-disabled + .MuiSwitch-track': {
|
|
290
|
+
opacity: 0.5,
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
'&.Mui-disabled .MuiSwitch-thumb': {
|
|
294
|
+
color: colors.common.green,
|
|
295
|
+
opacity: '0.5',
|
|
296
|
+
},
|
|
297
|
+
},
|
|
298
|
+
'& .MuiSwitch-thumb': {
|
|
299
|
+
width: '18px',
|
|
300
|
+
height: '16px',
|
|
301
|
+
borderRadius: '5px',
|
|
302
|
+
marginTop: '2px',
|
|
303
|
+
boxShadow: 'none',
|
|
304
|
+
marginLeft: '2px',
|
|
305
|
+
},
|
|
306
|
+
'& .MuiSwitch-track': {
|
|
307
|
+
borderRadius: '5px',
|
|
308
|
+
width: '40px',
|
|
309
|
+
height: '20px',
|
|
310
|
+
backgroundColor: '#EDEDED',
|
|
311
|
+
paddingLeft: '12px',
|
|
312
|
+
opacity: '1',
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
MuiMenu: {
|
|
318
|
+
styleOverrides: {
|
|
319
|
+
paper: {
|
|
320
|
+
'&::-webkit-scrollbar': {
|
|
321
|
+
width: '0.5em',
|
|
322
|
+
height: '0.5em',
|
|
323
|
+
},
|
|
324
|
+
|
|
325
|
+
'&::-webkit-scrollbar-thumb': {
|
|
326
|
+
backgroundColor: 'rgba(0, 0, 0, 0.15)',
|
|
327
|
+
borderRadius: '3px',
|
|
328
|
+
|
|
329
|
+
'&:hover': {
|
|
330
|
+
background: 'rgba(0, 0, 0, 0.2)',
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
MuiIconButton: {
|
|
337
|
+
defaultProps: {
|
|
338
|
+
disableRipple: true,
|
|
339
|
+
disableFocusRipple: true,
|
|
340
|
+
disableTouchRipple: true,
|
|
341
|
+
size: 'small',
|
|
342
|
+
},
|
|
343
|
+
styleOverrides: {
|
|
344
|
+
root: {
|
|
345
|
+
borderRadius: '10px',
|
|
346
|
+
},
|
|
347
|
+
},
|
|
348
|
+
},
|
|
349
|
+
MuiFormLabel: {
|
|
350
|
+
styleOverrides: {
|
|
351
|
+
root: {
|
|
352
|
+
fontSize: '14px',
|
|
353
|
+
color: '#959595',
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
},
|
|
357
|
+
MuiTextField: {
|
|
358
|
+
defaultProps: {
|
|
359
|
+
variant: 'outlined',
|
|
360
|
+
color: 'primary',
|
|
361
|
+
fullWidth: true,
|
|
362
|
+
},
|
|
363
|
+
},
|
|
364
|
+
MuiTable: {
|
|
365
|
+
styleOverrides: {
|
|
366
|
+
root: {
|
|
367
|
+
border: borders.grayLight,
|
|
368
|
+
fontFamily: PRIMARY_FONT,
|
|
369
|
+
fontSize: '14px',
|
|
370
|
+
fontWeight: 600,
|
|
371
|
+
},
|
|
372
|
+
},
|
|
373
|
+
},
|
|
374
|
+
MuiTableHead: {
|
|
375
|
+
styleOverrides: {
|
|
376
|
+
root: {
|
|
377
|
+
backgroundColor: themeColors.grayLight,
|
|
378
|
+
'& th': {
|
|
379
|
+
lineHeight: '20px',
|
|
380
|
+
fontSize: '14px',
|
|
381
|
+
fontWeight: 600,
|
|
382
|
+
fontFamily: SECONDARY_FONT,
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
},
|
|
386
|
+
},
|
|
387
|
+
MuiTableCell: {
|
|
388
|
+
styleOverrides: {
|
|
389
|
+
root: {
|
|
390
|
+
lineHeight: '20px',
|
|
391
|
+
padding: '15px',
|
|
392
|
+
fontWeight: 600,
|
|
393
|
+
fontFamily: PRIMARY_FONT,
|
|
394
|
+
fontSize: '14px',
|
|
395
|
+
'& .MuiCheckbox-root': {
|
|
396
|
+
padding: 0,
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
},
|
|
400
|
+
},
|
|
401
|
+
MuiCard: {
|
|
402
|
+
styleOverrides: {
|
|
403
|
+
root: {
|
|
404
|
+
border: borders.grayLight,
|
|
405
|
+
boxShadow: 'none',
|
|
406
|
+
borderRadius: '10px',
|
|
407
|
+
'&.MuiPaper-root': {
|
|
408
|
+
height: 'fit-content',
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
},
|
|
413
|
+
MuiCardHeader: {
|
|
414
|
+
styleOverrides: {
|
|
415
|
+
root: {
|
|
416
|
+
padding: '20px',
|
|
417
|
+
'& .MuiCardHeader-title': {
|
|
418
|
+
fontSize: '15px',
|
|
419
|
+
fontFamily: SECONDARY_FONT,
|
|
420
|
+
fontWeight: 500,
|
|
421
|
+
},
|
|
422
|
+
'& .MuiTypography-root.MuiCardHeader-subheader': {
|
|
423
|
+
marginTop: '3px',
|
|
424
|
+
fontSize: '13px',
|
|
425
|
+
fontFamily: PRIMARY_FONT,
|
|
426
|
+
fontWeight: 400,
|
|
427
|
+
},
|
|
428
|
+
},
|
|
429
|
+
},
|
|
430
|
+
},
|
|
431
|
+
MuiCardContent: {
|
|
432
|
+
styleOverrides: {
|
|
433
|
+
root: {
|
|
434
|
+
padding: '20px',
|
|
435
|
+
paddingTop: 0,
|
|
436
|
+
},
|
|
437
|
+
},
|
|
438
|
+
},
|
|
439
|
+
MuiCardActions: {
|
|
440
|
+
styleOverrides: {
|
|
441
|
+
root: {
|
|
442
|
+
padding: 0,
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
},
|
|
446
|
+
MuiFormHelperText: {
|
|
447
|
+
styleOverrides: {
|
|
448
|
+
root: {
|
|
449
|
+
fontFamily: PRIMARY_FONT,
|
|
450
|
+
fontSize: '12px',
|
|
451
|
+
color: themeColors.error,
|
|
452
|
+
marginLeft: '2px',
|
|
453
|
+
marginRight: '2px',
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
},
|
|
457
|
+
MuiChip: {
|
|
458
|
+
styleOverrides: {
|
|
459
|
+
root: {
|
|
460
|
+
fontFamily: SECONDARY_FONT,
|
|
461
|
+
fontSize: '14px',
|
|
462
|
+
},
|
|
463
|
+
},
|
|
464
|
+
},
|
|
465
|
+
MuiListItemButton: {
|
|
466
|
+
styleOverrides: {
|
|
467
|
+
root: {
|
|
468
|
+
fontFamily: SECONDARY_FONT,
|
|
469
|
+
fontSize: '14px',
|
|
470
|
+
'& .MuiListItemText-primary.MuiTypography-root': {
|
|
471
|
+
fontFamily: SECONDARY_FONT,
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
},
|
|
476
|
+
MuiTabs: {
|
|
477
|
+
styleOverrides: {
|
|
478
|
+
root: {
|
|
479
|
+
minHeight: '40px',
|
|
480
|
+
fontFamily: SECONDARY_FONT,
|
|
481
|
+
'& .MuiTabs-indicator': {
|
|
482
|
+
backgroundColor: themeColors.yellow,
|
|
483
|
+
},
|
|
484
|
+
'& .MuiTabs-flexContainer': {
|
|
485
|
+
height: '100%',
|
|
486
|
+
width: '100%',
|
|
487
|
+
alignItems: 'end',
|
|
488
|
+
},
|
|
489
|
+
'& .MuiTab-root': {
|
|
490
|
+
fontWeight: 500,
|
|
491
|
+
textTransform: 'none',
|
|
492
|
+
transition: 'color 0.2s ease-in-out',
|
|
493
|
+
minHeight: '100%',
|
|
494
|
+
padding: 0,
|
|
495
|
+
},
|
|
496
|
+
'& .MuiTab-root.Mui-selected': {
|
|
497
|
+
color: themeColors.secondary,
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
},
|
|
501
|
+
},
|
|
502
|
+
MuiRadio: {
|
|
503
|
+
defaultProps: {
|
|
504
|
+
size: 'small',
|
|
505
|
+
},
|
|
506
|
+
styleOverrides: {
|
|
507
|
+
root: {},
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
MuiCssBaseline: {
|
|
511
|
+
styleOverrides: customCssBaseline,
|
|
512
|
+
},
|
|
513
|
+
},
|
|
514
|
+
})
|
|
515
|
+
|
|
516
|
+
export default muiTheme
|