@styloviz/data-table 0.1.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 StyloViz
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,81 @@
1
+ # @styloviz/data-table
2
+
3
+ > Sortable, paginated table with row selection, badge cells and a loading skeleton — plus premium toolbar, column filters, inline editing, expandable rows and bulk actions.
4
+
5
+ Part of the **StyloViz UI Kit** — a premium Angular 21 + Tailwind CSS 4 dashboard component library. Standalone, `OnPush`, strongly typed, dark-mode ready.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @styloviz/core @styloviz/data-table
11
+ ```
12
+
13
+ Requires `@angular/core` and `@angular/common` >= 21. `@styloviz/core` is a peer dependency shared by every component. Prefer everything at once? `@styloviz/all` installs the whole free tier in one command.
14
+
15
+ ## Usage
16
+
17
+ ```ts
18
+ import { SvDataTableComponent } from '@styloviz/data-table';
19
+
20
+ @Component({
21
+ standalone: true,
22
+ imports: [SvDataTableComponent],
23
+ template: `
24
+ <sv-data-table [rows]="rows" rowKey="id" [selectable]="true" [paginated]="true" />
25
+ `,
26
+ })
27
+ export class DemoComponent {}
28
+ ```
29
+
30
+ ## Inputs
31
+
32
+ | Input | Type | Default | Description |
33
+ | --- | --- | --- | --- |
34
+ | `rows` | `T[]` | `[]` | Row data to display. |
35
+ | `rowKey` | `string` | `'id'` | Property used as each row's unique id (for selection/tracking). |
36
+ | `selectable` | `boolean` | `false` | Enable row selection. |
37
+ | `selectMode` | `SelectMode` | `'multi'` | 'multi' = checkboxes, 'single' = radio buttons. |
38
+ | `bulkActions` | `BulkAction[]` | `[]` | Bulk actions applied to selected rows. |
39
+ | `loading` | `boolean` | `false` | Show a loading state. |
40
+ | `loadingStyle` | `LoadingStyle` | `'skeleton'` | 'skeleton' rows or full-table 'overlay' spinner. |
41
+ | `skeletonRows` | `number` | `5` | Number of skeleton rows while loading. |
42
+ | `paginated` | `boolean` | `true` | Enable client-side pagination. |
43
+ | `pageSize` | `number (two-way)` | `10` | Rows per page (two-way). |
44
+ | `pageSizeOptions` | `number[]` | `[10, 25, 50]` | Page-size options offered in the toolbar. |
45
+ | `serverSide` | `boolean` | `false` | Server-side mode: disables client filtering/sorting/paging. |
46
+ | `totalCount` | `number \| null` | `null` | Total row count when in server-side mode. |
47
+ | `variant` | `TableVariant` | `'default'` | Table style variant. |
48
+ | `density` | `TableDensity` | `'comfortable'` | Row density: comfortable, compact, etc. |
49
+ | `compact` | `boolean` | `false` | Deprecated shorthand for compact density. |
50
+ | `maxHeight` | `string \| null` | `null` | Max body height (CSS length) before the table scrolls. |
51
+ | `showScrollHint` | `boolean` | `true` | Show a hint when the table is horizontally scrollable. |
52
+ | `showToolbar` | `boolean` | `false` | Show the toolbar above the table. |
53
+ | `tableTitle` | `string` | `''` | Title shown in the toolbar. |
54
+ | `searchable` | `boolean` | `false` | Show a search box in the toolbar. |
55
+ | `showColumnToggle` | `boolean` | `false` | Show the column visibility toggle. |
56
+ | `exportable` | `boolean` | `false` | Show an export (CSV) control. |
57
+ | `showDensityToggle` | `boolean` | `false` | Show the density toggle. |
58
+ | `columnFilters` | `boolean` | `false` | Enable per-column filters. |
59
+ | `multiSort` | `boolean` | `false` | Allow sorting by multiple columns. |
60
+ | `expandable` | `boolean` | `false` | Enable expandable rows. |
61
+ | `showFooter` | `boolean` | `false` | Show a table footer row. |
62
+ | `cardOnMobile` | `boolean` | `false` | Render rows as cards on small screens. |
63
+ | `emptyMessage` | `string` | `'No data to display.'` | Message shown when there are no rows. |
64
+ | `customClass` | `string` | `''` | Extra CSS classes for the root element. |
65
+
66
+ ## Outputs
67
+
68
+ | Output | Type | Description |
69
+ | --- | --- | --- |
70
+ | `sortChange` | `SortState[]` | Emitted with the new sort state when sorting changes. |
71
+ | `rowClick` | `T` | Emitted with the clicked row. |
72
+ | `serverPageChange` | `ServerPageEvent` | Emitted in server-side mode when the page/size changes. |
73
+ | `rowExpand` | `T` | Emitted with the row being expanded. |
74
+
75
+ ## Documentation
76
+
77
+ Full API reference and live demos: https://styloviz.dev/docs/data-table
78
+
79
+ ## License
80
+
81
+ MIT