aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
91 lines • 2.09 kB
TypeScript
import React from "react";
export interface TableColumn {
id: string;
header: string;
accessor: string;
width?: string;
align?: "left" | "center" | "right";
sortable?: boolean;
render?: (value: any, row: any) => React.ReactNode;
}
export interface TableRow {
id: string;
[key: string]: any;
}
export interface TableData {
title: string;
subtitle?: string;
columns: TableColumn[];
rows: TableRow[];
summary?: {
total?: number;
filtered?: number;
message?: string;
};
}
export interface TableWidgetProps extends React.HTMLAttributes<HTMLDivElement> {
/**
* Table data
*/
data: TableData;
/**
* Widget variant
*/
variant?: "default" | "minimal" | "compact";
/**
* Table size
*/
size?: "sm" | "md" | "lg";
/**
* Maximum rows to display
*/
maxRows?: number;
/**
* Whether to show header
*/
showHeader?: boolean;
/**
* Whether table is sortable
*/
sortable?: boolean;
/**
* Whether to show row numbers
*/
showRowNumbers?: boolean;
/**
* Row hover effect
*/
hoverable?: boolean;
/**
* Striped rows
*/
striped?: boolean;
/**
* Loading state
*/
loading?: boolean;
/**
* Table actions
*/
actions?: React.ReactNode;
/**
* Row click handler
*/
onRowClick?: (row: TableRow) => void;
/**
* Sort handler
*/
onSort?: (column: string, direction: "asc" | "desc") => void;
/** Glass surface intent */
intent?: "neutral" | "primary" | "success" | "warning" | "danger" | "info";
/** Glass surface elevation */
elevation?: "level1" | "level2" | "level3" | "level4";
/** Performance tier */
tier?: "low" | "medium" | "high";
}
/**
* TableWidget component
* Display tabular data with sorting and styling
*/
export declare const TableWidget: React.ForwardRefExoticComponent<TableWidgetProps & React.RefAttributes<HTMLDivElement>>;
//# sourceMappingURL=TableWidget.d.ts.map