-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
350 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
import React from "react"; | ||
import ReactDOM from "react-dom/client"; | ||
|
||
import Core from "./src/core/index"; | ||
import { Theme } from "./src/theme/theme"; | ||
import { ThemeProvider } from "../src/api"; | ||
|
||
ReactDOM.createRoot(document.getElementById("root")!).render( | ||
<React.StrictMode> | ||
<Core></Core> | ||
<ThemeProvider.Provider value={Theme}> | ||
<Core></Core> | ||
</ThemeProvider.Provider> | ||
</React.StrictMode>, | ||
); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { createStitches } from "@stitches/react"; | ||
import { ThemeDefault } from "../../../src/api"; | ||
|
||
const ThemeCustom = {}; | ||
|
||
export const Theme = createStitches({ ...ThemeDefault, ...ThemeCustom }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,21 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "ESNext", | ||
// Qual versão o typescript vai interpretar (ESNext - sempre a versão mais atual). | ||
|
||
"module": "ESNext", | ||
// Define o sistema de módulo do typescript. | ||
|
||
"baseUrl": "./", | ||
// Define um diretório base a partir do qual resolver nomes de módulos. | ||
|
||
"moduleResolution": "node", | ||
// Especifique a estratégia de resolução do módulo. | ||
|
||
"jsx": "react", | ||
// Controla como as construções JSX são emitidas em arquivos JavaScript | ||
|
||
"experimentalDecorators": true, | ||
// Habilita a utilização de decorators. | ||
|
||
"esModuleInterop": true, | ||
"noEmitOnError": true, | ||
// Não emita arquivos de saída do compilador. | ||
|
||
"strict": true, | ||
// Aplicar a regra de validações estrita do typescript. | ||
|
||
"allowJs": true, | ||
// Permita que arquivos JavaScript sejam importados dentro do seu projeto. | ||
|
||
"checkJs": false, | ||
// Realiza validações em arquivo javascript. | ||
|
||
"noImplicitAny": false, | ||
// O TypeScript retornará a um tipo de any para uma variável quando não puder inferir o tipo. | ||
|
||
"strictNullChecks": true, | ||
// Emite erro quando tentar utilizar variável undefined ou null. | ||
|
||
"noUnusedLocals": true, | ||
// Relate erros em variáveis locais não utilizadas. | ||
|
||
"noUnusedParameters": true, | ||
// Relate erros em parâmetros não utilizados em funções. | ||
|
||
"allowSyntheticDefaultImports": true | ||
// Permite escrever uma importação como "import React from "react""; | ||
"allowSyntheticDefaultImports": true, | ||
"resolveJsonModule": true | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import { defineConfig } from "vite"; | ||
|
||
import react from "@vitejs/plugin-react"; | ||
import viteReact from "@vitejs/plugin-react"; | ||
|
||
export default defineConfig({ | ||
plugins: [ | ||
react() | ||
viteReact() | ||
] | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
export type AlignItemsProps = | ||
| "stretch" | ||
| "center" | ||
| "flex-start" | ||
| "flex-end" | ||
| "baseline" | ||
| "initial" | ||
| "inherit"; | ||
|
||
type JustifyContentProps = | ||
| "flex-start" | ||
| "flex-end" | ||
| "center" | ||
| "space-between" | ||
| "space-around" | ||
| "space-evenly" | ||
| "initial" | ||
| "inherit"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import React from "react"; | ||
import { CSS } from "@stitches/react"; | ||
import { ThemeProps } from "../theme"; | ||
|
||
export interface APIComponentProps { | ||
|
||
/** | ||
* Adiciona no atributo `class` do componente o valor atribuido nessa propriedade | ||
*/ | ||
className?: string | ||
|
||
/** | ||
* Define o tamanho da box do componente de acordo com o valores obtidos no arquivo | ||
* de configuração do tema "SIZES" | ||
*/ | ||
size?: keyof ThemeProps["theme"]["sizes"] | ||
|
||
/** | ||
* Define a margin do componente de acordo com o valores obtidos no arquivo | ||
* de configuração do tema "SPACE" | ||
*/ | ||
margin?: keyof ThemeProps["theme"]["space"], | ||
|
||
/** | ||
* Define o padding do componente de acordo com o valores obtidos no arquivo | ||
* de configuração do tema "SPACE" | ||
*/ | ||
padding?: keyof ThemeProps["theme"]["space"], | ||
|
||
/** | ||
* Define o CSS individual para o componente | ||
*/ | ||
css?: CSS | ||
} | ||
|
||
export declare const ThemeDefault: ThemeProps; | ||
|
||
export declare const ThemeProvider: React.Context<any>; | ||
|
||
export * from "./css"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./theme"; |
Oops, something went wrong.