@expcat/tigercat-react 0.1.6 → 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 (171) 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-W7HUFFPJ.mjs → chunk-CJJ56NVL.mjs} +19 -19
  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-EUHWE7MN.js → chunk-R7TOQU3U.js} +18 -18
  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.d.mts +2 -2
  118. package/dist/components/Message.d.ts +2 -2
  119. package/dist/components/Message.js +7 -7
  120. package/dist/components/Message.mjs +1 -1
  121. package/dist/components/Modal.js +3 -3
  122. package/dist/components/Modal.mjs +2 -2
  123. package/dist/components/Notification.js +4 -4
  124. package/dist/components/Notification.mjs +1 -1
  125. package/dist/components/Pagination.d.mts +5 -1
  126. package/dist/components/Pagination.d.ts +5 -1
  127. package/dist/components/Pagination.js +3 -3
  128. package/dist/components/Pagination.mjs +1 -1
  129. package/dist/components/PieChart.d.mts +14 -0
  130. package/dist/components/PieChart.d.ts +14 -0
  131. package/dist/components/PieChart.js +20 -0
  132. package/dist/components/PieChart.mjs +5 -0
  133. package/dist/components/Popconfirm.d.mts +12 -2
  134. package/dist/components/Popconfirm.d.ts +12 -2
  135. package/dist/components/Popconfirm.js +3 -2
  136. package/dist/components/Popconfirm.mjs +2 -1
  137. package/dist/components/Popover.d.mts +12 -2
  138. package/dist/components/Popover.d.ts +12 -2
  139. package/dist/components/Popover.js +3 -2
  140. package/dist/components/Popover.mjs +2 -1
  141. package/dist/components/RadarChart.d.mts +20 -0
  142. package/dist/components/RadarChart.d.ts +20 -0
  143. package/dist/components/RadarChart.js +20 -0
  144. package/dist/components/RadarChart.mjs +5 -0
  145. package/dist/components/ScatterChart.d.mts +32 -0
  146. package/dist/components/ScatterChart.d.ts +32 -0
  147. package/dist/components/ScatterChart.js +23 -0
  148. package/dist/components/ScatterChart.mjs +8 -0
  149. package/dist/components/Select.js +2 -2
  150. package/dist/components/Select.mjs +1 -1
  151. package/dist/components/Slider.js +2 -2
  152. package/dist/components/Slider.mjs +1 -1
  153. package/dist/components/Space.js +2 -2
  154. package/dist/components/Space.mjs +1 -1
  155. package/dist/components/Steps.js +3 -3
  156. package/dist/components/Steps.mjs +1 -1
  157. package/dist/components/StepsItem.js +2 -2
  158. package/dist/components/StepsItem.mjs +1 -1
  159. package/dist/components/Table.js +2 -2
  160. package/dist/components/Table.mjs +1 -1
  161. package/dist/components/Tooltip.d.mts +12 -2
  162. package/dist/components/Tooltip.d.ts +12 -2
  163. package/dist/components/Tooltip.js +3 -2
  164. package/dist/components/Tooltip.mjs +2 -1
  165. package/dist/index.d.mts +98 -2
  166. package/dist/index.d.ts +98 -2
  167. package/dist/index.js +180 -110
  168. package/dist/index.mjs +41 -27
  169. package/package.json +2 -2
  170. package/dist/chunk-NEULKOYJ.js +0 -48
  171. package/dist/chunk-ZO4XVOHU.mjs +0 -45
@@ -0,0 +1,8 @@
1
+ export { ScatterChart, ScatterChart_default as default } from '../chunk-CBALIFPW.mjs';
2
+ import '../chunk-3CDAG4HD.mjs';
3
+ import '../chunk-RQSQXQN6.mjs';
4
+ import '../chunk-IS467WAO.mjs';
5
+ import '../chunk-677VSTPW.mjs';
6
+ import '../chunk-Z6F67MJE.mjs';
7
+ import '../chunk-SDLMB34Y.mjs';
8
+ import '../chunk-LVC43YX2.mjs';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkFQ6UHRAO_js = require('../chunk-FQ6UHRAO.js');
3
+ var chunkGQMYCYZ4_js = require('../chunk-GQMYCYZ4.js');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Select", {
8
8
  enumerable: true,
9
- get: function () { return chunkFQ6UHRAO_js.Select; }
9
+ get: function () { return chunkGQMYCYZ4_js.Select; }
10
10
  });
@@ -1 +1 @@
1
- export { Select } from '../chunk-YYKJ63LD.mjs';
1
+ export { Select } from '../chunk-NMDNLB3C.mjs';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkXZDJ5FRB_js = require('../chunk-XZDJ5FRB.js');
3
+ var chunkKPZTGRNA_js = require('../chunk-KPZTGRNA.js');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Slider", {
8
8
  enumerable: true,
9
- get: function () { return chunkXZDJ5FRB_js.Slider; }
9
+ get: function () { return chunkKPZTGRNA_js.Slider; }
10
10
  });
@@ -1 +1 @@
1
- export { Slider } from '../chunk-PAD2DX5M.mjs';
1
+ export { Slider } from '../chunk-IIVRVCCP.mjs';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkNI2WNZRT_js = require('../chunk-NI2WNZRT.js');
3
+ var chunkYESS6YKC_js = require('../chunk-YESS6YKC.js');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Space", {
8
8
  enumerable: true,
9
- get: function () { return chunkNI2WNZRT_js.Space; }
9
+ get: function () { return chunkYESS6YKC_js.Space; }
10
10
  });
@@ -1 +1 @@
1
- export { Space } from '../chunk-NOOPXNR4.mjs';
1
+ export { Space } from '../chunk-AGUPZEUL.mjs';
@@ -1,14 +1,14 @@
1
1
  'use strict';
2
2
 
3
- var chunkAQQRWISY_js = require('../chunk-AQQRWISY.js');
3
+ var chunkGXTBCX3M_js = require('../chunk-GXTBCX3M.js');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Steps", {
8
8
  enumerable: true,
9
- get: function () { return chunkAQQRWISY_js.Steps; }
9
+ get: function () { return chunkGXTBCX3M_js.Steps; }
10
10
  });
11
11
  Object.defineProperty(exports, "useStepsContext", {
12
12
  enumerable: true,
13
- get: function () { return chunkAQQRWISY_js.useStepsContext; }
13
+ get: function () { return chunkGXTBCX3M_js.useStepsContext; }
14
14
  });
@@ -1 +1 @@
1
- export { Steps, useStepsContext } from '../chunk-LAZGEMA2.mjs';
1
+ export { Steps, useStepsContext } from '../chunk-P4EFJIXU.mjs';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkAQQRWISY_js = require('../chunk-AQQRWISY.js');
3
+ var chunkGXTBCX3M_js = require('../chunk-GXTBCX3M.js');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "StepsItem", {
8
8
  enumerable: true,
9
- get: function () { return chunkAQQRWISY_js.StepsItem; }
9
+ get: function () { return chunkGXTBCX3M_js.StepsItem; }
10
10
  });
@@ -1 +1 @@
1
- export { StepsItem } from '../chunk-LAZGEMA2.mjs';
1
+ export { StepsItem } from '../chunk-P4EFJIXU.mjs';
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var chunkR5BQHZWB_js = require('../chunk-R5BQHZWB.js');
3
+ var chunkHRYBEBZC_js = require('../chunk-HRYBEBZC.js');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "Table", {
8
8
  enumerable: true,
9
- get: function () { return chunkR5BQHZWB_js.Table; }
9
+ get: function () { return chunkHRYBEBZC_js.Table; }
10
10
  });
@@ -1 +1 @@
1
- export { Table } from '../chunk-K7ZMB2TH.mjs';
1
+ export { Table } from '../chunk-5XKYWZZZ.mjs';
@@ -1,13 +1,23 @@
1
1
  import React from 'react';
2
- import { TooltipProps as TooltipProps$1 } from '@expcat/tigercat-core';
2
+ import { TooltipProps as TooltipProps$1, FloatingPlacement } from '@expcat/tigercat-core';
3
3
 
4
- type TooltipProps = Omit<TooltipProps$1, 'content' | 'style'> & Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'className' | 'style' | 'content'> & {
4
+ type TooltipProps = Omit<TooltipProps$1, 'content' | 'style' | 'placement'> & Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'className' | 'style' | 'content'> & {
5
5
  children?: React.ReactNode;
6
6
  content?: React.ReactNode;
7
7
  /** @deprecated Use `content` (supports ReactNode). */
8
8
  contentContent?: React.ReactNode;
9
9
  className?: string;
10
10
  style?: React.CSSProperties;
11
+ /**
12
+ * Tooltip placement relative to trigger
13
+ * @default 'top'
14
+ */
15
+ placement?: FloatingPlacement;
16
+ /**
17
+ * Offset distance from trigger (in pixels)
18
+ * @default 8
19
+ */
20
+ offset?: number;
11
21
  onVisibleChange?: (visible: boolean) => void;
12
22
  };
13
23
  declare const Tooltip: React.FC<TooltipProps>;
@@ -1,13 +1,23 @@
1
1
  import React from 'react';
2
- import { TooltipProps as TooltipProps$1 } from '@expcat/tigercat-core';
2
+ import { TooltipProps as TooltipProps$1, FloatingPlacement } from '@expcat/tigercat-core';
3
3
 
4
- type TooltipProps = Omit<TooltipProps$1, 'content' | 'style'> & Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'className' | 'style' | 'content'> & {
4
+ type TooltipProps = Omit<TooltipProps$1, 'content' | 'style' | 'placement'> & Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'className' | 'style' | 'content'> & {
5
5
  children?: React.ReactNode;
6
6
  content?: React.ReactNode;
7
7
  /** @deprecated Use `content` (supports ReactNode). */
8
8
  contentContent?: React.ReactNode;
9
9
  className?: string;
10
10
  style?: React.CSSProperties;
11
+ /**
12
+ * Tooltip placement relative to trigger
13
+ * @default 'top'
14
+ */
15
+ placement?: FloatingPlacement;
16
+ /**
17
+ * Offset distance from trigger (in pixels)
18
+ * @default 8
19
+ */
20
+ offset?: number;
11
21
  onVisibleChange?: (visible: boolean) => void;
12
22
  };
13
23
  declare const Tooltip: React.FC<TooltipProps>;
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var chunkWK5HN4OH_js = require('../chunk-WK5HN4OH.js');
3
+ var chunkQY6I7LU5_js = require('../chunk-QY6I7LU5.js');
4
+ require('../chunk-ZYPEO2KY.js');
4
5
 
5
6
 
6
7
 
7
8
  Object.defineProperty(exports, "Tooltip", {
8
9
  enumerable: true,
9
- get: function () { return chunkWK5HN4OH_js.Tooltip; }
10
+ get: function () { return chunkQY6I7LU5_js.Tooltip; }
10
11
  });
@@ -1 +1,2 @@
1
- export { Tooltip } from '../chunk-G6FSHN2I.mjs';
1
+ export { Tooltip } from '../chunk-GW4EWT2K.mjs';
2
+ import '../chunk-WLIFEALE.mjs';
package/dist/index.d.mts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ChartLegendPosition, ChartLegendItem } from '@expcat/tigercat-core';
1
2
  export * from '@expcat/tigercat-core';
2
3
  export { ConfigProvider, useTigerConfig } from './components/ConfigProvider.mjs';
3
4
  export { Button, ButtonProps } from './components/Button.mjs';
@@ -57,15 +58,110 @@ export { DropdownItem, DropdownItemProps } from './components/DropdownItem.mjs';
57
58
  export { Drawer, DrawerProps } from './components/Drawer.mjs';
58
59
  export { Modal, ModalProps } from './components/Modal.mjs';
59
60
  export { Alert, AlertProps } from './components/Alert.mjs';
60
- export { MessageContainer, MessageContainerProps, default as message } from './components/Message.mjs';
61
+ export { default as Message, MessageContainer, MessageContainerProps } from './components/Message.mjs';
61
62
  export { NotificationContainer, NotificationContainerProps, default as notification } from './components/Notification.mjs';
62
63
  export { Loading, LoadingProps } from './components/Loading.mjs';
63
64
  export { Popconfirm, PopconfirmProps } from './components/Popconfirm.mjs';
64
65
  export { Popover, PopoverProps } from './components/Popover.mjs';
65
66
  export { Tooltip, TooltipProps } from './components/Tooltip.mjs';
67
+ export { default as ChartCanvas, ChartCanvasProps } from './components/ChartCanvas.mjs';
68
+ export { default as ChartAxis, ChartAxisProps } from './components/ChartAxis.mjs';
69
+ export { default as ChartGrid, ChartGridProps } from './components/ChartGrid.mjs';
70
+ export { default as ChartSeries, ChartSeriesProps } from './components/ChartSeries.mjs';
71
+ export { default as BarChart, BarChartProps } from './components/BarChart.mjs';
72
+ export { default as ScatterChart, ScatterChartProps } from './components/ScatterChart.mjs';
73
+ export { default as PieChart, PieChartProps } from './components/PieChart.mjs';
74
+ export { default as DonutChart, DonutChartProps } from './components/DonutChart.mjs';
75
+ export { default as RadarChart, RadarChartProps } from './components/RadarChart.mjs';
76
+ export { default as LineChart, LineChartProps } from './components/LineChart.mjs';
77
+ export { default as AreaChart, AreaChartProps } from './components/AreaChart.mjs';
78
+ export { default as ChartLegend, ChartLegendProps } from './components/ChartLegend.mjs';
79
+ export { default as ChartTooltip, ChartTooltipProps } from './components/ChartTooltip.mjs';
66
80
  import 'react';
67
81
  import 'react/jsx-runtime';
68
82
 
83
+ /**
84
+ * Options for useChartInteraction hook
85
+ */
86
+ interface UseChartInteractionOptions<T = unknown> {
87
+ /** Enable hover highlight */
88
+ hoverable: boolean;
89
+ /** Controlled hovered index from props */
90
+ hoveredIndexProp?: number | null;
91
+ /** Enable click selection */
92
+ selectable: boolean;
93
+ /** Controlled selected index from props */
94
+ selectedIndexProp?: number | null;
95
+ /** Opacity for active element */
96
+ activeOpacity: number;
97
+ /** Opacity for inactive elements */
98
+ inactiveOpacity: number;
99
+ /** Legend position for wrapper classes */
100
+ legendPosition?: ChartLegendPosition;
101
+ /** Callback when hover changes */
102
+ onHoveredIndexChange?: (index: number | null) => void;
103
+ /** Callback when selection changes */
104
+ onSelectedIndexChange?: (index: number | null) => void;
105
+ /** Get data item by index */
106
+ getData?: (index: number) => T | undefined;
107
+ /** Custom callbacks */
108
+ callbacks?: {
109
+ onHover?: (index: number | null, datum: T | null) => void;
110
+ onClick?: (index: number, datum: T) => void;
111
+ };
112
+ }
113
+ /**
114
+ * Return type for useChartInteraction
115
+ */
116
+ interface UseChartInteractionReturn {
117
+ /** Local hovered index state */
118
+ localHoveredIndex: number | null;
119
+ /** Local selected index state */
120
+ localSelectedIndex: number | null;
121
+ /** Tooltip position state */
122
+ tooltipPosition: {
123
+ x: number;
124
+ y: number;
125
+ };
126
+ /** Resolved hovered index (controlled or uncontrolled) */
127
+ resolvedHoveredIndex: number | null;
128
+ /** Resolved selected index (controlled or uncontrolled) */
129
+ resolvedSelectedIndex: number | null;
130
+ /** Current active index for highlighting */
131
+ activeIndex: number | null;
132
+ /** Get element opacity based on active state */
133
+ getElementOpacity: (index: number) => number | undefined;
134
+ /** Handle mouse enter on chart element */
135
+ handleMouseEnter: (index: number, event: React.MouseEvent) => void;
136
+ /** Handle mouse move for tooltip */
137
+ handleMouseMove: (event: React.MouseEvent) => void;
138
+ /** Handle mouse leave */
139
+ handleMouseLeave: () => void;
140
+ /** Handle click on chart element */
141
+ handleClick: (index: number) => void;
142
+ /** Handle keydown for accessibility */
143
+ handleKeyDown: (event: React.KeyboardEvent, index: number) => void;
144
+ /** Handle legend item click */
145
+ handleLegendClick: (index: number) => void;
146
+ /** Handle legend item hover */
147
+ handleLegendHover: (index: number) => void;
148
+ /** Handle legend item leave */
149
+ handleLegendLeave: () => void;
150
+ /** Wrapper classes for legend layout */
151
+ wrapperClasses: string;
152
+ /** Create legend items from data */
153
+ createLegendItems: (items: Array<{
154
+ label?: string;
155
+ color?: string;
156
+ x?: unknown;
157
+ }>, palette: string[], labelFormatter?: (item: unknown, index: number) => string) => ChartLegendItem[];
158
+ }
159
+ /**
160
+ * Hook for chart interaction state and handlers
161
+ * Extracts common interaction logic from high-level chart components
162
+ */
163
+ declare function useChartInteraction<T = unknown>(options: UseChartInteractionOptions<T>): UseChartInteractionReturn;
164
+
69
165
  /**
70
166
  * Tigercat React
71
167
  *
@@ -74,4 +170,4 @@ import 'react/jsx-runtime';
74
170
 
75
171
  declare const version = "0.0.1";
76
172
 
77
- export { version };
173
+ export { type UseChartInteractionOptions, type UseChartInteractionReturn, useChartInteraction, version };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { ChartLegendPosition, ChartLegendItem } from '@expcat/tigercat-core';
1
2
  export * from '@expcat/tigercat-core';
2
3
  export { ConfigProvider, useTigerConfig } from './components/ConfigProvider.js';
3
4
  export { Button, ButtonProps } from './components/Button.js';
@@ -57,15 +58,110 @@ export { DropdownItem, DropdownItemProps } from './components/DropdownItem.js';
57
58
  export { Drawer, DrawerProps } from './components/Drawer.js';
58
59
  export { Modal, ModalProps } from './components/Modal.js';
59
60
  export { Alert, AlertProps } from './components/Alert.js';
60
- export { MessageContainer, MessageContainerProps, default as message } from './components/Message.js';
61
+ export { default as Message, MessageContainer, MessageContainerProps } from './components/Message.js';
61
62
  export { NotificationContainer, NotificationContainerProps, default as notification } from './components/Notification.js';
62
63
  export { Loading, LoadingProps } from './components/Loading.js';
63
64
  export { Popconfirm, PopconfirmProps } from './components/Popconfirm.js';
64
65
  export { Popover, PopoverProps } from './components/Popover.js';
65
66
  export { Tooltip, TooltipProps } from './components/Tooltip.js';
67
+ export { default as ChartCanvas, ChartCanvasProps } from './components/ChartCanvas.js';
68
+ export { default as ChartAxis, ChartAxisProps } from './components/ChartAxis.js';
69
+ export { default as ChartGrid, ChartGridProps } from './components/ChartGrid.js';
70
+ export { default as ChartSeries, ChartSeriesProps } from './components/ChartSeries.js';
71
+ export { default as BarChart, BarChartProps } from './components/BarChart.js';
72
+ export { default as ScatterChart, ScatterChartProps } from './components/ScatterChart.js';
73
+ export { default as PieChart, PieChartProps } from './components/PieChart.js';
74
+ export { default as DonutChart, DonutChartProps } from './components/DonutChart.js';
75
+ export { default as RadarChart, RadarChartProps } from './components/RadarChart.js';
76
+ export { default as LineChart, LineChartProps } from './components/LineChart.js';
77
+ export { default as AreaChart, AreaChartProps } from './components/AreaChart.js';
78
+ export { default as ChartLegend, ChartLegendProps } from './components/ChartLegend.js';
79
+ export { default as ChartTooltip, ChartTooltipProps } from './components/ChartTooltip.js';
66
80
  import 'react';
67
81
  import 'react/jsx-runtime';
68
82
 
83
+ /**
84
+ * Options for useChartInteraction hook
85
+ */
86
+ interface UseChartInteractionOptions<T = unknown> {
87
+ /** Enable hover highlight */
88
+ hoverable: boolean;
89
+ /** Controlled hovered index from props */
90
+ hoveredIndexProp?: number | null;
91
+ /** Enable click selection */
92
+ selectable: boolean;
93
+ /** Controlled selected index from props */
94
+ selectedIndexProp?: number | null;
95
+ /** Opacity for active element */
96
+ activeOpacity: number;
97
+ /** Opacity for inactive elements */
98
+ inactiveOpacity: number;
99
+ /** Legend position for wrapper classes */
100
+ legendPosition?: ChartLegendPosition;
101
+ /** Callback when hover changes */
102
+ onHoveredIndexChange?: (index: number | null) => void;
103
+ /** Callback when selection changes */
104
+ onSelectedIndexChange?: (index: number | null) => void;
105
+ /** Get data item by index */
106
+ getData?: (index: number) => T | undefined;
107
+ /** Custom callbacks */
108
+ callbacks?: {
109
+ onHover?: (index: number | null, datum: T | null) => void;
110
+ onClick?: (index: number, datum: T) => void;
111
+ };
112
+ }
113
+ /**
114
+ * Return type for useChartInteraction
115
+ */
116
+ interface UseChartInteractionReturn {
117
+ /** Local hovered index state */
118
+ localHoveredIndex: number | null;
119
+ /** Local selected index state */
120
+ localSelectedIndex: number | null;
121
+ /** Tooltip position state */
122
+ tooltipPosition: {
123
+ x: number;
124
+ y: number;
125
+ };
126
+ /** Resolved hovered index (controlled or uncontrolled) */
127
+ resolvedHoveredIndex: number | null;
128
+ /** Resolved selected index (controlled or uncontrolled) */
129
+ resolvedSelectedIndex: number | null;
130
+ /** Current active index for highlighting */
131
+ activeIndex: number | null;
132
+ /** Get element opacity based on active state */
133
+ getElementOpacity: (index: number) => number | undefined;
134
+ /** Handle mouse enter on chart element */
135
+ handleMouseEnter: (index: number, event: React.MouseEvent) => void;
136
+ /** Handle mouse move for tooltip */
137
+ handleMouseMove: (event: React.MouseEvent) => void;
138
+ /** Handle mouse leave */
139
+ handleMouseLeave: () => void;
140
+ /** Handle click on chart element */
141
+ handleClick: (index: number) => void;
142
+ /** Handle keydown for accessibility */
143
+ handleKeyDown: (event: React.KeyboardEvent, index: number) => void;
144
+ /** Handle legend item click */
145
+ handleLegendClick: (index: number) => void;
146
+ /** Handle legend item hover */
147
+ handleLegendHover: (index: number) => void;
148
+ /** Handle legend item leave */
149
+ handleLegendLeave: () => void;
150
+ /** Wrapper classes for legend layout */
151
+ wrapperClasses: string;
152
+ /** Create legend items from data */
153
+ createLegendItems: (items: Array<{
154
+ label?: string;
155
+ color?: string;
156
+ x?: unknown;
157
+ }>, palette: string[], labelFormatter?: (item: unknown, index: number) => string) => ChartLegendItem[];
158
+ }
159
+ /**
160
+ * Hook for chart interaction state and handlers
161
+ * Extracts common interaction logic from high-level chart components
162
+ */
163
+ declare function useChartInteraction<T = unknown>(options: UseChartInteractionOptions<T>): UseChartInteractionReturn;
164
+
69
165
  /**
70
166
  * Tigercat React
71
167
  *
@@ -74,4 +170,4 @@ import 'react/jsx-runtime';
74
170
 
75
171
  declare const version = "0.0.1";
76
172
 
77
- export { version };
173
+ export { type UseChartInteractionOptions, type UseChartInteractionReturn, useChartInteraction, version };