9.3 KiB
9.3 KiB
🎉 Avanza UI v2.0.0 - ACTUALIZACIÓN COMPLETA
✅ NUEVOS COMPONENTES AGREGADOS
📦 Total de Componentes: 20 (antes 16)
✨ Nuevos Componentes Agregados (4):
-
Accordion 🆕
- Componente de acordeón expandible/colapsable
- Variantes: default, bordered, separated, flush
- Soporte para múltiples items abiertos
- Animación suave
-
Breadcrumb 🆕
- Navegación de ruta de navegación
- Variantes: default, arrowed, dotted
- Separadores personalizables
- Soporte para íconos
-
Progress 🆕
- Barras de progreso
- Variantes: primary, secondary, success, warning, danger, info
- Tamaños: sm, md, lg
- Estilos: normal, striped, animated, gradient
- Label inside/outside
-
Pagination 🆕
- Paginación completa
- Variantes: default, rounded, pills, simple
- Tamaños: sm, md, lg
- Navegación first/last, prev/next
- Elipsis automático para muchas páginas
📊 Componentes Totales por Categoría
Formularios (7)
- Button
- Input
- Textarea
- Select
- Checkbox
- Radio
- Switch
Layout (2)
- Card
- Tabs
Navegación (3) 🆕 +2
- Dropdown
- Breadcrumb 🆕
- Pagination 🆕
Feedback (4) 🆕 +1
- Alert
- Spinner
- Tooltip
- Progress 🆕
Display (2)
- Avatar
- Badge
Interactive (2) 🆕 +1
- Modal
- Accordion 🆕
💡 Ejemplos de Uso de Nuevos Componentes
Accordion
import { Accordion } from 'avanza-ui';
function FAQ() {
return (
<Accordion
variant="bordered"
allowMultiple={true}
items={[
{
id: 'faq1',
title: '¿Qué es Avanza UI?',
content: 'Una biblioteca de componentes UI sin Tailwind CSS.'
},
{
id: 'faq2',
title: '¿Cómo se instala?',
content: 'npm install ../ui-components'
},
{
id: 'faq3',
title: '¿Es gratis?',
content: 'Sí, está bajo licencia MIT.',
disabled: false
}
]}
defaultActiveItems={['faq1']}
/>
);
}
Breadcrumb
import { Breadcrumb } from 'avanza-ui';
function Navigation() {
return (
<Breadcrumb
variant="arrowed"
items={[
{
label: 'Home',
icon: <HomeIcon />,
href: '/'
},
{
label: 'Components',
href: '/components'
},
{
label: 'UI Kit',
onClick: () => console.log('Current page')
}
]}
/>
);
}
Progress
import { Progress } from 'avanza-ui';
function UploadProgress() {
const [progress, setProgress] = useState(0);
return (
<>
<Progress
value={progress}
max={100}
label="Uploading..."
showValue
variant="success"
size="md"
striped
animated
/>
<Progress
value={75}
label="Profile completion"
variant="primary"
gradient
labelInside
/>
</>
);
}
Pagination
import { Pagination } from 'avanza-ui';
function TablePagination() {
const [currentPage, setCurrentPage] = useState(1);
return (
<Pagination
currentPage={currentPage}
totalPages={50}
onPageChange={setCurrentPage}
variant="pills"
size="md"
showPrevNext
showFirstLast
maxVisiblePages={5}
/>
);
}
📦 Actualización del Bundle Size
CSS: 38KB (antes 33KB) +5KB
JS ESM: 36KB (antes 31KB) +5KB
JS CJS: 38KB (antes 33KB) +5KB
Total: ~74KB (antes ~64KB)
Aumento: +10KB por 4 componentes nuevos
Promedio: 2.5KB por componente - ¡Excelente!
🎯 Lista Completa de 20 Componentes
| # | Componente | Categoría | Estado |
|---|---|---|---|
| 1 | Accordion | Interactive | 🆕 NUEVO |
| 2 | Alert | Feedback | ✅ |
| 3 | Avatar | Display | ✅ |
| 4 | Badge | Display | ✅ |
| 5 | Breadcrumb | Navegación | 🆕 NUEVO |
| 6 | Button | Formulario | ✅ |
| 7 | Card | Layout | ✅ |
| 8 | Checkbox | Formulario | ✅ |
| 9 | Dropdown | Navegación | ✅ |
| 10 | Input | Formulario | ✅ |
| 11 | Modal | Interactive | ✅ |
| 12 | Pagination | Navegación | 🆕 NUEVO |
| 13 | Progress | Feedback | 🆕 NUEVO |
| 14 | Radio | Formulario | ✅ |
| 15 | Select | Formulario | ✅ |
| 16 | Spinner | Feedback | ✅ |
| 17 | Switch | Formulario | ✅ |
| 18 | Tabs | Layout | ✅ |
| 19 | Textarea | Formulario | ✅ |
| 20 | Tooltip | Feedback | ✅ |
🔄 Componentes Migrados de Vristo
✅ Completados
- Accordion (Accordians.tsx)
- Breadcrumb (Breadcrumbs.tsx)
- Progress (Progressbar.tsx)
- Pagination (Pagination.tsx)
- Tabs
- Modal
- Dropdown
- Alert
- Checkbox/Radio/Switch
- Input/Textarea/Select
- Avatar/Badge/Tooltip/Spinner
- Button/Card
📋 Componentes Opcionales de Vristo (No Esenciales)
Estos componentes no se han migrado porque son muy específicos o requieren librerías externas:
- Carousel (requiere swiper)
- Counter (muy específico)
- Countdown (muy específico)
- SweetAlert (requiere librería externa)
- Timeline (muy específico)
- Notification/Toast (se puede crear si es necesario)
- LightBox (requiere librería externa)
- MediaObject (no es un componente estándar)
- PricingTable (template específico)
- ListGroup (se puede usar Card + list)
- Jumbotron (template específico)
- Popovers (similar a Tooltip)
- Treeview (componente complejo)
- Search (componente de app específica)
- Colorlibrary (no es componente)
- Infobox (template específico)
- Loader (ya tenemos Spinner)
- Wizards (componente complejo)
- FileUpload (componente complejo)
- DatePicker (requiere librería externa)
- Editors (requieren librerías externas)
🚀 Cómo Actualizar
1. Actualizar imports
import {
// Nuevos componentes
Accordion,
Breadcrumb,
Progress,
Pagination,
// Existentes
Button, Input, Card, Tabs, Modal,
Alert, Spinner, Tooltip, Avatar, Badge,
Checkbox, Radio, Switch, Select, Textarea,
Dropdown, DropdownItem
} from 'avanza-ui';
2. Ejemplos Completos
Dashboard con Todos los Componentes
import {
Card, CardHeader, CardBody,
Progress, Pagination, Breadcrumb,
Tabs, Button, Alert, Accordion
} from 'avanza-ui';
function Dashboard() {
const [page, setPage] = useState(1);
return (
<div>
{/* Navegación */}
<Breadcrumb
items={[
{ label: 'Home', href: '/' },
{ label: 'Dashboard' }
]}
/>
{/* Alerta */}
<Alert variant="info" message="Welcome back!" closable />
{/* Tabs con contenido */}
<Tabs
variant="pills"
tabs={[
{
id: 'overview',
label: 'Overview',
content: (
<>
{/* Progress bars */}
<Card>
<CardHeader>Project Progress</CardHeader>
<CardBody>
<Progress
value={75}
label="Development"
showValue
variant="success"
/>
<Progress
value={50}
label="Testing"
showValue
variant="warning"
gradient
/>
</CardBody>
</Card>
{/* Accordion */}
<Accordion
items={[
{
id: 'tasks',
title: 'Recent Tasks',
content: <ul><li>Task 1</li><li>Task 2</li></ul>
},
{
id: 'updates',
title: 'Updates',
content: 'Latest updates here...'
}
]}
/>
</>
)
},
{
id: 'data',
label: 'Data',
content: (
<>
{/* Data table with pagination */}
<Card>
<CardBody>
{/* Your table here */}
<Pagination
currentPage={page}
totalPages={10}
onPageChange={setPage}
variant="pills"
showPrevNext
/>
</CardBody>
</Card>
</>
)
}
]}
/>
</div>
);
}
📚 Documentación Actualizada
Se recomienda consultar:
- README.md - API completa
- QUICK_REFERENCE.md - Referencia rápida de todos los componentes
- COMPONENTS_UPDATE.md - Detalles de componentes nuevos
✅ Estado Final
Avanza UI v2.0.0
- ✅ 20 componentes UI completos
- ✅ Sin dependencias de Tailwind CSS
- ✅ TypeScript completo
- ✅ CSS Modules sin conflictos
- ✅ Bundle optimizado (~74KB)
- ✅ Migración de Vristo completada
- ✅ Documentación exhaustiva
Fecha: 11 de Noviembre, 2025
Versión: 2.0.0
Componentes: 20 (↑ +4 desde v1.0.0)
Bundle Size: ~74KB (↑ +10KB desde v1.0.0)
🎉 ¡BIBLIOTECA COMPLETADA CON ÉXITO! 🎉