@qoretechnologies/reqore 0.56.0 → 0.56.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 (55) hide show
  1. package/dist/components/Button/index.d.ts +6 -0
  2. package/dist/components/Button/index.d.ts.map +1 -1
  3. package/dist/components/Button/index.js +3 -0
  4. package/dist/components/Button/index.js.map +1 -1
  5. package/dist/components/DatePicker/index.d.ts.map +1 -1
  6. package/dist/components/DatePicker/index.js +1 -1
  7. package/dist/components/DatePicker/index.js.map +1 -1
  8. package/dist/components/Dropdown/index.d.ts +1 -1
  9. package/dist/components/Dropdown/index.d.ts.map +1 -1
  10. package/dist/components/Dropdown/index.js +2 -2
  11. package/dist/components/Dropdown/index.js.map +1 -1
  12. package/dist/components/InternalPopover/index.d.ts +3 -0
  13. package/dist/components/InternalPopover/index.d.ts.map +1 -1
  14. package/dist/components/InternalPopover/index.js +2 -2
  15. package/dist/components/InternalPopover/index.js.map +1 -1
  16. package/dist/components/Menu/index.d.ts +4 -1
  17. package/dist/components/Menu/index.d.ts.map +1 -1
  18. package/dist/components/Panel/index.d.ts +3 -0
  19. package/dist/components/Panel/index.d.ts.map +1 -1
  20. package/dist/components/Panel/index.js +18 -3
  21. package/dist/components/Panel/index.js.map +1 -1
  22. package/dist/components/Popover/index.d.ts +1 -0
  23. package/dist/components/Popover/index.d.ts.map +1 -1
  24. package/dist/components/Popover/index.js +129 -20
  25. package/dist/components/Popover/index.js.map +1 -1
  26. package/dist/components/RichTextEditor/index.d.ts.map +1 -1
  27. package/dist/components/RichTextEditor/index.js +55 -17
  28. package/dist/components/RichTextEditor/index.js.map +1 -1
  29. package/dist/components/Textarea/index.d.ts.map +1 -1
  30. package/dist/components/Textarea/index.js +1 -1
  31. package/dist/components/Textarea/index.js.map +1 -1
  32. package/dist/constants/sizes.d.ts +64 -2
  33. package/dist/constants/sizes.d.ts.map +1 -1
  34. package/dist/constants/sizes.js +99 -39
  35. package/dist/constants/sizes.js.map +1 -1
  36. package/dist/containers/UIProvider.d.ts +6 -0
  37. package/dist/containers/UIProvider.d.ts.map +1 -1
  38. package/dist/containers/UIProvider.js +3 -0
  39. package/dist/containers/UIProvider.js.map +1 -1
  40. package/dist/index.d.ts +5 -5
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +2 -2
  43. package/dist/index.js.map +1 -1
  44. package/docs/docs/components/button.mdx +391 -0
  45. package/docs/docs/components/input.mdx +328 -0
  46. package/docs/docs/components/panel.mdx +442 -0
  47. package/docs/docs/components/table.mdx +872 -0
  48. package/docs/docs/guides/effects.mdx +586 -0
  49. package/docs/docs/guides/getting-started.mdx +164 -0
  50. package/docs/docs/guides/theming.mdx +252 -0
  51. package/docs/docs/intro.md +98 -0
  52. package/docs/sidebars.js +23 -0
  53. package/package.json +11 -3
  54. package/tests.json +1 -1
  55. package/typedoc.json +10 -0
@@ -0,0 +1,872 @@
1
+ ---
2
+ sidebar_position: 4
3
+ ---
4
+
5
+ import LiveDemo from '../../src/components/LiveDemo';
6
+ import { ReqoreTable, ReqoreButton, ReqoreControlGroup } from '../../../src';
7
+
8
+ # Table
9
+
10
+ Feature-rich data table component with sorting, filtering, pagination, and customizable cells.
11
+
12
+ ## Props
13
+
14
+ | Prop | Type | Required | Default | Description |
15
+ | ------------------ | ---------------------- | -------- | ---------- | ----------------------- |
16
+ | `columns` | `IReqoreTableColumn[]` | ✓ | - | Column definitions |
17
+ | `data` | `any[]` | ✓ | - | Table data |
18
+ | `height` | `number` | - | - | Table height in pixels |
19
+ | `width` | `number` | - | - | Table width in pixels |
20
+ | `sort` | `object` | - | - | Sort configuration |
21
+ | `onSortChange` | `function` | - | - | Sort change callback |
22
+ | `filter` | `string` | - | - | Global filter text |
23
+ | `paging` | `object \| boolean` | - | - | Pagination config |
24
+ | `selectable` | `boolean` | - | `false` | Enable row selection |
25
+ | `selected` | `string[]` | - | - | Pre-selected row IDs |
26
+ | `onSelectedChange` | `function` | - | - | Selection callback |
27
+ | `onRowClick` | `function` | - | - | Row click handler |
28
+ | `exportable` | `boolean` | - | `false` | Enable export |
29
+ | `exportFileName` | `string` | - | - | Export file name |
30
+ | `striped` | `boolean` | - | `false` | Striped rows |
31
+ | `size` | `TSizes` | - | `'normal'` | Table size |
32
+ | `intent` | `TReqoreIntent` | - | - | Color intent |
33
+ | `flat` | `boolean` | - | `true` | Flat styling |
34
+ | `filterable` | `boolean` | - | `false` | Enable column filtering |
35
+ | `zoomable` | `boolean` | - | `false` | Enable zoom controls |
36
+ | `rounded` | `boolean` | - | - | Rounded corners |
37
+ | `fill` | `boolean` | - | `false` | Fill parent container |
38
+
39
+ ## Basic Usage
40
+
41
+ <LiveDemo vertical>
42
+ <ReqoreTable
43
+ columns={[
44
+ { dataId: 'name', header: { label: 'Name' }, minWidth: 150, width: 150, grow: 1 },
45
+ { dataId: 'age', header: { label: 'Age' }, minWidth: 80, width: 80 },
46
+ { dataId: 'email', header: { label: 'Email' }, minWidth: 200, width: 200 },
47
+ ]}
48
+ data={[
49
+ { name: 'John Doe', age: 30, email: 'john@example.com' },
50
+ { name: 'Jane Smith', age: 25, email: 'jane@example.com' },
51
+ ]}
52
+ />
53
+ </LiveDemo>
54
+
55
+ ```tsx
56
+ import { ReqoreTable } from '@qoretechnologies/reqore';
57
+
58
+ function Example() {
59
+ const columns = [
60
+ { dataId: 'name', header: { label: 'Name' }, minWidth: 150 },
61
+ { dataId: 'age', header: { label: 'Age' }, minWidth: 80 },
62
+ { dataId: 'email', header: { label: 'Email' }, minWidth: 200 },
63
+ ];
64
+
65
+ const data = [
66
+ { name: 'John Doe', age: 30, email: 'john@example.com' },
67
+ { name: 'Jane Smith', age: 25, email: 'jane@example.com' },
68
+ ];
69
+
70
+ return <ReqoreTable columns={columns} data={data} />;
71
+ }}
72
+ ```
73
+
74
+ ## Sortable Columns
75
+
76
+ <LiveDemo vertical>
77
+ <ReqoreTable
78
+ columns={[
79
+ {
80
+ dataId: 'name',
81
+ header: { label: 'Name' },
82
+ sortable: true,
83
+ minWidth: 150,
84
+ width: 150,
85
+ grow: 1,
86
+ },
87
+ { dataId: 'age', header: { label: 'Age' }, sortable: true, minWidth: 80, width: 80 },
88
+ { dataId: 'email', header: { label: 'Email' }, minWidth: 200, width: 200 },
89
+ ]}
90
+ data={[
91
+ { name: 'John Doe', age: 30, email: 'john@example.com' },
92
+ { name: 'Jane Smith', age: 25, email: 'jane@example.com' },
93
+ { name: 'Bob Johnson', age: 35, email: 'bob@example.com' },
94
+ ]}
95
+ />
96
+ </LiveDemo>
97
+
98
+ ```tsx
99
+ const columns = [
100
+ {
101
+ dataId: 'name',
102
+ header: { label: 'Name' },
103
+ sortable: true,
104
+ minWidth: 150,
105
+ },
106
+ {
107
+ dataId: 'age',
108
+ header: { label: 'Age' },
109
+ sortable: true,
110
+ minWidth: 80,
111
+ },
112
+ ];
113
+
114
+ <ReqoreTable
115
+ columns={columns}
116
+ data={data}
117
+ sort={{ by: 'name', direction: 'asc' }}
118
+ onSortChange={(sortData) => console.log(sortData)}
119
+ />;
120
+ ```
121
+
122
+ ## With Icons
123
+
124
+ <LiveDemo vertical>
125
+ <ReqoreTable
126
+ columns={[
127
+ {
128
+ dataId: 'user',
129
+ header: { label: 'User', icon: 'UserLine' },
130
+ minWidth: 150,
131
+ width: 150,
132
+ grow: 1,
133
+ },
134
+ {
135
+ dataId: 'status',
136
+ header: { label: 'Status', icon: 'CheckLine' },
137
+ minWidth: 120,
138
+ width: 120,
139
+ },
140
+ ]}
141
+ data={[
142
+ { user: 'John Doe', status: 'Active' },
143
+ { user: 'Jane Smith', status: 'Inactive' },
144
+ ]}
145
+ />
146
+ </LiveDemo>
147
+
148
+ ```tsx
149
+ const columns = [
150
+ {
151
+ dataId: 'user',
152
+ header: {
153
+ label: 'User',
154
+ icon: 'UserLine',
155
+ },
156
+ minWidth: 150,
157
+ },
158
+ {
159
+ dataId: 'status',
160
+ header: {
161
+ label: 'Status',
162
+ icon: 'CheckLine',
163
+ },
164
+ minWidth: 120,
165
+ },
166
+ ];
167
+ ```
168
+
169
+ ## Cell Customization
170
+
171
+ <LiveDemo vertical>
172
+ <ReqoreTable
173
+ columns={[
174
+ {
175
+ dataId: 'name',
176
+ header: { label: 'Name' },
177
+ minWidth: 150,
178
+ width: 150,
179
+ grow: 1,
180
+ },
181
+ {
182
+ dataId: 'status',
183
+ header: { label: 'Status' },
184
+ cell: { align: 'center' },
185
+ minWidth: 120,
186
+ width: 120,
187
+ },
188
+ {
189
+ dataId: 'age',
190
+ header: { label: 'Age' },
191
+ cell: { align: 'center' },
192
+ minWidth: 80,
193
+ width: 80,
194
+ },
195
+ ]}
196
+ data={[
197
+ { name: 'John Doe', status: 'Active', age: 30 },
198
+ { name: 'Jane Smith', status: 'Pending', age: 25 },
199
+ ]}
200
+ />
201
+ </LiveDemo>
202
+
203
+ ```tsx
204
+ const columns = [
205
+ {
206
+ dataId: 'name',
207
+ header: { label: 'Name' },
208
+ minWidth: 150,
209
+ },
210
+ {
211
+ dataId: 'status',
212
+ header: { label: 'Status' },
213
+ cell: {
214
+ content: 'tag:success', // Render as tag
215
+ intent: 'success',
216
+ align: 'center',
217
+ },
218
+ minWidth: 120,
219
+ },
220
+ {
221
+ dataId: 'age',
222
+ header: { label: 'Age' },
223
+ cell: {
224
+ align: 'center',
225
+ tooltip: (value) => `Age: ${value}`,
226
+ },
227
+ minWidth: 80,
228
+ },
229
+ ];
230
+ ```
231
+
232
+ ## Column Width
233
+
234
+ <LiveDemo vertical>
235
+ <ReqoreTable
236
+ columns={[
237
+ {
238
+ dataId: 'name',
239
+ header: { label: 'Name' },
240
+ grow: 2,
241
+ minWidth: 150,
242
+ width: 150,
243
+ },
244
+ {
245
+ dataId: 'email',
246
+ header: { label: 'Email' },
247
+ minWidth: 200,
248
+ width: 200,
249
+ },
250
+ ]}
251
+ data={[
252
+ { name: 'John Doe', email: 'john@example.com' },
253
+ { name: 'Jane Smith', email: 'jane@example.com' },
254
+ ]}
255
+ />
256
+ </LiveDemo>
257
+
258
+ ```tsx
259
+ const columns = [
260
+ {
261
+ dataId: 'name',
262
+ header: { label: 'Name' },
263
+ width: 200,
264
+ minWidth: 150,
265
+ grow: 2, // Takes 2x space relative to other columns
266
+ },
267
+ {
268
+ dataId: 'email',
269
+ header: { label: 'Email' },
270
+ width: 300,
271
+ minWidth: 200,
272
+ },
273
+ ];
274
+ ```
275
+
276
+ ## Column Pinning
277
+
278
+ <LiveDemo vertical>
279
+ <ReqoreTable
280
+ columns={[
281
+ {
282
+ dataId: 'name',
283
+ header: { label: 'Name' },
284
+ pin: 'left',
285
+ minWidth: 150,
286
+ width: 150,
287
+ },
288
+ {
289
+ dataId: 'email',
290
+ header: { label: 'Email' },
291
+ minWidth: 200,
292
+ width: 200,
293
+ grow: 1,
294
+ },
295
+ {
296
+ dataId: 'role',
297
+ header: { label: 'Role' },
298
+ minWidth: 150,
299
+ width: 150,
300
+ },
301
+ {
302
+ dataId: 'status',
303
+ header: { label: 'Status' },
304
+ pin: 'right',
305
+ minWidth: 100,
306
+ width: 100,
307
+ },
308
+ ]}
309
+ data={[
310
+ { name: 'John Doe', email: 'john@example.com', role: 'Developer', status: 'Active' },
311
+ { name: 'Jane Smith', email: 'jane@example.com', role: 'Manager', status: 'Active' },
312
+ { name: 'Bob Johnson', email: 'bob@example.com', role: 'Designer', status: 'Away' },
313
+ ]}
314
+ />
315
+ </LiveDemo>
316
+
317
+ ```tsx
318
+ const columns = [
319
+ {
320
+ dataId: 'name',
321
+ header: { label: 'Name' },
322
+ pin: 'left', // Pin to left side
323
+ minWidth: 150,
324
+ },
325
+ {
326
+ dataId: 'email',
327
+ header: { label: 'Email' },
328
+ minWidth: 200,
329
+ },
330
+ {
331
+ dataId: 'role',
332
+ header: { label: 'Role' },
333
+ minWidth: 150,
334
+ },
335
+ {
336
+ dataId: 'status',
337
+ header: { label: 'Status' },
338
+ pin: 'right', // Pin to right side
339
+ minWidth: 100,
340
+ },
341
+ ];
342
+
343
+ <ReqoreTable columns={columns} data={data} />;
344
+ ```
345
+
346
+ ## With Pagination
347
+
348
+ <LiveDemo vertical>
349
+ <ReqoreTable
350
+ columns={[
351
+ { dataId: 'id', header: { label: 'ID' }, minWidth: 60, width: 60 },
352
+ { dataId: 'name', header: { label: 'Name' }, minWidth: 150, width: 150, grow: 1 },
353
+ { dataId: 'email', header: { label: 'Email' }, minWidth: 200, width: 200 },
354
+ ]}
355
+ data={[
356
+ { id: 1, name: 'User 1', email: 'user1@example.com' },
357
+ { id: 2, name: 'User 2', email: 'user2@example.com' },
358
+ { id: 3, name: 'User 3', email: 'user3@example.com' },
359
+ { id: 4, name: 'User 4', email: 'user4@example.com' },
360
+ { id: 5, name: 'User 5', email: 'user5@example.com' },
361
+ { id: 6, name: 'User 6', email: 'user6@example.com' },
362
+ { id: 7, name: 'User 7', email: 'user7@example.com' },
363
+ { id: 8, name: 'User 8', email: 'user8@example.com' },
364
+ { id: 9, name: 'User 9', email: 'user9@example.com' },
365
+ { id: 10, name: 'User 10', email: 'user10@example.com' },
366
+ { id: 11, name: 'User 11', email: 'user11@example.com' },
367
+ { id: 12, name: 'User 12', email: 'user12@example.com' },
368
+ ]}
369
+ paging={{
370
+ itemsPerPage: 5,
371
+ }}
372
+ />
373
+ </LiveDemo>
374
+
375
+ ```tsx
376
+ <ReqoreTable
377
+ columns={columns}
378
+ data={data}
379
+ paging={{
380
+ itemsPerPage: 10,
381
+ infinite: false,
382
+ fluid: true,
383
+ }}
384
+ />
385
+ ```
386
+
387
+ ## Filterable Columns
388
+
389
+ <LiveDemo vertical>
390
+ <ReqoreTable
391
+ columns={[
392
+ {
393
+ dataId: 'name',
394
+ header: { label: 'Name' },
395
+ filterable: true,
396
+ minWidth: 150,
397
+ width: 150,
398
+ filter: 'John',
399
+ grow: 1,
400
+ },
401
+ {
402
+ dataId: 'email',
403
+ header: { label: 'Email' },
404
+ filterable: true,
405
+ minWidth: 200,
406
+ width: 200,
407
+ },
408
+ ]}
409
+ data={[
410
+ { name: 'John Doe', email: 'john@example.com' },
411
+ { name: 'Jane Smith', email: 'jane@example.com' },
412
+ { name: 'Bob Johnson', email: 'bob@example.com' },
413
+ ]}
414
+ />
415
+ </LiveDemo>
416
+
417
+ ```tsx
418
+ const columns = [
419
+ {
420
+ dataId: 'name',
421
+ header: { label: 'Name' },
422
+ filterable: true,
423
+ minWidth: 150,
424
+ filter: 'John', // Column-specific default filter
425
+ filterPlaceholder: 'Search name...',
426
+ },
427
+ {
428
+ dataId: 'email',
429
+ header: { label: 'Email' },
430
+ filterable: true,
431
+ minWidth: 200,
432
+ },
433
+ ];
434
+
435
+ <ReqoreTable columns={columns} data={data} />;
436
+ ```
437
+
438
+ ## With Row Selection
439
+
440
+ <LiveDemo vertical>
441
+ <ReqoreTable
442
+ columns={[
443
+ { dataId: 'name', header: { label: 'Name' }, width: 150, grow: 1 },
444
+ { dataId: 'email', header: { label: 'Email' }, width: 200 },
445
+ { dataId: 'department', header: { label: 'Department' }, width: 150 },
446
+ ]}
447
+ data={[
448
+ { _selectId: '1', name: 'Sarah Wilson', email: 'sarah@example.com', department: 'Sales' },
449
+ { _selectId: '2', name: 'Mike Johnson', email: 'mike@example.com', department: 'IT' },
450
+ { _selectId: '3', name: 'Emma Davis', email: 'emma@example.com', department: 'HR' },
451
+ { _selectId: '4', name: 'Tom Miller', email: 'tom@example.com', department: 'Finance' },
452
+ ]}
453
+ selectable
454
+ />
455
+ </LiveDemo>
456
+
457
+ ```tsx
458
+ const data = [
459
+ { _selectId: '1', name: 'Sarah Wilson', email: 'sarah@example.com', department: 'Sales' },
460
+ { _selectId: '2', name: 'Mike Johnson', email: 'mike@example.com', department: 'IT' },
461
+ ];
462
+
463
+ <ReqoreTable
464
+ columns={columns}
465
+ data={data}
466
+ selectable
467
+ onSelectedChange={(selectedRows) => console.log(selectedRows)}
468
+ />;
469
+ ```
470
+
471
+ ## Nested Columns
472
+
473
+ <LiveDemo vertical>
474
+ <ReqoreTable
475
+ columns={[
476
+ {
477
+ header: { label: 'User Info' },
478
+ columns: [
479
+ { dataId: 'name', header: { label: 'Name' }, width: 150, grow: 1 },
480
+ { dataId: 'email', header: { label: 'Email' }, width: 200 },
481
+ ],
482
+ },
483
+ {
484
+ header: { label: 'Details' },
485
+ columns: [
486
+ { dataId: 'age', header: { label: 'Age' }, width: 80 },
487
+ { dataId: 'role', header: { label: 'Role' }, width: 150 },
488
+ ],
489
+ },
490
+ ]}
491
+ data={[
492
+ { name: 'Alex Brown', email: 'alex@example.com', age: '28', role: 'Manager' },
493
+ { name: 'Lisa Chen', email: 'lisa@example.com', age: '32', role: 'Developer' },
494
+ ]}
495
+ />
496
+ </LiveDemo>
497
+
498
+ ````tsx
499
+ const columns = [
500
+ {
501
+ header: { label: 'User Info' },
502
+ columns: [
503
+ { dataId: 'name', header: { label: 'Name' }, width: 150 },
504
+ { dataId: 'email', header: { label: 'Email' }, width: 200 },
505
+ ],
506
+ },
507
+ {
508
+ header: { label: 'Details' },
509
+ columns: [
510
+ { dataId: 'age', header: { label: 'Age' }, width: 80 },
511
+ { dataId: 'role', header: { label: 'Role' }, width: 150 },
512
+ ],
513
+ },
514
+ ];```
515
+ ````
516
+
517
+ ## Click Handlers
518
+
519
+ <LiveDemo vertical>
520
+ <ReqoreTable
521
+ columns={[
522
+ {
523
+ dataId: 'event',
524
+ header: {
525
+ label: 'Event Type',
526
+ },
527
+ width: 150,
528
+ },
529
+ {
530
+ dataId: 'description',
531
+ header: { label: 'Description' },
532
+ width: 250,
533
+ grow: 1,
534
+ },
535
+ ]}
536
+ data={[
537
+ { event: 'Header Click', description: 'Click column header' },
538
+ { event: 'Cell Click', description: 'Click any cell' },
539
+ { event: 'Row Click', description: 'Click entire row' },
540
+ ]}
541
+ onRowClick={(row) => alert(`Row clicked: ${row.event}`)}
542
+ />
543
+ </LiveDemo>
544
+
545
+ ````tsx
546
+ const columns = [
547
+ {
548
+ dataId: 'name',
549
+ header: {
550
+ label: 'Name',
551
+ onClick: () => console.log('Header clicked'),
552
+ },
553
+ width: 150,
554
+ cell: {
555
+ onClick: (rowData) => console.log('Cell clicked', rowData),
556
+ },
557
+ },
558
+ ];
559
+
560
+ <ReqoreTable
561
+ columns={columns}
562
+ data={data}
563
+ onRowClick={(row) => console.log('Row clicked', row)}
564
+ />```
565
+ ````
566
+
567
+ ## Exportable
568
+
569
+ <LiveDemo vertical>
570
+ <ReqoreTable
571
+ columns={[
572
+ { dataId: 'product', header: { label: 'Product' }, width: 200, grow: 1 },
573
+ { dataId: 'quantity', header: { label: 'Quantity' }, width: 120 },
574
+ { dataId: 'price', header: { label: 'Price' }, width: 120 },
575
+ ]}
576
+ data={[
577
+ { product: 'Widget A', quantity: '100', price: '$50' },
578
+ { product: 'Widget B', quantity: '250', price: '$75' },
579
+ { product: 'Widget C', quantity: '75', price: '$100' },
580
+ ]}
581
+ exportable
582
+ exportFileName='products.csv'
583
+ />
584
+ </LiveDemo>
585
+
586
+ ````tsx
587
+ <ReqoreTable
588
+ columns={columns}
589
+ data={data}
590
+ exportable
591
+ exportFileName="my-data.csv"
592
+ />```
593
+ ````
594
+
595
+ ## Striped Rows
596
+
597
+ <LiveDemo vertical>
598
+ <ReqoreTable
599
+ columns={[
600
+ { dataId: 'product', header: { label: 'Product' }, width: 200, grow: 1 },
601
+ { dataId: 'price', header: { label: 'Price' }, width: 120 },
602
+ { dataId: 'stock', header: { label: 'Stock' }, width: 100 },
603
+ ]}
604
+ data={[
605
+ { product: 'Laptop', price: '$999', stock: '5' },
606
+ { product: 'Mouse', price: '$25', stock: '50' },
607
+ { product: 'Keyboard', price: '$75', stock: '25' },
608
+ ]}
609
+ striped
610
+ />
611
+ </LiveDemo>
612
+
613
+ ```tsx
614
+ <ReqoreTable columns={columns} data={data} striped />
615
+ ```
616
+
617
+ ## Table Sizes
618
+
619
+ <LiveDemo vertical>
620
+ <ReqoreTable
621
+ columns={[
622
+ { dataId: 'id', header: { label: 'ID' }, width: 80 },
623
+ { dataId: 'name', header: { label: 'Name' }, width: 180, grow: 1 },
624
+ ]}
625
+ data={[
626
+ { id: '1', name: 'Micro table' },
627
+ { id: '2', name: 'Very compact' },
628
+ ]}
629
+ size='micro'
630
+ />
631
+ <ReqoreTable
632
+ columns={[
633
+ { dataId: 'id', header: { label: 'ID' }, width: 80 },
634
+ { dataId: 'name', header: { label: 'Name' }, width: 180, grow: 1 },
635
+ ]}
636
+ data={[
637
+ { id: '1', name: 'Tiny table' },
638
+ { id: '2', name: 'Extra small' },
639
+ ]}
640
+ size='tiny'
641
+ />
642
+ <ReqoreTable
643
+ columns={[
644
+ { dataId: 'id', header: { label: 'ID' }, width: 80 },
645
+ { dataId: 'name', header: { label: 'Name' }, width: 180, grow: 1 },
646
+ ]}
647
+ data={[
648
+ { id: '1', name: 'Small table' },
649
+ { id: '2', name: 'Compact size' },
650
+ ]}
651
+ size='small'
652
+ />
653
+ <ReqoreTable
654
+ columns={[
655
+ { dataId: 'id', header: { label: 'ID' }, width: 80 },
656
+ { dataId: 'name', header: { label: 'Name' }, width: 180, grow: 1 },
657
+ ]}
658
+ data={[
659
+ { id: '1', name: 'Big table' },
660
+ { id: '2', name: 'Spacious' },
661
+ ]}
662
+ size='big'
663
+ />
664
+ <ReqoreTable
665
+ columns={[
666
+ { dataId: 'id', header: { label: 'ID' }, width: 80 },
667
+ { dataId: 'name', header: { label: 'Name' }, width: 180, grow: 1 },
668
+ ]}
669
+ data={[
670
+ { id: '1', name: 'Huge table' },
671
+ { id: '2', name: 'Extra spacious' },
672
+ ]}
673
+ size='huge'
674
+ />
675
+ <ReqoreTable
676
+ columns={[
677
+ { dataId: 'id', header: { label: 'ID' }, width: 80 },
678
+ { dataId: 'name', header: { label: 'Name' }, width: 180, grow: 1 },
679
+ ]}
680
+ data={[
681
+ { id: '1', name: 'Massive table' },
682
+ { id: '2', name: 'Maximum spacing' },
683
+ ]}
684
+ size='massive'
685
+ />
686
+ </LiveDemo>
687
+
688
+ ```tsx
689
+ <ReqoreTable columns={columns} data={data} size='micro' />
690
+ <ReqoreTable columns={columns} data={data} size='tiny' />
691
+ <ReqoreTable columns={columns} data={data} size='small' />
692
+ <ReqoreTable columns={columns} data={data} size='big' />
693
+ <ReqoreTable columns={columns} data={data} size='huge' />
694
+ <ReqoreTable columns={columns} data={data} size='massive' />
695
+ ```
696
+
697
+ ## With Intent
698
+
699
+ <LiveDemo vertical>
700
+ <ReqoreTable
701
+ columns={[
702
+ { dataId: 'status', header: { label: 'Status' }, width: 120 },
703
+ { dataId: 'message', header: { label: 'Message' }, width: 300, grow: 1 },
704
+ ]}
705
+ data={[
706
+ { status: 'Info', message: 'This is an informational table' },
707
+ { status: 'Info', message: 'With a blue color scheme' },
708
+ ]}
709
+ intent='info'
710
+ />
711
+ </LiveDemo>
712
+
713
+ ````tsx
714
+ <ReqoreTable
715
+ columns={columns}
716
+ data={data}
717
+ intent="info"
718
+ />```
719
+ ````
720
+
721
+ ## Examples
722
+
723
+ ### User List Table
724
+
725
+ <LiveDemo vertical>
726
+ <ReqoreTable
727
+ columns={[
728
+ {
729
+ dataId: 'name',
730
+ header: { label: 'Name', icon: 'UserLine' },
731
+ sortable: true,
732
+ grow: 2,
733
+ width: 200,
734
+ },
735
+ {
736
+ dataId: 'email',
737
+ header: { label: 'Email' },
738
+ width: 220,
739
+ },
740
+ {
741
+ dataId: 'role',
742
+ header: { label: 'Role' },
743
+ width: 150,
744
+ },
745
+ {
746
+ dataId: 'status',
747
+ header: { label: 'Status' },
748
+ width: 120,
749
+ },
750
+ ]}
751
+ data={[
752
+ { name: 'Alice Johnson', email: 'alice@example.com', role: 'Admin', status: 'Active' },
753
+ { name: 'Bob Smith', email: 'bob@example.com', role: 'Manager', status: 'Active' },
754
+ { name: 'Carol White', email: 'carol@example.com', role: 'Developer', status: 'Away' },
755
+ { name: 'Diana Brown', email: 'diana@example.com', role: 'Designer', status: 'Active' },
756
+ { name: 'Eve Wilson', email: 'eve@example.com', role: 'Analyst', status: 'Offline' },
757
+ ]}
758
+ striped
759
+ paging={{ itemsPerPage: 10 }}
760
+ />
761
+ </LiveDemo>
762
+
763
+ ```tsx
764
+ function UserTable() {
765
+ const columns = [
766
+ {
767
+ dataId: 'name',
768
+ header: { label: 'Name', icon: 'UserLine' },
769
+ sortable: true,
770
+ grow: 2,
771
+ width: 200,
772
+ },
773
+ {
774
+ dataId: 'email',
775
+ header: { label: 'Email' },
776
+ width: 220,
777
+ },
778
+ {
779
+ dataId: 'role',
780
+ header: { label: 'Role' },
781
+ width: 150,
782
+ },
783
+ {
784
+ dataId: 'status',
785
+ header: { label: 'Status' },
786
+ width: 120,
787
+ },
788
+ ];
789
+
790
+ const data = [
791
+ { name: 'Alice Johnson', email: 'alice@example.com', role: 'Admin', status: 'Active' },
792
+ { name: 'Bob Smith', email: 'bob@example.com', role: 'Manager', status: 'Active' },
793
+ ];
794
+
795
+ return <ReqoreTable columns={columns} data={data} paging={{ itemsPerPage: 10 }} striped />;
796
+ }
797
+ ```
798
+
799
+ ### Interactive Table
800
+
801
+ <LiveDemo vertical>
802
+ <ReqoreTable
803
+ columns={[
804
+ {
805
+ dataId: 'product',
806
+ header: { label: 'Product' },
807
+ sortable: true,
808
+ grow: 2,
809
+ width: 200,
810
+ },
811
+ {
812
+ dataId: 'price',
813
+ header: { label: 'Price' },
814
+ sortable: true,
815
+ width: 120,
816
+ },
817
+ {
818
+ dataId: 'actions',
819
+ header: { label: 'Actions' },
820
+ width: 150,
821
+ },
822
+ ]}
823
+ data={[
824
+ { product: 'Laptop', price: '$999', actions: 'Edit | Delete' },
825
+ { product: 'Mouse', price: '$29', actions: 'Edit | Delete' },
826
+ { product: 'Keyboard', price: '$79', actions: 'Edit | Delete' },
827
+ { product: 'Monitor', price: '$299', actions: 'Edit | Delete' },
828
+ ]}
829
+ selectable
830
+ striped
831
+ />
832
+ </LiveDemo>
833
+
834
+ ```tsx
835
+ import { useState } from 'react';
836
+
837
+ function InteractiveTable() {
838
+ const [selected, setSelected] = useState([]);
839
+
840
+ const columns = [
841
+ {
842
+ dataId: 'product',
843
+ header: { label: 'Product' },
844
+ sortable: true,
845
+ width: 200,
846
+ },
847
+ {
848
+ dataId: 'price',
849
+ header: { label: 'Price' },
850
+ sortable: true,
851
+ width: 120,
852
+ },
853
+ {
854
+ dataId: 'actions',
855
+ header: { label: 'Actions' },
856
+ width: 150,
857
+ cell: {
858
+ content: (_, row) => (
859
+ <ReqoreControlGroup>
860
+ <ReqoreButton icon='EditLine' size='small' />
861
+ <ReqoreButton icon='DeleteBinLine' size='small' intent='danger' />
862
+ </ReqoreControlGroup>
863
+ ),
864
+ },
865
+ },
866
+ ];
867
+
868
+ return (
869
+ <ReqoreTable columns={columns} data={products} selectable onSelectedChange={setSelected} />
870
+ );
871
+ }
872
+ ```