@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.
Files changed (122) hide show
  1. package/.storybook/main.ts +29 -0
  2. package/.storybook/preview.tsx +28 -0
  3. package/.vscode/settings.json +3 -0
  4. package/README.md +100 -0
  5. package/bitbucket-pipelines.yml +60 -0
  6. package/exports.ts +1 -0
  7. package/package.json +74 -0
  8. package/public/favicon.ico +0 -0
  9. package/public/index.html +43 -0
  10. package/public/logo192.png +0 -0
  11. package/public/logo512.png +0 -0
  12. package/public/manifest.json +25 -0
  13. package/public/robots.txt +3 -0
  14. package/src/App.css +38 -0
  15. package/src/App.test.tsx +9 -0
  16. package/src/App.tsx +12 -0
  17. package/src/assets/fonts/heebo/Heebo-Medium.ttf +0 -0
  18. package/src/assets/fonts/heebo/Heebo-SemiBold.ttf +0 -0
  19. package/src/assets/fonts/heebo/index.ts +3 -0
  20. package/src/assets/fonts/poppins/Poppins-Bold.ttf +0 -0
  21. package/src/assets/fonts/poppins/Poppins-Light.ttf +0 -0
  22. package/src/assets/fonts/poppins/Poppins-Medium.ttf +0 -0
  23. package/src/assets/fonts/poppins/Poppins-Regular.ttf +0 -0
  24. package/src/assets/fonts/poppins/Poppins-SemiBold.ttf +0 -0
  25. package/src/assets/fonts/poppins/index.ts +14 -0
  26. package/src/assets/images/admin.png +0 -0
  27. package/src/assets/images/campx_logo__full_primary.png +0 -0
  28. package/src/assets/images/collegex.png +0 -0
  29. package/src/assets/images/commutex.png +0 -0
  30. package/src/assets/images/enrollx.png +0 -0
  31. package/src/assets/images/examx.png +0 -0
  32. package/src/assets/images/hostelx copy.png +0 -0
  33. package/src/assets/images/hostelx.png +0 -0
  34. package/src/assets/images/icons.tsx +193 -0
  35. package/src/assets/images/index.ts +25 -0
  36. package/src/assets/images/payx.png +0 -0
  37. package/src/assets/images/pepolex.png +0 -0
  38. package/src/assets/images/svg/commutex_small.svg +11 -0
  39. package/src/assets/images/svg/enroll_logo.svg +9 -0
  40. package/src/assets/images/svg/exams_small.svg +12 -0
  41. package/src/assets/images/svg/help-icon.svg +8 -0
  42. package/src/assets/images/svg/hostel_small.svg +13 -0
  43. package/src/assets/images/svg/index.ts +19 -0
  44. package/src/assets/images/svg/payx_small.svg +16 -0
  45. package/src/assets/images/svg/people_small.svg +9 -0
  46. package/src/assets/images/svg/squareSmall.svg +9 -0
  47. package/src/assets/images/svg/square_small.svg +9 -0
  48. package/src/components/DropDownMenu/DropDownButton.tsx +30 -0
  49. package/src/components/DropDownMenu/DropDownIcon.tsx +31 -0
  50. package/src/components/DropDownMenu/DropDownMenu.stories.tsx +139 -0
  51. package/src/components/DropDownMenu/DropDownMenu.tsx +65 -0
  52. package/src/components/DropDownMenu/MenuItemButton.tsx +29 -0
  53. package/src/components/DropDownMenu/styles.tsx +31 -0
  54. package/src/components/Input/Button/Button.stories.tsx +62 -0
  55. package/src/components/Input/Button/Button.tsx +11 -0
  56. package/src/components/Input/Label/Label.tsx +11 -0
  57. package/src/components/Input/SingleSelect/SingleSelect.stories.tsx +55 -0
  58. package/src/components/Input/SingleSelect/SingleSelect.tsx +4 -0
  59. package/src/components/Input/Switch/Switch.stories.tsx +62 -0
  60. package/src/components/Input/Switch/Switch.tsx +11 -0
  61. package/src/components/Input/TextField/TextField.stories.tsx +135 -0
  62. package/src/components/Input/TextField/TextField.tsx +35 -0
  63. package/src/components/Layout/ComponentBackground/ComponentBackground.tsx +82 -0
  64. package/src/components/Layout/ComponentBackground/DefaultBackground.tsx +12 -0
  65. package/src/components/Layout/ComponentBackground/PaperBackground.tsx +12 -0
  66. package/src/components/Layout/Header/AppHeader.stories.tsx +209 -0
  67. package/src/components/Layout/Header/AppHeader.tsx +70 -0
  68. package/src/components/Layout/Header/AppLogo.tsx +53 -0
  69. package/src/components/Layout/Header/AppsMenu.tsx +162 -0
  70. package/src/components/Layout/Header/HeaderActions/CogWheelMenu.tsx +30 -0
  71. package/src/components/Layout/Header/HeaderActions/HeaderActions.tsx +63 -0
  72. package/src/components/Layout/Header/HeaderActions/UserBox.tsx +117 -0
  73. package/src/components/Layout/Header/styles/styles.tsx +69 -0
  74. package/src/components/Typography/Typography.stories.tsx +95 -0
  75. package/src/components/Typography/Typography.tsx +12 -0
  76. package/src/components/index.ts +1 -0
  77. package/src/contexts/Providers.tsx +6 -0
  78. package/src/index.css +13 -0
  79. package/src/index.tsx +19 -0
  80. package/src/logo.svg +1 -0
  81. package/src/react-app-env.d.ts +1 -0
  82. package/src/reportWebVitals.ts +15 -0
  83. package/src/setupTests.ts +5 -0
  84. package/src/stories/Button.stories.ts +52 -0
  85. package/src/stories/Button.tsx +48 -0
  86. package/src/stories/Configure.mdx +364 -0
  87. package/src/stories/Header.stories.ts +33 -0
  88. package/src/stories/Header.tsx +56 -0
  89. package/src/stories/Page.stories.ts +32 -0
  90. package/src/stories/Page.tsx +73 -0
  91. package/src/stories/assets/accessibility.png +0 -0
  92. package/src/stories/assets/accessibility.svg +5 -0
  93. package/src/stories/assets/addon-library.png +0 -0
  94. package/src/stories/assets/assets.png +0 -0
  95. package/src/stories/assets/avif-test-image.avif +0 -0
  96. package/src/stories/assets/context.png +0 -0
  97. package/src/stories/assets/discord.svg +15 -0
  98. package/src/stories/assets/docs.png +0 -0
  99. package/src/stories/assets/figma-plugin.png +0 -0
  100. package/src/stories/assets/github.svg +3 -0
  101. package/src/stories/assets/share.png +0 -0
  102. package/src/stories/assets/styling.png +0 -0
  103. package/src/stories/assets/testing.png +0 -0
  104. package/src/stories/assets/theming.png +0 -0
  105. package/src/stories/assets/tutorials.svg +12 -0
  106. package/src/stories/assets/youtube.svg +4 -0
  107. package/src/stories/button.css +30 -0
  108. package/src/stories/header.css +32 -0
  109. package/src/stories/page.css +69 -0
  110. package/src/themes/MuiThemeProvider.tsx +18 -0
  111. package/src/themes/colorTokens.stories.tsx +71 -0
  112. package/src/themes/colorTokens.ts +77 -0
  113. package/src/themes/commonTheme.ts +443 -0
  114. package/src/themes/customCssBaseline.ts +39 -0
  115. package/src/themes/darkTheme.ts +24 -0
  116. package/src/themes/index.ts +4 -0
  117. package/src/themes/lightTheme.ts +22 -0
  118. package/src/themes/typography.stories.tsx +79 -0
  119. package/src/utils/applications.ts +140 -0
  120. package/src/utils/constants.ts +6 -0
  121. package/src/utils/imageMap.ts +22 -0
  122. 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
+ }