@campxdev/react-blueprint 1.0.4 → 1.0.6
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.
- package/package.json +6 -2
- package/public/index.html +3 -4
- package/src/App.tsx +8 -1
- package/src/AppContent.tsx +38 -0
- package/src/assets/images/svg/Emptylistmage.svg +9 -0
- package/src/assets/images/svg/Internalserverimage.svg +9 -0
- package/src/assets/images/svg/error-cactus.svg +9 -0
- package/src/assets/images/svg/index.ts +10 -0
- package/src/assets/images/svg/no-connection.svg +9 -0
- package/src/assets/images/svg/unauthorized.svg +9 -0
- package/src/components/Assets/ErrorPages/InternalServerError.tsx +31 -0
- package/src/components/Assets/ErrorPages/NoInternetConnection.tsx +33 -0
- package/src/components/Assets/ErrorPages/NoItemFound.tsx +33 -0
- package/src/components/Assets/ErrorPages/PageNotFound.tsx +33 -0
- package/src/components/Assets/ErrorPages/UnAuthorized.tsx +25 -0
- package/src/components/Assets/ErrorPages/styles.tsx +29 -0
- package/src/components/Assets/Icons/IconComponents/CompletedStateIcon.tsx +35 -0
- package/src/components/Assets/Icons/IconComponents/SaveIcon.tsx +42 -0
- package/src/components/Assets/Icons/IconComponents/ShareIcon.tsx +61 -0
- package/src/components/Assets/Icons/Icons.tsx +6 -0
- package/src/components/Assets/export.ts +5 -0
- package/src/components/Charts/BarChart/BarChart.tsx +160 -0
- package/src/components/Charts/LineChart/LineChart.tsx +119 -0
- package/src/components/Charts/PieChart/PieChart.tsx +95 -0
- package/src/components/Charts/TreeMap/TreeMap.tsx +151 -0
- package/src/components/Charts/types/types.ts +43 -0
- package/src/components/DataDisplay/Accordion/Accordion.tsx +55 -0
- package/src/components/DataDisplay/Accordion/utils/StandardImageList.tsx +70 -0
- package/src/components/DataDisplay/export.ts +4 -1
- package/src/components/Input/components/FetchingOptionsLoader.tsx +7 -7
- package/src/components/Input/export.ts +1 -0
- package/src/components/Layout/TabsLayout/Tabs.tsx +67 -0
- package/src/components/Layout/TabsLayout/TabsLayout.tsx +56 -0
- package/src/components/Layout/exports.ts +4 -0
- package/src/components/Navigation/Breadcrumbs/Breadcrumbs.tsx +40 -0
- package/src/components/Navigation/Sidebar/styles.tsx +1 -1
- package/src/components/Navigation/Stepper/Stepper.tsx +59 -0
- package/src/components/Navigation/Stepper/StepperComponents.tsx +72 -0
- package/src/components/Navigation/exports.ts +4 -0
- package/src/components/export.ts +3 -3
- package/src/stories/Charts/BarChart.stories.tsx +142 -0
- package/src/stories/Charts/LineChart.stories.tsx +112 -0
- package/src/stories/Charts/PieChart.stories.tsx +137 -0
- package/src/stories/Charts/Treemap.stories.tsx +224 -0
- package/src/stories/DataDisplay/Accordion.stories.tsx +62 -0
- package/src/stories/DesignSystem/typography.stories.tsx +1 -1
- package/src/stories/Layout/TabsLayout.stories.tsx +53 -0
- package/src/stories/Navigation/Breadcrumbs.stories.tsx +34 -0
- package/src/stories/Navigation/Stepper.stories.tsx +51 -0
- package/src/themes/commonTheme.ts +47 -1
- package/types/theme.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@campxdev/react-blueprint",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.6",
|
|
4
4
|
"main": "./export.ts",
|
|
5
5
|
"private": false,
|
|
6
6
|
"dependencies": {
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"@types/react-router-dom": "^5.3.3",
|
|
23
23
|
"axios": "^1.7.2",
|
|
24
24
|
"framer-motion": "^11.2.9",
|
|
25
|
+
"global": "^4.4.0",
|
|
25
26
|
"js-cookie": "^3.0.5",
|
|
26
27
|
"lodash": "^4.17.21",
|
|
27
28
|
"pullstate": "^1.24.0",
|
|
@@ -29,11 +30,14 @@
|
|
|
29
30
|
"react-dom": "^18.3.1",
|
|
30
31
|
"react-error-boundary": "^3.1.4",
|
|
31
32
|
"react-joyride": "^2.8.2",
|
|
33
|
+
"react-query": "^3.39.3",
|
|
32
34
|
"react-router-dom": "^6.24.0",
|
|
33
35
|
"react-scripts": "^5.0.1",
|
|
36
|
+
"recharts": "^2.12.7",
|
|
34
37
|
"storybook-dark-mode": "^4.0.1",
|
|
35
38
|
"typescript": "^5.5.2",
|
|
36
|
-
"web-vitals": "^2.1.0"
|
|
39
|
+
"web-vitals": "^2.1.0",
|
|
40
|
+
"yalc": "^1.0.0-pre.53"
|
|
37
41
|
},
|
|
38
42
|
"scripts": {
|
|
39
43
|
"start": "react-scripts start",
|
package/public/index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
work correctly both with client-side routing and a non-root public URL.
|
|
25
25
|
Learn how to configure a non-root public URL by running `npm run build`.
|
|
26
26
|
-->
|
|
27
|
-
<script type="text/javascript" src="https://campx.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/278rlr/b/9/c95134bc67d3a521bb3f4331beb9b804/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-GB&collectorId=5fea0763"></script>
|
|
27
|
+
<!-- <script type="text/javascript" src="https://campx.atlassian.net/s/d41d8cd98f00b204e9800998ecf8427e-T/278rlr/b/9/c95134bc67d3a521bb3f4331beb9b804/_/download/batch/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector/com.atlassian.jira.collector.plugin.jira-issue-collector-plugin:issuecollector.js?locale=en-GB&collectorId=5fea0763"></script>
|
|
28
28
|
|
|
29
29
|
<script type="text/javascript">window.ATL_JQ_PAGE_PROPS = {
|
|
30
30
|
"triggerFunction": function(showCollectorDialog) {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
e.preventDefault();
|
|
34
34
|
showCollectorDialog();
|
|
35
35
|
});
|
|
36
|
-
}};</script>
|
|
36
|
+
}};</script> -->
|
|
37
37
|
|
|
38
38
|
<title>React Blueprint | Building Blocks</title>
|
|
39
39
|
</head>
|
|
@@ -50,6 +50,5 @@
|
|
|
50
50
|
To begin the development, run `npm start` or `yarn start`.
|
|
51
51
|
To create a production bundle, use `npm run build` or `yarn build`.
|
|
52
52
|
-->
|
|
53
|
-
|
|
54
53
|
</body>
|
|
55
54
|
</html>
|
package/src/App.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./App.css";
|
|
2
|
-
import { AppHeader } from "./components/export";
|
|
2
|
+
import { AppHeader, Button, UnAuthorized } from "./components/export";
|
|
3
3
|
import Providers from "./contexts/Providers";
|
|
4
4
|
|
|
5
5
|
function App() {
|
|
@@ -12,6 +12,13 @@ function App() {
|
|
|
12
12
|
collapsed={false}
|
|
13
13
|
institutionsData={[]}
|
|
14
14
|
/>
|
|
15
|
+
<UnAuthorized
|
|
16
|
+
component={
|
|
17
|
+
<Button sx={{ marginTop: "20px" }} variant="contained">
|
|
18
|
+
Click Here to Login
|
|
19
|
+
</Button>
|
|
20
|
+
}
|
|
21
|
+
/>
|
|
15
22
|
</Providers>
|
|
16
23
|
);
|
|
17
24
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useQuery } from "react-query";
|
|
2
|
+
import { AppHeader } from "./components/export";
|
|
3
|
+
import { campxAxios } from "./utils/campxAxios";
|
|
4
|
+
|
|
5
|
+
const fetchClubRequests = () => {
|
|
6
|
+
return campxAxios.get(`/square/clubs`).then((res) => res.data);
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
function AppContent() {
|
|
10
|
+
const {
|
|
11
|
+
data: requests,
|
|
12
|
+
isLoading,
|
|
13
|
+
error,
|
|
14
|
+
refetch,
|
|
15
|
+
} = useQuery("club-requests", fetchClubRequests);
|
|
16
|
+
|
|
17
|
+
if (isLoading) {
|
|
18
|
+
return <div>Loading...</div>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
if (error) {
|
|
22
|
+
// No need to handle the error locally, it will be caught by ErrorBoundary
|
|
23
|
+
console.error("Error fetching club requests:", error);
|
|
24
|
+
throw error; // Re-throw the error to be caught by the ErrorBoundary
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<AppHeader
|
|
29
|
+
clientName="Anurag University"
|
|
30
|
+
actions={[<p>Actions here</p>]}
|
|
31
|
+
userFullName="Srikanth Yellapragada"
|
|
32
|
+
collapsed={false}
|
|
33
|
+
institutionsData={[]}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default AppContent;
|