@expcat/tigercat-core 1.4.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 (133) hide show
  1. package/dist/{datepicker-DXzS_8l8.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 +12341 -12244
  20. package/dist/index.js +1482 -659
  21. package/dist/{locale-9tTj1QdZ.d.ts → locale-44p_QYnH.d.ts} +96 -7
  22. package/dist/locales/ar-SA.d.ts +2 -2
  23. package/dist/locales/ar-SA.js +122 -1
  24. package/dist/locales/de-DE.d.ts +2 -2
  25. package/dist/locales/de-DE.js +122 -1
  26. package/dist/locales/en-US.d.ts +2 -2
  27. package/dist/locales/en-US.js +98 -1
  28. package/dist/locales/es-ES.d.ts +2 -2
  29. package/dist/locales/es-ES.js +122 -1
  30. package/dist/locales/fr-FR.d.ts +2 -2
  31. package/dist/locales/fr-FR.js +122 -1
  32. package/dist/locales/id-ID.d.ts +2 -2
  33. package/dist/locales/id-ID.js +268 -2
  34. package/dist/locales/ja-JP.d.ts +2 -2
  35. package/dist/locales/ja-JP.js +268 -2
  36. package/dist/locales/ko-KR.d.ts +2 -2
  37. package/dist/locales/ko-KR.js +268 -2
  38. package/dist/locales/pt-BR.d.ts +2 -2
  39. package/dist/locales/pt-BR.js +122 -1
  40. package/dist/locales/th-TH.d.ts +2 -2
  41. package/dist/locales/th-TH.js +268 -2
  42. package/dist/locales/vi-VN.d.ts +2 -2
  43. package/dist/locales/vi-VN.js +268 -2
  44. package/dist/locales/zh-CN.d.ts +2 -2
  45. package/dist/locales/zh-CN.js +98 -1
  46. package/dist/locales/zh-TW.d.ts +2 -2
  47. package/dist/locales/zh-TW.js +268 -2
  48. package/dist/{table-export-GRimhvlM.d.ts → table-export-CzPmX1b6.d.ts} +3 -9
  49. package/dist/tailwind/modern.d.ts +2 -3
  50. package/dist/tailwind/modern.js +75 -80
  51. package/dist/{tailwind-entry-D4_sseNi.d.ts → tailwind-entry-CNBAH7iv.d.ts} +7 -41
  52. package/dist/tailwind.d.ts +2 -3
  53. package/dist/tailwind.js +123 -70
  54. package/dist/utils/table-export.d.ts +3 -3
  55. package/package.json +43 -73
  56. package/tokens/tailwind-tokens.js +6 -3
  57. package/tokens/tokens.css +8 -322
  58. package/dist/datepicker-DXzS_8l8.d.ts +0 -130
  59. package/dist/datepicker-locales/ar-SA.cjs +0 -46
  60. package/dist/datepicker-locales/ar-SA.d.cts +0 -6
  61. package/dist/datepicker-locales/de-DE.cjs +0 -46
  62. package/dist/datepicker-locales/de-DE.d.cts +0 -6
  63. package/dist/datepicker-locales/en-US.cjs +0 -46
  64. package/dist/datepicker-locales/en-US.d.cts +0 -6
  65. package/dist/datepicker-locales/es-ES.cjs +0 -46
  66. package/dist/datepicker-locales/es-ES.d.cts +0 -6
  67. package/dist/datepicker-locales/fr-FR.cjs +0 -46
  68. package/dist/datepicker-locales/fr-FR.d.cts +0 -6
  69. package/dist/datepicker-locales/id-ID.cjs +0 -46
  70. package/dist/datepicker-locales/id-ID.d.cts +0 -6
  71. package/dist/datepicker-locales/ja-JP.cjs +0 -46
  72. package/dist/datepicker-locales/ja-JP.d.cts +0 -6
  73. package/dist/datepicker-locales/ko-KR.cjs +0 -46
  74. package/dist/datepicker-locales/ko-KR.d.cts +0 -6
  75. package/dist/datepicker-locales/pt-BR.cjs +0 -46
  76. package/dist/datepicker-locales/pt-BR.d.cts +0 -6
  77. package/dist/datepicker-locales/th-TH.cjs +0 -46
  78. package/dist/datepicker-locales/th-TH.d.cts +0 -6
  79. package/dist/datepicker-locales/vi-VN.cjs +0 -46
  80. package/dist/datepicker-locales/vi-VN.d.cts +0 -6
  81. package/dist/datepicker-locales/zh-CN.cjs +0 -46
  82. package/dist/datepicker-locales/zh-CN.d.cts +0 -6
  83. package/dist/datepicker-locales/zh-TW.cjs +0 -46
  84. package/dist/datepicker-locales/zh-TW.d.cts +0 -6
  85. package/dist/icons/common.cjs +0 -54
  86. package/dist/icons/common.d.cts +0 -20
  87. package/dist/icons/picker.cjs +0 -75
  88. package/dist/icons/picker.d.cts +0 -53
  89. package/dist/icons/registry.cjs +0 -172
  90. package/dist/icons/registry.d.cts +0 -102
  91. package/dist/icons/status.cjs +0 -47
  92. package/dist/icons/status.d.cts +0 -13
  93. package/dist/icons/table.cjs +0 -48
  94. package/dist/icons/table.d.cts +0 -25
  95. package/dist/index.cjs +0 -21268
  96. package/dist/index.d.cts +0 -20129
  97. package/dist/locale-DxwhmqfF.d.cts +0 -300
  98. package/dist/locales/ar-SA.cjs +0 -254
  99. package/dist/locales/ar-SA.d.cts +0 -10
  100. package/dist/locales/de-DE.cjs +0 -254
  101. package/dist/locales/de-DE.d.cts +0 -10
  102. package/dist/locales/en-US.cjs +0 -149
  103. package/dist/locales/en-US.d.cts +0 -10
  104. package/dist/locales/es-ES.cjs +0 -254
  105. package/dist/locales/es-ES.d.cts +0 -10
  106. package/dist/locales/fr-FR.cjs +0 -254
  107. package/dist/locales/fr-FR.d.cts +0 -10
  108. package/dist/locales/id-ID.cjs +0 -90
  109. package/dist/locales/id-ID.d.cts +0 -10
  110. package/dist/locales/ja-JP.cjs +0 -90
  111. package/dist/locales/ja-JP.d.cts +0 -10
  112. package/dist/locales/ko-KR.cjs +0 -90
  113. package/dist/locales/ko-KR.d.cts +0 -10
  114. package/dist/locales/pt-BR.cjs +0 -254
  115. package/dist/locales/pt-BR.d.cts +0 -10
  116. package/dist/locales/th-TH.cjs +0 -90
  117. package/dist/locales/th-TH.d.cts +0 -10
  118. package/dist/locales/vi-VN.cjs +0 -90
  119. package/dist/locales/vi-VN.d.cts +0 -10
  120. package/dist/locales/zh-CN.cjs +0 -149
  121. package/dist/locales/zh-CN.d.cts +0 -10
  122. package/dist/locales/zh-TW.cjs +0 -90
  123. package/dist/locales/zh-TW.d.cts +0 -10
  124. package/dist/table-export-BMBH75rj.d.cts +0 -882
  125. package/dist/tailwind/modern.cjs +0 -368
  126. package/dist/tailwind/modern.d.cts +0 -6
  127. package/dist/tailwind-entry-DUchHtjs.d.cts +0 -218
  128. package/dist/tailwind.cjs +0 -221
  129. package/dist/tailwind.d.cts +0 -3
  130. package/dist/types-CJYAW1ql.d-DDBFn6KB.d.cts +0 -126
  131. package/dist/types-CJYAW1ql.d-DDBFn6KB.d.ts +0 -126
  132. package/dist/utils/table-export.cjs +0 -119
  133. package/dist/utils/table-export.d.cts +0 -3
package/dist/tailwind.cjs DELETED
@@ -1,221 +0,0 @@
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);
29
-
30
- // src/tailwind-entry.ts
31
- var tailwind_entry_exports = {};
32
- __export(tailwind_entry_exports, {
33
- default: () => tigercatPlugin
34
- });
35
- module.exports = __toCommonJS(tailwind_entry_exports);
36
-
37
- // src/tailwind-plugin.ts
38
- var import_plugin = __toESM(require("tailwindcss/plugin"), 1);
39
-
40
- // src/themes/modern/tokens.ts
41
- var MODERN_BASE_TOKENS_LIGHT = {
42
- // Radius (matches existing rounded-md/lg/xl)
43
- "--tiger-radius-sm": "0.375rem",
44
- "--tiger-radius-md": "0.5rem",
45
- "--tiger-radius-lg": "0.75rem",
46
- "--tiger-radius-xl": "1rem",
47
- "--tiger-radius-pill": "9999px",
48
- // Shadows (Tailwind defaults)
49
- "--tiger-shadow-sm": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
50
- "--tiger-shadow-md": "0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1)",
51
- "--tiger-shadow-lg": "0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1)",
52
- "--tiger-shadow-xl": "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
53
- // Glass — inset highlights stay disabled by default (kept flat), but a
54
- // sensible backdrop blur is enabled out of the box so opt-in surfaces like
55
- // `Header variant="translucent"/"blur"` render glass without the consumer
56
- // having to set these tokens. Override to `0px` to fully disable blur.
57
- "--tiger-shadow-glass": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
58
- "--tiger-shadow-glass-strong": "0 4px 6px -1px rgb(0 0 0 / 0.1)",
59
- "--tiger-blur-glass": "16px",
60
- "--tiger-blur-glass-strong": "24px",
61
- // Header variant tuning — all overridable without `!important`. `saturate`
62
- // enriches the blurred backdrop; `--tiger-header-shadow` lets consumers
63
- // swap the `blur` variant's shadow; `--tiger-header-border` scopes the
64
- // header's border color (falls back to the global `--tiger-border`) so the
65
- // glass header border can be tuned without touching every other border.
66
- "--tiger-header-saturate": "1.8",
67
- "--tiger-header-shadow": "0 1px 2px 0 rgb(0 0 0 / 0.05)",
68
- "--tiger-header-border": "var(--tiger-border, #e5e7eb)",
69
- // Gradients — fall back to solid color via a no-op linear-gradient
70
- "--tiger-gradient-primary": "linear-gradient(180deg, var(--tiger-primary), var(--tiger-primary))",
71
- "--tiger-gradient-surface": "linear-gradient(180deg, var(--tiger-surface), var(--tiger-surface))",
72
- "--tiger-gradient-danger": "linear-gradient(180deg, var(--tiger-error), var(--tiger-error))",
73
- // Motion — current durations / easings
74
- "--tiger-motion-duration-instant": "80ms",
75
- "--tiger-motion-duration-quick": "150ms",
76
- "--tiger-motion-duration-base": "200ms",
77
- "--tiger-motion-duration-relaxed": "300ms",
78
- "--tiger-motion-duration-slow": "450ms",
79
- "--tiger-motion-ease-standard": "cubic-bezier(0.4, 0, 0.2, 1)",
80
- "--tiger-motion-ease-decelerate": "cubic-bezier(0, 0, 0.2, 1)",
81
- "--tiger-motion-ease-accelerate": "cubic-bezier(0.4, 0, 1, 1)",
82
- "--tiger-motion-ease-emphasized": "cubic-bezier(0.4, 0, 0.2, 1)",
83
- "--tiger-motion-ease-spring": "cubic-bezier(0.4, 0, 0.2, 1)",
84
- "--tiger-transition-base": "all 200ms cubic-bezier(0.4, 0, 0.2, 1)",
85
- "--tiger-transition-quick": "all 150ms cubic-bezier(0.4, 0, 0.2, 1)",
86
- "--tiger-transition-emphasized": "transform 300ms cubic-bezier(0.4, 0, 0.2, 1)"
87
- };
88
- var MODERN_BASE_TOKENS_DARK = {
89
- // Shadows tinted slightly to handle dark backgrounds
90
- "--tiger-shadow-sm": "0 1px 2px 0 rgb(0 0 0 / 0.2)",
91
- "--tiger-shadow-md": "0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.25)",
92
- "--tiger-shadow-lg": "0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.25)",
93
- "--tiger-shadow-xl": "0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.25)",
94
- "--tiger-shadow-glass": "0 1px 2px 0 rgb(0 0 0 / 0.2)",
95
- "--tiger-shadow-glass-strong": "0 4px 6px -1px rgb(0 0 0 / 0.3)",
96
- // Header `blur` variant shadow — slightly deeper for dark surfaces.
97
- "--tiger-header-shadow": "0 1px 2px 0 rgb(0 0 0 / 0.3)",
98
- // Header border tracks the dark-mode global border by default.
99
- "--tiger-header-border": "var(--tiger-border)"
100
- };
101
- var MODERN_REDUCED_MOTION_TOKENS = {
102
- "--tiger-motion-duration-instant": "0ms",
103
- "--tiger-motion-duration-quick": "0ms",
104
- "--tiger-motion-duration-base": "0ms",
105
- "--tiger-motion-duration-relaxed": "0ms",
106
- "--tiger-motion-duration-slow": "0ms",
107
- "--tiger-transition-base": "all 0ms linear",
108
- "--tiger-transition-quick": "all 0ms linear",
109
- "--tiger-transition-emphasized": "transform 0ms linear"
110
- };
111
-
112
- // src/tailwind-plugin.ts
113
- var tigercatTheme = {
114
- // Primary
115
- "--tiger-primary": "#2563eb",
116
- "--tiger-primary-hover": "#1d4ed8",
117
- "--tiger-primary-active": "#1e40af",
118
- "--tiger-primary-disabled": "#93c5fd",
119
- // Secondary
120
- "--tiger-secondary": "#4b5563",
121
- "--tiger-secondary-hover": "#374151",
122
- "--tiger-secondary-active": "#1f2937",
123
- "--tiger-secondary-disabled": "#9ca3af",
124
- // Background hover states
125
- "--tiger-outline-bg-hover": "#eff6ff",
126
- "--tiger-ghost-bg-hover": "#eff6ff",
127
- // Interaction
128
- "--tiger-focus-ring": "#2563eb",
129
- // Surface & background
130
- "--tiger-surface": "#ffffff",
131
- "--tiger-surface-muted": "#f9fafb",
132
- "--tiger-surface-raised": "#ffffff",
133
- // Text
134
- "--tiger-text": "#111827",
135
- "--tiger-text-secondary": "#6b7280",
136
- "--tiger-text-disabled": "#d1d5db",
137
- // Border
138
- "--tiger-border": "#e5e7eb",
139
- "--tiger-border-strong": "#9ca3af",
140
- // Status
141
- "--tiger-success": "#16a34a",
142
- "--tiger-warning": "#d97706",
143
- "--tiger-error": "#dc2626",
144
- "--tiger-info": "#3b82f6",
145
- // Chart palette
146
- "--tiger-chart-1": "#2563eb",
147
- "--tiger-chart-2": "#16a34a",
148
- "--tiger-chart-3": "#d97706",
149
- "--tiger-chart-4": "#a855f7",
150
- "--tiger-chart-5": "#0ea5e9",
151
- "--tiger-chart-6": "#ef4444"
152
- };
153
- var tigercatDarkTheme = {
154
- "--tiger-primary": "#60a5fa",
155
- "--tiger-primary-hover": "#93c5fd",
156
- "--tiger-primary-active": "#bfdbfe",
157
- "--tiger-primary-disabled": "#1e40af",
158
- "--tiger-secondary": "#9ca3af",
159
- "--tiger-secondary-hover": "#d1d5db",
160
- "--tiger-secondary-active": "#e5e7eb",
161
- "--tiger-secondary-disabled": "#4b5563",
162
- "--tiger-outline-bg-hover": "#1e3a5f",
163
- "--tiger-ghost-bg-hover": "#1e3a5f",
164
- "--tiger-focus-ring": "#60a5fa",
165
- "--tiger-surface": "#111827",
166
- "--tiger-surface-muted": "#1f2937",
167
- "--tiger-surface-raised": "#1f2937",
168
- "--tiger-text": "#f9fafb",
169
- "--tiger-text-secondary": "#d1d5db",
170
- "--tiger-text-disabled": "#4b5563",
171
- "--tiger-border": "#374151",
172
- "--tiger-border-strong": "#6b7280",
173
- "--tiger-success": "#4ade80",
174
- "--tiger-warning": "#fbbf24",
175
- "--tiger-error": "#f87171",
176
- "--tiger-info": "#60a5fa",
177
- "--tiger-chart-1": "#60a5fa",
178
- "--tiger-chart-2": "#4ade80",
179
- "--tiger-chart-3": "#fbbf24",
180
- "--tiger-chart-4": "#c084fc",
181
- "--tiger-chart-5": "#38bdf8",
182
- "--tiger-chart-6": "#f87171"
183
- };
184
- var tigercatDirectionBase = {
185
- '[dir="rtl"] .tiger-rtl-mirror, [data-tiger-dir="rtl"] .tiger-rtl-mirror': {
186
- transform: "scaleX(-1)"
187
- },
188
- '[dir="rtl"] .tiger-text-start, [data-tiger-dir="rtl"] .tiger-text-start': {
189
- textAlign: "right"
190
- },
191
- '[dir="rtl"] .tiger-text-end, [data-tiger-dir="rtl"] .tiger-text-end': {
192
- textAlign: "left"
193
- },
194
- '[dir="rtl"] .tiger-flex-row, [data-tiger-dir="rtl"] .tiger-flex-row': {
195
- flexDirection: "row-reverse"
196
- }
197
- };
198
- var tigercatReducedMotionBase = {
199
- "@media (prefers-reduced-motion: reduce)": {
200
- ':root, [data-tiger-style="modern"]': MODERN_REDUCED_MOTION_TOKENS,
201
- ".tiger-motion-aware, .tiger-motion-aware::before, .tiger-motion-aware::after, [data-tiger-motion]": {
202
- animationDuration: "0ms",
203
- animationDelay: "0ms",
204
- transitionDuration: "0ms",
205
- transitionDelay: "0ms",
206
- scrollBehavior: "auto"
207
- }
208
- }
209
- };
210
- var tigercatPlugin = (0, import_plugin.default)(function({ addBase }) {
211
- addBase({
212
- ":root": { ...tigercatTheme, ...MODERN_BASE_TOKENS_LIGHT },
213
- ".dark": { ...tigercatDarkTheme, ...MODERN_BASE_TOKENS_DARK },
214
- // Remove browser default focus outline on interactive SVG elements
215
- 'svg [tabindex], svg [role="button"]': {
216
- outline: "none"
217
- },
218
- ...tigercatDirectionBase,
219
- ...tigercatReducedMotionBase
220
- });
221
- });
@@ -1,3 +0,0 @@
1
- export { k as default } from './tailwind-entry-DUchHtjs.cjs';
2
- import './types-CJYAW1ql.d-DDBFn6KB.cjs';
3
- import './resolve-config-QUZ9b-Gn.mjs';
@@ -1,126 +0,0 @@
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 };
@@ -1,126 +0,0 @@
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 };
@@ -1,119 +0,0 @@
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);
19
-
20
- // src/utils/table-export.ts
21
- var table_export_exports = {};
22
- __export(table_export_exports, {
23
- downloadCsv: () => downloadCsv,
24
- downloadExcel: () => downloadExcel,
25
- downloadTableExport: () => downloadTableExport,
26
- exportTableData: () => exportTableData,
27
- exportTableToCsv: () => exportTableToCsv,
28
- exportTableToExcel: () => exportTableToExcel,
29
- tableExportButtonClasses: () => tableExportButtonClasses
30
- });
31
- module.exports = __toCommonJS(table_export_exports);
32
-
33
- // src/utils/env.ts
34
- function isBrowser() {
35
- return typeof window !== "undefined" && typeof document !== "undefined";
36
- }
37
-
38
- // src/utils/table-export-utils.ts
39
- function escapeCsvValue(value) {
40
- const str = value === null || value === void 0 ? "" : String(value);
41
- if (str.includes(",") || str.includes('"') || str.includes("\n")) {
42
- return `"${str.replace(/"/g, '""')}"`;
43
- }
44
- return str;
45
- }
46
- function exportTableToCsv(columns, data, _filename) {
47
- const headers = columns.map((col) => escapeCsvValue(col.title));
48
- const rows = data.map(
49
- (record) => columns.map((col) => {
50
- const key = col.dataKey || col.key;
51
- const value = record[key];
52
- return escapeCsvValue(value);
53
- }).join(",")
54
- );
55
- return [headers.join(","), ...rows].join("\n");
56
- }
57
- function escapeHtmlValue(value) {
58
- const str = value === null || value === void 0 ? "" : String(value);
59
- return str.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;");
60
- }
61
- function exportTableToExcel(columns, data) {
62
- const headerCells = columns.map((column) => `<th>${escapeHtmlValue(column.title)}</th>`).join("");
63
- const bodyRows = data.map((record) => {
64
- const cells = columns.map((column) => {
65
- const key = column.dataKey || column.key;
66
- const value = record[key];
67
- return `<td>${escapeHtmlValue(value)}</td>`;
68
- }).join("");
69
- return `<tr>${cells}</tr>`;
70
- }).join("");
71
- return `<!doctype html><html><head><meta charset="utf-8"></head><body><table><thead><tr>${headerCells}</tr></thead><tbody>${bodyRows}</tbody></table></body></html>`;
72
- }
73
- function downloadCsv(csvContent, filename = "export") {
74
- if (!isBrowser()) return;
75
- const blob = new Blob([csvContent], { type: "text/csv;charset=utf-8;" });
76
- const url = URL.createObjectURL(blob);
77
- const link = document.createElement("a");
78
- link.href = url;
79
- link.download = `${filename}.csv`;
80
- link.style.display = "none";
81
- document.body.appendChild(link);
82
- link.click();
83
- document.body.removeChild(link);
84
- URL.revokeObjectURL(url);
85
- }
86
- function downloadExcel(excelContent, filename = "export") {
87
- if (!isBrowser()) return;
88
- const blob = new Blob([excelContent], { type: "application/vnd.ms-excel;charset=utf-8;" });
89
- const url = URL.createObjectURL(blob);
90
- const link = document.createElement("a");
91
- link.href = url;
92
- link.download = `${filename}.xls`;
93
- link.style.display = "none";
94
- document.body.appendChild(link);
95
- link.click();
96
- document.body.removeChild(link);
97
- URL.revokeObjectURL(url);
98
- }
99
- function exportTableData(columns, data, format = "csv") {
100
- return format === "excel" ? exportTableToExcel(columns, data) : exportTableToCsv(columns, data);
101
- }
102
- function downloadTableExport(content, filename = "export", format = "csv") {
103
- if (format === "excel") {
104
- downloadExcel(content, filename);
105
- return;
106
- }
107
- downloadCsv(content, filename);
108
- }
109
- 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";
110
- // Annotate the CommonJS export names for ESM import in node:
111
- 0 && (module.exports = {
112
- downloadCsv,
113
- downloadExcel,
114
- downloadTableExport,
115
- exportTableData,
116
- exportTableToCsv,
117
- exportTableToExcel,
118
- tableExportButtonClasses
119
- });
@@ -1,3 +0,0 @@
1
- export { o as downloadCsv, p as downloadExcel, r as downloadTableExport, q as exportTableData, m as exportTableToCsv, n as exportTableToExcel, t as tableExportButtonClasses } from '../table-export-BMBH75rj.cjs';
2
- import '../locale-DxwhmqfF.cjs';
3
- import '../datepicker-DXzS_8l8.cjs';