@campxdev/react-blueprint 1.0.5 → 1.0.7

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.
@@ -0,0 +1,31 @@
1
+ import { internalServerError } from "../../../assets/images/svg";
2
+ import { Typography } from "../../DataDisplay/Typography/Typography";
3
+ import { Button } from "../../export";
4
+ import { StyledBox } from "./styles";
5
+
6
+ export const InternalServerError = ({ resetBoundary }: any) => {
7
+ return (
8
+ <>
9
+ <StyledBox>
10
+ <img
11
+ src={internalServerError}
12
+ alt="page not found"
13
+ width={"350px"}
14
+ style={{ margin: "20px" }}
15
+ />
16
+ <Typography variant="subtitle1">Internal Server Error</Typography>
17
+ <Typography variant="body2">
18
+ An unexpected error occurred on our server.
19
+ </Typography>
20
+ <Typography variant="body2">Please try again later.</Typography>
21
+ <Button
22
+ sx={{ marginTop: "20px" }}
23
+ variant="contained"
24
+ onClick={() => resetBoundary()}
25
+ >
26
+ Try Again
27
+ </Button>
28
+ </StyledBox>
29
+ </>
30
+ );
31
+ };
@@ -0,0 +1,33 @@
1
+ import { noConnection } from "../../../assets/images/svg";
2
+ import { Typography } from "../../DataDisplay/Typography/Typography";
3
+ import { Button } from "../../export";
4
+ import { StyledBox } from "./styles";
5
+
6
+ export const NoInterneConnection = ({ resetBoundary }: any) => {
7
+ return (
8
+ <>
9
+ <StyledBox>
10
+ <img
11
+ src={noConnection}
12
+ alt="page not found"
13
+ width={"350px"}
14
+ style={{ margin: "20px" }}
15
+ />
16
+ <Typography variant="subtitle1">No Internet Connection</Typography>
17
+ <Typography variant="body2">
18
+ It seems you're offline. Please check your
19
+ </Typography>
20
+ <Typography variant="body2">
21
+ internet connection and try again.
22
+ </Typography>
23
+ <Button
24
+ sx={{ marginTop: "20px" }}
25
+ variant="contained"
26
+ onClick={() => resetBoundary()}
27
+ >
28
+ Try Again
29
+ </Button>
30
+ </StyledBox>
31
+ </>
32
+ );
33
+ };
@@ -0,0 +1,33 @@
1
+ import { emptyListImage } from "../../../assets/images/svg";
2
+ import { Typography } from "../../DataDisplay/Typography/Typography";
3
+ import { Button } from "../../export";
4
+ import { StyledBox } from "./styles";
5
+
6
+ export const NoItemFound = ({ resetBoundary }: any) => {
7
+ return (
8
+ <>
9
+ <StyledBox>
10
+ <img
11
+ src={emptyListImage}
12
+ alt="page not found"
13
+ width={"350px"}
14
+ style={{ margin: "20px" }}
15
+ />
16
+ <Typography variant="subtitle1">No Items Found</Typography>
17
+ <Typography variant="body2">
18
+ There are no items to display. Please add new
19
+ </Typography>
20
+ <Typography variant="body2">
21
+ items or adjust your filter criteria.
22
+ </Typography>
23
+ <Button
24
+ sx={{ marginTop: "20px" }}
25
+ variant="contained"
26
+ onClick={() => resetBoundary()}
27
+ >
28
+ Try Again
29
+ </Button>
30
+ </StyledBox>
31
+ </>
32
+ );
33
+ };
@@ -0,0 +1,33 @@
1
+ import { errorCactus } from "../../../assets/images/svg";
2
+ import { Typography } from "../../DataDisplay/Typography/Typography";
3
+ import { Button } from "../../export";
4
+ import { StyledBox } from "./styles";
5
+
6
+ export const PageNotFound = ({ resetBoundary }: any) => {
7
+ return (
8
+ <>
9
+ <StyledBox>
10
+ <img
11
+ src={errorCactus}
12
+ alt="page not found"
13
+ width={"350px"}
14
+ style={{ margin: "20px" }}
15
+ />
16
+ <Typography variant="subtitle1">Page Not Found.</Typography>
17
+ <Typography variant="body2">
18
+ Oops! The page you are looking for doesn't exist.
19
+ </Typography>
20
+ <Typography variant="body2">
21
+ Please check the URL or return to the homepage.
22
+ </Typography>
23
+ <Button
24
+ sx={{ marginTop: "20px" }}
25
+ variant="contained"
26
+ onClick={() => resetBoundary()}
27
+ >
28
+ Try Again
29
+ </Button>
30
+ </StyledBox>
31
+ </>
32
+ );
33
+ };
@@ -0,0 +1,25 @@
1
+ import { ReactNode } from "react";
2
+ import { unAuthorized } from "../../../assets/images/svg";
3
+ import { Typography } from "../../DataDisplay/Typography/Typography";
4
+ import { StyledBox } from "./styles";
5
+
6
+ export const UnAuthorized = ({ component }: { component?: ReactNode }) => {
7
+ return (
8
+ <>
9
+ <StyledBox>
10
+ <img
11
+ src={unAuthorized}
12
+ alt="page not found"
13
+ width={"350px"}
14
+ style={{ margin: "20px" }}
15
+ />
16
+ <Typography variant="subtitle1">Unauthorized Access</Typography>
17
+ <Typography variant="body2">
18
+ You must be logged in to view this page.
19
+ </Typography>
20
+ <Typography variant="body2">Please log in to continue.</Typography>
21
+ {component}
22
+ </StyledBox>
23
+ </>
24
+ );
25
+ };
@@ -0,0 +1,29 @@
1
+ import { Alert, Box, styled } from "@mui/material";
2
+
3
+ export const StyledAlert = styled(Alert)(({ theme }) => ({
4
+ height: "60px",
5
+ border: `1px solid ${theme.palette.error.main}`,
6
+ display: "flex",
7
+ alignItems: "center",
8
+ "& .MuiAlert-message": {
9
+ padding: 0,
10
+ },
11
+ "& .MuiTypography-root": {
12
+ margin: 0,
13
+ },
14
+ position: "relative",
15
+ "& .retryBtn": {
16
+ color: "#661b2a",
17
+ position: "absolute",
18
+ right: 8,
19
+ top: 8,
20
+ },
21
+ }));
22
+
23
+ export const StyledBox = styled(Box)(({ theme }) => ({
24
+ width: "100%",
25
+ display: "flex",
26
+ flexDirection: "column",
27
+ alignItems: "center",
28
+ justifyContent: "center",
29
+ }));
@@ -1 +1,6 @@
1
+ export * from "./ErrorPages/InternalServerError";
2
+ export * from "./ErrorPages/NoInternetConnection";
3
+ export * from "./ErrorPages/NoItemFound";
4
+ export * from "./ErrorPages/PageNotFound";
5
+ export * from "./ErrorPages/UnAuthorized";
1
6
  export * from "./Icons/Icons";
@@ -3,12 +3,12 @@ import { Spinner } from "../../Feedback/Spinner/Spinner";
3
3
  import { FetchingOptionsLoaderContainer } from "../styles";
4
4
 
5
5
  export const FetchingOptionsLoader = ({ loading }: { loading: boolean }) => {
6
- return (
7
- loading && (
8
- <FetchingOptionsLoaderContainer direction="row" alignItems="center">
9
- <Spinner />
10
- <Typography variant="caption">Fetching Options</Typography>
11
- </FetchingOptionsLoaderContainer>
12
- )
6
+ return loading ? (
7
+ <FetchingOptionsLoaderContainer direction="row" alignItems="center">
8
+ <Spinner />
9
+ <Typography variant="caption">Fetching Options</Typography>
10
+ </FetchingOptionsLoaderContainer>
11
+ ) : (
12
+ <></>
13
13
  );
14
14
  };
@@ -45,7 +45,11 @@ export const AppHeader = ({
45
45
  <HelpIcon size={20} />
46
46
  </a>
47
47
  </StyledIconButton> */}
48
- <Button variant="outlined" id="jiraIssueCollector">
48
+ <Button
49
+ variant="outlined"
50
+ id="jiraIssueCollector"
51
+ className="reportAnIssue"
52
+ >
49
53
  <Typography variant="button">Report an Issue</Typography>
50
54
  </Button>
51
55
  <UserBox
@@ -1,7 +1,7 @@
1
1
  export * from "./Assets/export";
2
2
  export * from "./DataDisplay/export";
3
- export * from "./Input/export";
4
-
5
3
  export * from "./Feedback/exports";
4
+ export * from "./Input/export";
6
5
  export * from "./Layout/exports";
7
6
  export * from "./Navigation/exports";
7
+
@@ -47,7 +47,7 @@ export const TypographyStyles = () => (
47
47
  text="Subtitle 2 (subtitle2) - Lorem ipsum dolor sit."
48
48
  />
49
49
  <TypographyDisplay
50
- variant="subtitle1"
50
+ variant="subtitle3"
51
51
  fontInfo={{ family: "Poppins", weight: "400", size: "14px" }}
52
52
  text="Subtitle 3 (subtitle3) - Lorem ipsum dolor sit."
53
53
  />