update-base-config 0.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.
@@ -0,0 +1,426 @@
1
+ # 🎨 Tailwind Custom - Inicio Rápido (5 minutos)
2
+
3
+ ## ⚡ TL;DR (Lo más importante)
4
+
5
+ **Este proyecto usa Tailwind con presets personalizados (`tw-blue`).**
6
+
7
+ ❌ **NUNCA hagas esto:**
8
+
9
+ ```vue
10
+ <div class="bg-blue-600 text-blue-500">Error</div>
11
+ ```
12
+
13
+ ✅ **SIEMPRE haz esto:**
14
+
15
+ ```vue
16
+ <div class="bg-brand text-primary">Correcto</div>
17
+ ```
18
+
19
+ ---
20
+
21
+ ## 🎯 3 Reglas de Oro
22
+
23
+ ### Regla 1: Usa Colores del Preset (NO colores con números)
24
+
25
+ **⚠️ ADVERTENCIA CRÍTICA: NO uses colores con números**
26
+
27
+ ❌ **Estos colores NO existen:**
28
+
29
+ - `gray-50`, `gray-100`, `gray-200`, ... `gray-900`
30
+ - `blue-100`, `blue-500`, `blue-600`, ... `blue-900`
31
+ - `red-500`, `green-600`, `yellow-400`, etc.
32
+
33
+ **Disponibles en el preset:**
34
+
35
+ #### Azul Corporativo (Brand)
36
+
37
+ - `brand-dark` ← **Usar para fondos oscuros** (en lugar de gray-900)
38
+ - `brand` ← Azul principal
39
+ - `brand-light` ← Azul claro
40
+ - `brand-lighter` ← Azul muy claro
41
+ - `brand-background` ← Fondo claro
42
+ - `brand-transparent` ← Con transparencia
43
+
44
+ #### Azul Primario (Primary)
45
+
46
+ - `primary-dark`, `primary`, `primary-light`, `primary-lighter`
47
+ - `primary-background`, `primary-transparent`
48
+
49
+ #### Grises (Gray)
50
+
51
+ - `gray-dark` ← **Usar para textos oscuros** (en lugar de gray-800/900)
52
+ - `gray` ← Gris medio
53
+ - `gray-light` ← Gris claro
54
+ - `gray-lighter` ← **Usar para bordes** (en lugar de gray-300)
55
+ - `gray-background` ← **Usar para fondos** (en lugar de gray-100)
56
+ - `gray-transparent` ← Con transparencia
57
+
58
+ #### Estados
59
+
60
+ - Success: `success-dark`, `success`, `success-light`, `success-lighter`, `success-background`
61
+ - Warning: `warning-dark`, `warning`, `warning-light`, `warning-lighter`, `warning-background`
62
+ - Error: `error-dark`, `error`, `error-light`, `error-lighter`, `error-background`
63
+
64
+ #### Otros
65
+
66
+ - `white`, `black`, `transparent`
67
+ - `backup-yellow`
68
+
69
+ **Ejemplos correctos:**
70
+
71
+ ```vue
72
+ <!-- Logo con fondo oscuro -->
73
+ <div class="bg-brand-dark text-white">✅ Correcto</div>
74
+ <div class="bg-gray-900 text-white">❌ ERROR - gray-900 no existe</div>
75
+
76
+ <!-- Texto oscuro -->
77
+ <p class="text-gray-dark">✅ Correcto</p>
78
+ <p class="text-gray-800">❌ ERROR - gray-800 no existe</p>
79
+
80
+ <!-- Borde claro -->
81
+ <div class="border border-gray-lighter">✅ Correcto</div>
82
+ <div class="border border-gray-300">❌ ERROR - gray-300 no existe</div>
83
+ ```
84
+
85
+ ### Regla 2: Gradientes = Combina Colores Preset
86
+
87
+ ```vue
88
+ <!-- Correcto -->
89
+ <h1 class="bg-gradient-to-r from-brand-light to-primary">Título</h1>
90
+
91
+ <!-- Incorrecto -->
92
+ <h1 class="bg-gradient-to-r from-blue-400 to-blue-600">Título</h1>
93
+ ```
94
+
95
+ ### Regla 3: Valores Arbitrarios Solo Para Tamaños/Espacios
96
+
97
+ ```vue
98
+ <!-- Correcto - tamaño específico -->
99
+ <div class="py-[14px] px-7 rounded-bl-[44px]">Contenido</div>
100
+
101
+ <!-- Incorrecto - color arbitrario que existe en preset -->
102
+ <div class="bg-[#0080FF]">No hagas esto</div>
103
+ ```
104
+
105
+ ### Regla 4: Espaciado Solo 1-7 (NO usar p-8, m-10, etc.)
106
+
107
+ ```vue
108
+ <!-- Correcto -->
109
+ <div class="p-5 m-3 gap-6">Padding 24px, margin 12px, gap 32px</div>
110
+
111
+ <!-- Incorrecto - valores NO existen en preset -->
112
+ <div class="p-8 m-10">❌ Estos valores no existen</div>
113
+
114
+ <!-- Correcto - si necesitas más de 40px -->
115
+ <div class="p-[48px] m-[80px]">Usa valores arbitrarios</div>
116
+ ```
117
+
118
+ ### Regla 5: Tipografía con Escala 1-8
119
+
120
+ ```vue
121
+ <!-- Correcto -->
122
+ <h1 class="text-7 font-bold">Título grande (32px)</h1>
123
+ <p class="text-3">Párrafo (16px = text-base)</p>
124
+
125
+ <!-- También correcto (aliases) -->
126
+ <h1 class="text-3xl font-bold">Equivalente a text-7</h1>
127
+ ```
128
+
129
+ ---
130
+
131
+ ## 📚 Colores Disponibles (Memoriza Estos)
132
+
133
+ | Uso | Clase Tailwind | Ejemplo |
134
+ | ----------------- | ------------------ | -------------------------------- |
135
+ | Fondo principal | `bg-brand` | `<div class="bg-brand">` |
136
+ | Fondo claro | `bg-brand-light` | `<div class="bg-brand-light">` |
137
+ | Fondo oscuro | `bg-brand-dark` | `<div class="bg-brand-dark">` |
138
+ | Fondo muy claro | `bg-brand-lighter` | `<div class="bg-brand-lighter">` |
139
+ | Color principal | `text-brand` | `<p class="text-brand">` |
140
+ | Gradiente origen | `from-brand-light` | `<div class="from-brand-light">` |
141
+ | Gradiente destino | `to-primary` | `<div class="to-primary">` |
142
+ | Borde | `border-brand` | `<div class="border-brand">` |
143
+ | Con opacidad | `bg-brand/80` | `<div class="bg-brand/80">` |
144
+
145
+ ---
146
+
147
+ ## 📏 Otras Variables del Preset (Referencia Rápida)
148
+
149
+ ### Tipografía
150
+
151
+ | Clase | Tamaño | Uso |
152
+ | ------------- | ------ | --------------- |
153
+ | `text-1/xs` | 12px | Muy pequeño |
154
+ | `text-2/sm` | 14px | Pequeño |
155
+ | `text-3/base` | 16px | Base (párrafos) |
156
+ | `text-4/lg` | 20px | Subtítulos |
157
+ | `text-5/xl` | 24px | Títulos H3 |
158
+ | `text-6/2xl` | 26px | Títulos H2 |
159
+ | `text-7/3xl` | 32px | Títulos H1 |
160
+ | `text-8/4xl` | 40px | Héroes |
161
+
162
+ ### Espaciado (Escala Customizada)
163
+
164
+ | Clase | Valor | Uso |
165
+ | ----- | ----- | --------------------- |
166
+ | `1` | 4px | `p-1`, `m-1`, `gap-1` |
167
+ | `2` | 8px | `p-2`, `m-2`, `gap-2` |
168
+ | `3` | 12px | `p-3`, `m-3`, `gap-3` |
169
+ | `4` | 16px | `p-4`, `m-4`, `gap-4` |
170
+ | `5` | 24px | `p-5`, `m-5`, `gap-5` |
171
+ | `6` | 32px | `p-6`, `m-6`, `gap-6` |
172
+ | `7` | 40px | `p-7`, `m-7`, `gap-7` |
173
+
174
+ **⚠️ Importante**: NO existen `p-8`, `m-10`, `gap-12`, etc. Si necesitas más de 40px, usa arbitrarios: `p-[48px]`
175
+
176
+ ### Breakpoints
177
+
178
+ | Clase | Tamaño |
179
+ | ------ | ------ |
180
+ | `sm:` | 640px |
181
+ | `md:` | 768px |
182
+ | `lg:` | 1024px |
183
+ | `xl:` | 1280px |
184
+ | `2xl:` | 1536px |
185
+
186
+ ### Bordes
187
+
188
+ | Clase | Valor |
189
+ | -------------- | ------ |
190
+ | `rounded-1/sm` | 4px |
191
+ | `rounded-2/md` | 8px |
192
+ | `rounded-3/lg` | 16px |
193
+ | `rounded-full` | 9999px |
194
+ | `border` | 1px |
195
+ | `border-2` | 2px |
196
+
197
+ ### Sombras y Animaciones
198
+
199
+ | Clase | Uso |
200
+ | ----------------- | ----------------------- |
201
+ | `shadow-md` | Sombra media para cards |
202
+ | `shadow-controls` | Sombra para botones |
203
+ | `animate-fadeIn` | Entrada gradual |
204
+ | `animate-pulse` | Pulsación skeleton |
205
+ | `animate-spin` | Spinner de carga |
206
+
207
+ ---
208
+
209
+ ## ✅ Ejemplos Rápidos
210
+
211
+ ### Header/Hero
212
+
213
+ ```vue
214
+ <h1 class="text-transparent bg-clip-text bg-gradient-to-r from-brand-light to-primary">
215
+ Título Principal
216
+ </h1>
217
+ ```
218
+
219
+ ### Botón
220
+
221
+ ```vue
222
+ <button class="bg-primary text-white hover:bg-primary-light px-4 py-2">
223
+ Enviar
224
+ </button>
225
+ ```
226
+
227
+ ### Card
228
+
229
+ ```vue
230
+ <div class="bg-white border-2 border-brand-light rounded-lg p-6">
231
+ <h3 class="text-brand-dark">Título</h3>
232
+ <p>Contenido</p>
233
+ </div>
234
+ ```
235
+
236
+ ### Gradiente Complejo
237
+
238
+ ```vue
239
+ <div class="bg-gradient-to-tl from-brand-dark via-brand to-brand/80 p-6 rounded-lg">
240
+ Contenido destacado
241
+ </div>
242
+ ```
243
+
244
+ ---
245
+
246
+ ## 🚫 Errores Comunes
247
+
248
+ | ❌ Incorrecto | ✅ Correcto | Razón |
249
+ | --------------------------- | ----------------------------- | -------------------------------------------- |
250
+ | `bg-blue-600` | `bg-brand` | Usa color preset |
251
+ | `text-gray-700` | `text-brand-dark` | Usa color preset |
252
+ | `border-blue-400` | `border-brand-light` | Usa color preset |
253
+ | `from-blue-500 to-blue-700` | `from-brand-light to-primary` | Gradiente del preset |
254
+ | `bg-[#0080FF]` | `bg-brand` | NO uses arbitrarios para colores que existen |
255
+ | `p-8`, `m-10`, `gap-12` | `p-[48px]`, `m-[80px]` | Espaciado solo va de 1-7 |
256
+ | `text-5xl`, `text-9xl` | `text-[48px]`, `text-[72px]` | Tipografía solo va hasta text-8 (40px) |
257
+ | `duration-400` | `duration-[400ms]` | Usa duraciones disponibles o arbitrarios |
258
+ | `rounded-4xl` | `rounded-[24px]` | Border radius solo hasta rounded-3 (16px) |
259
+
260
+ ---
261
+
262
+ ## 📖 ¿Más Información?
263
+
264
+ - **Guía Completa**: [SKILL_TAILWIND_CUSTOM.md](./SKILL_TAILWIND_CUSTOM.md)
265
+ - **Para Copilot**: [SKILL_TAILWIND_COPILOT_PROMPT.md](./SKILL_TAILWIND_COPILOT_PROMPT.md)
266
+ - **Ejemplos**: [SKILL_TAILWIND_BEFORE_AFTER.md](./SKILL_TAILWIND_BEFORE_AFTER.md)
267
+
268
+ ---
269
+
270
+ ## 🎓 Paso a Paso: Crear un Componente
271
+
272
+ ### Paso 1: Identifica qué necesitas
273
+
274
+ ```vue
275
+ <template>
276
+ <!-- Necesito un card con:
277
+ - Fondo blanco
278
+ - Borde azul
279
+ - Título en azul oscuro
280
+ - Botón azul
281
+ -->
282
+ </template>
283
+ ```
284
+
285
+ ### Paso 2: Mapea a colores del preset
286
+
287
+ ```
288
+ Fondo blanco → bg-white (no está en preset, es estándar)
289
+ Borde azul → border-brand ✓
290
+ Título azul oscuro → text-brand-dark ✓
291
+ Botón azul → bg-primary ✓
292
+ ```
293
+
294
+ ### Paso 3: Escribe el código
295
+
296
+ ```vue
297
+ <template>
298
+ <div class="bg-white border-2 border-brand rounded-lg p-6">
299
+ <h3 class="text-brand-dark font-bold">Mi Título</h3>
300
+ <p class="text-gray-600 mt-2">Descripción</p>
301
+ <button class="bg-primary text-white mt-4 px-4 py-2 rounded hover:bg-primary-light">Acción</button>
302
+ </div>
303
+ </template>
304
+ ```
305
+
306
+ ---
307
+
308
+ ## ❓ Preguntas Frecuentes
309
+
310
+ ### P: ¿Qué hago si necesito un color que NO está en el preset?
311
+
312
+ **R:** Usa un **valor arbitrario**:
313
+
314
+ ```vue
315
+ <div class="bg-[#FF5733] text-[#333333]">
316
+ Color custom específico
317
+ </div>
318
+ ```
319
+
320
+ Pero primero verifica si existe en el preset:
321
+
322
+ - `brand`, `brand-light`, `brand-dark`, `brand-lighter`
323
+ - `primary`, `primary-light`
324
+ - `secondary`, `accent`
325
+
326
+ ### P: ¿Puedo agregar nuevos colores al preset?
327
+
328
+ **R:** Sí, pero primero intenta con arbitrarios. Si lo necesitas permanentemente, pide a un tech lead que lo agregue a `tailwind.config.js`.
329
+
330
+ ### P: ¿Los valores arbitrarios se compilan?
331
+
332
+ **R:** Sí. Tailwind genera dinámicamente el CSS. Algunos valores comunes ya están en `safelist` para garantizar su inclusión.
333
+
334
+ ### P: ¿Cuál es la diferencia entre `brand` y `primary`?
335
+
336
+ **R:** Son colores diferentes en el preset:
337
+
338
+ - `brand` = Azul corporativo del Banco (más oscuro)
339
+ - `primary` = Variante para acciones/botones (más claro)
340
+
341
+ ### P: ¿Qué pasa si Copilot me sugiere `bg-blue-500`?
342
+
343
+ **R:** Responde:
344
+
345
+ > Este proyecto usa Tailwind con presets. Usa `bg-brand` o variantes (brand-light, brand-dark).
346
+
347
+ ---
348
+
349
+ ## 🔄 Conversión Rápida
350
+
351
+ Si ves código incorrecto:
352
+
353
+ 1. **Identifica** color genérico: `blue-X`, `gray-X`, etc
354
+ 2. **Reemplaza**:
355
+ - `*-100/200` → `*-light`
356
+ - `*-700/900` → `*-dark`
357
+ - `blue-*` → `brand` o `primary`
358
+ 3. **Verifica** gradientes usen preset
359
+ 4. **Agrega** arbitrarios SOLO si no existen en preset
360
+
361
+ ---
362
+
363
+ ## ✨ Checklist Antes de Terminar
364
+
365
+ - [ ] ¿Usé colores del preset (brand, primary)?
366
+ - [ ] ¿Los gradientes combinan colores del preset?
367
+ - [ ] ¿Si necesité un color custom, usé `[#hexcode]`?
368
+ - [ ] ¿Reviré contra ejemplos en [SKILL_TAILWIND_BEFORE_AFTER.md](./SKILL_TAILWIND_BEFORE_AFTER.md)?
369
+ - [ ] ¿La maqueta coincide con design system del Banco?
370
+
371
+ ---
372
+
373
+ ## 🚀 Siguiente Nivel
374
+
375
+ Cuando estés cómodo:
376
+
377
+ 1. Lee [SKILL_TAILWIND_CUSTOM.md](./SKILL_TAILWIND_CUSTOM.md) completo
378
+ 2. Revisa [SKILL_TAILWIND_BEFORE_AFTER.md](./SKILL_TAILWIND_BEFORE_AFTER.md) para verpatrones
379
+ 3. Usa [SKILL_TAILWIND_COPILOT_PROMPT.md](./SKILL_TAILWIND_COPILOT_PROMPT.md) cuando pidas a Copilot
380
+
381
+ ---
382
+
383
+ ## 💡 Pro Tips
384
+
385
+ ### Tip 1: Memoriza los Colores
386
+
387
+ Repite 3 veces:
388
+
389
+ > "brand, brand-light, brand-dark, primary, primary-light"
390
+
391
+ ### Tip 2: Usa Ejemplos Reales
392
+
393
+ Busca código similar en:
394
+
395
+ - `src/pages/Charlas/Charlas.vue`
396
+ - `src/pages/ValeVista/sections/BeneficiosSlider.vue`
397
+
398
+ ### Tip 3: Copia & Adapta
399
+
400
+ 1. Encuentra componente similar
401
+ 2. Copia su estructura de colores
402
+ 3. Adapta a tu caso
403
+
404
+ ### Tip 4: Opacidad es tu Amiga
405
+
406
+ ```vue
407
+ <!-- Necesitas un color más claro? -->
408
+ <div class="bg-brand/50">Más claro</div>
409
+ <div class="bg-brand/75">Medio</div>
410
+ <div class="bg-brand/90">Oscuro</div>
411
+ ```
412
+
413
+ ---
414
+
415
+ ## 📞 Ayuda
416
+
417
+ Si tienes dudas:
418
+
419
+ 1. **Colores disponibles**: [SKILL_TAILWIND_CUSTOM.md#-colores-disponibles-tw-blue](./SKILL_TAILWIND_CUSTOM.md)
420
+ 2. **Ejemplos**: [SKILL_TAILWIND_BEFORE_AFTER.md](./SKILL_TAILWIND_BEFORE_AFTER.md)
421
+ 3. **Para Copilot**: [SKILL_TAILWIND_COPILOT_PROMPT.md](./SKILL_TAILWIND_COPILOT_PROMPT.md)
422
+ 4. **Todo**: [SKILL_TAILWIND_CUSTOM.md](./SKILL_TAILWIND_CUSTOM.md)
423
+
424
+ ---
425
+
426
+ **¡Listo! Ahora puedes crear maquetas correctas con Tailwind custom. 🎉**