@expcat/tigercat-react 0.1.8 → 0.2.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 (169) hide show
  1. package/dist/{chunk-TBIEWDY5.js → chunk-36RRHNZD.js} +13 -2
  2. package/dist/chunk-3CDAG4HD.mjs +151 -0
  3. package/dist/chunk-3QFHVAZT.js +68 -0
  4. package/dist/{chunk-ALP3KYYY.mjs → chunk-3XKBDV2Q.mjs} +5 -5
  5. package/dist/chunk-42UKIFFQ.js +278 -0
  6. package/dist/{chunk-K7ZMB2TH.mjs → chunk-5XKYWZZZ.mjs} +16 -22
  7. package/dist/chunk-677VSTPW.mjs +65 -0
  8. package/dist/chunk-6DYS4PJT.mjs +99 -0
  9. package/dist/chunk-6PBNFLM7.js +95 -0
  10. package/dist/{chunk-DCRVIDMY.mjs → chunk-6ZC7H22S.mjs} +1 -1
  11. package/dist/{chunk-WSCSDSV7.mjs → chunk-7IKJBQQV.mjs} +27 -5
  12. package/dist/{chunk-OTRGVENC.js → chunk-7SLNHUGJ.js} +1 -1
  13. package/dist/chunk-A2UW5OKX.mjs +415 -0
  14. package/dist/{chunk-NOOPXNR4.mjs → chunk-AGUPZEUL.mjs} +2 -3
  15. package/dist/chunk-AX5XRD2Q.js +35 -0
  16. package/dist/{chunk-BJU5N7WU.mjs → chunk-BAPR7UUR.mjs} +7 -7
  17. package/dist/chunk-CBALIFPW.mjs +275 -0
  18. package/dist/{chunk-BIWO5KB4.mjs → chunk-CJJ56NVL.mjs} +2 -2
  19. package/dist/{chunk-ENR3RIMM.js → chunk-DGBYGBLR.js} +72 -59
  20. package/dist/chunk-DUWAV47E.js +42 -0
  21. package/dist/chunk-E5GD3H7L.js +94 -0
  22. package/dist/chunk-EJLJYOO7.js +367 -0
  23. package/dist/{chunk-FQ6UHRAO.js → chunk-GQMYCYZ4.js} +6 -27
  24. package/dist/{chunk-G6FSHN2I.mjs → chunk-GW4EWT2K.mjs} +45 -31
  25. package/dist/{chunk-AQQRWISY.js → chunk-GXTBCX3M.js} +1 -1
  26. package/dist/{chunk-HQXZVTP4.mjs → chunk-HGF2EL25.mjs} +74 -61
  27. package/dist/{chunk-R5BQHZWB.js → chunk-HRYBEBZC.js} +15 -21
  28. package/dist/{chunk-PAD2DX5M.mjs → chunk-IIVRVCCP.mjs} +6 -24
  29. package/dist/chunk-IS467WAO.mjs +39 -0
  30. package/dist/{chunk-CTAMMQBC.mjs → chunk-IS7YOBR7.mjs} +16 -13
  31. package/dist/{chunk-ADOPAXPG.mjs → chunk-JI7SFMUT.mjs} +2 -2
  32. package/dist/chunk-KBGURVTD.mjs +282 -0
  33. package/dist/{chunk-O3EUFIOS.mjs → chunk-KELLYJZY.mjs} +36 -30
  34. package/dist/{chunk-XZDJ5FRB.js → chunk-KPZTGRNA.js} +5 -23
  35. package/dist/chunk-KQZ4F7FZ.js +153 -0
  36. package/dist/{chunk-XDKXL2BP.mjs → chunk-KV4LLPAY.mjs} +14 -3
  37. package/dist/{chunk-LNKI6HQ3.js → chunk-LIJLFLYE.js} +27 -5
  38. package/dist/chunk-LVC43YX2.mjs +72 -0
  39. package/dist/chunk-LZNG2HGC.mjs +227 -0
  40. package/dist/chunk-M375I56K.js +75 -0
  41. package/dist/{chunk-7OLWGHUR.mjs → chunk-MF3H7WWW.mjs} +13 -2
  42. package/dist/chunk-N32MAX4A.js +230 -0
  43. package/dist/{chunk-YYKJ63LD.mjs → chunk-NMDNLB3C.mjs} +7 -28
  44. package/dist/{chunk-77D7VQMG.js → chunk-OD2NNQD2.js} +2 -2
  45. package/dist/chunk-OONM7FO7.js +418 -0
  46. package/dist/{chunk-Q5Q7FG4U.js → chunk-OZLGNWET.js} +7 -7
  47. package/dist/{chunk-LAZGEMA2.mjs → chunk-P4EFJIXU.mjs} +1 -1
  48. package/dist/chunk-QI6WAP6Y.js +285 -0
  49. package/dist/{chunk-WK5HN4OH.js → chunk-QY6I7LU5.js} +43 -29
  50. package/dist/{chunk-KSW5JDIV.js → chunk-R7TOQU3U.js} +1 -1
  51. package/dist/chunk-RQSQXQN6.mjs +91 -0
  52. package/dist/chunk-SDLMB34Y.mjs +32 -0
  53. package/dist/chunk-UG3I4PCY.js +102 -0
  54. package/dist/chunk-VBSK4TGO.mjs +364 -0
  55. package/dist/{chunk-DZJUFU55.js → chunk-VXHBQTZS.js} +14 -11
  56. package/dist/chunk-WLIFEALE.mjs +111 -0
  57. package/dist/{chunk-AQ6DHCP6.js → chunk-XRFK2IXM.js} +4 -4
  58. package/dist/{chunk-5FRENLDC.js → chunk-Y2JOJ4D6.js} +14 -3
  59. package/dist/chunk-YER7IQF4.mjs +429 -0
  60. package/dist/{chunk-NI2WNZRT.js → chunk-YESS6YKC.js} +1 -2
  61. package/dist/chunk-Z6F67MJE.mjs +92 -0
  62. package/dist/{chunk-QORSSZX4.js → chunk-ZPFZMXA6.js} +34 -28
  63. package/dist/chunk-ZUUG3WOL.js +432 -0
  64. package/dist/chunk-ZYPEO2KY.js +115 -0
  65. package/dist/components/AreaChart.d.mts +19 -0
  66. package/dist/components/AreaChart.d.ts +19 -0
  67. package/dist/components/AreaChart.js +23 -0
  68. package/dist/components/AreaChart.mjs +8 -0
  69. package/dist/components/BarChart.d.mts +16 -0
  70. package/dist/components/BarChart.d.ts +16 -0
  71. package/dist/components/BarChart.js +23 -0
  72. package/dist/components/BarChart.mjs +8 -0
  73. package/dist/components/ChartAxis.d.mts +10 -0
  74. package/dist/components/ChartAxis.d.ts +10 -0
  75. package/dist/components/ChartAxis.js +16 -0
  76. package/dist/components/ChartAxis.mjs +1 -0
  77. package/dist/components/ChartCanvas.d.mts +9 -0
  78. package/dist/components/ChartCanvas.d.ts +9 -0
  79. package/dist/components/ChartCanvas.js +16 -0
  80. package/dist/components/ChartCanvas.mjs +1 -0
  81. package/dist/components/ChartGrid.d.mts +11 -0
  82. package/dist/components/ChartGrid.d.ts +11 -0
  83. package/dist/components/ChartGrid.js +16 -0
  84. package/dist/components/ChartGrid.mjs +1 -0
  85. package/dist/components/ChartLegend.d.mts +17 -0
  86. package/dist/components/ChartLegend.d.ts +17 -0
  87. package/dist/components/ChartLegend.js +16 -0
  88. package/dist/components/ChartLegend.mjs +1 -0
  89. package/dist/components/ChartSeries.d.mts +18 -0
  90. package/dist/components/ChartSeries.d.ts +18 -0
  91. package/dist/components/ChartSeries.js +16 -0
  92. package/dist/components/ChartSeries.mjs +1 -0
  93. package/dist/components/ChartTooltip.d.mts +12 -0
  94. package/dist/components/ChartTooltip.d.ts +12 -0
  95. package/dist/components/ChartTooltip.js +16 -0
  96. package/dist/components/ChartTooltip.mjs +1 -0
  97. package/dist/components/DonutChart.d.mts +14 -0
  98. package/dist/components/DonutChart.d.ts +14 -0
  99. package/dist/components/DonutChart.js +21 -0
  100. package/dist/components/DonutChart.mjs +6 -0
  101. package/dist/components/Drawer.js +3 -3
  102. package/dist/components/Drawer.mjs +2 -2
  103. package/dist/components/Dropdown.d.mts +12 -2
  104. package/dist/components/Dropdown.d.ts +12 -2
  105. package/dist/components/Dropdown.js +4 -4
  106. package/dist/components/Dropdown.mjs +2 -2
  107. package/dist/components/DropdownItem.js +4 -4
  108. package/dist/components/DropdownItem.mjs +3 -3
  109. package/dist/components/Icon.js +2 -2
  110. package/dist/components/Icon.mjs +1 -1
  111. package/dist/components/LineChart.d.mts +19 -0
  112. package/dist/components/LineChart.d.ts +19 -0
  113. package/dist/components/LineChart.js +23 -0
  114. package/dist/components/LineChart.mjs +8 -0
  115. package/dist/components/List.js +3 -3
  116. package/dist/components/List.mjs +2 -2
  117. package/dist/components/Message.js +4 -4
  118. package/dist/components/Message.mjs +1 -1
  119. package/dist/components/Modal.js +3 -3
  120. package/dist/components/Modal.mjs +2 -2
  121. package/dist/components/Notification.js +4 -4
  122. package/dist/components/Notification.mjs +1 -1
  123. package/dist/components/Pagination.d.mts +5 -1
  124. package/dist/components/Pagination.d.ts +5 -1
  125. package/dist/components/Pagination.js +3 -3
  126. package/dist/components/Pagination.mjs +1 -1
  127. package/dist/components/PieChart.d.mts +14 -0
  128. package/dist/components/PieChart.d.ts +14 -0
  129. package/dist/components/PieChart.js +20 -0
  130. package/dist/components/PieChart.mjs +5 -0
  131. package/dist/components/Popconfirm.d.mts +12 -2
  132. package/dist/components/Popconfirm.d.ts +12 -2
  133. package/dist/components/Popconfirm.js +3 -2
  134. package/dist/components/Popconfirm.mjs +2 -1
  135. package/dist/components/Popover.d.mts +12 -2
  136. package/dist/components/Popover.d.ts +12 -2
  137. package/dist/components/Popover.js +3 -2
  138. package/dist/components/Popover.mjs +2 -1
  139. package/dist/components/RadarChart.d.mts +20 -0
  140. package/dist/components/RadarChart.d.ts +20 -0
  141. package/dist/components/RadarChart.js +20 -0
  142. package/dist/components/RadarChart.mjs +5 -0
  143. package/dist/components/ScatterChart.d.mts +32 -0
  144. package/dist/components/ScatterChart.d.ts +32 -0
  145. package/dist/components/ScatterChart.js +23 -0
  146. package/dist/components/ScatterChart.mjs +8 -0
  147. package/dist/components/Select.js +2 -2
  148. package/dist/components/Select.mjs +1 -1
  149. package/dist/components/Slider.js +2 -2
  150. package/dist/components/Slider.mjs +1 -1
  151. package/dist/components/Space.js +2 -2
  152. package/dist/components/Space.mjs +1 -1
  153. package/dist/components/Steps.js +3 -3
  154. package/dist/components/Steps.mjs +1 -1
  155. package/dist/components/StepsItem.js +2 -2
  156. package/dist/components/StepsItem.mjs +1 -1
  157. package/dist/components/Table.js +2 -2
  158. package/dist/components/Table.mjs +1 -1
  159. package/dist/components/Tooltip.d.mts +12 -2
  160. package/dist/components/Tooltip.d.ts +12 -2
  161. package/dist/components/Tooltip.js +3 -2
  162. package/dist/components/Tooltip.mjs +2 -1
  163. package/dist/index.d.mts +97 -1
  164. package/dist/index.d.ts +97 -1
  165. package/dist/index.js +178 -108
  166. package/dist/index.mjs +41 -27
  167. package/package.json +2 -2
  168. package/dist/chunk-NEULKOYJ.js +0 -48
  169. package/dist/chunk-ZO4XVOHU.mjs +0 -45
@@ -0,0 +1,418 @@
1
+ 'use strict';
2
+
3
+ var chunkKQZ4F7FZ_js = require('./chunk-KQZ4F7FZ.js');
4
+ var chunkE5GD3H7L_js = require('./chunk-E5GD3H7L.js');
5
+ var chunkDUWAV47E_js = require('./chunk-DUWAV47E.js');
6
+ var chunk3QFHVAZT_js = require('./chunk-3QFHVAZT.js');
7
+ var chunk6PBNFLM7_js = require('./chunk-6PBNFLM7.js');
8
+ var chunkAX5XRD2Q_js = require('./chunk-AX5XRD2Q.js');
9
+ var chunkM375I56K_js = require('./chunk-M375I56K.js');
10
+ var react = require('react');
11
+ var tigercatCore = require('@expcat/tigercat-core');
12
+ var jsxRuntime = require('react/jsx-runtime');
13
+
14
+ var AreaChart = ({
15
+ width = 320,
16
+ height = 200,
17
+ padding = 24,
18
+ data,
19
+ series,
20
+ xScale: xScaleProp,
21
+ yScale: yScaleProp,
22
+ areaColor: _areaColor = "var(--tiger-primary,#2563eb)",
23
+ strokeWidth = 2,
24
+ fillOpacity = 0.2,
25
+ curve = "linear",
26
+ showPoints = false,
27
+ pointSize = 4,
28
+ pointColor: _pointColor,
29
+ stacked = false,
30
+ showGrid = true,
31
+ showAxis = true,
32
+ showXAxis = true,
33
+ showYAxis = true,
34
+ includeZero = true,
35
+ xAxisLabel,
36
+ yAxisLabel,
37
+ xTicks = 5,
38
+ yTicks = 5,
39
+ xTickValues,
40
+ yTickValues,
41
+ xTickFormat,
42
+ yTickFormat,
43
+ gridLineStyle = "solid",
44
+ gridStrokeWidth = 1,
45
+ colors,
46
+ hoverable = false,
47
+ hoveredIndex: hoveredIndexProp,
48
+ activeOpacity = 1,
49
+ inactiveOpacity = 0.25,
50
+ selectable = false,
51
+ selectedIndex: selectedIndexProp,
52
+ showLegend = false,
53
+ legendPosition = "bottom",
54
+ legendMarkerSize = 10,
55
+ legendGap = 8,
56
+ showTooltip = true,
57
+ tooltipFormatter,
58
+ legendFormatter,
59
+ title,
60
+ desc,
61
+ className,
62
+ onHoveredIndexChange,
63
+ onSelectedIndexChange,
64
+ onSeriesClick,
65
+ onSeriesHover,
66
+ onPointClick,
67
+ onPointHover
68
+ }) => {
69
+ const [hoveredPointInfo, setHoveredPointInfo] = react.useState(null);
70
+ const [tooltipPosition, setTooltipPosition] = react.useState({ x: 0, y: 0 });
71
+ const innerRect = react.useMemo(
72
+ () => tigercatCore.getChartInnerRect(width, height, padding),
73
+ [width, height, padding]
74
+ );
75
+ const resolvedSeries = react.useMemo(() => {
76
+ if (series && series.length > 0) return series;
77
+ if (data && data.length > 0) return [{ data }];
78
+ return [];
79
+ }, [series, data]);
80
+ const {
81
+ activeIndex,
82
+ handleMouseEnter: handleSeriesHoverEnter,
83
+ handleMouseLeave: handleSeriesHoverLeave,
84
+ handleClick: handleSeriesSelect,
85
+ handleLegendClick,
86
+ handleLegendHover,
87
+ handleLegendLeave,
88
+ wrapperClasses
89
+ } = chunkKQZ4F7FZ_js.useChartInteraction({
90
+ hoverable,
91
+ hoveredIndexProp,
92
+ selectable,
93
+ selectedIndexProp,
94
+ activeOpacity,
95
+ inactiveOpacity,
96
+ legendPosition,
97
+ getData: (index) => resolvedSeries[index],
98
+ onHoveredIndexChange: (index) => {
99
+ onHoveredIndexChange?.(index);
100
+ onSeriesHover?.(index, index !== null ? resolvedSeries[index] : null);
101
+ },
102
+ onSelectedIndexChange: (index) => {
103
+ onSelectedIndexChange?.(index);
104
+ if (index !== null) {
105
+ onSeriesClick?.(index, resolvedSeries[index]);
106
+ }
107
+ }
108
+ });
109
+ const allData = react.useMemo(() => resolvedSeries.flatMap((s) => s.data), [resolvedSeries]);
110
+ const xValues = react.useMemo(() => allData.map((d) => d.x), [allData]);
111
+ const yValues = react.useMemo(() => {
112
+ if (stacked) {
113
+ const stackedData = tigercatCore.stackSeriesData(resolvedSeries.map((s) => s.data));
114
+ return stackedData.flatMap((s) => s.map((d) => d.y1));
115
+ }
116
+ return allData.map((d) => d.y);
117
+ }, [stacked, resolvedSeries, allData]);
118
+ const isXNumeric = react.useMemo(() => xValues.every((v) => typeof v === "number"), [xValues]);
119
+ const resolvedXScale = react.useMemo(() => {
120
+ if (xScaleProp) return xScaleProp;
121
+ if (isXNumeric) {
122
+ const extent = tigercatCore.getNumberExtent(xValues, { includeZero: false });
123
+ return tigercatCore.createLinearScale(extent, [0, innerRect.width]);
124
+ } else {
125
+ const categories = [...new Set(xValues.map(String))];
126
+ return tigercatCore.createPointScale(categories, [0, innerRect.width], { padding: 0.1 });
127
+ }
128
+ }, [xScaleProp, isXNumeric, xValues, innerRect.width]);
129
+ const resolvedYScale = react.useMemo(() => {
130
+ if (yScaleProp) return yScaleProp;
131
+ const extent = tigercatCore.getNumberExtent(yValues, { includeZero });
132
+ return tigercatCore.createLinearScale(extent, [innerRect.height, 0]);
133
+ }, [yScaleProp, yValues, includeZero, innerRect.height]);
134
+ const baseline = react.useMemo(() => resolvedYScale.map(0), [resolvedYScale]);
135
+ const resolvedShowXAxis = showAxis && showXAxis;
136
+ const resolvedShowYAxis = showAxis && showYAxis;
137
+ const palette = react.useMemo(
138
+ () => colors && colors.length > 0 ? colors : [...tigercatCore.DEFAULT_CHART_COLORS],
139
+ [colors]
140
+ );
141
+ const seriesData = react.useMemo(() => {
142
+ const stackedData = stacked ? tigercatCore.stackSeriesData(resolvedSeries.map((s) => s.data)) : null;
143
+ return resolvedSeries.map((s, seriesIndex) => {
144
+ const color = s.color ?? palette[seriesIndex % palette.length];
145
+ const seriesFillColor = s.fillColor ?? color;
146
+ const seriesFillOpacity = s.fillOpacity ?? fillOpacity;
147
+ let points;
148
+ let areaPath;
149
+ let linePath;
150
+ if (stacked && stackedData) {
151
+ const stackedSeries = stackedData[seriesIndex];
152
+ points = stackedSeries.map((sd, pointIndex) => ({
153
+ x: resolvedXScale.map(sd.original.x),
154
+ y: resolvedYScale.map(sd.y1),
155
+ datum: sd.original,
156
+ pointIndex
157
+ }));
158
+ const topPoints = points.map((p) => ({ x: p.x, y: p.y }));
159
+ const bottomPoints = stackedSeries.map((sd) => ({
160
+ x: resolvedXScale.map(sd.original.x),
161
+ y: resolvedYScale.map(sd.y0)
162
+ })).reverse();
163
+ const topPath = tigercatCore.createLinePath(topPoints, curve);
164
+ const bottomPath = tigercatCore.createLinePath(bottomPoints, curve).replace("M", "L");
165
+ areaPath = `${topPath} ${bottomPath} Z`;
166
+ linePath = topPath;
167
+ } else {
168
+ points = s.data.map((datum, pointIndex) => ({
169
+ x: resolvedXScale.map(datum.x),
170
+ y: resolvedYScale.map(datum.y),
171
+ datum,
172
+ pointIndex
173
+ }));
174
+ areaPath = tigercatCore.createAreaPath(points, baseline, curve);
175
+ linePath = tigercatCore.createLinePath(points, curve);
176
+ }
177
+ const opacity = tigercatCore.getChartElementOpacity(seriesIndex, activeIndex, {
178
+ activeOpacity,
179
+ inactiveOpacity
180
+ });
181
+ return {
182
+ series: s,
183
+ seriesIndex,
184
+ color,
185
+ fillColor: seriesFillColor,
186
+ fillOpacity: seriesFillOpacity,
187
+ areaPath,
188
+ linePath,
189
+ points,
190
+ opacity,
191
+ strokeWidth: s.strokeWidth ?? strokeWidth,
192
+ strokeDasharray: s.strokeDasharray,
193
+ showPoints: s.showPoints ?? showPoints,
194
+ pointSize: s.pointSize ?? pointSize,
195
+ pointColor: s.pointColor ?? color
196
+ };
197
+ });
198
+ }, [
199
+ resolvedSeries,
200
+ palette,
201
+ resolvedXScale,
202
+ resolvedYScale,
203
+ curve,
204
+ stacked,
205
+ baseline,
206
+ activeIndex,
207
+ activeOpacity,
208
+ inactiveOpacity,
209
+ fillOpacity,
210
+ strokeWidth,
211
+ showPoints,
212
+ pointSize
213
+ ]);
214
+ const legendItems = react.useMemo(
215
+ () => resolvedSeries.map((s, index) => ({
216
+ index,
217
+ label: legendFormatter ? legendFormatter(s, index) : s.name ?? `Series ${index + 1}`,
218
+ color: s.color ?? palette[index % palette.length],
219
+ active: activeIndex === null || activeIndex === index
220
+ })),
221
+ [resolvedSeries, legendFormatter, palette, activeIndex]
222
+ );
223
+ const formatTooltip = react.useCallback(
224
+ (datum, seriesIndex, _pointIndex, s) => {
225
+ if (tooltipFormatter) return tooltipFormatter(datum, seriesIndex, _pointIndex, s);
226
+ const seriesName = s?.name ?? `Series ${seriesIndex + 1}`;
227
+ const label = datum.label ?? String(datum.x);
228
+ return `${seriesName} \xB7 ${label}: ${datum.y}`;
229
+ },
230
+ [tooltipFormatter]
231
+ );
232
+ const tooltipContent = react.useMemo(() => {
233
+ if (!hoveredPointInfo) return "";
234
+ const { seriesIndex, pointIndex } = hoveredPointInfo;
235
+ const s = resolvedSeries[seriesIndex];
236
+ const datum = s?.data[pointIndex];
237
+ return datum ? formatTooltip(datum, seriesIndex, pointIndex, s) : "";
238
+ }, [hoveredPointInfo, resolvedSeries, formatTooltip]);
239
+ const handlePointMouseEnter = react.useCallback(
240
+ (seriesIndex, pointIndex, event) => {
241
+ setHoveredPointInfo({ seriesIndex, pointIndex });
242
+ setTooltipPosition({ x: event.clientX, y: event.clientY });
243
+ onPointHover?.(seriesIndex, pointIndex, resolvedSeries[seriesIndex]?.data[pointIndex]);
244
+ },
245
+ [onPointHover, resolvedSeries]
246
+ );
247
+ const handlePointMouseMove = react.useCallback((event) => {
248
+ setTooltipPosition({ x: event.clientX, y: event.clientY });
249
+ }, []);
250
+ const handlePointMouseLeave = react.useCallback(() => {
251
+ setHoveredPointInfo(null);
252
+ onPointHover?.(null, null, null);
253
+ }, [onPointHover]);
254
+ const handlePointClick = react.useCallback(
255
+ (seriesIndex, pointIndex) => {
256
+ onPointClick?.(seriesIndex, pointIndex, resolvedSeries[seriesIndex]?.data[pointIndex]);
257
+ handleSeriesSelect(seriesIndex);
258
+ },
259
+ [onPointClick, resolvedSeries, handleSeriesSelect]
260
+ );
261
+ const handleKeyDown = react.useCallback(
262
+ (event, seriesIndex) => {
263
+ if (!selectable) return;
264
+ if (event.key !== "Enter" && event.key !== " ") return;
265
+ event.preventDefault();
266
+ handleSeriesSelect(seriesIndex);
267
+ },
268
+ [selectable, handleSeriesSelect]
269
+ );
270
+ const reversedSeriesData = react.useMemo(() => [...seriesData].reverse(), [seriesData]);
271
+ const chart = /* @__PURE__ */ jsxRuntime.jsxs(
272
+ chunkDUWAV47E_js.ChartCanvas,
273
+ {
274
+ width,
275
+ height,
276
+ padding,
277
+ title,
278
+ desc,
279
+ className: tigercatCore.classNames(className),
280
+ children: [
281
+ showGrid && /* @__PURE__ */ jsxRuntime.jsx(
282
+ chunk3QFHVAZT_js.ChartGrid,
283
+ {
284
+ xScale: resolvedXScale,
285
+ yScale: resolvedYScale,
286
+ show: "both",
287
+ xTicks,
288
+ yTicks,
289
+ xTickValues,
290
+ yTickValues,
291
+ lineStyle: gridLineStyle,
292
+ strokeWidth: gridStrokeWidth
293
+ }
294
+ ),
295
+ resolvedShowXAxis && /* @__PURE__ */ jsxRuntime.jsx(
296
+ chunkE5GD3H7L_js.ChartAxis,
297
+ {
298
+ scale: resolvedXScale,
299
+ orientation: "bottom",
300
+ y: innerRect.height,
301
+ ticks: xTicks,
302
+ tickValues: xTickValues,
303
+ tickFormat: xTickFormat,
304
+ label: xAxisLabel
305
+ }
306
+ ),
307
+ resolvedShowYAxis && /* @__PURE__ */ jsxRuntime.jsx(
308
+ chunkE5GD3H7L_js.ChartAxis,
309
+ {
310
+ scale: resolvedYScale,
311
+ orientation: "left",
312
+ ticks: yTicks,
313
+ tickValues: yTickValues,
314
+ tickFormat: yTickFormat,
315
+ label: yAxisLabel
316
+ }
317
+ ),
318
+ reversedSeriesData.map((sd) => /* @__PURE__ */ jsxRuntime.jsxs(
319
+ chunkAX5XRD2Q_js.ChartSeries,
320
+ {
321
+ data: sd.series.data,
322
+ name: sd.series.name,
323
+ type: "area",
324
+ opacity: sd.opacity,
325
+ className: tigercatCore.classNames(sd.series.className, (hoverable || selectable) && "cursor-pointer"),
326
+ onMouseEnter: (e) => handleSeriesHoverEnter(sd.seriesIndex, e),
327
+ onMouseLeave: handleSeriesHoverLeave,
328
+ onClick: () => handleSeriesSelect(sd.seriesIndex),
329
+ tabIndex: selectable ? 0 : void 0,
330
+ onKeyDown: (e) => handleKeyDown(e, sd.seriesIndex),
331
+ children: [
332
+ /* @__PURE__ */ jsxRuntime.jsx(
333
+ "path",
334
+ {
335
+ d: sd.areaPath,
336
+ fill: sd.fillColor,
337
+ fillOpacity: sd.fillOpacity,
338
+ stroke: "none",
339
+ className: "transition-opacity duration-150",
340
+ "data-area-series": sd.seriesIndex
341
+ }
342
+ ),
343
+ /* @__PURE__ */ jsxRuntime.jsx(
344
+ "path",
345
+ {
346
+ d: sd.linePath,
347
+ fill: "none",
348
+ stroke: sd.color,
349
+ strokeWidth: sd.strokeWidth,
350
+ strokeDasharray: sd.strokeDasharray,
351
+ strokeLinecap: "round",
352
+ strokeLinejoin: "round",
353
+ className: "transition-opacity duration-150"
354
+ }
355
+ ),
356
+ sd.showPoints && sd.points.map((point) => /* @__PURE__ */ jsxRuntime.jsx(
357
+ "circle",
358
+ {
359
+ cx: point.x,
360
+ cy: point.y,
361
+ r: sd.pointSize,
362
+ fill: sd.pointColor,
363
+ className: "transition-all duration-150",
364
+ "data-point-index": point.pointIndex,
365
+ onMouseEnter: (e) => handlePointMouseEnter(sd.seriesIndex, point.pointIndex, e),
366
+ onMouseMove: handlePointMouseMove,
367
+ onMouseLeave: handlePointMouseLeave,
368
+ onClick: (e) => {
369
+ e.stopPropagation();
370
+ handlePointClick(sd.seriesIndex, point.pointIndex);
371
+ }
372
+ },
373
+ `point-${sd.seriesIndex}-${point.pointIndex}`
374
+ ))
375
+ ]
376
+ },
377
+ `series-${sd.seriesIndex}`
378
+ ))
379
+ ]
380
+ }
381
+ );
382
+ const tooltip = showTooltip && /* @__PURE__ */ jsxRuntime.jsx(
383
+ chunkM375I56K_js.ChartTooltip,
384
+ {
385
+ content: tooltipContent,
386
+ visible: hoveredPointInfo !== null && tooltipContent !== "",
387
+ x: tooltipPosition.x,
388
+ y: tooltipPosition.y
389
+ }
390
+ );
391
+ if (!showLegend) {
392
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-block relative", children: [
393
+ chart,
394
+ tooltip
395
+ ] });
396
+ }
397
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: wrapperClasses, children: [
398
+ chart,
399
+ /* @__PURE__ */ jsxRuntime.jsx(
400
+ chunk6PBNFLM7_js.ChartLegend,
401
+ {
402
+ items: legendItems,
403
+ position: legendPosition,
404
+ markerSize: legendMarkerSize,
405
+ gap: legendGap,
406
+ interactive: hoverable || selectable,
407
+ onItemClick: handleLegendClick,
408
+ onItemHover: handleLegendHover,
409
+ onItemLeave: handleLegendLeave
410
+ }
411
+ ),
412
+ tooltip
413
+ ] });
414
+ };
415
+ var AreaChart_default = AreaChart;
416
+
417
+ exports.AreaChart = AreaChart;
418
+ exports.AreaChart_default = AreaChart_default;
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkFQ6UHRAO_js = require('./chunk-FQ6UHRAO.js');
3
+ var chunkGQMYCYZ4_js = require('./chunk-GQMYCYZ4.js');
4
4
  var chunkA3DJSVTE_js = require('./chunk-A3DJSVTE.js');
5
5
  var react = require('react');
6
6
  var tigercatCore = require('@expcat/tigercat-core');
@@ -196,11 +196,11 @@ var List = ({
196
196
  const { totalPages, startIndex, endIndex, hasNext, hasPrev } = paginationInfo;
197
197
  const total = dataSource.length;
198
198
  const paginationConfig = pagination;
199
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tigercatCore.listPaginationContainerClasses, children: [
200
- paginationConfig.showTotal !== false && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm text-[var(--tiger-text,#111827)]", children: paginationConfig.totalText ? paginationConfig.totalText(total, [startIndex, endIndex]) : `Showing ${startIndex} to ${endIndex} of ${total} items` }),
201
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
199
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tigercatCore.getSimplePaginationContainerClasses(), children: [
200
+ paginationConfig.showTotal !== false && /* @__PURE__ */ jsxRuntime.jsx("div", { className: tigercatCore.getSimplePaginationTotalClasses(), children: paginationConfig.totalText ? paginationConfig.totalText(total, [startIndex, endIndex]) : `Showing ${startIndex} to ${endIndex} of ${total} items` }),
201
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tigercatCore.getSimplePaginationControlsClasses(), children: [
202
202
  paginationConfig.showSizeChanger !== false && /* @__PURE__ */ jsxRuntime.jsx(
203
- chunkFQ6UHRAO_js.Select,
203
+ chunkGQMYCYZ4_js.Select,
204
204
  {
205
205
  size: "sm",
206
206
  value: currentPageSize,
@@ -216,7 +216,7 @@ var List = ({
216
216
  }))
217
217
  }
218
218
  ),
219
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex gap-1", children: [
219
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: tigercatCore.getSimplePaginationButtonsWrapperClasses(), children: [
220
220
  /* @__PURE__ */ jsxRuntime.jsx(
221
221
  chunkA3DJSVTE_js.Button,
222
222
  {
@@ -231,7 +231,7 @@ var List = ({
231
231
  children: "Previous"
232
232
  }
233
233
  ),
234
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "px-3 py-1 text-sm text-[var(--tiger-text,#111827)]", children: [
234
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: tigercatCore.getSimplePaginationPageIndicatorClasses(), children: [
235
235
  "Page ",
236
236
  currentPage,
237
237
  " of ",
@@ -87,7 +87,7 @@ var StepsItem = ({
87
87
  const contentClasses = getStepContentClasses(stepsContext.direction, stepsContext.simple);
88
88
  const titleClasses = getStepTitleClasses(stepStatus, stepsContext.size, isClickable);
89
89
  const descriptionClasses = getStepDescriptionClasses(stepStatus, stepsContext.size);
90
- const handleClick = (event) => {
90
+ const handleClick = (_event) => {
91
91
  if (!isClickable) {
92
92
  return;
93
93
  }