@agilys-system/design-system 1.0.4 → 1.0.6

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.
Files changed (2) hide show
  1. package/README.md +30 -41
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,22 +1,26 @@
1
1
  # @agilys/design-system
2
2
 
3
- Design system em React para os projetos web da Agilys. Componentes construídos com [Vite](https://vitejs.dev), [Tailwind CSS](https://tailwindcss.com) e [class-variance-authority](https://cva.style), com playground em [Storybook](https://storybook.js.org).
3
+ Design system para os projetos web da Agilys. Componentes construídos com [Vite](https://vitejs.dev), [Tailwind CSS](https://tailwindcss.com) e [class-variance-authority](https://cva.style), com playground em [Chromatic](https://www.chromatic.com/library?appId=6a70e8317b8a3509112750bf).
4
+
5
+ Package [NPM](https://www.npmjs.com/package/@agilys-system/design-system/access)
4
6
 
5
7
  ## Instalação
6
8
 
7
9
  ```bash
8
10
  npm install @agilys/design-system
9
- ```
10
11
 
11
- Este pacote tem `react` e `react-dom` (>=18) como `peerDependencies` — instale-os no projeto consumidor caso ainda não existam.
12
+ ou
13
+
14
+ yarn add @agilys/design-system
15
+ ```
12
16
 
13
17
  ## Uso
14
18
 
15
19
  Importe os componentes e o CSS do pacote no ponto de entrada da sua aplicação:
16
20
 
17
21
  ```tsx
18
- import { Button } from '@agilys/design-system';
19
- import '@agilys/design-system/styles.css';
22
+ import { Button } from "@agilys/design-system";
23
+ import "@agilys/design-system/styles.css";
20
24
 
21
25
  function App() {
22
26
  return <Button variant="primary">Clique aqui</Button>;
@@ -32,46 +36,43 @@ Se o projeto consumidor também usa Tailwind, adicione o pacote ao `content` do
32
36
  ```js
33
37
  export default {
34
38
  content: [
35
- './src/**/*.{ts,tsx}',
36
- './node_modules/@agilys/design-system/dist/**/*.js',
39
+ "./src/**/*.{ts,tsx}",
40
+ "./node_modules/@agilys/design-system/dist/**/*.js",
37
41
  ],
38
42
  };
39
43
  ```
40
44
 
41
45
  ## Componentes disponíveis
42
46
 
43
- | Componente | Documentação |
44
- | --- | --- |
45
- | `Button` | [docs/button.md](./docs/button.md) |
47
+ | Componente | Documentação |
48
+ | ------------ | ------------------------------------------ |
49
+ | `Avatar` | [docs/avatar.md](./docs/avatar.md) |
50
+ | `Badge` | [docs/badge.md](./docs/badge.md) |
51
+ | `Button` | [docs/button.md](./docs/button.md) |
52
+ | `Input` | [docs/input.md](./docs/input.md) |
53
+ | `Modal` | [docs/modal.md](./docs/modal.md) |
54
+ | `Pagination` | [docs/pagination.md](./docs/pagination.md) |
55
+ | `Table` | [docs/table.md](./docs/table.md) |
56
+ | `Typography` | [docs/typography.md](./docs/typography.md) |
46
57
 
47
58
  Consulte a pasta [`docs/`](./docs) para o manual de integração de cada componente.
48
59
 
49
- ## Desenvolvimento
50
-
51
- ```bash
52
- npm install # instala dependências
53
- npm run dev # sobe o Storybook em http://localhost:6006 (playground dos componentes)
54
- npm run build # gera o build da lib em dist/ (JS + tipos + CSS)
55
- npm run build:storybook # gera o build estático do Storybook
56
- npm run lint # roda o ESLint
57
- ```
58
-
59
60
  ### Estrutura do projeto
60
61
 
61
62
  ```
62
63
  src/
63
64
  components/
64
- Button/
65
- Button.tsx
66
- Button.stories.tsx
67
- index.ts
65
+ Component/
66
+ Component.tsx # component
67
+ Component.stories.tsx # samples do storybook
68
+ index.ts # entry-point
68
69
  lib/
69
70
  cn.ts # helper (clsx + tailwind-merge)
70
71
  styles/
71
72
  tailwind.css
72
73
  index.ts # entry point público do pacote
73
74
  docs/
74
- button.md # manual de integração do Button
75
+ component.md # manual de integração de cada componente
75
76
  .storybook/ # configuração do Storybook (playground)
76
77
  .github/workflows/
77
78
  publish.yml # publica no npm a cada push na branch main
@@ -79,23 +80,11 @@ docs/
79
80
 
80
81
  ### Adicionando um novo componente
81
82
 
82
- 1. Crie `src/components/MeuComponente/MeuComponente.tsx`.
83
- 2. Exporte o componente em `src/components/MeuComponente/index.ts`.
83
+ 1. Crie `src/components/Component/Component.tsx`.
84
+ 2. Exporte o componente em `src/components/Component/index.ts`.
84
85
  3. Reexporte em `src/index.ts`.
85
- 4. Crie a story em `src/components/MeuComponente/MeuComponente.stories.tsx`.
86
- 5. Documente o uso em `docs/meu-componente.md` e adicione uma linha na tabela acima.
87
-
88
- ## Publicação (CI/CD)
89
-
90
- O workflow [`.github/workflows/publish.yml`](./.github/workflows/publish.yml) roda a cada push na branch `main`:
91
-
92
- 1. Instala dependências, faz lint e build do pacote.
93
- 2. Compara a versão em `package.json` com a versão publicada no npm.
94
- 3. Se a versão mudou, publica automaticamente em `https://registry.npmjs.org` (`npm publish`).
95
-
96
- Para publicar uma nova versão, faça `npm version <patch|minor|major>` (ou edite `version` no `package.json`) e faça merge/push na `main`.
97
-
98
- > **Secret necessário:** configure `NPM_TOKEN` (token de automação do npm com permissão de publish) em *Settings → Secrets and variables → Actions* no repositório GitHub.
86
+ 4. Crie a story em `src/components/Component/Component.stories.tsx`.
87
+ 5. Documente o uso em `docs/component.md` e adicione uma linha na tabela acima.
99
88
 
100
89
  ## Licença
101
90
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agilys-system/design-system",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Design system (React) for Agilys web projects — components built with Vite, Tailwind CSS and Storybook.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -37,7 +37,7 @@
37
37
  "lint": "eslint . --ext .ts,.tsx",
38
38
  "preview": "vite preview",
39
39
  "prepublishOnly": "npm run build",
40
- "chromatic": "npx chromatic --project-token=chpt_f4efa71abe7a530"
40
+ "chromatic": "npx chromatic"
41
41
  },
42
42
  "peerDependencies": {
43
43
  "react": ">=18.0.0",