@campxdev/react-blueprint 0.1.39 → 0.1.41

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 (42) hide show
  1. package/package.json +1 -1
  2. package/src/App.tsx +1 -2
  3. package/src/components/Assets/Icons/IconComponents/ActiveDevicesIcon.tsx +4 -2
  4. package/src/components/Assets/Icons/IconComponents/AdministratorIcon.tsx +3 -2
  5. package/src/components/Assets/Icons/IconComponents/AppsIcon.tsx +4 -2
  6. package/src/components/Assets/Icons/IconComponents/BulbIcon.tsx +3 -2
  7. package/src/components/Assets/Icons/IconComponents/CampxIcon.tsx +3 -2
  8. package/src/components/Assets/Icons/IconComponents/CareerIcon.tsx +3 -2
  9. package/src/components/Assets/Icons/IconComponents/CheckedCheckBoxIcon.tsx +3 -2
  10. package/src/components/Assets/Icons/IconComponents/CheckedRadioIcon.tsx +3 -2
  11. package/src/components/Assets/Icons/IconComponents/ClogWheelIcon.tsx +3 -2
  12. package/src/components/Assets/Icons/IconComponents/CrossIcon.tsx +3 -2
  13. package/src/components/Assets/Icons/IconComponents/DashBoardIcon.tsx +3 -2
  14. package/src/components/Assets/Icons/IconComponents/DeviceIcon.tsx +3 -2
  15. package/src/components/Assets/Icons/IconComponents/ExamResultIcon.tsx +3 -2
  16. package/src/components/Assets/Icons/IconComponents/ExportIcon.tsx +4 -2
  17. package/src/components/Assets/Icons/IconComponents/FilterIcon.tsx +4 -2
  18. package/src/components/Assets/Icons/IconComponents/HelpIcon.tsx +3 -2
  19. package/src/components/Assets/Icons/IconComponents/HomeIcon.tsx +3 -2
  20. package/src/components/Assets/Icons/IconComponents/InfoIcon.tsx +3 -2
  21. package/src/components/Assets/Icons/IconComponents/InstitutionsIcon.tsx +3 -2
  22. package/src/components/Assets/Icons/IconComponents/LeftIcon.tsx +3 -2
  23. package/src/components/Assets/Icons/IconComponents/LocationIcon.tsx +3 -2
  24. package/src/components/Assets/Icons/IconComponents/LogoutIcon.tsx +3 -2
  25. package/src/components/Assets/Icons/IconComponents/NavigationIcon.tsx +3 -2
  26. package/src/components/Assets/Icons/IconComponents/NotificationIcon.tsx +3 -2
  27. package/src/components/Assets/Icons/IconComponents/ProductFeaturesIcon.tsx +3 -2
  28. package/src/components/Assets/Icons/IconComponents/ProfileIcon.tsx +3 -2
  29. package/src/components/Assets/Icons/IconComponents/RightIcon.tsx +3 -2
  30. package/src/components/Assets/Icons/IconComponents/TicketsIcon.tsx +3 -2
  31. package/src/components/Assets/Icons/IconComponents/UncheckCheckBoxIcon.tsx +3 -2
  32. package/src/components/Assets/Icons/IconComponents/UncheckedRadioIcon.tsx +3 -2
  33. package/src/components/Layout/AppHeader/styles/styles.tsx +2 -4
  34. package/src/components/Navigation/DropDownMenu/DropDownMenu.tsx +3 -3
  35. package/src/components/Navigation/Sidebar/Sidebar.tsx +1 -1
  36. package/src/components/Navigation/Sidebar/styles.tsx +2 -5
  37. package/src/components/export.ts +1 -3
  38. package/src/stories/Layout/AppHeader.stories.tsx +2 -2
  39. package/src/stories/Navigation/TabsContainer.stories.tsx +2 -6
  40. package/src/components/Layout/AppHeader/AppsMenu.tsx +0 -159
  41. package/src/components/Layout/PageContent/PageContent.tsx +0 -32
  42. package/src/stories/Layout/PageContent.stories.tsx +0 -26
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/react-blueprint",
3
- "version": "0.1.39",
3
+ "version": "0.1.41",
4
4
  "main": "./export.ts",
5
5
  "private": false,
6
6
  "dependencies": {
package/src/App.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./App.css";
2
- import { AppHeader, AppsMenu } from "./components/export";
2
+ import { AppHeader } from "./components/export";
3
3
  import Providers from "./contexts/Providers";
4
4
 
5
5
  function App() {
@@ -8,7 +8,6 @@ function App() {
8
8
  <AppHeader
9
9
  clientName="Anurag University"
10
10
  actions={[<p>asdjflsf</p>]}
11
- appsMenu={<AppsMenu apps={["exams", "square", "admin"]} />}
12
11
  userFullName="Srikanth Yellapragada"
13
12
  collapsed={false}
14
13
  />
@@ -1,6 +1,8 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
+
3
4
  export const ActiveDevicesIcon = () => {
5
+ const size = 32
4
6
  const theme = useTheme();
5
7
  const color = theme.palette.text.primary;
6
8
 
@@ -9,8 +11,8 @@ export const ActiveDevicesIcon = () => {
9
11
  id="Active_Devices"
10
12
  data-name="Active Devices"
11
13
  xmlns="http://www.w3.org/2000/svg"
12
- width="16"
13
- height="16"
14
+ width={size}
15
+ height={size}
14
16
  viewBox="0 0 16 16"
15
17
  style={{
16
18
  fill: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const AdministratorIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <>
8
9
  <svg
9
- width="30"
10
- height="30"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 30 30"
12
13
  style={{ fill: color }}
13
14
  xmlns="http://www.w3.org/2000/svg"
@@ -1,10 +1,12 @@
1
1
  export const AppsIcon = () => {
2
+ const size = 32;
3
+
2
4
  return (
3
5
  <svg
4
6
  id="apps"
5
7
  xmlns="http://www.w3.org/2000/svg"
6
- width="24"
7
- height="24"
8
+ width={size}
9
+ height={size}
8
10
  viewBox="0 0 24 24"
9
11
  >
10
12
  <path
@@ -1,14 +1,15 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const BulbIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.highlight.highlightBlue;
6
7
 
7
8
  return (
8
9
  <svg
9
10
  xmlns="http://www.w3.org/2000/svg"
10
- width="16"
11
- height="18"
11
+ width={size}
12
+ height={size}
12
13
  viewBox="0 0 20.182 21.03"
13
14
  style={{
14
15
  fill: color,
@@ -1,6 +1,7 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const CampxIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
 
6
7
  const color = theme.palette.mode === "dark" ? "white" : "blue";
@@ -8,8 +9,8 @@ export const CampxIcon = () => {
8
9
  return (
9
10
  <svg
10
11
  xmlns="http://www.w3.org/2000/svg"
11
- width="32"
12
- height="32"
12
+ width={size}
13
+ height={size}
13
14
  viewBox="0 5 101.234 104.906"
14
15
  style={{
15
16
  fill: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const CareerIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="18.3"
10
- height="20.3"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 20.3 20.3"
12
13
  style={{
13
14
  fill: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const CheckedCheckboxIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="20"
10
- height="20"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 20 20"
12
13
  style={{
13
14
  fill: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const CheckedRadioIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="20"
10
- height="20"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 20 20"
12
13
  style={{
13
14
  fill: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const ClogWheelIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="16.595"
10
- height="20"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 17.995 20"
12
13
  style={{
13
14
  fill: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const CrossIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="8"
10
- height="8"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 8 8"
12
13
  style={{
13
14
  stroke: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const DashBoardIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="20"
10
- height="20"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 16 16"
12
13
  style={{
13
14
  stroke: color,
@@ -1,14 +1,15 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const DeviceIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <div>
8
9
  <svg
9
10
  xmlns="http://www.w3.org/2000/svg"
10
- width="20"
11
- height="20"
11
+ width={size}
12
+ height={size}
12
13
  viewBox="0 0 20 20"
13
14
  style={{
14
15
  fill: color,
@@ -1,14 +1,15 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const ExamResultIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <>
8
9
  <svg
9
10
  xmlns="http://www.w3.org/2000/svg"
10
- width="14.3"
11
- height="20.3"
11
+ width={size}
12
+ height={size}
12
13
  viewBox="0 0 15.3 20.3"
13
14
  style={{
14
15
  fill: color,
@@ -3,9 +3,11 @@ import { useTheme } from "@mui/material";
3
3
  export const ExportIcon = ({
4
4
  sx = {},
5
5
  color,
6
+ size = 32,
6
7
  }: {
7
8
  sx?: any;
8
9
  color?: string;
10
+ size?: number;
9
11
  }) => {
10
12
  const theme = useTheme();
11
13
  color = color ?? theme.palette.text.primary;
@@ -14,8 +16,8 @@ export const ExportIcon = ({
14
16
  <>
15
17
  <svg
16
18
  xmlns="http://www.w3.org/2000/svg"
17
- width="25"
18
- height="20"
19
+ width={size}
20
+ height={size}
19
21
  viewBox="0 0 30 30"
20
22
  style={{
21
23
  fill: color,
@@ -2,9 +2,11 @@ import { useTheme } from "@mui/material";
2
2
  export const FilterIcon = ({
3
3
  sx = {},
4
4
  color,
5
+ size = 32,
5
6
  }: {
6
7
  sx?: any;
7
8
  color?: string;
9
+ size?: number;
8
10
  }) => {
9
11
  const theme = useTheme();
10
12
  color = color ?? theme.palette.text.primary;
@@ -13,8 +15,8 @@ export const FilterIcon = ({
13
15
  <svg
14
16
  xmlns="http://www.w3.org/2000/svg"
15
17
  id="sort"
16
- width="20"
17
- height="20"
18
+ width={size}
19
+ height={size}
18
20
  viewBox="0 0 20 20"
19
21
  style={{
20
22
  fill: color,
@@ -1,14 +1,15 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const HelpIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  id="message-question"
9
10
  xmlns="http://www.w3.org/2000/svg"
10
- width="20"
11
- height="20"
11
+ width={size}
12
+ height={size}
12
13
  viewBox="0 0 20 20"
13
14
  style={{
14
15
  stroke: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const HomeIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="20"
10
- height="20"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 16 16"
12
13
  style={{
13
14
  stroke: color,
@@ -1,14 +1,15 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const InfoIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.highlight.highlightBlue;
6
7
 
7
8
  return (
8
9
  <svg
9
10
  xmlns="http://www.w3.org/2000/svg"
10
- width="18"
11
- height="18"
11
+ width={size}
12
+ height={size}
12
13
  viewBox="0 0 18 18"
13
14
  style={{
14
15
  fill: color,
@@ -1,6 +1,7 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const InstitutionsIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
 
@@ -8,8 +9,8 @@ export const InstitutionsIcon = () => {
8
9
  <svg
9
10
  xmlns="http://www.w3.org/2000/svg"
10
11
  id="Institutions"
11
- width="16"
12
- height="16"
12
+ width={size}
13
+ height={size}
13
14
  viewBox="0 0 16 16"
14
15
  style={{
15
16
  fill: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const LeftIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="24"
10
- height="24"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 24 24"
12
13
  style={{
13
14
  stroke: color,
@@ -1,14 +1,15 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const LocationIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
 
7
8
  return (
8
9
  <svg
9
10
  xmlns="http://www.w3.org/2000/svg"
10
- width="21"
11
- height="21"
11
+ width={size}
12
+ height={size}
12
13
  viewBox="0 0 20 20"
13
14
  style={{
14
15
  fill: color,
@@ -6,6 +6,7 @@ interface LogoutIconProps {
6
6
  }
7
7
 
8
8
  export const LogoutIcon: React.FC<LogoutIconProps> = ({ hoverColor }) => {
9
+ const size = 32;
9
10
  const theme = useTheme();
10
11
  const [isHovered, setIsHovered] = useState(false);
11
12
  const defaultColor = theme.palette.text.primary;
@@ -13,8 +14,8 @@ export const LogoutIcon: React.FC<LogoutIconProps> = ({ hoverColor }) => {
13
14
  return (
14
15
  <svg
15
16
  xmlns="http://www.w3.org/2000/svg"
16
- width="24"
17
- height="24"
17
+ width={size}
18
+ height={size}
18
19
  viewBox="0 0 24 24"
19
20
  onMouseEnter={() => setIsHovered(true)}
20
21
  onMouseLeave={() => setIsHovered(false)}
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const NavigationIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="21"
10
- height="21"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 30 30"
12
13
  style={{
13
14
  fill: color,
@@ -1,14 +1,15 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const NotificationIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <>
8
9
  <svg
9
10
  xmlns="http://www.w3.org/2000/svg"
10
- width="20"
11
- height="20"
11
+ width={size}
12
+ height={size}
12
13
  viewBox="0 0 20 20"
13
14
  style={{
14
15
  stroke: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const ProductFeaturesIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="16"
10
- height="16"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 16 16"
12
13
  style={{
13
14
  stroke: color,
@@ -1,6 +1,7 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const ProfileIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
 
@@ -10,8 +11,8 @@ export const ProfileIcon = () => {
10
11
  xmlns="http://www.w3.org/2000/svg"
11
12
  id="My_Profile"
12
13
  data-name="My Profile"
13
- width="16"
14
- height="16"
14
+ width={size}
15
+ height={size}
15
16
  viewBox="0 0 16 16"
16
17
  style={{
17
18
  fill: color, // Set fill color to use the theme's primary text color
@@ -1,6 +1,7 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const RightIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
@@ -8,8 +9,8 @@ export const RightIcon = () => {
8
9
  xmlns="http://www.w3.org/2000/svg"
9
10
  id="vuesax_linear_logout"
10
11
  data-name="vuesax/linear/logout"
11
- width="24"
12
- height="24"
12
+ width={size}
13
+ height={size}
13
14
  viewBox="0 0 24 24"
14
15
  style={{
15
16
  stroke: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const TicketsIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="16"
10
- height="16"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 16 16"
12
13
  >
13
14
  <g
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const UnCheckedCheckboxIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.secondary.main;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="20"
10
- height="20"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 20 20"
12
13
  style={{
13
14
  fill: color,
@@ -1,13 +1,14 @@
1
1
  import { useTheme } from "@mui/material";
2
2
 
3
3
  export const UnCheckedRadioIcon = () => {
4
+ const size = 32;
4
5
  const theme = useTheme();
5
6
  const color = theme.palette.text.primary;
6
7
  return (
7
8
  <svg
8
9
  xmlns="http://www.w3.org/2000/svg"
9
- width="20"
10
- height="20"
10
+ width={size}
11
+ height={size}
11
12
  viewBox="0 0 20 20"
12
13
  style={{
13
14
  fill: color,
@@ -1,19 +1,17 @@
1
1
  import { Box, styled } from "@mui/material";
2
2
  import { Link } from "react-router-dom";
3
3
 
4
- const sidebarWidth = { collapsed: "60px", expanded: "240px" };
5
-
6
4
  export const StyledHeader = styled("header")(
7
- ({ theme, collapsed }: { theme?: any; collapsed: boolean }) => ({
5
+ ({ theme }: { theme?: any; collapsed: boolean }) => ({
8
6
  display: "flex",
9
7
  flexDirection: "row",
10
8
  alignItems: "center",
11
9
  height: "60px",
10
+ width: "100%",
12
11
  backgroundColor: theme.palette.background.paper,
13
12
  justifyContent: "space-between",
14
13
  padding: "0 32px",
15
14
  borderRadius: "8px",
16
- marginTop: "12px",
17
15
  })
18
16
  );
19
17
 
@@ -1,5 +1,5 @@
1
1
  import { Divider, Menu, MenuListProps, MenuProps } from "@mui/material";
2
- import { ReactNode, useState } from "react";
2
+ import { Fragment, ReactNode, useState } from "react";
3
3
 
4
4
  export type DropdownMenuProps = {
5
5
  anchor: (props: { open: (e: any) => void }) => ReactNode;
@@ -53,10 +53,10 @@ export const DropdownMenu = ({
53
53
  {...menuProps}
54
54
  >
55
55
  {menu.map((item, index) => (
56
- <>
56
+ <Fragment key={index}>
57
57
  {item}
58
58
  <Divider flexItem sx={{ margin: "0 !important" }} />
59
- </>
59
+ </Fragment>
60
60
  ))}
61
61
  </Menu>
62
62
  </>
@@ -65,7 +65,7 @@ export const Sidebar = ({
65
65
  };
66
66
 
67
67
  return (
68
- <StyledSidebarContainer direction="column" spacing={2}>
68
+ <StyledSidebarContainer direction="column" spacing="12px">
69
69
  <StyledLogoArea collapsed={collapsed}>
70
70
  {collapsed ? <CampxIcon /> : <CampxFullLogoIcon />}
71
71
  </StyledLogoArea>
@@ -11,10 +11,9 @@ import { Link } from "react-router-dom";
11
11
  export const createSidebarStyles = (collapsed: boolean) => {
12
12
  const StyledSidebarContainer = styled(Stack)(({ theme }) => {
13
13
  return {
14
- height: "100vh",
15
- marginLeft: "12px",
16
- marginTop: "12px",
14
+ height: "calc(100vh - 24px)",
17
15
  width: collapsed ? "60px" : "240px",
16
+ margin: "12px",
18
17
  backgroundColor: theme.palette.surface.defaultBackground,
19
18
  };
20
19
  });
@@ -41,10 +40,8 @@ export const createSidebarStyles = (collapsed: boolean) => {
41
40
  display: "flex",
42
41
  alignItems: "center",
43
42
  justifyContent: "center",
44
- padding: theme.spacing(2),
45
43
  borderRadius: "8px",
46
44
  backgroundColor: theme.palette.surface.paperBackground,
47
- transition: "max-height 0.3s ease-out",
48
45
  height: "60px",
49
46
  }));
50
47
  interface StyledListItemProps {
@@ -3,7 +3,5 @@ export * from "./DataDisplay/export";
3
3
  export * from "./Input/export";
4
4
  export * from "./Layout/AppHeader/AppHeader";
5
5
 
6
- export * from "./Layout/AppHeader/AppsMenu";
7
- export * from "./Layout/PageContent/PageContent";
8
- export * from "./Navigation/exports";
9
6
  export * from "./Feedback/exports";
7
+ export * from "./Navigation/exports";
@@ -1,10 +1,10 @@
1
1
  import { Meta, StoryObj } from "@storybook/react";
2
- import { AppsMenu } from "../../components/export";
2
+
3
+ import { Box } from "@mui/material";
3
4
  import {
4
5
  AppHeader,
5
6
  AppHeaderProps,
6
7
  } from "../../components/Layout/AppHeader/AppHeader";
7
- import { Box } from "@mui/material";
8
8
 
9
9
  // Define the default export with Meta type including the component type
10
10
  const meta: Meta<typeof AppHeader> = {
@@ -1,6 +1,6 @@
1
1
  import { Box } from "@mui/material";
2
2
  import { Meta, StoryObj } from "@storybook/react";
3
- import { PageContent } from "../../components/Layout/PageContent/PageContent";
3
+
4
4
  import {
5
5
  TabsContainer,
6
6
  TabsContainerProps,
@@ -24,11 +24,7 @@ type Story = StoryObj<typeof TabsContainer>;
24
24
 
25
25
  // Primary story
26
26
  export const Primary: Story = {
27
- render: (args: TabsContainerProps) => (
28
- <PageContent sx={{ padding: "0px" }}>
29
- <TabsContainer {...args} />{" "}
30
- </PageContent>
31
- ),
27
+ render: (args: TabsContainerProps) => <TabsContainer {...args} />,
32
28
  args: {
33
29
  tabs: [
34
30
  {
@@ -1,159 +0,0 @@
1
- import AppsOutageIcon from "@mui/icons-material/AppsOutage";
2
- import { Box, IconButton, Link, Menu, Typography, styled } from "@mui/material";
3
- import { useState } from "react";
4
- import { applications } from "../../../utils/applications";
5
- import { institutionKey, urlTenantKey } from "../../../utils/constants";
6
- import { Icons } from "../../export";
7
-
8
- export const AppsMenu = ({ apps }: { apps: string[] }) => {
9
- const [anchorEl, setAnchorEl] = useState<any>(null);
10
- const open = Boolean(anchorEl);
11
- const applicationList = applications?.filter((item) =>
12
- apps.includes(item.key)
13
- );
14
-
15
- const handleClick = (event: any) => {
16
- setAnchorEl(event.currentTarget);
17
- };
18
-
19
- const handleClose = () => {
20
- setAnchorEl(null);
21
- };
22
-
23
- return (
24
- <>
25
- <StyledIconButton onClick={handleClick}>
26
- <Icons.AppsIcon />
27
- </StyledIconButton>
28
- <Menu
29
- transitionDuration={150}
30
- elevation={2}
31
- id="basic-menu"
32
- anchorEl={anchorEl}
33
- open={open}
34
- onClose={handleClose}
35
- anchorOrigin={{
36
- vertical: "bottom",
37
- horizontal: "left",
38
- }}
39
- transformOrigin={{
40
- vertical: "top",
41
- horizontal: "left",
42
- }}
43
- TransitionProps={{
44
- unmountOnExit: false,
45
- }}
46
- sx={{
47
- "& .MuiPaper-root": {
48
- "&>:last-child": {
49
- paddingBottom: "0px",
50
- },
51
- },
52
- }}
53
- >
54
- {applicationList.length !== 0 ? (
55
- <>
56
- <Box sx={{ padding: "0.3rem 1rem" }}>
57
- <Typography variant="body2">Switch to</Typography>
58
- </Box>
59
- <Box>
60
- {applicationList.map((item, index) => {
61
- return (
62
- <Link
63
- href={item.path + `/${urlTenantKey}/${institutionKey}`}
64
- key={index}
65
- >
66
- <StyledMenuItemContainer
67
- key={index}
68
- onClick={() => {
69
- window.location.href = item.path;
70
- handleClose();
71
- }}
72
- >
73
- <MenuItem item={item} />
74
- </StyledMenuItemContainer>
75
- </Link>
76
- );
77
- })}
78
- </Box>
79
- </>
80
- ) : (
81
- <StyledNoAppContainer>
82
- <AppsOutageIcon sx={{ width: "40px", height: "40px" }} />
83
- <Typography variant="body2">
84
- No Application have been assigned
85
- </Typography>
86
- </StyledNoAppContainer>
87
- )}
88
- </Menu>
89
- </>
90
- );
91
- };
92
-
93
- const MenuItem = ({ item }: any) => {
94
- return (
95
- <StyledMenuItem>
96
- <StyledImageBox>
97
- <img
98
- src={item.icon}
99
- style={{ width: "20px", height: "20px" }}
100
- alt="icon"
101
- />
102
- </StyledImageBox>
103
- <Box>
104
- <Typography variant="subtitle2">{item?.title}</Typography>
105
- <Typography variant="caption">{item?.description}</Typography>
106
- </Box>
107
- </StyledMenuItem>
108
- );
109
- };
110
-
111
- const StyledIconButton = styled(IconButton)(({ theme }) => ({
112
- padding: "18px",
113
- backgroundColor: "black",
114
- display: "flex",
115
- alignItems: "center",
116
- justifyContent: "center",
117
- borderRadius: "0px",
118
- height: "60px",
119
- width: "60px",
120
- border: `1px solid ${theme.palette.background.default}`,
121
- }));
122
-
123
- const StyledMenuItemContainer = styled(Box)(({ theme }) => ({
124
- cursor: "pointer",
125
- padding: "5px 0px",
126
- }));
127
-
128
- const StyledMenuItem = styled(Box)({
129
- height: "68px",
130
- width: "380px",
131
- padding: "40px 20px",
132
- transition: "background ease 0.3s",
133
- "&:hover": {
134
- background: "rgba(0, 0, 0, 0.03)",
135
- },
136
- display: "flex",
137
- alignItems: "center",
138
- gap: "20px",
139
- });
140
-
141
- const StyledImageBox = styled(Box)(() => ({
142
- height: "40px",
143
- width: "40px",
144
- boxShadow: "0px 5px 5px 0px rgba(48, 62, 99,0.1) ",
145
- display: "flex",
146
- alignItems: "center",
147
- justifyContent: "center",
148
- borderRadius: "5px",
149
- }));
150
-
151
- const StyledNoAppContainer = styled(Box)({
152
- width: "300px",
153
- height: "300px",
154
- display: "flex",
155
- alignItems: "center",
156
- flexDirection: "column",
157
- justifyContent: "center",
158
- gap: "10px",
159
- });
@@ -1,32 +0,0 @@
1
- import { Box, styled } from "@mui/material";
2
-
3
- export const StyledContainer = styled(Box)(({ theme }) => ({
4
- width: "100%",
5
- height: "calc(100vh - 120px)",
6
- overflowY: "auto",
7
- backgroundColor: theme.palette.background.paper,
8
- borderRadius: "5px",
9
- "&::-webkit-scrollbar": {
10
- width: "0.4em",
11
- height: "0.4em",
12
- },
13
- "&::-webkit-scrollbar-thumb": {
14
- backgroundColor: "rgba(0, 0, 0, 0.2)",
15
- borderRadius: "3px",
16
- },
17
- "@media (max-width: 1024px)": {
18
- marginLeft: 0,
19
- },
20
- padding: "20px",
21
- marginTop: "10px",
22
- }));
23
-
24
- export const PageContent = ({
25
- children,
26
- sx,
27
- }: {
28
- children: React.ReactNode;
29
- sx?: any;
30
- }) => {
31
- return <StyledContainer sx={sx}> {children}</StyledContainer>;
32
- };
@@ -1,26 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { PageContent } from "../../components/Layout/PageContent/PageContent";
3
-
4
- // Define the default export with Meta type including the component type
5
- const meta: Meta<typeof PageContent> = {
6
- title: "Layout/PageContent",
7
- component: PageContent,
8
- tags: ["autodocs"],
9
- argTypes: {
10
- children: {
11
- control: "object",
12
- description: "The content of the component",
13
- },
14
- },
15
- };
16
-
17
- export default meta;
18
- type Story = StoryObj<typeof PageContent>;
19
-
20
- // Primary story
21
- export const Primary: Story = {
22
- render: (args: any) => <PageContent {...args} />,
23
- args: {
24
- children: <>Tickets</>,
25
- },
26
- };