@expcat/tigercat-react 2.0.19 → 2.1.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 (186) hide show
  1. package/README.md +25 -16
  2. package/dist/chunk-246DAUEF.mjs +181 -0
  3. package/dist/{chunk-PU3JY6RE.mjs → chunk-2JMI7TCM.mjs} +1 -1
  4. package/dist/chunk-2YBLMVDT.mjs +428 -0
  5. package/dist/chunk-2YOP55OF.mjs +639 -0
  6. package/dist/{chunk-25D5TXZH.mjs → chunk-32MCQMBJ.mjs} +8 -6
  7. package/dist/chunk-3HHEVMHE.mjs +180 -0
  8. package/dist/{chunk-HSBN5MLS.mjs → chunk-3LACOSJQ.mjs} +1 -1
  9. package/dist/{chunk-F6WV53BS.mjs → chunk-3LDDXHW2.mjs} +28 -11
  10. package/dist/{chunk-IXQAECFP.mjs → chunk-3QNIFKVF.mjs} +12 -14
  11. package/dist/{chunk-UD4DTVJZ.mjs → chunk-4C2X5PZO.mjs} +57 -25
  12. package/dist/chunk-5JETWHLJ.mjs +28 -0
  13. package/dist/{chunk-VA6PZWOH.mjs → chunk-5SEMRHBD.mjs} +14 -6
  14. package/dist/{chunk-EKILTLUO.mjs → chunk-72CJNKDY.mjs} +1 -1
  15. package/dist/{chunk-XE4YFBOZ.mjs → chunk-AUD3VOLO.mjs} +1 -1
  16. package/dist/{chunk-UT5BV2VO.mjs → chunk-AYFKHWJS.mjs} +16 -10
  17. package/dist/{chunk-RPSHILHD.mjs → chunk-BXAH2GH3.mjs} +8 -2
  18. package/dist/{chunk-EW5EO7VE.mjs → chunk-BYD7EAWK.mjs} +1 -1
  19. package/dist/{chunk-BOGOQ44C.mjs → chunk-CQOLQAB5.mjs} +105 -90
  20. package/dist/{chunk-L55UK45A.mjs → chunk-CRIEUKMD.mjs} +5 -2
  21. package/dist/{chunk-DKNVSQSV.mjs → chunk-CUAXRBKO.mjs} +12 -0
  22. package/dist/{chunk-E7OTDBI6.mjs → chunk-DECUASRW.mjs} +17 -19
  23. package/dist/{chunk-XMTEMBQV.mjs → chunk-EAAWB3CK.mjs} +16 -13
  24. package/dist/{chunk-D33BIMGK.mjs → chunk-EG7EMDKK.mjs} +12 -2
  25. package/dist/chunk-EW43YBPV.mjs +457 -0
  26. package/dist/{chunk-HOYBHB7B.mjs → chunk-FNK2VWPP.mjs} +1 -1
  27. package/dist/{chunk-RJPNBYK5.mjs → chunk-FQS24AUH.mjs} +12 -3
  28. package/dist/{chunk-LADKKOJT.mjs → chunk-GBEDWXLL.mjs} +16 -10
  29. package/dist/chunk-GR3Y3XWP.mjs +47 -0
  30. package/dist/{chunk-2ENQZECC.mjs → chunk-HAXRHSCN.mjs} +4 -3
  31. package/dist/{chunk-K4GIKSZE.mjs → chunk-I2BENK5X.mjs} +2 -1
  32. package/dist/chunk-IGBQGR6G.mjs +234 -0
  33. package/dist/chunk-J76R2S62.mjs +161 -0
  34. package/dist/{chunk-DNOPEJ5I.mjs → chunk-JZZPLKTW.mjs} +7 -4
  35. package/dist/{chunk-7KCQMXJA.mjs → chunk-KDURW5AS.mjs} +4 -3
  36. package/dist/{chunk-TFMEHUVZ.mjs → chunk-KKN7KLTB.mjs} +0 -1
  37. package/dist/{chunk-6MGQAJ62.mjs → chunk-KL6YJIZ3.mjs} +24 -7
  38. package/dist/chunk-KRDHM5KB.mjs +259 -0
  39. package/dist/{chunk-HHIW7V7B.mjs → chunk-M6ZPTGBV.mjs} +2 -10
  40. package/dist/chunk-MFPVVGNA.mjs +248 -0
  41. package/dist/{chunk-PXRZ6CKY.mjs → chunk-MJVSZ2UJ.mjs} +46 -16
  42. package/dist/{chunk-LZKBDQE4.mjs → chunk-MYI3FPG4.mjs} +23 -4
  43. package/dist/{chunk-OIGEBCAS.mjs → chunk-NADODEZX.mjs} +69 -1
  44. package/dist/{chunk-KMP5CVNK.mjs → chunk-NJWTZ5MO.mjs} +57 -45
  45. package/dist/chunk-NLGLBTSM.mjs +138 -0
  46. package/dist/chunk-NT7GW2FD.mjs +40 -0
  47. package/dist/{chunk-773LH7BK.mjs → chunk-O6VYD4E4.mjs} +24 -2
  48. package/dist/{chunk-G7D4QV7A.mjs → chunk-O7TV5OKS.mjs} +33 -6
  49. package/dist/{chunk-DPWRXXXW.mjs → chunk-OJ6SHHOZ.mjs} +3 -3
  50. package/dist/chunk-OKYMTHFQ.mjs +279 -0
  51. package/dist/{chunk-UYJJLHVA.mjs → chunk-PMQJ6AYT.mjs} +23 -21
  52. package/dist/chunk-PY2VUNEJ.mjs +494 -0
  53. package/dist/{chunk-BEJZPJIK.mjs → chunk-QOAOOD53.mjs} +10 -4
  54. package/dist/{chunk-2WGEHH5A.mjs → chunk-QU3QXUTC.mjs} +49 -23
  55. package/dist/{chunk-V6P7ZK6O.mjs → chunk-QXSUG7SN.mjs} +3 -3
  56. package/dist/{chunk-FYINJRYN.mjs → chunk-R7YZ6FKP.mjs} +27 -16
  57. package/dist/{chunk-YI6YWH66.mjs → chunk-RE5ZLA5D.mjs} +6 -6
  58. package/dist/{chunk-UCBW5RJN.mjs → chunk-RGVU4EMA.mjs} +11 -6
  59. package/dist/{chunk-IBSOUQGB.mjs → chunk-RRGPDFDI.mjs} +7 -4
  60. package/dist/{chunk-ZH5ZBLAN.mjs → chunk-RUQ3F3MV.mjs} +34 -7
  61. package/dist/chunk-SEOG5AGS.mjs +72 -0
  62. package/dist/{chunk-PGD5RPKF.mjs → chunk-SVIJ2UZA.mjs} +2 -1
  63. package/dist/chunk-SXWEFZOF.mjs +766 -0
  64. package/dist/{chunk-NCHUEGUW.mjs → chunk-TEVEXDY2.mjs} +27 -16
  65. package/dist/{chunk-DJOFM2VO.mjs → chunk-TO6MZFNQ.mjs} +52 -40
  66. package/dist/chunk-TQ6RIFWR.mjs +135 -0
  67. package/dist/chunk-U4M3DC2P.mjs +48 -0
  68. package/dist/{chunk-ZCGIZOMT.mjs → chunk-V7HJ5HLC.mjs} +6 -10
  69. package/dist/{chunk-SIDDYP3O.mjs → chunk-VJWSKJLJ.mjs} +1 -1
  70. package/dist/{chunk-ZG56T75O.mjs → chunk-WTHWLCRL.mjs} +51 -11
  71. package/dist/{chunk-KP6DEYWB.mjs → chunk-X4L3W7RQ.mjs} +1 -1
  72. package/dist/{chunk-ZMRTETN2.mjs → chunk-X6C6MNG5.mjs} +4 -3
  73. package/dist/chunk-XT43B7ZI.mjs +58 -0
  74. package/dist/{chunk-OGG2TQDG.mjs → chunk-XVHTJQ4T.mjs} +12 -1
  75. package/dist/{chunk-QJE3MZBO.mjs → chunk-Y6UH3EKE.mjs} +1 -1
  76. package/dist/chunk-YJ5T4XZN.mjs +81 -0
  77. package/dist/{chunk-VVNFXJMN.mjs → chunk-YNDPQVEK.mjs} +8 -1
  78. package/dist/{chunk-QGZ32NFQ.mjs → chunk-Z23KOLNU.mjs} +4 -3
  79. package/dist/{chunk-5CKMYMTS.mjs → chunk-ZATZRXMW.mjs} +27 -8
  80. package/dist/components/ActivityFeed.mjs +3 -3
  81. package/dist/components/Affix.mjs +1 -1
  82. package/dist/components/Anchor.mjs +1 -1
  83. package/dist/components/AreaChart.mjs +5 -4
  84. package/dist/components/AspectRatio.d.mts +10 -0
  85. package/dist/components/AspectRatio.mjs +8 -0
  86. package/dist/components/AutoComplete.mjs +1 -1
  87. package/dist/components/BarChart.mjs +5 -4
  88. package/dist/components/Calendar.mjs +1 -1
  89. package/dist/components/Cascader.mjs +1 -1
  90. package/dist/components/ChartCanvas.mjs +1 -1
  91. package/dist/components/ChatWindow.mjs +4 -4
  92. package/dist/components/Code.mjs +3 -1
  93. package/dist/components/CollapsePanel.mjs +1 -1
  94. package/dist/components/ColorPicker.mjs +1 -1
  95. package/dist/components/CommentThread.mjs +2 -2
  96. package/dist/components/ContextMenu.d.mts +36 -0
  97. package/dist/components/ContextMenu.mjs +17 -0
  98. package/dist/components/DataExport.mjs +2 -2
  99. package/dist/components/DataTableWithToolbar.mjs +7 -7
  100. package/dist/components/DonutChart.mjs +4 -4
  101. package/dist/components/Dropdown.mjs +1 -1
  102. package/dist/components/FileManager.mjs +2 -1
  103. package/dist/components/FloatButton.mjs +1 -1
  104. package/dist/components/FormItem.mjs +1 -1
  105. package/dist/components/FormWizard.mjs +1 -1
  106. package/dist/components/FunnelChart.mjs +3 -3
  107. package/dist/components/Gantt.d.mts +3 -1
  108. package/dist/components/Gantt.mjs +2 -2
  109. package/dist/components/GaugeChart.mjs +2 -2
  110. package/dist/components/HeatmapChart.mjs +3 -3
  111. package/dist/components/Highlight.d.mts +11 -0
  112. package/dist/components/Highlight.mjs +8 -0
  113. package/dist/components/Image.mjs +4 -4
  114. package/dist/components/ImageCompare.d.mts +15 -0
  115. package/dist/components/ImageCompare.mjs +8 -0
  116. package/dist/components/ImageGroup.mjs +2 -2
  117. package/dist/components/ImagePreview.mjs +1 -1
  118. package/dist/components/Input.mjs +1 -1
  119. package/dist/components/InputNumber.d.mts +1 -1
  120. package/dist/components/InputNumber.mjs +1 -1
  121. package/dist/components/InputOTP.d.mts +33 -0
  122. package/dist/components/InputOTP.mjs +12 -0
  123. package/dist/components/Kanban.mjs +2 -2
  124. package/dist/components/Kbd.d.mts +10 -0
  125. package/dist/components/Kbd.mjs +8 -0
  126. package/dist/components/LineChart.mjs +5 -4
  127. package/dist/components/List.mjs +2 -2
  128. package/dist/components/Loading.mjs +1 -1
  129. package/dist/components/LoadingBar.d.mts +8 -0
  130. package/dist/components/LoadingBar.mjs +138 -0
  131. package/dist/components/LoadingBarContainer.d.mts +8 -0
  132. package/dist/components/LoadingBarContainer.mjs +8 -0
  133. package/dist/components/LoadingBarRoot.d.mts +6 -0
  134. package/dist/components/LoadingBarRoot.mjs +6 -0
  135. package/dist/components/Marquee.d.mts +10 -0
  136. package/dist/components/Marquee.mjs +8 -0
  137. package/dist/components/MaskInput.d.mts +37 -0
  138. package/dist/components/MaskInput.mjs +10 -0
  139. package/dist/components/Masonry.d.mts +10 -0
  140. package/dist/components/Masonry.mjs +8 -0
  141. package/dist/components/NavigationMenu.d.mts +84 -0
  142. package/dist/components/NavigationMenu.mjs +23 -0
  143. package/dist/components/NotificationCenter.mjs +4 -4
  144. package/dist/components/OrgChart.mjs +2 -2
  145. package/dist/components/PageHeader.d.mts +34 -0
  146. package/dist/components/PageHeader.mjs +11 -0
  147. package/dist/components/Pagination.mjs +1 -1
  148. package/dist/components/PieChart.mjs +3 -3
  149. package/dist/components/Popconfirm.mjs +2 -2
  150. package/dist/components/Popover.mjs +2 -2
  151. package/dist/components/QRCode.d.mts +2 -2
  152. package/dist/components/QRCode.mjs +1 -1
  153. package/dist/components/RadarChart.mjs +4 -4
  154. package/dist/components/Rate.mjs +1 -1
  155. package/dist/components/ScatterChart.mjs +5 -4
  156. package/dist/components/ScrollArea.d.mts +10 -0
  157. package/dist/components/ScrollArea.mjs +8 -0
  158. package/dist/components/ScrollSpy.mjs +1 -1
  159. package/dist/components/Signature.mjs +1 -1
  160. package/dist/components/SplitButton.d.mts +38 -0
  161. package/dist/components/SplitButton.mjs +12 -0
  162. package/dist/components/Splitter.mjs +1 -1
  163. package/dist/components/Stepper.d.mts +2 -0
  164. package/dist/components/Stepper.mjs +2 -1
  165. package/dist/components/SunburstChart.mjs +3 -3
  166. package/dist/components/Switch.d.mts +5 -1
  167. package/dist/components/Switch.mjs +2 -1
  168. package/dist/components/Table.mjs +2 -2
  169. package/dist/components/TagsInput.d.mts +41 -0
  170. package/dist/components/TagsInput.mjs +13 -0
  171. package/dist/components/TaskBoard.mjs +1 -1
  172. package/dist/components/Textarea.mjs +1 -1
  173. package/dist/components/Tooltip.mjs +2 -2
  174. package/dist/components/Tour.mjs +1 -1
  175. package/dist/components/TreeMapChart.mjs +3 -3
  176. package/dist/components/TreeSelect.mjs +2 -1
  177. package/dist/components/Upload.mjs +1 -1
  178. package/dist/hooks/useChartInteraction.d.mts +5 -0
  179. package/dist/hooks/useChartInteraction.mjs +1 -1
  180. package/dist/index.d.mts +17 -1
  181. package/dist/index.mjs +406 -0
  182. package/package.json +117 -2
  183. package/dist/chunk-7AFRHC7P.mjs +0 -312
  184. package/dist/chunk-CB4SK5AU.mjs +0 -235
  185. package/dist/chunk-KPACLRQH.mjs +0 -55
  186. package/dist/chunk-YIB6ZXZF.mjs +0 -386
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  useChartInteraction
3
- } from "./chunk-DNOPEJ5I.mjs";
3
+ } from "./chunk-JZZPLKTW.mjs";
4
4
  import {
5
5
  ChartTooltip
6
6
  } from "./chunk-YORCCCQX.mjs";
7
7
  import {
8
8
  ChartCanvas
9
- } from "./chunk-DKNVSQSV.mjs";
9
+ } from "./chunk-CUAXRBKO.mjs";
10
10
  import {
11
11
  ChartLegend
12
12
  } from "./chunk-F2ITBDUS.mjs";
@@ -16,6 +16,7 @@ import { useId, useMemo } from "react";
16
16
  import {
17
17
  classNames,
18
18
  computeSunburstArcs,
19
+ getSunburstLabelPoint,
19
20
  getChartElementOpacity,
20
21
  getChartInnerRect,
21
22
  getStableChartGradientPrefix,
@@ -30,7 +31,7 @@ var SunburstChart = ({
30
31
  padding = 24,
31
32
  data,
32
33
  innerRadiusRatio = 0,
33
- showLabels: _showLabels = true,
34
+ showLabels = true,
34
35
  colors,
35
36
  gradient = false,
36
37
  hoverable = false,
@@ -97,6 +98,7 @@ var SunburstChart = ({
97
98
  wrapperClasses
98
99
  } = useChartInteraction({
99
100
  hoverable,
101
+ showTooltip,
100
102
  hoveredIndexProp,
101
103
  selectable,
102
104
  selectedIndexProp,
@@ -189,11 +191,28 @@ var SunburstChart = ({
189
191
  },
190
192
  `arc-${arc.index}`
191
193
  );
194
+ }),
195
+ showLabels && arcs.map((arc) => {
196
+ const { x, y } = getSunburstLabelPoint(arc, cx, cy);
197
+ return /* @__PURE__ */ jsx(
198
+ "text",
199
+ {
200
+ x,
201
+ y,
202
+ className: "fill-white text-xs",
203
+ textAnchor: "middle",
204
+ dominantBaseline: "middle",
205
+ style: { pointerEvents: "none" },
206
+ "aria-hidden": "true",
207
+ children: arc.label
208
+ },
209
+ `label-${arc.index}`
210
+ );
192
211
  })
193
212
  ] })
194
213
  }
195
214
  );
196
- const tooltip = showTooltip && hoverable ? /* @__PURE__ */ jsx(
215
+ const tooltip = showTooltip ? /* @__PURE__ */ jsx(
197
216
  ChartTooltip,
198
217
  {
199
218
  content: tooltipContent,
@@ -64,6 +64,10 @@ var Signature = forwardRef(
64
64
  const canvasRef = useRef(null);
65
65
  const strokesRef = useRef([]);
66
66
  const activeStrokeRef = useRef(null);
67
+ const capturedPointerIdRef = useRef(null);
68
+ const documentPointerListeningRef = useRef(false);
69
+ const finishStrokeRef = useRef(() => {
70
+ });
67
71
  const [strokes, setStrokes] = useState([]);
68
72
  const isDisabled = disabled || readonly;
69
73
  const normalizedLineWidth = clampSignatureLineWidth(lineWidth);
@@ -118,9 +122,52 @@ var Signature = forwardRef(
118
122
  },
119
123
  [createPayload, onChange]
120
124
  );
125
+ const handleDocumentPointerEnd = useRef(() => {
126
+ finishStrokeRef.current();
127
+ }).current;
128
+ const detachDocumentPointerListeners = () => {
129
+ if (!documentPointerListeningRef.current || typeof document === "undefined") return;
130
+ document.removeEventListener("pointerup", handleDocumentPointerEnd);
131
+ document.removeEventListener("pointercancel", handleDocumentPointerEnd);
132
+ documentPointerListeningRef.current = false;
133
+ };
134
+ const attachDocumentPointerListeners = () => {
135
+ if (documentPointerListeningRef.current || typeof document === "undefined") return;
136
+ document.addEventListener("pointerup", handleDocumentPointerEnd);
137
+ document.addEventListener("pointercancel", handleDocumentPointerEnd);
138
+ documentPointerListeningRef.current = true;
139
+ };
140
+ const captureCanvasPointer = (pointerId) => {
141
+ capturedPointerIdRef.current = pointerId;
142
+ const canvas = canvasRef.current;
143
+ if (!canvas || typeof canvas.setPointerCapture !== "function") return;
144
+ try {
145
+ canvas.setPointerCapture(pointerId);
146
+ } catch {
147
+ }
148
+ };
149
+ const releaseCanvasPointer = () => {
150
+ const canvas = canvasRef.current;
151
+ const pointerId = capturedPointerIdRef.current;
152
+ capturedPointerIdRef.current = null;
153
+ if (!canvas || pointerId == null || typeof canvas.releasePointerCapture !== "function") return;
154
+ if (typeof canvas.hasPointerCapture === "function") {
155
+ try {
156
+ if (!canvas.hasPointerCapture(pointerId)) return;
157
+ } catch {
158
+ return;
159
+ }
160
+ }
161
+ try {
162
+ canvas.releasePointerCapture(pointerId);
163
+ } catch {
164
+ }
165
+ };
121
166
  const clear = useCallback(() => {
122
167
  strokesRef.current = [];
123
168
  activeStrokeRef.current = null;
169
+ detachDocumentPointerListeners();
170
+ releaseCanvasPointer();
124
171
  setStrokes([]);
125
172
  draw([]);
126
173
  emitChange([]);
@@ -137,13 +184,23 @@ var Signature = forwardRef(
137
184
  [clear, toDataURL, toSVG]
138
185
  );
139
186
  const getPointFromEvent = (event) => {
140
- const rect = event.currentTarget.getBoundingClientRect();
187
+ const canvas = canvasRef.current;
188
+ const rect = canvas?.getBoundingClientRect() ?? {
189
+ left: 0,
190
+ top: 0,
191
+ width,
192
+ height
193
+ };
141
194
  return getSignaturePoint(event.clientX, event.clientY, rect, width, height);
142
195
  };
143
196
  const handlePointerDown = (event) => {
144
197
  if (isDisabled) return;
145
198
  event.preventDefault();
146
199
  event.currentTarget.focus();
200
+ const pointerId = event.pointerId;
201
+ if (typeof pointerId === "number") {
202
+ captureCanvasPointer(pointerId);
203
+ }
147
204
  const stroke = {
148
205
  color: penColor,
149
206
  lineWidth: normalizedLineWidth,
@@ -153,6 +210,7 @@ var Signature = forwardRef(
153
210
  activeStrokeRef.current = stroke;
154
211
  strokesRef.current = nextStrokes;
155
212
  setStrokes(nextStrokes);
213
+ attachDocumentPointerListeners();
156
214
  onBegin?.();
157
215
  };
158
216
  const handlePointerMove = (event) => {
@@ -169,7 +227,16 @@ var Signature = forwardRef(
169
227
  activeStrokeRef.current = null;
170
228
  const payload = emitChange(strokesRef.current);
171
229
  onEnd?.(payload);
230
+ detachDocumentPointerListeners();
231
+ releaseCanvasPointer();
172
232
  };
233
+ finishStrokeRef.current = finishStroke;
234
+ useEffect(() => {
235
+ return () => {
236
+ detachDocumentPointerListeners();
237
+ releaseCanvasPointer();
238
+ };
239
+ }, []);
173
240
  const handleKeyDown = (event) => {
174
241
  if (!clearable || isDisabled) return;
175
242
  if (event.key !== "Delete" && event.key !== "Backspace") return;
@@ -192,6 +259,7 @@ var Signature = forwardRef(
192
259
  onPointerMove: handlePointerMove,
193
260
  onPointerUp: finishStroke,
194
261
  onPointerCancel: finishStroke,
262
+ onLostPointerCapture: finishStroke,
195
263
  onKeyDown: handleKeyDown
196
264
  }
197
265
  ) }),
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  useChartInteraction
3
- } from "./chunk-DNOPEJ5I.mjs";
3
+ } from "./chunk-JZZPLKTW.mjs";
4
+ import {
5
+ ChartSeries
6
+ } from "./chunk-SDLMB34Y.mjs";
4
7
  import {
5
8
  ChartTooltip
6
9
  } from "./chunk-YORCCCQX.mjs";
7
10
  import {
8
11
  ChartCanvas
9
- } from "./chunk-DKNVSQSV.mjs";
12
+ } from "./chunk-CUAXRBKO.mjs";
10
13
  import {
11
14
  ChartLegend
12
15
  } from "./chunk-F2ITBDUS.mjs";
13
- import {
14
- ChartSeries
15
- } from "./chunk-SDLMB34Y.mjs";
16
16
 
17
17
  // src/components/RadarChart.tsx
18
18
  import { useId, useMemo, useState, useCallback } from "react";
@@ -20,7 +20,9 @@ import {
20
20
  chartAxisTickTextClasses,
21
21
  chartGridLineClasses,
22
22
  classNames,
23
+ createCircleRingPath,
23
24
  createPolygonPath,
25
+ createPolygonRingPath,
24
26
  getChartGridLineDasharray,
25
27
  getChartInnerRect,
26
28
  getRadarAngles,
@@ -121,6 +123,7 @@ var RadarChart = ({
121
123
  wrapperClasses
122
124
  } = useChartInteraction({
123
125
  hoverable,
126
+ showTooltip,
124
127
  hoveredIndexProp,
125
128
  selectable,
126
129
  selectedIndexProp,
@@ -142,11 +145,11 @@ var RadarChart = ({
142
145
  const [hoveredPoint, setHoveredPoint] = useState(null);
143
146
  const handlePointEnter = useCallback(
144
147
  (seriesIndex, pointIndex, event) => {
145
- if (!hoverable) return;
148
+ if (!hoverable && !showTooltip) return;
146
149
  setHoveredPoint({ seriesIndex, pointIndex });
147
150
  handleHoverEnter(seriesIndex, event);
148
151
  },
149
- [hoverable, handleHoverEnter]
152
+ [hoverable, showTooltip, handleHoverEnter]
150
153
  );
151
154
  const handlePointMove = useCallback(
152
155
  (event) => {
@@ -422,52 +425,61 @@ var RadarChart = ({
422
425
  ] }),
423
426
  splitAreaPaths.map((area, index) => {
424
427
  if (area.type === "circle-ring") {
425
- return /* @__PURE__ */ jsxs("g", { children: [
426
- /* @__PURE__ */ jsx(
427
- "circle",
428
+ if (area.innerRadius > 0) {
429
+ return /* @__PURE__ */ jsx(
430
+ "path",
428
431
  {
429
- cx: area.cx,
430
- cy: area.cy,
431
- r: area.outerRadius,
432
+ d: createCircleRingPath(area.cx, area.cy, area.outerRadius, area.innerRadius),
432
433
  fill: area.color,
433
434
  fillOpacity: splitAreaOpacity,
435
+ fillRule: "evenodd",
434
436
  stroke: "none",
435
437
  "data-radar-split-area": "true"
436
- }
437
- ),
438
- area.innerRadius > 0 ? /* @__PURE__ */ jsx(
439
- "circle",
440
- {
441
- cx: area.cx,
442
- cy: area.cy,
443
- r: area.innerRadius,
444
- fill: "var(--tiger-bg,#fff)",
445
- stroke: "none"
446
- }
447
- ) : null
448
- ] }, `split-${index}`);
449
- }
450
- const outerPath = createPolygonPath(area.outerPoints);
451
- return /* @__PURE__ */ jsxs("g", { children: [
452
- outerPath ? /* @__PURE__ */ jsx(
453
- "path",
438
+ },
439
+ `split-${index}`
440
+ );
441
+ }
442
+ return /* @__PURE__ */ jsx(
443
+ "circle",
454
444
  {
455
- d: outerPath,
445
+ cx: area.cx,
446
+ cy: area.cy,
447
+ r: area.outerRadius,
456
448
  fill: area.color,
457
449
  fillOpacity: splitAreaOpacity,
458
450
  stroke: "none",
459
451
  "data-radar-split-area": "true"
460
- }
461
- ) : null,
462
- area.innerPoints.length > 0 ? /* @__PURE__ */ jsx(
452
+ },
453
+ `split-${index}`
454
+ );
455
+ }
456
+ if (area.innerPoints.length > 0) {
457
+ const ringPath = createPolygonRingPath(area.outerPoints, area.innerPoints);
458
+ return ringPath ? /* @__PURE__ */ jsx(
463
459
  "path",
464
460
  {
465
- d: createPolygonPath(area.innerPoints),
466
- fill: "var(--tiger-bg,#fff)",
467
- stroke: "none"
468
- }
469
- ) : null
470
- ] }, `split-${index}`);
461
+ d: ringPath,
462
+ fill: area.color,
463
+ fillOpacity: splitAreaOpacity,
464
+ fillRule: "evenodd",
465
+ stroke: "none",
466
+ "data-radar-split-area": "true"
467
+ },
468
+ `split-${index}`
469
+ ) : null;
470
+ }
471
+ const outerPath = createPolygonPath(area.outerPoints);
472
+ return outerPath ? /* @__PURE__ */ jsx(
473
+ "path",
474
+ {
475
+ d: outerPath,
476
+ fill: area.color,
477
+ fillOpacity: splitAreaOpacity,
478
+ stroke: "none",
479
+ "data-radar-split-area": "true"
480
+ },
481
+ `split-${index}`
482
+ ) : null;
471
483
  }),
472
484
  gridPaths.map(
473
485
  (grid, index) => grid.type === "circle" ? /* @__PURE__ */ jsx(
@@ -581,9 +593,9 @@ var RadarChart = ({
581
593
  "data-series-index": seriesIndex,
582
594
  "data-series-key": item.seriesKey,
583
595
  "data-point-index": point.index,
584
- onMouseEnter: showTooltip && hoverable ? (e) => handlePointEnter(seriesIndex, point.index, e) : void 0,
585
- onMouseMove: showTooltip && hoverable ? handlePointMove : void 0,
586
- onMouseLeave: showTooltip && hoverable ? handlePointLeave : void 0,
596
+ onMouseEnter: showTooltip || hoverable ? (e) => handlePointEnter(seriesIndex, point.index, e) : void 0,
597
+ onMouseMove: showTooltip || hoverable ? handlePointMove : void 0,
598
+ onMouseLeave: showTooltip || hoverable ? handlePointLeave : void 0,
587
599
  onFocus: showTooltip && hoverable ? (e) => showPointTooltipFromElement(e.currentTarget, seriesIndex, point.index) : void 0,
588
600
  onBlur: showTooltip && hoverable ? handlePointLeave : void 0,
589
601
  onKeyDown: showTooltip && hoverable ? (e) => {
@@ -635,7 +647,7 @@ var RadarChart = ({
635
647
  ]
636
648
  }
637
649
  );
638
- const tooltip = showTooltip && hoverable ? /* @__PURE__ */ jsx(
650
+ const tooltip = showTooltip ? /* @__PURE__ */ jsx(
639
651
  ChartTooltip,
640
652
  {
641
653
  content: tooltipContent,
@@ -0,0 +1,138 @@
1
+ import {
2
+ Button
3
+ } from "./chunk-5TE7KLE5.mjs";
4
+ import {
5
+ Link
6
+ } from "./chunk-XZVQ3PJS.mjs";
7
+
8
+ // src/components/PageHeader.tsx
9
+ import { forwardRef, useCallback, useMemo } from "react";
10
+ import {
11
+ chevronLeftSolidIcon20PathD,
12
+ composeComponentClasses,
13
+ getPageHeaderBackButtonClasses,
14
+ getPageHeaderRootClasses,
15
+ hasPageHeaderHeadingContent,
16
+ icon20ViewBox,
17
+ pageHeaderActionsClasses,
18
+ pageHeaderBackIconClasses,
19
+ pageHeaderBackWrapClasses,
20
+ pageHeaderContentClasses,
21
+ pageHeaderHeadingRowClasses,
22
+ pageHeaderMainClasses,
23
+ pageHeaderStartClasses,
24
+ pageHeaderSubtitleClasses,
25
+ pageHeaderTitleClasses,
26
+ pageHeaderTitleRowClasses,
27
+ resolvePageHeaderBackAriaLabel,
28
+ resolvePageHeaderBackVisibility
29
+ } from "@expcat/tigercat-core";
30
+ import { jsx, jsxs } from "react/jsx-runtime";
31
+ function BackIcon() {
32
+ return /* @__PURE__ */ jsx(
33
+ "svg",
34
+ {
35
+ className: pageHeaderBackIconClasses,
36
+ xmlns: "http://www.w3.org/2000/svg",
37
+ viewBox: icon20ViewBox,
38
+ fill: "currentColor",
39
+ "aria-hidden": "true",
40
+ focusable: "false",
41
+ children: /* @__PURE__ */ jsx("path", { fillRule: "evenodd", d: chevronLeftSolidIcon20PathD, clipRule: "evenodd" })
42
+ }
43
+ );
44
+ }
45
+ var PageHeader = forwardRef(
46
+ ({
47
+ showBack,
48
+ backHref,
49
+ backAriaLabel,
50
+ title,
51
+ subTitle,
52
+ breadcrumb,
53
+ actions,
54
+ back,
55
+ onBack,
56
+ className,
57
+ style,
58
+ children,
59
+ ...rest
60
+ }, ref) => {
61
+ const hasBackOverride = back != null && back !== false;
62
+ const hasBreadcrumb = breadcrumb != null && breadcrumb !== false;
63
+ const hasTitle = title != null && title !== false && title !== "";
64
+ const hasSubtitle = subTitle != null && subTitle !== false && subTitle !== "";
65
+ const hasActions = actions != null && actions !== false;
66
+ const hasBody = children != null && children !== false;
67
+ const showBackControl = resolvePageHeaderBackVisibility({
68
+ showBack,
69
+ hasHandler: Boolean(onBack),
70
+ hasBackHref: Boolean(backHref),
71
+ hasBackOverride
72
+ });
73
+ const showHeading = hasPageHeaderHeadingContent({
74
+ showBack: showBackControl,
75
+ hasBreadcrumb,
76
+ hasTitle,
77
+ hasSubtitle,
78
+ hasActions
79
+ });
80
+ const resolvedBackAriaLabel = resolvePageHeaderBackAriaLabel(backAriaLabel);
81
+ const rootClasses = useMemo(
82
+ () => composeComponentClasses(getPageHeaderRootClasses(className)),
83
+ [className]
84
+ );
85
+ const backButtonClasses = useMemo(() => getPageHeaderBackButtonClasses(), []);
86
+ const handleBack = useCallback(
87
+ (event) => {
88
+ onBack?.(event);
89
+ },
90
+ [onBack]
91
+ );
92
+ const defaultBackControl = backHref ? /* @__PURE__ */ jsx(
93
+ Link,
94
+ {
95
+ href: backHref,
96
+ underline: false,
97
+ variant: "default",
98
+ className: backButtonClasses,
99
+ "aria-label": resolvedBackAriaLabel,
100
+ onClick: handleBack,
101
+ children: /* @__PURE__ */ jsx(BackIcon, {})
102
+ }
103
+ ) : /* @__PURE__ */ jsx(
104
+ Button,
105
+ {
106
+ variant: "ghost",
107
+ size: "sm",
108
+ className: backButtonClasses,
109
+ "aria-label": resolvedBackAriaLabel,
110
+ onClick: handleBack,
111
+ children: /* @__PURE__ */ jsx(BackIcon, {})
112
+ }
113
+ );
114
+ return /* @__PURE__ */ jsxs("header", { ...rest, ref, "data-page-header": "", className: rootClasses, style, children: [
115
+ showHeading ? /* @__PURE__ */ jsxs("div", { className: pageHeaderHeadingRowClasses, "data-page-header-heading": "", children: [
116
+ /* @__PURE__ */ jsxs("div", { className: pageHeaderStartClasses, children: [
117
+ showBackControl ? /* @__PURE__ */ jsx("div", { className: pageHeaderBackWrapClasses, "data-page-header-back": "", children: hasBackOverride ? back : defaultBackControl }) : null,
118
+ hasBreadcrumb || hasTitle || hasSubtitle ? /* @__PURE__ */ jsxs("div", { className: pageHeaderMainClasses, children: [
119
+ hasBreadcrumb ? breadcrumb : null,
120
+ hasTitle || hasSubtitle ? /* @__PURE__ */ jsxs("div", { className: pageHeaderTitleRowClasses, children: [
121
+ hasTitle ? /* @__PURE__ */ jsx("div", { className: pageHeaderTitleClasses, "data-page-header-title": "", children: title }) : null,
122
+ hasSubtitle ? /* @__PURE__ */ jsx("div", { className: pageHeaderSubtitleClasses, "data-page-header-subtitle": "", children: subTitle }) : null
123
+ ] }) : null
124
+ ] }) : null
125
+ ] }),
126
+ hasActions ? /* @__PURE__ */ jsx("div", { className: pageHeaderActionsClasses, "data-page-header-actions": "", children: actions }) : null
127
+ ] }) : null,
128
+ hasBody ? /* @__PURE__ */ jsx("div", { className: pageHeaderContentClasses, children }) : null
129
+ ] });
130
+ }
131
+ );
132
+ PageHeader.displayName = "PageHeader";
133
+ var PageHeader_default = PageHeader;
134
+
135
+ export {
136
+ PageHeader,
137
+ PageHeader_default
138
+ };
@@ -0,0 +1,40 @@
1
+ // src/components/AspectRatio.tsx
2
+ import { forwardRef, useMemo } from "react";
3
+ import {
4
+ getAspectRatioContentClasses,
5
+ getAspectRatioRootClasses,
6
+ getAspectRatioStyle,
7
+ ASPECT_RATIO_DEFAULT
8
+ } from "@expcat/tigercat-core";
9
+ import { jsx } from "react/jsx-runtime";
10
+ var AspectRatio = forwardRef(
11
+ ({
12
+ ratio = ASPECT_RATIO_DEFAULT,
13
+ className,
14
+ contentClassName,
15
+ children,
16
+ style: styleProp,
17
+ ...rest
18
+ }, ref) => {
19
+ const rootClasses = useMemo(() => getAspectRatioRootClasses(className), [className]);
20
+ const contentClasses = useMemo(
21
+ () => getAspectRatioContentClasses(contentClassName),
22
+ [contentClassName]
23
+ );
24
+ const style = useMemo(
25
+ () => ({
26
+ ...getAspectRatioStyle(ratio),
27
+ ...styleProp
28
+ }),
29
+ [ratio, styleProp]
30
+ );
31
+ return /* @__PURE__ */ jsx("div", { ref, "data-aspect-ratio": "", className: rootClasses, style, ...rest, children: /* @__PURE__ */ jsx("div", { "data-aspect-ratio-content": "", className: contentClasses, children }) });
32
+ }
33
+ );
34
+ AspectRatio.displayName = "AspectRatio";
35
+ var AspectRatio_default = AspectRatio;
36
+
37
+ export {
38
+ AspectRatio,
39
+ AspectRatio_default
40
+ };
@@ -28,11 +28,14 @@ import {
28
28
  kanbanSwimlaneCollapsedClasses,
29
29
  kanbanAddColumnClasses,
30
30
  filterColumns,
31
+ filterCards,
31
32
  groupBySwimlane,
32
33
  getColumnCardCount,
33
34
  moveCard,
35
+ mapVisibleCardIndexToSource,
34
36
  reorderColumns,
35
37
  isWipExceeded,
38
+ appendDefaultTaskBoardCard,
36
39
  createTaskBoardDragController,
37
40
  createDefaultDragSnapshot
38
41
  } from "@expcat/tigercat-core";
@@ -343,6 +346,17 @@ var TaskBoard = ({
343
346
  },
344
347
  [onColumnsChange]
345
348
  );
349
+ const consumerOnCardAdd = onCardAdd;
350
+ const showAddCard = Boolean(allowAddCard || consumerOnCardAdd);
351
+ const handleCardAdd = useCallback(
352
+ (columnId) => {
353
+ if (consumerOnCardAdd == null) {
354
+ updateColumns(appendDefaultTaskBoardCard(columnsRef.current, columnId));
355
+ }
356
+ consumerOnCardAdd?.(columnId);
357
+ },
358
+ [consumerOnCardAdd, updateColumns]
359
+ );
346
360
  const [dragSnap, setDragSnap] = useState(createDefaultDragSnapshot);
347
361
  const boardRef = useRef(null);
348
362
  const beforeCardMoveRef = useRef(beforeCardMove);
@@ -355,9 +369,17 @@ var TaskBoard = ({
355
369
  onColumnMoveRef.current = onColumnMove;
356
370
  const enforceWipLimitRef = useRef(enforceWipLimit);
357
371
  enforceWipLimitRef.current = enforceWipLimit;
372
+ const filterTextRef = useRef(filterText);
373
+ filterTextRef.current = filterText;
358
374
  const applyCardMove = useCallback(
359
375
  async (cardId, fromColumnId, toColumnId, toIdx) => {
360
- const result = moveCard(columnsRef.current, cardId, fromColumnId, toColumnId, toIdx, {
376
+ const sourceCol = columnsRef.current.find((c) => c.id === toColumnId);
377
+ const mappedIdx = sourceCol == null ? toIdx : mapVisibleCardIndexToSource(
378
+ sourceCol.cards,
379
+ filterCards(sourceCol.cards, filterTextRef.current),
380
+ toIdx
381
+ );
382
+ const result = moveCard(columnsRef.current, cardId, fromColumnId, toColumnId, mappedIdx, {
361
383
  enforceWipLimit: enforceWipLimitRef.current
362
384
  });
363
385
  if (!result) return;
@@ -442,7 +464,7 @@ var TaskBoard = ({
442
464
  renderColumnHeader,
443
465
  renderColumnFooter,
444
466
  renderEmptyColumn,
445
- onCardAdd,
467
+ onCardAdd: showAddCard ? handleCardAdd : void 0,
446
468
  dragType,
447
469
  dragCtrl,
448
470
  dragStateId,
@@ -9,13 +9,28 @@ import {
9
9
  floatButtonSizeClasses,
10
10
  floatButtonTypeClasses,
11
11
  floatButtonDisabledClasses,
12
- floatButtonGroupClasses,
12
+ floatButtonIconSizeClasses,
13
+ floatButtonPlusIconPath,
14
+ getFloatButtonGroupClasses,
13
15
  getViewportOffsetStyle,
14
16
  viewportFloatingBaseClasses,
15
17
  viewportPlacementClasses
16
18
  } from "@expcat/tigercat-core";
17
19
  import { jsx, jsxs } from "react/jsx-runtime";
18
20
  var FloatButtonGroupContext = createContext(null);
21
+ var DefaultPlusIcon = ({ size }) => /* @__PURE__ */ jsx(
22
+ "svg",
23
+ {
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ fill: "none",
26
+ viewBox: "0 0 24 24",
27
+ stroke: "currentColor",
28
+ strokeWidth: 2,
29
+ className: floatButtonIconSizeClasses[size],
30
+ "aria-hidden": "true",
31
+ children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: floatButtonPlusIconPath })
32
+ }
33
+ );
19
34
  var FloatButton = ({
20
35
  shape,
21
36
  size = "md",
@@ -58,11 +73,11 @@ var FloatButton = ({
58
73
  type: "button",
59
74
  disabled,
60
75
  style: buttonStyle,
61
- "aria-label": ariaLabel ?? tooltip,
76
+ "aria-label": children != null ? ariaLabel ?? tooltip : ariaLabel ?? tooltip ?? "Add",
62
77
  title: tooltip,
63
78
  onClick: disabled ? void 0 : onClick,
64
79
  ...props,
65
- children
80
+ children: children ?? /* @__PURE__ */ jsx(DefaultPlusIcon, { size })
66
81
  }
67
82
  );
68
83
  };
@@ -74,6 +89,10 @@ var FloatButtonGroup = ({
74
89
  children,
75
90
  className,
76
91
  onOpenChange,
92
+ placement = "bottom-right",
93
+ offset,
94
+ portal = true,
95
+ style,
77
96
  ...props
78
97
  }) => {
79
98
  const groupContextValue = useMemo(() => ({ shape: groupShape }), [groupShape]);
@@ -92,12 +111,20 @@ var FloatButtonGroup = ({
92
111
  setInternalOpen(false);
93
112
  onOpenChange?.(false);
94
113
  }, [onOpenChange]);
95
- const groupClasses = useMemo(() => classNames(floatButtonGroupClasses, className), [className]);
96
- if (!isBrowser()) return null;
114
+ const groupClasses = useMemo(
115
+ () => classNames(getFloatButtonGroupClasses({ placement, portal }), className),
116
+ [placement, portal, className]
117
+ );
118
+ const groupStyle = useMemo(
119
+ () => ({ ...getViewportOffsetStyle(placement, offset), ...style }),
120
+ [placement, offset, style]
121
+ );
122
+ if (portal && !isBrowser()) return null;
97
123
  const content = /* @__PURE__ */ jsx(FloatButtonGroupContext.Provider, { value: groupContextValue, children: /* @__PURE__ */ jsxs(
98
124
  "div",
99
125
  {
100
126
  className: groupClasses,
127
+ style: groupStyle,
101
128
  onMouseEnter: trigger === "hover" ? handleMouseEnter : void 0,
102
129
  onMouseLeave: trigger === "hover" ? handleMouseLeave : void 0,
103
130
  ...props,
@@ -107,7 +134,7 @@ var FloatButtonGroup = ({
107
134
  ]
108
135
  }
109
136
  ) });
110
- return ReactDOM.createPortal(content, document.body);
137
+ return portal ? ReactDOM.createPortal(content, document.body) : content;
111
138
  };
112
139
 
113
140
  export {