@campxdev/react-blueprint 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/.storybook/main.ts +29 -0
- package/.storybook/preview.tsx +28 -0
- package/.vscode/settings.json +3 -0
- package/README.md +100 -0
- package/bitbucket-pipelines.yml +60 -0
- package/exports.ts +1 -0
- package/package.json +74 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +43 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/src/App.css +38 -0
- package/src/App.test.tsx +9 -0
- package/src/App.tsx +12 -0
- package/src/assets/fonts/heebo/Heebo-Medium.ttf +0 -0
- package/src/assets/fonts/heebo/Heebo-SemiBold.ttf +0 -0
- package/src/assets/fonts/heebo/index.ts +3 -0
- package/src/assets/fonts/poppins/Poppins-Bold.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-Light.ttf +0 -0
- package/src/assets/fonts/poppins/Poppins-Medium.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/index.ts +14 -0
- 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/icons.tsx +193 -0
- package/src/assets/images/index.ts +25 -0
- package/src/assets/images/payx.png +0 -0
- package/src/assets/images/pepolex.png +0 -0
- package/src/assets/images/svg/commutex_small.svg +11 -0
- package/src/assets/images/svg/enroll_logo.svg +9 -0
- package/src/assets/images/svg/exams_small.svg +12 -0
- package/src/assets/images/svg/help-icon.svg +8 -0
- package/src/assets/images/svg/hostel_small.svg +13 -0
- package/src/assets/images/svg/index.ts +19 -0
- package/src/assets/images/svg/payx_small.svg +16 -0
- package/src/assets/images/svg/people_small.svg +9 -0
- package/src/assets/images/svg/squareSmall.svg +9 -0
- package/src/assets/images/svg/square_small.svg +9 -0
- package/src/components/DropDownMenu/DropDownButton.tsx +30 -0
- package/src/components/DropDownMenu/DropDownIcon.tsx +31 -0
- package/src/components/DropDownMenu/DropDownMenu.stories.tsx +139 -0
- package/src/components/DropDownMenu/DropDownMenu.tsx +65 -0
- package/src/components/DropDownMenu/MenuItemButton.tsx +29 -0
- package/src/components/DropDownMenu/styles.tsx +31 -0
- package/src/components/Input/Button/Button.stories.tsx +62 -0
- package/src/components/Input/Button/Button.tsx +11 -0
- package/src/components/Input/Label/Label.tsx +11 -0
- package/src/components/Input/SingleSelect/SingleSelect.stories.tsx +55 -0
- package/src/components/Input/SingleSelect/SingleSelect.tsx +4 -0
- package/src/components/Input/Switch/Switch.stories.tsx +62 -0
- package/src/components/Input/Switch/Switch.tsx +11 -0
- package/src/components/Input/TextField/TextField.stories.tsx +135 -0
- package/src/components/Input/TextField/TextField.tsx +35 -0
- package/src/components/Layout/ComponentBackground/ComponentBackground.tsx +82 -0
- package/src/components/Layout/ComponentBackground/DefaultBackground.tsx +12 -0
- package/src/components/Layout/ComponentBackground/PaperBackground.tsx +12 -0
- package/src/components/Layout/Header/AppHeader.stories.tsx +209 -0
- package/src/components/Layout/Header/AppHeader.tsx +70 -0
- package/src/components/Layout/Header/AppLogo.tsx +53 -0
- package/src/components/Layout/Header/AppsMenu.tsx +162 -0
- package/src/components/Layout/Header/HeaderActions/CogWheelMenu.tsx +30 -0
- package/src/components/Layout/Header/HeaderActions/HeaderActions.tsx +63 -0
- package/src/components/Layout/Header/HeaderActions/UserBox.tsx +117 -0
- package/src/components/Layout/Header/styles/styles.tsx +69 -0
- package/src/components/Typography/Typography.stories.tsx +95 -0
- package/src/components/Typography/Typography.tsx +12 -0
- package/src/components/index.ts +1 -0
- package/src/contexts/Providers.tsx +6 -0
- package/src/index.css +13 -0
- package/src/index.tsx +19 -0
- package/src/logo.svg +1 -0
- package/src/react-app-env.d.ts +1 -0
- package/src/reportWebVitals.ts +15 -0
- package/src/setupTests.ts +5 -0
- package/src/stories/Button.stories.ts +52 -0
- package/src/stories/Button.tsx +48 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.stories.ts +33 -0
- package/src/stories/Header.tsx +56 -0
- package/src/stories/Page.stories.ts +32 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +5 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +15 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +3 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +12 -0
- package/src/stories/assets/youtube.svg +4 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +69 -0
- package/src/themes/MuiThemeProvider.tsx +18 -0
- package/src/themes/colorTokens.stories.tsx +71 -0
- package/src/themes/colorTokens.ts +77 -0
- package/src/themes/commonTheme.ts +443 -0
- package/src/themes/customCssBaseline.ts +39 -0
- package/src/themes/darkTheme.ts +24 -0
- package/src/themes/index.ts +4 -0
- package/src/themes/lightTheme.ts +22 -0
- package/src/themes/typography.stories.tsx +79 -0
- package/src/utils/applications.ts +140 -0
- package/src/utils/constants.ts +6 -0
- package/src/utils/imageMap.ts +22 -0
- package/tsconfig.json +26 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { admin } from "../assets/images";
|
|
2
|
+
import {
|
|
3
|
+
commuteSmall,
|
|
4
|
+
enrollSmall,
|
|
5
|
+
examsSmall,
|
|
6
|
+
hostelSmall,
|
|
7
|
+
payxSmall,
|
|
8
|
+
peopleSmall,
|
|
9
|
+
squareSmall,
|
|
10
|
+
} from "../assets/images/svg";
|
|
11
|
+
|
|
12
|
+
import { isDevelopment } from "./constants";
|
|
13
|
+
|
|
14
|
+
interface Origin {
|
|
15
|
+
dev: string;
|
|
16
|
+
prod: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
interface Origins {
|
|
20
|
+
admin: Origin;
|
|
21
|
+
enroll: Origin;
|
|
22
|
+
payments: Origin;
|
|
23
|
+
ums: Origin;
|
|
24
|
+
exams: Origin;
|
|
25
|
+
people: Origin;
|
|
26
|
+
hostel: Origin;
|
|
27
|
+
commute: Origin;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
interface Application {
|
|
31
|
+
title: string;
|
|
32
|
+
path: string;
|
|
33
|
+
icon: string;
|
|
34
|
+
key: string;
|
|
35
|
+
domainName: string;
|
|
36
|
+
description: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const origins: Origins = {
|
|
40
|
+
admin: {
|
|
41
|
+
dev: "https://admin.campx.dev",
|
|
42
|
+
prod: "https://admin.campx.in",
|
|
43
|
+
},
|
|
44
|
+
enroll: {
|
|
45
|
+
dev: "https://enroll.campx.dev",
|
|
46
|
+
prod: "https://enroll.campx.in",
|
|
47
|
+
},
|
|
48
|
+
payments: {
|
|
49
|
+
dev: "https://payments.campx.dev",
|
|
50
|
+
prod: "https://payments.campx.in",
|
|
51
|
+
},
|
|
52
|
+
ums: {
|
|
53
|
+
dev: "https://ums.campx.dev",
|
|
54
|
+
prod: "https://ums.campx.in",
|
|
55
|
+
},
|
|
56
|
+
exams: {
|
|
57
|
+
dev: "https://exams.campx.dev",
|
|
58
|
+
prod: "https://exams.campx.in",
|
|
59
|
+
},
|
|
60
|
+
people: {
|
|
61
|
+
dev: "https://people.campx.dev",
|
|
62
|
+
prod: "https://people.campx.in",
|
|
63
|
+
},
|
|
64
|
+
hostel: {
|
|
65
|
+
dev: "https://hostel.campx.dev",
|
|
66
|
+
prod: "https://hostel.campx.in",
|
|
67
|
+
},
|
|
68
|
+
commute: {
|
|
69
|
+
dev: "https://commute.campx.dev",
|
|
70
|
+
prod: "https://commute.campx.in",
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const applications: Application[] = [
|
|
75
|
+
{
|
|
76
|
+
title: "Admin",
|
|
77
|
+
path: isDevelopment ? origins.admin.dev : origins.admin.prod,
|
|
78
|
+
icon: admin,
|
|
79
|
+
key: "admin",
|
|
80
|
+
domainName: "admin",
|
|
81
|
+
description: "Manage Complete Campus Root Configuration",
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
{
|
|
85
|
+
title: "EnrollX",
|
|
86
|
+
key: "enroll_x",
|
|
87
|
+
domainName: "enroll",
|
|
88
|
+
path: isDevelopment ? origins.enroll.dev : origins.enroll.prod,
|
|
89
|
+
icon: enrollSmall,
|
|
90
|
+
description: "Manage Admissions in the Campus",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
title: "PayX",
|
|
94
|
+
key: "payments",
|
|
95
|
+
domainName: "payments",
|
|
96
|
+
path: isDevelopment ? origins.payments.dev : origins.payments.prod,
|
|
97
|
+
icon: payxSmall,
|
|
98
|
+
description: "Manage Payments in the Campus",
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
title: "CollegeX",
|
|
102
|
+
path: isDevelopment ? origins.ums.dev : origins.ums.prod,
|
|
103
|
+
icon: squareSmall,
|
|
104
|
+
key: "square",
|
|
105
|
+
domainName: "ums",
|
|
106
|
+
description: "Manage Complete Campus Activities",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
title: "ExamX",
|
|
110
|
+
key: "exams",
|
|
111
|
+
domainName: "exams",
|
|
112
|
+
path: isDevelopment ? origins.exams.dev : origins.exams.prod,
|
|
113
|
+
icon: examsSmall,
|
|
114
|
+
description: "Manage all Examinations in the Campus",
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
title: "PeopleX",
|
|
118
|
+
key: "hrms",
|
|
119
|
+
domainName: "people",
|
|
120
|
+
path: isDevelopment ? origins.people.dev : origins.people.prod,
|
|
121
|
+
icon: peopleSmall,
|
|
122
|
+
description: "Manage People in the Campus",
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
title: "HostelX",
|
|
126
|
+
key: "hostels",
|
|
127
|
+
domainName: "hostel",
|
|
128
|
+
path: isDevelopment ? origins.hostel.dev : origins.hostel.prod,
|
|
129
|
+
icon: hostelSmall,
|
|
130
|
+
description: "Manage Hostels in the Campus",
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
title: "CommuteX",
|
|
134
|
+
key: "commute_x",
|
|
135
|
+
domainName: "commute",
|
|
136
|
+
path: isDevelopment ? origins.commute.dev : origins.commute.prod,
|
|
137
|
+
icon: commuteSmall,
|
|
138
|
+
description: "Manage Commute in the Campus",
|
|
139
|
+
},
|
|
140
|
+
];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const isDevelopment: boolean =
|
|
2
|
+
process.env.NODE_ENV === "development" ||
|
|
3
|
+
window.location.origin.split("campx")[1] === ".dev";
|
|
4
|
+
|
|
5
|
+
export const urlTenantKey = window.location.pathname.split("/")[1];
|
|
6
|
+
export const institutionKey = window.location.pathname.split("/")[2];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {
|
|
2
|
+
admin,
|
|
3
|
+
collegex,
|
|
4
|
+
commutex,
|
|
5
|
+
enrollx,
|
|
6
|
+
examx,
|
|
7
|
+
hostelx,
|
|
8
|
+
payx,
|
|
9
|
+
peoplex,
|
|
10
|
+
} from "../assets/images";
|
|
11
|
+
|
|
12
|
+
export const imageMap: any = {
|
|
13
|
+
ums: collegex,
|
|
14
|
+
enroll: enrollx,
|
|
15
|
+
exams: examx,
|
|
16
|
+
payments: payx,
|
|
17
|
+
people: peoplex,
|
|
18
|
+
campx: collegex,
|
|
19
|
+
commute: commutex,
|
|
20
|
+
hostel: hostelx,
|
|
21
|
+
admin: admin,
|
|
22
|
+
};
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": [
|
|
5
|
+
"dom",
|
|
6
|
+
"dom.iterable",
|
|
7
|
+
"esnext"
|
|
8
|
+
],
|
|
9
|
+
"allowJs": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"esModuleInterop": true,
|
|
12
|
+
"allowSyntheticDefaultImports": true,
|
|
13
|
+
"strict": true,
|
|
14
|
+
"forceConsistentCasingInFileNames": true,
|
|
15
|
+
"noFallthroughCasesInSwitch": true,
|
|
16
|
+
"module": "esnext",
|
|
17
|
+
"moduleResolution": "node",
|
|
18
|
+
"resolveJsonModule": true,
|
|
19
|
+
"isolatedModules": true,
|
|
20
|
+
"noEmit": true,
|
|
21
|
+
"jsx": "react-jsx"
|
|
22
|
+
},
|
|
23
|
+
"include": [
|
|
24
|
+
"src"
|
|
25
|
+
]
|
|
26
|
+
}
|