@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,443 @@
1
+ import { Components } from "@mui/material";
2
+ import { TypographyOptions } from "@mui/material/styles/createTypography";
3
+ import { DarkColorTokens, LightColorTokens } from "./colorTokens";
4
+ import { customCssBaseline } from "./customCssBaseline";
5
+
6
+ declare module "@mui/material/Typography" {
7
+ interface TypographyPropsVariantOverrides {
8
+ label1: true;
9
+ label2: true;
10
+ subtitle3: true;
11
+ }
12
+ }
13
+
14
+ // typography: {
15
+ // fontFamily: ["Heebo", "Poppins", "sans-serif"].join(","),
16
+ // },
17
+ // components: {
18
+ // MuiIconButton: {
19
+ // defaultProps: {
20
+ // disableRipple: true,
21
+ // disableFocusRipple: true,
22
+ // disableTouchRipple: true,
23
+ // },
24
+ // styleOverrides: {
25
+ // root: {
26
+ // borderRadius: "10px",
27
+ // },
28
+ // },
29
+ // },
30
+ // MuiButtonBase: {
31
+ // defaultProps: {},
32
+ // styleOverrides: {
33
+ // root: {},
34
+ // },
35
+ // },
36
+ // MuiButton: {
37
+ // defaultProps: {},
38
+ // styleOverrides: {
39
+ // root: {
40
+ // textTransform: "none",
41
+ // padding: "5px 30px ",
42
+ // maxHeight: "40px ",
43
+ // borderRadius: "5px ",
44
+ // boxShadow: "none ",
45
+ // fontSize: "14px ",
46
+ // fontFamily: "Poppins",
47
+ // fontWeight: 600,
48
+ // "&:hover": {
49
+ // boxShadow: "none ",
50
+ // "@media (hover: none )": {
51
+ // boxShadow: "none ",
52
+ // },
53
+ // },
54
+ // "&$focusVisible": {
55
+ // boxShadow: "none",
56
+ // },
57
+ // "&:active": {
58
+ // boxShadow: "none",
59
+ // },
60
+ // "&$disabled": { boxShadow: "none" },
61
+ // },
62
+ // },
63
+ // },
64
+ // MuiLink: {
65
+ // defaultProps: {
66
+ // underline: "none",
67
+ // },
68
+ // },
69
+ // MuiTextField: {
70
+ // defaultProps: {
71
+ // variant: "outlined",
72
+ // color: "primary",
73
+ // fullWidth: true,
74
+ // },
75
+ // styleOverrides: {
76
+ // root: {
77
+ // "& label": {
78
+ // display: "none",
79
+ // },
80
+ // "& legend": {
81
+ // "& span": {
82
+ // display: "none",
83
+ // },
84
+ // },
85
+ // minWidth: "350px",
86
+ // },
87
+ // },
88
+ // },
89
+ // MuiInputBase: {
90
+ // styleOverrides: {
91
+ // root: {
92
+ // fontSize: "16px !important",
93
+ // fontFamily: "Heebo !important",
94
+ // fontWeight: 300,
95
+ // color: "#FFFFFF",
96
+ // "&.Mui-disabled": {
97
+ // backgroundColor: "#F8F8F8",
98
+ // color: "#a0a0a0",
99
+ // },
100
+ // },
101
+ // },
102
+ // },
103
+ // MuiOutlinedInput: {
104
+ // styleOverrides: {
105
+ // root: {
106
+ // "& label": {
107
+ // display: "none",
108
+ // },
109
+ // "& legend": {
110
+ // "& span": {
111
+ // display: "none",
112
+ // },
113
+ // },
114
+ // "&.Mui-disabled": {
115
+ // backgroundColor: "#f0f0f0",
116
+ // },
117
+ // maxHeight: "40px",
118
+ // maxWidth: "400px",
119
+ // },
120
+ // },
121
+ // },
122
+ // MuiFormLabel: {
123
+ // styleOverrides: {
124
+ // root: {
125
+ // fontSize: "14px",
126
+ // color: "#959595",
127
+ // },
128
+ // },
129
+ // },
130
+ // MuiTypography: {
131
+ // styleOverrides: {
132
+ // h6: {
133
+ // fontSize: "24px",
134
+ // fontWeight: 800,
135
+ // fontFamily: "Poppins",
136
+ // color: LightColorTokens.text.primary,
137
+ // },
138
+ // subtitle1: {
139
+ // fontSize: "18px",
140
+ // fontWeight: 600,
141
+ // fontFamily: "Poppins",
142
+ // color: LightColorTokens.text.primary,
143
+ // },
144
+ // subtitle2: {
145
+ // fontSize: "16px",
146
+ // fontWeight: 600,
147
+ // fontFamily: "Poppins",
148
+ // color: LightColorTokens.text.primary,
149
+ // },
150
+ // subtitle3: {
151
+ // fontSize: "14px",
152
+ // fontWeight: 400,
153
+ // fontFamily: "Poppins",
154
+ // color: LightColorTokens.text.primary,
155
+ // },
156
+ // body1: {
157
+ // fontSize: "16px",
158
+ // fontWeight: 600,
159
+ // fontFamily: "Heebo",
160
+ // color: LightColorTokens.text.primary,
161
+ // },
162
+ // body2: {
163
+ // fontSize: "14px",
164
+ // fontWeight: 400,
165
+ // fontFamily: "Heebo",
166
+ // color: LightColorTokens.text.primary,
167
+ // },
168
+ // caption: {
169
+ // fontSize: "12px",
170
+ // fontWeight: 400,
171
+ // fontFamily: "Heebo",
172
+ // color: LightColorTokens.text.primary,
173
+ // },
174
+ // label1: {
175
+ // fontSize: "14px",
176
+ // fontWeight: 300,
177
+ // fontFamily: "Heebo",
178
+ // color: LightColorTokens.text.secondary,
179
+ // },
180
+ // label2: {
181
+ // fontSize: "14px",
182
+ // fontWeight: 300,
183
+ // fontFamily: "Poppins",
184
+ // color: LightColorTokens.text.secondary,
185
+ // },
186
+ // } as TypographyOptions,
187
+ // },
188
+ // MuiCssBaseline: {
189
+ // styleOverrides: customCssBaseline,
190
+ // },
191
+ // } as Components,
192
+ // };
193
+ export enum Theme {
194
+ LIGHT = "light",
195
+ DARK = "dark",
196
+ }
197
+ export const getCommonTheme = (mode: Theme) => {
198
+ const ColorTokens = mode == Theme.DARK ? DarkColorTokens : LightColorTokens;
199
+ return {
200
+ typography: {
201
+ fontFamily: ["Heebo", "Poppins", "sans-serif"].join(","),
202
+ },
203
+ components: {
204
+ MuiIconButton: {
205
+ defaultProps: {
206
+ disableRipple: true,
207
+ disableFocusRipple: true,
208
+ disableTouchRipple: true,
209
+ },
210
+ styleOverrides: {
211
+ root: {
212
+ borderRadius: "10px",
213
+ },
214
+ },
215
+ },
216
+ MuiMenu: {
217
+ styleOverrides: {
218
+ list: {
219
+ minWidth: "240px",
220
+ padding: 0,
221
+ "& li": {
222
+ borderBottom: "1212121A",
223
+ ":hover": {
224
+ backgroundColor: "rgba(0, 0, 0, 0.025)",
225
+ },
226
+ },
227
+ "& > :last-child": {
228
+ borderBottom: "none",
229
+ "& li": {
230
+ borderBottom: "none",
231
+ },
232
+ },
233
+ },
234
+ paper: {
235
+ borderRadius: "5px",
236
+ border: `1px solid ${ColorTokens.secondary.main}`,
237
+ marginTop: "10px",
238
+ boxShadow: "0px 5px 15px #0000001A",
239
+ "&::-webkit-scrollbar": {
240
+ width: "0.5em",
241
+ height: "0.5em",
242
+ },
243
+ "&::-webkit-scrollbar-thumb": {
244
+ backgroundColor: "rgba(0, 0, 0, 0.15)",
245
+ borderRadius: "3px",
246
+ },
247
+ },
248
+ },
249
+ },
250
+ MuiButton: {
251
+ defaultProps: {},
252
+ styleOverrides: {
253
+ root: {
254
+ textTransform: "none",
255
+ padding: "5px 30px ",
256
+ maxHeight: "40px ",
257
+ borderRadius: "5px ",
258
+ boxShadow: "none ",
259
+ fontSize: "14px ",
260
+ fontFamily: "Poppins",
261
+ fontWeight: 600,
262
+ "&:hover": {
263
+ boxShadow: "none ",
264
+ "@media (hover: none )": {
265
+ boxShadow: "none ",
266
+ },
267
+ },
268
+ "&$focusVisible": {
269
+ boxShadow: "none",
270
+ },
271
+ "&:active": {
272
+ boxShadow: "none",
273
+ },
274
+ "&$disabled": { boxShadow: "none" },
275
+ },
276
+ },
277
+ },
278
+ MuiTextField: {
279
+ defaultProps: {
280
+ variant: "outlined",
281
+ color: "primary",
282
+ fullWidth: true,
283
+ },
284
+ styleOverrides: {
285
+ root: {
286
+ "& label": {
287
+ display: "none",
288
+ },
289
+ "& legend": {
290
+ "& span": {
291
+ display: "none",
292
+ },
293
+ },
294
+ minWidth: "350px",
295
+ },
296
+ },
297
+ },
298
+ MuiSwitch: {
299
+ styleOverrides: {
300
+ root: {
301
+ width: 45,
302
+ height: 26,
303
+ padding: 0,
304
+ "& .MuiSwitch-switchBase": {
305
+ padding: 0,
306
+ margin: 2,
307
+ transitionDuration: "500ms",
308
+ "&.Mui-checked": {
309
+ transform: "translateX(18px)",
310
+ "& + .MuiSwitch-track": {
311
+ backgroundColor: ColorTokens.grey.main,
312
+ opacity: 1,
313
+ border: 0,
314
+ },
315
+ "& .MuiSwitch-thumb": {
316
+ boxSizing: "border-box",
317
+ backgroundColor: ColorTokens.primary.main,
318
+ width: 22,
319
+ height: 22,
320
+ },
321
+ "&.Mui-disabled + .MuiSwitch-track": {
322
+ opacity: 0.5,
323
+ },
324
+ },
325
+ },
326
+ "& .MuiSwitch-thumb": {
327
+ boxSizing: "border-box",
328
+ backgroundColor: ColorTokens.background.paper,
329
+ width: 22,
330
+ height: 22,
331
+ },
332
+ "& .MuiSwitch-track": {
333
+ borderRadius: 13,
334
+ backgroundColor: ColorTokens.grey.main,
335
+ opacity: 1,
336
+ },
337
+ "&.Mui-disabled + .MuiSwitch-track": {
338
+ opacity: 0.1,
339
+ },
340
+ "&.Mui-disabled + .MuiSwitch-thumb": {
341
+ opacity: 0.1,
342
+ },
343
+ },
344
+ },
345
+ },
346
+ MuiOutlinedInput: {
347
+ styleOverrides: {
348
+ root: {
349
+ "& label": {
350
+ display: "none",
351
+ },
352
+ "& legend": {
353
+ "& span": {
354
+ display: "none",
355
+ },
356
+ },
357
+ maxHeight: "40px",
358
+ maxWidth: "400px",
359
+ fontSize: "16px",
360
+ fontFamily: "Heebo",
361
+ fontWeight: 300,
362
+ color: ColorTokens.text.primary,
363
+ },
364
+ },
365
+ },
366
+ MuiLink: {
367
+ defaultProps: {
368
+ underline: "none",
369
+ },
370
+ },
371
+ MuiFormLabel: {
372
+ styleOverrides: {
373
+ root: {
374
+ fontSize: "14px",
375
+ color: "#959595",
376
+ },
377
+ },
378
+ },
379
+
380
+ MuiTypography: {
381
+ styleOverrides: {
382
+ h6: {
383
+ fontSize: "24px",
384
+ fontWeight: 800,
385
+ fontFamily: "Poppins",
386
+ color: ColorTokens.text.primary,
387
+ },
388
+ subtitle1: {
389
+ fontSize: "18px",
390
+ fontWeight: 600,
391
+ fontFamily: "Poppins",
392
+ color: ColorTokens.text.primary,
393
+ },
394
+ subtitle2: {
395
+ fontSize: "16px",
396
+ fontWeight: 600,
397
+ fontFamily: "Poppins",
398
+ color: ColorTokens.text.primary,
399
+ },
400
+ subtitle3: {
401
+ fontSize: "14px",
402
+ fontWeight: 400,
403
+ fontFamily: "Poppins",
404
+ color: ColorTokens.text.primary,
405
+ },
406
+ body1: {
407
+ fontSize: "16px",
408
+ fontWeight: 600,
409
+ fontFamily: "Heebo",
410
+ color: ColorTokens.text.primary,
411
+ },
412
+ body2: {
413
+ fontSize: "14px",
414
+ fontWeight: 400,
415
+ fontFamily: "Heebo",
416
+ color: ColorTokens.text.primary,
417
+ },
418
+ caption: {
419
+ fontSize: "12px",
420
+ fontWeight: 400,
421
+ fontFamily: "Heebo",
422
+ color: ColorTokens.text.secondary,
423
+ },
424
+ label1: {
425
+ fontSize: "14px",
426
+ fontWeight: 400,
427
+ fontFamily: "Heebo",
428
+ color: ColorTokens.text.secondary,
429
+ },
430
+ label2: {
431
+ fontSize: "12px",
432
+ fontWeight: 400,
433
+ fontFamily: "Poppins",
434
+ color: ColorTokens.text.secondary,
435
+ },
436
+ } as TypographyOptions,
437
+ },
438
+ MuiCssBaseline: {
439
+ styleOverrides: customCssBaseline,
440
+ },
441
+ } as Components,
442
+ };
443
+ };
@@ -0,0 +1,39 @@
1
+ import { heeboMedium, heeboSemiBold } from "../assets/fonts/heebo";
2
+ import {
3
+ boldPoppins,
4
+ mediumPoppins,
5
+ semiboldPoppins,
6
+ } from "../assets/fonts/poppins";
7
+
8
+ export const customCssBaseline = `
9
+ @font-face {
10
+ font-family: Poppins;
11
+ src: url(${mediumPoppins}) format('truetype');
12
+ font-display: swap;
13
+ font-weight: 400;
14
+ }
15
+ @font-face {
16
+ font-family: Poppins;
17
+ src: url(${semiboldPoppins}) format('truetype');
18
+ font-display: swap;
19
+ font-weight: 600;
20
+ }
21
+ @font-face {
22
+ font-family: Poppins;
23
+ src: url(${boldPoppins}) format('truetype');
24
+ font-display: swap;
25
+ font-weight: 800;
26
+ }
27
+ @font-face {
28
+ font-family: Heebo;
29
+ src: url(${heeboMedium}) format('truetype');
30
+ font-display: swap;
31
+ font-weight: 400;
32
+ }
33
+ @font-face {
34
+ font-family: Heebo;
35
+ src: url(${heeboSemiBold}) format('truetype');
36
+ font-display: swap;
37
+ font-weight: 600;
38
+ }
39
+ `;
@@ -0,0 +1,24 @@
1
+ import { createTheme } from "@mui/material/styles";
2
+ import { DarkColorTokens } from "./colorTokens";
3
+ import { getCommonTheme, Theme } from "./commonTheme";
4
+
5
+ const darkThemeColors = {};
6
+
7
+ const darkTheme = createTheme({
8
+ palette: {
9
+ mode: "dark",
10
+ primary: DarkColorTokens.primary,
11
+ secondary: DarkColorTokens.secondary,
12
+ background: DarkColorTokens.background,
13
+ text: DarkColorTokens.text,
14
+ // highlight: {
15
+ // main: "#D4483E", // Highlight color for dark mode
16
+ // },
17
+ // defaultProfileIcon: {
18
+ // main: "#293640", // Default profile images and icons color for dark mode
19
+ // },
20
+ },
21
+ ...getCommonTheme(Theme.DARK),
22
+ });
23
+
24
+ export default darkTheme;
@@ -0,0 +1,4 @@
1
+ import lightTheme from "./lightTheme";
2
+ import darkTheme from "./darkTheme";
3
+
4
+ export { lightTheme, darkTheme };
@@ -0,0 +1,22 @@
1
+ import { createTheme } from "@mui/material/styles";
2
+ import { LightColorTokens } from "./colorTokens";
3
+ import { Theme, getCommonTheme } from "./commonTheme";
4
+
5
+ const lightTheme = createTheme({
6
+ palette: {
7
+ mode: "light",
8
+ primary: LightColorTokens.primary,
9
+ secondary: LightColorTokens.secondary,
10
+ background: LightColorTokens.background,
11
+ text: LightColorTokens.text,
12
+ // highlight: {
13
+ // main: "#D4483E", // Highlight color
14
+ // },
15
+ // defaultProfileIcon: {
16
+ // main: "#BDD6E8", // Default profile images and icons color
17
+ // },
18
+ },
19
+ ...getCommonTheme(Theme.LIGHT),
20
+ });
21
+
22
+ export default lightTheme;
@@ -0,0 +1,79 @@
1
+ // src/stories/Typography.stories.jsx
2
+ import { Stack } from "@mui/material";
3
+ import Typography from "../components/Typography/Typography";
4
+ // Update path as necessary
5
+
6
+ export default {
7
+ title: "Design System/Typography",
8
+ component: Typography,
9
+ };
10
+
11
+ const TypographyDisplay = ({
12
+ variant,
13
+ fontInfo,
14
+ text,
15
+ }: {
16
+ variant: any;
17
+ fontInfo: { family: string; weight: string; size: string };
18
+ text: string;
19
+ }) => (
20
+ <div style={{ marginBottom: 20 }}>
21
+ <Typography variant={variant} style={{ margin: "10px 0" }}>
22
+ {text}
23
+ </Typography>
24
+ <div style={{ fontSize: "12px", color: "#666" }}>
25
+ Font: {fontInfo.family}, Weight: {fontInfo.weight}, FontSize:{" "}
26
+ {fontInfo.size}
27
+ </div>
28
+ </div>
29
+ );
30
+
31
+ export const TypographyStyles = () => (
32
+ <Stack>
33
+ <TypographyDisplay
34
+ variant="h6"
35
+ fontInfo={{ family: "Poppins", weight: "800", size: "24px" }}
36
+ text="Heading 6 (h6) - Lorem ipsum dolor sit."
37
+ />
38
+ <TypographyDisplay
39
+ variant="subtitle1"
40
+ fontInfo={{ family: "Poppins", weight: "600", size: "18px" }}
41
+ text="Subtitle 1 (subtitle1) - Lorem ipsum dolor sit."
42
+ />
43
+ <TypographyDisplay
44
+ variant="subtitle2"
45
+ fontInfo={{ family: "Poppins", weight: "600", size: "16px" }}
46
+ text="Subtitle 2 (subtitle2) - Lorem ipsum dolor sit."
47
+ />
48
+ <TypographyDisplay
49
+ variant="subtitle1"
50
+ fontInfo={{ family: "Poppins", weight: "400", size: "14px" }}
51
+ text="Subtitle 3 (subtitle3) - Lorem ipsum dolor sit."
52
+ />
53
+ <TypographyDisplay
54
+ variant="body1"
55
+ fontInfo={{ family: "Heebo", weight: "600", size: "16px" }}
56
+ text="Body 1 (body1) - Lorem ipsum dolor sit."
57
+ />
58
+ <TypographyDisplay
59
+ variant="body2"
60
+ fontInfo={{ family: "Heebo", weight: "400", size: "14px" }}
61
+ text="Body 2 (body2) - Lorem ipsum dolor sit."
62
+ />
63
+ <TypographyDisplay
64
+ variant="caption"
65
+ fontInfo={{ family: "Heebo", weight: "400", size: "12px" }}
66
+ text="Caption (caption) - Lorem ipsum dolor sit."
67
+ />
68
+ <TypographyDisplay
69
+ variant={"label1" as any}
70
+ fontInfo={{ family: "Heebo", weight: "300", size: "14px" }}
71
+ text="Label 1 (label1) - Lorem ipsum dolor sit."
72
+ />
73
+ <TypographyDisplay
74
+ variant={"label2" as any}
75
+ fontInfo={{ family: "Poppins", weight: "300", size: "14px" }}
76
+ text="Label 2 (label2) - Lorem ipsum dolor sit."
77
+ />
78
+ </Stack>
79
+ );