@expcat/tigercat-core 1.0.7 → 1.1.0

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 (107) hide show
  1. package/dist/datepicker-DXzS_8l8.d.cts +130 -0
  2. package/dist/datepicker-DXzS_8l8.d.ts +130 -0
  3. package/dist/datepicker-locales/en-US.cjs +23 -0
  4. package/dist/datepicker-locales/en-US.d.cts +6 -0
  5. package/dist/datepicker-locales/en-US.d.ts +6 -0
  6. package/dist/datepicker-locales/en-US.js +17 -0
  7. package/dist/datepicker-locales/id-ID.cjs +23 -0
  8. package/dist/datepicker-locales/id-ID.d.cts +6 -0
  9. package/dist/datepicker-locales/id-ID.d.ts +6 -0
  10. package/dist/datepicker-locales/id-ID.js +17 -0
  11. package/dist/datepicker-locales/ja-JP.cjs +23 -0
  12. package/dist/datepicker-locales/ja-JP.d.cts +6 -0
  13. package/dist/datepicker-locales/ja-JP.d.ts +6 -0
  14. package/dist/datepicker-locales/ja-JP.js +17 -0
  15. package/dist/datepicker-locales/ko-KR.cjs +23 -0
  16. package/dist/datepicker-locales/ko-KR.d.cts +6 -0
  17. package/dist/datepicker-locales/ko-KR.d.ts +6 -0
  18. package/dist/datepicker-locales/ko-KR.js +17 -0
  19. package/dist/datepicker-locales/th-TH.cjs +23 -0
  20. package/dist/datepicker-locales/th-TH.d.cts +6 -0
  21. package/dist/datepicker-locales/th-TH.d.ts +6 -0
  22. package/dist/datepicker-locales/th-TH.js +17 -0
  23. package/dist/datepicker-locales/vi-VN.cjs +23 -0
  24. package/dist/datepicker-locales/vi-VN.d.cts +6 -0
  25. package/dist/datepicker-locales/vi-VN.d.ts +6 -0
  26. package/dist/datepicker-locales/vi-VN.js +17 -0
  27. package/dist/datepicker-locales/zh-CN.cjs +23 -0
  28. package/dist/datepicker-locales/zh-CN.d.cts +6 -0
  29. package/dist/datepicker-locales/zh-CN.d.ts +6 -0
  30. package/dist/datepicker-locales/zh-CN.js +17 -0
  31. package/dist/datepicker-locales/zh-TW.cjs +23 -0
  32. package/dist/datepicker-locales/zh-TW.d.cts +6 -0
  33. package/dist/datepicker-locales/zh-TW.d.ts +6 -0
  34. package/dist/datepicker-locales/zh-TW.js +17 -0
  35. package/dist/icons/common.cjs +22 -0
  36. package/dist/icons/common.d.cts +20 -0
  37. package/dist/icons/common.d.ts +20 -0
  38. package/dist/icons/common.js +12 -0
  39. package/dist/icons/picker.cjs +36 -0
  40. package/dist/icons/picker.d.cts +53 -0
  41. package/dist/icons/picker.d.ts +53 -0
  42. package/dist/icons/picker.js +19 -0
  43. package/dist/icons/status.cjs +19 -0
  44. package/dist/icons/status.d.cts +13 -0
  45. package/dist/icons/status.d.ts +13 -0
  46. package/dist/icons/status.js +13 -0
  47. package/dist/icons/table.cjs +18 -0
  48. package/dist/icons/table.d.cts +25 -0
  49. package/dist/icons/table.d.ts +25 -0
  50. package/dist/icons/table.js +10 -0
  51. package/dist/index.cjs +4730 -3533
  52. package/dist/index.d.cts +1907 -1201
  53. package/dist/index.d.ts +1907 -1201
  54. package/dist/index.js +3231 -2196
  55. package/dist/locale-CEmE5uq-.d.cts +92 -0
  56. package/dist/locale-m1sF4KRO.d.ts +92 -0
  57. package/dist/locales/en-US.cjs +43 -0
  58. package/dist/locales/en-US.d.cts +10 -0
  59. package/dist/locales/en-US.d.ts +10 -0
  60. package/dist/locales/en-US.js +41 -0
  61. package/dist/locales/id-ID.cjs +43 -0
  62. package/dist/locales/id-ID.d.cts +10 -0
  63. package/dist/locales/id-ID.d.ts +10 -0
  64. package/dist/locales/id-ID.js +41 -0
  65. package/dist/locales/ja-JP.cjs +43 -0
  66. package/dist/locales/ja-JP.d.cts +10 -0
  67. package/dist/locales/ja-JP.d.ts +10 -0
  68. package/dist/locales/ja-JP.js +41 -0
  69. package/dist/locales/ko-KR.cjs +43 -0
  70. package/dist/locales/ko-KR.d.cts +10 -0
  71. package/dist/locales/ko-KR.d.ts +10 -0
  72. package/dist/locales/ko-KR.js +41 -0
  73. package/dist/locales/th-TH.cjs +43 -0
  74. package/dist/locales/th-TH.d.cts +10 -0
  75. package/dist/locales/th-TH.d.ts +10 -0
  76. package/dist/locales/th-TH.js +41 -0
  77. package/dist/locales/vi-VN.cjs +43 -0
  78. package/dist/locales/vi-VN.d.cts +10 -0
  79. package/dist/locales/vi-VN.d.ts +10 -0
  80. package/dist/locales/vi-VN.js +41 -0
  81. package/dist/locales/zh-CN.cjs +43 -0
  82. package/dist/locales/zh-CN.d.cts +10 -0
  83. package/dist/locales/zh-CN.d.ts +10 -0
  84. package/dist/locales/zh-CN.js +41 -0
  85. package/dist/locales/zh-TW.cjs +43 -0
  86. package/dist/locales/zh-TW.d.cts +10 -0
  87. package/dist/locales/zh-TW.d.ts +10 -0
  88. package/dist/locales/zh-TW.js +41 -0
  89. package/dist/table-export-Cy9DgTiO.d.cts +458 -0
  90. package/dist/table-export-Cy9DgTiO.d.ts +458 -0
  91. package/dist/tailwind/modern.cjs +290 -0
  92. package/dist/tailwind/modern.d.cts +6 -0
  93. package/dist/tailwind/modern.d.ts +6 -0
  94. package/dist/tailwind/modern.js +284 -0
  95. package/dist/tailwind-entry-2KPvkOin.d.ts +218 -0
  96. package/dist/tailwind-entry-CUaMC8Ma.d.cts +218 -0
  97. package/dist/tailwind.cjs +141 -0
  98. package/dist/tailwind.d.cts +3 -0
  99. package/dist/tailwind.d.ts +3 -0
  100. package/dist/tailwind.js +135 -0
  101. package/dist/types-CJYAW1ql.d-DDBFn6KB.d.cts +126 -0
  102. package/dist/types-CJYAW1ql.d-DDBFn6KB.d.ts +126 -0
  103. package/dist/utils/table-export.cjs +38 -0
  104. package/dist/utils/table-export.d.cts +1 -0
  105. package/dist/utils/table-export.d.ts +1 -0
  106. package/dist/utils/table-export.js +34 -0
  107. package/package.json +131 -7
@@ -0,0 +1,135 @@
1
+ import plugin from 'tailwindcss/plugin';
2
+
3
+ // src/tailwind-plugin.ts
4
+
5
+ // src/themes/modern/tokens.ts
6
+ var MODERN_BASE_TOKENS_LIGHT = {
7
+ // Radius (matches existing rounded-md/lg/xl)
8
+ "--tiger-radius-sm": "0.375rem",
9
+ "--tiger-radius-md": "0.5rem",
10
+ "--tiger-radius-lg": "0.75rem",
11
+ "--tiger-radius-xl": "1rem",
12
+ "--tiger-radius-pill": "9999px",
13
+ // Shadows (Tailwind defaults)
14
+ "--tiger-shadow-sm": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
15
+ "--tiger-shadow-md": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
16
+ "--tiger-shadow-lg": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
17
+ "--tiger-shadow-xl": "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
18
+ // Glass — disabled by default (no backdrop blur, no inset highlights)
19
+ "--tiger-shadow-glass": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
20
+ "--tiger-shadow-glass-strong": "0 4px 6px -1px rgb(0 0 0 / 0.1)",
21
+ "--tiger-blur-glass": "0px",
22
+ "--tiger-blur-glass-strong": "0px",
23
+ // Gradients — fall back to solid color via a no-op linear-gradient
24
+ "--tiger-gradient-primary": "linear-gradient(180deg, var(--tiger-primary), var(--tiger-primary))",
25
+ "--tiger-gradient-surface": "linear-gradient(180deg, var(--tiger-surface), var(--tiger-surface))",
26
+ "--tiger-gradient-danger": "linear-gradient(180deg, var(--tiger-error), var(--tiger-error))",
27
+ // Motion — current durations / easings
28
+ "--tiger-motion-duration-instant": "80ms",
29
+ "--tiger-motion-duration-quick": "150ms",
30
+ "--tiger-motion-duration-base": "200ms",
31
+ "--tiger-motion-duration-relaxed": "300ms",
32
+ "--tiger-motion-duration-slow": "450ms",
33
+ "--tiger-motion-ease-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
34
+ "--tiger-motion-ease-decelerate": "cubic-bezier(0, 0, 0.2, 1)",
35
+ "--tiger-motion-ease-accelerate": "cubic-bezier(0.4, 0, 1, 1)",
36
+ "--tiger-motion-ease-emphasized": "cubic-bezier(0.4, 0, 0.2, 1)",
37
+ "--tiger-motion-ease-spring": "cubic-bezier(0.4, 0, 0.2, 1)",
38
+ "--tiger-transition-base": "all 200ms cubic-bezier(0.4, 0, 0.2, 1)",
39
+ "--tiger-transition-quick": "all 150ms cubic-bezier(0.4, 0, 0.2, 1)",
40
+ "--tiger-transition-emphasized": "transform 300ms cubic-bezier(0.4, 0, 0.2, 1)"
41
+ };
42
+ var MODERN_BASE_TOKENS_DARK = {
43
+ // Shadows tinted slightly to handle dark backgrounds
44
+ "--tiger-shadow-sm": "0 1px 2px 0 rgb(0 0 0 / 0.2)",
45
+ "--tiger-shadow-md": "0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.25)",
46
+ "--tiger-shadow-lg": "0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.25)",
47
+ "--tiger-shadow-xl": "0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.25)",
48
+ "--tiger-shadow-glass": "0 1px 2px 0 rgb(0 0 0 / 0.2)",
49
+ "--tiger-shadow-glass-strong": "0 4px 6px -1px rgb(0 0 0 / 0.3)"
50
+ };
51
+
52
+ // src/tailwind-plugin.ts
53
+ var tigercatTheme = {
54
+ // Primary
55
+ "--tiger-primary": "#2563eb",
56
+ "--tiger-primary-hover": "#1d4ed8",
57
+ "--tiger-primary-active": "#1e40af",
58
+ "--tiger-primary-disabled": "#93c5fd",
59
+ // Secondary
60
+ "--tiger-secondary": "#4b5563",
61
+ "--tiger-secondary-hover": "#374151",
62
+ "--tiger-secondary-active": "#1f2937",
63
+ "--tiger-secondary-disabled": "#9ca3af",
64
+ // Background hover states
65
+ "--tiger-outline-bg-hover": "#eff6ff",
66
+ "--tiger-ghost-bg-hover": "#eff6ff",
67
+ // Interaction
68
+ "--tiger-focus-ring": "#2563eb",
69
+ // Surface & background
70
+ "--tiger-surface": "#ffffff",
71
+ "--tiger-surface-muted": "#f9fafb",
72
+ "--tiger-surface-raised": "#ffffff",
73
+ // Text
74
+ "--tiger-text": "#111827",
75
+ "--tiger-text-secondary": "#6b7280",
76
+ "--tiger-text-disabled": "#d1d5db",
77
+ // Border
78
+ "--tiger-border": "#e5e7eb",
79
+ "--tiger-border-strong": "#9ca3af",
80
+ // Status
81
+ "--tiger-success": "#16a34a",
82
+ "--tiger-warning": "#d97706",
83
+ "--tiger-error": "#dc2626",
84
+ "--tiger-info": "#3b82f6",
85
+ // Chart palette
86
+ "--tiger-chart-1": "#2563eb",
87
+ "--tiger-chart-2": "#16a34a",
88
+ "--tiger-chart-3": "#d97706",
89
+ "--tiger-chart-4": "#a855f7",
90
+ "--tiger-chart-5": "#0ea5e9",
91
+ "--tiger-chart-6": "#ef4444"
92
+ };
93
+ var tigercatDarkTheme = {
94
+ "--tiger-primary": "#60a5fa",
95
+ "--tiger-primary-hover": "#93c5fd",
96
+ "--tiger-primary-active": "#bfdbfe",
97
+ "--tiger-primary-disabled": "#1e40af",
98
+ "--tiger-secondary": "#9ca3af",
99
+ "--tiger-secondary-hover": "#d1d5db",
100
+ "--tiger-secondary-active": "#e5e7eb",
101
+ "--tiger-secondary-disabled": "#4b5563",
102
+ "--tiger-outline-bg-hover": "#1e3a5f",
103
+ "--tiger-ghost-bg-hover": "#1e3a5f",
104
+ "--tiger-focus-ring": "#60a5fa",
105
+ "--tiger-surface": "#111827",
106
+ "--tiger-surface-muted": "#1f2937",
107
+ "--tiger-surface-raised": "#1f2937",
108
+ "--tiger-text": "#f9fafb",
109
+ "--tiger-text-secondary": "#d1d5db",
110
+ "--tiger-text-disabled": "#4b5563",
111
+ "--tiger-border": "#374151",
112
+ "--tiger-border-strong": "#6b7280",
113
+ "--tiger-success": "#4ade80",
114
+ "--tiger-warning": "#fbbf24",
115
+ "--tiger-error": "#f87171",
116
+ "--tiger-info": "#60a5fa",
117
+ "--tiger-chart-1": "#60a5fa",
118
+ "--tiger-chart-2": "#4ade80",
119
+ "--tiger-chart-3": "#fbbf24",
120
+ "--tiger-chart-4": "#c084fc",
121
+ "--tiger-chart-5": "#38bdf8",
122
+ "--tiger-chart-6": "#f87171"
123
+ };
124
+ var tigercatPlugin = plugin(function({ addBase }) {
125
+ addBase({
126
+ ":root": { ...tigercatTheme, ...MODERN_BASE_TOKENS_LIGHT },
127
+ ".dark": { ...tigercatDarkTheme, ...MODERN_BASE_TOKENS_DARK },
128
+ // Remove browser default focus outline on interactive SVG elements
129
+ 'svg [tabindex], svg [role="button"]': {
130
+ outline: "none"
131
+ }
132
+ });
133
+ });
134
+
135
+ export { tigercatPlugin as default };
@@ -0,0 +1,126 @@
1
+ import { N, P } from './resolve-config-QUZ9b-Gn.mjs';
2
+
3
+ /**
4
+ * The source code for one or more nodes in the AST
5
+ *
6
+ * This generally corresponds to a stylesheet
7
+ */
8
+ interface Source {
9
+ /**
10
+ * The path to the file that contains the referenced source code
11
+ *
12
+ * If this references the *output* source code, this is `null`.
13
+ */
14
+ file: string | null;
15
+ /**
16
+ * The referenced source code
17
+ */
18
+ code: string;
19
+ }
20
+ /**
21
+ * The file and offsets within it that this node covers
22
+ *
23
+ * This can represent either:
24
+ * - A location in the original CSS which caused this node to be created
25
+ * - A location in the output CSS where this node resides
26
+ */
27
+ type SourceLocation = [source: Source, start: number, end: number];
28
+ type PluginFn = (api: PluginAPI) => void;
29
+ type PluginWithConfig = {
30
+ handler: PluginFn;
31
+ config?: UserConfig;
32
+ /** @internal */
33
+ reference?: boolean;
34
+ src?: SourceLocation | undefined;
35
+ };
36
+ type PluginWithOptions<T> = {
37
+ (options?: T): PluginWithConfig;
38
+ __isOptionsFunction: true;
39
+ };
40
+ type Plugin = PluginFn | PluginWithConfig | PluginWithOptions<any>;
41
+ type PluginAPI = {
42
+ addBase(base: CssInJs): void;
43
+ addVariant(name: string, variant: string | string[] | CssInJs): void;
44
+ matchVariant<T = string>(name: string, cb: (value: T | string, extra: {
45
+ modifier: string | null;
46
+ }) => string | string[], options?: {
47
+ values?: Record<string, T>;
48
+ sort?(a: {
49
+ value: T | string;
50
+ modifier: string | null;
51
+ }, b: {
52
+ value: T | string;
53
+ modifier: string | null;
54
+ }): number;
55
+ }): void;
56
+ addUtilities(utilities: Record<string, CssInJs | CssInJs[]> | Record<string, CssInJs | CssInJs[]>[], options?: {}): void;
57
+ matchUtilities(utilities: Record<string, (value: string, extra: {
58
+ modifier: string | null;
59
+ }) => CssInJs | CssInJs[]>, options?: Partial<{
60
+ type: string | string[];
61
+ supportsNegativeValues: boolean;
62
+ values: Record<string, string> & {
63
+ __BARE_VALUE__?: (value: N) => string | undefined;
64
+ };
65
+ modifiers: 'any' | Record<string, string>;
66
+ }>): void;
67
+ addComponents(utilities: Record<string, CssInJs> | Record<string, CssInJs>[], options?: {}): void;
68
+ matchComponents(utilities: Record<string, (value: string, extra: {
69
+ modifier: string | null;
70
+ }) => CssInJs>, options?: Partial<{
71
+ type: string | string[];
72
+ supportsNegativeValues: boolean;
73
+ values: Record<string, string> & {
74
+ __BARE_VALUE__?: (value: N) => string | undefined;
75
+ };
76
+ modifiers: 'any' | Record<string, string>;
77
+ }>): void;
78
+ theme(path: string, defaultValue?: any): any;
79
+ config(path?: string, defaultValue?: any): any;
80
+ prefix(className: string): string;
81
+ };
82
+ type CssInJs = {
83
+ [key: string]: string | string[] | CssInJs | CssInJs[];
84
+ };
85
+
86
+ type ResolvableTo<T> = T | ((utils: P) => T);
87
+ type ThemeValue = ResolvableTo<Record<string, unknown>> | null | undefined;
88
+ type ThemeConfig = Record<string, ThemeValue> & {
89
+ extend?: Record<string, ThemeValue>;
90
+ };
91
+ type ContentFile = string | {
92
+ raw: string;
93
+ extension?: string;
94
+ };
95
+ type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]];
96
+ interface UserConfig {
97
+ presets?: UserConfig[];
98
+ theme?: ThemeConfig;
99
+ plugins?: Plugin[];
100
+ }
101
+ interface UserConfig {
102
+ content?: ContentFile[] | {
103
+ relative?: boolean;
104
+ files: ContentFile[];
105
+ };
106
+ }
107
+ interface UserConfig {
108
+ darkMode?: DarkModeStrategy;
109
+ }
110
+ interface UserConfig {
111
+ prefix?: string;
112
+ }
113
+ interface UserConfig {
114
+ blocklist?: string[];
115
+ }
116
+ interface UserConfig {
117
+ important?: boolean | string;
118
+ }
119
+ interface UserConfig {
120
+ future?: 'all' | Record<string, boolean>;
121
+ }
122
+ interface UserConfig {
123
+ experimental?: 'all' | Record<string, boolean>;
124
+ }
125
+
126
+ export type { PluginWithConfig as P };
@@ -0,0 +1,126 @@
1
+ import { N, P } from './resolve-config-QUZ9b-Gn.mjs';
2
+
3
+ /**
4
+ * The source code for one or more nodes in the AST
5
+ *
6
+ * This generally corresponds to a stylesheet
7
+ */
8
+ interface Source {
9
+ /**
10
+ * The path to the file that contains the referenced source code
11
+ *
12
+ * If this references the *output* source code, this is `null`.
13
+ */
14
+ file: string | null;
15
+ /**
16
+ * The referenced source code
17
+ */
18
+ code: string;
19
+ }
20
+ /**
21
+ * The file and offsets within it that this node covers
22
+ *
23
+ * This can represent either:
24
+ * - A location in the original CSS which caused this node to be created
25
+ * - A location in the output CSS where this node resides
26
+ */
27
+ type SourceLocation = [source: Source, start: number, end: number];
28
+ type PluginFn = (api: PluginAPI) => void;
29
+ type PluginWithConfig = {
30
+ handler: PluginFn;
31
+ config?: UserConfig;
32
+ /** @internal */
33
+ reference?: boolean;
34
+ src?: SourceLocation | undefined;
35
+ };
36
+ type PluginWithOptions<T> = {
37
+ (options?: T): PluginWithConfig;
38
+ __isOptionsFunction: true;
39
+ };
40
+ type Plugin = PluginFn | PluginWithConfig | PluginWithOptions<any>;
41
+ type PluginAPI = {
42
+ addBase(base: CssInJs): void;
43
+ addVariant(name: string, variant: string | string[] | CssInJs): void;
44
+ matchVariant<T = string>(name: string, cb: (value: T | string, extra: {
45
+ modifier: string | null;
46
+ }) => string | string[], options?: {
47
+ values?: Record<string, T>;
48
+ sort?(a: {
49
+ value: T | string;
50
+ modifier: string | null;
51
+ }, b: {
52
+ value: T | string;
53
+ modifier: string | null;
54
+ }): number;
55
+ }): void;
56
+ addUtilities(utilities: Record<string, CssInJs | CssInJs[]> | Record<string, CssInJs | CssInJs[]>[], options?: {}): void;
57
+ matchUtilities(utilities: Record<string, (value: string, extra: {
58
+ modifier: string | null;
59
+ }) => CssInJs | CssInJs[]>, options?: Partial<{
60
+ type: string | string[];
61
+ supportsNegativeValues: boolean;
62
+ values: Record<string, string> & {
63
+ __BARE_VALUE__?: (value: N) => string | undefined;
64
+ };
65
+ modifiers: 'any' | Record<string, string>;
66
+ }>): void;
67
+ addComponents(utilities: Record<string, CssInJs> | Record<string, CssInJs>[], options?: {}): void;
68
+ matchComponents(utilities: Record<string, (value: string, extra: {
69
+ modifier: string | null;
70
+ }) => CssInJs>, options?: Partial<{
71
+ type: string | string[];
72
+ supportsNegativeValues: boolean;
73
+ values: Record<string, string> & {
74
+ __BARE_VALUE__?: (value: N) => string | undefined;
75
+ };
76
+ modifiers: 'any' | Record<string, string>;
77
+ }>): void;
78
+ theme(path: string, defaultValue?: any): any;
79
+ config(path?: string, defaultValue?: any): any;
80
+ prefix(className: string): string;
81
+ };
82
+ type CssInJs = {
83
+ [key: string]: string | string[] | CssInJs | CssInJs[];
84
+ };
85
+
86
+ type ResolvableTo<T> = T | ((utils: P) => T);
87
+ type ThemeValue = ResolvableTo<Record<string, unknown>> | null | undefined;
88
+ type ThemeConfig = Record<string, ThemeValue> & {
89
+ extend?: Record<string, ThemeValue>;
90
+ };
91
+ type ContentFile = string | {
92
+ raw: string;
93
+ extension?: string;
94
+ };
95
+ type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]];
96
+ interface UserConfig {
97
+ presets?: UserConfig[];
98
+ theme?: ThemeConfig;
99
+ plugins?: Plugin[];
100
+ }
101
+ interface UserConfig {
102
+ content?: ContentFile[] | {
103
+ relative?: boolean;
104
+ files: ContentFile[];
105
+ };
106
+ }
107
+ interface UserConfig {
108
+ darkMode?: DarkModeStrategy;
109
+ }
110
+ interface UserConfig {
111
+ prefix?: string;
112
+ }
113
+ interface UserConfig {
114
+ blocklist?: string[];
115
+ }
116
+ interface UserConfig {
117
+ important?: boolean | string;
118
+ }
119
+ interface UserConfig {
120
+ future?: 'all' | Record<string, boolean>;
121
+ }
122
+ interface UserConfig {
123
+ experimental?: 'all' | Record<string, boolean>;
124
+ }
125
+
126
+ export type { PluginWithConfig as P };
@@ -0,0 +1,38 @@
1
+ 'use strict';
2
+
3
+ // src/utils/table-export-utils.ts
4
+ function escapeCsvValue(value) {
5
+ const str = value === null || value === void 0 ? "" : String(value);
6
+ if (str.includes(",") || str.includes('"') || str.includes("\n")) {
7
+ return `"${str.replace(/"/g, '""')}"`;
8
+ }
9
+ return str;
10
+ }
11
+ function exportTableToCsv(columns, data, _filename) {
12
+ const headers = columns.map((col) => escapeCsvValue(col.title));
13
+ const rows = data.map(
14
+ (record) => columns.map((col) => {
15
+ const key = col.dataKey || col.key;
16
+ const value = record[key];
17
+ return escapeCsvValue(value);
18
+ }).join(",")
19
+ );
20
+ return [headers.join(","), ...rows].join("\n");
21
+ }
22
+ function downloadCsv(csvContent, filename = "export") {
23
+ const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
24
+ const url = URL.createObjectURL(blob);
25
+ const link = document.createElement("a");
26
+ link.href = url;
27
+ link.download = `${filename}.csv`;
28
+ link.style.display = "none";
29
+ document.body.appendChild(link);
30
+ link.click();
31
+ document.body.removeChild(link);
32
+ URL.revokeObjectURL(url);
33
+ }
34
+ var 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";
35
+
36
+ exports.downloadCsv = downloadCsv;
37
+ exports.exportTableToCsv = exportTableToCsv;
38
+ exports.tableExportButtonClasses = tableExportButtonClasses;
@@ -0,0 +1 @@
1
+ export { g as downloadCsv, f as exportTableToCsv, t as tableExportButtonClasses } from '../table-export-Cy9DgTiO.cjs';
@@ -0,0 +1 @@
1
+ export { g as downloadCsv, f as exportTableToCsv, t as tableExportButtonClasses } from '../table-export-Cy9DgTiO.js';
@@ -0,0 +1,34 @@
1
+ // src/utils/table-export-utils.ts
2
+ function escapeCsvValue(value) {
3
+ const str = value === null || value === void 0 ? "" : String(value);
4
+ if (str.includes(",") || str.includes('"') || str.includes("\n")) {
5
+ return `"${str.replace(/"/g, '""')}"`;
6
+ }
7
+ return str;
8
+ }
9
+ function exportTableToCsv(columns, data, _filename) {
10
+ const headers = columns.map((col) => escapeCsvValue(col.title));
11
+ const rows = data.map(
12
+ (record) => columns.map((col) => {
13
+ const key = col.dataKey || col.key;
14
+ const value = record[key];
15
+ return escapeCsvValue(value);
16
+ }).join(",")
17
+ );
18
+ return [headers.join(","), ...rows].join("\n");
19
+ }
20
+ function downloadCsv(csvContent, filename = "export") {
21
+ const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
22
+ const url = URL.createObjectURL(blob);
23
+ const link = document.createElement("a");
24
+ link.href = url;
25
+ link.download = `${filename}.csv`;
26
+ link.style.display = "none";
27
+ document.body.appendChild(link);
28
+ link.click();
29
+ document.body.removeChild(link);
30
+ URL.revokeObjectURL(url);
31
+ }
32
+ var 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";
33
+
34
+ export { downloadCsv, exportTableToCsv, tableExportButtonClasses };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expcat/tigercat-core",
3
- "version": "1.0.7",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "description": "Core utilities for Tigercat UI library",
6
6
  "license": "MIT",
@@ -26,7 +26,8 @@
26
26
  "exports": {
27
27
  ".": {
28
28
  "types": "./dist/index.d.ts",
29
- "import": "./dist/index.js"
29
+ "import": "./dist/index.js",
30
+ "require": "./dist/index.cjs"
30
31
  },
31
32
  "./types": {
32
33
  "types": "./dist/types/index.d.ts",
@@ -35,6 +36,121 @@
35
36
  "./theme": {
36
37
  "types": "./dist/theme/index.d.ts",
37
38
  "import": "./dist/theme/index.js"
39
+ },
40
+ "./tailwind": {
41
+ "types": "./dist/tailwind.d.ts",
42
+ "import": "./dist/tailwind.js",
43
+ "require": "./dist/tailwind.cjs"
44
+ },
45
+ "./tailwind/modern": {
46
+ "types": "./dist/tailwind/modern.d.ts",
47
+ "import": "./dist/tailwind/modern.js",
48
+ "require": "./dist/tailwind/modern.cjs"
49
+ },
50
+ "./locales/en-US": {
51
+ "types": "./dist/locales/en-US.d.ts",
52
+ "import": "./dist/locales/en-US.js",
53
+ "require": "./dist/locales/en-US.cjs"
54
+ },
55
+ "./locales/zh-CN": {
56
+ "types": "./dist/locales/zh-CN.d.ts",
57
+ "import": "./dist/locales/zh-CN.js",
58
+ "require": "./dist/locales/zh-CN.cjs"
59
+ },
60
+ "./locales/zh-TW": {
61
+ "types": "./dist/locales/zh-TW.d.ts",
62
+ "import": "./dist/locales/zh-TW.js",
63
+ "require": "./dist/locales/zh-TW.cjs"
64
+ },
65
+ "./locales/ja-JP": {
66
+ "types": "./dist/locales/ja-JP.d.ts",
67
+ "import": "./dist/locales/ja-JP.js",
68
+ "require": "./dist/locales/ja-JP.cjs"
69
+ },
70
+ "./locales/ko-KR": {
71
+ "types": "./dist/locales/ko-KR.d.ts",
72
+ "import": "./dist/locales/ko-KR.js",
73
+ "require": "./dist/locales/ko-KR.cjs"
74
+ },
75
+ "./locales/th-TH": {
76
+ "types": "./dist/locales/th-TH.d.ts",
77
+ "import": "./dist/locales/th-TH.js",
78
+ "require": "./dist/locales/th-TH.cjs"
79
+ },
80
+ "./locales/vi-VN": {
81
+ "types": "./dist/locales/vi-VN.d.ts",
82
+ "import": "./dist/locales/vi-VN.js",
83
+ "require": "./dist/locales/vi-VN.cjs"
84
+ },
85
+ "./locales/id-ID": {
86
+ "types": "./dist/locales/id-ID.d.ts",
87
+ "import": "./dist/locales/id-ID.js",
88
+ "require": "./dist/locales/id-ID.cjs"
89
+ },
90
+ "./datepicker-locales/en-US": {
91
+ "types": "./dist/datepicker-locales/en-US.d.ts",
92
+ "import": "./dist/datepicker-locales/en-US.js",
93
+ "require": "./dist/datepicker-locales/en-US.cjs"
94
+ },
95
+ "./datepicker-locales/zh-CN": {
96
+ "types": "./dist/datepicker-locales/zh-CN.d.ts",
97
+ "import": "./dist/datepicker-locales/zh-CN.js",
98
+ "require": "./dist/datepicker-locales/zh-CN.cjs"
99
+ },
100
+ "./datepicker-locales/zh-TW": {
101
+ "types": "./dist/datepicker-locales/zh-TW.d.ts",
102
+ "import": "./dist/datepicker-locales/zh-TW.js",
103
+ "require": "./dist/datepicker-locales/zh-TW.cjs"
104
+ },
105
+ "./datepicker-locales/ja-JP": {
106
+ "types": "./dist/datepicker-locales/ja-JP.d.ts",
107
+ "import": "./dist/datepicker-locales/ja-JP.js",
108
+ "require": "./dist/datepicker-locales/ja-JP.cjs"
109
+ },
110
+ "./datepicker-locales/ko-KR": {
111
+ "types": "./dist/datepicker-locales/ko-KR.d.ts",
112
+ "import": "./dist/datepicker-locales/ko-KR.js",
113
+ "require": "./dist/datepicker-locales/ko-KR.cjs"
114
+ },
115
+ "./datepicker-locales/th-TH": {
116
+ "types": "./dist/datepicker-locales/th-TH.d.ts",
117
+ "import": "./dist/datepicker-locales/th-TH.js",
118
+ "require": "./dist/datepicker-locales/th-TH.cjs"
119
+ },
120
+ "./datepicker-locales/vi-VN": {
121
+ "types": "./dist/datepicker-locales/vi-VN.d.ts",
122
+ "import": "./dist/datepicker-locales/vi-VN.js",
123
+ "require": "./dist/datepicker-locales/vi-VN.cjs"
124
+ },
125
+ "./datepicker-locales/id-ID": {
126
+ "types": "./dist/datepicker-locales/id-ID.d.ts",
127
+ "import": "./dist/datepicker-locales/id-ID.js",
128
+ "require": "./dist/datepicker-locales/id-ID.cjs"
129
+ },
130
+ "./icons/common": {
131
+ "types": "./dist/icons/common.d.ts",
132
+ "import": "./dist/icons/common.js",
133
+ "require": "./dist/icons/common.cjs"
134
+ },
135
+ "./icons/picker": {
136
+ "types": "./dist/icons/picker.d.ts",
137
+ "import": "./dist/icons/picker.js",
138
+ "require": "./dist/icons/picker.cjs"
139
+ },
140
+ "./icons/status": {
141
+ "types": "./dist/icons/status.d.ts",
142
+ "import": "./dist/icons/status.js",
143
+ "require": "./dist/icons/status.cjs"
144
+ },
145
+ "./icons/table": {
146
+ "types": "./dist/icons/table.d.ts",
147
+ "import": "./dist/icons/table.js",
148
+ "require": "./dist/icons/table.cjs"
149
+ },
150
+ "./utils/table-export": {
151
+ "types": "./dist/utils/table-export.d.ts",
152
+ "import": "./dist/utils/table-export.js",
153
+ "require": "./dist/utils/table-export.cjs"
38
154
  }
39
155
  },
40
156
  "files": [
@@ -44,16 +160,24 @@
44
160
  "access": "public"
45
161
  },
46
162
  "dependencies": {
47
- "@floating-ui/dom": "^1.6.13"
163
+ "@floating-ui/dom": "^1.7.6"
164
+ },
165
+ "peerDependencies": {
166
+ "tailwindcss": "^4.0.0"
167
+ },
168
+ "peerDependenciesMeta": {
169
+ "tailwindcss": {
170
+ "optional": true
171
+ }
48
172
  },
49
173
  "devDependencies": {
50
- "tailwindcss": "^3.4.19",
174
+ "tailwindcss": "^4.2.4",
51
175
  "tsup": "^8.5.1",
52
- "typescript": "^5.9.3"
176
+ "typescript": "^6.0.3"
53
177
  },
54
178
  "scripts": {
55
- "build": "tsup src/index.ts --format cjs,esm --dts",
56
- "dev": "tsup src/index.ts --format cjs,esm --dts --watch",
179
+ "build": "tsup",
180
+ "dev": "tsup --watch",
57
181
  "clean": "node ../../scripts/rimraf.mjs dist"
58
182
  }
59
183
  }