@fast-food/design-system 1.8.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Eduardo Martins
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,218 @@
1
+ # Restaurant Design System
2
+
3
+ Um sistema de design modular baseado em React, TypeScript e Vite, estruturado segundo o padrão Atomic Design. O objetivo é fornecer uma base escalável e reutilizável de componentes para acelerar o desenvolvimento de interfaces consistentes e acessíveis para o sistema de restaurantes.
4
+
5
+ ## 🚀 Principais Features
6
+
7
+ - **Atomic Design** (atoms, molecules, organisms)
8
+ - **Tokens centralizados** de cor, espaçamento e tipografia
9
+ - **Suporte a temas** (light/dark) via CSS custom properties
10
+ - **Acessibilidade (a11y)** garantida e testada
11
+ - **Testes automatizados** e cobertura monitorada
12
+ - **Documentação visual** com Storybook
13
+ - **CI/CD** e publicação automatizada
14
+ - **TypeScript** para segurança de tipos
15
+
16
+ ## 📦 Componentes Disponíveis
17
+
18
+ ### **Atoms** (Componentes Básicos)
19
+
20
+ - **Button**: 5 variantes (primary, secondary, success, warning, error), 4 tamanhos
21
+ - **Label**: Componente de texto com suporte a associação com inputs
22
+ - **Title**: Componente de título com variantes semânticas
23
+
24
+ ### **Molecules** (Componentes Compostos)
25
+
26
+ - **InputWithLabel**: Campo de input com label integrado
27
+
28
+ ### **Organisms** (Componentes Complexos)
29
+
30
+ - **SimpleForm**: Formulário completo integrando todos os componentes
31
+
32
+ ## 🛠️ Guia Rápido
33
+
34
+ ### Instalação
35
+
36
+ ```bash
37
+ npm install # ou yarn install
38
+ ```
39
+
40
+ ### Rodando o projeto em modo desenvolvimento
41
+
42
+ ```bash
43
+ npm run dev
44
+ ```
45
+
46
+ ### Rodando os testes
47
+
48
+ ```bash
49
+ npm test
50
+ ```
51
+
52
+ **Cobertura de Testes**: 100% nos componentes principais, 30.91% geral
53
+
54
+ - Testes unitários e de integração
55
+ - Edge cases e acessibilidade
56
+ - Monitoramento automático via CI/CD
57
+
58
+ 📖 **Documentação detalhada**: [docs/TESTING.md](./docs/TESTING.md)
59
+
60
+ ### Lint e formatação
61
+
62
+ ```bash
63
+ npm run lint
64
+ ```
65
+
66
+ ### Rodando o Storybook
67
+
68
+ ```bash
69
+ npm run start # ou npm run storybook
70
+ default: http://localhost:6006
71
+ ```
72
+
73
+ ### Sincronização de Versão
74
+
75
+ Após releases, sincronize sua versão local:
76
+
77
+ ```bash
78
+ npm run sync-version
79
+ ```
80
+
81
+ ## 📚 Como Contribuir
82
+
83
+ 1. **Sincronize a versão**: `npm run sync-version`
84
+ 2. **Crie uma branch** a partir da `main`
85
+ 3. **Siga o padrão** de componentes e estilos do projeto
86
+ 4. **Adicione testes** e documentação (stories) para novos componentes
87
+ 5. **Rode lint, type-check, testes** e build antes de abrir PR
88
+ 6. **Siga o padrão Conventional Commits**
89
+ 7. **Abra um Pull Request** explicando suas mudanças
90
+ 8. **Veja mais detalhes** em [`docs/CONTRIBUTING.md`](docs/CONTRIBUTING.md)
91
+
92
+ ## 💻 Exemplo de Uso de um Componente
93
+
94
+ ```tsx
95
+ import { Button } from 'src/components/atoms/Button';
96
+
97
+ export function App() {
98
+ return <Button onClick={() => alert('Olá!')}>Clique aqui</Button>;
99
+ }
100
+ ```
101
+
102
+ ## 📦 Exemplo de Consumo Externo
103
+
104
+ ```bash
105
+ npm install @fast-food/design-system
106
+ ```
107
+
108
+ ```tsx
109
+ import { Button } from '@fast-food/design-system';
110
+
111
+ export function App() {
112
+ return <Button variant="primary">Botão do Design System</Button>;
113
+ }
114
+ ```
115
+
116
+ ## 🎨 Sistema de Design
117
+
118
+ ### **Tokens Disponíveis**
119
+
120
+ - **Cores**: Sistema completo com suporte a temas light/dark
121
+ - **Espaçamento**: Tokens padronizados (4px, 8px, 16px, etc.)
122
+ - **Tipografia**: Fontes, tamanhos, pesos e line-heights
123
+ - **Scrollbars**: Customização consistente
124
+
125
+ ### **Temas**
126
+
127
+ Suporte nativo a temas light e dark via CSS custom properties:
128
+
129
+ ```css
130
+ /* Tema Light (padrão) */
131
+ :root {
132
+ --primary: #007bff;
133
+ --background: #ffffff;
134
+ --text: #000000;
135
+ }
136
+
137
+ /* Tema Dark */
138
+ .dark {
139
+ --primary: #4dabf7;
140
+ --background: #1a1a1a;
141
+ --text: #ffffff;
142
+ }
143
+ ```
144
+
145
+ ## 🔧 Scripts Disponíveis
146
+
147
+ ```bash
148
+ # Desenvolvimento
149
+ npm run start # Storybook
150
+ npm run dev # Vite dev server
151
+
152
+ # Testes
153
+ npm run test # Executar testes
154
+ npm run test:watch # Modo watch
155
+ npm run test:coverage # Com cobertura
156
+
157
+ # Build
158
+ npm run build # Build da biblioteca
159
+ npm run build-storybook # Build do Storybook
160
+
161
+ # Qualidade
162
+ npm run lint # ESLint
163
+ npm run type-check # TypeScript check
164
+
165
+ # Versionamento
166
+ npm run sync-version # Sincronizar versão local
167
+ npm run commit # Commit padronizado
168
+
169
+ # Release
170
+ npm run test:release # Testar release localmente
171
+ ```
172
+
173
+ ## 📊 Status do Projeto
174
+
175
+ ### **Cobertura de Testes**
176
+
177
+ - **Componentes**: 100% (Button, Label, Title, InputWithLabel, SimpleForm)
178
+ - **Helpers**: 100% (mergeClassNames)
179
+ - **Geral**: 30.91%
180
+
181
+ ### **Qualidade**
182
+
183
+ - ✅ Linting configurado
184
+ - ✅ Type checking
185
+ - ✅ Testes automatizados
186
+ - ✅ CI/CD pipeline
187
+ - ✅ Documentação completa
188
+ - ✅ Storybook funcional
189
+
190
+ ### **Releases**
191
+
192
+ - **Versão atual**: 1.5.0
193
+ - **Última atualização**: Ver [Changelog](./docs/CHANGELOG.md)
194
+
195
+ ## 🔗 Links Úteis
196
+
197
+ - **NPM Package**: https://www.npmjs.com/package/@fast-food/design-system
198
+ - **GitHub Repository**: https://github.com/fast-food-design-system/fast-food-design-system
199
+ - **CI/CD**: https://github.com/fast-food-design-system/fast-food-design-system/actions
200
+ - **Releases**: https://github.com/fast-food-design-system/fast-food-design-system/releases
201
+
202
+ ---
203
+
204
+ ## 📚 Documentação
205
+
206
+ Para mais detalhes sobre o projeto, consulte nossa documentação completa:
207
+
208
+ 📖 **[Índice da Documentação](docs/README.md)** - Navegação completa e organizada
209
+
210
+ ### Documentação Específica
211
+
212
+ - **📋 Guia de Contribuição**: [`docs/CONTRIBUTING.md`](docs/CONTRIBUTING.md)
213
+ - **🧪 Estratégia de Testes**: [`docs/TESTING.md`](docs/TESTING.md)
214
+ - **🏗️ Arquitetura e Padrões**: [`docs/ARQUITETURA.md`](docs/ARQUITETURA.md)
215
+ - **🚀 Processo de Release**: [`docs/RELEASE.md`](docs/RELEASE.md)
216
+ - **📝 Histórico de Mudanças**: [`docs/CHANGELOG.md`](docs/CHANGELOG.md)
217
+
218
+ # Teste de nova versão
package/package.json ADDED
@@ -0,0 +1,93 @@
1
+ {
2
+ "name": "@fast-food/design-system",
3
+ "version": "1.8.0",
4
+ "private": false,
5
+ "publishConfig": {
6
+ "access": "public"
7
+ },
8
+ "main": "dist/index.js",
9
+ "types": "dist/index.d.ts",
10
+ "files": [
11
+ "dist"
12
+ ],
13
+ "type": "module",
14
+ "scripts": {
15
+ "start": "storybook dev -p 6006",
16
+ "build": "tsc -b && vite build",
17
+ "build-storybook": "storybook build",
18
+ "publish": "npm run build && npm publish --access public",
19
+ "test": "vitest run",
20
+ "test:watch": "vitest",
21
+ "test:ui": "vitest --ui",
22
+ "test:coverage": "vitest run --coverage",
23
+ "test:coverage:ui": "vitest --ui --coverage",
24
+ "lint": "eslint . --ext .ts,.tsx,.js,.jsx",
25
+ "type-check": "tsc --noEmit",
26
+ "preview": "vite preview",
27
+ "commit": "cz",
28
+ "semantic-release": "semantic-release",
29
+ "test:release": "./scripts/test-release.sh",
30
+ "sync-version": "./scripts/sync-version.sh",
31
+ "echo-name": "node -p \"require('./package.json').name\"",
32
+ "echo-version": "node -p \"require('./package.json').version\"",
33
+ "echo-files": "node -p \"require('./package.json').files.join(', ')\""
34
+ },
35
+ "dependencies": {
36
+ "class-variance-authority": "^0.7.1",
37
+ "clsx": "^2.1.1",
38
+ "lucide-react": "^0.525.0",
39
+ "react": "^19.1.0",
40
+ "react-dom": "^19.1.0",
41
+ "tailwind-merge": "^3.3.0"
42
+ },
43
+ "devDependencies": {
44
+ "@chromatic-com/storybook": "^4.0.1",
45
+ "@commitlint/cli": "^19.8.1",
46
+ "@commitlint/config-conventional": "^19.8.1",
47
+ "@eslint/js": "^9.25.0",
48
+ "@semantic-release/changelog": "^6.0.3",
49
+ "@semantic-release/commit-analyzer": "^13.0.1",
50
+ "@semantic-release/git": "^10.0.1",
51
+ "@semantic-release/npm": "^12.0.1",
52
+ "@semantic-release/release-notes-generator": "^14.0.3",
53
+ "@storybook/addon-a11y": "^9.0.16",
54
+ "@storybook/addon-docs": "^9.0.16",
55
+ "@storybook/addon-onboarding": "^9.0.16",
56
+ "@storybook/addon-vitest": "^9.0.16",
57
+ "@storybook/react-vite": "^9.0.16",
58
+ "@testing-library/jest-dom": "^6.6.3",
59
+ "@testing-library/react": "^16.3.0",
60
+ "@types/jest": "^29.5.14",
61
+ "@types/react": "^19.1.2",
62
+ "@types/react-dom": "^19.1.2",
63
+ "@vitejs/plugin-react": "^4.4.1",
64
+ "@vitest/browser": "^3.1.4",
65
+ "@vitest/coverage-v8": "^3.1.4",
66
+ "autoprefixer": "^10.4.21",
67
+ "commitizen": "^4.3.1",
68
+ "cz-conventional-changelog": "^3.3.0",
69
+ "eslint": "^9.25.0",
70
+ "eslint-plugin-react-hooks": "^5.2.0",
71
+ "eslint-plugin-react-refresh": "^0.4.19",
72
+ "eslint-plugin-storybook": "^9.0.16",
73
+ "globals": "^16.0.0",
74
+ "husky": "^8.0.3",
75
+ "jest": "^29.7.0",
76
+ "jest-environment-jsdom": "^30.0.0-beta.3",
77
+ "playwright": "^1.52.0",
78
+ "postcss": "^8.5.4",
79
+ "semantic-release": "^24.2.5",
80
+ "storybook": "^9.0.16",
81
+ "tailwindcss": "^3.4.3",
82
+ "ts-jest": "^29.3.4",
83
+ "typescript": "~5.8.3",
84
+ "typescript-eslint": "^8.30.1",
85
+ "vite": "^6.3.5",
86
+ "vitest": "^3.1.4"
87
+ },
88
+ "config": {
89
+ "commitizen": {
90
+ "path": "./node_modules/cz-conventional-changelog"
91
+ }
92
+ }
93
+ }