Skip to content

Commit

Permalink
feat: adicionado paths
Browse files Browse the repository at this point in the history
  • Loading branch information
erikfig committed Sep 16, 2024
1 parent c783e56 commit db2a8d1
Show file tree
Hide file tree
Showing 20 changed files with 44 additions and 41 deletions.
2 changes: 1 addition & 1 deletion src/components/card/card-status.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Typography } from '../Typography'
import { Typography } from '../typography'
import { Card } from './default'

type CardStatusProps = {
Expand Down
1 change: 1 addition & 0 deletions src/components/card/index.tsx
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './default'
export * from './card-background'
export * from './card-status'
2 changes: 1 addition & 1 deletion src/components/data-table/data-table.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Card } from '../card'
import { Pagination, PaginationProps } from '../pagination'
import { Table, TableProps } from '../table'
import { Typography } from '../Typography'
import { Typography } from '../typography'

type DataTableProps = { title?: string } & TableProps & PaginationProps

Expand Down
3 changes: 3 additions & 0 deletions src/components/form/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './input'
export * from './form-container'
export * from './toggle'
2 changes: 1 addition & 1 deletion src/components/form/input/input.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ReactNode, useEffect, useState } from 'react'
import { InputField, InputFieldProps } from './input-field'
import { Typography } from '../../Typography'
import { Typography } from '../../typography'
import { Adapters } from './adapter'
import { Label } from './label'

Expand Down
11 changes: 11 additions & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export * from './button'
export * from './card'
export * from './charts'
export * from './data-table'
export * from './form'
export * from './img'
export * from './pagination'
export * from './rounded'
export * from './table'
export * from './toast'
export * from './typography'
2 changes: 1 addition & 1 deletion src/components/pagination/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useEffect, useState } from 'react'
import { Typography } from '../Typography'
import { Typography } from '../typography'

export type PaginationProps = {
current: number,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/config/routes.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DefaultLayout } from '@layouts/default/default.layout'
import { RouteObject } from 'react-router-dom'
import { Home } from '../pages/home'
import { Home } from '@pages/home'
import { ReactNode } from 'react'
import { NoTemplate } from '@pages/no-template'
import { Forms } from '@pages/forms'
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/default/components/menu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MouseEventHandler, ReactNode, useEffect, useState } from 'react'
import { Card } from '../../../../components/card'
import { Card } from '@components'
import { useLocation } from 'react-router-dom'
import { RoutesConfig } from '@config/routes'

Expand Down
7 changes: 2 additions & 5 deletions src/layouts/default/default.layout.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import { useCallback, useState } from 'react'
import { Rounded } from '../../components/rounded'
import { useDarkMode } from '../../contexts/dark-mode'
import { Rounded, Typography, Toggle, Img } from '@components'
import { useDarkMode } from '@contexts/dark-mode'
import './style.css'
import { Menu, MenuItem } from './components/menu'
import { Typography } from '../../components/Typography'
import { Toggle } from '../../components/form/toggle'
import { Outlet, useNavigate } from 'react-router-dom'
import { RoutesConfig } from '@config/routes'
import { Img } from '../../components/img'

type DefaultLayoutProps = {
title?: string
Expand Down
8 changes: 2 additions & 6 deletions src/layouts/default/login.layout.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import { useCallback } from 'react'
import { useDarkMode } from '../../contexts/dark-mode'
import { Typography } from '../../components/Typography'
import { Toggle } from '../../components/form/toggle'
import { Rounded } from '../../components/rounded'
import { Img } from '../../components/img'
import { CardBackground } from '../../components/card'
import { useDarkMode } from '@contexts/dark-mode'
import { CardBackground, Img, Typography, Toggle, Rounded } from '@components'
import { Outlet } from 'react-router-dom'

export const LoginLayout = () => {
Expand Down
2 changes: 1 addition & 1 deletion src/mock/bar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApexOptions } from 'apexcharts'
import { Charts } from '../components/charts'
import { Charts } from '@components'

export const Bar = () => {
const series = [{
Expand Down
2 changes: 1 addition & 1 deletion src/mock/circle.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApexOptions } from 'apexcharts'
import { Charts } from '../components/charts'
import { Charts } from '@components'

export const Circle = ({ color, value }: { color: string, value: number }) => {
const series = [value]
Expand Down
2 changes: 1 addition & 1 deletion src/mock/radial.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ApexOptions } from 'apexcharts'
import { Charts } from '../components/charts'
import { Charts } from '@components'

export const Radial = () => {
const series = [44, 55, 67, 83]
Expand Down
7 changes: 2 additions & 5 deletions src/pages/forms.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
import { useCallback, useState } from 'react'
import { Button } from '../components/button'
import { Card } from '../components/card'
import { FormContainer } from '../components/form/form-container'
import { Input } from '../components/form/input'
import { useOnChange } from '../utils/handleOnChange'
import { Button, Card, FormContainer, Input } from '@components'
import { useOnChange } from '@utils/handleOnChange'

export const Forms = () => {
const [formData, setFormData] = useState<any>({
Expand Down
9 changes: 3 additions & 6 deletions src/pages/home.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import { Typography } from '@components'
import { DataTableAsync, Button, Card, CardBackground, CardStatus } from '@components'
import { ExampleRequest } from '@hooks/example-request'
import { Radial } from '../mock/radial'
import { Bar } from '../mock/bar'
import { Circle } from '../mock/circle'
import { Typography } from '../components/Typography'
import { Card, CardBackground } from '../components/card'
import { CardStatus } from '../components/card/card-status'
import { Button } from '../components/button'
import { DataTableAsync } from '../components/data-table/data-table-async'
import { ExampleRequest } from '../hooks/example-request'

export const Home = () => {
// Configuração de exibição do DataTable
Expand Down
9 changes: 1 addition & 8 deletions src/pages/login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,7 @@ import { useNavigate } from 'react-router-dom'
import { SubmitHandler, useForm } from "react-hook-form"
import { yupResolver } from "@hookform/resolvers/yup"
import * as yup from "yup"
import { Button } from '../components/button'
import { Card } from '../components/card'
import { FormContainer } from '../components/form/form-container'
import { InputController } from '../components/form/input'
import { Img } from '../components/img'
import { Rounded } from '../components/rounded'
import { Typography } from '../components/Typography'
import { toast } from '../components/toast'
import { Button, Card, FormContainer, InputController, Img, Rounded, Typography, toast } from '@components'
import { useState } from 'react'

type Form = {
Expand Down
3 changes: 1 addition & 2 deletions src/pages/no-template.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { useNavigate } from 'react-router-dom'
import { Button } from '../components/button'
import { Typography } from '../components/Typography'
import { Button, Typography } from '@components'

export const NoTemplate = () => {
const navigate = useNavigate()
Expand Down
9 changes: 9 additions & 0 deletions tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
"@config/*": [
"./src/config/*"
],
"@contexts/*": [
"./src/contexts/*"
],
"@hooks/*": [
"./src/hooks/*"
],
"@layouts/*": [
"./src/layouts/*"
],
Expand All @@ -40,6 +46,9 @@
"@types/*": [
"./src/types/*"
],
"@utils/*": [
"./src/utils/*"
],
},
},
"include": [
Expand Down

0 comments on commit db2a8d1

Please sign in to comment.