munza-x-data-grid 1.5.0 → 1.5.2

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.
Files changed (54) hide show
  1. package/README.md +288 -73
  2. package/dist/README.md +288 -0
  3. package/dist/components/feedback/NoDataFoundMsg.d.ts +2 -0
  4. package/dist/components/feedback/TableError.d.ts +2 -0
  5. package/dist/components/feedback/TableErrorMsg.d.ts +2 -0
  6. package/dist/components/feedback/TableNoData.d.ts +2 -0
  7. package/dist/components/feedback/TableRowSkeleton.d.ts +7 -0
  8. package/dist/components/feedback/TableSkeleton.d.ts +2 -0
  9. package/dist/components/header/HeaderFilter.d.ts +5 -0
  10. package/dist/components/header/HeaderMenu.d.ts +5 -0
  11. package/dist/components/header/HeaderSort.d.ts +5 -0
  12. package/dist/components/pagination/index.d.ts +4 -0
  13. package/dist/components/table/TBody.d.ts +2 -0
  14. package/dist/components/table/TCell.d.ts +6 -0
  15. package/dist/components/table/THead.d.ts +6 -0
  16. package/dist/components/table/THeader.d.ts +2 -0
  17. package/dist/components/table/TMain.d.ts +2 -0
  18. package/dist/components/toolbar/ToolbarFilter.d.ts +5 -0
  19. package/dist/components/toolbar/index.d.ts +2 -0
  20. package/dist/components/ui/badge.d.ts +9 -0
  21. package/dist/components/ui/button.d.ts +10 -0
  22. package/dist/components/ui/checkbox.d.ts +4 -0
  23. package/dist/components/ui/collapsible.d.ts +5 -0
  24. package/dist/components/ui/debounced-input.d.ts +7 -0
  25. package/dist/components/ui/dropdown-menu.d.ts +29 -0
  26. package/dist/components/ui/empty.d.ts +11 -0
  27. package/dist/components/ui/input.d.ts +3 -0
  28. package/dist/components/ui/label.d.ts +4 -0
  29. package/dist/components/ui/native-select.d.ts +8 -0
  30. package/dist/components/ui/separator.d.ts +4 -0
  31. package/dist/components/ui/skeleton.d.ts +2 -0
  32. package/dist/components/ui/table.d.ts +10 -0
  33. package/dist/contexts/GridContext.d.ts +39 -0
  34. package/dist/core/Grid.d.ts +3 -0
  35. package/dist/data-grid.cjs +44 -0
  36. package/dist/data-grid.js +7983 -0
  37. package/dist/hooks/useGrid.d.ts +2 -0
  38. package/dist/hooks/useGridState.d.ts +16 -0
  39. package/dist/hooks/useQueryArgs.d.ts +12 -0
  40. package/dist/hooks/useSyncScroll.d.ts +7 -0
  41. package/dist/index.css +4 -0
  42. package/dist/index.d.ts +5 -2
  43. package/dist/lib/utils.d.ts +2 -0
  44. package/dist/utils/buildQueryString.d.ts +2 -0
  45. package/dist/utils/buildSortString.d.ts +4 -0
  46. package/dist/utils/getPinStyles.d.ts +3 -0
  47. package/package.json +66 -45
  48. package/dist/App.d.ts +0 -2
  49. package/dist/Button.d.ts +0 -7
  50. package/dist/favicon.svg +0 -1
  51. package/dist/icons.svg +0 -24
  52. package/dist/main.d.ts +0 -0
  53. package/dist/munza-x-data-grid.js +0 -192
  54. package/dist/munza-x-data-grid.umd.cjs +0 -6
package/README.md CHANGED
@@ -1,73 +1,288 @@
1
- # React + TypeScript + Vite
2
-
3
- This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
4
-
5
- Currently, two official plugins are available:
6
-
7
- - [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react) uses [Oxc](https://oxc.rs)
8
- - [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react-swc) uses [SWC](https://swc.rs/)
9
-
10
- ## React Compiler
11
-
12
- The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see [this documentation](https://react.dev/learn/react-compiler/installation).
13
-
14
- ## Expanding the ESLint configuration
15
-
16
- If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
17
-
18
- ```js
19
- export default defineConfig([
20
- globalIgnores(['dist']),
21
- {
22
- files: ['**/*.{ts,tsx}'],
23
- extends: [
24
- // Other configs...
25
-
26
- // Remove tseslint.configs.recommended and replace with this
27
- tseslint.configs.recommendedTypeChecked,
28
- // Alternatively, use this for stricter rules
29
- tseslint.configs.strictTypeChecked,
30
- // Optionally, add this for stylistic rules
31
- tseslint.configs.stylisticTypeChecked,
32
-
33
- // Other configs...
34
- ],
35
- languageOptions: {
36
- parserOptions: {
37
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
38
- tsconfigRootDir: import.meta.dirname,
39
- },
40
- // other options...
41
- },
42
- },
43
- ])
44
- ```
45
-
46
- You can also install [eslint-plugin-react-x](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-x) and [eslint-plugin-react-dom](https://github.com/Rel1cx/eslint-react/tree/main/packages/plugins/eslint-plugin-react-dom) for React-specific lint rules:
47
-
48
- ```js
49
- // eslint.config.js
50
- import reactX from 'eslint-plugin-react-x'
51
- import reactDom from 'eslint-plugin-react-dom'
52
-
53
- export default defineConfig([
54
- globalIgnores(['dist']),
55
- {
56
- files: ['**/*.{ts,tsx}'],
57
- extends: [
58
- // Other configs...
59
- // Enable lint rules for React
60
- reactX.configs['recommended-typescript'],
61
- // Enable lint rules for React DOM
62
- reactDom.configs.recommended,
63
- ],
64
- languageOptions: {
65
- parserOptions: {
66
- project: ['./tsconfig.node.json', './tsconfig.app.json'],
67
- tsconfigRootDir: import.meta.dirname,
68
- },
69
- // other options...
70
- },
71
- },
72
- ])
73
- ```
1
+ # munza-x-data-grid
2
+
3
+ A flexible, feature-rich React data grid component built on top of [@tanstack/react-table](https://tanstack.com/table), with Tailwind CSS v4 styling and shadcn/ui primitives.
4
+
5
+ ---
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install munza-x-data-grid
11
+ ```
12
+
13
+ Import the stylesheet in your app entry point:
14
+
15
+ ```js
16
+ import 'munza-x-data-grid/style.css';
17
+ ```
18
+
19
+ ### Peer Dependencies
20
+
21
+ ```bash
22
+ npm install react react-dom
23
+ ```
24
+
25
+ Requires **React 18 or 19**.
26
+
27
+ ---
28
+
29
+ ## Basic Usage
30
+
31
+ ```tsx
32
+ import { Grid, useGridState, type ColumnDef } from 'munza-x-data-grid';
33
+ import 'munza-x-data-grid/style.css';
34
+
35
+ type Person = {
36
+ firstName: string;
37
+ lastName: string;
38
+ age: number;
39
+ };
40
+
41
+ const columns: ColumnDef<Person>[] = [
42
+ { accessorKey: 'firstName', header: 'First Name' },
43
+ { accessorKey: 'lastName', header: 'Last Name' },
44
+ { accessorKey: 'age', header: 'Age' },
45
+ ];
46
+
47
+ const data: Person[] = [{ firstName: 'Alice', lastName: 'Smith', age: 30 }];
48
+
49
+ export default function App() {
50
+ const { state, handlers } = useGridState();
51
+
52
+ return (
53
+ <Grid
54
+ columns={columns}
55
+ payload={{ data, total: data.length }}
56
+ state={state}
57
+ {...handlers}
58
+ />
59
+ );
60
+ }
61
+ ```
62
+
63
+ ---
64
+
65
+ ## API Reference
66
+
67
+ ### `<Grid />`
68
+
69
+ The top-level component that renders the full data grid.
70
+
71
+ | Prop | Type | Required | Description |
72
+ | ----------------------- | ------------------------------------------ | -------- | -------------------------------------------------------- |
73
+ | `columns` | `ColumnDef<T>[]` | ✅ | Column definitions (TanStack Table format) |
74
+ | `payload` | `{ data: T[], total: number }` | ✅ | Row data and total count for pagination |
75
+ | `state` | `Partial<TableState>` | ✅ | Controlled table state (from `useGridState`) |
76
+ | `onColumnFiltersChange` | `OnChangeFn<ColumnFiltersState>` | — | Callback for column filter changes |
77
+ | `onPaginationChange` | `OnChangeFn<PaginationState>` | — | Callback for pagination changes |
78
+ | `onSortingChange` | `OnChangeFn<SortingState>` | — | Callback for sort changes |
79
+ | `setGlobalFilter` | `Dispatch<SetStateAction<string>>` | — | Callback to update the global search filter |
80
+ | `isLoading` | `boolean` | — | Displays a loading state |
81
+ | `isError` | `boolean` | — | Displays an error state |
82
+ | `manualPagination` | `boolean` | — | Set `true` for server-side pagination (default: `false`) |
83
+ | `getRowCanExpand` | `(row: Row<T>) => boolean` | — | Controls which rows are expandable |
84
+ | `renderSubComponent` | `(props: { row: Row<T> }) => ReactElement` | — | Renders expanded row content |
85
+
86
+ ---
87
+
88
+ ### `useGridState()`
89
+
90
+ Hook that provides controlled state and event handlers to pass into `<Grid />`.
91
+
92
+ ```tsx
93
+ const { state, handlers } = useGridState();
94
+ ```
95
+
96
+ **Returns:**
97
+
98
+ | Key | Description |
99
+ | ---------- | ----------------------------------------------------------------------------------------------------- |
100
+ | `state` | Partial `TableState` object (sorting, pagination, filters, etc.) |
101
+ | `handlers` | Object containing `onSortingChange`, `onPaginationChange`, `onColumnFiltersChange`, `setGlobalFilter` |
102
+
103
+ Spread `handlers` directly onto `<Grid />`:
104
+
105
+ ```tsx
106
+ <Grid state={state} {...handlers} columns={columns} payload={payload} />
107
+ ```
108
+
109
+ ### Tailwind v4 Setup
110
+
111
+ If you're using Tailwind v4, add this to your `app.css` so Tailwind scans the grid's classes:
112
+
113
+ ```css
114
+ @source "../node_modules/munza-x-data-grid/**/*.{js,ts,jsx,tsx}";
115
+ @theme inline {
116
+ --color-background: var(--background);
117
+ --color-foreground: var(--foreground);
118
+ --color-border: var(--border);
119
+ --color-muted: var(--muted);
120
+ --color-accent: var(--accent);
121
+ }
122
+
123
+ :root {
124
+ --background: oklch(1 0 0);
125
+ --foreground: oklch(0.145 0 0);
126
+ --border: oklch(0.922 0 0);
127
+ --muted: oklch(0.97 0 0);
128
+ --accent: oklch(0.97 0 0);
129
+ }
130
+
131
+ .dark {
132
+ --background: oklch(0.145 0 0);
133
+ --foreground: oklch(0.985 0 0);
134
+ --border: oklch(1 0 0 / 10%);
135
+ --muted: oklch(0.269 0 0);
136
+ --accent: oklch(0.269 0 0);
137
+ }
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Column Definitions
143
+
144
+ Columns follow the standard [TanStack Table `ColumnDef`](https://tanstack.com/table/latest/docs/api/core/column-def) format with an additional `meta` field for filter configuration.
145
+
146
+ ### Filter Variants
147
+
148
+ Set `meta.filterVariant` on a column to control its filter UI:
149
+
150
+ ```tsx
151
+ {
152
+ accessorKey: 'status',
153
+ header: 'Status',
154
+ meta: {
155
+ filterVariant: 'select', // dropdown filter
156
+ },
157
+ }
158
+
159
+ {
160
+ accessorKey: 'age',
161
+ header: 'Age',
162
+ meta: {
163
+ filterVariant: 'text', // text input filter
164
+ },
165
+ }
166
+ ```
167
+
168
+ ### Row Number Column
169
+
170
+ ```tsx
171
+ {
172
+ accessorFn: (_row, index) => index + 1,
173
+ cell: ({ row }) => row.index + 1,
174
+ id: 'rowNumber',
175
+ header: '',
176
+ size: 54,
177
+ maxSize: 54,
178
+ enableColumnFilter: false,
179
+ }
180
+ ```
181
+
182
+ ### Checkbox Selection Column
183
+
184
+ ```tsx
185
+ {
186
+ id: 'select',
187
+ header: ({ table }) => (
188
+ <Checkbox
189
+ checked={
190
+ table.getIsAllPageRowsSelected() ||
191
+ (table.getIsSomePageRowsSelected() && 'indeterminate')
192
+ }
193
+ onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
194
+ aria-label="Select all"
195
+ />
196
+ ),
197
+ cell: ({ row }) => (
198
+ <Checkbox
199
+ checked={row.getIsSelected()}
200
+ onCheckedChange={(value) => row.toggleSelected(!!value)}
201
+ aria-label="Select row"
202
+ />
203
+ ),
204
+ size: 40,
205
+ maxSize: 40,
206
+ enableColumnFilter: false,
207
+ }
208
+ ```
209
+
210
+ ---
211
+
212
+ ## Server-Side Pagination
213
+
214
+ Set `manualPagination` to `true` and pass `payload.total` as the full server-side count.
215
+
216
+ ```tsx
217
+ <Grid
218
+ columns={columns}
219
+ payload={{ data: serverData, total: serverTotal }}
220
+ state={state}
221
+ {...handlers}
222
+ manualPagination={true}
223
+ />
224
+ ```
225
+
226
+ The built-in pagination UI supports the following page sizes:
227
+
228
+ ```
229
+ 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000
230
+ ```
231
+
232
+ ---
233
+
234
+ ## Expandable Rows
235
+
236
+ ```tsx
237
+ <Grid
238
+ columns={columns}
239
+ payload={payload}
240
+ state={state}
241
+ {...handlers}
242
+ getRowCanExpand={(row) => !!row.original.subRows?.length}
243
+ renderSubComponent={({ row }) => (
244
+ <div className="p-4">
245
+ <pre>{JSON.stringify(row.original, null, 2)}</pre>
246
+ </div>
247
+ )}
248
+ />
249
+ ```
250
+
251
+ ---
252
+
253
+ ## Column Pinning
254
+
255
+ Column pinning is managed internally by the grid. No additional configuration is required — use the built-in toolbar UI to pin columns left or right.
256
+
257
+ ---
258
+
259
+ ## Default Column Sizing
260
+
261
+ | Property | Default |
262
+ | --------- | ------- |
263
+ | `size` | `180px` |
264
+ | `minSize` | `180px` |
265
+ | `maxSize` | `180px` |
266
+
267
+ Override per-column:
268
+
269
+ ```tsx
270
+ {
271
+ accessorKey: 'id',
272
+ size: 60,
273
+ minSize: 60,
274
+ maxSize: 60,
275
+ }
276
+ ```
277
+
278
+ ---
279
+
280
+ ## TypeScript
281
+
282
+ All props and hooks are fully typed. Import types directly from the package:
283
+
284
+ ```ts
285
+ import type { ColumnDef } from 'munza-x-data-grid';
286
+ ```
287
+
288
+ TanStack Table types (`Row`, `TableState`, `PaginationState`, etc.) are re-exported and available from `@tanstack/react-table`.
package/dist/README.md ADDED
@@ -0,0 +1,288 @@
1
+ # munza-x-data-grid
2
+
3
+ A flexible, feature-rich React data grid component built on top of [@tanstack/react-table](https://tanstack.com/table), with Tailwind CSS v4 styling and shadcn/ui primitives.
4
+
5
+ ---
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install munza-x-data-grid
11
+ ```
12
+
13
+ Import the stylesheet in your app entry point:
14
+
15
+ ```js
16
+ import 'munza-x-data-grid/style.css';
17
+ ```
18
+
19
+ ### Peer Dependencies
20
+
21
+ ```bash
22
+ npm install react react-dom
23
+ ```
24
+
25
+ Requires **React 18 or 19**.
26
+
27
+ ---
28
+
29
+ ## Basic Usage
30
+
31
+ ```tsx
32
+ import { Grid, useGridState, type ColumnDef } from 'munza-x-data-grid';
33
+ import 'munza-x-data-grid/style.css';
34
+
35
+ type Person = {
36
+ firstName: string;
37
+ lastName: string;
38
+ age: number;
39
+ };
40
+
41
+ const columns: ColumnDef<Person>[] = [
42
+ { accessorKey: 'firstName', header: 'First Name' },
43
+ { accessorKey: 'lastName', header: 'Last Name' },
44
+ { accessorKey: 'age', header: 'Age' },
45
+ ];
46
+
47
+ const data: Person[] = [{ firstName: 'Alice', lastName: 'Smith', age: 30 }];
48
+
49
+ export default function App() {
50
+ const { state, handlers } = useGridState();
51
+
52
+ return (
53
+ <Grid
54
+ columns={columns}
55
+ payload={{ data, total: data.length }}
56
+ state={state}
57
+ {...handlers}
58
+ />
59
+ );
60
+ }
61
+ ```
62
+
63
+ ---
64
+
65
+ ## API Reference
66
+
67
+ ### `<Grid />`
68
+
69
+ The top-level component that renders the full data grid.
70
+
71
+ | Prop | Type | Required | Description |
72
+ | ----------------------- | ------------------------------------------ | -------- | -------------------------------------------------------- |
73
+ | `columns` | `ColumnDef<T>[]` | ✅ | Column definitions (TanStack Table format) |
74
+ | `payload` | `{ data: T[], total: number }` | ✅ | Row data and total count for pagination |
75
+ | `state` | `Partial<TableState>` | ✅ | Controlled table state (from `useGridState`) |
76
+ | `onColumnFiltersChange` | `OnChangeFn<ColumnFiltersState>` | — | Callback for column filter changes |
77
+ | `onPaginationChange` | `OnChangeFn<PaginationState>` | — | Callback for pagination changes |
78
+ | `onSortingChange` | `OnChangeFn<SortingState>` | — | Callback for sort changes |
79
+ | `setGlobalFilter` | `Dispatch<SetStateAction<string>>` | — | Callback to update the global search filter |
80
+ | `isLoading` | `boolean` | — | Displays a loading state |
81
+ | `isError` | `boolean` | — | Displays an error state |
82
+ | `manualPagination` | `boolean` | — | Set `true` for server-side pagination (default: `false`) |
83
+ | `getRowCanExpand` | `(row: Row<T>) => boolean` | — | Controls which rows are expandable |
84
+ | `renderSubComponent` | `(props: { row: Row<T> }) => ReactElement` | — | Renders expanded row content |
85
+
86
+ ---
87
+
88
+ ### `useGridState()`
89
+
90
+ Hook that provides controlled state and event handlers to pass into `<Grid />`.
91
+
92
+ ```tsx
93
+ const { state, handlers } = useGridState();
94
+ ```
95
+
96
+ **Returns:**
97
+
98
+ | Key | Description |
99
+ | ---------- | ----------------------------------------------------------------------------------------------------- |
100
+ | `state` | Partial `TableState` object (sorting, pagination, filters, etc.) |
101
+ | `handlers` | Object containing `onSortingChange`, `onPaginationChange`, `onColumnFiltersChange`, `setGlobalFilter` |
102
+
103
+ Spread `handlers` directly onto `<Grid />`:
104
+
105
+ ```tsx
106
+ <Grid state={state} {...handlers} columns={columns} payload={payload} />
107
+ ```
108
+
109
+ ### Tailwind v4 Setup
110
+
111
+ If you're using Tailwind v4, add this to your `app.css` so Tailwind scans the grid's classes:
112
+
113
+ ```css
114
+ @source "../node_modules/munza-x-data-grid/**/*.{js,ts,jsx,tsx}";
115
+ @theme inline {
116
+ --color-background: var(--background);
117
+ --color-foreground: var(--foreground);
118
+ --color-border: var(--border);
119
+ --color-muted: var(--muted);
120
+ --color-accent: var(--accent);
121
+ }
122
+
123
+ :root {
124
+ --background: oklch(1 0 0);
125
+ --foreground: oklch(0.145 0 0);
126
+ --border: oklch(0.922 0 0);
127
+ --muted: oklch(0.97 0 0);
128
+ --accent: oklch(0.97 0 0);
129
+ }
130
+
131
+ .dark {
132
+ --background: oklch(0.145 0 0);
133
+ --foreground: oklch(0.985 0 0);
134
+ --border: oklch(1 0 0 / 10%);
135
+ --muted: oklch(0.269 0 0);
136
+ --accent: oklch(0.269 0 0);
137
+ }
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Column Definitions
143
+
144
+ Columns follow the standard [TanStack Table `ColumnDef`](https://tanstack.com/table/latest/docs/api/core/column-def) format with an additional `meta` field for filter configuration.
145
+
146
+ ### Filter Variants
147
+
148
+ Set `meta.filterVariant` on a column to control its filter UI:
149
+
150
+ ```tsx
151
+ {
152
+ accessorKey: 'status',
153
+ header: 'Status',
154
+ meta: {
155
+ filterVariant: 'select', // dropdown filter
156
+ },
157
+ }
158
+
159
+ {
160
+ accessorKey: 'age',
161
+ header: 'Age',
162
+ meta: {
163
+ filterVariant: 'text', // text input filter
164
+ },
165
+ }
166
+ ```
167
+
168
+ ### Row Number Column
169
+
170
+ ```tsx
171
+ {
172
+ accessorFn: (_row, index) => index + 1,
173
+ cell: ({ row }) => row.index + 1,
174
+ id: 'rowNumber',
175
+ header: '',
176
+ size: 54,
177
+ maxSize: 54,
178
+ enableColumnFilter: false,
179
+ }
180
+ ```
181
+
182
+ ### Checkbox Selection Column
183
+
184
+ ```tsx
185
+ {
186
+ id: 'select',
187
+ header: ({ table }) => (
188
+ <Checkbox
189
+ checked={
190
+ table.getIsAllPageRowsSelected() ||
191
+ (table.getIsSomePageRowsSelected() && 'indeterminate')
192
+ }
193
+ onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
194
+ aria-label="Select all"
195
+ />
196
+ ),
197
+ cell: ({ row }) => (
198
+ <Checkbox
199
+ checked={row.getIsSelected()}
200
+ onCheckedChange={(value) => row.toggleSelected(!!value)}
201
+ aria-label="Select row"
202
+ />
203
+ ),
204
+ size: 40,
205
+ maxSize: 40,
206
+ enableColumnFilter: false,
207
+ }
208
+ ```
209
+
210
+ ---
211
+
212
+ ## Server-Side Pagination
213
+
214
+ Set `manualPagination` to `true` and pass `payload.total` as the full server-side count.
215
+
216
+ ```tsx
217
+ <Grid
218
+ columns={columns}
219
+ payload={{ data: serverData, total: serverTotal }}
220
+ state={state}
221
+ {...handlers}
222
+ manualPagination={true}
223
+ />
224
+ ```
225
+
226
+ The built-in pagination UI supports the following page sizes:
227
+
228
+ ```
229
+ 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000
230
+ ```
231
+
232
+ ---
233
+
234
+ ## Expandable Rows
235
+
236
+ ```tsx
237
+ <Grid
238
+ columns={columns}
239
+ payload={payload}
240
+ state={state}
241
+ {...handlers}
242
+ getRowCanExpand={(row) => !!row.original.subRows?.length}
243
+ renderSubComponent={({ row }) => (
244
+ <div className="p-4">
245
+ <pre>{JSON.stringify(row.original, null, 2)}</pre>
246
+ </div>
247
+ )}
248
+ />
249
+ ```
250
+
251
+ ---
252
+
253
+ ## Column Pinning
254
+
255
+ Column pinning is managed internally by the grid. No additional configuration is required — use the built-in toolbar UI to pin columns left or right.
256
+
257
+ ---
258
+
259
+ ## Default Column Sizing
260
+
261
+ | Property | Default |
262
+ | --------- | ------- |
263
+ | `size` | `180px` |
264
+ | `minSize` | `180px` |
265
+ | `maxSize` | `180px` |
266
+
267
+ Override per-column:
268
+
269
+ ```tsx
270
+ {
271
+ accessorKey: 'id',
272
+ size: 60,
273
+ minSize: 60,
274
+ maxSize: 60,
275
+ }
276
+ ```
277
+
278
+ ---
279
+
280
+ ## TypeScript
281
+
282
+ All props and hooks are fully typed. Import types directly from the package:
283
+
284
+ ```ts
285
+ import type { ColumnDef } from 'munza-x-data-grid';
286
+ ```
287
+
288
+ TanStack Table types (`Row`, `TableState`, `PaginationState`, etc.) are re-exported and available from `@tanstack/react-table`.
@@ -0,0 +1,2 @@
1
+ declare const NoDataFoundMsg: () => import("react/jsx-runtime").JSX.Element;
2
+ export default NoDataFoundMsg;
@@ -0,0 +1,2 @@
1
+ declare const TableError: () => import("react/jsx-runtime").JSX.Element;
2
+ export default TableError;
@@ -0,0 +1,2 @@
1
+ declare const TableErrorMsg: () => import("react/jsx-runtime").JSX.Element;
2
+ export default TableErrorMsg;
@@ -0,0 +1,2 @@
1
+ declare const TableNoData: () => import("react/jsx-runtime").JSX.Element;
2
+ export default TableNoData;
@@ -0,0 +1,7 @@
1
+ import { Column } from '@tanstack/react-table';
2
+ declare const TableRowSkeleton: ({ column, i, j, }: {
3
+ column: Column<unknown, unknown>;
4
+ i: number;
5
+ j: number;
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ export default TableRowSkeleton;
@@ -0,0 +1,2 @@
1
+ declare const TableSkeleton: () => import("react/jsx-runtime").JSX.Element;
2
+ export default TableSkeleton;
@@ -0,0 +1,5 @@
1
+ import { Column } from '@tanstack/react-table';
2
+ declare const HeaderFilter: <T>({ column }: {
3
+ column: Column<T, unknown>;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
5
+ export default HeaderFilter;
@@ -0,0 +1,5 @@
1
+ import { Header } from '@tanstack/react-table';
2
+ declare const HeaderMenu: <T>({ header }: {
3
+ header: Header<T, unknown>;
4
+ }) => import("react/jsx-runtime").JSX.Element | null;
5
+ export default HeaderMenu;
@@ -0,0 +1,5 @@
1
+ import { Header } from '@tanstack/react-table';
2
+ declare const HeaderSort: <T>({ header }: {
3
+ header: Header<T, unknown>;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default HeaderSort;