@expcat/tigercat-core 1.1.0 → 1.2.14
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 +1 -1
- package/dist/datepicker-locales/ar-SA.cjs +46 -0
- package/dist/datepicker-locales/ar-SA.d.cts +6 -0
- package/dist/datepicker-locales/ar-SA.d.ts +6 -0
- package/dist/datepicker-locales/ar-SA.js +20 -0
- package/dist/datepicker-locales/de-DE.cjs +46 -0
- package/dist/datepicker-locales/de-DE.d.cts +6 -0
- package/dist/datepicker-locales/de-DE.d.ts +6 -0
- package/dist/datepicker-locales/de-DE.js +20 -0
- package/dist/datepicker-locales/en-US.cjs +30 -7
- package/dist/datepicker-locales/en-US.js +5 -2
- package/dist/datepicker-locales/es-ES.cjs +46 -0
- package/dist/datepicker-locales/es-ES.d.cts +6 -0
- package/dist/datepicker-locales/es-ES.d.ts +6 -0
- package/dist/datepicker-locales/es-ES.js +20 -0
- package/dist/datepicker-locales/fr-FR.cjs +46 -0
- package/dist/datepicker-locales/fr-FR.d.cts +6 -0
- package/dist/datepicker-locales/fr-FR.d.ts +6 -0
- package/dist/datepicker-locales/fr-FR.js +20 -0
- package/dist/datepicker-locales/id-ID.cjs +30 -7
- package/dist/datepicker-locales/id-ID.js +5 -2
- package/dist/datepicker-locales/ja-JP.cjs +30 -7
- package/dist/datepicker-locales/ja-JP.js +5 -2
- package/dist/datepicker-locales/ko-KR.cjs +30 -7
- package/dist/datepicker-locales/ko-KR.js +5 -2
- package/dist/datepicker-locales/pt-BR.cjs +46 -0
- package/dist/datepicker-locales/pt-BR.d.cts +6 -0
- package/dist/datepicker-locales/pt-BR.d.ts +6 -0
- package/dist/datepicker-locales/pt-BR.js +20 -0
- package/dist/datepicker-locales/th-TH.cjs +30 -7
- package/dist/datepicker-locales/th-TH.js +5 -2
- package/dist/datepicker-locales/vi-VN.cjs +30 -7
- package/dist/datepicker-locales/vi-VN.js +5 -2
- package/dist/datepicker-locales/zh-CN.cjs +30 -7
- package/dist/datepicker-locales/zh-CN.js +5 -2
- package/dist/datepicker-locales/zh-TW.cjs +30 -7
- package/dist/datepicker-locales/zh-TW.js +5 -2
- package/dist/icons/common.cjs +43 -11
- package/dist/icons/common.js +11 -2
- package/dist/icons/picker.cjs +57 -18
- package/dist/icons/picker.js +18 -2
- package/dist/icons/status.cjs +35 -7
- package/dist/icons/status.js +7 -2
- package/dist/icons/table.cjs +39 -9
- package/dist/icons/table.js +9 -2
- package/dist/index.cjs +6703 -1719
- package/dist/index.d.cts +1940 -58
- package/dist/index.d.ts +1940 -58
- package/dist/index.js +4821 -159
- package/dist/{locale-CEmE5uq-.d.cts → locale-9-B-d0mp.d.cts} +6 -1
- package/dist/{locale-m1sF4KRO.d.ts → locale-Bc3zz2b0.d.ts} +6 -1
- package/dist/locales/ar-SA.cjs +155 -0
- package/dist/locales/ar-SA.d.cts +10 -0
- package/dist/locales/ar-SA.d.ts +10 -0
- package/dist/locales/ar-SA.js +128 -0
- package/dist/locales/de-DE.cjs +155 -0
- package/dist/locales/de-DE.d.cts +10 -0
- package/dist/locales/de-DE.d.ts +10 -0
- package/dist/locales/de-DE.js +128 -0
- package/dist/locales/en-US.cjs +29 -3
- package/dist/locales/en-US.d.cts +1 -1
- package/dist/locales/en-US.d.ts +1 -1
- package/dist/locales/en-US.js +5 -2
- package/dist/locales/es-ES.cjs +155 -0
- package/dist/locales/es-ES.d.cts +10 -0
- package/dist/locales/es-ES.d.ts +10 -0
- package/dist/locales/es-ES.js +128 -0
- package/dist/locales/fr-FR.cjs +155 -0
- package/dist/locales/fr-FR.d.cts +10 -0
- package/dist/locales/fr-FR.d.ts +10 -0
- package/dist/locales/fr-FR.js +128 -0
- package/dist/locales/id-ID.cjs +29 -3
- package/dist/locales/id-ID.d.cts +1 -1
- package/dist/locales/id-ID.d.ts +1 -1
- package/dist/locales/id-ID.js +5 -2
- package/dist/locales/ja-JP.cjs +29 -3
- package/dist/locales/ja-JP.d.cts +1 -1
- package/dist/locales/ja-JP.d.ts +1 -1
- package/dist/locales/ja-JP.js +5 -2
- package/dist/locales/ko-KR.cjs +29 -3
- package/dist/locales/ko-KR.d.cts +1 -1
- package/dist/locales/ko-KR.d.ts +1 -1
- package/dist/locales/ko-KR.js +5 -2
- package/dist/locales/pt-BR.cjs +155 -0
- package/dist/locales/pt-BR.d.cts +10 -0
- package/dist/locales/pt-BR.d.ts +10 -0
- package/dist/locales/pt-BR.js +128 -0
- package/dist/locales/th-TH.cjs +29 -3
- package/dist/locales/th-TH.d.cts +1 -1
- package/dist/locales/th-TH.d.ts +1 -1
- package/dist/locales/th-TH.js +5 -2
- package/dist/locales/vi-VN.cjs +29 -3
- package/dist/locales/vi-VN.d.cts +1 -1
- package/dist/locales/vi-VN.d.ts +1 -1
- package/dist/locales/vi-VN.js +5 -2
- package/dist/locales/zh-CN.cjs +29 -3
- package/dist/locales/zh-CN.d.cts +1 -1
- package/dist/locales/zh-CN.d.ts +1 -1
- package/dist/locales/zh-CN.js +5 -2
- package/dist/locales/zh-TW.cjs +29 -3
- package/dist/locales/zh-TW.d.cts +1 -1
- package/dist/locales/zh-TW.d.ts +1 -1
- package/dist/locales/zh-TW.js +5 -2
- package/dist/{table-export-Cy9DgTiO.d.cts → table-export-6ISYSoVB.d.cts} +35 -3
- package/dist/{table-export-Cy9DgTiO.d.ts → table-export-6ISYSoVB.d.ts} +35 -3
- package/dist/tailwind/modern.cjs +81 -18
- package/dist/tailwind/modern.js +49 -13
- package/dist/{tailwind-entry-2KPvkOin.d.ts → tailwind-entry-D4_sseNi.d.ts} +1 -1
- package/dist/{tailwind-entry-CUaMC8Ma.d.cts → tailwind-entry-DUchHtjs.d.cts} +1 -1
- package/dist/tailwind.cjs +75 -10
- package/dist/tailwind.d.cts +1 -1
- package/dist/tailwind.d.ts +1 -1
- package/dist/tailwind.js +43 -5
- package/dist/utils/table-export.cjs +79 -5
- package/dist/utils/table-export.d.cts +1 -1
- package/dist/utils/table-export.d.ts +1 -1
- package/dist/utils/table-export.js +47 -2
- package/package.json +60 -6
- package/tokens/figma-variables.json +2553 -0
- package/tokens/tailwind-tokens.js +145 -0
- package/tokens/tokens.css +640 -0
- package/tokens/tokens.json +395 -0
package/dist/locales/zh-CN.cjs
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
2
19
|
|
|
3
20
|
// src/utils/i18n/locales/zh-CN.ts
|
|
21
|
+
var zh_CN_exports = {};
|
|
22
|
+
__export(zh_CN_exports, {
|
|
23
|
+
zhCN: () => zhCN
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(zh_CN_exports);
|
|
4
26
|
var zhCN = {
|
|
27
|
+
locale: "zh-CN",
|
|
28
|
+
direction: "ltr",
|
|
5
29
|
common: {
|
|
6
30
|
okText: "\u786E\u5B9A",
|
|
7
31
|
cancelText: "\u53D6\u6D88",
|
|
@@ -39,5 +63,7 @@ var zhCN = {
|
|
|
39
63
|
boardAriaLabel: "\u4EFB\u52A1\u770B\u677F"
|
|
40
64
|
}
|
|
41
65
|
};
|
|
42
|
-
|
|
43
|
-
exports
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
zhCN
|
|
69
|
+
});
|
package/dist/locales/zh-CN.d.cts
CHANGED
package/dist/locales/zh-CN.d.ts
CHANGED
package/dist/locales/zh-CN.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// src/utils/i18n/locales/zh-CN.ts
|
|
2
2
|
var zhCN = {
|
|
3
|
+
locale: "zh-CN",
|
|
4
|
+
direction: "ltr",
|
|
3
5
|
common: {
|
|
4
6
|
okText: "\u786E\u5B9A",
|
|
5
7
|
cancelText: "\u53D6\u6D88",
|
|
@@ -37,5 +39,6 @@ var zhCN = {
|
|
|
37
39
|
boardAriaLabel: "\u4EFB\u52A1\u770B\u677F"
|
|
38
40
|
}
|
|
39
41
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
export {
|
|
43
|
+
zhCN
|
|
44
|
+
};
|
package/dist/locales/zh-TW.cjs
CHANGED
|
@@ -1,7 +1,31 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
2
19
|
|
|
3
20
|
// src/utils/i18n/locales/zh-TW.ts
|
|
21
|
+
var zh_TW_exports = {};
|
|
22
|
+
__export(zh_TW_exports, {
|
|
23
|
+
zhTW: () => zhTW
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(zh_TW_exports);
|
|
4
26
|
var zhTW = {
|
|
27
|
+
locale: "zh-TW",
|
|
28
|
+
direction: "ltr",
|
|
5
29
|
common: {
|
|
6
30
|
okText: "\u78BA\u5B9A",
|
|
7
31
|
cancelText: "\u53D6\u6D88",
|
|
@@ -39,5 +63,7 @@ var zhTW = {
|
|
|
39
63
|
boardAriaLabel: "\u4EFB\u52D9\u770B\u677F"
|
|
40
64
|
}
|
|
41
65
|
};
|
|
42
|
-
|
|
43
|
-
exports
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
zhTW
|
|
69
|
+
});
|
package/dist/locales/zh-TW.d.cts
CHANGED
package/dist/locales/zh-TW.d.ts
CHANGED
package/dist/locales/zh-TW.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
// src/utils/i18n/locales/zh-TW.ts
|
|
2
2
|
var zhTW = {
|
|
3
|
+
locale: "zh-TW",
|
|
4
|
+
direction: "ltr",
|
|
3
5
|
common: {
|
|
4
6
|
okText: "\u78BA\u5B9A",
|
|
5
7
|
cancelText: "\u53D6\u6D88",
|
|
@@ -37,5 +39,6 @@ var zhTW = {
|
|
|
37
39
|
boardAriaLabel: "\u4EFB\u52D9\u770B\u677F"
|
|
38
40
|
}
|
|
39
41
|
};
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
export {
|
|
43
|
+
zhTW
|
|
44
|
+
};
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* Table size types
|
|
6
6
|
*/
|
|
7
7
|
type TableSize = 'sm' | 'md' | 'lg';
|
|
8
|
+
type TableExportFormat = 'csv' | 'excel';
|
|
9
|
+
type TableResponsiveMode = 'card' | 'scroll';
|
|
8
10
|
/**
|
|
9
11
|
* Sort direction
|
|
10
12
|
*/
|
|
@@ -359,11 +361,22 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
359
361
|
* @default 'auto'
|
|
360
362
|
*/
|
|
361
363
|
tableLayout?: 'auto' | 'fixed';
|
|
364
|
+
/**
|
|
365
|
+
* Mobile layout below 640px. `scroll` keeps the table horizontally scrollable;
|
|
366
|
+
* `card` renders each row as a stacked card list.
|
|
367
|
+
* @default 'scroll'
|
|
368
|
+
*/
|
|
369
|
+
responsiveMode?: TableResponsiveMode;
|
|
362
370
|
/**
|
|
363
371
|
* Enable virtual scrolling for large datasets
|
|
364
372
|
* @default false
|
|
365
373
|
*/
|
|
366
374
|
virtual?: boolean;
|
|
375
|
+
/**
|
|
376
|
+
* Automatically enable Table's virtual scroll container for very large data sets.
|
|
377
|
+
* @default true
|
|
378
|
+
*/
|
|
379
|
+
autoVirtual?: boolean;
|
|
367
380
|
/**
|
|
368
381
|
* Virtual scroll viewport height (px)
|
|
369
382
|
* @default 400
|
|
@@ -374,6 +387,11 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
374
387
|
* @default 40
|
|
375
388
|
*/
|
|
376
389
|
virtualItemHeight?: number;
|
|
390
|
+
/**
|
|
391
|
+
* Row count at which Table enables virtual mode automatically when `autoVirtual` is true.
|
|
392
|
+
* @default 10000
|
|
393
|
+
*/
|
|
394
|
+
autoVirtualThreshold?: number;
|
|
377
395
|
/**
|
|
378
396
|
* Row count at which Table marks virtual rendering as recommended.
|
|
379
397
|
* Table does not enable virtualization automatically; use this signal to
|
|
@@ -405,6 +423,11 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
405
423
|
* @default false
|
|
406
424
|
*/
|
|
407
425
|
columnDraggable?: boolean;
|
|
426
|
+
/**
|
|
427
|
+
* Enable row drag reorder.
|
|
428
|
+
* @default false
|
|
429
|
+
*/
|
|
430
|
+
rowDraggable?: boolean;
|
|
408
431
|
/**
|
|
409
432
|
* Summary row configuration
|
|
410
433
|
*/
|
|
@@ -417,10 +440,15 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
417
440
|
*/
|
|
418
441
|
groupBy?: string;
|
|
419
442
|
/**
|
|
420
|
-
* Enable
|
|
443
|
+
* Enable table export
|
|
421
444
|
* @default false
|
|
422
445
|
*/
|
|
423
446
|
exportable?: boolean;
|
|
447
|
+
/**
|
|
448
|
+
* Export format.
|
|
449
|
+
* @default 'csv'
|
|
450
|
+
*/
|
|
451
|
+
exportFormat?: TableExportFormat;
|
|
424
452
|
/**
|
|
425
453
|
* Export filename (without extension)
|
|
426
454
|
* @default 'export'
|
|
@@ -439,20 +467,24 @@ interface FilterRule {
|
|
|
439
467
|
}
|
|
440
468
|
|
|
441
469
|
/**
|
|
442
|
-
* Table export utilities (CSV)
|
|
470
|
+
* Table export utilities (CSV / Excel-compatible HTML worksheet)
|
|
443
471
|
*/
|
|
444
472
|
|
|
445
473
|
/**
|
|
446
474
|
* Export table data to CSV string
|
|
447
475
|
*/
|
|
448
476
|
declare function exportTableToCsv<T>(columns: TableColumn<T>[], data: T[], _filename?: string): string;
|
|
477
|
+
declare function exportTableToExcel<T>(columns: TableColumn<T>[], data: T[]): string;
|
|
449
478
|
/**
|
|
450
479
|
* Trigger a CSV file download in the browser
|
|
451
480
|
*/
|
|
452
481
|
declare function downloadCsv(csvContent: string, filename?: string): void;
|
|
482
|
+
declare function downloadExcel(excelContent: string, filename?: string): void;
|
|
483
|
+
declare function exportTableData<T>(columns: TableColumn<T>[], data: T[], format?: TableExportFormat): string;
|
|
484
|
+
declare function downloadTableExport(content: string, filename?: string, format?: TableExportFormat): void;
|
|
453
485
|
/**
|
|
454
486
|
* Get export button classes
|
|
455
487
|
*/
|
|
456
488
|
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";
|
|
457
489
|
|
|
458
|
-
export { type ColumnAlign as C, type ExpandableConfig as E, type FilterOption as F, type PaginationConfig as P, type RowSelectionConfig as R, type SortDirection as S, type
|
|
490
|
+
export { type ColumnAlign as C, type ExpandableConfig as E, type FilterOption as F, type PaginationConfig as P, type RowSelectionConfig as R, type SortDirection as S, type TableResponsiveMode as T, type TableColumn as a, type TableSize as b, type TableProps as c, type FilterRule as d, type ColumnFilter as e, type SortState as f, exportTableToCsv as g, exportTableToExcel as h, downloadCsv as i, downloadExcel as j, exportTableData as k, downloadTableExport as l, type TableExportFormat as m, type FilterType as n, tableExportButtonClasses as t };
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
* Table size types
|
|
6
6
|
*/
|
|
7
7
|
type TableSize = 'sm' | 'md' | 'lg';
|
|
8
|
+
type TableExportFormat = 'csv' | 'excel';
|
|
9
|
+
type TableResponsiveMode = 'card' | 'scroll';
|
|
8
10
|
/**
|
|
9
11
|
* Sort direction
|
|
10
12
|
*/
|
|
@@ -359,11 +361,22 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
359
361
|
* @default 'auto'
|
|
360
362
|
*/
|
|
361
363
|
tableLayout?: 'auto' | 'fixed';
|
|
364
|
+
/**
|
|
365
|
+
* Mobile layout below 640px. `scroll` keeps the table horizontally scrollable;
|
|
366
|
+
* `card` renders each row as a stacked card list.
|
|
367
|
+
* @default 'scroll'
|
|
368
|
+
*/
|
|
369
|
+
responsiveMode?: TableResponsiveMode;
|
|
362
370
|
/**
|
|
363
371
|
* Enable virtual scrolling for large datasets
|
|
364
372
|
* @default false
|
|
365
373
|
*/
|
|
366
374
|
virtual?: boolean;
|
|
375
|
+
/**
|
|
376
|
+
* Automatically enable Table's virtual scroll container for very large data sets.
|
|
377
|
+
* @default true
|
|
378
|
+
*/
|
|
379
|
+
autoVirtual?: boolean;
|
|
367
380
|
/**
|
|
368
381
|
* Virtual scroll viewport height (px)
|
|
369
382
|
* @default 400
|
|
@@ -374,6 +387,11 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
374
387
|
* @default 40
|
|
375
388
|
*/
|
|
376
389
|
virtualItemHeight?: number;
|
|
390
|
+
/**
|
|
391
|
+
* Row count at which Table enables virtual mode automatically when `autoVirtual` is true.
|
|
392
|
+
* @default 10000
|
|
393
|
+
*/
|
|
394
|
+
autoVirtualThreshold?: number;
|
|
377
395
|
/**
|
|
378
396
|
* Row count at which Table marks virtual rendering as recommended.
|
|
379
397
|
* Table does not enable virtualization automatically; use this signal to
|
|
@@ -405,6 +423,11 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
405
423
|
* @default false
|
|
406
424
|
*/
|
|
407
425
|
columnDraggable?: boolean;
|
|
426
|
+
/**
|
|
427
|
+
* Enable row drag reorder.
|
|
428
|
+
* @default false
|
|
429
|
+
*/
|
|
430
|
+
rowDraggable?: boolean;
|
|
408
431
|
/**
|
|
409
432
|
* Summary row configuration
|
|
410
433
|
*/
|
|
@@ -417,10 +440,15 @@ interface TableProps<T = Record<string, unknown>> {
|
|
|
417
440
|
*/
|
|
418
441
|
groupBy?: string;
|
|
419
442
|
/**
|
|
420
|
-
* Enable
|
|
443
|
+
* Enable table export
|
|
421
444
|
* @default false
|
|
422
445
|
*/
|
|
423
446
|
exportable?: boolean;
|
|
447
|
+
/**
|
|
448
|
+
* Export format.
|
|
449
|
+
* @default 'csv'
|
|
450
|
+
*/
|
|
451
|
+
exportFormat?: TableExportFormat;
|
|
424
452
|
/**
|
|
425
453
|
* Export filename (without extension)
|
|
426
454
|
* @default 'export'
|
|
@@ -439,20 +467,24 @@ interface FilterRule {
|
|
|
439
467
|
}
|
|
440
468
|
|
|
441
469
|
/**
|
|
442
|
-
* Table export utilities (CSV)
|
|
470
|
+
* Table export utilities (CSV / Excel-compatible HTML worksheet)
|
|
443
471
|
*/
|
|
444
472
|
|
|
445
473
|
/**
|
|
446
474
|
* Export table data to CSV string
|
|
447
475
|
*/
|
|
448
476
|
declare function exportTableToCsv<T>(columns: TableColumn<T>[], data: T[], _filename?: string): string;
|
|
477
|
+
declare function exportTableToExcel<T>(columns: TableColumn<T>[], data: T[]): string;
|
|
449
478
|
/**
|
|
450
479
|
* Trigger a CSV file download in the browser
|
|
451
480
|
*/
|
|
452
481
|
declare function downloadCsv(csvContent: string, filename?: string): void;
|
|
482
|
+
declare function downloadExcel(excelContent: string, filename?: string): void;
|
|
483
|
+
declare function exportTableData<T>(columns: TableColumn<T>[], data: T[], format?: TableExportFormat): string;
|
|
484
|
+
declare function downloadTableExport(content: string, filename?: string, format?: TableExportFormat): void;
|
|
453
485
|
/**
|
|
454
486
|
* Get export button classes
|
|
455
487
|
*/
|
|
456
488
|
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";
|
|
457
489
|
|
|
458
|
-
export { type ColumnAlign as C, type ExpandableConfig as E, type FilterOption as F, type PaginationConfig as P, type RowSelectionConfig as R, type SortDirection as S, type
|
|
490
|
+
export { type ColumnAlign as C, type ExpandableConfig as E, type FilterOption as F, type PaginationConfig as P, type RowSelectionConfig as R, type SortDirection as S, type TableResponsiveMode as T, type TableColumn as a, type TableSize as b, type TableProps as c, type FilterRule as d, type ColumnFilter as e, type SortState as f, exportTableToCsv as g, exportTableToExcel as h, downloadCsv as i, downloadExcel as j, exportTableData as k, downloadTableExport as l, type TableExportFormat as m, type FilterType as n, tableExportButtonClasses as t };
|
package/dist/tailwind/modern.cjs
CHANGED
|
@@ -1,12 +1,41 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
6
29
|
|
|
7
|
-
|
|
30
|
+
// src/tailwind-entry-modern.ts
|
|
31
|
+
var tailwind_entry_modern_exports = {};
|
|
32
|
+
__export(tailwind_entry_modern_exports, {
|
|
33
|
+
default: () => tailwind_entry_modern_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(tailwind_entry_modern_exports);
|
|
8
36
|
|
|
9
37
|
// src/tailwind-plugin.ts
|
|
38
|
+
var import_plugin = __toESM(require("tailwindcss/plugin"), 1);
|
|
10
39
|
|
|
11
40
|
// src/theme/index.ts
|
|
12
41
|
var THEME_CSS_VARS = {
|
|
@@ -47,7 +76,13 @@ var THEME_CSS_VARS = {
|
|
|
47
76
|
chart3: "--tiger-chart-3",
|
|
48
77
|
chart4: "--tiger-chart-4",
|
|
49
78
|
chart5: "--tiger-chart-5",
|
|
50
|
-
chart6: "--tiger-chart-6"
|
|
79
|
+
chart6: "--tiger-chart-6",
|
|
80
|
+
// Breakpoints
|
|
81
|
+
breakpointXs: "--tiger-breakpoint-xs",
|
|
82
|
+
breakpointSm: "--tiger-breakpoint-sm",
|
|
83
|
+
breakpointMd: "--tiger-breakpoint-md",
|
|
84
|
+
breakpointLg: "--tiger-breakpoint-lg",
|
|
85
|
+
breakpointXl: "--tiger-breakpoint-xl"
|
|
51
86
|
};
|
|
52
87
|
|
|
53
88
|
// src/themes/modern/tokens.ts
|
|
@@ -164,7 +199,10 @@ var MODERN_REDUCED_MOTION_TOKENS = {
|
|
|
164
199
|
"--tiger-motion-duration-quick": "0ms",
|
|
165
200
|
"--tiger-motion-duration-base": "0ms",
|
|
166
201
|
"--tiger-motion-duration-relaxed": "0ms",
|
|
167
|
-
"--tiger-motion-duration-slow": "0ms"
|
|
202
|
+
"--tiger-motion-duration-slow": "0ms",
|
|
203
|
+
"--tiger-transition-base": "all 0ms linear",
|
|
204
|
+
"--tiger-transition-quick": "all 0ms linear",
|
|
205
|
+
"--tiger-transition-emphasized": "transform 0ms linear"
|
|
168
206
|
};
|
|
169
207
|
|
|
170
208
|
// src/tailwind-plugin.ts
|
|
@@ -239,14 +277,42 @@ var tigercatDarkTheme = {
|
|
|
239
277
|
"--tiger-chart-5": "#38bdf8",
|
|
240
278
|
"--tiger-chart-6": "#f87171"
|
|
241
279
|
};
|
|
242
|
-
|
|
280
|
+
var tigercatDirectionBase = {
|
|
281
|
+
'[dir="rtl"] .tiger-rtl-mirror, [data-tiger-dir="rtl"] .tiger-rtl-mirror': {
|
|
282
|
+
transform: "scaleX(-1)"
|
|
283
|
+
},
|
|
284
|
+
'[dir="rtl"] .tiger-text-start, [data-tiger-dir="rtl"] .tiger-text-start': {
|
|
285
|
+
textAlign: "right"
|
|
286
|
+
},
|
|
287
|
+
'[dir="rtl"] .tiger-text-end, [data-tiger-dir="rtl"] .tiger-text-end': {
|
|
288
|
+
textAlign: "left"
|
|
289
|
+
},
|
|
290
|
+
'[dir="rtl"] .tiger-flex-row, [data-tiger-dir="rtl"] .tiger-flex-row': {
|
|
291
|
+
flexDirection: "row-reverse"
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
var tigercatReducedMotionBase = {
|
|
295
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
296
|
+
':root, [data-tiger-style="modern"]': MODERN_REDUCED_MOTION_TOKENS,
|
|
297
|
+
".tiger-motion-aware, .tiger-motion-aware::before, .tiger-motion-aware::after, [data-tiger-motion]": {
|
|
298
|
+
animationDuration: "0ms",
|
|
299
|
+
animationDelay: "0ms",
|
|
300
|
+
transitionDuration: "0ms",
|
|
301
|
+
transitionDelay: "0ms",
|
|
302
|
+
scrollBehavior: "auto"
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
var tigercatPlugin = (0, import_plugin.default)(function({ addBase }) {
|
|
243
307
|
addBase({
|
|
244
308
|
":root": { ...tigercatTheme, ...MODERN_BASE_TOKENS_LIGHT },
|
|
245
309
|
".dark": { ...tigercatDarkTheme, ...MODERN_BASE_TOKENS_DARK },
|
|
246
310
|
// Remove browser default focus outline on interactive SVG elements
|
|
247
311
|
'svg [tabindex], svg [role="button"]': {
|
|
248
312
|
outline: "none"
|
|
249
|
-
}
|
|
313
|
+
},
|
|
314
|
+
...tigercatDirectionBase,
|
|
315
|
+
...tigercatReducedMotionBase
|
|
250
316
|
});
|
|
251
317
|
});
|
|
252
318
|
function presetToVars(colors) {
|
|
@@ -260,7 +326,7 @@ function presetToVars(colors) {
|
|
|
260
326
|
return vars;
|
|
261
327
|
}
|
|
262
328
|
function createTigercatPlugin(options = {}) {
|
|
263
|
-
return
|
|
329
|
+
return (0, import_plugin.default)(function({ addBase }) {
|
|
264
330
|
const preset = options.preset;
|
|
265
331
|
const lightVars = preset?.light?.colors ? presetToVars(preset.light.colors) : tigercatTheme;
|
|
266
332
|
const darkVars = preset?.dark?.colors ? presetToVars(preset.dark.colors) : tigercatDarkTheme;
|
|
@@ -269,15 +335,14 @@ function createTigercatPlugin(options = {}) {
|
|
|
269
335
|
".dark": { ...darkVars, ...MODERN_BASE_TOKENS_DARK },
|
|
270
336
|
'svg [tabindex], svg [role="button"]': {
|
|
271
337
|
outline: "none"
|
|
272
|
-
}
|
|
338
|
+
},
|
|
339
|
+
...tigercatDirectionBase,
|
|
340
|
+
...tigercatReducedMotionBase
|
|
273
341
|
});
|
|
274
342
|
if (options.modern) {
|
|
275
343
|
addBase({
|
|
276
344
|
'[data-tiger-style="modern"]': MODERN_OVERRIDE_TOKENS_LIGHT,
|
|
277
|
-
'.dark[data-tiger-style="modern"], [data-tiger-style="modern"].dark': MODERN_OVERRIDE_TOKENS_DARK
|
|
278
|
-
"@media (prefers-reduced-motion: reduce)": {
|
|
279
|
-
':root, [data-tiger-style="modern"]': MODERN_REDUCED_MOTION_TOKENS
|
|
280
|
-
}
|
|
345
|
+
'.dark[data-tiger-style="modern"], [data-tiger-style="modern"].dark': MODERN_OVERRIDE_TOKENS_DARK
|
|
281
346
|
});
|
|
282
347
|
}
|
|
283
348
|
});
|
|
@@ -286,5 +351,3 @@ function createTigercatPlugin(options = {}) {
|
|
|
286
351
|
// src/tailwind-entry-modern.ts
|
|
287
352
|
var modernPlugin = createTigercatPlugin({ modern: true });
|
|
288
353
|
var tailwind_entry_modern_default = modernPlugin;
|
|
289
|
-
|
|
290
|
-
module.exports = tailwind_entry_modern_default;
|
package/dist/tailwind/modern.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import plugin from 'tailwindcss/plugin';
|
|
2
|
-
|
|
3
1
|
// src/tailwind-plugin.ts
|
|
2
|
+
import plugin from "tailwindcss/plugin";
|
|
4
3
|
|
|
5
4
|
// src/theme/index.ts
|
|
6
5
|
var THEME_CSS_VARS = {
|
|
@@ -41,7 +40,13 @@ var THEME_CSS_VARS = {
|
|
|
41
40
|
chart3: "--tiger-chart-3",
|
|
42
41
|
chart4: "--tiger-chart-4",
|
|
43
42
|
chart5: "--tiger-chart-5",
|
|
44
|
-
chart6: "--tiger-chart-6"
|
|
43
|
+
chart6: "--tiger-chart-6",
|
|
44
|
+
// Breakpoints
|
|
45
|
+
breakpointXs: "--tiger-breakpoint-xs",
|
|
46
|
+
breakpointSm: "--tiger-breakpoint-sm",
|
|
47
|
+
breakpointMd: "--tiger-breakpoint-md",
|
|
48
|
+
breakpointLg: "--tiger-breakpoint-lg",
|
|
49
|
+
breakpointXl: "--tiger-breakpoint-xl"
|
|
45
50
|
};
|
|
46
51
|
|
|
47
52
|
// src/themes/modern/tokens.ts
|
|
@@ -158,7 +163,10 @@ var MODERN_REDUCED_MOTION_TOKENS = {
|
|
|
158
163
|
"--tiger-motion-duration-quick": "0ms",
|
|
159
164
|
"--tiger-motion-duration-base": "0ms",
|
|
160
165
|
"--tiger-motion-duration-relaxed": "0ms",
|
|
161
|
-
"--tiger-motion-duration-slow": "0ms"
|
|
166
|
+
"--tiger-motion-duration-slow": "0ms",
|
|
167
|
+
"--tiger-transition-base": "all 0ms linear",
|
|
168
|
+
"--tiger-transition-quick": "all 0ms linear",
|
|
169
|
+
"--tiger-transition-emphasized": "transform 0ms linear"
|
|
162
170
|
};
|
|
163
171
|
|
|
164
172
|
// src/tailwind-plugin.ts
|
|
@@ -233,14 +241,42 @@ var tigercatDarkTheme = {
|
|
|
233
241
|
"--tiger-chart-5": "#38bdf8",
|
|
234
242
|
"--tiger-chart-6": "#f87171"
|
|
235
243
|
};
|
|
236
|
-
|
|
244
|
+
var tigercatDirectionBase = {
|
|
245
|
+
'[dir="rtl"] .tiger-rtl-mirror, [data-tiger-dir="rtl"] .tiger-rtl-mirror': {
|
|
246
|
+
transform: "scaleX(-1)"
|
|
247
|
+
},
|
|
248
|
+
'[dir="rtl"] .tiger-text-start, [data-tiger-dir="rtl"] .tiger-text-start': {
|
|
249
|
+
textAlign: "right"
|
|
250
|
+
},
|
|
251
|
+
'[dir="rtl"] .tiger-text-end, [data-tiger-dir="rtl"] .tiger-text-end': {
|
|
252
|
+
textAlign: "left"
|
|
253
|
+
},
|
|
254
|
+
'[dir="rtl"] .tiger-flex-row, [data-tiger-dir="rtl"] .tiger-flex-row': {
|
|
255
|
+
flexDirection: "row-reverse"
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
var tigercatReducedMotionBase = {
|
|
259
|
+
"@media (prefers-reduced-motion: reduce)": {
|
|
260
|
+
':root, [data-tiger-style="modern"]': MODERN_REDUCED_MOTION_TOKENS,
|
|
261
|
+
".tiger-motion-aware, .tiger-motion-aware::before, .tiger-motion-aware::after, [data-tiger-motion]": {
|
|
262
|
+
animationDuration: "0ms",
|
|
263
|
+
animationDelay: "0ms",
|
|
264
|
+
transitionDuration: "0ms",
|
|
265
|
+
transitionDelay: "0ms",
|
|
266
|
+
scrollBehavior: "auto"
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
};
|
|
270
|
+
var tigercatPlugin = plugin(function({ addBase }) {
|
|
237
271
|
addBase({
|
|
238
272
|
":root": { ...tigercatTheme, ...MODERN_BASE_TOKENS_LIGHT },
|
|
239
273
|
".dark": { ...tigercatDarkTheme, ...MODERN_BASE_TOKENS_DARK },
|
|
240
274
|
// Remove browser default focus outline on interactive SVG elements
|
|
241
275
|
'svg [tabindex], svg [role="button"]': {
|
|
242
276
|
outline: "none"
|
|
243
|
-
}
|
|
277
|
+
},
|
|
278
|
+
...tigercatDirectionBase,
|
|
279
|
+
...tigercatReducedMotionBase
|
|
244
280
|
});
|
|
245
281
|
});
|
|
246
282
|
function presetToVars(colors) {
|
|
@@ -263,15 +299,14 @@ function createTigercatPlugin(options = {}) {
|
|
|
263
299
|
".dark": { ...darkVars, ...MODERN_BASE_TOKENS_DARK },
|
|
264
300
|
'svg [tabindex], svg [role="button"]': {
|
|
265
301
|
outline: "none"
|
|
266
|
-
}
|
|
302
|
+
},
|
|
303
|
+
...tigercatDirectionBase,
|
|
304
|
+
...tigercatReducedMotionBase
|
|
267
305
|
});
|
|
268
306
|
if (options.modern) {
|
|
269
307
|
addBase({
|
|
270
308
|
'[data-tiger-style="modern"]': MODERN_OVERRIDE_TOKENS_LIGHT,
|
|
271
|
-
'.dark[data-tiger-style="modern"], [data-tiger-style="modern"].dark': MODERN_OVERRIDE_TOKENS_DARK
|
|
272
|
-
"@media (prefers-reduced-motion: reduce)": {
|
|
273
|
-
':root, [data-tiger-style="modern"]': MODERN_REDUCED_MOTION_TOKENS
|
|
274
|
-
}
|
|
309
|
+
'.dark[data-tiger-style="modern"], [data-tiger-style="modern"].dark': MODERN_OVERRIDE_TOKENS_DARK
|
|
275
310
|
});
|
|
276
311
|
}
|
|
277
312
|
});
|
|
@@ -280,5 +315,6 @@ function createTigercatPlugin(options = {}) {
|
|
|
280
315
|
// src/tailwind-entry-modern.ts
|
|
281
316
|
var modernPlugin = createTigercatPlugin({ modern: true });
|
|
282
317
|
var tailwind_entry_modern_default = modernPlugin;
|
|
283
|
-
|
|
284
|
-
|
|
318
|
+
export {
|
|
319
|
+
tailwind_entry_modern_default as default
|
|
320
|
+
};
|
|
@@ -122,7 +122,7 @@ interface ThemeConfig {
|
|
|
122
122
|
motion?: Partial<ThemeMotion>;
|
|
123
123
|
}
|
|
124
124
|
/** Name of a built-in preset theme */
|
|
125
|
-
type ThemePresetName = 'default' | 'vibrant' | 'professional' | 'minimal' | 'natural' | 'modern';
|
|
125
|
+
type ThemePresetName = 'default' | 'vibrant' | 'professional' | 'minimal' | 'natural' | 'modern' | 'high-contrast';
|
|
126
126
|
/**
|
|
127
127
|
* A fully defined preset theme.
|
|
128
128
|
* Both `light` and `dark` are required; they will be merged with defaults at runtime.
|
|
@@ -122,7 +122,7 @@ interface ThemeConfig {
|
|
|
122
122
|
motion?: Partial<ThemeMotion>;
|
|
123
123
|
}
|
|
124
124
|
/** Name of a built-in preset theme */
|
|
125
|
-
type ThemePresetName = 'default' | 'vibrant' | 'professional' | 'minimal' | 'natural' | 'modern';
|
|
125
|
+
type ThemePresetName = 'default' | 'vibrant' | 'professional' | 'minimal' | 'natural' | 'modern' | 'high-contrast';
|
|
126
126
|
/**
|
|
127
127
|
* A fully defined preset theme.
|
|
128
128
|
* Both `light` and `dark` are required; they will be merged with defaults at runtime.
|