@expcat/tigercat-core 2.1.2 → 2.1.4
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 +10 -0
- package/dist/{data-export-CLWdsrRn.d.ts → data-export-D01yjggE.d.ts} +18 -7
- package/dist/datepicker-locales/ar-SA.d.ts +2 -1
- package/dist/datepicker-locales/ar-SA.js +8 -1
- package/dist/datepicker-locales/de-DE.d.ts +2 -1
- package/dist/datepicker-locales/de-DE.js +8 -1
- package/dist/datepicker-locales/en-US.d.ts +2 -1
- package/dist/datepicker-locales/en-US.js +3 -1
- package/dist/datepicker-locales/es-ES.d.ts +2 -1
- package/dist/datepicker-locales/es-ES.js +8 -1
- package/dist/datepicker-locales/fr-FR.d.ts +2 -1
- package/dist/datepicker-locales/fr-FR.js +8 -1
- package/dist/datepicker-locales/id-ID.d.ts +2 -1
- package/dist/datepicker-locales/id-ID.js +8 -1
- package/dist/datepicker-locales/ja-JP.d.ts +2 -1
- package/dist/datepicker-locales/ja-JP.js +8 -1
- package/dist/datepicker-locales/ko-KR.d.ts +2 -1
- package/dist/datepicker-locales/ko-KR.js +8 -1
- package/dist/datepicker-locales/pt-BR.d.ts +2 -1
- package/dist/datepicker-locales/pt-BR.js +8 -1
- package/dist/datepicker-locales/registry.d.ts +2 -1
- package/dist/datepicker-locales/registry.js +94 -13
- package/dist/datepicker-locales/th-TH.d.ts +2 -1
- package/dist/datepicker-locales/th-TH.js +8 -1
- package/dist/datepicker-locales/vi-VN.d.ts +2 -1
- package/dist/datepicker-locales/vi-VN.js +8 -1
- package/dist/datepicker-locales/zh-CN.d.ts +2 -1
- package/dist/datepicker-locales/zh-CN.js +3 -1
- package/dist/datepicker-locales/zh-TW.d.ts +2 -1
- package/dist/datepicker-locales/zh-TW.js +8 -1
- package/dist/icons/common.d.ts +2 -2
- package/dist/icons/common.js +14 -8
- package/dist/index.d.ts +10303 -5381
- package/dist/index.js +30994 -16436
- package/dist/locale-qoiGEqe_.d.ts +1507 -0
- package/dist/locales/ar-SA.d.ts +2 -2
- package/dist/locales/ar-SA.js +448 -442
- package/dist/locales/de-DE.d.ts +2 -2
- package/dist/locales/de-DE.js +456 -450
- package/dist/locales/en-US.d.ts +2 -2
- package/dist/locales/en-US.js +259 -62
- package/dist/locales/es-ES.d.ts +2 -2
- package/dist/locales/es-ES.js +450 -444
- package/dist/locales/fr-FR.d.ts +2 -2
- package/dist/locales/fr-FR.js +453 -447
- package/dist/locales/id-ID.d.ts +3 -3
- package/dist/locales/id-ID.js +471 -448
- package/dist/locales/ja-JP.d.ts +3 -3
- package/dist/locales/ja-JP.js +465 -442
- package/dist/locales/ko-KR.d.ts +3 -3
- package/dist/locales/ko-KR.js +465 -442
- package/dist/locales/pt-BR.d.ts +2 -2
- package/dist/locales/pt-BR.js +452 -446
- package/dist/locales/th-TH.d.ts +3 -3
- package/dist/locales/th-TH.js +467 -444
- package/dist/locales/vi-VN.d.ts +3 -3
- package/dist/locales/vi-VN.js +467 -444
- package/dist/locales/zh-CN.d.ts +2 -2
- package/dist/locales/zh-CN.js +257 -60
- package/dist/locales/zh-TW.d.ts +3 -3
- package/dist/locales/zh-TW.js +467 -444
- package/dist/{table-CHeBgM_2.d.ts → table-R9Yp1aVa.d.ts} +77 -54
- package/dist/tailwind/modern.js +1364 -150
- package/dist/{tailwind-entry-nnuviNxx.d.ts → tailwind-entry-C26Y3TZG.d.ts} +13 -10
- package/dist/tailwind.d.ts +1 -1
- package/dist/tailwind.js +1406 -136
- package/dist/utils/data-export.d.ts +19 -5
- package/dist/utils/data-export.js +138 -13
- package/dist/utils/table-export.d.ts +21 -12
- package/dist/utils/table-export.js +75 -46
- package/package.json +1 -1
- package/tokens/figma-variables.json +223 -147
- package/tokens/tokens.css +224 -57
- package/tokens/tokens.json +205 -31
- package/dist/datepicker-Digy7Stt.d.ts +0 -201
- package/dist/locale-KMGxL6bT.d.ts +0 -625
- package/tokens/tailwind-tokens.js +0 -145
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as TigerLocaleInput, c as TigerLocalePagination, d as TigerLocaleTable } from './locale-qoiGEqe_.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Pagination component types and interfaces
|
|
@@ -9,9 +9,9 @@ import { a as TigerLocaleInput, b as TigerLocalePagination, c as TigerLocaleTabl
|
|
|
9
9
|
*/
|
|
10
10
|
type PaginationSize = 'small' | 'medium' | 'large';
|
|
11
11
|
/**
|
|
12
|
-
* Pagination alignment
|
|
12
|
+
* Pagination alignment. `left`/`right` are aliases of logical `start`/`end`.
|
|
13
13
|
*/
|
|
14
|
-
type PaginationAlign = '
|
|
14
|
+
type PaginationAlign = 'start' | 'center' | 'end' | 'left' | 'right';
|
|
15
15
|
/**
|
|
16
16
|
* Page size option type
|
|
17
17
|
*/
|
|
@@ -102,7 +102,7 @@ interface PaginationProps {
|
|
|
102
102
|
simple?: boolean;
|
|
103
103
|
/**
|
|
104
104
|
* Custom text renderer for the simple-mode page indicator.
|
|
105
|
-
* Defaults to
|
|
105
|
+
* Defaults to the locale `pageIndicatorText` template.
|
|
106
106
|
* @param current - Current page number
|
|
107
107
|
* @param totalPages - Total number of pages
|
|
108
108
|
*/
|
|
@@ -150,32 +150,6 @@ interface PaginationProps {
|
|
|
150
150
|
*/
|
|
151
151
|
labels?: Partial<TigerLocalePagination>;
|
|
152
152
|
}
|
|
153
|
-
/**
|
|
154
|
-
* Page change event info
|
|
155
|
-
*/
|
|
156
|
-
interface PageChangeInfo {
|
|
157
|
-
/**
|
|
158
|
-
* New current page
|
|
159
|
-
*/
|
|
160
|
-
current: number;
|
|
161
|
-
/**
|
|
162
|
-
* Current page size
|
|
163
|
-
*/
|
|
164
|
-
pageSize: number;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Page size change event info
|
|
168
|
-
*/
|
|
169
|
-
interface PageSizeChangeInfo {
|
|
170
|
-
/**
|
|
171
|
-
* Current page (might be adjusted)
|
|
172
|
-
*/
|
|
173
|
-
current: number;
|
|
174
|
-
/**
|
|
175
|
-
* New page size
|
|
176
|
-
*/
|
|
177
|
-
pageSize: number;
|
|
178
|
-
}
|
|
179
153
|
|
|
180
154
|
/**
|
|
181
155
|
* Table component types and interfaces
|
|
@@ -185,7 +159,8 @@ interface PageSizeChangeInfo {
|
|
|
185
159
|
* Table size types
|
|
186
160
|
*/
|
|
187
161
|
type TableSize = 'sm' | 'md' | 'lg';
|
|
188
|
-
|
|
162
|
+
/** Built-in Table export is CSV only. Use DataExport for `.xlsx`. */
|
|
163
|
+
type TableExportFormat = 'csv';
|
|
189
164
|
type TableResponsiveMode = 'card' | 'scroll';
|
|
190
165
|
type TableCardSelectionPosition = 'controls-row' | 'title-inline';
|
|
191
166
|
/**
|
|
@@ -440,17 +415,24 @@ interface PaginationConfig {
|
|
|
440
415
|
*/
|
|
441
416
|
defaultPageSize?: number;
|
|
442
417
|
/**
|
|
443
|
-
* Total number of items
|
|
418
|
+
* Total number of items. `undefined` means “not passed” (local mode uses
|
|
419
|
+
* processed length). `0` is a real total — especially for `remote`.
|
|
444
420
|
*/
|
|
445
421
|
total?: number;
|
|
446
422
|
/**
|
|
447
|
-
* Remote (server-side)
|
|
448
|
-
*
|
|
449
|
-
*
|
|
450
|
-
*
|
|
423
|
+
* Remote (server-side) mode. `dataSource` is the current page: the table
|
|
424
|
+
* skips internal slicing **and** built-in filter / sort / group. Page count
|
|
425
|
+
* uses `total` (including `0`). Set `localProcessing` to still run those
|
|
426
|
+
* on the current page.
|
|
451
427
|
* @default false
|
|
452
428
|
*/
|
|
453
429
|
remote?: boolean;
|
|
430
|
+
/**
|
|
431
|
+
* When `remote` is true, still run built-in filter / sort / group on the
|
|
432
|
+
* current page. Default is off.
|
|
433
|
+
* @default false
|
|
434
|
+
*/
|
|
435
|
+
localProcessing?: boolean;
|
|
454
436
|
/**
|
|
455
437
|
* Available page size options
|
|
456
438
|
* @default [10, 20, 50, 100]
|
|
@@ -516,7 +498,9 @@ interface RowSelectionConfig<T = Record<string, unknown>> {
|
|
|
516
498
|
*/
|
|
517
499
|
defaultSelectedRowKeys?: (string | number)[];
|
|
518
500
|
/**
|
|
519
|
-
* Function to get row key
|
|
501
|
+
* Function to get row key. Shares Table `rowKey` when both are set
|
|
502
|
+
* (`getRowKey` wins). Missing keys fall back to the dataSource index, never
|
|
503
|
+
* a page offset.
|
|
520
504
|
* @default (record) => record.id
|
|
521
505
|
*/
|
|
522
506
|
getRowKey?: (record: T) => string | number;
|
|
@@ -706,8 +690,8 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
706
690
|
*/
|
|
707
691
|
emptyText?: string;
|
|
708
692
|
/**
|
|
709
|
-
* Pagination configuration
|
|
710
|
-
* Set to false to disable pagination
|
|
693
|
+
* Pagination configuration. Omit to use the default pager (`pageSize` 10).
|
|
694
|
+
* Set to `false` to disable pagination.
|
|
711
695
|
*/
|
|
712
696
|
pagination?: PaginationConfig | false;
|
|
713
697
|
/**
|
|
@@ -720,8 +704,10 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
720
704
|
*/
|
|
721
705
|
expandable?: ExpandableConfig<T>;
|
|
722
706
|
/**
|
|
723
|
-
*
|
|
724
|
-
*
|
|
707
|
+
* Row identity. String form reads `record[rowKey]`. Missing keys fall back
|
|
708
|
+
* to the dataSource index (not the current page index).
|
|
709
|
+
* `rowSelection.getRowKey`, when set, uses the same resolver (and wins).
|
|
710
|
+
* @default 'id'
|
|
725
711
|
*/
|
|
726
712
|
rowKey?: string | ((record: T) => string | number);
|
|
727
713
|
/**
|
|
@@ -744,8 +730,8 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
744
730
|
tableLayout?: 'auto' | 'fixed';
|
|
745
731
|
/**
|
|
746
732
|
* Mobile layout below the `cardBreakpoint` width (640px by default).
|
|
747
|
-
* `scroll` keeps the table horizontally scrollable; `card`
|
|
748
|
-
*
|
|
733
|
+
* `scroll` keeps the table horizontally scrollable; `card` mounts a stacked
|
|
734
|
+
* card list **instead of** the `<table>` on that viewport (one accessible tree).
|
|
749
735
|
* @default 'scroll'
|
|
750
736
|
*/
|
|
751
737
|
responsiveMode?: TableResponsiveMode;
|
|
@@ -786,13 +772,17 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
786
772
|
*/
|
|
787
773
|
cardFieldGap?: string;
|
|
788
774
|
/**
|
|
789
|
-
* Enable virtual scrolling for large datasets
|
|
775
|
+
* Enable virtual scrolling for large datasets.
|
|
776
|
+
* Ignored when `expandable` or `groupBy` is set (row height is not fixed).
|
|
777
|
+
* The active card tree uses the same row window.
|
|
790
778
|
* @default false
|
|
791
779
|
*/
|
|
792
780
|
virtual?: boolean;
|
|
793
781
|
/**
|
|
794
|
-
* Automatically enable Table's virtual scroll container for very large
|
|
795
|
-
*
|
|
782
|
+
* Automatically enable Table's virtual scroll container for very large
|
|
783
|
+
* **processed** row counts. Default is off so a 1000-row source filtered to
|
|
784
|
+
* a handful of rows does not jump to a 400px virtual box.
|
|
785
|
+
* @default false
|
|
796
786
|
*/
|
|
797
787
|
autoVirtual?: boolean;
|
|
798
788
|
/**
|
|
@@ -817,10 +807,10 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
817
807
|
*/
|
|
818
808
|
editable?: boolean;
|
|
819
809
|
/**
|
|
820
|
-
*
|
|
821
|
-
* If
|
|
810
|
+
* Editable cells as `{ [columnKey]: dataSourceIndex[] }`.
|
|
811
|
+
* If omitted and `editable` is true, every cell is editable.
|
|
822
812
|
*/
|
|
823
|
-
editableCells?:
|
|
813
|
+
editableCells?: Record<string, number[]>;
|
|
824
814
|
/**
|
|
825
815
|
* Filter mode
|
|
826
816
|
* @default 'basic'
|
|
@@ -857,25 +847,58 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
857
847
|
*/
|
|
858
848
|
exportable?: boolean;
|
|
859
849
|
/**
|
|
860
|
-
*
|
|
850
|
+
* Built-in export format. Table only serializes CSV; use DataExport for xlsx.
|
|
861
851
|
* @default 'csv'
|
|
862
852
|
*/
|
|
863
853
|
exportFormat?: TableExportFormat;
|
|
864
854
|
/**
|
|
865
|
-
* Export filename
|
|
855
|
+
* Export filename. A trailing `.csv` is not duplicated.
|
|
866
856
|
* @default 'export'
|
|
867
857
|
*/
|
|
868
858
|
exportFilename?: string;
|
|
859
|
+
onChange?: (params: {
|
|
860
|
+
sort: SortState;
|
|
861
|
+
filters: Record<string, unknown>;
|
|
862
|
+
pagination: {
|
|
863
|
+
current: number;
|
|
864
|
+
pageSize: number;
|
|
865
|
+
} | null;
|
|
866
|
+
}) => void;
|
|
867
|
+
onRowClick?: (record: T, index: number) => void;
|
|
868
|
+
onSelectionChange?: (selectedKeys: (string | number)[]) => void;
|
|
869
|
+
onSortChange?: (sort: SortState) => void;
|
|
870
|
+
onFilterChange?: (filters: Record<string, unknown>) => void;
|
|
871
|
+
onHiddenColumnKeysChange?: (hiddenKeys: string[]) => void;
|
|
872
|
+
onPageChange?: (page: {
|
|
873
|
+
current: number;
|
|
874
|
+
pageSize: number;
|
|
875
|
+
}) => void;
|
|
876
|
+
onExpandChange?: (expandedKeys: (string | number)[], record: T, expanded: boolean) => void;
|
|
877
|
+
/**
|
|
878
|
+
* Cell commit. `rowIndex` is the **dataSource** index.
|
|
879
|
+
*/
|
|
880
|
+
onCellChange?: (rowIndex: number, columnKey: string, newValue: string) => void;
|
|
881
|
+
onColumnOrderChange?: (columns: TableColumn<T>[]) => void;
|
|
882
|
+
onColumnFixedChange?: (columnKey: string, fixed: TableFixedPosition | false, columns: TableColumn<T>[]) => void;
|
|
883
|
+
onRowOrderChange?: (rows: T[]) => void;
|
|
884
|
+
onExport?: (csv: string) => void;
|
|
869
885
|
}
|
|
870
886
|
/**
|
|
871
887
|
* Filter rule for advanced filtering
|
|
872
888
|
*/
|
|
873
889
|
interface FilterRule {
|
|
890
|
+
/** Column key (not the record field). Values resolve through `dataKey`. */
|
|
874
891
|
column: string;
|
|
875
|
-
operator: 'equals' | 'contains' | 'gt' | 'lt' | 'between' | 'notEquals';
|
|
876
|
-
|
|
892
|
+
operator: 'equals' | 'contains' | 'gt' | 'lt' | 'gte' | 'lte' | 'between' | 'notEquals' | 'isEmpty';
|
|
893
|
+
/**
|
|
894
|
+
* Compared value. Empty `''` / `null` / `undefined` skips the rule
|
|
895
|
+
* (does not match every row). Use `isEmpty` to target blank cells.
|
|
896
|
+
*/
|
|
897
|
+
value?: unknown;
|
|
898
|
+
/** Inclusive upper bound for `between`. */
|
|
877
899
|
valueTo?: unknown;
|
|
900
|
+
/** How this rule combines with the previous one. Ignored on the first rule. */
|
|
878
901
|
logic?: 'and' | 'or';
|
|
879
902
|
}
|
|
880
903
|
|
|
881
|
-
export type {
|
|
904
|
+
export type { ColumnAlign as C, ExpandableConfig as E, FilterOption as F, PaginationConfig as P, RowSelectionConfig as R, SortState as S, TableColumn as T, TableSize as a, TableCardLayoutItem as b, TableFixedPosition as c, TableCardBreakpoint as d, TableResponsiveMode as e, SortDirection as f, TableProps as g, PaginationQuickJumperValidationOptions as h, PaginationSize as i, PaginationAlign as j, FilterRule as k, ColumnFilter as l, FilterType as m, PaginationPageSizeOption as n, PaginationPageSizeOptionItem as o, PaginationProps as p, TableCardColSpan as q, TableCardRenderContext as r, TableCardRowSpan as s, TableCardSelectionPosition as t, TableColumnCardGrid as u, TableExportFormat as v, TableFixedCellClassName as w, TableFixedCellClassNameContext as x, TableFixedHeaderClassName as y, TableFixedHeaderClassNameContext as z };
|