lite-table-js 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -0
- package/dist/index.js +3874 -0
- package/dist/index.js.map +1 -0
- package/package.json +61 -0
- package/types/index.d.ts +174 -0
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# lite-table
|
|
2
|
+
|
|
3
|
+
Enterprise-grade React data table component with 50+ features.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install lite-table
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```jsx
|
|
14
|
+
import { DataTable } from 'lite-table';
|
|
15
|
+
|
|
16
|
+
const columns = [
|
|
17
|
+
{ id: 'name', header: 'Name', accessorKey: 'name', sortable: true },
|
|
18
|
+
{ id: 'email', header: 'Email', accessorKey: 'email', filterable: true, filterType: 'text' },
|
|
19
|
+
{ id: 'role', header: 'Role', accessorKey: 'role' },
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
const data = [
|
|
23
|
+
{ id: 1, name: 'Alice', email: 'alice@example.com', role: 'Admin' },
|
|
24
|
+
{ id: 2, name: 'Bob', email: 'bob@example.com', role: 'User' },
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
function App() {
|
|
28
|
+
return (
|
|
29
|
+
<DataTable
|
|
30
|
+
data={data}
|
|
31
|
+
columns={columns}
|
|
32
|
+
sorting={{ enabled: true }}
|
|
33
|
+
pagination={{ pageSize: 10 }}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Features
|
|
40
|
+
|
|
41
|
+
- Sorting (single/multi-column, custom comparators)
|
|
42
|
+
- Filtering (text, number, date, select, multi-select, custom)
|
|
43
|
+
- Pagination (page-based, infinite scroll)
|
|
44
|
+
- Selection (single, multiple, shift+click range)
|
|
45
|
+
- Inline editing (cell and full-row with validation)
|
|
46
|
+
- Column management (visibility, resize, reorder, pin)
|
|
47
|
+
- Row grouping with aggregation
|
|
48
|
+
- Tree data (hierarchical rows)
|
|
49
|
+
- Row virtualization (10k+ rows)
|
|
50
|
+
- Row pinning (top/bottom)
|
|
51
|
+
- Context menu (right-click)
|
|
52
|
+
- Sidebar panels
|
|
53
|
+
- Charts (bar, line, area, pie)
|
|
54
|
+
- Presets (save/load table configuration)
|
|
55
|
+
- Persistence (localStorage + URL sync)
|
|
56
|
+
- 4 built-in themes + custom theme support
|
|
57
|
+
- CSV and Excel export
|
|
58
|
+
- Plugin system
|
|
59
|
+
- Multiple views (table, grid, list)
|
|
60
|
+
|
|
61
|
+
## Peer Dependencies
|
|
62
|
+
|
|
63
|
+
- `react` >= 18.0.0
|
|
64
|
+
- `react-dom` >= 18.0.0
|
|
65
|
+
- `lucide-react` (icons)
|
|
66
|
+
- `recharts` (optional, for charts)
|
|
67
|
+
- `xlsx` (optional, for Excel export)
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
|
|
71
|
+
MIT
|