@campxdev/react-blueprint 0.1.28 → 0.1.29

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 (90) hide show
  1. package/.storybook/main.ts +0 -1
  2. package/.storybook/preview.tsx +10 -5
  3. package/.vscode/settings.json +3 -0
  4. package/package.json +1 -1
  5. package/src/App.tsx +5 -5
  6. package/src/components/Assets/Icons/IconComponents/AdministratorIcon.tsx +26 -0
  7. package/src/components/Assets/Icons/IconComponents/CampxIcon.tsx +25 -0
  8. package/src/components/{Icons/export.ts → Assets/Icons/Icons.tsx} +4 -0
  9. package/src/components/Assets/export.ts +1 -0
  10. package/src/components/DataDisplay/DataTable/TablePagination.tsx +3 -1
  11. package/src/components/DataDisplay/export.ts +2 -1
  12. package/src/components/Feedback/Tooltip/Tooltip.tsx +4 -6
  13. package/src/components/Input/LabelWrapper/LabelWrapper.tsx +1 -1
  14. package/src/components/Input/SingleCheckBox/SIngleCheckBox.tsx +1 -1
  15. package/src/components/Input/SingleSelect/SingleSelect.tsx +0 -1
  16. package/src/components/Layout/AppHeader/AppHeader.tsx +55 -0
  17. package/src/components/Layout/{Header/HeaderActions → AppHeader/AppHeaderActions}/HeaderActions.tsx +15 -16
  18. package/src/components/Layout/{Header/HeaderActions → AppHeader/AppHeaderActions}/UserBox.tsx +7 -8
  19. package/src/components/Layout/AppHeader/styles/styles.tsx +37 -0
  20. package/src/components/Navigation/exports.ts +15 -0
  21. package/src/components/export.ts +5 -8
  22. package/src/{components/Icons → stories/Assets}/Icons.stories.tsx +11 -1
  23. package/src/{components/DataDisplay/Avatar → stories/DataDisplay}/CircularAvatar.stories.tsx +4 -1
  24. package/src/{components/DataDisplay/DataTable → stories/DataDisplay}/DataTable.stories.tsx +2 -1
  25. package/src/{components/DataDisplay/SidePanel → stories/DataDisplay}/SidePanel.stories.tsx +4 -1
  26. package/src/{components/DataDisplay/Avatar → stories/DataDisplay}/SquareAvatar.stories.tsx +4 -1
  27. package/src/{themes → stories/DesignSystem}/colorTokens.stories.tsx +7 -11
  28. package/src/{themes → stories/DesignSystem}/typography.stories.tsx +2 -1
  29. package/src/{components/Feedback/Spinner → stories/Feedback}/Spinner.stories.tsx +1 -2
  30. package/src/{components/Feedback/Tooltip → stories/Feedback}/Tooltip.stories.tsx +8 -4
  31. package/src/{components/Input/Button → stories/Input}/Button.stories.tsx +1 -2
  32. package/src/{components/Input/Chips → stories/Input}/Chips.stories.tsx +1 -1
  33. package/src/{components/Input/MultiCheckBox → stories/Input}/MultiCheckBox.stories.tsx +4 -1
  34. package/src/{components/Input/OtpInput → stories/Input}/OtpInput.stories.tsx +3 -2
  35. package/src/{components/Input/RadioGroup → stories/Input}/RadioGroup.stories.tsx +4 -1
  36. package/src/{components/Input/SearchBar → stories/Input}/SearchBar.stories.tsx +1 -1
  37. package/src/{components/Input/SingleCheckBox → stories/Input}/SingleCheckBox.stories.tsx +4 -2
  38. package/src/{components/Input/SingleSelect → stories/Input}/SingleSelect.stories.tsx +4 -1
  39. package/src/{components/Input/Switch → stories/Input}/Switch.stories.tsx +1 -2
  40. package/src/{components/Input/TextField → stories/Input}/TextField.stories.tsx +20 -6
  41. package/src/stories/Layout/AppHeader.stories.tsx +68 -0
  42. package/src/{components/Layout/LayoutWrapper → stories/Layout}/LayoutWrapper.stories.tsx +8 -5
  43. package/src/{components/Layout/PageContent → stories/Layout}/PageContent.stories.tsx +1 -1
  44. package/src/{components/Layout/SideNavigation → stories/Layout}/SideNavigation.stories.tsx +2 -2
  45. package/src/{components/Navigation/DialogButton → stories/Navigation}/DialogButton.stories.tsx +3 -1
  46. package/src/{components/Navigation/DropDownMenu → stories/Navigation}/DropDownMenu.stories.tsx +8 -5
  47. package/src/{components/Navigation/TabsContainer → stories/Navigation}/TabsContainer.stories.tsx +5 -2
  48. package/src/themes/colorTokens/colorPalette.tsx +48 -0
  49. package/src/themes/colorTokens/darkColorTokens.tsx +42 -0
  50. package/src/themes/colorTokens/lightColorTokens.ts +42 -0
  51. package/src/themes/commonTheme.ts +15 -18
  52. package/src/themes/darkTheme.ts +4 -12
  53. package/src/themes/lightTheme.ts +2 -11
  54. package/types/theme.d.ts +22 -12
  55. package/src/components/Icons/Icons.tsx +0 -14
  56. package/src/components/Layout/Header/AppHeader.stories.tsx +0 -210
  57. package/src/components/Layout/Header/AppHeader.tsx +0 -81
  58. package/src/components/Layout/Header/AppLogo.tsx +0 -51
  59. package/src/components/Layout/Header/styles/styles.tsx +0 -69
  60. package/src/themes/colorTokens.ts +0 -77
  61. /package/src/components/{Icons → Assets/Icons}/IconComponents/ActiveDevicesIcon.tsx +0 -0
  62. /package/src/components/{Icons → Assets/Icons}/IconComponents/AppsIcon.tsx +0 -0
  63. /package/src/components/{Icons → Assets/Icons}/IconComponents/BulbIcon.tsx +0 -0
  64. /package/src/components/{Icons → Assets/Icons}/IconComponents/CareerIcon.tsx +0 -0
  65. /package/src/components/{Icons → Assets/Icons}/IconComponents/CheckedCheckBoxIcon.tsx +0 -0
  66. /package/src/components/{Icons → Assets/Icons}/IconComponents/CheckedRadioIcon.tsx +0 -0
  67. /package/src/components/{Icons → Assets/Icons}/IconComponents/ClogWheelIcon.tsx +0 -0
  68. /package/src/components/{Icons → Assets/Icons}/IconComponents/CrossIcon.tsx +0 -0
  69. /package/src/components/{Icons → Assets/Icons}/IconComponents/DashBoardIcon.tsx +0 -0
  70. /package/src/components/{Icons → Assets/Icons}/IconComponents/DeviceIcon.tsx +0 -0
  71. /package/src/components/{Icons → Assets/Icons}/IconComponents/ExamResultIcon.tsx +0 -0
  72. /package/src/components/{Icons → Assets/Icons}/IconComponents/ExportIcon.tsx +0 -0
  73. /package/src/components/{Icons → Assets/Icons}/IconComponents/FilterIcon.tsx +0 -0
  74. /package/src/components/{Icons → Assets/Icons}/IconComponents/HelpIcon.tsx +0 -0
  75. /package/src/components/{Icons → Assets/Icons}/IconComponents/HomeIcon.tsx +0 -0
  76. /package/src/components/{Icons → Assets/Icons}/IconComponents/InfoIcon.tsx +0 -0
  77. /package/src/components/{Icons → Assets/Icons}/IconComponents/InstitutionsIcon.tsx +0 -0
  78. /package/src/components/{Icons → Assets/Icons}/IconComponents/LeftIcon.tsx +0 -0
  79. /package/src/components/{Icons → Assets/Icons}/IconComponents/LocationIcon.tsx +0 -0
  80. /package/src/components/{Icons → Assets/Icons}/IconComponents/LogoutIcon.tsx +0 -0
  81. /package/src/components/{Icons → Assets/Icons}/IconComponents/NavigationIcon.tsx +0 -0
  82. /package/src/components/{Icons → Assets/Icons}/IconComponents/NotificationIcon.tsx +0 -0
  83. /package/src/components/{Icons → Assets/Icons}/IconComponents/ProductFeaturesIcon.tsx +0 -0
  84. /package/src/components/{Icons → Assets/Icons}/IconComponents/ProfileIcon.tsx +0 -0
  85. /package/src/components/{Icons → Assets/Icons}/IconComponents/RightIcon.tsx +0 -0
  86. /package/src/components/{Icons → Assets/Icons}/IconComponents/TicketsIcon.tsx +0 -0
  87. /package/src/components/{Icons → Assets/Icons}/IconComponents/UncheckCheckBoxIcon.tsx +0 -0
  88. /package/src/components/{Icons → Assets/Icons}/IconComponents/UncheckedRadioIcon.tsx +0 -0
  89. /package/src/components/Layout/{Header/HeaderActions → AppHeader/AppHeaderActions}/CogWheelMenu.tsx +0 -0
  90. /package/src/components/Layout/{Header → AppHeader}/AppsMenu.tsx +0 -0
@@ -1,6 +1,7 @@
1
- import React from "react";
2
1
  import { Meta } from "@storybook/react";
3
- import OtpInput, { OtpInputProps } from "./OtpInput";
2
+ import OtpInput, {
3
+ OtpInputProps,
4
+ } from "../../components/Input/OtpInput/OtpInput";
4
5
 
5
6
  export default {
6
7
  title: "Input/OtpInput",
@@ -1,7 +1,10 @@
1
1
  // Import React and other necessary elements
2
2
 
3
3
  import { Meta } from "@storybook/react";
4
- import { RadioGroup, RadioGroupProps } from "./RadioGroup";
4
+ import {
5
+ RadioGroup,
6
+ RadioGroupProps,
7
+ } from "../../components/Input/RadioGroup/RadioGroup";
5
8
 
6
9
  // Define the default export with Meta type including the component type
7
10
  export default {
@@ -1,5 +1,5 @@
1
1
  import { Meta, StoryObj } from "@storybook/react/*";
2
- import { SearchBar } from "./SearchBar";
2
+ import { SearchBar } from "../../components/Input/SearchBar/SearchBar";
3
3
 
4
4
  const meta: Meta<typeof SearchBar> = {
5
5
  title: "Input/SearchBar",
@@ -1,7 +1,9 @@
1
1
  import { Meta, StoryFn } from "@storybook/react";
2
2
  import { useState } from "react";
3
-
4
- import { CheckboxProps, SingleCheckBox } from "./SIngleCheckBox";
3
+ import {
4
+ CheckboxProps,
5
+ SingleCheckBox,
6
+ } from "../../components/Input/SingleCheckBox/SIngleCheckBox";
5
7
 
6
8
  export default {
7
9
  title: "Input/SingleCheckBox",
@@ -1,9 +1,12 @@
1
1
  // Import React and other necessary elements
2
2
  import { Meta } from "@storybook/react";
3
+ import {
4
+ SingleSelect,
5
+ SingleSelectProps,
6
+ } from "../../components/Input/SingleSelect/SingleSelect";
3
7
 
4
8
  // Make sure your TextField import is correct
5
9
 
6
- import { SingleSelect, SingleSelectProps } from "./SingleSelect";
7
10
  const topFilms = [
8
11
  { label: "The Shawshank Redemption", value: 1994 },
9
12
  { label: "The Godfather", value: 1972 },
@@ -1,10 +1,9 @@
1
1
  // Import React and other necessary elements
2
2
  import { Meta } from "@storybook/react";
3
+ import { Switch, SwitchProps } from "../../components/Input/Switch/Switch";
3
4
 
4
5
  // Make sure your TextField import is correct
5
6
 
6
- import { Switch, SwitchProps } from "./Switch";
7
-
8
7
  // Define the default export with Meta type including the component type
9
8
  export default {
10
9
  title: "Input/Switch",
@@ -2,10 +2,16 @@
2
2
  import { Meta } from "@storybook/react";
3
3
 
4
4
  // Make sure your TextField import is correct
5
- import { TextField, TextFieldProps } from "./TextField";
6
- import { ToolTipContent, Tooltip } from "../../Feedback/Tooltip/Tooltip";
7
5
  import { InputAdornment as MuiInputAdornment } from "@mui/material";
8
- import { InfoIcon } from "../../Icons/IconComponents/InfoIcon";
6
+ import { Icons } from "../../components/Assets/Icons/Icons";
7
+ import {
8
+ ToolTipContent,
9
+ Tooltip,
10
+ } from "../../components/Feedback/Tooltip/Tooltip";
11
+ import {
12
+ TextField,
13
+ TextFieldProps,
14
+ } from "../../components/Input/TextField/TextField";
9
15
 
10
16
  // Define the default export with Meta type including the component type
11
17
  export default {
@@ -19,7 +25,7 @@ export default {
19
25
  },
20
26
  label: {
21
27
  control: "text",
22
- description: "The label text disp layed above the input field.",
28
+ description: "The label text displayed above the input field.",
23
29
  },
24
30
  value: {
25
31
  control: "text",
@@ -145,8 +151,16 @@ export const InfoInput = {
145
151
  InputProps: {
146
152
  endAdornment: (
147
153
  <MuiInputAdornment position="end">
148
- <Tooltip title={<ToolTipContent message={"This is the info tooltip !! This is the info tooltip !! This is the info tooltip !!"} />}>
149
- <InfoIcon />
154
+ <Tooltip
155
+ title={
156
+ <ToolTipContent
157
+ message={
158
+ "This is the info tooltip !! This is the info tooltip !! This is the info tooltip !!"
159
+ }
160
+ />
161
+ }
162
+ >
163
+ <Icons.InfoIcon />
150
164
  </Tooltip>
151
165
  </MuiInputAdornment>
152
166
  ),
@@ -0,0 +1,68 @@
1
+ import { Meta, StoryObj } from "@storybook/react";
2
+ import { AppsMenu } from "../../components/export";
3
+ import {
4
+ AppHeader,
5
+ AppHeaderProps,
6
+ } from "../../components/Layout/AppHeader/AppHeader";
7
+ import { Box } from "@mui/material";
8
+
9
+ // Define the default export with Meta type including the component type
10
+ const meta: Meta<typeof AppHeader> = {
11
+ title: "Layout/AppHeader",
12
+ component: AppHeader,
13
+ tags: ["autodocs"],
14
+ argTypes: {
15
+ actions: {
16
+ control: "object",
17
+ description: "Custom actions to be displayed.",
18
+ },
19
+ },
20
+ };
21
+
22
+ export default meta;
23
+ type Story = StoryObj<typeof AppHeader>;
24
+
25
+ // Primary story
26
+ export const Primary: Story = {
27
+ render: (args: AppHeaderProps) => (
28
+ <Box
29
+ sx={{
30
+ width: "100%",
31
+ height: "300px",
32
+ alignContent: "center",
33
+ justifyContent: "center",
34
+ }}
35
+ >
36
+ <AppHeader {...args} />
37
+ </Box>
38
+ ),
39
+ args: {
40
+ clientName: "Anurag University",
41
+ actions: [<p>asdjflsf</p>],
42
+ // appsMenu: <AppsMenu apps={["exams", "square", "admin"]} />,
43
+ userFullName: "Srikanth Yellapragada",
44
+ },
45
+ };
46
+
47
+ // Story with no apps menu
48
+ export const WithAppsMenu: Story = {
49
+ render: (args: AppHeaderProps) => (
50
+ <AppHeader
51
+ {...args}
52
+ appsMenu={
53
+ <AppsMenu
54
+ apps={[
55
+ "exams",
56
+ "square",
57
+ "admin",
58
+ "enroll",
59
+ "payments",
60
+ "hrms",
61
+ "hostels",
62
+ "commute_x",
63
+ ]}
64
+ />
65
+ }
66
+ />
67
+ ),
68
+ };
@@ -1,10 +1,13 @@
1
1
  import { Button, Stack } from "@mui/material";
2
2
  import { Meta, StoryObj } from "@storybook/react";
3
- import DialogButton from "../../Navigation/DialogButton/DialogButton";
4
- import { Icons } from "../../export";
5
- import { PageContent } from "../PageContent/PageContent";
6
- import { SideNavigation } from "../SideNavigation/SideNavigation";
7
- import { LayoutWrapper, LayoutWrapperProps } from "./LayoutWrapper";
3
+ import { Icons } from "../../components/Assets/Icons/Icons";
4
+ import {
5
+ LayoutWrapper,
6
+ LayoutWrapperProps,
7
+ } from "../../components/Layout/LayoutWrapper/LayoutWrapper";
8
+ import { PageContent } from "../../components/Layout/PageContent/PageContent";
9
+ import { SideNavigation } from "../../components/Layout/SideNavigation/SideNavigation";
10
+ import DialogButton from "../../components/Navigation/DialogButton/DialogButton";
8
11
 
9
12
  const LayoutWrapperStory = (props: LayoutWrapperProps) => {
10
13
  return (
@@ -1,5 +1,5 @@
1
1
  import { Meta, StoryObj } from "@storybook/react";
2
- import { PageContent } from "../../export";
2
+ import { PageContent } from "../../components/Layout/PageContent/PageContent";
3
3
 
4
4
  // Define the default export with Meta type including the component type
5
5
  const meta: Meta<typeof PageContent> = {
@@ -1,10 +1,10 @@
1
1
  import { Typography } from "@mui/material";
2
2
  import { Meta, StoryObj } from "@storybook/react";
3
- import { Icons } from "../../export";
3
+ import { Icons } from "../../components/Assets/Icons/Icons";
4
4
  import {
5
5
  SideNavigation,
6
6
  SideNavigationProps,
7
- } from "../SideNavigation/SideNavigation";
7
+ } from "../../components/Layout/SideNavigation/SideNavigation";
8
8
 
9
9
  // Define the default export with Meta type including the component type
10
10
  const meta: Meta<typeof SideNavigation> = {
@@ -1,6 +1,8 @@
1
1
  import { Box, Button, Typography } from "@mui/material";
2
2
  import { Meta, StoryObj } from "@storybook/react/*";
3
- import DialogButton, { DialogButtonProps } from "./DialogButton";
3
+ import DialogButton, {
4
+ DialogButtonProps,
5
+ } from "../../components/Navigation/DialogButton/DialogButton";
4
6
 
5
7
  // Define the default export with Meta type including the component type
6
8
  const meta: Meta<typeof DialogButton> = {
@@ -1,11 +1,14 @@
1
1
  import MoreVertIcon from "@mui/icons-material/MoreVert";
2
2
  import { IconButton } from "@mui/material";
3
3
  import { Meta, StoryObj } from "@storybook/react";
4
- import { Icons } from "../../export";
5
- import { DropDownButton } from "./DropDownButton";
6
- import { DropDownIcon } from "./DropDownIcon";
7
- import { DropdownMenu, DropdownMenuProps } from "./DropDownMenu";
8
- import { DropdownMenuItem } from "./DropdownMenuItem";
4
+ import { Icons } from "../../components/Assets/Icons/Icons";
5
+ import { DropDownButton } from "../../components/Navigation/DropDownMenu/DropDownButton";
6
+ import { DropDownIcon } from "../../components/Navigation/DropDownMenu/DropDownIcon";
7
+ import {
8
+ DropdownMenu,
9
+ DropdownMenuProps,
10
+ } from "../../components/Navigation/DropDownMenu/DropDownMenu";
11
+ import { DropdownMenuItem } from "../../components/Navigation/DropDownMenu/DropdownMenuItem";
9
12
 
10
13
  // Define the default export with Meta type including the component type
11
14
  const meta: Meta<typeof DropdownMenu> = {
@@ -1,7 +1,10 @@
1
1
  import { Box } from "@mui/material";
2
2
  import { Meta, StoryObj } from "@storybook/react";
3
- import { PageContent } from "../../Layout/PageContent/PageContent";
4
- import { TabsContainer, TabsContainerProps } from "./TabsContainer";
3
+ import { PageContent } from "../../components/Layout/PageContent/PageContent";
4
+ import {
5
+ TabsContainer,
6
+ TabsContainerProps,
7
+ } from "../../components/Navigation/TabsContainer/TabsContainer";
5
8
 
6
9
  // Define the default export with Meta type including the component type
7
10
  const meta: Meta<typeof TabsContainer> = {
@@ -0,0 +1,48 @@
1
+ export const ColorPalette = {
2
+ BrandColors: {
3
+ Violet100: "#F0F0F5",
4
+ Violet200: "#E0E0E7",
5
+ Violet250: "#D0D0E3",
6
+ Violet300: "#9E9DEB",
7
+ Violet400: "#9E9DEB",
8
+ Violet450: "#7B7ACC",
9
+ Violet500: "#656599",
10
+ Violet550: "#4D508A",
11
+ Violet600: "#323167",
12
+ Violet700: "#303259",
13
+ Violet800: "#1E1E45",
14
+ Violet900: "#1D1E3B",
15
+ Crimson: "#D4483E",
16
+ },
17
+ GreyColors: {
18
+ White50: "#FFFFFF80",
19
+ White70: "#FFFFFFB3",
20
+ White: "#FFFFFF",
21
+ Grey100: "#F2F2F2",
22
+ Grey200: "#CECECE",
23
+ Grey500: "#333333",
24
+ Black50: "#12121280",
25
+ Black70: "#121212B3",
26
+ Black: "#121212",
27
+ },
28
+ BlueGreyColors: {
29
+ BlueGrey100: "#F7F8FA",
30
+ BlueGrey400: "#293640",
31
+ BlueGrey600: "#1D2127",
32
+ BlueGrey800: "#161A1D",
33
+ },
34
+ UtilityColors: {
35
+ Green: "#88B053",
36
+ Blue: "#4BAABE",
37
+ Orange: "#ED9035",
38
+ Red: "#F2353C",
39
+ Pink: "#EA4A6B",
40
+ Yellow: "#F4C100",
41
+ Green20: "#88B05333",
42
+ Blue20: "#4BAABE33",
43
+ Orange20: "#ED903533",
44
+ Red20: "#F2353C33",
45
+ Pink20: "#EA4A6B33",
46
+ LightYellow: "#F4C10033",
47
+ },
48
+ };
@@ -0,0 +1,42 @@
1
+ import { ColorPalette } from "./colorPalette";
2
+
3
+ export const DarkColorTokens = {
4
+ primary: {
5
+ main: ColorPalette.BrandColors.Violet400,
6
+ light: ColorPalette.BrandColors.Violet300,
7
+ dark: ColorPalette.BrandColors.Violet450,
8
+ },
9
+ secondary: {
10
+ main: ColorPalette.BrandColors.Violet700,
11
+ light: ColorPalette.BrandColors.Violet550,
12
+ dark: ColorPalette.BrandColors.Violet900,
13
+ },
14
+ tertiary: { main: ColorPalette.BrandColors.Crimson },
15
+ text: {
16
+ primary: ColorPalette.GreyColors.White,
17
+ secondary: ColorPalette.GreyColors.White70,
18
+ tertiary: ColorPalette.GreyColors.White50,
19
+ },
20
+ surface: {
21
+ defaultBackground: ColorPalette.BlueGreyColors.BlueGrey600,
22
+ paperBackground: ColorPalette.BlueGreyColors.BlueGrey800,
23
+ grey: ColorPalette.BlueGreyColors.BlueGrey400,
24
+ },
25
+ border: {
26
+ primary: ColorPalette.GreyColors.Grey500,
27
+ },
28
+ highlight: {
29
+ highlightGreen: ColorPalette.UtilityColors.Green,
30
+ highlightOrange: ColorPalette.UtilityColors.Orange,
31
+ highlightBlue: ColorPalette.UtilityColors.Blue,
32
+ highlightRed: ColorPalette.UtilityColors.Red,
33
+ highlightPink: ColorPalette.UtilityColors.Pink,
34
+ highlightYellow: ColorPalette.UtilityColors.Yellow,
35
+ greenBackground: ColorPalette.UtilityColors.Green20,
36
+ orangeBackground: ColorPalette.UtilityColors.Orange20,
37
+ blueBackground: ColorPalette.UtilityColors.Blue20,
38
+ redBackground: ColorPalette.UtilityColors.Red20,
39
+ pinkBackground: ColorPalette.UtilityColors.Pink20,
40
+ yellowBackground: ColorPalette.UtilityColors.LightYellow,
41
+ },
42
+ };
@@ -0,0 +1,42 @@
1
+ import { ColorPalette } from "./colorPalette";
2
+
3
+ export const LightColorTokens = {
4
+ primary: {
5
+ main: ColorPalette.BrandColors.Violet600,
6
+ light: ColorPalette.BrandColors.Violet500,
7
+ dark: ColorPalette.BrandColors.Violet800,
8
+ },
9
+ secondary: {
10
+ main: ColorPalette.BrandColors.Violet200,
11
+ light: ColorPalette.BrandColors.Violet100,
12
+ dark: ColorPalette.BrandColors.Violet250,
13
+ },
14
+ tertiary: { main: ColorPalette.BrandColors.Crimson },
15
+ text: {
16
+ primary: ColorPalette.GreyColors.Black,
17
+ secondary: ColorPalette.GreyColors.Black70,
18
+ tertiary: ColorPalette.GreyColors.Black50,
19
+ },
20
+ surface: {
21
+ defaultBackground: ColorPalette.BlueGreyColors.BlueGrey100,
22
+ paperBackground: ColorPalette.GreyColors.White,
23
+ grey: ColorPalette.GreyColors.Grey100,
24
+ },
25
+ border: {
26
+ primary: ColorPalette.GreyColors.Grey200,
27
+ },
28
+ highlight: {
29
+ highlightGreen: ColorPalette.UtilityColors.Green,
30
+ highlightOrange: ColorPalette.UtilityColors.Orange,
31
+ highlightBlue: ColorPalette.UtilityColors.Blue,
32
+ highlightRed: ColorPalette.UtilityColors.Red,
33
+ highlightPink: ColorPalette.UtilityColors.Pink,
34
+ highlightYellow: ColorPalette.UtilityColors.Yellow,
35
+ greenBackground: ColorPalette.UtilityColors.Green20,
36
+ orangeBackground: ColorPalette.UtilityColors.Orange20,
37
+ blueBackground: ColorPalette.UtilityColors.Blue20,
38
+ redBackground: ColorPalette.UtilityColors.Red20,
39
+ pinkBackground: ColorPalette.UtilityColors.Pink20,
40
+ yellowBackground: ColorPalette.UtilityColors.LightYellow,
41
+ },
42
+ };
@@ -1,6 +1,7 @@
1
1
  import { Components } from "@mui/material";
2
2
  import { TypographyOptions } from "@mui/material/styles/createTypography";
3
- import { DarkColorTokens, LightColorTokens } from "./colorTokens";
3
+ import { DarkColorTokens } from "./colorTokens/darkColorTokens";
4
+ import { LightColorTokens } from "./colorTokens/lightColorTokens";
4
5
  import { customCssBaseline } from "./customCssBaseline";
5
6
 
6
7
  export enum Theme {
@@ -10,10 +11,6 @@ export enum Theme {
10
11
  export const getCommonTheme = (mode: Theme) => {
11
12
  const ColorTokens = mode == Theme.DARK ? DarkColorTokens : LightColorTokens;
12
13
  return {
13
- borders: {
14
- primary: `1px solid ${ColorTokens.grey.main}`,
15
- grayLight: `1px solid ${ColorTokens.grey.main}`,
16
- },
17
14
  typography: {
18
15
  fontFamily: ["Heebo", "Poppins", "sans-serif"].join(","),
19
16
  },
@@ -79,7 +76,7 @@ export const getCommonTheme = (mode: Theme) => {
79
76
  fullWidth: true,
80
77
  },
81
78
  paper: {
82
- color: ColorTokens.background.default,
79
+ color: ColorTokens.surface.defaultBackground,
83
80
  borderRadius: "5px",
84
81
  width: "100%",
85
82
  maxHeight: "calc(100vh - 64px)",
@@ -110,7 +107,7 @@ export const getCommonTheme = (mode: Theme) => {
110
107
  height: "0.5em",
111
108
  },
112
109
  "&::-webkit-scrollbar-thumb": {
113
- backgroundColor: ColorTokens.background.paper,
110
+ backgroundColor: ColorTokens.surface.paperBackground,
114
111
  borderRadius: "3px",
115
112
  },
116
113
  },
@@ -130,10 +127,10 @@ export const getCommonTheme = (mode: Theme) => {
130
127
  MuiPaginationItem: {
131
128
  styleOverrides: {
132
129
  root: {
133
- background: ColorTokens.background.default,
130
+ background: ColorTokens.surface.defaultBackground,
134
131
  "&.Mui-selected": {
135
- background: ColorTokens.background.paper,
136
- border: `1px solid ${ColorTokens.highlight.main}`,
132
+ background: ColorTokens.surface.paperBackground,
133
+ border: `1px solid ${ColorTokens.tertiary.main}`,
137
134
  },
138
135
  },
139
136
  },
@@ -189,14 +186,14 @@ export const getCommonTheme = (mode: Theme) => {
189
186
  MuiTooltip: {
190
187
  styleOverrides: {
191
188
  tooltip: {
192
- backgroundColor: ColorTokens.background.paper,
189
+ backgroundColor: ColorTokens.surface.paperBackground,
193
190
  padding: "20px 30px",
194
191
  minWidth: "300px",
195
192
  boxShadow: `0px 2px 5px ${ColorTokens.secondary.main}`,
196
193
  border: `1px solid ${ColorTokens.secondary.main}`,
197
194
  },
198
195
  arrow: {
199
- color: ColorTokens.background.paper,
196
+ color: ColorTokens.surface.paperBackground,
200
197
  "&:before": {
201
198
  border: `1px solid ${ColorTokens.secondary.main}`,
202
199
  },
@@ -216,7 +213,7 @@ export const getCommonTheme = (mode: Theme) => {
216
213
  "&.Mui-checked": {
217
214
  transform: "translateX(18px)",
218
215
  "& + .MuiSwitch-track": {
219
- backgroundColor: ColorTokens.grey.main,
216
+ backgroundColor: ColorTokens.surface.grey,
220
217
  opacity: 1,
221
218
  border: 0,
222
219
  },
@@ -233,13 +230,13 @@ export const getCommonTheme = (mode: Theme) => {
233
230
  },
234
231
  "& .MuiSwitch-thumb": {
235
232
  boxSizing: "border-box",
236
- backgroundColor: ColorTokens.background.paper,
233
+ backgroundColor: ColorTokens.surface.paperBackground,
237
234
  width: 22,
238
235
  height: 22,
239
236
  },
240
237
  "& .MuiSwitch-track": {
241
238
  borderRadius: 13,
242
- backgroundColor: ColorTokens.grey.main,
239
+ backgroundColor: ColorTokens.surface.grey,
243
240
  opacity: 1,
244
241
  },
245
242
  "&.Mui-disabled + .MuiSwitch-track": {
@@ -295,7 +292,7 @@ export const getCommonTheme = (mode: Theme) => {
295
292
  styleOverrides: {
296
293
  root: {
297
294
  "& .MuiTabs-flexContainer": {
298
- borderBottom: `1px solid ${ColorTokens.grey.main}`,
295
+ borderBottom: `1px solid ${ColorTokens.border.primary}`,
299
296
  },
300
297
  },
301
298
  indicator: {
@@ -306,7 +303,7 @@ export const getCommonTheme = (mode: Theme) => {
306
303
  "& .MuiTabs-indicatorSpan": {
307
304
  borderRadius: "30px",
308
305
  width: "60%",
309
- backgroundColor: ColorTokens.highlight.main,
306
+ backgroundColor: ColorTokens.tertiary.main,
310
307
  },
311
308
  },
312
309
  },
@@ -332,7 +329,7 @@ export const getCommonTheme = (mode: Theme) => {
332
329
  MuiAvatar: {
333
330
  styleOverrides: {
334
331
  root: {
335
- background: ColorTokens.background.default,
332
+ background: ColorTokens.surface.defaultBackground,
336
333
  cursor: "pointer",
337
334
  border: `1px solid ${ColorTokens.primary.main}`,
338
335
  color: ColorTokens.primary.main,
@@ -1,20 +1,12 @@
1
1
  import { createTheme } from "@mui/material/styles";
2
- import { DarkColorTokens } from "./colorTokens";
3
- import { getCommonTheme, Theme } from "./commonTheme";
2
+
3
+ import { DarkColorTokens } from "./colorTokens/darkColorTokens";
4
+ import { Theme, getCommonTheme } from "./commonTheme";
4
5
 
5
6
  export const darkTheme = createTheme({
6
7
  palette: {
7
8
  mode: "dark",
8
- primary: DarkColorTokens.primary,
9
- secondary: DarkColorTokens.secondary,
10
- background: DarkColorTokens.background,
11
- text: DarkColorTokens.text,
12
- highlight: DarkColorTokens.highlight,
13
- grey: DarkColorTokens.grey,
14
- info: DarkColorTokens.info,
15
- // defaultProfileIcon: {
16
- // main: "#293640", // Default profile images and icons color for dark mode
17
- // },
9
+ ...DarkColorTokens,
18
10
  },
19
11
  ...getCommonTheme(Theme.DARK),
20
12
  });
@@ -1,20 +1,11 @@
1
1
  import { createTheme } from "@mui/material/styles";
2
- import { LightColorTokens } from "./colorTokens";
2
+ import { LightColorTokens } from "./colorTokens/lightColorTokens";
3
3
  import { Theme, getCommonTheme } from "./commonTheme";
4
4
 
5
5
  export const lightTheme = createTheme({
6
6
  palette: {
7
7
  mode: "light",
8
- primary: LightColorTokens.primary,
9
- secondary: LightColorTokens.secondary,
10
- background: LightColorTokens.background,
11
- text: LightColorTokens.text,
12
- highlight: LightColorTokens.highlight,
13
- grey: LightColorTokens.grey,
14
- info: LightColorTokens.info,
15
- // defaultProfileIcon: {
16
- // main: "#BDD6E8", // Default profile images and icons color
17
- // },
8
+ ...LightColorTokens,
18
9
  },
19
10
  ...getCommonTheme(Theme.LIGHT),
20
11
  });
package/types/theme.d.ts CHANGED
@@ -14,25 +14,35 @@ declare module "@mui/material/styles" {
14
14
  light: string;
15
15
  dark: string;
16
16
  };
17
+ tertiary: {
18
+ main: string;
19
+ };
17
20
  text: {
18
21
  primary: string;
19
22
  secondary: string;
23
+ tertiary: string;
20
24
  };
21
- background: {
22
- paper: string;
23
- default: string;
24
- };
25
- highlight: {
26
- main: string;
25
+ surface: {
26
+ defaultBackground: string;
27
+ paperBackground: string;
28
+ grey: string;
27
29
  };
28
- info: {
30
+ border: {
29
31
  main: string;
30
32
  };
31
- grey: {
32
- main: string;
33
- };
34
- info: {
35
- main: string;
33
+ highlight: {
34
+ highlightGreen: string;
35
+ highlightOrange: string;
36
+ highlightBlue: string;
37
+ highlightRed: string;
38
+ highlightPink: string;
39
+ highlightYellow: string;
40
+ greenBackground: string;
41
+ orangeBackground: string;
42
+ blueBackground: string;
43
+ redBackground: string;
44
+ pinkBackground: string;
45
+ yellowBackground: string;
36
46
  };
37
47
  };
38
48
  }
@@ -1,14 +0,0 @@
1
- import { Stack } from "@mui/material";
2
- import { Icons } from "./export";
3
-
4
- export const IconsStory = () => {
5
- return (
6
- <Stack gap={2} direction={"row"}>
7
- {Object.values(Icons).map((Icon) => (
8
- <Icon />
9
- ))}
10
- </Stack>
11
- );
12
- };
13
-
14
- export default IconsStory;