@expcat/tigercat-react 2.1.0 → 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 (137) hide show
  1. package/dist/{chunk-RUAPTIQ7.mjs → chunk-246DAUEF.mjs} +2 -2
  2. package/dist/{chunk-PU3JY6RE.mjs → chunk-2JMI7TCM.mjs} +1 -1
  3. package/dist/chunk-2YBLMVDT.mjs +428 -0
  4. package/dist/{chunk-25D5TXZH.mjs → chunk-32MCQMBJ.mjs} +8 -6
  5. package/dist/{chunk-M5MZWOHF.mjs → chunk-3HHEVMHE.mjs} +1 -1
  6. package/dist/{chunk-HSBN5MLS.mjs → chunk-3LACOSJQ.mjs} +1 -1
  7. package/dist/{chunk-F6WV53BS.mjs → chunk-3LDDXHW2.mjs} +28 -11
  8. package/dist/{chunk-IXQAECFP.mjs → chunk-3QNIFKVF.mjs} +12 -14
  9. package/dist/{chunk-UD4DTVJZ.mjs → chunk-4C2X5PZO.mjs} +57 -25
  10. package/dist/chunk-5JETWHLJ.mjs +28 -0
  11. package/dist/{chunk-VA6PZWOH.mjs → chunk-5SEMRHBD.mjs} +14 -6
  12. package/dist/{chunk-EKILTLUO.mjs → chunk-72CJNKDY.mjs} +1 -1
  13. package/dist/{chunk-XE4YFBOZ.mjs → chunk-AUD3VOLO.mjs} +1 -1
  14. package/dist/{chunk-I4MWOYJS.mjs → chunk-AYFKHWJS.mjs} +13 -7
  15. package/dist/{chunk-RPSHILHD.mjs → chunk-BXAH2GH3.mjs} +8 -2
  16. package/dist/{chunk-EW5EO7VE.mjs → chunk-BYD7EAWK.mjs} +1 -1
  17. package/dist/{chunk-GCY55TBC.mjs → chunk-CQOLQAB5.mjs} +105 -90
  18. package/dist/{chunk-L55UK45A.mjs → chunk-CRIEUKMD.mjs} +5 -2
  19. package/dist/{chunk-DKNVSQSV.mjs → chunk-CUAXRBKO.mjs} +12 -0
  20. package/dist/{chunk-NWVNTZOP.mjs → chunk-DECUASRW.mjs} +14 -16
  21. package/dist/{chunk-XMTEMBQV.mjs → chunk-EAAWB3CK.mjs} +16 -13
  22. package/dist/{chunk-IR7VA6AO.mjs → chunk-EG7EMDKK.mjs} +1 -1
  23. package/dist/{chunk-HOYBHB7B.mjs → chunk-FNK2VWPP.mjs} +1 -1
  24. package/dist/{chunk-RJPNBYK5.mjs → chunk-FQS24AUH.mjs} +12 -3
  25. package/dist/{chunk-LADKKOJT.mjs → chunk-GBEDWXLL.mjs} +16 -10
  26. package/dist/{chunk-2ENQZECC.mjs → chunk-HAXRHSCN.mjs} +4 -3
  27. package/dist/{chunk-K4GIKSZE.mjs → chunk-I2BENK5X.mjs} +2 -1
  28. package/dist/{chunk-DNOPEJ5I.mjs → chunk-JZZPLKTW.mjs} +7 -4
  29. package/dist/{chunk-7KCQMXJA.mjs → chunk-KDURW5AS.mjs} +4 -3
  30. package/dist/{chunk-TFMEHUVZ.mjs → chunk-KKN7KLTB.mjs} +0 -1
  31. package/dist/{chunk-6MGQAJ62.mjs → chunk-KL6YJIZ3.mjs} +24 -7
  32. package/dist/{chunk-PFL4HNWM.mjs → chunk-M6ZPTGBV.mjs} +1 -2
  33. package/dist/{chunk-PXRZ6CKY.mjs → chunk-MJVSZ2UJ.mjs} +46 -16
  34. package/dist/{chunk-LZKBDQE4.mjs → chunk-MYI3FPG4.mjs} +23 -4
  35. package/dist/{chunk-OIGEBCAS.mjs → chunk-NADODEZX.mjs} +69 -1
  36. package/dist/{chunk-UKY2EPS3.mjs → chunk-NJWTZ5MO.mjs} +54 -42
  37. package/dist/{chunk-773LH7BK.mjs → chunk-O6VYD4E4.mjs} +24 -2
  38. package/dist/{chunk-G7D4QV7A.mjs → chunk-O7TV5OKS.mjs} +33 -6
  39. package/dist/{chunk-DPWRXXXW.mjs → chunk-OJ6SHHOZ.mjs} +3 -3
  40. package/dist/{chunk-UYJJLHVA.mjs → chunk-PMQJ6AYT.mjs} +23 -21
  41. package/dist/{chunk-KC55B62J.mjs → chunk-PY2VUNEJ.mjs} +143 -46
  42. package/dist/{chunk-BEJZPJIK.mjs → chunk-QOAOOD53.mjs} +10 -4
  43. package/dist/{chunk-JQJM65RJ.mjs → chunk-QU3QXUTC.mjs} +49 -23
  44. package/dist/{chunk-7EMCZVJ2.mjs → chunk-QXSUG7SN.mjs} +3 -3
  45. package/dist/{chunk-RQ4PUK6G.mjs → chunk-R7YZ6FKP.mjs} +24 -13
  46. package/dist/{chunk-YI6YWH66.mjs → chunk-RE5ZLA5D.mjs} +6 -6
  47. package/dist/{chunk-UCBW5RJN.mjs → chunk-RGVU4EMA.mjs} +11 -6
  48. package/dist/{chunk-IBSOUQGB.mjs → chunk-RRGPDFDI.mjs} +7 -4
  49. package/dist/{chunk-ZH5ZBLAN.mjs → chunk-RUQ3F3MV.mjs} +34 -7
  50. package/dist/{chunk-PGD5RPKF.mjs → chunk-SVIJ2UZA.mjs} +2 -1
  51. package/dist/{chunk-UETARXIK.mjs → chunk-SXWEFZOF.mjs} +246 -53
  52. package/dist/{chunk-H6MVW5YD.mjs → chunk-TEVEXDY2.mjs} +24 -13
  53. package/dist/{chunk-DJOFM2VO.mjs → chunk-TO6MZFNQ.mjs} +52 -40
  54. package/dist/{chunk-ZCGIZOMT.mjs → chunk-V7HJ5HLC.mjs} +6 -10
  55. package/dist/{chunk-SIDDYP3O.mjs → chunk-VJWSKJLJ.mjs} +1 -1
  56. package/dist/{chunk-ZG56T75O.mjs → chunk-WTHWLCRL.mjs} +51 -11
  57. package/dist/{chunk-KP6DEYWB.mjs → chunk-X4L3W7RQ.mjs} +1 -1
  58. package/dist/{chunk-ZMRTETN2.mjs → chunk-X6C6MNG5.mjs} +4 -3
  59. package/dist/{chunk-OGG2TQDG.mjs → chunk-XVHTJQ4T.mjs} +12 -1
  60. package/dist/{chunk-FSMJLJFL.mjs → chunk-Y6UH3EKE.mjs} +1 -1
  61. package/dist/chunk-YJ5T4XZN.mjs +81 -0
  62. package/dist/{chunk-VVNFXJMN.mjs → chunk-YNDPQVEK.mjs} +8 -1
  63. package/dist/{chunk-QGZ32NFQ.mjs → chunk-Z23KOLNU.mjs} +4 -3
  64. package/dist/{chunk-5CKMYMTS.mjs → chunk-ZATZRXMW.mjs} +27 -8
  65. package/dist/components/ActivityFeed.mjs +2 -2
  66. package/dist/components/Affix.mjs +1 -1
  67. package/dist/components/Anchor.mjs +1 -1
  68. package/dist/components/AreaChart.mjs +4 -3
  69. package/dist/components/AutoComplete.mjs +1 -1
  70. package/dist/components/BarChart.mjs +4 -3
  71. package/dist/components/Calendar.mjs +1 -1
  72. package/dist/components/Cascader.mjs +1 -1
  73. package/dist/components/ChartCanvas.mjs +1 -1
  74. package/dist/components/ChatWindow.mjs +3 -3
  75. package/dist/components/Code.mjs +3 -1
  76. package/dist/components/CollapsePanel.mjs +1 -1
  77. package/dist/components/ColorPicker.mjs +1 -1
  78. package/dist/components/CommentThread.mjs +2 -2
  79. package/dist/components/DataExport.mjs +2 -2
  80. package/dist/components/DataTableWithToolbar.mjs +6 -6
  81. package/dist/components/DonutChart.mjs +4 -4
  82. package/dist/components/Dropdown.mjs +1 -1
  83. package/dist/components/FileManager.mjs +2 -1
  84. package/dist/components/FloatButton.mjs +1 -1
  85. package/dist/components/FormItem.mjs +1 -1
  86. package/dist/components/FormWizard.mjs +1 -1
  87. package/dist/components/FunnelChart.mjs +3 -3
  88. package/dist/components/Gantt.d.mts +3 -1
  89. package/dist/components/Gantt.mjs +2 -2
  90. package/dist/components/GaugeChart.mjs +2 -2
  91. package/dist/components/HeatmapChart.mjs +3 -3
  92. package/dist/components/Image.mjs +4 -4
  93. package/dist/components/ImageGroup.mjs +2 -2
  94. package/dist/components/ImagePreview.mjs +1 -1
  95. package/dist/components/Input.mjs +1 -1
  96. package/dist/components/InputNumber.d.mts +1 -1
  97. package/dist/components/InputNumber.mjs +1 -1
  98. package/dist/components/Kanban.mjs +2 -2
  99. package/dist/components/LineChart.mjs +4 -3
  100. package/dist/components/List.mjs +2 -2
  101. package/dist/components/Loading.mjs +1 -1
  102. package/dist/components/MaskInput.mjs +1 -1
  103. package/dist/components/NotificationCenter.mjs +4 -4
  104. package/dist/components/OrgChart.mjs +2 -2
  105. package/dist/components/Pagination.mjs +1 -1
  106. package/dist/components/PieChart.mjs +3 -3
  107. package/dist/components/Popconfirm.mjs +2 -2
  108. package/dist/components/Popover.mjs +2 -2
  109. package/dist/components/QRCode.d.mts +2 -2
  110. package/dist/components/QRCode.mjs +1 -1
  111. package/dist/components/RadarChart.mjs +3 -3
  112. package/dist/components/Rate.mjs +1 -1
  113. package/dist/components/ScatterChart.mjs +4 -3
  114. package/dist/components/ScrollSpy.mjs +1 -1
  115. package/dist/components/Signature.mjs +1 -1
  116. package/dist/components/SplitButton.mjs +2 -2
  117. package/dist/components/Splitter.mjs +1 -1
  118. package/dist/components/Stepper.d.mts +2 -0
  119. package/dist/components/Stepper.mjs +2 -1
  120. package/dist/components/SunburstChart.mjs +3 -3
  121. package/dist/components/Switch.d.mts +5 -1
  122. package/dist/components/Switch.mjs +2 -1
  123. package/dist/components/Table.mjs +2 -2
  124. package/dist/components/TaskBoard.mjs +1 -1
  125. package/dist/components/Textarea.mjs +1 -1
  126. package/dist/components/Tooltip.mjs +2 -2
  127. package/dist/components/Tour.mjs +1 -1
  128. package/dist/components/TreeMapChart.mjs +3 -3
  129. package/dist/components/TreeSelect.mjs +1 -1
  130. package/dist/components/Upload.mjs +1 -1
  131. package/dist/hooks/useChartInteraction.d.mts +5 -0
  132. package/dist/hooks/useChartInteraction.mjs +1 -1
  133. package/dist/index.d.mts +1 -1
  134. package/dist/index.mjs +51 -0
  135. package/package.json +2 -2
  136. package/dist/chunk-CB4SK5AU.mjs +0 -235
  137. package/dist/chunk-KPACLRQH.mjs +0 -55
@@ -4,26 +4,32 @@ import {
4
4
  } from "./chunk-Z3CRHC5F.mjs";
5
5
  import {
6
6
  List
7
- } from "./chunk-FSMJLJFL.mjs";
7
+ } from "./chunk-Y6UH3EKE.mjs";
8
8
  import {
9
9
  Button
10
10
  } from "./chunk-5TE7KLE5.mjs";
11
11
  import {
12
12
  Loading
13
- } from "./chunk-K4GIKSZE.mjs";
13
+ } from "./chunk-I2BENK5X.mjs";
14
14
  import {
15
15
  Text
16
16
  } from "./chunk-HLS4CHWX.mjs";
17
17
  import {
18
18
  Card
19
19
  } from "./chunk-IXV5YBCZ.mjs";
20
+ import {
21
+ useTigerConfig
22
+ } from "./chunk-YSIXURBW.mjs";
20
23
 
21
24
  // src/components/NotificationCenter.tsx
22
25
  import { useMemo, useEffect, useState, useCallback } from "react";
23
26
  import {
24
27
  classNames,
25
28
  buildNotificationGroups,
26
- formatActivityTime
29
+ formatActivityTime,
30
+ getNotificationCenterLabels,
31
+ mergeTigerLocale,
32
+ resolveLocaleText
27
33
  } from "@expcat/tigercat-core";
28
34
 
29
35
  // ../core/src/internal/notification-center-styles.ts
@@ -75,15 +81,17 @@ var NotificationCenter = ({
75
81
  readFilter,
76
82
  defaultReadFilter = "all",
77
83
  loading = false,
78
- loadingText = "\u52A0\u8F7D\u4E2D...",
79
- emptyText = "\u6682\u65E0\u901A\u77E5",
80
- title = "\u901A\u77E5\u4E2D\u5FC3",
81
- allLabel = "\u5168\u90E8",
82
- unreadLabel = "\u672A\u8BFB",
83
- readLabel = "\u5DF2\u8BFB",
84
- markAllReadText = "\u5168\u90E8\u6807\u8BB0\u5DF2\u8BFB",
85
- markReadText = "\u6807\u8BB0\u5DF2\u8BFB",
86
- markUnreadText = "\u6807\u8BB0\u672A\u8BFB",
84
+ loadingText,
85
+ emptyText,
86
+ title,
87
+ allLabel,
88
+ unreadLabel,
89
+ readLabel,
90
+ markAllReadText,
91
+ markReadText,
92
+ markUnreadText,
93
+ locale,
94
+ labels: labelsOverride,
87
95
  manageReadState = false,
88
96
  onGroupChange,
89
97
  onReadFilterChange,
@@ -93,6 +101,24 @@ var NotificationCenter = ({
93
101
  className,
94
102
  ...props
95
103
  }) => {
104
+ const config = useTigerConfig();
105
+ const mergedLocale = useMemo(
106
+ () => mergeTigerLocale(config.locale, locale),
107
+ [config.locale, locale]
108
+ );
109
+ const labels = useMemo(
110
+ () => getNotificationCenterLabels(mergedLocale, labelsOverride),
111
+ [mergedLocale, labelsOverride]
112
+ );
113
+ const resolvedTitle = resolveLocaleText(labels.title, title);
114
+ const resolvedEmptyText = resolveLocaleText(labels.emptyText, emptyText);
115
+ const resolvedLoadingText = resolveLocaleText(labels.loadingText, loadingText);
116
+ const resolvedAllLabel = resolveLocaleText(labels.allLabel, allLabel);
117
+ const resolvedUnreadLabel = resolveLocaleText(labels.unreadLabel, unreadLabel);
118
+ const resolvedReadLabel = resolveLocaleText(labels.readLabel, readLabel);
119
+ const resolvedMarkAllReadText = resolveLocaleText(labels.markAllReadText, markAllReadText);
120
+ const resolvedMarkReadText = resolveLocaleText(labels.markReadText, markReadText);
121
+ const resolvedMarkUnreadText = resolveLocaleText(labels.markUnreadText, markUnreadText);
96
122
  const resolvedGroups = useMemo(
97
123
  () => buildNotificationGroups(items, groups, groupBy, groupOrder),
98
124
  [items, groups, groupBy, groupOrder]
@@ -168,11 +194,11 @@ var NotificationCenter = ({
168
194
  );
169
195
  const filterButtons = useMemo(
170
196
  () => [
171
- { key: "all", label: allLabel },
172
- { key: "unread", label: unreadLabel },
173
- { key: "read", label: readLabel }
197
+ { key: "all", label: resolvedAllLabel },
198
+ { key: "unread", label: resolvedUnreadLabel },
199
+ { key: "read", label: resolvedReadLabel }
174
200
  ],
175
- [allLabel, unreadLabel, readLabel]
201
+ [resolvedAllLabel, resolvedUnreadLabel, resolvedReadLabel]
176
202
  );
177
203
  const groupTabData = useMemo(
178
204
  () => resolvedGroups.map((group, index) => {
@@ -270,7 +296,7 @@ var NotificationCenter = ({
270
296
  }
271
297
  onItemReadChange?.(item, !isRead);
272
298
  },
273
- children: isRead ? markUnreadText : markReadText
299
+ children: isRead ? resolvedMarkUnreadText : resolvedMarkReadText
274
300
  }
275
301
  )
276
302
  ]
@@ -298,7 +324,7 @@ var NotificationCenter = ({
298
324
  )
299
325
  }
300
326
  ) }),
301
- /* @__PURE__ */ jsx(Text, { tag: "div", size: "sm", color: "muted", className: notificationCenterEmptyTextClasses, children: emptyText })
327
+ /* @__PURE__ */ jsx(Text, { tag: "div", size: "sm", color: "muted", className: notificationCenterEmptyTextClasses, children: resolvedEmptyText })
302
328
  ] });
303
329
  }
304
330
  return /* @__PURE__ */ jsx(
@@ -308,13 +334,13 @@ var NotificationCenter = ({
308
334
  split: true,
309
335
  bordered: "divided",
310
336
  hoverable: true,
311
- emptyText,
337
+ emptyText: resolvedEmptyText,
312
338
  onItemClick: (item, index) => onItemClick?.(item, index),
313
339
  renderItem
314
340
  }
315
341
  );
316
342
  };
317
- const content = loading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ jsx(Loading, { text: loadingText, className: notificationCenterLoadingClasses }) }) : resolvedGroups.length > 0 ? /* @__PURE__ */ jsx("div", { className: "-mx-4 -mb-4", children: /* @__PURE__ */ jsx(
343
+ const content = loading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-16", children: /* @__PURE__ */ jsx(Loading, { text: resolvedLoadingText, className: notificationCenterLoadingClasses }) }) : resolvedGroups.length > 0 ? /* @__PURE__ */ jsx("div", { className: "-mx-4 -mb-4", children: /* @__PURE__ */ jsx(
318
344
  Tabs,
319
345
  {
320
346
  type: "line",
@@ -329,7 +355,7 @@ var NotificationCenter = ({
329
355
  {
330
356
  className: wrapperClasses,
331
357
  role: props.role ?? "region",
332
- "aria-label": props["aria-label"] ?? (props["aria-labelledby"] ? void 0 : title),
358
+ "aria-label": props["aria-label"] ?? (props["aria-labelledby"] ? void 0 : resolvedTitle),
333
359
  ...props,
334
360
  "data-tiger-notification-center": true,
335
361
  children: /* @__PURE__ */ jsx(
@@ -347,7 +373,7 @@ var NotificationCenter = ({
347
373
  size: "base",
348
374
  weight: "bold",
349
375
  className: notificationCenterTitleClasses,
350
- children: title
376
+ children: resolvedTitle
351
377
  }
352
378
  ),
353
379
  totalUnread > 0 ? /* @__PURE__ */ jsx("span", { className: notificationCenterUnreadBadgeClasses, children: totalUnread }) : null
@@ -363,7 +389,7 @@ var NotificationCenter = ({
363
389
  notificationCenterMarkAllBaseClasses,
364
390
  hasUnread ? notificationCenterMarkAllEnabledClasses : notificationCenterMarkAllDisabledClasses
365
391
  ),
366
- children: markAllReadText
392
+ children: resolvedMarkAllReadText
367
393
  }
368
394
  )
369
395
  ] }),
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  Table
3
- } from "./chunk-GCY55TBC.mjs";
3
+ } from "./chunk-CQOLQAB5.mjs";
4
4
  import {
5
5
  Select
6
6
  } from "./chunk-KVCI2346.mjs";
7
7
  import {
8
8
  Popover
9
- } from "./chunk-HOYBHB7B.mjs";
9
+ } from "./chunk-FNK2VWPP.mjs";
10
10
  import {
11
11
  Input
12
- } from "./chunk-F6WV53BS.mjs";
12
+ } from "./chunk-3LDDXHW2.mjs";
13
13
  import {
14
14
  Checkbox
15
15
  } from "./chunk-EPWAROC2.mjs";
@@ -1,6 +1,9 @@
1
+ import {
2
+ useResponsiveChartSize
3
+ } from "./chunk-5JETWHLJ.mjs";
1
4
  import {
2
5
  useChartInteraction
3
- } from "./chunk-DNOPEJ5I.mjs";
6
+ } from "./chunk-JZZPLKTW.mjs";
4
7
  import {
5
8
  ChartSeries
6
9
  } from "./chunk-SDLMB34Y.mjs";
@@ -12,7 +15,7 @@ import {
12
15
  } from "./chunk-RQSQXQN6.mjs";
13
16
  import {
14
17
  ChartCanvas
15
- } from "./chunk-DKNVSQSV.mjs";
18
+ } from "./chunk-CUAXRBKO.mjs";
16
19
  import {
17
20
  ChartGrid
18
21
  } from "./chunk-677VSTPW.mjs";
@@ -29,7 +32,6 @@ import {
29
32
  createLinePath,
30
33
  createPointScale,
31
34
  getChartElementOpacity,
32
- getChartInnerRect,
33
35
  getStableChartGradientPrefix,
34
36
  getNumberExtent,
35
37
  linePointTransitionClasses,
@@ -111,9 +113,11 @@ var AreaChart = ({
111
113
  () => getStableChartGradientPrefix("area", gradientId),
112
114
  [gradientId]
113
115
  );
114
- const innerRect = useMemo(
115
- () => getChartInnerRect(width, height, padding),
116
- [width, height, padding]
116
+ const { innerRect, onResolvedSizeChange } = useResponsiveChartSize(
117
+ width,
118
+ height,
119
+ padding,
120
+ responsive
117
121
  );
118
122
  const resolvedSeries = useMemo(
119
123
  () => resolveSeriesData(series, data, {
@@ -135,6 +139,7 @@ var AreaChart = ({
135
139
  wrapperClasses
136
140
  } = useChartInteraction({
137
141
  hoverable,
142
+ showTooltip,
138
143
  hoveredIndexProp,
139
144
  selectable,
140
145
  selectedIndexProp,
@@ -287,17 +292,21 @@ var AreaChart = ({
287
292
  (seriesIndex, pointIndex, event) => {
288
293
  setHoveredPointInfo({ seriesIndex, pointIndex });
289
294
  setTooltipPosition({ x: event.clientX, y: event.clientY });
290
- onPointHover?.(seriesIndex, pointIndex, resolvedSeries[seriesIndex]?.data[pointIndex]);
295
+ if (hoverable) {
296
+ onPointHover?.(seriesIndex, pointIndex, resolvedSeries[seriesIndex]?.data[pointIndex]);
297
+ }
291
298
  },
292
- [onPointHover, resolvedSeries]
299
+ [hoverable, onPointHover, resolvedSeries]
293
300
  );
294
301
  const handlePointMouseMove = useCallback((event) => {
295
302
  setTooltipPosition({ x: event.clientX, y: event.clientY });
296
303
  }, []);
297
304
  const handlePointMouseLeave = useCallback(() => {
298
305
  setHoveredPointInfo(null);
299
- onPointHover?.(null, null, null);
300
- }, [onPointHover]);
306
+ if (hoverable) {
307
+ onPointHover?.(null, null, null);
308
+ }
309
+ }, [hoverable, onPointHover]);
301
310
  const showPointTooltipFromElement = useCallback(
302
311
  (el, seriesIndex, pointIndex) => {
303
312
  if (!hoverable) return;
@@ -325,6 +334,7 @@ var AreaChart = ({
325
334
  [selectable, handleSeriesSelect]
326
335
  );
327
336
  const pointClickable = selectable || !!onPointClick;
337
+ const trackPointHover = showTooltip || hoverable;
328
338
  const reversedSeriesData = useMemo(() => [...seriesData].reverse(), [seriesData]);
329
339
  const chart = /* @__PURE__ */ jsxs(
330
340
  ChartCanvas,
@@ -336,6 +346,7 @@ var AreaChart = ({
336
346
  title,
337
347
  desc,
338
348
  className: classNames(className),
349
+ onResolvedSizeChange,
339
350
  children: [
340
351
  (gradient || animated || strokeGradient || pointGradient) && /* @__PURE__ */ jsxs("defs", { children: [
341
352
  animated && /* @__PURE__ */ jsx("style", { children: `
@@ -518,9 +529,9 @@ var AreaChart = ({
518
529
  tabIndex: pointInteractive ? 0 : void 0,
519
530
  "data-point-index": point.pointIndex,
520
531
  "data-series-key": sd.seriesKey,
521
- onMouseEnter: hoverable ? (e) => handlePointMouseEnter(sd.seriesIndex, point.pointIndex, e) : void 0,
522
- onMouseMove: hoverable ? handlePointMouseMove : void 0,
523
- onMouseLeave: hoverable ? handlePointMouseLeave : void 0,
532
+ onMouseEnter: trackPointHover ? (e) => handlePointMouseEnter(sd.seriesIndex, point.pointIndex, e) : void 0,
533
+ onMouseMove: trackPointHover ? handlePointMouseMove : void 0,
534
+ onMouseLeave: trackPointHover ? handlePointMouseLeave : void 0,
524
535
  onClick: pointClickable ? (e) => {
525
536
  e.stopPropagation();
526
537
  handlePointClick(sd.seriesIndex, point.pointIndex);
@@ -44,6 +44,7 @@ var DropdownMenu = ({
44
44
  var DropdownItem = ({
45
45
  disabled = false,
46
46
  divided = false,
47
+ closeOnClick,
47
48
  className,
48
49
  onClick,
49
50
  children,
@@ -56,8 +57,9 @@ var DropdownItem = ({
56
57
  return;
57
58
  }
58
59
  onClick?.(event);
59
- if (context?.closeOnClick) {
60
- context.handleItemClick();
60
+ const shouldClose = closeOnClick ?? context?.closeOnClick ?? true;
61
+ if (shouldClose) {
62
+ context?.handleItemClick();
61
63
  }
62
64
  };
63
65
  const itemClasses = classNames(getDropdownItemClasses(disabled, divided), className);
@@ -129,10 +131,8 @@ var Dropdown = ({
129
131
  [disabled, visible, controlledOpen, onOpenChange]
130
132
  );
131
133
  const handleItemClick = useCallback(() => {
132
- if (closeOnClick) {
133
- setVisible(false);
134
- }
135
- }, [closeOnClick, setVisible]);
134
+ setVisible(false);
135
+ }, [setVisible]);
136
136
  const handleMouseEnter = useCallback(() => {
137
137
  if (trigger !== "hover") return;
138
138
  if (hoverTimerRef.current) {
@@ -33,7 +33,7 @@ import {
33
33
  getPictureCardClasses,
34
34
  getUploadStatusIconClasses
35
35
  } from "@expcat/tigercat-core";
36
- import { jsx, jsxs } from "react/jsx-runtime";
36
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
37
37
  var spinnerSvg = getSpinnerSVG("spinner");
38
38
  var Upload = ({
39
39
  accept,
@@ -133,6 +133,11 @@ var Upload = ({
133
133
  onExceed?.(prepared.rejectedExceedFiles, fileList);
134
134
  }
135
135
  let nextFileList = [...fileList];
136
+ const notifyFileList = (file) => {
137
+ const nextList = [...nextFileList];
138
+ updateFileList(nextList);
139
+ onChange?.(file, nextList);
140
+ };
136
141
  for (const file of prepared.acceptedFiles) {
137
142
  const uploadFile = fileToUploadFile(file);
138
143
  nextFileList = [...nextFileList, uploadFile];
@@ -141,7 +146,7 @@ var Upload = ({
141
146
  onChange(uploadFile, nextFileList);
142
147
  }
143
148
  if (autoUpload && !queue) {
144
- await uploadOne(file, uploadFile, () => updateFileList([...nextFileList]));
149
+ await uploadOne(file, uploadFile, () => notifyFileList(uploadFile));
145
150
  }
146
151
  }
147
152
  if (autoUpload && queue) {
@@ -154,7 +159,7 @@ var Upload = ({
154
159
  async (item) => {
155
160
  const uploadFile = nextFileList.find((candidate) => candidate.uid === item.id);
156
161
  if (!uploadFile) return;
157
- await uploadOne(item.file, uploadFile, () => updateFileList([...nextFileList]));
162
+ await uploadOne(item.file, uploadFile, () => notifyFileList(uploadFile));
158
163
  },
159
164
  { concurrency: maxConcurrent, onChange: onQueueChange }
160
165
  );
@@ -266,7 +271,7 @@ var Upload = ({
266
271
  };
267
272
  const renderUploadButton = () => {
268
273
  if (drag) {
269
- return /* @__PURE__ */ jsxs(
274
+ return /* @__PURE__ */ jsx(
270
275
  "div",
271
276
  {
272
277
  className: getDragAreaClasses(isDragging, disabled),
@@ -279,7 +284,7 @@ var Upload = ({
279
284
  tabIndex: disabled ? -1 : 0,
280
285
  "aria-disabled": disabled,
281
286
  "aria-label": labels.dragAreaAriaLabel,
282
- children: [
287
+ children: children || /* @__PURE__ */ jsxs(Fragment, { children: [
283
288
  /* @__PURE__ */ jsx(
284
289
  "svg",
285
290
  {
@@ -308,7 +313,7 @@ var Upload = ({
308
313
  maxSize && /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-500", children: interpolateUploadLabel(labels.maxSizeInfoText, {
309
314
  maxSize: formatFileSize(maxSize)
310
315
  }) })
311
- ]
316
+ ] })
312
317
  }
313
318
  );
314
319
  }
@@ -155,14 +155,17 @@ var FormWizard = ({
155
155
  ]);
156
156
  const handleStepChange = useCallback(
157
157
  async (nextIndex) => {
158
- if (nextIndex === currentIndex || steps[nextIndex]?.disabled) return;
159
- if (nextIndex > currentIndex) {
158
+ if (nextIndex === currentIndex) return;
159
+ const direction2 = nextIndex > currentIndex ? 1 : -1;
160
+ if (direction2 === 1) {
160
161
  const ok = await runBeforeNext();
161
162
  if (!ok) return;
162
163
  }
163
- setCurrent(nextIndex);
164
+ const target = findNextUnskipped(nextIndex, direction2);
165
+ if (target === currentIndex) return;
166
+ setCurrent(target);
164
167
  },
165
- [currentIndex, runBeforeNext, setCurrent, steps]
168
+ [currentIndex, runBeforeNext, setCurrent, findNextUnskipped]
166
169
  );
167
170
  const contentNode = useMemo(() => {
168
171
  if (!currentStep) return null;
@@ -21,6 +21,25 @@ import {
21
21
  getFormItemAsteriskClasses
22
22
  } from "@expcat/tigercat-core";
23
23
  import { jsx, jsxs } from "react/jsx-runtime";
24
+ function isEventTarget(value) {
25
+ return value !== null && typeof value === "object";
26
+ }
27
+ function extractFormChangeValue(argument) {
28
+ if (argument === void 0) {
29
+ return { found: false };
30
+ }
31
+ if (argument !== null && typeof argument === "object" && "target" in argument) {
32
+ const target = argument.target;
33
+ if (isEventTarget(target)) {
34
+ const type = typeof target.type === "string" ? target.type.toLowerCase() : "";
35
+ if (type === "checkbox" || type === "radio") {
36
+ return { found: true, value: target.checked };
37
+ }
38
+ return { found: true, value: target.value };
39
+ }
40
+ }
41
+ return { found: true, value: argument };
42
+ }
24
43
  function hasRequiredRule(maybeRules) {
25
44
  if (!maybeRules) return false;
26
45
  const ruleArr = Array.isArray(maybeRules) ? maybeRules : [maybeRules];
@@ -129,11 +148,19 @@ var FormItem = ({
129
148
  formContext.validateField(name, rules, "blur");
130
149
  }
131
150
  }, [name, formContext, rules]);
132
- const handleChange = useCallback(() => {
133
- if (name && formContext) {
151
+ const handleChange = useCallback(
152
+ (argument) => {
153
+ if (!name || !formContext) {
154
+ return;
155
+ }
156
+ const extracted = extractFormChangeValue(argument);
157
+ if (extracted.found) {
158
+ formContext.updateValue(name, extracted.value);
159
+ }
134
160
  formContext.validateField(name, rules, "change");
135
- }
136
- }, [name, formContext, rules]);
161
+ },
162
+ [name, formContext, rules]
163
+ );
137
164
  const hasError = !!errorMessage;
138
165
  const popupErrorVisible = showMessage && hasError && errorDisplayMode === "popup";
139
166
  const overlay = useAnchoredOverlay({
@@ -172,9 +199,9 @@ var FormItem = ({
172
199
  onlyChild.props.onBlur?.(event);
173
200
  handleBlur();
174
201
  },
175
- onChange: (event) => {
176
- onlyChild.props.onChange?.(event);
177
- handleChange();
202
+ onChange: (...args) => {
203
+ onlyChild.props.onChange?.(...args);
204
+ handleChange(args[0]);
178
205
  }
179
206
  };
180
207
  if (!isNativeElement) {
@@ -7,6 +7,7 @@ import { useState, useMemo, useCallback } from "react";
7
7
  import {
8
8
  rateBaseClasses,
9
9
  getRateStarClasses,
10
+ rateHalfStarInnerClasses,
10
11
  rateActiveColor,
11
12
  rateInactiveColor,
12
13
  rateHoverColor,
@@ -126,7 +127,7 @@ var Rate = ({
126
127
  isHovering ? rateHoverColor : rateActiveColor
127
128
  ),
128
129
  style: { width: "50%" },
129
- children: isChar ? /* @__PURE__ */ jsx("span", { children: character }) : starIcon
130
+ children: isChar ? /* @__PURE__ */ jsx("span", { className: rateHalfStarInnerClasses, children: character }) : /* @__PURE__ */ jsx("svg", { viewBox: starViewBox, fill: "currentColor", className: rateHalfStarInnerClasses, children: /* @__PURE__ */ jsx("path", { d: starPathD }) })
130
131
  }
131
132
  )
132
133
  ] }) : /* @__PURE__ */ jsx("span", { className: colorClass, children: isChar ? /* @__PURE__ */ jsx("span", { children: character }) : starIcon });