analytica-frontend-lib 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -0
- package/dist/index.css +1 -1
- package/package.json +11 -10
package/README.md
CHANGED
|
@@ -14,6 +14,27 @@ Instale a biblioteca em seu projeto com o comando:
|
|
|
14
14
|
yarn add analytica-frontend-lib
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
+
### Importe os componentes
|
|
18
|
+
|
|
19
|
+
Para usar os componentes, basta importá-los no seu projeto:
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { Text } from 'analytica-frontend-lib'
|
|
23
|
+
|
|
24
|
+
const MyComponent = () => {
|
|
25
|
+
return <Text>Olá mundo!</Text>
|
|
26
|
+
}
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### Importando Estilos CSS
|
|
30
|
+
|
|
31
|
+
Para usar os estilos e variáveis CSS da lib, importe o arquivo de estilos:
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
// No seu arquivo layout.tsx (Next.js) ou main.tsx (Vite)
|
|
35
|
+
import 'analytica-frontend-lib/styles.css';
|
|
36
|
+
```
|
|
37
|
+
|
|
17
38
|
---
|
|
18
39
|
|
|
19
40
|
## Etapas para criar um novo componente
|
|
@@ -33,6 +54,10 @@ yarn add analytica-frontend-lib
|
|
|
33
54
|
- Os componentes devem ser totalmente compatíveis com Next.js versão 15+.
|
|
34
55
|
- Testes unitários são obrigatórios, com coverage mínimo de 80%.
|
|
35
56
|
- Siga o princípio da responsabilidade única (`single responsibility`): construa componentes compostos por componentes menores.
|
|
57
|
+
- No arquivo `package.json` da biblioteca temos:
|
|
58
|
+
- `peerDependencies`: Framework core (React, Next.js)
|
|
59
|
+
- `dependencies`: Bibliotecas específicas usadas pelos componentes
|
|
60
|
+
- `devDependencies`: Ferramentas de build, testes, linting
|
|
36
61
|
|
|
37
62
|
## Ladle
|
|
38
63
|
|
package/dist/index.css
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "analytica-frontend-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Repositório público dos componentes utilizados nas plataformas da Analytica Ensino",
|
|
5
5
|
"main": "dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
".": {
|
|
13
13
|
"import": "./dist/index.js",
|
|
14
14
|
"require": "./dist/index.cjs"
|
|
15
|
-
}
|
|
15
|
+
},
|
|
16
|
+
"./styles.css": "./dist/index.css"
|
|
16
17
|
},
|
|
17
18
|
"scripts": {
|
|
18
19
|
"lint": "npx eslint \"{src,app}/**/*.{js,jsx,ts,tsx}\" --fix",
|
|
@@ -47,11 +48,6 @@
|
|
|
47
48
|
"publishConfig": {
|
|
48
49
|
"access": "public"
|
|
49
50
|
},
|
|
50
|
-
"peerDependencies": {
|
|
51
|
-
"next": ">=15.0.0",
|
|
52
|
-
"react": ">=19.0.0",
|
|
53
|
-
"react-dom": ">=19.0.0"
|
|
54
|
-
},
|
|
55
51
|
"author": "Analytica Ensino LTDA",
|
|
56
52
|
"license": "MIT",
|
|
57
53
|
"repository": {
|
|
@@ -62,10 +58,13 @@
|
|
|
62
58
|
"bugs": {
|
|
63
59
|
"url": "https://github.com/analytica-ensino/analytica-frontend-lib/issues"
|
|
64
60
|
},
|
|
61
|
+
"peerDependencies": {
|
|
62
|
+
"next": ">=15.0.0",
|
|
63
|
+
"react": ">=19.0.0",
|
|
64
|
+
"react-dom": ">=19.0.0"
|
|
65
|
+
},
|
|
65
66
|
"dependencies": {
|
|
66
|
-
"phosphor-react": "^1.4.1"
|
|
67
|
-
"react": "^19.1.0",
|
|
68
|
-
"react-dom": "^19.1.0"
|
|
67
|
+
"phosphor-react": "^1.4.1"
|
|
69
68
|
},
|
|
70
69
|
"devDependencies": {
|
|
71
70
|
"@eslint/eslintrc": "^3.3.1",
|
|
@@ -95,6 +94,8 @@
|
|
|
95
94
|
"polished": "^4.3.1",
|
|
96
95
|
"postcss": "^8.5.4",
|
|
97
96
|
"prettier": "^3.5.3",
|
|
97
|
+
"react": "^19.1.0",
|
|
98
|
+
"react-dom": "^19.1.0",
|
|
98
99
|
"sonarqube-scanner": "^4.3.0",
|
|
99
100
|
"tailwindcss": "^4.1.8",
|
|
100
101
|
"ts-jest": "^29.3.4",
|