@polymorphism-tech/morph-spec 1.0.4 → 2.1.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/CLAUDE.md +1381 -0
- package/LICENSE +72 -0
- package/README.md +89 -6
- package/bin/detect-agents.js +225 -0
- package/bin/morph-spec.js +120 -0
- package/bin/render-template.js +302 -0
- package/bin/semantic-detect-agents.js +246 -0
- package/bin/validate-agents-skills.js +239 -0
- package/bin/validate-agents.js +69 -0
- package/bin/validate-phase.js +263 -0
- package/content/.azure/README.md +293 -0
- package/content/.azure/docs/azure-devops-setup.md +454 -0
- package/content/.azure/docs/branch-strategy.md +398 -0
- package/content/.azure/docs/local-development.md +515 -0
- package/content/.azure/pipelines/pipeline-variables.yml +34 -0
- package/content/.azure/pipelines/prod-pipeline.yml +319 -0
- package/content/.azure/pipelines/staging-pipeline.yml +234 -0
- package/content/.azure/pipelines/templates/build-dotnet.yml +75 -0
- package/content/.azure/pipelines/templates/deploy-app-service.yml +94 -0
- package/content/.azure/pipelines/templates/deploy-container-app.yml +120 -0
- package/content/.azure/pipelines/templates/infra-deploy.yml +90 -0
- package/content/.claude/commands/morph-apply.md +118 -26
- package/content/.claude/commands/morph-archive.md +9 -9
- package/content/.claude/commands/morph-clarify.md +184 -0
- package/content/.claude/commands/morph-design.md +275 -0
- package/content/.claude/commands/morph-proposal.md +56 -15
- package/content/.claude/commands/morph-setup.md +100 -0
- package/content/.claude/commands/morph-status.md +47 -32
- package/content/.claude/commands/morph-tasks.md +319 -0
- package/content/.claude/commands/morph-uiux.md +211 -0
- package/content/.claude/skills/specialists/ai-system-architect.md +604 -0
- package/content/.claude/skills/specialists/ms-agent-expert.md +143 -89
- package/content/.claude/skills/specialists/ui-ux-designer.md +744 -9
- package/content/.claude/skills/stacks/dotnet-blazor.md +244 -8
- package/content/.claude/skills/stacks/dotnet-nextjs.md +2 -2
- package/content/.morph/.morphversion +5 -0
- package/content/.morph/config/agents.json +101 -8
- package/content/.morph/config/azure-pricing.json +70 -0
- package/content/.morph/config/azure-pricing.schema.json +50 -0
- package/content/.morph/config/config.template.json +15 -3
- package/content/.morph/docs/STORY-DRIVEN-DEVELOPMENT.md +392 -0
- package/content/.morph/hooks/README.md +239 -0
- package/content/.morph/hooks/pre-commit-agents.sh +24 -0
- package/content/.morph/hooks/pre-commit-all.sh +48 -0
- package/content/.morph/hooks/pre-commit-costs.sh +91 -0
- package/content/.morph/hooks/pre-commit-specs.sh +49 -0
- package/content/.morph/hooks/pre-commit-tests.sh +60 -0
- package/content/.morph/project.md +5 -4
- package/content/.morph/schemas/agent.schema.json +296 -0
- package/content/.morph/standards/agent-framework-setup.md +453 -0
- package/content/.morph/standards/architecture.md +142 -7
- package/content/.morph/standards/azure.md +218 -23
- package/content/.morph/standards/coding.md +47 -12
- package/content/.morph/standards/dotnet10-migration.md +494 -0
- package/content/.morph/standards/fluent-ui-setup.md +590 -0
- package/content/.morph/standards/migration-guide.md +514 -0
- package/content/.morph/standards/passkeys-auth.md +423 -0
- package/content/.morph/standards/vector-search-rag.md +536 -0
- package/content/.morph/state.json +18 -0
- package/content/.morph/templates/FluentDesignTheme.cs +149 -0
- package/content/.morph/templates/MudTheme.cs +281 -0
- package/content/.morph/templates/contracts.cs +55 -55
- package/content/.morph/templates/decisions.md +4 -4
- package/content/.morph/templates/design-system.css +226 -0
- package/content/.morph/templates/infra/.dockerignore.example +89 -0
- package/content/.morph/templates/infra/Dockerfile.example +82 -0
- package/content/.morph/templates/infra/README.md +286 -0
- package/content/.morph/templates/infra/app-service.bicep +164 -0
- package/content/.morph/templates/infra/deploy.ps1 +229 -0
- package/content/.morph/templates/infra/deploy.sh +208 -0
- package/content/.morph/templates/infra/main.bicep +41 -7
- package/content/.morph/templates/infra/parameters.dev.json +6 -0
- package/content/.morph/templates/infra/parameters.prod.json +6 -0
- package/content/.morph/templates/infra/parameters.staging.json +29 -0
- package/content/.morph/templates/proposal.md +3 -3
- package/content/.morph/templates/recap.md +3 -3
- package/content/.morph/templates/spec.md +9 -8
- package/content/.morph/templates/sprint-status.yaml +68 -0
- package/content/.morph/templates/state.template.json +222 -0
- package/content/.morph/templates/story.md +143 -0
- package/content/.morph/templates/tasks.md +1 -1
- package/content/.morph/templates/ui-components.md +276 -0
- package/content/.morph/templates/ui-design-system.md +286 -0
- package/content/.morph/templates/ui-flows.md +336 -0
- package/content/.morph/templates/ui-mockups.md +133 -0
- package/content/.morph/test-infra/example.bicep +59 -0
- package/content/CLAUDE.md +124 -0
- package/content/README.md +79 -0
- package/detectors/config-detector.js +223 -0
- package/detectors/conversation-analyzer.js +163 -0
- package/detectors/index.js +84 -0
- package/detectors/standards-generator.js +275 -0
- package/detectors/structure-detector.js +221 -0
- package/docs/README.md +149 -0
- package/docs/api/cost-calculator.js.html +513 -0
- package/docs/api/design-system-generator.js.html +382 -0
- package/docs/api/fonts/Montserrat/Montserrat-Bold.eot +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Bold.woff +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Regular.eot +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Regular.woff +0 -0
- package/docs/api/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
- package/docs/api/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
- package/docs/api/global.html +5263 -0
- package/docs/api/index.html +96 -0
- package/docs/api/scripts/collapse.js +39 -0
- package/docs/api/scripts/commonNav.js +28 -0
- package/docs/api/scripts/linenumber.js +25 -0
- package/docs/api/scripts/nav.js +12 -0
- package/docs/api/scripts/polyfill.js +4 -0
- package/docs/api/scripts/prettify/Apache-License-2.0.txt +202 -0
- package/docs/api/scripts/prettify/lang-css.js +2 -0
- package/docs/api/scripts/prettify/prettify.js +28 -0
- package/docs/api/scripts/search.js +99 -0
- package/docs/api/state-manager.js.html +423 -0
- package/docs/api/styles/jsdoc.css +776 -0
- package/docs/api/styles/prettify.css +80 -0
- package/docs/examples.md +328 -0
- package/docs/getting-started.md +302 -0
- package/docs/installation.md +361 -0
- package/docs/templates.md +418 -0
- package/docs/validation-checklist.md +266 -0
- package/package.json +39 -12
- package/src/commands/cost.js +181 -0
- package/src/commands/create-story.js +283 -0
- package/src/commands/detect.js +104 -0
- package/src/commands/doctor.js +67 -0
- package/src/commands/generate.js +149 -0
- package/src/commands/init.js +69 -45
- package/src/commands/shard-spec.js +224 -0
- package/src/commands/sprint-status.js +250 -0
- package/src/commands/state.js +333 -0
- package/src/commands/sync.js +167 -0
- package/src/commands/update-pricing.js +206 -0
- package/src/commands/update.js +88 -13
- package/src/lib/complexity-analyzer.js +292 -0
- package/src/lib/cost-calculator.js +429 -0
- package/src/lib/design-system-generator.js +298 -0
- package/src/lib/state-manager.js +340 -0
- package/src/utils/file-copier.js +59 -0
- package/src/utils/version-checker.js +175 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
# UI Components - {{FEATURE_NAME_TITLE}}
|
|
2
|
+
|
|
3
|
+
> Especificação dos componentes Fluent UI / MudBlazor utilizados nesta feature.
|
|
4
|
+
> Mapeia cada elemento visual para um componente concreto da biblioteca escolhida.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Decisão de Biblioteca UI
|
|
9
|
+
|
|
10
|
+
### Biblioteca Escolhida: {Fluent UI Blazor | MudBlazor | Híbrida}
|
|
11
|
+
|
|
12
|
+
**Justificativa:**
|
|
13
|
+
{Por que esta biblioteca foi escolhida para ESTA feature específica?}
|
|
14
|
+
|
|
15
|
+
**Critérios de decisão:**
|
|
16
|
+
- ✅ **{Critério 1}**: {Explicação}
|
|
17
|
+
- ✅ **{Critério 2}**: {Explicação}
|
|
18
|
+
- ⚠️ **{Trade-off}**: {O que foi sacrificado e por quê}
|
|
19
|
+
|
|
20
|
+
**Referência ADR**: Ver `decisions.md` - ADR-{número}: {Título da decisão}
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Componentes Mapeados
|
|
25
|
+
|
|
26
|
+
### {Nome do Elemento Visual}
|
|
27
|
+
|
|
28
|
+
**Biblioteca**: {Fluent UI | MudBlazor}
|
|
29
|
+
**Componente**: `{ComponentName}`
|
|
30
|
+
|
|
31
|
+
#### Props Principais
|
|
32
|
+
```csharp
|
|
33
|
+
<{ComponentName}
|
|
34
|
+
Prop1="{valor ou @binding}"
|
|
35
|
+
Prop2="{valor ou @binding}"
|
|
36
|
+
Prop3="{valor ou @binding}"
|
|
37
|
+
OnClick="@{Handler}" />
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
#### Propriedades Detalhadas
|
|
41
|
+
| Prop | Tipo | Valor | Descrição |
|
|
42
|
+
|------|------|-------|-----------|
|
|
43
|
+
| `Prop1` | `string` | `"{valor}"` | {Para que serve} |
|
|
44
|
+
| `Prop2` | `bool` | `true` | {Para que serve} |
|
|
45
|
+
| `Prop3` | `EventCallback` | `@Handler` | {Quando dispara} |
|
|
46
|
+
|
|
47
|
+
#### Estados
|
|
48
|
+
|
|
49
|
+
**1. Default (Estado Inicial)**
|
|
50
|
+
```razor
|
|
51
|
+
<{ComponentName}
|
|
52
|
+
Appearance="Appearance.Neutral"
|
|
53
|
+
Disabled="false">
|
|
54
|
+
{Conteúdo padrão}
|
|
55
|
+
</{ComponentName}>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**2. Loading**
|
|
59
|
+
```razor
|
|
60
|
+
@if (_isLoading)
|
|
61
|
+
{
|
|
62
|
+
<FluentSkeleton Width="100%" Height="40px" />
|
|
63
|
+
<!-- OU -->
|
|
64
|
+
<FluentProgress />
|
|
65
|
+
}
|
|
66
|
+
else
|
|
67
|
+
{
|
|
68
|
+
<{ComponentName} ... />
|
|
69
|
+
}
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
**3. Error**
|
|
73
|
+
```razor
|
|
74
|
+
@if (!string.IsNullOrEmpty(_error))
|
|
75
|
+
{
|
|
76
|
+
<FluentMessageBar Intent="MessageIntent.Error">
|
|
77
|
+
@_error
|
|
78
|
+
</FluentMessageBar>
|
|
79
|
+
}
|
|
80
|
+
<{ComponentName} ... />
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
**4. Empty (Sem Dados)**
|
|
84
|
+
```razor
|
|
85
|
+
@if (!_items.Any())
|
|
86
|
+
{
|
|
87
|
+
<FluentStack Orientation="Orientation.Vertical" HorizontalAlignment="HorizontalAlignment.Center">
|
|
88
|
+
<FluentLabel>Nenhum item encontrado</FluentLabel>
|
|
89
|
+
<FluentButton Appearance="Appearance.Accent" OnClick="@Create">
|
|
90
|
+
Criar Novo
|
|
91
|
+
</FluentButton>
|
|
92
|
+
</FluentStack>
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
**5. Success (Feedback Positivo)**
|
|
97
|
+
```razor
|
|
98
|
+
<FluentToast Intent="ToastIntent.Success" Timeout="3000">
|
|
99
|
+
Operação realizada com sucesso!
|
|
100
|
+
</FluentToast>
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### Eventos
|
|
104
|
+
|
|
105
|
+
| Evento | Handler | Ação |
|
|
106
|
+
|--------|---------|------|
|
|
107
|
+
| `OnClick` | `HandleClick` | {O que acontece ao clicar} |
|
|
108
|
+
| `OnChange` | `HandleChange` | {O que acontece ao mudar valor} |
|
|
109
|
+
| `OnSubmit` | `HandleSubmit` | {O que acontece ao submeter} |
|
|
110
|
+
|
|
111
|
+
#### Exemplo de Código Completo
|
|
112
|
+
|
|
113
|
+
```razor
|
|
114
|
+
<!-- {Nome do Componente}.razor -->
|
|
115
|
+
<{ComponentName}
|
|
116
|
+
Items="@_items"
|
|
117
|
+
Loading="@_isLoading"
|
|
118
|
+
OnClick="@HandleClick">
|
|
119
|
+
|
|
120
|
+
@if (_isLoading)
|
|
121
|
+
{
|
|
122
|
+
<FluentProgress />
|
|
123
|
+
}
|
|
124
|
+
else
|
|
125
|
+
{
|
|
126
|
+
@foreach (var item in _items)
|
|
127
|
+
{
|
|
128
|
+
<{ChildComponent} Data="@item" />
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
</{ComponentName}>
|
|
132
|
+
|
|
133
|
+
@code {
|
|
134
|
+
[Parameter] public List<ItemType> Items { get; set; } = new();
|
|
135
|
+
|
|
136
|
+
private bool _isLoading;
|
|
137
|
+
private string? _error;
|
|
138
|
+
|
|
139
|
+
protected override async Task OnInitializedAsync()
|
|
140
|
+
{
|
|
141
|
+
await LoadDataAsync();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
private async Task LoadDataAsync()
|
|
145
|
+
{
|
|
146
|
+
_isLoading = true;
|
|
147
|
+
try
|
|
148
|
+
{
|
|
149
|
+
_items = await _service.GetItemsAsync();
|
|
150
|
+
}
|
|
151
|
+
catch (Exception ex)
|
|
152
|
+
{
|
|
153
|
+
_error = ex.Message;
|
|
154
|
+
}
|
|
155
|
+
finally
|
|
156
|
+
{
|
|
157
|
+
_isLoading = false;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
private async Task HandleClick(ItemType item)
|
|
162
|
+
{
|
|
163
|
+
// Ação ao clicar
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
#### Acessibilidade
|
|
169
|
+
|
|
170
|
+
**ARIA Attributes:**
|
|
171
|
+
- `role="{role}"`: {Propósito}
|
|
172
|
+
- `aria-label="{label}"`: {Descrição para screen readers}
|
|
173
|
+
- `aria-describedby="{id}"`: {Descrição adicional}
|
|
174
|
+
|
|
175
|
+
**Keyboard Navigation:**
|
|
176
|
+
- `Tab`: {Foca no elemento}
|
|
177
|
+
- `Enter/Space`: {Ativa o elemento}
|
|
178
|
+
- `Escape`: {Cancela/fecha}
|
|
179
|
+
- `Arrow Keys`: {Navega entre opções}
|
|
180
|
+
|
|
181
|
+
**Focus Management:**
|
|
182
|
+
- **Foco inicial**: {Onde o foco deve ir quando o componente aparece}
|
|
183
|
+
- **Focus trap**: {Se aplicável, como manter o foco dentro do componente (modals)}
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## {Próximo Componente}
|
|
188
|
+
|
|
189
|
+
{Repita a estrutura acima para cada componente}
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Componentes Customizados
|
|
194
|
+
|
|
195
|
+
### {Nome do Componente Custom}
|
|
196
|
+
|
|
197
|
+
Se você precisar criar um componente que NÃO existe em Fluent UI ou MudBlazor:
|
|
198
|
+
|
|
199
|
+
**Composição:**
|
|
200
|
+
```razor
|
|
201
|
+
<!-- Components/{ComponentName}.razor -->
|
|
202
|
+
<div class="custom-component">
|
|
203
|
+
<FluentCard>
|
|
204
|
+
<FluentStack Orientation="Orientation.Vertical">
|
|
205
|
+
<!-- Composição de componentes existentes -->
|
|
206
|
+
</FluentStack>
|
|
207
|
+
</FluentCard>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
@code {
|
|
211
|
+
// Lógica do componente
|
|
212
|
+
}
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
**Quando usar:**
|
|
216
|
+
- {Situação 1 que justifica componente custom}
|
|
217
|
+
- {Situação 2}
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## Packages Necessários
|
|
222
|
+
|
|
223
|
+
### Fluent UI Blazor
|
|
224
|
+
```xml
|
|
225
|
+
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" Version="4.0.0" />
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
```csharp
|
|
229
|
+
// Program.cs
|
|
230
|
+
builder.Services.AddFluentUIComponents();
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
```razor
|
|
234
|
+
// _Imports.razor
|
|
235
|
+
@using Microsoft.FluentUI.AspNetCore.Components
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### MudBlazor (se híbrido)
|
|
239
|
+
```xml
|
|
240
|
+
<PackageReference Include="MudBlazor" Version="6.11.0" />
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
```csharp
|
|
244
|
+
// Program.cs
|
|
245
|
+
builder.Services.AddMudServices();
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
```razor
|
|
249
|
+
// _Imports.razor
|
|
250
|
+
@using MudBlazor
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
## Mapa de Componentes
|
|
256
|
+
|
|
257
|
+
Resumo visual de quais componentes são usados onde:
|
|
258
|
+
|
|
259
|
+
| Tela/Feature | Componente | Biblioteca | Complexidade |
|
|
260
|
+
|--------------|------------|------------|--------------|
|
|
261
|
+
| {Tela 1} | FluentDataGrid | Fluent UI | Média |
|
|
262
|
+
| {Tela 1} | FluentCard | Fluent UI | Baixa |
|
|
263
|
+
| {Tela 2} | MudChart | MudBlazor | Alta |
|
|
264
|
+
| {Tela 2} | FluentDialog | Fluent UI | Média |
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## Referências
|
|
269
|
+
|
|
270
|
+
- [Fluent UI Components](https://www.fluentui-blazor.net/Components)
|
|
271
|
+
- [MudBlazor Components](https://mudblazor.com/components/list)
|
|
272
|
+
- [Guia Fluent UI Setup](../.morph/standards/fluent-ui-setup.md)
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
*Template MORPH-SPEC v2.1.0 by Polymorphism Tech*
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# UI Design System - {Project Name}
|
|
2
|
+
|
|
3
|
+
> Design system do projeto: cores, tipografia, espaçamento e padrões visuais.
|
|
4
|
+
> Este arquivo é a fonte da verdade para todos os aspectos visuais do projeto.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 🎨 Paleta de Cores
|
|
9
|
+
|
|
10
|
+
### Cores Principais
|
|
11
|
+
|
|
12
|
+
| Uso | Cor | Hex | RGB | Preview |
|
|
13
|
+
|-----|-----|-----|-----|---------|
|
|
14
|
+
| **Primária** | {Nome da cor} | `#{hex}` | `rgb({r}, {g}, {b})` | ███ |
|
|
15
|
+
| **Secundária** | {Nome da cor} | `#{hex}` | `rgb({r}, {g}, {b})` | ███ |
|
|
16
|
+
|
|
17
|
+
**Exemplo:**
|
|
18
|
+
| Uso | Cor | Hex | RGB | Preview |
|
|
19
|
+
|-----|-----|-----|-----|---------|
|
|
20
|
+
| **Primária** | Blue | `#3b82f6` | `rgb(59, 130, 246)` | 🔵 |
|
|
21
|
+
| **Secundária** | Gray | `#6b7280` | `rgb(107, 114, 128)` | ⚫ |
|
|
22
|
+
|
|
23
|
+
### Cores de Estado
|
|
24
|
+
|
|
25
|
+
| Estado | Cor | Hex | RGB | Uso |
|
|
26
|
+
|--------|-----|-----|-----|-----|
|
|
27
|
+
| **Sucesso** | {Cor} | `#{hex}` | `rgb({r}, {g}, {b})` | Confirmações, operações bem-sucedidas |
|
|
28
|
+
| **Erro** | {Cor} | `#{hex}` | `rgb({r}, {g}, {b})` | Erros, validações falhas |
|
|
29
|
+
| **Warning** | {Cor} | `#{hex}` | `rgb({r}, {g}, {b})` | Avisos, atenção necessária |
|
|
30
|
+
| **Info** | {Cor} | `#{hex}` | `rgb({r}, {g}, {b})` | Informações, dicas |
|
|
31
|
+
|
|
32
|
+
**Exemplo (Tailwind):**
|
|
33
|
+
| Estado | Cor | Hex | RGB | Uso |
|
|
34
|
+
|--------|-----|-----|-----|-----|
|
|
35
|
+
| **Sucesso** | Green | `#10b981` | `rgb(16, 185, 129)` | Confirmações |
|
|
36
|
+
| **Erro** | Red | `#ef4444` | `rgb(239, 68, 68)` | Erros |
|
|
37
|
+
| **Warning** | Amber | `#f59e0b` | `rgb(245, 158, 11)` | Avisos |
|
|
38
|
+
| **Info** | Cyan | `#06b6d4` | `rgb(6, 182, 212)` | Informações |
|
|
39
|
+
|
|
40
|
+
### Escala de Neutros (Cinzas)
|
|
41
|
+
|
|
42
|
+
| Shade | Hex | RGB | Uso |
|
|
43
|
+
|-------|-----|-----|-----|
|
|
44
|
+
| **50** | `#{hex}` | `rgb({r}, {g}, {b})` | Fundos muito claros |
|
|
45
|
+
| **100** | `#{hex}` | `rgb({r}, {g}, {b})` | Fundos claros |
|
|
46
|
+
| **200** | `#{hex}` | `rgb({r}, {g}, {b})` | Bordas suaves |
|
|
47
|
+
| **300** | `#{hex}` | `rgb({r}, {g}, {b})` | Bordas padrão |
|
|
48
|
+
| **400** | `#{hex}` | `rgb({r}, {g}, {b})` | Texto desabilitado |
|
|
49
|
+
| **500** | `#{hex}` | `rgb({r}, {g}, {b})` | Texto secundário |
|
|
50
|
+
| **600** | `#{hex}` | `rgb({r}, {g}, {b})` | Texto placeholder |
|
|
51
|
+
| **700** | `#{hex}` | `rgb({r}, {g}, {b})` | Texto principal |
|
|
52
|
+
| **800** | `#{hex}` | `rgb({r}, {g}, {b})` | Texto ênfase |
|
|
53
|
+
| **900** | `#{hex}` | `rgb({r}, {g}, {b})` | Texto super ênfase |
|
|
54
|
+
|
|
55
|
+
**Exemplo (Tailwind Gray):**
|
|
56
|
+
| Shade | Hex | RGB |
|
|
57
|
+
|-------|-----|-----|
|
|
58
|
+
| **50** | `#f9fafb` | `rgb(249, 250, 251)` |
|
|
59
|
+
| **100** | `#f3f4f6` | `rgb(243, 244, 246)` |
|
|
60
|
+
| **500** | `#6b7280` | `rgb(107, 114, 128)` |
|
|
61
|
+
| **900** | `#111827` | `rgb(17, 24, 39)` |
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 🔤 Tipografia
|
|
66
|
+
|
|
67
|
+
### Fontes
|
|
68
|
+
|
|
69
|
+
| Tipo | Font Family | Stack Completo | Uso |
|
|
70
|
+
|------|-------------|----------------|-----|
|
|
71
|
+
| **Sans-serif** | {Font} | `'{Font}', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif` | Texto principal, UI |
|
|
72
|
+
| **Serif** | {Font} | `'{Font}', Georgia, serif` | Títulos, ênfase (opcional) |
|
|
73
|
+
| **Monospace** | {Font} | `'{Font}', 'Courier New', monospace` | Código, dados técnicos |
|
|
74
|
+
|
|
75
|
+
**Exemplo:**
|
|
76
|
+
| Tipo | Font Family | Stack | Uso |
|
|
77
|
+
|------|-------------|-------|-----|
|
|
78
|
+
| **Sans-serif** | Inter | `'Inter', -apple-system, sans-serif` | Texto principal |
|
|
79
|
+
| **Monospace** | Fira Code | `'Fira Code', 'Courier New', monospace` | Código |
|
|
80
|
+
|
|
81
|
+
### Escala de Tamanhos
|
|
82
|
+
|
|
83
|
+
| Size | Valor | Line Height | Uso |
|
|
84
|
+
|------|-------|-------------|-----|
|
|
85
|
+
| **xs** | `{size}` | `{height}` | Texto muito pequeno, labels |
|
|
86
|
+
| **sm** | `{size}` | `{height}` | Texto pequeno, captions |
|
|
87
|
+
| **base** | `{size}` | `{height}` | Texto padrão, body |
|
|
88
|
+
| **lg** | `{size}` | `{height}` | Texto grande, leads |
|
|
89
|
+
| **xl** | `{size}` | `{height}` | Títulos H4 |
|
|
90
|
+
| **2xl** | `{size}` | `{height}` | Títulos H3 |
|
|
91
|
+
| **3xl** | `{size}` | `{height}` | Títulos H2 |
|
|
92
|
+
| **4xl** | `{size}` | `{height}` | Títulos H1 |
|
|
93
|
+
| **5xl** | `{size}` | `{height}` | Display text |
|
|
94
|
+
|
|
95
|
+
**Exemplo (Tailwind):**
|
|
96
|
+
| Size | Valor | Line Height |
|
|
97
|
+
|------|-------|-------------|
|
|
98
|
+
| **xs** | `0.75rem` (12px) | `1rem` (16px) |
|
|
99
|
+
| **sm** | `0.875rem` (14px) | `1.25rem` (20px) |
|
|
100
|
+
| **base** | `1rem` (16px) | `1.5rem` (24px) |
|
|
101
|
+
| **lg** | `1.125rem` (18px) | `1.75rem` (28px) |
|
|
102
|
+
| **xl** | `1.25rem` (20px) | `1.75rem` (28px) |
|
|
103
|
+
| **4xl** | `2.25rem` (36px) | `2.5rem` (40px) |
|
|
104
|
+
|
|
105
|
+
### Pesos (Font Weight)
|
|
106
|
+
|
|
107
|
+
| Weight | Valor | Uso |
|
|
108
|
+
|--------|-------|-----|
|
|
109
|
+
| **Light** | `300` | Texto decorativo, opcional |
|
|
110
|
+
| **Regular** | `400` | Texto padrão |
|
|
111
|
+
| **Medium** | `500` | Texto com ênfase leve |
|
|
112
|
+
| **Semibold** | `600` | Botões, labels importantes |
|
|
113
|
+
| **Bold** | `700` | Títulos, ênfase forte |
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## 📏 Espaçamento
|
|
118
|
+
|
|
119
|
+
### Sistema Base
|
|
120
|
+
|
|
121
|
+
**Unidade base:** `{value}` (ex: 4px, 8px)
|
|
122
|
+
**Escala:** Múltiplos da unidade base
|
|
123
|
+
|
|
124
|
+
| Token | Valor | Pixels | Uso |
|
|
125
|
+
|-------|-------|--------|-----|
|
|
126
|
+
| **0** | `0` | 0px | Sem espaçamento |
|
|
127
|
+
| **1** | `{base * 1}` | {px} | Espaço mínimo |
|
|
128
|
+
| **2** | `{base * 2}` | {px} | Espaço pequeno |
|
|
129
|
+
| **3** | `{base * 3}` | {px} | Espaço médio-pequeno |
|
|
130
|
+
| **4** | `{base * 4}` | {px} | Espaço médio |
|
|
131
|
+
| **5** | `{base * 5}` | {px} | Espaço médio-grande |
|
|
132
|
+
| **6** | `{base * 6}` | {px} | Espaço grande |
|
|
133
|
+
| **8** | `{base * 8}` | {px} | Espaço muito grande |
|
|
134
|
+
| **10** | `{base * 10}` | {px} | Espaço extra grande |
|
|
135
|
+
| **12** | `{base * 12}` | {px} | Espaço gigante |
|
|
136
|
+
|
|
137
|
+
**Exemplo (base 4px = 0.25rem):**
|
|
138
|
+
| Token | Valor | Pixels | Uso |
|
|
139
|
+
|-------|-------|--------|-----|
|
|
140
|
+
| **1** | `0.25rem` | 4px | Gap mínimo entre ícones |
|
|
141
|
+
| **2** | `0.5rem` | 8px | Padding interno de botões |
|
|
142
|
+
| **4** | `1rem` | 16px | Padding padrão de cards |
|
|
143
|
+
| **6** | `1.5rem` | 24px | Margin entre seções |
|
|
144
|
+
| **8** | `2rem` | 32px | Margin grande entre blocos |
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## 🔲 Border Radius
|
|
149
|
+
|
|
150
|
+
| Size | Valor | Uso |
|
|
151
|
+
|------|-------|-----|
|
|
152
|
+
| **none** | `0` | Sem arredondamento |
|
|
153
|
+
| **sm** | `{value}` | Arredondamento sutil |
|
|
154
|
+
| **md** | `{value}` | Arredondamento padrão |
|
|
155
|
+
| **lg** | `{value}` | Arredondamento pronunciado |
|
|
156
|
+
| **xl** | `{value}` | Muito arredondado |
|
|
157
|
+
| **full** | `9999px` | Circular (botões redondos, avatares) |
|
|
158
|
+
|
|
159
|
+
**Exemplo:**
|
|
160
|
+
| Size | Valor | Uso |
|
|
161
|
+
|------|-------|-----|
|
|
162
|
+
| **sm** | `0.125rem` (2px) | Inputs, tabelas |
|
|
163
|
+
| **md** | `0.375rem` (6px) | Botões, cards |
|
|
164
|
+
| **lg** | `0.5rem` (8px) | Modais, containers |
|
|
165
|
+
| **full** | `9999px` | Avatares, badges circulares |
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 🌑 Sombras (Shadows)
|
|
170
|
+
|
|
171
|
+
| Size | Valor | Uso |
|
|
172
|
+
|------|-------|-----|
|
|
173
|
+
| **sm** | `{shadow}` | Sombra sutil (hover) |
|
|
174
|
+
| **md** | `{shadow}` | Sombra padrão (cards) |
|
|
175
|
+
| **lg** | `{shadow}` | Sombra pronunciada (modals) |
|
|
176
|
+
| **xl** | `{shadow}` | Sombra forte (dropdowns) |
|
|
177
|
+
|
|
178
|
+
**Exemplo (Tailwind):**
|
|
179
|
+
| Size | Valor |
|
|
180
|
+
|------|-------|
|
|
181
|
+
| **sm** | `0 1px 2px 0 rgba(0, 0, 0, 0.05)` |
|
|
182
|
+
| **md** | `0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)` |
|
|
183
|
+
| **lg** | `0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)` |
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## 📱 Breakpoints (Responsive)
|
|
188
|
+
|
|
189
|
+
| Breakpoint | Min Width | Dispositivos |
|
|
190
|
+
|------------|-----------|--------------|
|
|
191
|
+
| **xs** | `0px` | Mobile portrait (padrão) |
|
|
192
|
+
| **sm** | `{value}` | Mobile landscape / Tablet pequeno |
|
|
193
|
+
| **md** | `{value}` | Tablet |
|
|
194
|
+
| **lg** | `{value}` | Desktop pequeno |
|
|
195
|
+
| **xl** | `{value}` | Desktop grande |
|
|
196
|
+
| **2xl** | `{value}` | Desktop muito grande |
|
|
197
|
+
|
|
198
|
+
**Exemplo (Tailwind):**
|
|
199
|
+
| Breakpoint | Min Width |
|
|
200
|
+
|------------|-----------|
|
|
201
|
+
| **sm** | `640px` |
|
|
202
|
+
| **md** | `768px` |
|
|
203
|
+
| **lg** | `1024px` |
|
|
204
|
+
| **xl** | `1280px` |
|
|
205
|
+
| **2xl** | `1536px` |
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## 🎯 Aplicação no Código
|
|
210
|
+
|
|
211
|
+
### CSS Variables (Recomendado)
|
|
212
|
+
|
|
213
|
+
Ver template: `design-system.css`
|
|
214
|
+
|
|
215
|
+
```css
|
|
216
|
+
:root {
|
|
217
|
+
/* Cores */
|
|
218
|
+
--color-primary: #{hex};
|
|
219
|
+
--color-secondary: #{hex};
|
|
220
|
+
|
|
221
|
+
/* Tipografia */
|
|
222
|
+
--font-sans: '{Font}', sans-serif;
|
|
223
|
+
--text-base: 1rem;
|
|
224
|
+
|
|
225
|
+
/* Espaçamento */
|
|
226
|
+
--space-4: 1rem;
|
|
227
|
+
}
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Fluent UI Theme (se Fluent UI)
|
|
231
|
+
|
|
232
|
+
Ver template: `FluentDesignTheme.cs`
|
|
233
|
+
|
|
234
|
+
```csharp
|
|
235
|
+
public static class FluentDesignTheme
|
|
236
|
+
{
|
|
237
|
+
public static DesignThemePalette GetPalette() => new()
|
|
238
|
+
{
|
|
239
|
+
Primary = "#{cor primária}",
|
|
240
|
+
// ...
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### MudBlazor Theme (se MudBlazor)
|
|
246
|
+
|
|
247
|
+
Ver template: `MudTheme.cs`
|
|
248
|
+
|
|
249
|
+
```csharp
|
|
250
|
+
public static MudTheme Theme => new()
|
|
251
|
+
{
|
|
252
|
+
Palette = new PaletteLight
|
|
253
|
+
{
|
|
254
|
+
Primary = "#{cor primária}",
|
|
255
|
+
// ...
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## 📋 Checklist de Consistência
|
|
263
|
+
|
|
264
|
+
- [ ] Todas as cores têm hex + rgb documentados
|
|
265
|
+
- [ ] Escala de neutros completa (50-900)
|
|
266
|
+
- [ ] Fontes têm fallback stacks completos
|
|
267
|
+
- [ ] Escala de tamanhos cobre todos os casos (xs até 5xl)
|
|
268
|
+
- [ ] Espaçamento usa múltiplos da unidade base
|
|
269
|
+
- [ ] Border radius tem tamanhos sm, md, lg, full
|
|
270
|
+
- [ ] Sombras têm variações de intensidade
|
|
271
|
+
- [ ] Breakpoints cobrem mobile até desktop grande
|
|
272
|
+
- [ ] Design system será implementado na FASE 5 (arquivos CSS/C#)
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
## 🔗 Referências
|
|
277
|
+
|
|
278
|
+
- [Fluent Design System](https://fluent2.microsoft.design/)
|
|
279
|
+
- [Material Design](https://m3.material.io/)
|
|
280
|
+
- [Tailwind CSS Palette](https://tailwindcss.com/docs/customizing-colors)
|
|
281
|
+
- [Type Scale](https://type-scale.com/)
|
|
282
|
+
- [Modular Scale](https://www.modularscale.com/)
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
*Template MORPH-SPEC v2.1.1 by Polymorphism Tech*
|