@expcat/tigercat-core 1.5.0 → 2.0.0-preview.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.
Files changed (123) hide show
  1. package/dist/{datepicker-gSOJN_pQ.d.cts → datepicker-ZdzYUqm5.d.ts} +77 -11
  2. package/dist/datepicker-locales/ar-SA.d.ts +1 -1
  3. package/dist/datepicker-locales/de-DE.d.ts +1 -1
  4. package/dist/datepicker-locales/en-US.d.ts +1 -1
  5. package/dist/datepicker-locales/es-ES.d.ts +1 -1
  6. package/dist/datepicker-locales/fr-FR.d.ts +1 -1
  7. package/dist/datepicker-locales/id-ID.d.ts +1 -1
  8. package/dist/datepicker-locales/ja-JP.d.ts +1 -1
  9. package/dist/datepicker-locales/ko-KR.d.ts +1 -1
  10. package/dist/datepicker-locales/pt-BR.d.ts +1 -1
  11. package/dist/datepicker-locales/registry.d.ts +7 -0
  12. package/dist/datepicker-locales/registry.js +224 -0
  13. package/dist/datepicker-locales/th-TH.d.ts +1 -1
  14. package/dist/datepicker-locales/vi-VN.d.ts +1 -1
  15. package/dist/datepicker-locales/zh-CN.d.ts +1 -1
  16. package/dist/datepicker-locales/zh-TW.d.ts +1 -1
  17. package/dist/icons/picker.d.ts +1 -13
  18. package/dist/icons/picker.js +0 -12
  19. package/dist/index.d.ts +11356 -11653
  20. package/dist/index.js +206 -375
  21. package/dist/{locale-hhhI2kH6.d.ts → locale-44p_QYnH.d.ts} +4 -7
  22. package/dist/locales/ar-SA.d.ts +2 -2
  23. package/dist/locales/ar-SA.js +16 -189
  24. package/dist/locales/de-DE.d.ts +2 -2
  25. package/dist/locales/de-DE.js +16 -189
  26. package/dist/locales/en-US.d.ts +2 -2
  27. package/dist/locales/es-ES.d.ts +2 -2
  28. package/dist/locales/es-ES.js +16 -189
  29. package/dist/locales/fr-FR.d.ts +2 -2
  30. package/dist/locales/fr-FR.js +16 -189
  31. package/dist/locales/id-ID.d.ts +2 -2
  32. package/dist/locales/id-ID.js +16 -189
  33. package/dist/locales/ja-JP.d.ts +2 -2
  34. package/dist/locales/ja-JP.js +16 -189
  35. package/dist/locales/ko-KR.d.ts +2 -2
  36. package/dist/locales/ko-KR.js +16 -189
  37. package/dist/locales/pt-BR.d.ts +2 -2
  38. package/dist/locales/pt-BR.js +16 -189
  39. package/dist/locales/th-TH.d.ts +2 -2
  40. package/dist/locales/th-TH.js +16 -189
  41. package/dist/locales/vi-VN.d.ts +2 -2
  42. package/dist/locales/vi-VN.js +16 -189
  43. package/dist/locales/zh-CN.d.ts +2 -2
  44. package/dist/locales/zh-TW.d.ts +2 -2
  45. package/dist/locales/zh-TW.js +16 -189
  46. package/dist/{table-export-CfdzU6Y5.d.ts → table-export-CzPmX1b6.d.ts} +3 -9
  47. package/dist/utils/table-export.d.ts +3 -3
  48. package/package.json +40 -71
  49. package/tokens/tokens.css +0 -329
  50. package/dist/datepicker-gSOJN_pQ.d.ts +0 -130
  51. package/dist/datepicker-locales/ar-SA.cjs +0 -46
  52. package/dist/datepicker-locales/ar-SA.d.cts +0 -6
  53. package/dist/datepicker-locales/de-DE.cjs +0 -46
  54. package/dist/datepicker-locales/de-DE.d.cts +0 -6
  55. package/dist/datepicker-locales/en-US.cjs +0 -46
  56. package/dist/datepicker-locales/en-US.d.cts +0 -6
  57. package/dist/datepicker-locales/es-ES.cjs +0 -46
  58. package/dist/datepicker-locales/es-ES.d.cts +0 -6
  59. package/dist/datepicker-locales/fr-FR.cjs +0 -46
  60. package/dist/datepicker-locales/fr-FR.d.cts +0 -6
  61. package/dist/datepicker-locales/id-ID.cjs +0 -46
  62. package/dist/datepicker-locales/id-ID.d.cts +0 -6
  63. package/dist/datepicker-locales/ja-JP.cjs +0 -46
  64. package/dist/datepicker-locales/ja-JP.d.cts +0 -6
  65. package/dist/datepicker-locales/ko-KR.cjs +0 -46
  66. package/dist/datepicker-locales/ko-KR.d.cts +0 -6
  67. package/dist/datepicker-locales/pt-BR.cjs +0 -46
  68. package/dist/datepicker-locales/pt-BR.d.cts +0 -6
  69. package/dist/datepicker-locales/th-TH.cjs +0 -46
  70. package/dist/datepicker-locales/th-TH.d.cts +0 -6
  71. package/dist/datepicker-locales/vi-VN.cjs +0 -46
  72. package/dist/datepicker-locales/vi-VN.d.cts +0 -6
  73. package/dist/datepicker-locales/zh-CN.cjs +0 -46
  74. package/dist/datepicker-locales/zh-CN.d.cts +0 -6
  75. package/dist/datepicker-locales/zh-TW.cjs +0 -46
  76. package/dist/datepicker-locales/zh-TW.d.cts +0 -6
  77. package/dist/icons/common.cjs +0 -54
  78. package/dist/icons/common.d.cts +0 -20
  79. package/dist/icons/picker.cjs +0 -75
  80. package/dist/icons/picker.d.cts +0 -53
  81. package/dist/icons/registry.cjs +0 -172
  82. package/dist/icons/registry.d.cts +0 -102
  83. package/dist/icons/status.cjs +0 -47
  84. package/dist/icons/status.d.cts +0 -13
  85. package/dist/icons/table.cjs +0 -48
  86. package/dist/icons/table.d.cts +0 -25
  87. package/dist/index.cjs +0 -22311
  88. package/dist/index.d.cts +0 -20523
  89. package/dist/locale-BTAo7XO1.d.cts +0 -392
  90. package/dist/locales/ar-SA.cjs +0 -548
  91. package/dist/locales/ar-SA.d.cts +0 -10
  92. package/dist/locales/de-DE.cjs +0 -548
  93. package/dist/locales/de-DE.d.cts +0 -10
  94. package/dist/locales/en-US.cjs +0 -246
  95. package/dist/locales/en-US.d.cts +0 -10
  96. package/dist/locales/es-ES.cjs +0 -548
  97. package/dist/locales/es-ES.d.cts +0 -10
  98. package/dist/locales/fr-FR.cjs +0 -548
  99. package/dist/locales/fr-FR.d.cts +0 -10
  100. package/dist/locales/id-ID.cjs +0 -531
  101. package/dist/locales/id-ID.d.cts +0 -10
  102. package/dist/locales/ja-JP.cjs +0 -531
  103. package/dist/locales/ja-JP.d.cts +0 -10
  104. package/dist/locales/ko-KR.cjs +0 -531
  105. package/dist/locales/ko-KR.d.cts +0 -10
  106. package/dist/locales/pt-BR.cjs +0 -548
  107. package/dist/locales/pt-BR.d.cts +0 -10
  108. package/dist/locales/th-TH.cjs +0 -531
  109. package/dist/locales/th-TH.d.cts +0 -10
  110. package/dist/locales/vi-VN.cjs +0 -531
  111. package/dist/locales/vi-VN.d.cts +0 -10
  112. package/dist/locales/zh-CN.cjs +0 -246
  113. package/dist/locales/zh-CN.d.cts +0 -10
  114. package/dist/locales/zh-TW.cjs +0 -531
  115. package/dist/locales/zh-TW.d.cts +0 -10
  116. package/dist/table-export-vfyBzKui.d.cts +0 -882
  117. package/dist/tailwind/modern.cjs +0 -363
  118. package/dist/tailwind/modern.d.cts +0 -5
  119. package/dist/tailwind-entry-CNBAH7iv.d.cts +0 -184
  120. package/dist/tailwind.cjs +0 -274
  121. package/dist/tailwind.d.cts +0 -2
  122. package/dist/utils/table-export.cjs +0 -119
  123. package/dist/utils/table-export.d.cts +0 -3
@@ -1,882 +0,0 @@
1
- import { m as TigerLocaleInput, g as TigerLocalePagination, i as TigerLocaleTable } from './locale-BTAo7XO1.cjs';
2
-
3
- /**
4
- * Pagination component types and interfaces
5
- */
6
-
7
- /**
8
- * Pagination size type
9
- */
10
- type PaginationSize = 'small' | 'medium' | 'large';
11
- /**
12
- * Pagination alignment type
13
- */
14
- type PaginationAlign = 'left' | 'center' | 'right';
15
- /**
16
- * Page size option type
17
- */
18
- interface PaginationPageSizeOption {
19
- value: number;
20
- label?: string;
21
- }
22
- type PaginationPageSizeOptionItem = number | PaginationPageSizeOption;
23
- /**
24
- * Quick jumper validation scheduling strategy.
25
- */
26
- interface PaginationQuickJumperValidationOptions {
27
- /**
28
- * Debounce delay before validation is scheduled during idle time.
29
- * @default 120
30
- */
31
- delay?: number;
32
- /**
33
- * Maximum time to wait for requestIdleCallback before running validation.
34
- * @default 250
35
- */
36
- timeout?: number;
37
- }
38
- /**
39
- * Base pagination props interface
40
- */
41
- interface PaginationProps {
42
- /**
43
- * Current page number (1-indexed)
44
- * @default 1
45
- */
46
- current?: number;
47
- /**
48
- * Default current page (for uncontrolled mode)
49
- * @default 1
50
- */
51
- defaultCurrent?: number;
52
- /**
53
- * Total number of items
54
- * @default 0
55
- */
56
- total?: number;
57
- /**
58
- * Number of items per page
59
- * @default 10
60
- */
61
- pageSize?: number;
62
- /**
63
- * Default page size (for uncontrolled mode)
64
- * @default 10
65
- */
66
- defaultPageSize?: number;
67
- /**
68
- * Available page size options
69
- * @default [10, 20, 50, 100]
70
- */
71
- pageSizeOptions?: PaginationPageSizeOptionItem[];
72
- /**
73
- * Whether to show quick jumper (input for page number)
74
- * @default false
75
- */
76
- showQuickJumper?: boolean;
77
- /**
78
- * Quick jumper delayed validation timing.
79
- */
80
- quickJumperValidation?: PaginationQuickJumperValidationOptions;
81
- /**
82
- * Whether to show page size selector
83
- * @default false
84
- */
85
- showSizeChanger?: boolean;
86
- /**
87
- * Whether to show total count
88
- * @default true
89
- */
90
- showTotal?: boolean;
91
- /**
92
- * Custom total text renderer
93
- * @param total - Total number of items
94
- * @param range - Current page range [start, end]
95
- * @returns Custom text to display
96
- */
97
- totalText?: (total: number, range: [number, number]) => string;
98
- /**
99
- * Simple mode - only show prev/next buttons
100
- * @default false
101
- */
102
- simple?: boolean;
103
- /**
104
- * Size of pagination
105
- * @default 'medium'
106
- */
107
- size?: PaginationSize;
108
- /**
109
- * Alignment of pagination
110
- * @default 'center'
111
- */
112
- align?: PaginationAlign;
113
- /**
114
- * Whether pagination is disabled
115
- * @default false
116
- */
117
- disabled?: boolean;
118
- /**
119
- * Whether to hide pagination on single page
120
- * @default false
121
- */
122
- hideOnSinglePage?: boolean;
123
- /**
124
- * Whether to show fewer page buttons around current page
125
- * @default false
126
- */
127
- showLessItems?: boolean;
128
- /**
129
- * Additional CSS classes
130
- */
131
- className?: string;
132
- /**
133
- * Custom styles
134
- */
135
- style?: Record<string, string | number>;
136
- /**
137
- * Locale configuration. Accepts a sync locale, promise, or lazy loader.
138
- */
139
- locale?: TigerLocaleInput;
140
- /**
141
- * Flat custom-text overrides for single-language use (no i18n needed).
142
- * Takes precedence over `locale` and global ConfigProvider text.
143
- */
144
- labels?: Partial<TigerLocalePagination>;
145
- }
146
- /**
147
- * Page change event info
148
- */
149
- interface PageChangeInfo {
150
- /**
151
- * New current page
152
- */
153
- current: number;
154
- /**
155
- * Current page size
156
- */
157
- pageSize: number;
158
- }
159
- /**
160
- * Page size change event info
161
- */
162
- interface PageSizeChangeInfo {
163
- /**
164
- * Current page (might be adjusted)
165
- */
166
- current: number;
167
- /**
168
- * New page size
169
- */
170
- pageSize: number;
171
- }
172
-
173
- /**
174
- * Table component types and interfaces
175
- */
176
-
177
- /**
178
- * Table size types
179
- */
180
- type TableSize = 'sm' | 'md' | 'lg';
181
- type TableExportFormat = 'csv' | 'excel';
182
- type TableResponsiveMode = 'card' | 'scroll';
183
- type TableCardSelectionPosition = 'controls-row' | 'title-inline';
184
- /**
185
- * Viewport breakpoint below which `responsiveMode="card"` activates.
186
- * Maps to Tailwind's `sm` (640px), `md` (768px), and `lg` (1024px) widths.
187
- */
188
- type TableCardBreakpoint = 'sm' | 'md' | 'lg';
189
- type TableFixedPosition = 'left' | 'right';
190
- /**
191
- * Sort direction
192
- */
193
- type SortDirection = 'asc' | 'desc' | null;
194
- /**
195
- * Sort state
196
- */
197
- interface SortState {
198
- /**
199
- * Column key to sort by
200
- */
201
- key: string | null;
202
- /**
203
- * Sort direction
204
- */
205
- direction: SortDirection;
206
- }
207
- /**
208
- * Column alignment
209
- */
210
- type ColumnAlign = 'left' | 'center' | 'right';
211
- interface TableFixedHeaderClassNameContext<T = Record<string, unknown>> {
212
- view: 'table' | 'virtual-table';
213
- column: TableColumn<T>;
214
- fixed: TableFixedPosition;
215
- stickyHeader: boolean;
216
- }
217
- interface TableFixedCellClassNameContext<T = Record<string, unknown>> {
218
- view: 'table' | 'virtual-table';
219
- column: TableColumn<T>;
220
- fixed: TableFixedPosition;
221
- record: T;
222
- rowIndex: number;
223
- striped: boolean;
224
- selected: boolean;
225
- hoverable: boolean;
226
- }
227
- type TableFixedHeaderClassName<T = Record<string, unknown>> = string | ((context: TableFixedHeaderClassNameContext<T>) => string | undefined | null | false);
228
- type TableFixedCellClassName<T = Record<string, unknown>> = string | ((context: TableFixedCellClassNameContext<T>) => string | undefined | null | false);
229
- /**
230
- * Filter type
231
- */
232
- type FilterType = 'text' | 'select' | 'custom';
233
- /**
234
- * Filter option for select filter
235
- */
236
- interface FilterOption {
237
- /**
238
- * Option label
239
- */
240
- label: string;
241
- /**
242
- * Option value
243
- */
244
- value: string | number;
245
- }
246
- /**
247
- * Column filter configuration
248
- */
249
- interface ColumnFilter {
250
- /**
251
- * Filter type
252
- * @default 'text'
253
- */
254
- type?: FilterType;
255
- /**
256
- * Filter options (for select type)
257
- */
258
- options?: FilterOption[];
259
- /**
260
- * Placeholder text
261
- */
262
- placeholder?: string;
263
- /**
264
- * Custom filter function
265
- * @param value - Cell value
266
- * @param filterValue - Current filter value
267
- * @returns Whether the row should be shown
268
- */
269
- filterFn?: (value: unknown, filterValue: unknown) => boolean;
270
- }
271
- type TableCardColSpan = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
272
- type TableCardRowSpan = 1 | 2 | 3 | 4 | 5 | 6;
273
- interface TableColumnCardGrid {
274
- /**
275
- * Grid column span in card mode (1-12).
276
- * @default 12
277
- */
278
- colSpan?: TableCardColSpan;
279
- /**
280
- * Grid row span in card mode (1-6).
281
- */
282
- rowSpan?: TableCardRowSpan;
283
- /**
284
- * Whether to hide the field title/label.
285
- * @default false
286
- */
287
- hideLabel?: boolean;
288
- /**
289
- * Layout direction of the field label and value.
290
- * @default 'left'
291
- */
292
- labelPosition?: 'left' | 'top';
293
- /**
294
- * Whether to render a divider above this field in card mode.
295
- * @default false
296
- */
297
- divider?: boolean;
298
- /**
299
- * Custom CSS class name for the field label in card mode.
300
- */
301
- labelClassName?: string;
302
- /**
303
- * Custom CSS class name for the field value in card mode.
304
- */
305
- valueClassName?: string;
306
- }
307
- /**
308
- * Table column configuration
309
- */
310
- interface TableColumn<T = Record<string, unknown>> {
311
- /**
312
- * Column key (must be unique)
313
- */
314
- key: string;
315
- /**
316
- * Column title/header text
317
- */
318
- title: string;
319
- /**
320
- * Data key to access in row object
321
- * If not provided, uses `key`
322
- */
323
- dataKey?: string;
324
- /**
325
- * Column width (CSS value)
326
- */
327
- width?: string | number;
328
- /**
329
- * Column alignment
330
- * @default 'left'
331
- */
332
- align?: ColumnAlign;
333
- /**
334
- * Whether column is sortable
335
- * @default false
336
- */
337
- sortable?: boolean;
338
- /**
339
- * Custom sort function
340
- * @param a - First value
341
- * @param b - Second value
342
- * @returns Sort comparison result
343
- */
344
- sortFn?: (a: unknown, b: unknown) => number;
345
- /**
346
- * Column filter configuration
347
- */
348
- filter?: ColumnFilter;
349
- /**
350
- * Whether column is fixed
351
- * @default false
352
- */
353
- fixed?: TableFixedPosition | false;
354
- /**
355
- * Hide this column when the table renders as cards (`responsiveMode="card"`).
356
- * Useful for omitting secondary fields (id, timestamps) on narrow screens.
357
- * @default false
358
- */
359
- hideInCard?: boolean;
360
- /**
361
- * Whether this column can be hidden via `hiddenColumnKeys` UIs such as the
362
- * toolbar column-settings panel. Set to false for columns that must stay
363
- * visible (e.g. action columns).
364
- * @default true
365
- */
366
- hideable?: boolean;
367
- /**
368
- * Ordering weight in card mode; columns with a lower value render first.
369
- * Columns without a priority keep their original relative order and sort
370
- * after prioritized ones.
371
- */
372
- cardPriority?: number;
373
- /**
374
- * Render this column as the card's heading instead of a label/value row.
375
- * The first visible column with `cardTitle` wins.
376
- * @default false
377
- */
378
- cardTitle?: boolean;
379
- /**
380
- * Custom grid layout configuration for card mode.
381
- */
382
- cardGrid?: TableColumnCardGrid;
383
- /**
384
- * Custom render function for cell content
385
- * Framework-specific implementations will handle this differently
386
- */
387
- render?: (record: T, index: number) => unknown;
388
- /**
389
- * Custom render function for header
390
- */
391
- renderHeader?: () => unknown;
392
- /**
393
- * CSS class for column cells
394
- */
395
- className?: string;
396
- /**
397
- * CSS class for fixed column cells, or a resolver based on row state.
398
- */
399
- fixedClassName?: TableFixedCellClassName<T>;
400
- /**
401
- * CSS class for header cell
402
- */
403
- headerClassName?: string;
404
- /**
405
- * CSS class for fixed column header cells, or a resolver for sticky header state.
406
- */
407
- fixedHeaderClassName?: TableFixedHeaderClassName<T>;
408
- }
409
- /**
410
- * Pagination configuration
411
- */
412
- interface PaginationConfig {
413
- /**
414
- * Current page number (1-indexed)
415
- * @default 1
416
- */
417
- current?: number;
418
- /**
419
- * Default current page number (1-indexed) for uncontrolled mode.
420
- * Used when `current` is not provided.
421
- * @default 1
422
- */
423
- defaultCurrent?: number;
424
- /**
425
- * Number of items per page
426
- * @default 10
427
- */
428
- pageSize?: number;
429
- /**
430
- * Default page size for uncontrolled mode.
431
- * Used when `pageSize` is not provided.
432
- * @default 10
433
- */
434
- defaultPageSize?: number;
435
- /**
436
- * Total number of items
437
- */
438
- total?: number;
439
- /**
440
- * Available page size options
441
- * @default [10, 20, 50, 100]
442
- */
443
- pageSizeOptions?: PaginationPageSizeOptionItem[];
444
- /**
445
- * Whether to show page size selector
446
- * @default true
447
- */
448
- showSizeChanger?: boolean;
449
- /**
450
- * Whether to show total count
451
- * @default true
452
- */
453
- showTotal?: boolean;
454
- /**
455
- * Custom total text render function
456
- */
457
- totalText?: (total: number, range: [number, number]) => string;
458
- /**
459
- * Locale configuration for pagination text. Set to false to ignore i18n.
460
- */
461
- locale?: TigerLocaleInput | false;
462
- /**
463
- * Custom text for 'Previous' button
464
- */
465
- prevText?: string;
466
- /**
467
- * Custom text for 'Next' button
468
- */
469
- nextText?: string;
470
- /**
471
- * Custom text template for page indicator
472
- */
473
- pageIndicatorText?: (current: number, total: number) => string;
474
- /**
475
- * Custom text template for page size option
476
- */
477
- pageSizeText?: (size: number) => string;
478
- }
479
- /**
480
- * Table row selection configuration
481
- */
482
- interface RowSelectionConfig<T = Record<string, unknown>> {
483
- /**
484
- * Selected row keys
485
- */
486
- selectedRowKeys?: (string | number)[];
487
- /**
488
- * Default selected row keys for uncontrolled mode.
489
- * Used when `selectedRowKeys` is not provided.
490
- */
491
- defaultSelectedRowKeys?: (string | number)[];
492
- /**
493
- * Function to get row key
494
- * @default (record) => record.id
495
- */
496
- getRowKey?: (record: T) => string | number;
497
- /**
498
- * Whether to show checkbox column
499
- * @default true
500
- */
501
- showCheckbox?: boolean;
502
- /**
503
- * Selection type
504
- * @default 'checkbox'
505
- */
506
- type?: 'checkbox' | 'radio';
507
- /**
508
- * Function to determine if row can be selected
509
- */
510
- getCheckboxProps?: (record: T) => {
511
- disabled?: boolean;
512
- };
513
- }
514
- /**
515
- * Table row expansion configuration
516
- */
517
- interface ExpandableConfig<T = Record<string, unknown>> {
518
- /**
519
- * Currently expanded row keys (controlled mode).
520
- * When provided, internal expand state will not be mutated.
521
- */
522
- expandedRowKeys?: (string | number)[];
523
- /**
524
- * Default expanded row keys for uncontrolled mode.
525
- * Used when `expandedRowKeys` is not provided.
526
- */
527
- defaultExpandedRowKeys?: (string | number)[];
528
- /**
529
- * Render function for expanded row content.
530
- * Framework-specific implementations may also support slots/children.
531
- */
532
- expandedRowRender?: (record: T, index: number) => unknown;
533
- /**
534
- * Determine whether a row is expandable.
535
- * Return false to hide the expand icon for that row.
536
- * @default () => true
537
- */
538
- rowExpandable?: (record: T) => boolean;
539
- /**
540
- * Whether clicking the entire row toggles expand state.
541
- * When false, only clicking the expand icon triggers expansion.
542
- * @default false
543
- */
544
- expandRowByClick?: boolean;
545
- /**
546
- * Position of the expand toggle column.
547
- * @default 'start'
548
- */
549
- expandIconPosition?: 'start' | 'end';
550
- }
551
- interface TableCardRenderContext<T = Record<string, unknown>> {
552
- record: T;
553
- index: number;
554
- columns: TableColumn<T>[];
555
- selected: boolean;
556
- expanded: boolean;
557
- toggleExpand: () => void;
558
- selectRow: (checked: boolean) => void;
559
- }
560
- interface TableCardLayoutItem {
561
- /**
562
- * Target column key.
563
- */
564
- key: string;
565
- /**
566
- * Grid column span in card mode (1-12).
567
- */
568
- colSpan?: TableCardColSpan;
569
- /**
570
- * Grid row span in card mode (1-6).
571
- */
572
- rowSpan?: TableCardRowSpan;
573
- /**
574
- * Whether to hide the field title/label.
575
- */
576
- hideLabel?: boolean;
577
- /**
578
- * Layout direction of the field label and value.
579
- */
580
- labelPosition?: 'left' | 'top';
581
- /**
582
- * Whether to render a divider above this field in card mode.
583
- */
584
- divider?: boolean;
585
- /**
586
- * Custom CSS class name for the field label in card mode.
587
- */
588
- labelClassName?: string;
589
- /**
590
- * Custom CSS class name for the field value in card mode.
591
- */
592
- valueClassName?: string;
593
- /**
594
- * Custom CSS class name for card item container.
595
- */
596
- className?: string;
597
- }
598
- /**
599
- * Base table props interface
600
- */
601
- interface TableProps<T = Record<string, unknown>> {
602
- /**
603
- * Table columns configuration
604
- */
605
- columns: TableColumn<T>[];
606
- /**
607
- * Whether to show a lock button in each column header.
608
- * Clicking the lock toggles the column into the compact left fixed area.
609
- * @default false
610
- */
611
- columnLockable?: boolean;
612
- /**
613
- * Table data source
614
- * @default []
615
- */
616
- dataSource?: T[];
617
- /**
618
- * Controlled hidden column keys (matched against `columns[].key`).
619
- * When provided, internal hidden-column state will not be mutated.
620
- */
621
- hiddenColumnKeys?: string[];
622
- /**
623
- * Default hidden column keys for uncontrolled mode.
624
- */
625
- defaultHiddenColumnKeys?: string[];
626
- /**
627
- * Controlled sort state.
628
- * When provided, internal sort state will not be mutated.
629
- */
630
- sort?: SortState;
631
- /**
632
- * Default sort state for uncontrolled mode.
633
- */
634
- defaultSort?: SortState;
635
- /**
636
- * Controlled filters.
637
- * When provided, internal filter state will not be mutated.
638
- */
639
- filters?: Record<string, unknown>;
640
- /**
641
- * Default filters for uncontrolled mode.
642
- */
643
- defaultFilters?: Record<string, unknown>;
644
- /**
645
- * Table size
646
- * @default 'md'
647
- */
648
- size?: TableSize;
649
- /**
650
- * Whether to show border
651
- * @default false
652
- */
653
- bordered?: boolean;
654
- /**
655
- * Whether to show striped rows
656
- * @default false
657
- */
658
- striped?: boolean;
659
- /**
660
- * Whether to highlight row on hover
661
- * @default true
662
- */
663
- hoverable?: boolean;
664
- /**
665
- * Loading state
666
- * @default false
667
- */
668
- loading?: boolean;
669
- /**
670
- * Locale configuration for table text.
671
- */
672
- locale?: TigerLocaleInput;
673
- /**
674
- * Flat table text overrides for this instance.
675
- */
676
- labels?: Partial<TigerLocaleTable>;
677
- /**
678
- * Empty state text
679
- * @default 'No data'
680
- */
681
- emptyText?: string;
682
- /**
683
- * Pagination configuration
684
- * Set to false to disable pagination
685
- */
686
- pagination?: PaginationConfig | false;
687
- /**
688
- * Row selection configuration
689
- */
690
- rowSelection?: RowSelectionConfig<T>;
691
- /**
692
- * Row expansion configuration.
693
- * Adds an expand toggle column and renders expanded content below each row.
694
- */
695
- expandable?: ExpandableConfig<T>;
696
- /**
697
- * Function to get row key
698
- * @default (record) => record.id
699
- */
700
- rowKey?: string | ((record: T) => string | number);
701
- /**
702
- * Custom row class name
703
- */
704
- rowClassName?: string | ((record: T, index: number) => string);
705
- /**
706
- * Whether table head is sticky
707
- * @default false
708
- */
709
- stickyHeader?: boolean;
710
- /**
711
- * Max height for scrollable table
712
- */
713
- maxHeight?: string | number;
714
- /**
715
- * Table layout algorithm
716
- * @default 'auto'
717
- */
718
- tableLayout?: 'auto' | 'fixed';
719
- /**
720
- * Mobile layout below the `cardBreakpoint` width (640px by default).
721
- * `scroll` keeps the table horizontally scrollable; `card` renders each row
722
- * as a stacked card list.
723
- * @default 'scroll'
724
- */
725
- responsiveMode?: TableResponsiveMode;
726
- /**
727
- * Viewport breakpoint below which `responsiveMode="card"` activates.
728
- * `sm` = 640px, `md` = 768px, `lg` = 1024px.
729
- * @default 'sm'
730
- */
731
- cardBreakpoint?: TableCardBreakpoint;
732
- /**
733
- * Additional class for mobile card rows, or a resolver per record.
734
- */
735
- cardClassName?: string | ((record: T, index: number) => string);
736
- /**
737
- * Custom mobile card renderer for `responsiveMode="card"`.
738
- */
739
- renderCard?: (context: TableCardRenderContext<T>) => unknown;
740
- /**
741
- * Dedicated layout definitions for card grid mode.
742
- */
743
- cardLayout?: TableCardLayoutItem[];
744
- /**
745
- * Position of row selection controls in default card rendering.
746
- * @default 'controls-row'
747
- */
748
- cardSelectionPosition?: TableCardSelectionPosition;
749
- /**
750
- * Padding class for default card containers. Set to false to remove the
751
- * built-in padding.
752
- * @default 'p-3'
753
- */
754
- cardPadding?: string | false;
755
- /**
756
- * Gap utility class applied between fields in the default `cardLayout` grid.
757
- * Provide a full Tailwind gap class (e.g. `'gap-2'`, `'gap-y-4'`) since the
758
- * class string must be statically present for the JIT compiler.
759
- * @default 'gap-3'
760
- */
761
- cardFieldGap?: string;
762
- /**
763
- * Enable virtual scrolling for large datasets
764
- * @default false
765
- */
766
- virtual?: boolean;
767
- /**
768
- * Automatically enable Table's virtual scroll container for very large data sets.
769
- * @default true
770
- */
771
- autoVirtual?: boolean;
772
- /**
773
- * Virtual scroll viewport height (px)
774
- * @default 400
775
- */
776
- virtualHeight?: number;
777
- /**
778
- * Virtual scroll row height (px)
779
- * @default 40
780
- */
781
- virtualItemHeight?: number;
782
- /**
783
- * Row count at which Table enables virtual mode automatically when `autoVirtual` is true.
784
- * @default 10000
785
- */
786
- autoVirtualThreshold?: number;
787
- /**
788
- * Row count at which Table marks virtual rendering as recommended.
789
- * Table does not enable virtualization automatically; use this signal to
790
- * switch to `virtual` or the dedicated `VirtualTable` component.
791
- * @default 1000
792
- */
793
- virtualThreshold?: number;
794
- /**
795
- * Enable cell editing
796
- * @default false
797
- */
798
- editable?: boolean;
799
- /**
800
- * Set of editable cells: Map<columnKey, Set<rowIndex>>
801
- * If not provided and editable=true, all cells are editable
802
- */
803
- editableCells?: Map<string, Set<number>>;
804
- /**
805
- * Filter mode
806
- * @default 'basic'
807
- */
808
- filterMode?: 'basic' | 'advanced';
809
- /**
810
- * Advanced filter rules (used when filterMode='advanced')
811
- */
812
- advancedFilterRules?: FilterRule[];
813
- /**
814
- * Enable column drag reorder
815
- * @default false
816
- */
817
- columnDraggable?: boolean;
818
- /**
819
- * Enable row drag reorder.
820
- * @default false
821
- */
822
- rowDraggable?: boolean;
823
- /**
824
- * Summary row configuration
825
- */
826
- summaryRow?: {
827
- show: boolean;
828
- data: Record<string, unknown>;
829
- };
830
- /**
831
- * Group rows by column key
832
- */
833
- groupBy?: string;
834
- /**
835
- * Enable table export
836
- * @default false
837
- */
838
- exportable?: boolean;
839
- /**
840
- * Export format.
841
- * @default 'csv'
842
- */
843
- exportFormat?: TableExportFormat;
844
- /**
845
- * Export filename (without extension)
846
- * @default 'export'
847
- */
848
- exportFilename?: string;
849
- }
850
- /**
851
- * Filter rule for advanced filtering
852
- */
853
- interface FilterRule {
854
- column: string;
855
- operator: 'equals' | 'contains' | 'gt' | 'lt' | 'between' | 'notEquals';
856
- value: unknown;
857
- valueTo?: unknown;
858
- logic?: 'and' | 'or';
859
- }
860
-
861
- /**
862
- * Table export utilities (CSV / Excel-compatible HTML worksheet)
863
- */
864
-
865
- /**
866
- * Export table data to CSV string
867
- */
868
- declare function exportTableToCsv<T>(columns: TableColumn<T>[], data: T[], _filename?: string): string;
869
- declare function exportTableToExcel<T>(columns: TableColumn<T>[], data: T[]): string;
870
- /**
871
- * Trigger a CSV file download in the browser
872
- */
873
- declare function downloadCsv(csvContent: string, filename?: string): void;
874
- declare function downloadExcel(excelContent: string, filename?: string): void;
875
- declare function exportTableData<T>(columns: TableColumn<T>[], data: T[], format?: TableExportFormat): string;
876
- declare function downloadTableExport(content: string, filename?: string, format?: TableExportFormat): void;
877
- /**
878
- * Get export button classes
879
- */
880
- declare const tableExportButtonClasses = "inline-flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium rounded-[var(--tiger-radius-md,0.5rem)] border border-[var(--tiger-border,#e5e7eb)] text-[var(--tiger-text,#111827)] bg-[var(--tiger-surface,#ffffff)] hover:bg-[var(--tiger-surface-muted,#f9fafb)] transition-colors";
881
-
882
- export { type TableFixedHeaderClassName as A, type TableFixedHeaderClassNameContext as B, type ColumnAlign as C, downloadCsv as D, type ExpandableConfig as E, type FilterOption as F, downloadExcel as G, downloadTableExport as H, exportTableData as I, exportTableToCsv as J, exportTableToExcel as K, tableExportButtonClasses as L, type PaginationQuickJumperValidationOptions as P, type RowSelectionConfig as R, type SortDirection as S, type TableColumn as T, type TableSize as a, type TableCardLayoutItem as b, type TableFixedPosition as c, type TableCardBreakpoint as d, type TableResponsiveMode as e, type PaginationSize as f, type PaginationAlign as g, type TableProps as h, type PaginationConfig as i, type FilterRule as j, type ColumnFilter as k, type SortState as l, type FilterType as m, type PageChangeInfo as n, type PageSizeChangeInfo as o, type PaginationPageSizeOption as p, type PaginationPageSizeOptionItem as q, type PaginationProps as r, type TableCardColSpan as s, type TableCardRenderContext as t, type TableCardRowSpan as u, type TableCardSelectionPosition as v, type TableColumnCardGrid as w, type TableExportFormat as x, type TableFixedCellClassName as y, type TableFixedCellClassNameContext as z };