Datos
Table para filas ordenables (cebra / hover / vacío). LineChart, BarChart y DoughnutChart son SVG ligeros monocromo (--brand-fg), con tooltip al pasar el ratón.
Preview principal
Gráficos
SVG sin dependencias; tokens de marca (--brand-fg).
Tabla
card / flush, cebra, hover y vacío.
import { Table, LineChart, BarChart, DoughnutChart } from "devsoftec-ui";
const columns = [ { header: "Cliente", sortable: true, sortValue: (c) => c.name, cell: (c) => c.name }, { header: "Gasto", align: "right", sortable: true, sortValue: (c) => c.spent, cell: (c) => `$${c.spent}` },];
<Table columns={columns} data={rows} keyField={(c) => c.id} variant="card" zebra /><LineChart data={[8, 14, 11]} labels={["E", "F", "M"]} height={150} /><BarChart data={[{ label: "Ene", value: 40 }, { label: "Feb", value: 62 }]} /><DoughnutChart data={[{ label: "A", value: 60 }, { label: "B", value: 40 }]} />| Prop | Tipo | Default | Descripción |
|---|---|---|---|
columns |
ColumnDef<T>[] |
— | header, cell, sortable, sortValue, align, width |
data |
T[] |
— | Filas |
keyField |
(row) => key |
— | Clave única |
variant |
card | flush |
card |
Contenedor con borde o solo líneas |
zebra |
boolean |
false |
Filas alternas |
hover |
boolean |
true |
Resaltado al pasar |
empty |
string |
Sin resultados |
Mensaje sin filas |
LineChart · BarChart · DoughnutChart
Section titled “LineChart · BarChart · DoughnutChart”| Componente | Props |
|---|---|
LineChart |
data: number[], labels?, height?, ariaLabel? |
BarChart |
data: { label, value }[], height?, ariaLabel? |
DoughnutChart |
data: { label, value }[], size?, thickness?, ariaLabel? |
Comportamiento
Section titled “Comportamiento”- Table: clic en cabecera ordenable → asc → desc → sin orden;
aria-sorten<th> - Vacía: una celda con
empty - Gráficos: hover muestra etiqueta + valor (línea: guía vertical; barras/dona: atenúa el resto)
- Dona: tonos de
--brand-fg(claro/oscuro)