Skip to content

Commit

Permalink
Merge pull request #6 from horizon-ui/feature/next-13
Browse files Browse the repository at this point in the history
Feature/next 13
  • Loading branch information
simmmpleweb authored Sep 13, 2023
2 parents 73b0759 + 44bd465 commit 773dec8
Show file tree
Hide file tree
Showing 78 changed files with 4,460 additions and 4,074 deletions.
3 changes: 3 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
legacy-peer-deps=true
auto-install-peers=true
strict-peer-dependencies=false
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# Changelog
## [2.0.0] 2023-09-13

### Big update - NextJS 13 Update

- Layouts update
- Updated routing
- Updated image component
- Updated link component

## [1.0.1] 2022-03-22
### Bug Fixing
Auth layout fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# [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!)

![version](https://img.shields.io/badge/version-1.0.0-blue.svg)
![version](https://img.shields.io/badge/version-2.0.0-blue.svg)
![license](https://img.shields.io/badge/license-MIT-blue.svg)
[![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)

Expand Down
17 changes: 16 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,22 @@
/** @type {import('next').NextConfig} */

const nextConfig = {
reactStrictMode: true,
swcMinify: true,
basePath: process.env.NEXT_PUBLIC_BASE_PATH,
assetPrefix: process.env.NEXT_PUBLIC_BASE_PATH,
images: {
domains: [
'images.unsplash.com',
'i.ibb.co',
'scontent.fotp8-1.fna.fbcdn.net',
],
// Make ENV
unoptimized: true,
},
experimental: {
appDir: true,
},
};

// module.exports = withTM(nextConfig);
module.exports = nextConfig;
27 changes: 17 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
{
"name": "horizon-ui-chakra-nextjs",
"version": "1.0.0",
"version": "2.0.0",
"private": true,
"dependencies": {
"@chakra-ui/icons": "^1.1.5",
"@chakra-ui/react": "1.8.8",
"@chakra-ui/system": "^1.12.1",
"@chakra-ui/icons": "^2.0.19",
"@chakra-ui/next-js": "^2.1.5",
"@chakra-ui/react": "2.6.1",
"@chakra-ui/styled-system": "^2.9.1",
"@chakra-ui/system": "2.5.7",
"@chakra-ui/theme-tools": "^1.3.6",
"@emotion/cache": "^11.7.1",
"@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0",
"@tanstack/react-table": "^8.9.8",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^11.2.7",
"@testing-library/user-event": "^12.8.3",
"@types/jest": "^25.2.3",
"@types/react-dom": "^18.0.6",
"apexcharts": "^3.35.2",
"framer-motion": "^4.1.17",
"next": "^12.2.5",
"react": "^17.0.2",
"next": "^13.3.2",
"react": "18.2.0",
"react-apexcharts": "^1.4.0",
"react-calendar": "^3.7.0",
"react-custom-scrollbars-2": "^4.2.1",
"react-dom": "17.0.2",
"react-dom": "18.2.0",
"react-dropzone": "^12.0.4",
"react-icons": "^4.3.1",
"react-is": "^18.0.0",
"react-table": "^7.8.0",
"react-no-ssr": "^1.1.0",
"stylis": "^4.1.1",
"stylis-plugin-rtl": "2.0.2",
"typescript": "^4.7.4",
Expand All @@ -41,7 +44,11 @@
"deploy": "gh-pages -d build"
},
"browserslist": {
"production": [">0.2%", "not dead", "not op_mini all"],
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
Expand All @@ -50,7 +57,7 @@
},
"devDependencies": {
"@types/node": "^18.7.6",
"@types/react": "^18.0.17",
"@types/react": "18.2.0",
"@types/react-calendar": "^3.5.2",
"@types/react-table": "^7.7.12",
"eslint": "^8.23.0",
Expand Down
4 changes: 4 additions & 0 deletions prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
trailingComma: 'all',
singleQuote: true,
};
16 changes: 16 additions & 0 deletions src/app/AppWrappers.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use client';
import React, { ReactNode } from 'react';
import 'styles/App.css';
import 'styles/Contact.css';
import 'styles/MiniCalendar.css';
import { ChakraProvider } from '@chakra-ui/react';
import { CacheProvider } from '@chakra-ui/next-js';
import theme from '../theme/theme';

export default function AppWrappers({ children }: { children: ReactNode }) {
return (
<CacheProvider>
<ChakraProvider theme={theme}>{children}</ChakraProvider>{' '}
</CacheProvider>
);
}
29 changes: 29 additions & 0 deletions src/app/admin/data-tables/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
'use client';
import { Box, SimpleGrid } from '@chakra-ui/react';
import DevelopmentTable from 'views/admin/dataTables/components/DevelopmentTable';
import CheckTable from 'views/admin/dataTables/components/CheckTable';
import ColumnsTable from 'views/admin/dataTables/components/ColumnsTable';
import ComplexTable from 'views/admin/dataTables/components/ComplexTable';
import tableDataDevelopment from 'views/admin/dataTables/variables/tableDataDevelopment';
import tableDataCheck from 'views/admin/dataTables/variables/tableDataCheck';
import tableDataColumns from 'views/admin/dataTables/variables/tableDataColumns';
import tableDataComplex from 'views/admin/dataTables/variables/tableDataComplex';
import React from 'react';
import AdminLayout from 'layouts/admin';

export default function DataTables() {
return (
<Box pt={{ base: '130px', md: '80px', xl: '80px' }}>
<SimpleGrid
mb="20px"
columns={{ sm: 1, md: 2 }}
spacing={{ base: '20px', xl: '20px' }}
>
<DevelopmentTable tableData={tableDataDevelopment} />
<CheckTable tableData={tableDataCheck} />
<ColumnsTable tableData={tableDataColumns} />
<ComplexTable tableData={tableDataComplex} />
</SimpleGrid>
</Box>
);
}
170 changes: 170 additions & 0 deletions src/app/admin/default/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
'use client';
/*!
_ _ ___ ____ ___ ________ _ _ _ _ ___
| | | |/ _ \| _ \|_ _|__ / _ \| \ | | | | | |_ _|
| |_| | | | | |_) || | / / | | | \| | | | | || |
| _ | |_| | _ < | | / /| |_| | |\ | | |_| || |
|_| |_|\___/|_| \_\___/____\___/|_| \_| \___/|___|
=========================================================
* Horizon UI - v1.1.0
=========================================================
* Product Page: https://www.horizon-ui.com/
* Copyright 2022 Horizon UI (https://www.horizon-ui.com/)
* Designed and Coded by Simmmple
=========================================================
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*/

import {
Box,
Flex,
FormLabel,
Image,
Icon,
Select,
SimpleGrid,
useColorModeValue,
} from '@chakra-ui/react';
// Custom components
// import MiniCalendar from 'components/calendar/MiniCalendar';
import MiniStatistics from 'components/card/MiniStatistics';
import IconBox from 'components/icons/IconBox';
import {
MdAddTask,
MdAttachMoney,
MdBarChart,
MdFileCopy,
} from 'react-icons/md';
import CheckTable from 'views/admin/default/components/CheckTable';
import ComplexTable from 'views/admin/default/components/ComplexTable';
import DailyTraffic from 'views/admin/default/components/DailyTraffic';
import PieCard from 'views/admin/default/components/PieCard';
import Tasks from 'views/admin/default/components/Tasks';
import TotalSpent from 'views/admin/default/components/TotalSpent';
import WeeklyRevenue from 'views/admin/default/components/WeeklyRevenue';
import tableDataCheck from 'views/admin/default/variables/tableDataCheck';
import tableDataComplex from 'views/admin/default/variables/tableDataComplex';
// Assets
import Usa from 'img/dashboards/usa.png';

export default function Default() {
// Chakra Color Mode

const brandColor = useColorModeValue('brand.500', 'white');
const boxBg = useColorModeValue('secondaryGray.300', 'whiteAlpha.100');

return (
<Box pt={{ base: '130px', md: '80px', xl: '80px' }}>
<SimpleGrid
columns={{ base: 1, md: 2, lg: 3, '2xl': 6 }}
gap="20px"
mb="20px"
>
<MiniStatistics
startContent={
<IconBox
w="56px"
h="56px"
bg={boxBg}
icon={
<Icon w="32px" h="32px" as={MdBarChart} color={brandColor} />
}
/>
}
name="Earnings"
value="$350.4"
/>
<MiniStatistics
startContent={
<IconBox
w="56px"
h="56px"
bg={boxBg}
icon={
<Icon w="32px" h="32px" as={MdAttachMoney} color={brandColor} />
}
/>
}
name="Spend this month"
value="$642.39"
/>
<MiniStatistics growth="+23%" name="Sales" value="$574.34" />
<MiniStatistics
endContent={
<Flex me="-16px" mt="10px">
<FormLabel htmlFor="balance">
<Box boxSize={'12'}>
<Image alt="" src={Usa.src} w={'100%'} h={'100%'} />
</Box>
</FormLabel>
<Select
id="balance"
variant="mini"
mt="5px"
me="0px"
defaultValue="usd"
>
<option value="usd">USD</option>
<option value="eur">EUR</option>
<option value="gba">GBA</option>
</Select>
</Flex>
}
name="Your balance"
value="$1,000"
/>
<MiniStatistics
startContent={
<IconBox
w="56px"
h="56px"
bg="linear-gradient(90deg, #4481EB 0%, #04BEFE 100%)"
icon={<Icon w="28px" h="28px" as={MdAddTask} color="white" />}
/>
}
name="New Tasks"
value="154"
/>
<MiniStatistics
startContent={
<IconBox
w="56px"
h="56px"
bg={boxBg}
icon={
<Icon w="32px" h="32px" as={MdFileCopy} color={brandColor} />
}
/>
}
name="Total Projects"
value="2935"
/>
</SimpleGrid>

<SimpleGrid columns={{ base: 1, md: 2, xl: 2 }} gap="20px" mb="20px">
<TotalSpent />
<WeeklyRevenue />
</SimpleGrid>
<SimpleGrid columns={{ base: 1, md: 1, xl: 2 }} gap="20px" mb="20px">
<CheckTable tableData={tableDataCheck} />
<SimpleGrid columns={{ base: 1, md: 2, xl: 2 }} gap="20px">
<DailyTraffic />
<PieCard />
</SimpleGrid>
</SimpleGrid>
<SimpleGrid columns={{ base: 1, md: 1, xl: 2 }} gap="20px" mb="20px">
<ComplexTable tableData={tableDataComplex} />
<SimpleGrid columns={{ base: 1, md: 2, xl: 2 }} gap="20px">
<Tasks />
{/* <MiniCalendar h="100%" minW="100%" selectRange={false} /> */}
</SimpleGrid>
</SimpleGrid>
</Box>
);
}
Loading

0 comments on commit 773dec8

Please sign in to comment.