Skip to content

Commit 773dec8

Browse files
authored
Merge pull request #6 from horizon-ui/feature/next-13
Feature/next 13
2 parents 73b0759 + 44bd465 commit 773dec8

File tree

78 files changed

+4460
-4074
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4460
-4074
lines changed

.npmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
legacy-peer-deps=true
2+
auto-install-peers=true
3+
strict-peer-dependencies=false

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
# Changelog
2+
## [2.0.0] 2023-09-13
3+
4+
### Big update - NextJS 13 Update
5+
6+
- Layouts update
7+
- Updated routing
8+
- Updated image component
9+
- Updated link component
10+
211
## [1.0.1] 2022-03-22
312
### Bug Fixing
413
Auth layout fixed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# [Horizon UI NextJS ⚡️](https://horizon-ui.com/horizon-ui-chakra-nextjs) [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social&logo=twitter)](https://twitter.com/intent/tweet?url=https://horizon-ui.com/&text=Check%20Horizon%20UI,%20the%20trendiest%20open-source%20admin%20template%20for%20Chakra%20UI%20&%20React!)
22

3-
![version](https://img.shields.io/badge/version-1.0.0-blue.svg)
3+
![version](https://img.shields.io/badge/version-2.0.0-blue.svg)
44
![license](https://img.shields.io/badge/license-MIT-blue.svg)
55
[![GitHub issues open](https://img.shields.io/github/issues/horizon-ui/horizon-ui-chakra-nextjs.svg?maxAge=2592000)](https://github.com/horizon-ui/horizon-ui-chakra-nextjs/issues?q=is%3Aopen+is%3Aissue)
66

next.config.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11
/** @type {import('next').NextConfig} */
2+
23
const nextConfig = {
3-
reactStrictMode: true,
44
swcMinify: true,
5+
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
6+
assetPrefix: process.env.NEXT_PUBLIC_BASE_PATH,
7+
images: {
8+
domains: [
9+
'images.unsplash.com',
10+
'i.ibb.co',
11+
'scontent.fotp8-1.fna.fbcdn.net',
12+
],
13+
// Make ENV
14+
unoptimized: true,
15+
},
16+
experimental: {
17+
appDir: true,
18+
},
519
};
620

21+
// module.exports = withTM(nextConfig);
722
module.exports = nextConfig;

package.json

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
{
22
"name": "horizon-ui-chakra-nextjs",
3-
"version": "1.0.0",
3+
"version": "2.0.0",
44
"private": true,
55
"dependencies": {
6-
"@chakra-ui/icons": "^1.1.5",
7-
"@chakra-ui/react": "1.8.8",
8-
"@chakra-ui/system": "^1.12.1",
6+
"@chakra-ui/icons": "^2.0.19",
7+
"@chakra-ui/next-js": "^2.1.5",
8+
"@chakra-ui/react": "2.6.1",
9+
"@chakra-ui/styled-system": "^2.9.1",
10+
"@chakra-ui/system": "2.5.7",
911
"@chakra-ui/theme-tools": "^1.3.6",
1012
"@emotion/cache": "^11.7.1",
1113
"@emotion/react": "^11.4.1",
1214
"@emotion/styled": "^11.3.0",
15+
"@tanstack/react-table": "^8.9.8",
1316
"@testing-library/jest-dom": "^5.14.1",
1417
"@testing-library/react": "^11.2.7",
1518
"@testing-library/user-event": "^12.8.3",
1619
"@types/jest": "^25.2.3",
1720
"@types/react-dom": "^18.0.6",
1821
"apexcharts": "^3.35.2",
1922
"framer-motion": "^4.1.17",
20-
"next": "^12.2.5",
21-
"react": "^17.0.2",
23+
"next": "^13.3.2",
24+
"react": "18.2.0",
2225
"react-apexcharts": "^1.4.0",
2326
"react-calendar": "^3.7.0",
2427
"react-custom-scrollbars-2": "^4.2.1",
25-
"react-dom": "17.0.2",
28+
"react-dom": "18.2.0",
2629
"react-dropzone": "^12.0.4",
2730
"react-icons": "^4.3.1",
2831
"react-is": "^18.0.0",
29-
"react-table": "^7.8.0",
32+
"react-no-ssr": "^1.1.0",
3033
"stylis": "^4.1.1",
3134
"stylis-plugin-rtl": "2.0.2",
3235
"typescript": "^4.7.4",
@@ -41,7 +44,11 @@
4144
"deploy": "gh-pages -d build"
4245
},
4346
"browserslist": {
44-
"production": [">0.2%", "not dead", "not op_mini all"],
47+
"production": [
48+
">0.2%",
49+
"not dead",
50+
"not op_mini all"
51+
],
4552
"development": [
4653
"last 1 chrome version",
4754
"last 1 firefox version",
@@ -50,7 +57,7 @@
5057
},
5158
"devDependencies": {
5259
"@types/node": "^18.7.6",
53-
"@types/react": "^18.0.17",
60+
"@types/react": "18.2.0",
5461
"@types/react-calendar": "^3.5.2",
5562
"@types/react-table": "^7.7.12",
5663
"eslint": "^8.23.0",

prettier.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
trailingComma: 'all',
3+
singleQuote: true,
4+
};

src/app/AppWrappers.tsx

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
'use client';
2+
import React, { ReactNode } from 'react';
3+
import 'styles/App.css';
4+
import 'styles/Contact.css';
5+
import 'styles/MiniCalendar.css';
6+
import { ChakraProvider } from '@chakra-ui/react';
7+
import { CacheProvider } from '@chakra-ui/next-js';
8+
import theme from '../theme/theme';
9+
10+
export default function AppWrappers({ children }: { children: ReactNode }) {
11+
return (
12+
<CacheProvider>
13+
<ChakraProvider theme={theme}>{children}</ChakraProvider>{' '}
14+
</CacheProvider>
15+
);
16+
}

src/app/admin/data-tables/page.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
'use client';
2+
import { Box, SimpleGrid } from '@chakra-ui/react';
3+
import DevelopmentTable from 'views/admin/dataTables/components/DevelopmentTable';
4+
import CheckTable from 'views/admin/dataTables/components/CheckTable';
5+
import ColumnsTable from 'views/admin/dataTables/components/ColumnsTable';
6+
import ComplexTable from 'views/admin/dataTables/components/ComplexTable';
7+
import tableDataDevelopment from 'views/admin/dataTables/variables/tableDataDevelopment';
8+
import tableDataCheck from 'views/admin/dataTables/variables/tableDataCheck';
9+
import tableDataColumns from 'views/admin/dataTables/variables/tableDataColumns';
10+
import tableDataComplex from 'views/admin/dataTables/variables/tableDataComplex';
11+
import React from 'react';
12+
import AdminLayout from 'layouts/admin';
13+
14+
export default function DataTables() {
15+
return (
16+
<Box pt={{ base: '130px', md: '80px', xl: '80px' }}>
17+
<SimpleGrid
18+
mb="20px"
19+
columns={{ sm: 1, md: 2 }}
20+
spacing={{ base: '20px', xl: '20px' }}
21+
>
22+
<DevelopmentTable tableData={tableDataDevelopment} />
23+
<CheckTable tableData={tableDataCheck} />
24+
<ColumnsTable tableData={tableDataColumns} />
25+
<ComplexTable tableData={tableDataComplex} />
26+
</SimpleGrid>
27+
</Box>
28+
);
29+
}

src/app/admin/default/page.tsx

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
'use client';
2+
/*!
3+
_ _ ___ ____ ___ ________ _ _ _ _ ___
4+
| | | |/ _ \| _ \|_ _|__ / _ \| \ | | | | | |_ _|
5+
| |_| | | | | |_) || | / / | | | \| | | | | || |
6+
| _ | |_| | _ < | | / /| |_| | |\ | | |_| || |
7+
|_| |_|\___/|_| \_\___/____\___/|_| \_| \___/|___|
8+
9+
=========================================================
10+
* Horizon UI - v1.1.0
11+
=========================================================
12+
13+
* Product Page: https://www.horizon-ui.com/
14+
* Copyright 2022 Horizon UI (https://www.horizon-ui.com/)
15+
16+
* Designed and Coded by Simmmple
17+
18+
=========================================================
19+
20+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
21+
22+
*/
23+
24+
import {
25+
Box,
26+
Flex,
27+
FormLabel,
28+
Image,
29+
Icon,
30+
Select,
31+
SimpleGrid,
32+
useColorModeValue,
33+
} from '@chakra-ui/react';
34+
// Custom components
35+
// import MiniCalendar from 'components/calendar/MiniCalendar';
36+
import MiniStatistics from 'components/card/MiniStatistics';
37+
import IconBox from 'components/icons/IconBox';
38+
import {
39+
MdAddTask,
40+
MdAttachMoney,
41+
MdBarChart,
42+
MdFileCopy,
43+
} from 'react-icons/md';
44+
import CheckTable from 'views/admin/default/components/CheckTable';
45+
import ComplexTable from 'views/admin/default/components/ComplexTable';
46+
import DailyTraffic from 'views/admin/default/components/DailyTraffic';
47+
import PieCard from 'views/admin/default/components/PieCard';
48+
import Tasks from 'views/admin/default/components/Tasks';
49+
import TotalSpent from 'views/admin/default/components/TotalSpent';
50+
import WeeklyRevenue from 'views/admin/default/components/WeeklyRevenue';
51+
import tableDataCheck from 'views/admin/default/variables/tableDataCheck';
52+
import tableDataComplex from 'views/admin/default/variables/tableDataComplex';
53+
// Assets
54+
import Usa from 'img/dashboards/usa.png';
55+
56+
export default function Default() {
57+
// Chakra Color Mode
58+
59+
const brandColor = useColorModeValue('brand.500', 'white');
60+
const boxBg = useColorModeValue('secondaryGray.300', 'whiteAlpha.100');
61+
62+
return (
63+
<Box pt={{ base: '130px', md: '80px', xl: '80px' }}>
64+
<SimpleGrid
65+
columns={{ base: 1, md: 2, lg: 3, '2xl': 6 }}
66+
gap="20px"
67+
mb="20px"
68+
>
69+
<MiniStatistics
70+
startContent={
71+
<IconBox
72+
w="56px"
73+
h="56px"
74+
bg={boxBg}
75+
icon={
76+
<Icon w="32px" h="32px" as={MdBarChart} color={brandColor} />
77+
}
78+
/>
79+
}
80+
name="Earnings"
81+
value="$350.4"
82+
/>
83+
<MiniStatistics
84+
startContent={
85+
<IconBox
86+
w="56px"
87+
h="56px"
88+
bg={boxBg}
89+
icon={
90+
<Icon w="32px" h="32px" as={MdAttachMoney} color={brandColor} />
91+
}
92+
/>
93+
}
94+
name="Spend this month"
95+
value="$642.39"
96+
/>
97+
<MiniStatistics growth="+23%" name="Sales" value="$574.34" />
98+
<MiniStatistics
99+
endContent={
100+
<Flex me="-16px" mt="10px">
101+
<FormLabel htmlFor="balance">
102+
<Box boxSize={'12'}>
103+
<Image alt="" src={Usa.src} w={'100%'} h={'100%'} />
104+
</Box>
105+
</FormLabel>
106+
<Select
107+
id="balance"
108+
variant="mini"
109+
mt="5px"
110+
me="0px"
111+
defaultValue="usd"
112+
>
113+
<option value="usd">USD</option>
114+
<option value="eur">EUR</option>
115+
<option value="gba">GBA</option>
116+
</Select>
117+
</Flex>
118+
}
119+
name="Your balance"
120+
value="$1,000"
121+
/>
122+
<MiniStatistics
123+
startContent={
124+
<IconBox
125+
w="56px"
126+
h="56px"
127+
bg="linear-gradient(90deg, #4481EB 0%, #04BEFE 100%)"
128+
icon={<Icon w="28px" h="28px" as={MdAddTask} color="white" />}
129+
/>
130+
}
131+
name="New Tasks"
132+
value="154"
133+
/>
134+
<MiniStatistics
135+
startContent={
136+
<IconBox
137+
w="56px"
138+
h="56px"
139+
bg={boxBg}
140+
icon={
141+
<Icon w="32px" h="32px" as={MdFileCopy} color={brandColor} />
142+
}
143+
/>
144+
}
145+
name="Total Projects"
146+
value="2935"
147+
/>
148+
</SimpleGrid>
149+
150+
<SimpleGrid columns={{ base: 1, md: 2, xl: 2 }} gap="20px" mb="20px">
151+
<TotalSpent />
152+
<WeeklyRevenue />
153+
</SimpleGrid>
154+
<SimpleGrid columns={{ base: 1, md: 1, xl: 2 }} gap="20px" mb="20px">
155+
<CheckTable tableData={tableDataCheck} />
156+
<SimpleGrid columns={{ base: 1, md: 2, xl: 2 }} gap="20px">
157+
<DailyTraffic />
158+
<PieCard />
159+
</SimpleGrid>
160+
</SimpleGrid>
161+
<SimpleGrid columns={{ base: 1, md: 1, xl: 2 }} gap="20px" mb="20px">
162+
<ComplexTable tableData={tableDataComplex} />
163+
<SimpleGrid columns={{ base: 1, md: 2, xl: 2 }} gap="20px">
164+
<Tasks />
165+
{/* <MiniCalendar h="100%" minW="100%" selectRange={false} /> */}
166+
</SimpleGrid>
167+
</SimpleGrid>
168+
</Box>
169+
);
170+
}

0 commit comments

Comments
 (0)