@damenor/agent-docs 0.1.2 → 0.4.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/README.md +65 -29
- package/dist/index.js +3834 -217
- package/package.json +5 -2
- package/templates/modules/agents/.agents/agents/doc-designer.md +39 -37
- package/templates/modules/agents/.agents/agents/doc-maintainer.md +35 -35
- package/templates/modules/agents/.agents/agents/doc-reviewer.md +55 -46
- package/templates/modules/agents/.agents/agents/doc-writer.md +34 -33
- package/templates/modules/agents/.agents/agents/reviewer.md +114 -100
- package/templates/modules/agents/.agents/skills/doc-design/SKILL.md +176 -174
- package/templates/modules/agents/.agents/skills/doc-design/references/design-system-format.md +241 -247
- package/templates/modules/agents/.agents/skills/doc-maintain/SKILL.md +61 -51
- package/templates/modules/agents/.agents/skills/doc-maintain/references/triggers.md +171 -165
- package/templates/modules/agents/.agents/skills/doc-review/SKILL.md +39 -34
- package/templates/modules/agents/.agents/skills/doc-review/references/health-checklist.md +115 -112
- package/templates/modules/agents/.agents/skills/doc-scaffold/SKILL.md +19 -12
- package/templates/modules/agents/.agents/skills/doc-scaffold/references/diataxis-quick-ref.md +110 -110
- package/templates/modules/agents/.agents/skills/doc-write/SKILL.md +44 -16
- package/templates/modules/agents/.agents/skills/doc-write/references/adr-format.md +99 -93
- package/templates/modules/agents/.agents/skills/doc-write/references/diataxis-patterns.md +221 -200
- package/templates/base/AGENTS.md +0 -177
- package/templates/base/CHANGELOG.md +0 -86
- package/templates/base/README.md +0 -105
- package/templates/base/docs/CONTEXT.md +0 -111
- package/templates/base/docs/README.md +0 -131
- package/templates/base/docs/adr/TEMPLATE.md +0 -83
- package/templates/modules/design/docs/DESIGN.md +0 -253
- package/templates/modules/explanation/docs/explanation/agent-flow.md +0 -15
- package/templates/modules/explanation/docs/explanation/architecture.md +0 -138
- package/templates/modules/guides/docs/guides/deployment.md +0 -189
- package/templates/modules/guides/docs/guides/runbooks/TEMPLATE.md +0 -86
- package/templates/modules/guides/docs/guides/troubleshooting.md +0 -65
- package/templates/modules/operations/docs/operations/README.md +0 -115
- package/templates/modules/product/docs/product/overview.md +0 -90
- package/templates/modules/product/docs/roadmap.md +0 -80
- package/templates/modules/reference/docs/reference/api.md +0 -131
- package/templates/modules/reference/docs/reference/code-style.md +0 -275
- package/templates/modules/reference/docs/reference/configuration.md +0 -117
- package/templates/modules/reference/docs/reference/infrastructure.md +0 -191
- package/templates/modules/tutorials/docs/tutorials/environment-setup.md +0 -212
- package/templates/modules/tutorials/docs/tutorials/first-task.md +0 -246
- package/templates/modules/tutorials/docs/tutorials/quick-start.md +0 -146
package/templates/modules/agents/.agents/skills/doc-design/references/design-system-format.md
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
---
|
|
2
|
-
created:
|
|
2
|
+
created: '2024-01-15'
|
|
3
3
|
status: active
|
|
4
4
|
type: reference
|
|
5
|
-
tags: [design-system, tokens,
|
|
5
|
+
tags: [design-system, tokens, format, yaml]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
-
# Design System Format —
|
|
8
|
+
# Design System Format — Complete Reference
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Complete YAML Schema
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### Section: colors
|
|
13
13
|
|
|
14
14
|
```yaml
|
|
15
15
|
colors:
|
|
16
16
|
brand:
|
|
17
|
-
primary:
|
|
18
|
-
secondary:
|
|
19
|
-
accent:
|
|
17
|
+
primary: '#3B82F6' # Main brand color
|
|
18
|
+
secondary: '#8B5CF6' # Secondary color
|
|
19
|
+
accent: '#EC4899' # Accent color
|
|
20
20
|
surface:
|
|
21
|
-
background:
|
|
22
|
-
card:
|
|
23
|
-
elevated:
|
|
24
|
-
overlay:
|
|
21
|
+
background: '#FFFFFF' # Main background
|
|
22
|
+
card: '#F9FAFB' # Card background
|
|
23
|
+
elevated: '#FFFFFF' # Elevated elements background
|
|
24
|
+
overlay: 'rgba(0,0,0,0.5)' # Overlay background
|
|
25
25
|
text:
|
|
26
|
-
primary:
|
|
27
|
-
secondary:
|
|
28
|
-
tertiary:
|
|
29
|
-
disabled:
|
|
30
|
-
inverse:
|
|
26
|
+
primary: '#111827' # Texto principal
|
|
27
|
+
secondary: '#6B7280' # Texto secundario
|
|
28
|
+
tertiary: '#9CA3AF' # Texto terciario
|
|
29
|
+
disabled: '#D1D5DB' # Texto deshabilitado
|
|
30
|
+
inverse: '#FFFFFF' # Texto sobre fondo oscuro
|
|
31
31
|
semantic:
|
|
32
|
-
success:
|
|
33
|
-
success-light:
|
|
34
|
-
warning:
|
|
35
|
-
warning-light:
|
|
36
|
-
error:
|
|
37
|
-
error-light:
|
|
38
|
-
info:
|
|
39
|
-
info-light:
|
|
32
|
+
success: '#10B981' # Éxito
|
|
33
|
+
success-light: '#D1FAE5' # Éxito (fondo)
|
|
34
|
+
warning: '#F59E0B' # Advertencia
|
|
35
|
+
warning-light: '#FEF3C7' # Advertencia (fondo)
|
|
36
|
+
error: '#EF4444' # Error
|
|
37
|
+
error-light: '#FEE2E2' # Error (fondo)
|
|
38
|
+
info: '#3B82F6' # Información
|
|
39
|
+
info-light: '#DBEAFE' # Información (fondo)
|
|
40
40
|
dark:
|
|
41
|
-
background:
|
|
42
|
-
card:
|
|
43
|
-
text:
|
|
41
|
+
background: '#1F2937' # Fondo en modo oscuro
|
|
42
|
+
card: '#374151' # Card en modo oscuro
|
|
43
|
+
text: '#F9FAFB' # Texto en modo oscuro
|
|
44
44
|
```
|
|
45
45
|
|
|
46
46
|
#### Ejemplo mínimo de colores
|
|
@@ -48,181 +48,168 @@ colors:
|
|
|
48
48
|
```yaml
|
|
49
49
|
colors:
|
|
50
50
|
brand:
|
|
51
|
-
primary:
|
|
52
|
-
secondary:
|
|
51
|
+
primary: '#3B82F6'
|
|
52
|
+
secondary: '#8B5CF6'
|
|
53
53
|
surface:
|
|
54
|
-
background:
|
|
55
|
-
card:
|
|
54
|
+
background: '#FFFFFF'
|
|
55
|
+
card: '#F9FAFB'
|
|
56
56
|
text:
|
|
57
|
-
primary:
|
|
58
|
-
secondary:
|
|
57
|
+
primary: '#111827'
|
|
58
|
+
secondary: '#6B7280'
|
|
59
59
|
semantic:
|
|
60
|
-
success:
|
|
61
|
-
warning:
|
|
62
|
-
error:
|
|
63
|
-
info:
|
|
60
|
+
success: '#10B981'
|
|
61
|
+
warning: '#F59E0B'
|
|
62
|
+
error: '#EF4444'
|
|
63
|
+
info: '#3B82F6'
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
---
|
|
67
67
|
|
|
68
|
-
###
|
|
68
|
+
### Section: typography
|
|
69
69
|
|
|
70
70
|
```yaml
|
|
71
71
|
typography:
|
|
72
|
-
font-family:
|
|
73
|
-
sans: "Inter, system-ui, -apple-system, sans-serif"
|
|
74
|
-
mono: "JetBrains Mono, Fira Code, monospace"
|
|
75
|
-
display: "Cal Sans, Inter, sans-serif"
|
|
76
72
|
heading-xl:
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
fontFamily: '"Inter", system-ui, sans-serif'
|
|
74
|
+
fontSize: '2rem' # 32px
|
|
75
|
+
fontWeight: '700'
|
|
76
|
+
lineHeight: '1.2'
|
|
81
77
|
heading-lg:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
heading-md:
|
|
87
|
-
font-size: "1.5rem"
|
|
88
|
-
font-weight: "600"
|
|
89
|
-
line-height: "1.3"
|
|
90
|
-
heading-sm:
|
|
91
|
-
font-size: "1.25rem"
|
|
92
|
-
font-weight: "600"
|
|
93
|
-
line-height: "1.4"
|
|
78
|
+
fontFamily: '"Inter", system-ui, sans-serif'
|
|
79
|
+
fontSize: '1.5rem' # 24px
|
|
80
|
+
fontWeight: '600'
|
|
81
|
+
lineHeight: '1.3'
|
|
94
82
|
body-lg:
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
83
|
+
fontFamily: '"Inter", system-ui, sans-serif'
|
|
84
|
+
fontSize: '1.125rem' # 18px
|
|
85
|
+
fontWeight: '400'
|
|
86
|
+
lineHeight: '1.6'
|
|
98
87
|
body-md:
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
88
|
+
fontFamily: '"Inter", system-ui, sans-serif'
|
|
89
|
+
fontSize: '1rem' # 16px
|
|
90
|
+
fontWeight: '400'
|
|
91
|
+
lineHeight: '1.6'
|
|
102
92
|
body-sm:
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
93
|
+
fontFamily: '"Inter", system-ui, sans-serif'
|
|
94
|
+
fontSize: '0.875rem' # 14px
|
|
95
|
+
fontWeight: '400'
|
|
96
|
+
lineHeight: '1.5'
|
|
106
97
|
caption:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
letter-spacing: "0.08em"
|
|
117
|
-
text-transform: "uppercase"
|
|
98
|
+
fontFamily: '"Inter", system-ui, sans-serif'
|
|
99
|
+
fontSize: '0.75rem' # 12px
|
|
100
|
+
fontWeight: '400'
|
|
101
|
+
lineHeight: '1.4'
|
|
102
|
+
code:
|
|
103
|
+
fontFamily: '"JetBrains Mono", "Fira Code", monospace'
|
|
104
|
+
fontSize: '0.875rem' # 14px
|
|
105
|
+
fontWeight: '400'
|
|
106
|
+
lineHeight: '1.5'
|
|
118
107
|
```
|
|
119
108
|
|
|
120
|
-
####
|
|
109
|
+
#### Minimal typography example
|
|
121
110
|
|
|
122
111
|
```yaml
|
|
123
112
|
typography:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
113
|
+
heading-lg:
|
|
114
|
+
fontFamily: 'Inter, sans-serif'
|
|
115
|
+
fontSize: '1.5rem'
|
|
116
|
+
fontWeight: '600'
|
|
117
|
+
body-md:
|
|
118
|
+
fontFamily: 'Inter, sans-serif'
|
|
119
|
+
fontSize: '1rem'
|
|
120
|
+
fontWeight: '400'
|
|
132
121
|
```
|
|
133
122
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
### Sección: spacing
|
|
123
|
+
### Section: spacing
|
|
137
124
|
|
|
138
125
|
```yaml
|
|
139
126
|
spacing:
|
|
140
|
-
scale: [0,
|
|
127
|
+
scale: [0, '0.125rem', '0.25rem', '0.5rem', '0.75rem', '1rem', '1.5rem', '2rem', '3rem', '4rem', '6rem', '8rem']
|
|
141
128
|
tokens:
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
129
|
+
'0': '0'
|
|
130
|
+
'0.5': '0.125rem'
|
|
131
|
+
'1': '0.25rem'
|
|
132
|
+
'1.5': '0.375rem'
|
|
133
|
+
'2': '0.5rem'
|
|
134
|
+
'3': '0.75rem'
|
|
135
|
+
'4': '1rem'
|
|
136
|
+
'5': '1.25rem'
|
|
137
|
+
'6': '1.5rem'
|
|
138
|
+
'8': '2rem'
|
|
139
|
+
'10': '2.5rem'
|
|
140
|
+
'12': '3rem'
|
|
141
|
+
'16': '4rem'
|
|
142
|
+
'20': '5rem'
|
|
143
|
+
'24': '6rem'
|
|
144
|
+
'32': '8rem'
|
|
158
145
|
```
|
|
159
146
|
|
|
160
147
|
#### Ejemplo mínimo de spacing
|
|
161
148
|
|
|
162
149
|
```yaml
|
|
163
150
|
spacing:
|
|
164
|
-
tokens: { xs:
|
|
151
|
+
tokens: { xs: '0.25rem', sm: '0.5rem', md: '1rem', lg: '1.5rem', xl: '2rem', '2xl': '3rem', '3xl': '4rem' }
|
|
165
152
|
```
|
|
166
153
|
|
|
167
154
|
---
|
|
168
155
|
|
|
169
|
-
###
|
|
156
|
+
### Section: rounded
|
|
170
157
|
|
|
171
158
|
```yaml
|
|
172
159
|
rounded:
|
|
173
|
-
scale: [0,
|
|
160
|
+
scale: [0, '0.125rem', '0.25rem', '0.375rem', '0.5rem', '0.75rem', '1rem', '1.5rem', '2rem', '9999px']
|
|
174
161
|
tokens:
|
|
175
|
-
none:
|
|
176
|
-
sm:
|
|
177
|
-
md:
|
|
178
|
-
lg:
|
|
179
|
-
xl:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
full:
|
|
162
|
+
none: '0'
|
|
163
|
+
sm: '0.25rem'
|
|
164
|
+
md: '0.5rem'
|
|
165
|
+
lg: '0.75rem'
|
|
166
|
+
xl: '1rem'
|
|
167
|
+
'2xl': '1.5rem'
|
|
168
|
+
'3xl': '2rem'
|
|
169
|
+
full: '9999px'
|
|
183
170
|
```
|
|
184
171
|
|
|
185
172
|
---
|
|
186
173
|
|
|
187
|
-
###
|
|
174
|
+
### Section: elevation
|
|
188
175
|
|
|
189
176
|
```yaml
|
|
190
177
|
elevation:
|
|
191
178
|
tiers:
|
|
192
|
-
none:
|
|
193
|
-
xs:
|
|
194
|
-
sm:
|
|
195
|
-
md:
|
|
196
|
-
lg:
|
|
197
|
-
xl:
|
|
198
|
-
|
|
199
|
-
inner:
|
|
179
|
+
none: 'none'
|
|
180
|
+
xs: '0 1px 2px rgba(0, 0, 0, 0.05)'
|
|
181
|
+
sm: '0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06)'
|
|
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
|
+
xl: '0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)'
|
|
185
|
+
'2xl': '0 25px 50px -12px rgba(0, 0, 0, 0.25)'
|
|
186
|
+
inner: 'inset 0 2px 4px rgba(0, 0, 0, 0.06)'
|
|
200
187
|
```
|
|
201
188
|
|
|
202
189
|
---
|
|
203
190
|
|
|
204
|
-
###
|
|
191
|
+
### Section: components
|
|
205
192
|
|
|
206
193
|
#### Formato de componente
|
|
207
194
|
|
|
208
195
|
```yaml
|
|
209
196
|
components:
|
|
210
197
|
[component-name]:
|
|
211
|
-
description:
|
|
198
|
+
description: 'Descripción breve del componente'
|
|
212
199
|
variants: [variant1, variant2, variant3]
|
|
213
200
|
sizes: [sm, md, lg]
|
|
214
201
|
states: [default, hover, active, focus, disabled]
|
|
215
|
-
base:
|
|
202
|
+
base: 'Propiedades base del componente usando tokens'
|
|
216
203
|
[variant-name]:
|
|
217
|
-
bg:
|
|
218
|
-
text:
|
|
219
|
-
border:
|
|
220
|
-
shadow:
|
|
204
|
+
bg: '{colors.xxx}'
|
|
205
|
+
text: '{colors.xxx}'
|
|
206
|
+
border: 'valor'
|
|
207
|
+
shadow: '{elevation.xxx}'
|
|
221
208
|
tokens:
|
|
222
|
-
radius:
|
|
223
|
-
padding-sm:
|
|
224
|
-
padding-md:
|
|
225
|
-
padding-lg:
|
|
209
|
+
radius: '{rounded.md}'
|
|
210
|
+
padding-sm: '{spacing.sm} {spacing.md}'
|
|
211
|
+
padding-md: '{spacing.md} {spacing.lg}'
|
|
212
|
+
padding-lg: '{spacing.lg} {spacing.xl}'
|
|
226
213
|
```
|
|
227
214
|
|
|
228
215
|
#### Ejemplo: Button
|
|
@@ -230,42 +217,42 @@ components:
|
|
|
230
217
|
```yaml
|
|
231
218
|
components:
|
|
232
219
|
button:
|
|
233
|
-
description:
|
|
220
|
+
description: 'Botón interactivo para acciones primarias y secundarias'
|
|
234
221
|
variants: [primary, secondary, outline, ghost, danger]
|
|
235
222
|
sizes: [sm, md, lg]
|
|
236
223
|
states: [default, hover, active, focus, disabled]
|
|
237
|
-
base:
|
|
224
|
+
base: 'font-weight: 600, border-radius: {rounded.md}, transition: all 150ms'
|
|
238
225
|
primary:
|
|
239
|
-
bg:
|
|
240
|
-
text:
|
|
241
|
-
hover-bg:
|
|
242
|
-
active-bg:
|
|
226
|
+
bg: '{colors.brand.primary}'
|
|
227
|
+
text: '#FFFFFF'
|
|
228
|
+
hover-bg: '#2563EB'
|
|
229
|
+
active-bg: '#1D4ED8'
|
|
243
230
|
secondary:
|
|
244
|
-
bg:
|
|
245
|
-
text:
|
|
246
|
-
hover-bg:
|
|
231
|
+
bg: '{colors.brand.secondary}'
|
|
232
|
+
text: '#FFFFFF'
|
|
233
|
+
hover-bg: '#7C3AED'
|
|
247
234
|
outline:
|
|
248
|
-
bg:
|
|
249
|
-
text:
|
|
250
|
-
border:
|
|
251
|
-
hover-bg:
|
|
252
|
-
hover-text:
|
|
235
|
+
bg: 'transparent'
|
|
236
|
+
text: '{colors.brand.primary}'
|
|
237
|
+
border: '2px solid {colors.brand.primary}'
|
|
238
|
+
hover-bg: '{colors.brand.primary}'
|
|
239
|
+
hover-text: '#FFFFFF'
|
|
253
240
|
ghost:
|
|
254
|
-
bg:
|
|
255
|
-
text:
|
|
256
|
-
hover-bg:
|
|
241
|
+
bg: 'transparent'
|
|
242
|
+
text: '{colors.text.secondary}'
|
|
243
|
+
hover-bg: '{colors.surface.card}'
|
|
257
244
|
danger:
|
|
258
|
-
bg:
|
|
259
|
-
text:
|
|
260
|
-
hover-bg:
|
|
245
|
+
bg: '{colors.semantic.error}'
|
|
246
|
+
text: '#FFFFFF'
|
|
247
|
+
hover-bg: '#DC2626'
|
|
261
248
|
tokens:
|
|
262
|
-
radius:
|
|
263
|
-
padding-sm:
|
|
264
|
-
padding-md:
|
|
265
|
-
padding-lg:
|
|
266
|
-
font-sm:
|
|
267
|
-
font-md:
|
|
268
|
-
font-lg:
|
|
249
|
+
radius: '{rounded.md}'
|
|
250
|
+
padding-sm: '{spacing.2} {spacing.3}'
|
|
251
|
+
padding-md: '{spacing.2} {spacing.4}'
|
|
252
|
+
padding-lg: '{spacing.3} {spacing.6}'
|
|
253
|
+
font-sm: '{typography.body-sm}'
|
|
254
|
+
font-md: '{typography.body-md}'
|
|
255
|
+
font-lg: '{typography.body-lg}'
|
|
269
256
|
```
|
|
270
257
|
|
|
271
258
|
#### Ejemplo: Card
|
|
@@ -273,26 +260,26 @@ components:
|
|
|
273
260
|
```yaml
|
|
274
261
|
components:
|
|
275
262
|
card:
|
|
276
|
-
description:
|
|
263
|
+
description: 'Contenedor de contenido con opciones de elevación'
|
|
277
264
|
variants: [default, outlined, elevated, interactive]
|
|
278
|
-
base:
|
|
265
|
+
base: 'border-radius: {rounded.lg}, padding: {spacing.6}, background: {colors.surface.card}'
|
|
279
266
|
default:
|
|
280
|
-
border:
|
|
281
|
-
shadow:
|
|
267
|
+
border: '1px solid #E5E7EB'
|
|
268
|
+
shadow: '{elevation.none}'
|
|
282
269
|
outlined:
|
|
283
|
-
border:
|
|
284
|
-
shadow:
|
|
270
|
+
border: '1px solid #D1D5DB'
|
|
271
|
+
shadow: '{elevation.none}'
|
|
285
272
|
elevated:
|
|
286
|
-
border:
|
|
287
|
-
shadow:
|
|
273
|
+
border: 'none'
|
|
274
|
+
shadow: '{elevation.md}'
|
|
288
275
|
interactive:
|
|
289
|
-
border:
|
|
290
|
-
shadow:
|
|
291
|
-
hover-shadow:
|
|
292
|
-
cursor:
|
|
276
|
+
border: '1px solid #E5E7EB'
|
|
277
|
+
shadow: '{elevation.sm}'
|
|
278
|
+
hover-shadow: '{elevation.md}'
|
|
279
|
+
cursor: 'pointer'
|
|
293
280
|
tokens:
|
|
294
|
-
radius:
|
|
295
|
-
padding:
|
|
281
|
+
radius: '{rounded.lg}'
|
|
282
|
+
padding: '{spacing.6}'
|
|
296
283
|
```
|
|
297
284
|
|
|
298
285
|
#### Ejemplo: Input
|
|
@@ -300,31 +287,31 @@ components:
|
|
|
300
287
|
```yaml
|
|
301
288
|
components:
|
|
302
289
|
input:
|
|
303
|
-
description:
|
|
290
|
+
description: 'Campo de entrada de texto'
|
|
304
291
|
variants: [default, error, success, disabled]
|
|
305
292
|
sizes: [sm, md, lg]
|
|
306
|
-
base:
|
|
293
|
+
base: 'border: 1px solid #D1D5DB, border-radius: {rounded.md}, background: #FFFFFF, transition: border-color 150ms'
|
|
307
294
|
default:
|
|
308
|
-
border:
|
|
309
|
-
focus-border:
|
|
310
|
-
focus-ring:
|
|
295
|
+
border: '1px solid #D1D5DB'
|
|
296
|
+
focus-border: '{colors.brand.primary}'
|
|
297
|
+
focus-ring: '0 0 0 3px rgba(59,130,246,0.1)'
|
|
311
298
|
error:
|
|
312
|
-
border:
|
|
313
|
-
focus-ring:
|
|
299
|
+
border: '1px solid {colors.semantic.error}'
|
|
300
|
+
focus-ring: '0 0 0 3px rgba(239,68,68,0.1)'
|
|
314
301
|
success:
|
|
315
|
-
border:
|
|
302
|
+
border: '1px solid {colors.semantic.success}'
|
|
316
303
|
disabled:
|
|
317
|
-
bg:
|
|
318
|
-
text:
|
|
319
|
-
cursor:
|
|
304
|
+
bg: '#F3F4F6'
|
|
305
|
+
text: '{colors.text.disabled}'
|
|
306
|
+
cursor: 'not-allowed'
|
|
320
307
|
tokens:
|
|
321
|
-
radius:
|
|
322
|
-
padding-sm:
|
|
323
|
-
padding-md:
|
|
324
|
-
padding-lg:
|
|
325
|
-
font-sm:
|
|
326
|
-
font-md:
|
|
327
|
-
font-lg:
|
|
308
|
+
radius: '{rounded.md}'
|
|
309
|
+
padding-sm: '{spacing.1} {spacing.2}'
|
|
310
|
+
padding-md: '{spacing.2} {spacing.3}'
|
|
311
|
+
padding-lg: '{spacing.3} {spacing.4}'
|
|
312
|
+
font-sm: '{typography.body-sm}'
|
|
313
|
+
font-md: '{typography.body-md}'
|
|
314
|
+
font-lg: '{typography.body-lg}'
|
|
328
315
|
```
|
|
329
316
|
|
|
330
317
|
#### Ejemplo: Navigation
|
|
@@ -332,72 +319,73 @@ components:
|
|
|
332
319
|
```yaml
|
|
333
320
|
components:
|
|
334
321
|
nav:
|
|
335
|
-
description:
|
|
322
|
+
description: 'Barra de navegación principal'
|
|
336
323
|
variants: [default, fixed, transparent]
|
|
337
|
-
base:
|
|
324
|
+
base: 'padding: {spacing.4} {spacing.6}, display: flex, align-items: center'
|
|
338
325
|
default:
|
|
339
|
-
bg:
|
|
340
|
-
border-bottom:
|
|
341
|
-
shadow:
|
|
326
|
+
bg: '#FFFFFF'
|
|
327
|
+
border-bottom: '1px solid #E5E7EB'
|
|
328
|
+
shadow: '{elevation.none}'
|
|
342
329
|
fixed:
|
|
343
|
-
position:
|
|
344
|
-
z-index:
|
|
345
|
-
shadow:
|
|
330
|
+
position: 'fixed'
|
|
331
|
+
z-index: '50'
|
|
332
|
+
shadow: '{elevation.sm}'
|
|
346
333
|
transparent:
|
|
347
|
-
bg:
|
|
348
|
-
border:
|
|
334
|
+
bg: 'transparent'
|
|
335
|
+
border: 'none'
|
|
349
336
|
tokens:
|
|
350
|
-
height:
|
|
351
|
-
padding:
|
|
352
|
-
logo-height:
|
|
337
|
+
height: '4rem'
|
|
338
|
+
padding: '{spacing.4} {spacing.6}'
|
|
339
|
+
logo-height: '2rem'
|
|
353
340
|
```
|
|
354
341
|
|
|
355
342
|
---
|
|
356
343
|
|
|
357
|
-
###
|
|
344
|
+
### Section: responsive
|
|
358
345
|
|
|
359
346
|
```yaml
|
|
360
347
|
responsive:
|
|
361
348
|
breakpoints:
|
|
362
|
-
xs:
|
|
363
|
-
sm:
|
|
364
|
-
md:
|
|
365
|
-
lg:
|
|
366
|
-
xl:
|
|
367
|
-
|
|
349
|
+
xs: '475px' # Mobile landscape
|
|
350
|
+
sm: '640px' # Tablet portrait
|
|
351
|
+
md: '768px' # Tablet landscape
|
|
352
|
+
lg: '1024px' # Desktop
|
|
353
|
+
xl: '1280px' # Desktop large
|
|
354
|
+
'2xl': '1536px' # Desktop extra large
|
|
368
355
|
containers:
|
|
369
|
-
sm:
|
|
370
|
-
md:
|
|
371
|
-
lg:
|
|
372
|
-
xl:
|
|
373
|
-
strategy:
|
|
356
|
+
sm: '640px'
|
|
357
|
+
md: '768px'
|
|
358
|
+
lg: '1024px'
|
|
359
|
+
xl: '1280px'
|
|
360
|
+
strategy: 'mobile-first'
|
|
374
361
|
media-queries:
|
|
375
|
-
mobile:
|
|
376
|
-
tablet:
|
|
377
|
-
desktop:
|
|
362
|
+
mobile: '@media (max-width: 639px)'
|
|
363
|
+
tablet: '@media (min-width: 640px) and (max-width: 1023px)'
|
|
364
|
+
desktop: '@media (min-width: 1024px)'
|
|
378
365
|
```
|
|
379
366
|
|
|
380
367
|
---
|
|
381
368
|
|
|
382
|
-
##
|
|
369
|
+
## Synchronization with Code
|
|
383
370
|
|
|
384
371
|
### CSS Variables → DESIGN.md
|
|
385
372
|
|
|
386
373
|
```css
|
|
387
374
|
:root {
|
|
388
|
-
--color-primary: #
|
|
375
|
+
--color-primary: #3b82f6;
|
|
389
376
|
--spacing-md: 1rem;
|
|
390
377
|
}
|
|
391
378
|
```
|
|
392
379
|
|
|
393
380
|
→ Mapear a:
|
|
381
|
+
|
|
394
382
|
```yaml
|
|
395
383
|
colors:
|
|
396
384
|
brand:
|
|
397
|
-
primary:
|
|
385
|
+
primary: '#3B82F6'
|
|
398
386
|
spacing:
|
|
399
387
|
tokens:
|
|
400
|
-
md:
|
|
388
|
+
md: '1rem'
|
|
401
389
|
```
|
|
402
390
|
|
|
403
391
|
### Tailwind Config → DESIGN.md
|
|
@@ -410,10 +398,10 @@ module.exports = {
|
|
|
410
398
|
primary: '#3B82F6',
|
|
411
399
|
},
|
|
412
400
|
spacing: {
|
|
413
|
-
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
401
|
+
128: '32rem',
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
},
|
|
417
405
|
}
|
|
418
406
|
```
|
|
419
407
|
|
|
@@ -424,13 +412,14 @@ module.exports = {
|
|
|
424
412
|
```yaml
|
|
425
413
|
colors:
|
|
426
414
|
brand:
|
|
427
|
-
primary:
|
|
415
|
+
primary: '#3B82F6'
|
|
428
416
|
```
|
|
429
417
|
|
|
430
418
|
→ Generar:
|
|
419
|
+
|
|
431
420
|
```css
|
|
432
421
|
:root {
|
|
433
|
-
--color-brand-primary: #
|
|
422
|
+
--color-brand-primary: #3b82f6;
|
|
434
423
|
}
|
|
435
424
|
```
|
|
436
425
|
|
|
@@ -439,10 +428,11 @@ colors:
|
|
|
439
428
|
```yaml
|
|
440
429
|
colors:
|
|
441
430
|
brand:
|
|
442
|
-
primary:
|
|
431
|
+
primary: '#3B82F6'
|
|
443
432
|
```
|
|
444
433
|
|
|
445
434
|
→ Generar:
|
|
435
|
+
|
|
446
436
|
```javascript
|
|
447
437
|
module.exports = {
|
|
448
438
|
theme: {
|
|
@@ -450,10 +440,10 @@ module.exports = {
|
|
|
450
440
|
colors: {
|
|
451
441
|
brand: {
|
|
452
442
|
primary: '#3B82F6',
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
}
|
|
456
|
-
}
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
},
|
|
446
|
+
},
|
|
457
447
|
}
|
|
458
448
|
```
|
|
459
449
|
|
|
@@ -461,7 +451,7 @@ module.exports = {
|
|
|
461
451
|
|
|
462
452
|
## Ejemplo Completo de DESIGN.md
|
|
463
453
|
|
|
464
|
-
|
|
454
|
+
````yaml
|
|
465
455
|
---
|
|
466
456
|
created: "2024-03-15"
|
|
467
457
|
status: active
|
|
@@ -517,14 +507,14 @@ responsive:
|
|
|
517
507
|
breakpoints: { sm: "640px", md: "768px", lg: "1024px", xl: "1280px" }
|
|
518
508
|
---
|
|
519
509
|
|
|
520
|
-
##
|
|
510
|
+
## Overview
|
|
521
511
|
|
|
522
512
|
Sistema de diseño basado en tokens con jerarquía de tres niveles:
|
|
523
513
|
1. **Tokens base**: Valores crudos (colores hex, tamaños rem)
|
|
524
514
|
2. **Tokens semánticos**: Valores con propósito (success, error)
|
|
525
515
|
3. **Tokens de componente**: Valores por defecto de cada componente
|
|
526
516
|
|
|
527
|
-
##
|
|
517
|
+
## Color Palette
|
|
528
518
|
|
|
529
519
|
La paleta se organiza en 4 categorías:
|
|
530
520
|
- **Brand**: Identidad visual de la marca
|
|
@@ -532,7 +522,7 @@ La paleta se organiza en 4 categorías:
|
|
|
532
522
|
- **Text**: Jerarquía de texto
|
|
533
523
|
- **Semantic**: Estados y feedback
|
|
534
524
|
|
|
535
|
-
##
|
|
525
|
+
## Token Usage
|
|
536
526
|
|
|
537
527
|
En CSS:
|
|
538
528
|
```css
|
|
@@ -541,10 +531,14 @@ En CSS:
|
|
|
541
531
|
border-radius: var(--rounded-md);
|
|
542
532
|
padding: var(--spacing-sm) var(--spacing-md);
|
|
543
533
|
}
|
|
544
|
-
|
|
534
|
+
````
|
|
545
535
|
|
|
546
536
|
En Tailwind:
|
|
537
|
+
|
|
547
538
|
```html
|
|
548
|
-
<button class="bg-primary rounded-md px-4 py-2">
|
|
539
|
+
<button class="bg-primary rounded-md px-4 py-2"></button>
|
|
540
|
+
```
|
|
541
|
+
|
|
549
542
|
```
|
|
543
|
+
|
|
550
544
|
```
|