Skip to content

Commit

Permalink
2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
simmmpleweb committed Jul 24, 2024
1 parent 06a70f8 commit 7e5b26b
Show file tree
Hide file tree
Showing 13 changed files with 528 additions and 440 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# Changelog
## [2.0.0] 2024-07-24

### Vulnerabilities removed

- Most vulnerabilities removed, besides those cause by `react-scripts`. We kept this depedency due to the fact that there are
many users who still use it, and there is already a Next.js version for thos who want to migrate from `react-scripts`.
- Updated to React 18.


## [1.1.1] 2022-11-01
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 TypeScript ⚡️](https://horizon-ui.com/horizon-ui-chakra-ts) [![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-ts.svg?maxAge=2592000)](https://github.com/horizon-ui/horizon-ui-chakra-ts/issues?q=is%3Aopen+is%3Aissue)

Expand Down
140 changes: 72 additions & 68 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,70 +1,74 @@
{
"homepage": "https://horizon-ui.com/horizon-ui-chakra-ts",
"name": "horizon-ui-chakra-typescript",
"version": "1.1.0",
"private": true,
"dependencies": {
"@chakra-ui/icons": "^1.1.5",
"@chakra-ui/react": "1.8.8",
"@chakra-ui/system": "^1.12.1",
"@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.5.13",
"@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/node": "^12.20.55",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"apexcharts": "^3.35.2",
"framer-motion": "^4.1.17",
"react": "^17.0.2",
"react-apexcharts": "^1.4.0",
"react-calendar": "^3.7.0",
"react-custom-scrollbars-2": "^4.2.1",
"react-dom": "17.0.2",
"react-dropzone": "^12.0.4",
"react-icons": "^4.3.1",
"react-is": "^18.0.0",
"react-router-dom": "^5.3.0",
"react-scripts": "5.0.0",
"stylis": "^4.1.1",
"stylis-plugin-rtl": "2.0.2",
"typescript": "^4.7.4",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -d build"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/react-calendar": "^3.5.2",
"@types/react-router-dom": "^5.3.3",
"gh-pages": "^3.2.3"
}
"name": "horizon-ui-chakra-typescript",
"version": "2.0.0",
"private": true,
"dependencies": {
"@babel/preset-react": "^7.18.6",
"@chakra-ui/icons": "^2.0.19",
"@chakra-ui/react": "2.6.1",
"@chakra-ui/system": "2.5.7",
"@chakra-ui/theme-tools": "^1.3.6",
"@emotion/cache": "^11.12.0",
"@emotion/react": "^11.12.0",
"@emotion/styled": "^11.12.0",
"@tanstack/react-table": "^8.19.3",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.0",
"@testing-library/user-event": "^14.5.2",
"@types/jest": "^25.2.3",
"@types/node": "^12.20.55",
"@types/react": "^18.0.15",
"@types/react-dom": "^18.0.6",
"apexcharts": "3.50.0",
"framer-motion": "^11.3.7",
"npm-force-resolutions": "^0.0.10",
"react": "18.3.1",
"react-apexcharts": "1.4.1",
"react-calendar": "^5.0.0",
"react-custom-scrollbars-2": "^4.5.0",
"react-dom": "18.3.1",
"react-dropzone": "^14.2.3",
"react-icons": "^5.2.1",
"react-is": "^18.3.1",
"react-router-dom": "^6.25.1",
"react-scripts": "^5.0.0",
"stylis": "^4.1.1",
"stylis-plugin-rtl": "2.0.2",
"typescript": "^4.7.4",
"web-vitals": "^1.1.2"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"predeploy": "npm run build",
"deploy": "gh-pages -d build",
"preinstall": "npx npm-force-resolutions"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"resolutions": {
"react-error-overlay": "6.0.9"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@types/react-calendar": "^3.5.2",
"@types/react-router-dom": "^5.3.3"
}
}
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,
};
36 changes: 36 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import './assets/css/App.css';
import { Routes, Route, Navigate } from 'react-router-dom';
import AuthLayout from './layouts/auth';
import AdminLayout from './layouts/admin';
import RTLLayout from './layouts/rtl';
import React from 'react';
import theme from 'theme/theme';
import { ChakraProvider } from '@chakra-ui/react';
import initialTheme from './theme/theme'; // { themeGreen }
import { useState } from 'react';

export default function Main() {
const [currentTheme, setCurrentTheme] = useState(initialTheme);
return (
<ChakraProvider theme={theme}>
<React.StrictMode>
<Routes>
<Route path="auth/*" element={<AuthLayout />} />
<Route
path="admin/*"
element={
<AdminLayout theme={currentTheme} setTheme={setCurrentTheme} />
}
/>
<Route
path="rtl/*"
element={
<RTLLayout theme={currentTheme} setTheme={setCurrentTheme} />
}
/>
<Route path="/" element={<Navigate to="/admin" replace />} />
</Routes>
</React.StrictMode>
</ChakraProvider>
);
}
59 changes: 35 additions & 24 deletions src/components/calendar/MiniCalendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,39 @@ import { Text, Icon } from '@chakra-ui/react';
import { MdChevronLeft, MdChevronRight } from 'react-icons/md';
// Custom components
import Card from 'components/card/Card';

export default function MiniCalendar(props: { selectRange: boolean; [x: string]: any }) {
const { selectRange, ...rest } = props;
const [ value, onChange ] = useState(new Date());
return (
<Card
alignItems='center'
flexDirection='column'
w='100%'
maxW='max-content'
p='20px 15px'
h='max-content'
{...rest}>
<Calendar
onChange={onChange}
value={value}
selectRange={selectRange}
view={'month'}
tileContent={<Text color='brand.500' />}
prevLabel={<Icon as={MdChevronLeft} w='24px' h='24px' mt='4px' />}
nextLabel={<Icon as={MdChevronRight} w='24px' h='24px' mt='4px' />}
/>
</Card>
);
type CalendarValue = Date | [Date, Date] | null;
export default function MiniCalendar(props: {
selectRange: boolean;
[x: string]: any;
}) {
const { selectRange, ...rest } = props;
const [value, setValue] = useState<CalendarValue>(new Date());
const handleChange = (
value: CalendarValue,
event: React.MouseEvent<HTMLButtonElement, MouseEvent>,
) => {
setValue(value);
alert('New date is: ' + value);
};
return (
<Card
alignItems="center"
flexDirection="column"
w="100%"
maxW="max-content"
p="20px 15px"
h="max-content"
{...rest}
>
<Calendar
onChange={handleChange}
value={value}
selectRange={selectRange}
view={'month'}
tileContent={<Text color="brand.500" />}
prevLabel={<Icon as={MdChevronLeft} w="24px" h="24px" mt="4px" />}
nextLabel={<Icon as={MdChevronRight} w="24px" h="24px" mt="4px" />}
/>
</Card>
);
}
31 changes: 10 additions & 21 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
import React from 'react';
import ReactDOM from 'react-dom';
import ReactDOM from 'react-dom/client';
import { BrowserRouter } from 'react-router-dom';
import './assets/css/App.css';
import { HashRouter, Route, Switch, Redirect } from 'react-router-dom';
import AuthLayout from './layouts/auth';
import AdminLayout from './layouts/admin';
import RTLLayout from './layouts/rtl';
import { ChakraProvider } from '@chakra-ui/react';
import theme from './theme/theme';

ReactDOM.render(
<ChakraProvider theme={theme}>
<React.StrictMode>
<HashRouter>
<Switch>
<Route path={`/auth`} component={AuthLayout} />
<Route path={`/admin`} component={AdminLayout} />
<Route path={`/rtl`} component={RTLLayout} />
<Redirect from='/' to='/admin' />
</Switch>
</HashRouter>
</React.StrictMode>
</ChakraProvider>,
document.getElementById('root')
import App from './App';

const root = ReactDOM.createRoot(document.getElementById('root'));

root.render(
<BrowserRouter>
<App />
</BrowserRouter>,
);
Loading

0 comments on commit 7e5b26b

Please sign in to comment.