diff --git a/CLAUDE.md b/CLAUDE.md index a093da6..3473d65 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -125,10 +125,32 @@ if (Style.isFancy() and config.corner_radius > 0) { **Total: ~590 líneas nuevas/modificadas** +### Fase 2: Transiciones Hover/Press ✅ (parcial) + +**HoverTransition helper** (`animation.zig`): +- `update()` y `updateWithPress()` para animar hacia target +- `blend()` y `blendThree()` para interpolar colores +- Speed configurable (default ~125ms transición) + +**Widgets con transiciones:** +| Widget | Modo | Notas | +|--------|------|-------| +| Button | Opcional (ButtonState) | `buttonStateful()` para transiciones | +| Select | Integrado en SelectState | Automático | + +```zig +// Button con transiciones (opcional) +var btn_state = button.ButtonState{}; +if (button.buttonStateful(&ctx, &btn_state, "Click me")) { ... } + +// Select tiene transiciones automáticas +var select_state = select.SelectState{}; +_ = select.select(&ctx, &select_state, options); +``` + ### Fases Pendientes -**Fase 2: Estados Visuales** -- Integrar AnimationManager en widgets para transiciones hover/press +**Fase 2 (resto):** - Focus ring con anti-aliasing **Fase 3: Efectos Avanzados**