This commit is contained in:
2025-08-31 23:27:52 -04:00
parent 23dfc171b8
commit 40f8780dec
27 changed files with 24228 additions and 0 deletions

View File

@ -0,0 +1,45 @@
import React from 'react';
import { ListItem, FilterOptions } from '../../types';
export interface TableColumn {
key: string;
label: string;
sortable?: boolean;
filterable?: boolean;
width?: string | number;
render?: (value: any, item: ListItem) => React.ReactNode;
}
export interface TableAction {
key: string;
label: string;
icon?: React.ReactNode;
color?: string;
onClick: (item: ListItem) => void;
show?: (item: ListItem) => boolean;
}
export interface DataTableProps {
data: ListItem[];
columns: TableColumn[];
loading?: boolean;
error?: string | null;
title?: string;
total?: number;
page?: number;
pageSize?: number;
onPageChange?: (page: number) => void;
onAdd?: () => void;
onEdit?: (item: ListItem) => void;
onDelete?: (item: ListItem) => Promise<void>;
onRefresh?: () => void;
customActions?: TableAction[];
searchable?: boolean;
filterable?: boolean;
filters?: FilterOptions;
onFiltersChange?: (filters: FilterOptions) => void;
withBorder?: boolean;
withColumnBorders?: boolean;
striped?: boolean;
highlightOnHover?: boolean;
emptyMessage?: string;
}
declare const DataTable: React.FC<DataTableProps>;
export default DataTable;

View File

@ -0,0 +1,17 @@
import React from 'react';
import { FormField } from '../../types';
export interface FormSidebarProps {
opened: boolean;
onClose: () => void;
onSuccess: () => void;
title: string;
editMode?: boolean;
editItem?: any;
fields: FormField[];
onSubmit: (values: any) => Promise<void>;
width?: number;
initialValues?: Record<string, any>;
validateOnSubmit?: boolean;
}
declare const FormSidebar: React.FC<FormSidebarProps>;
export default FormSidebar;