@expcat/tigercat-vue 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 (250) hide show
  1. package/dist/{chunk-7W3NALIL.mjs → chunk-3FPS7XVB.mjs} +26 -27
  2. package/dist/{chunk-2OI6GWOT.mjs → chunk-3KAHJF7D.mjs} +12 -11
  3. package/dist/{chunk-IEAEB4TX.mjs → chunk-3OCHBGPF.mjs} +242 -51
  4. package/dist/{chunk-4HUYX5WW.mjs → chunk-4PQZMDBK.mjs} +29 -8
  5. package/dist/{chunk-DI6RRAGQ.mjs → chunk-562Z32GR.mjs} +3 -3
  6. package/dist/{chunk-OQVGB7X6.mjs → chunk-626VUZ2Q.mjs} +1 -1
  7. package/dist/{chunk-66OS5A4D.mjs → chunk-67VS6QHJ.mjs} +26 -12
  8. package/dist/{chunk-EHGFW5GX.mjs → chunk-6JAAXPBW.mjs} +4 -3
  9. package/dist/{chunk-JHMT5Q6P.mjs → chunk-6NYC7EY2.mjs} +29 -15
  10. package/dist/{chunk-6BDDX2R4.mjs → chunk-73Z7N7VG.mjs} +1 -4
  11. package/dist/{chunk-F3ZVVVYD.mjs → chunk-7C7SG3SS.mjs} +15 -3
  12. package/dist/{chunk-CHEXI7MO.mjs → chunk-7TJE7OYH.mjs} +4 -3
  13. package/dist/{chunk-AU6IC6K7.mjs → chunk-ABNS4B5V.mjs} +35 -15
  14. package/dist/{chunk-EGIMTTZA.mjs → chunk-BOHE5URZ.mjs} +18 -3
  15. package/dist/{chunk-5RIHHZF6.mjs → chunk-BQK7LH2L.mjs} +4 -1
  16. package/dist/{chunk-E6EZHSGY.mjs → chunk-BSOLH6R5.mjs} +0 -1
  17. package/dist/{chunk-RSM6FOWX.mjs → chunk-CCC3S6LK.mjs} +6 -3
  18. package/dist/{chunk-U75YXWSA.mjs → chunk-CLTRADS7.mjs} +17 -5
  19. package/dist/{chunk-BEIPGX74.mjs → chunk-DRLQCY7R.mjs} +162 -7
  20. package/dist/{chunk-KBJANUZZ.mjs → chunk-E523VGZP.mjs} +1 -1
  21. package/dist/{chunk-D3U2NJ32.mjs → chunk-FEQ7PZXI.mjs} +8 -2
  22. package/dist/{chunk-PE5OA4YG.mjs → chunk-FHUGOSEY.mjs} +8 -2
  23. package/dist/{chunk-OAPIT53X.mjs → chunk-FIEECAJV.mjs} +7 -10
  24. package/dist/{chunk-7SFB77JR.mjs → chunk-GBPMQJJJ.mjs} +8 -1
  25. package/dist/{chunk-6AMWX5K4.mjs → chunk-GQOPDD44.mjs} +1 -1
  26. package/dist/{chunk-5RXYJWNA.mjs → chunk-H4DEIGEG.mjs} +77 -25
  27. package/dist/{chunk-EZYOCPMM.mjs → chunk-IK2WHKDA.mjs} +29 -15
  28. package/dist/{chunk-HGXD57QM.mjs → chunk-JBS3AESR.mjs} +65 -23
  29. package/dist/{chunk-PYRKFQ6J.mjs → chunk-JIU5UEOU.mjs} +70 -26
  30. package/dist/{chunk-JALHMWKW.mjs → chunk-K5MHUMKR.mjs} +2 -2
  31. package/dist/{chunk-5E4LINDO.mjs → chunk-LH2V2JMZ.mjs} +26 -10
  32. package/dist/{chunk-PQBKN2NH.mjs → chunk-LRFKHJDU.mjs} +14 -5
  33. package/dist/{chunk-W5XFWVNV.mjs → chunk-M4FWWEMX.mjs} +15 -6
  34. package/dist/{chunk-VLW3UBIR.mjs → chunk-N2XV37BL.mjs} +37 -41
  35. package/dist/{chunk-2LIIMWBR.mjs → chunk-OYU47A57.mjs} +1 -2
  36. package/dist/{chunk-KU2Q5V3L.mjs → chunk-P62TYR3M.mjs} +18 -2
  37. package/dist/{chunk-P5FDKBXG.mjs → chunk-P7X46BAW.mjs} +70 -3
  38. package/dist/{chunk-KROVW4AW.mjs → chunk-PJQTRDIG.mjs} +13 -3
  39. package/dist/{chunk-26OI3TEA.mjs → chunk-PMQSXEMT.mjs} +42 -6
  40. package/dist/{chunk-XLNK3Z2P.mjs → chunk-POWDTOMF.mjs} +88 -79
  41. package/dist/{chunk-AXDBME5A.mjs → chunk-PSGVG4TN.mjs} +38 -21
  42. package/dist/{chunk-7DWWNFRP.mjs → chunk-PWWWACHC.mjs} +1 -1
  43. package/dist/{chunk-UUWTKCMY.mjs → chunk-QWLD5FMJ.mjs} +1 -1
  44. package/dist/{chunk-ALIUAGJO.mjs → chunk-QZLOF36M.mjs} +7 -13
  45. package/dist/{chunk-WLYQHKLZ.mjs → chunk-QZRSFGZZ.mjs} +50 -11
  46. package/dist/{chunk-37W7XTA6.mjs → chunk-RHQWQJ4I.mjs} +4 -3
  47. package/dist/{chunk-32X54QKW.mjs → chunk-RRLE7QRH.mjs} +43 -22
  48. package/dist/{chunk-RID7A5V7.mjs → chunk-RRNQL6MJ.mjs} +23 -6
  49. package/dist/{chunk-VJ6YM2EW.mjs → chunk-S4BKVFQ7.mjs} +1 -1
  50. package/dist/{chunk-LPZBXTJ6.mjs → chunk-SAC4PAG3.mjs} +4 -4
  51. package/dist/{chunk-W5RZPTFD.mjs → chunk-SNNT64HK.mjs} +13 -2
  52. package/dist/{chunk-N3C6YI7I.mjs → chunk-SWMYIORV.mjs} +22 -7
  53. package/dist/{chunk-U4B5QT72.mjs → chunk-SX3NAN4M.mjs} +1 -1
  54. package/dist/{chunk-JL3CN4UK.mjs → chunk-TDBMAKTJ.mjs} +10 -3
  55. package/dist/chunk-UEGNXN5B.mjs +28 -0
  56. package/dist/{chunk-NEEGXKJW.mjs → chunk-UGHLEKEZ.mjs} +22 -3
  57. package/dist/{chunk-HKYRRQS7.mjs → chunk-UNQO7EVG.mjs} +1 -1
  58. package/dist/{chunk-VN2TWPRC.mjs → chunk-UR5F74ZB.mjs} +112 -18
  59. package/dist/{chunk-VCCK4CDT.mjs → chunk-URPXBKK4.mjs} +23 -5
  60. package/dist/{chunk-7KCOF5US.mjs → chunk-VY6FVIOZ.mjs} +10 -8
  61. package/dist/{chunk-KICZSLOX.mjs → chunk-W2ICYZVU.mjs} +1 -1
  62. package/dist/{chunk-FIVVKBBF.mjs → chunk-W3QOMJKQ.mjs} +8 -6
  63. package/dist/{chunk-DCMRB3HR.mjs → chunk-WV25G4M3.mjs} +4 -3
  64. package/dist/{chunk-ZOYHZF4N.mjs → chunk-X5LJT76O.mjs} +49 -32
  65. package/dist/{chunk-BNYA5IUB.mjs → chunk-YNXP34KO.mjs} +39 -38
  66. package/dist/{chunk-2T2NEZRZ.mjs → chunk-YVDTXHQ6.mjs} +1 -1
  67. package/dist/{chunk-AUMTHL6N.mjs → chunk-ZOP7PEKY.mjs} +2 -1
  68. package/dist/components/ActivityFeed.d.mts +29 -11
  69. package/dist/components/ActivityFeed.mjs +2 -2
  70. package/dist/components/Affix.mjs +1 -1
  71. package/dist/components/Alert.d.mts +2 -2
  72. package/dist/components/Anchor.d.mts +1 -1
  73. package/dist/components/Anchor.mjs +1 -1
  74. package/dist/components/AreaChart.d.mts +3 -3
  75. package/dist/components/AreaChart.mjs +4 -3
  76. package/dist/components/AutoComplete.d.mts +5 -5
  77. package/dist/components/AutoComplete.mjs +1 -1
  78. package/dist/components/Avatar.d.mts +1 -1
  79. package/dist/components/AvatarGroup.d.mts +1 -1
  80. package/dist/components/BackTop.d.mts +2 -2
  81. package/dist/components/Badge.d.mts +4 -4
  82. package/dist/components/BarChart.d.mts +2 -2
  83. package/dist/components/BarChart.mjs +4 -3
  84. package/dist/components/Breadcrumb.d.mts +3 -3
  85. package/dist/components/Button.d.mts +3 -3
  86. package/dist/components/ButtonGroup.d.mts +1 -1
  87. package/dist/components/Calendar.d.mts +1 -1
  88. package/dist/components/Calendar.mjs +1 -1
  89. package/dist/components/Card.d.mts +2 -2
  90. package/dist/components/Cascader.d.mts +3 -3
  91. package/dist/components/Cascader.mjs +1 -1
  92. package/dist/components/ChartCanvas.d.mts +8 -4
  93. package/dist/components/ChartCanvas.mjs +1 -1
  94. package/dist/components/ChartGrid.d.mts +1 -1
  95. package/dist/components/ChartLegend.d.mts +1 -1
  96. package/dist/components/ChatWindow.d.mts +30 -12
  97. package/dist/components/ChatWindow.mjs +3 -3
  98. package/dist/components/Checkbox.d.mts +1 -1
  99. package/dist/components/Code.d.mts +33 -6
  100. package/dist/components/Code.mjs +3 -1
  101. package/dist/components/CodeEditor.d.mts +3 -3
  102. package/dist/components/Collapse.d.mts +1 -1
  103. package/dist/components/CollapsePanel.d.mts +1 -1
  104. package/dist/components/CollapsePanel.mjs +1 -1
  105. package/dist/components/ColorPicker.mjs +1 -1
  106. package/dist/components/ColorSwatch.d.mts +8 -2
  107. package/dist/components/ColorSwatch.mjs +1 -1
  108. package/dist/components/CommentThread.d.mts +62 -26
  109. package/dist/components/CommentThread.mjs +2 -2
  110. package/dist/components/Container.d.mts +1 -1
  111. package/dist/components/ContextMenu.d.mts +1 -1
  112. package/dist/components/Countdown.d.mts +2 -2
  113. package/dist/components/CronEditor.d.mts +3 -3
  114. package/dist/components/DataExport.mjs +2 -2
  115. package/dist/components/DataTableWithToolbar.d.mts +9 -9
  116. package/dist/components/DataTableWithToolbar.mjs +7 -7
  117. package/dist/components/DatePicker.d.mts +4 -4
  118. package/dist/components/Descriptions.d.mts +2 -2
  119. package/dist/components/DonutChart.d.mts +3 -3
  120. package/dist/components/DonutChart.mjs +4 -4
  121. package/dist/components/Drawer.d.mts +3 -3
  122. package/dist/components/Dropdown.d.mts +20 -1
  123. package/dist/components/Dropdown.mjs +1 -1
  124. package/dist/components/FileManager.d.mts +9 -3
  125. package/dist/components/FileManager.mjs +1 -1
  126. package/dist/components/FloatButton.d.mts +34 -4
  127. package/dist/components/FloatButton.mjs +1 -1
  128. package/dist/components/Form.d.mts +2 -2
  129. package/dist/components/FormWizard.d.mts +5 -5
  130. package/dist/components/FormWizard.mjs +1 -1
  131. package/dist/components/FunnelChart.d.mts +3 -3
  132. package/dist/components/FunnelChart.mjs +3 -3
  133. package/dist/components/Gantt.d.mts +5 -3
  134. package/dist/components/Gantt.mjs +2 -2
  135. package/dist/components/GaugeChart.d.mts +2 -2
  136. package/dist/components/GaugeChart.mjs +2 -2
  137. package/dist/components/HeatmapChart.d.mts +3 -3
  138. package/dist/components/HeatmapChart.mjs +3 -3
  139. package/dist/components/Icon.d.mts +2 -2
  140. package/dist/components/Image.d.mts +2 -2
  141. package/dist/components/Image.mjs +3 -3
  142. package/dist/components/ImageAnnotation.d.mts +5 -5
  143. package/dist/components/ImageCompare.d.mts +2 -2
  144. package/dist/components/ImageGroup.mjs +2 -2
  145. package/dist/components/ImagePreview.mjs +1 -1
  146. package/dist/components/InfiniteScroll.d.mts +3 -3
  147. package/dist/components/Input.d.mts +3 -3
  148. package/dist/components/Input.mjs +1 -1
  149. package/dist/components/InputGroup.d.mts +1 -1
  150. package/dist/components/InputNumber.d.mts +1 -1
  151. package/dist/components/InputNumber.mjs +1 -1
  152. package/dist/components/InputOTP.d.mts +5 -5
  153. package/dist/components/Kanban.mjs +2 -2
  154. package/dist/components/Kbd.d.mts +1 -1
  155. package/dist/components/LineChart.d.mts +2 -2
  156. package/dist/components/LineChart.mjs +4 -3
  157. package/dist/components/Link.d.mts +1 -1
  158. package/dist/components/List.d.mts +6 -6
  159. package/dist/components/List.mjs +2 -2
  160. package/dist/components/Loading.d.mts +6 -6
  161. package/dist/components/Loading.mjs +1 -1
  162. package/dist/components/LoadingBarContainer.d.mts +3 -3
  163. package/dist/components/MarkdownEditor.d.mts +3 -3
  164. package/dist/components/Marquee.d.mts +2 -2
  165. package/dist/components/MaskInput.d.mts +11 -5
  166. package/dist/components/MaskInput.mjs +1 -1
  167. package/dist/components/Mentions.d.mts +3 -3
  168. package/dist/components/Menu.d.mts +4 -4
  169. package/dist/components/Modal.d.mts +6 -6
  170. package/dist/components/NavigationMenu.d.mts +5 -5
  171. package/dist/components/NotificationCenter.d.mts +46 -28
  172. package/dist/components/NotificationCenter.mjs +4 -4
  173. package/dist/components/NumberKeyboard.d.mts +6 -6
  174. package/dist/components/OrgChart.d.mts +3 -3
  175. package/dist/components/OrgChart.mjs +2 -2
  176. package/dist/components/Pagination.d.mts +4 -4
  177. package/dist/components/Pagination.mjs +1 -1
  178. package/dist/components/PieChart.d.mts +3 -3
  179. package/dist/components/PieChart.mjs +3 -3
  180. package/dist/components/Popconfirm.d.mts +2 -2
  181. package/dist/components/Popconfirm.mjs +2 -2
  182. package/dist/components/Popover.d.mts +1 -1
  183. package/dist/components/Popover.mjs +2 -2
  184. package/dist/components/Progress.d.mts +3 -3
  185. package/dist/components/QRCode.d.mts +4 -13
  186. package/dist/components/QRCode.mjs +1 -1
  187. package/dist/components/RadarChart.d.mts +3 -3
  188. package/dist/components/RadarChart.mjs +3 -3
  189. package/dist/components/Radio.d.mts +1 -1
  190. package/dist/components/Radio.mjs +1 -1
  191. package/dist/components/Rate.d.mts +1 -1
  192. package/dist/components/Rate.mjs +1 -1
  193. package/dist/components/Result.d.mts +1 -1
  194. package/dist/components/RichTextEditor.d.mts +2 -2
  195. package/dist/components/Row.d.mts +1 -1
  196. package/dist/components/ScatterChart.d.mts +2 -2
  197. package/dist/components/ScatterChart.mjs +4 -3
  198. package/dist/components/ScrollArea.d.mts +2 -2
  199. package/dist/components/ScrollSpy.d.mts +3 -3
  200. package/dist/components/ScrollSpy.mjs +1 -1
  201. package/dist/components/Select.d.mts +3 -3
  202. package/dist/components/Signature.d.mts +4 -4
  203. package/dist/components/Signature.mjs +1 -1
  204. package/dist/components/Skeleton.d.mts +1 -1
  205. package/dist/components/Slider.d.mts +18 -0
  206. package/dist/components/Slider.mjs +1 -1
  207. package/dist/components/Space.d.mts +2 -2
  208. package/dist/components/SplitButton.d.mts +5 -5
  209. package/dist/components/SplitButton.mjs +2 -2
  210. package/dist/components/Splitter.d.mts +5 -5
  211. package/dist/components/Splitter.mjs +1 -1
  212. package/dist/components/Spotlight.d.mts +4 -4
  213. package/dist/components/Stepper.d.mts +7 -1
  214. package/dist/components/Stepper.mjs +1 -1
  215. package/dist/components/Steps.d.mts +3 -3
  216. package/dist/components/SunburstChart.d.mts +2 -2
  217. package/dist/components/SunburstChart.mjs +3 -3
  218. package/dist/components/Switch.d.mts +22 -6
  219. package/dist/components/Switch.mjs +1 -1
  220. package/dist/components/Table.d.mts +9 -9
  221. package/dist/components/Table.mjs +3 -3
  222. package/dist/components/Tabs.d.mts +3 -3
  223. package/dist/components/Tag.d.mts +2 -2
  224. package/dist/components/TagsInput.d.mts +5 -5
  225. package/dist/components/TaskBoard.mjs +1 -1
  226. package/dist/components/Text.d.mts +3 -3
  227. package/dist/components/Textarea.d.mts +3 -3
  228. package/dist/components/Textarea.mjs +1 -1
  229. package/dist/components/TimePicker.d.mts +4 -4
  230. package/dist/components/Timeline.d.mts +3 -3
  231. package/dist/components/Tooltip.d.mts +1 -1
  232. package/dist/components/Tooltip.mjs +2 -2
  233. package/dist/components/Tour.d.mts +2 -2
  234. package/dist/components/Tour.mjs +1 -1
  235. package/dist/components/Transfer.d.mts +5 -4
  236. package/dist/components/Transfer.mjs +1 -1
  237. package/dist/components/Tree.d.mts +4 -4
  238. package/dist/components/TreeMapChart.d.mts +2 -2
  239. package/dist/components/TreeMapChart.mjs +3 -3
  240. package/dist/components/TreeSelect.d.mts +3 -3
  241. package/dist/components/TreeSelect.mjs +1 -1
  242. package/dist/components/Upload.d.mts +2 -2
  243. package/dist/components/Upload.mjs +1 -1
  244. package/dist/components/VirtualTable.d.mts +3 -3
  245. package/dist/components/Watermark.d.mts +1 -1
  246. package/dist/composables/useChartInteraction.d.mts +5 -0
  247. package/dist/composables/useChartInteraction.mjs +1 -1
  248. package/dist/index.d.mts +1 -1
  249. package/dist/index.mjs +51 -0
  250. package/package.json +2 -2
@@ -1,6 +1,9 @@
1
+ import {
2
+ useResponsiveChartSize
3
+ } from "./chunk-UEGNXN5B.mjs";
1
4
  import {
2
5
  useChartInteraction
3
- } from "./chunk-PE5OA4YG.mjs";
6
+ } from "./chunk-FHUGOSEY.mjs";
4
7
  import {
5
8
  ChartSeries
6
9
  } from "./chunk-2ZUEXCVJ.mjs";
@@ -12,7 +15,7 @@ import {
12
15
  } from "./chunk-ZWVA7HT3.mjs";
13
16
  import {
14
17
  ChartCanvas
15
- } from "./chunk-W5RZPTFD.mjs";
18
+ } from "./chunk-SNNT64HK.mjs";
16
19
  import {
17
20
  ChartGrid
18
21
  } from "./chunk-MI6TL3CQ.mjs";
@@ -30,7 +33,6 @@ import {
30
33
  createPointScale,
31
34
  getStableChartGradientPrefix,
32
35
  getChartElementOpacity,
33
- getChartInnerRect,
34
36
  getNumberExtent,
35
37
  linePointTransitionClasses,
36
38
  stackSeriesData,
@@ -255,7 +257,12 @@ var AreaChart = defineComponent({
255
257
  const hoveredPointInfo = ref(null);
256
258
  const tooltipPosition = ref({ x: 0, y: 0 });
257
259
  const gradientPrefix = getStableChartGradientPrefix("area", useId());
258
- const innerRect = computed(() => getChartInnerRect(props.width, props.height, props.padding));
260
+ const { innerRect, onResolvedSizeChange } = useResponsiveChartSize(
261
+ () => props.width,
262
+ () => props.height,
263
+ () => props.padding,
264
+ () => props.responsive
265
+ );
259
266
  const resolvedSeries = computed(
260
267
  () => resolveSeriesData(props.series, props.data, {
261
268
  color: props.areaColor,
@@ -275,6 +282,7 @@ var AreaChart = defineComponent({
275
282
  wrapperClasses
276
283
  } = useChartInteraction({
277
284
  hoverable: computed(() => props.hoverable),
285
+ showTooltip: computed(() => props.showTooltip),
278
286
  hoveredIndexProp: () => props.hoveredIndex,
279
287
  selectable: computed(() => props.selectable),
280
288
  selectedIndexProp: () => props.selectedIndex,
@@ -401,19 +409,23 @@ var AreaChart = defineComponent({
401
409
  const handlePointMouseEnter = (seriesIndex, pointIndex, event) => {
402
410
  hoveredPointInfo.value = { seriesIndex, pointIndex };
403
411
  tooltipPosition.value = { x: event.clientX, y: event.clientY };
404
- emit(
405
- "point-hover",
406
- seriesIndex,
407
- pointIndex,
408
- resolvedSeries.value[seriesIndex]?.data[pointIndex]
409
- );
412
+ if (props.hoverable) {
413
+ emit(
414
+ "point-hover",
415
+ seriesIndex,
416
+ pointIndex,
417
+ resolvedSeries.value[seriesIndex]?.data[pointIndex]
418
+ );
419
+ }
410
420
  };
411
421
  const handlePointMouseMove = (event) => {
412
422
  tooltipPosition.value = { x: event.clientX, y: event.clientY };
413
423
  };
414
424
  const handlePointMouseLeave = () => {
415
425
  hoveredPointInfo.value = null;
416
- emit("point-hover", null, null, null);
426
+ if (props.hoverable) {
427
+ emit("point-hover", null, null, null);
428
+ }
417
429
  };
418
430
  const showPointTooltipFromElement = (el, seriesIndex, pointIndex) => {
419
431
  if (!props.hoverable) return;
@@ -444,6 +456,7 @@ var AreaChart = defineComponent({
444
456
  };
445
457
  return () => {
446
458
  const pointClickable = props.selectable || typeof instance?.vnode.props?.onPointClick === "function";
459
+ const trackPointHover = props.showTooltip || props.hoverable;
447
460
  const reversedSeriesData = [...seriesData.value].reverse();
448
461
  const chart = h(
449
462
  ChartCanvas,
@@ -454,7 +467,8 @@ var AreaChart = defineComponent({
454
467
  responsive: props.responsive,
455
468
  title: props.title,
456
469
  desc: props.desc,
457
- className: classNames(props.className)
470
+ className: classNames(props.className),
471
+ onResolvedSizeChange
458
472
  },
459
473
  {
460
474
  default: () => [
@@ -673,9 +687,9 @@ var AreaChart = defineComponent({
673
687
  tabindex: pointInteractive ? 0 : void 0,
674
688
  "data-point-index": point.pointIndex,
675
689
  "data-series-key": sd.seriesKey,
676
- onMouseenter: props.hoverable ? (e) => handlePointMouseEnter(sd.seriesIndex, point.pointIndex, e) : void 0,
677
- onMousemove: props.hoverable ? handlePointMouseMove : void 0,
678
- onMouseleave: props.hoverable ? handlePointMouseLeave : void 0,
690
+ onMouseenter: trackPointHover ? (e) => handlePointMouseEnter(sd.seriesIndex, point.pointIndex, e) : void 0,
691
+ onMousemove: trackPointHover ? handlePointMouseMove : void 0,
692
+ onMouseleave: trackPointHover ? handlePointMouseLeave : void 0,
679
693
  onClick: pointClickable ? (e) => {
680
694
  e.stopPropagation();
681
695
  handlePointClick(sd.seriesIndex, point.pointIndex);
@@ -17,11 +17,34 @@ import {
17
17
  floatButtonSizeClasses,
18
18
  floatButtonTypeClasses,
19
19
  floatButtonDisabledClasses,
20
- floatButtonGroupClasses,
20
+ floatButtonIconSizeClasses,
21
+ floatButtonPlusIconPath,
22
+ getFloatButtonGroupClasses,
21
23
  getViewportOffsetStyle,
22
24
  viewportFloatingBaseClasses,
23
25
  viewportPlacementClasses
24
26
  } from "@expcat/tigercat-core";
27
+ function renderDefaultPlusIcon(size) {
28
+ return h(
29
+ "svg",
30
+ {
31
+ xmlns: "http://www.w3.org/2000/svg",
32
+ fill: "none",
33
+ viewBox: "0 0 24 24",
34
+ stroke: "currentColor",
35
+ "stroke-width": "2",
36
+ class: floatButtonIconSizeClasses[size],
37
+ "aria-hidden": "true"
38
+ },
39
+ [
40
+ h("path", {
41
+ "stroke-linecap": "round",
42
+ "stroke-linejoin": "round",
43
+ d: floatButtonPlusIconPath
44
+ })
45
+ ]
46
+ );
47
+ }
25
48
  var FloatButtonGroupShapeKey = /* @__PURE__ */ Symbol("FloatButtonGroupShape");
26
49
  var FloatButton = defineComponent({
27
50
  name: "TigerFloatButton",
@@ -101,6 +124,7 @@ var FloatButton = defineComponent({
101
124
  };
102
125
  return () => {
103
126
  const attrsRecord = attrs;
127
+ const content = slots.default ? slots.default() : renderDefaultPlusIcon(props.size);
104
128
  const btn = h(
105
129
  "button",
106
130
  {
@@ -113,11 +137,11 @@ var FloatButton = defineComponent({
113
137
  ),
114
138
  type: "button",
115
139
  disabled: props.disabled,
116
- "aria-label": props.ariaLabel ?? props.tooltip,
140
+ "aria-label": slots.default ? props.ariaLabel ?? props.tooltip : props.ariaLabel ?? props.tooltip ?? "Add",
117
141
  title: props.tooltip,
118
142
  onClick: handleClick
119
143
  },
120
- slots.default?.()
144
+ content
121
145
  );
122
146
  return btn;
123
147
  };
@@ -146,6 +170,18 @@ var FloatButtonGroup = defineComponent({
146
170
  style: {
147
171
  type: Object,
148
172
  default: void 0
173
+ },
174
+ placement: {
175
+ type: String,
176
+ default: "bottom-right"
177
+ },
178
+ offset: {
179
+ type: [Number, String, Object],
180
+ default: void 0
181
+ },
182
+ portal: {
183
+ type: Boolean,
184
+ default: true
149
185
  }
150
186
  },
151
187
  emits: ["update:open"],
@@ -163,7 +199,10 @@ var FloatButtonGroup = defineComponent({
163
199
  };
164
200
  const groupClasses = computed(
165
201
  () => classNames(
166
- floatButtonGroupClasses,
202
+ getFloatButtonGroupClasses({
203
+ placement: props.placement,
204
+ portal: props.portal
205
+ }),
167
206
  props.className,
168
207
  coerceClassValue(attrs.class)
169
208
  )
@@ -182,25 +221,28 @@ var FloatButtonGroup = defineComponent({
182
221
  children.push(node);
183
222
  }
184
223
  }
185
- return h(Teleport, { to: "body" }, [
186
- h(
187
- "div",
188
- {
189
- ...attrs,
190
- class: groupClasses.value,
191
- style: mergeStyleValues(attrsRecord.style, props.style),
192
- onMouseenter: props.trigger === "hover" ? () => {
193
- internalOpen.value = true;
194
- emit("update:open", true);
195
- } : void 0,
196
- onMouseleave: props.trigger === "hover" ? () => {
197
- internalOpen.value = false;
198
- emit("update:open", false);
199
- } : void 0
200
- },
201
- children
202
- )
203
- ]);
224
+ const groupRoot = h(
225
+ "div",
226
+ {
227
+ ...attrs,
228
+ class: groupClasses.value,
229
+ style: mergeStyleValues(
230
+ getViewportOffsetStyle(props.placement, props.offset),
231
+ attrsRecord.style,
232
+ props.style
233
+ ),
234
+ onMouseenter: props.trigger === "hover" ? () => {
235
+ internalOpen.value = true;
236
+ emit("update:open", true);
237
+ } : void 0,
238
+ onMouseleave: props.trigger === "hover" ? () => {
239
+ internalOpen.value = false;
240
+ emit("update:open", false);
241
+ } : void 0
242
+ },
243
+ children
244
+ );
245
+ return props.portal ? h(Teleport, { to: "body" }, [groupRoot]) : groupRoot;
204
246
  };
205
247
  }
206
248
  });
@@ -3,30 +3,48 @@ import {
3
3
  } from "./chunk-HS4YQGZQ.mjs";
4
4
  import {
5
5
  Input
6
- } from "./chunk-XLNK3Z2P.mjs";
6
+ } from "./chunk-POWDTOMF.mjs";
7
7
  import {
8
8
  Empty
9
9
  } from "./chunk-SJINC5NF.mjs";
10
10
  import {
11
11
  Textarea
12
- } from "./chunk-2OI6GWOT.mjs";
12
+ } from "./chunk-3KAHJF7D.mjs";
13
13
  import {
14
14
  Button
15
15
  } from "./chunk-YZBQ6IR7.mjs";
16
16
  import {
17
17
  Avatar
18
18
  } from "./chunk-ZFTRR3KW.mjs";
19
+ import {
20
+ useTigerConfig
21
+ } from "./chunk-UOJOJBEU.mjs";
19
22
 
20
23
  // src/components/ChatWindow.ts
21
- import { defineComponent, h, computed, ref, watch, onMounted, onUpdated } from "vue";
24
+ import { defineComponent, h, computed, ref, watch, onMounted } from "vue";
22
25
  import {
23
26
  classNames,
24
27
  coerceClassValue,
25
28
  getChatMessageStatusInfo,
29
+ buildChatMessageStatusInfo,
26
30
  getChatStatusBarClasses,
27
31
  formatChatTime,
28
- mergeStyleValues
32
+ mergeStyleValues,
33
+ getChatWindowLabels,
34
+ mergeTigerLocale,
35
+ resolveLocaleText
29
36
  } from "@expcat/tigercat-core";
37
+ var CHAT_STICK_TO_BOTTOM_PX = 32;
38
+ function resolveChatScroller(virtual, messageList, virtualWrapper) {
39
+ if (virtual) {
40
+ const wrapper = virtualWrapper;
41
+ return wrapper?.firstElementChild ?? wrapper;
42
+ }
43
+ return messageList;
44
+ }
45
+ function isChatScrollerNearBottom(scroller) {
46
+ return scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight <= CHAT_STICK_TO_BOTTOM_PX;
47
+ }
30
48
  var ChatWindow = defineComponent({
31
49
  name: "TigerChatWindow",
32
50
  inheritAttrs: false,
@@ -44,7 +62,7 @@ var ChatWindow = defineComponent({
44
62
  },
45
63
  placeholder: {
46
64
  type: String,
47
- default: "\u8BF7\u8F93\u5165\u6D88\u606F"
65
+ default: void 0
48
66
  },
49
67
  disabled: {
50
68
  type: Boolean,
@@ -55,11 +73,19 @@ var ChatWindow = defineComponent({
55
73
  },
56
74
  emptyText: {
57
75
  type: String,
58
- default: "\u6682\u65E0\u6D88\u606F"
76
+ default: void 0
59
77
  },
60
78
  sendText: {
61
79
  type: String,
62
- default: "\u53D1\u9001"
80
+ default: void 0
81
+ },
82
+ locale: {
83
+ type: Object,
84
+ default: void 0
85
+ },
86
+ labels: {
87
+ type: Object,
88
+ default: void 0
63
89
  },
64
90
  messageListAriaLabel: {
65
91
  type: String
@@ -143,6 +169,10 @@ var ChatWindow = defineComponent({
143
169
  send: null
144
170
  },
145
171
  setup(props, { emit, attrs, slots }) {
172
+ const config = useTigerConfig();
173
+ const mergedLocale = computed(() => mergeTigerLocale(config.value.locale, props.locale));
174
+ const labels = computed(() => getChatWindowLabels(mergedLocale.value, props.labels));
175
+ const statusMap = computed(() => buildChatMessageStatusInfo(labels.value));
146
176
  const localValue = ref(props.modelValue ?? props.defaultValue ?? "");
147
177
  watch(
148
178
  () => props.modelValue,
@@ -194,29 +224,35 @@ var ChatWindow = defineComponent({
194
224
  };
195
225
  const messageListRef = ref(null);
196
226
  const virtualWrapperRef = ref(null);
227
+ const stickToBottom = ref(true);
228
+ const resolveScroller = () => resolveChatScroller(props.virtual, messageListRef.value, virtualWrapperRef.value);
229
+ const syncStickToBottom = () => {
230
+ const scroller = resolveScroller();
231
+ if (!scroller) return;
232
+ stickToBottom.value = isChatScrollerNearBottom(scroller);
233
+ };
197
234
  const scrollToBottom = () => {
198
235
  if (!props.autoScrollToBottom) return;
199
236
  requestAnimationFrame(() => {
200
- if (props.virtual) {
201
- const wrapper = virtualWrapperRef.value;
202
- const scroller = wrapper?.firstElementChild ?? wrapper;
203
- if (scroller) {
204
- scroller.scrollTop = scroller.scrollHeight;
205
- }
206
- } else if (messageListRef.value) {
207
- messageListRef.value.scrollTop = messageListRef.value.scrollHeight;
237
+ const scroller = resolveScroller();
238
+ if (scroller) {
239
+ scroller.scrollTop = scroller.scrollHeight;
240
+ stickToBottom.value = true;
208
241
  }
209
242
  });
210
243
  };
211
244
  onMounted(scrollToBottom);
212
- onUpdated(scrollToBottom);
213
245
  watch(
214
246
  () => props.messages.length,
215
- () => scrollToBottom()
247
+ () => {
248
+ if (!resolveScroller() || stickToBottom.value) {
249
+ scrollToBottom();
250
+ }
251
+ }
216
252
  );
217
253
  const renderMessageItem = (message, index) => {
218
254
  const isSelf = message.direction === "self";
219
- const statusInfo = message.status ? getChatMessageStatusInfo(message.status) : void 0;
255
+ const statusInfo = message.status ? getChatMessageStatusInfo(message.status, statusMap.value) : void 0;
220
256
  const timeText = props.showTime ? formatChatTime(message.time) : "";
221
257
  const customContent = slots.message?.({ message, index });
222
258
  return h(
@@ -270,10 +306,11 @@ var ChatWindow = defineComponent({
270
306
  );
271
307
  };
272
308
  const renderInput = () => {
273
- const resolvedInputLabel = props.inputAriaLabel ?? props.placeholder ?? "\u6D88\u606F\u8F93\u5165";
309
+ const resolvedPlaceholder = resolveLocaleText(labels.value.placeholder, props.placeholder);
310
+ const resolvedInputLabel = props.inputAriaLabel ?? resolvedPlaceholder;
274
311
  const commonProps = {
275
312
  modelValue: inputValue.value,
276
- placeholder: props.placeholder,
313
+ placeholder: resolvedPlaceholder,
277
314
  disabled: props.disabled,
278
315
  maxLength: props.maxLength,
279
316
  onKeydown: handleKeydown,
@@ -302,7 +339,8 @@ var ChatWindow = defineComponent({
302
339
  role: "log",
303
340
  "aria-live": "polite",
304
341
  "aria-relevant": "additions text",
305
- "aria-label": props.messageListAriaLabel ?? "\u6D88\u606F\u5217\u8868"
342
+ "aria-label": props.messageListAriaLabel ?? "Message list",
343
+ onScroll: syncStickToBottom
306
344
  },
307
345
  [
308
346
  h(
@@ -310,7 +348,8 @@ var ChatWindow = defineComponent({
310
348
  {
311
349
  itemCount: props.messages.length,
312
350
  itemHeight: props.virtualItemHeight,
313
- height: props.virtualHeight
351
+ height: props.virtualHeight,
352
+ onScroll: syncStickToBottom
314
353
  },
315
354
  {
316
355
  default: ({ index }) => renderMessageItem(props.messages[index], index)
@@ -325,7 +364,8 @@ var ChatWindow = defineComponent({
325
364
  role: "log",
326
365
  "aria-live": "polite",
327
366
  "aria-relevant": "additions text",
328
- "aria-label": props.messageListAriaLabel ?? "\u6D88\u606F\u5217\u8868"
367
+ "aria-label": props.messageListAriaLabel ?? "Message list",
368
+ onScroll: syncStickToBottom
329
369
  },
330
370
  props.messages.length === 0 ? [
331
371
  h(
@@ -333,7 +373,11 @@ var ChatWindow = defineComponent({
333
373
  {
334
374
  class: "h-full flex items-center justify-center py-8"
335
375
  },
336
- [h(Empty, { description: props.emptyText })]
376
+ [
377
+ h(Empty, {
378
+ description: resolveLocaleText(labels.value.emptyText, props.emptyText)
379
+ })
380
+ ]
337
381
  )
338
382
  ] : props.messages.map((message, index) => renderMessageItem(message, index))
339
383
  ),
@@ -356,9 +400,9 @@ var ChatWindow = defineComponent({
356
400
  {
357
401
  disabled: !canSend.value,
358
402
  onClick: handleSend,
359
- "aria-label": props.sendAriaLabel ?? props.sendText
403
+ "aria-label": props.sendAriaLabel ?? resolveLocaleText(labels.value.sendText, props.sendText)
360
404
  },
361
- () => props.sendText
405
+ () => resolveLocaleText(labels.value.sendText, props.sendText)
362
406
  )
363
407
  ]
364
408
  )
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ImagePreview
3
- } from "./chunk-LPZBXTJ6.mjs";
3
+ } from "./chunk-SAC4PAG3.mjs";
4
4
  import {
5
5
  useFloatingPopup
6
- } from "./chunk-26OI3TEA.mjs";
6
+ } from "./chunk-PMQSXEMT.mjs";
7
7
  import {
8
8
  renderVueOverlayTeleport
9
9
  } from "./chunk-Q7Y22OFX.mjs";
@@ -1,5 +1,5 @@
1
1
  // src/components/Stepper.ts
2
- import { defineComponent, h, onBeforeUnmount } from "vue";
2
+ import { computed, defineComponent, h, onBeforeUnmount, ref, watch } from "vue";
3
3
  import {
4
4
  stepperBaseClasses,
5
5
  getStepperInputClasses,
@@ -15,7 +15,8 @@ import {
15
15
  var Stepper = defineComponent({
16
16
  name: "TigerStepper",
17
17
  props: {
18
- modelValue: { type: Number, default: 0 },
18
+ modelValue: { type: Number },
19
+ defaultValue: { type: Number, default: 0 },
19
20
  min: { type: Number, default: -Infinity },
20
21
  max: { type: Number, default: Infinity },
21
22
  step: { type: Number, default: 1 },
@@ -27,17 +28,32 @@ var Stepper = defineComponent({
27
28
  },
28
29
  emits: ["update:modelValue", "change"],
29
30
  setup(props, { emit, attrs }) {
31
+ const inner = ref(props.defaultValue ?? 0);
32
+ const currentValue = computed(
33
+ () => props.modelValue !== void 0 ? props.modelValue : inner.value
34
+ );
35
+ watch(
36
+ () => props.modelValue,
37
+ (value) => {
38
+ if (value !== void 0) {
39
+ inner.value = value;
40
+ }
41
+ }
42
+ );
30
43
  const repeatController = createRafRepeatActionController();
31
- let repeatValue = props.modelValue;
44
+ let repeatValue = currentValue.value;
32
45
  let suppressNextClick = false;
33
46
  onBeforeUnmount(() => repeatController.stop());
34
47
  function setValue(v) {
35
48
  const clamped = clampStepperValue(v, props.min, props.max, props.precision);
49
+ if (props.modelValue === void 0) {
50
+ inner.value = clamped;
51
+ }
36
52
  emit("update:modelValue", clamped);
37
53
  emit("change", clamped);
38
54
  return clamped;
39
55
  }
40
- function stepBy(direction, baseValue = props.modelValue) {
56
+ function stepBy(direction, baseValue = currentValue.value) {
41
57
  return setValue(direction === "up" ? baseValue + props.step : baseValue - props.step);
42
58
  }
43
59
  function decrement() {
@@ -60,10 +76,10 @@ var Stepper = defineComponent({
60
76
  return (event) => {
61
77
  event.preventDefault();
62
78
  if (props.disabled) return;
63
- if (direction === "down" && props.modelValue <= props.min) return;
64
- if (direction === "up" && props.modelValue >= props.max) return;
79
+ if (direction === "down" && currentValue.value <= props.min) return;
80
+ if (direction === "up" && currentValue.value >= props.max) return;
65
81
  suppressNextClick = true;
66
- repeatValue = props.modelValue;
82
+ repeatValue = currentValue.value;
67
83
  repeatController.start(() => {
68
84
  const baseValue = repeatValue;
69
85
  const nextValue = stepBy(direction, baseValue);
@@ -91,8 +107,8 @@ var Stepper = defineComponent({
91
107
  [h("path", { d, "fill-rule": "evenodd", "clip-rule": "evenodd" })]
92
108
  );
93
109
  return () => {
94
- const atMin = props.modelValue <= props.min;
95
- const atMax = props.modelValue >= props.max;
110
+ const atMin = currentValue.value <= props.min;
111
+ const atMax = currentValue.value >= props.max;
96
112
  return h(
97
113
  "div",
98
114
  {
@@ -119,7 +135,7 @@ var Stepper = defineComponent({
119
135
  h("input", {
120
136
  type: "text",
121
137
  class: getStepperInputClasses(props.size),
122
- value: props.precision !== void 0 ? props.modelValue.toFixed(props.precision) : String(props.modelValue),
138
+ value: props.precision !== void 0 ? currentValue.value.toFixed(props.precision) : String(currentValue.value),
123
139
  disabled: props.disabled,
124
140
  "aria-label": "Value",
125
141
  onChange: handleInput
@@ -114,7 +114,13 @@ var Transfer = defineComponent({
114
114
  default: void 0
115
115
  }
116
116
  },
117
- emits: ["update:modelValue", "update:searchValue", "change", "search-change"],
117
+ emits: [
118
+ "update:modelValue",
119
+ "update:targetKeys",
120
+ "update:searchValue",
121
+ "change",
122
+ "search-change"
123
+ ],
118
124
  setup(props, { emit, attrs }) {
119
125
  const config = useTigerConfig();
120
126
  const mergedLocale = computed(() => mergeTigerLocale(config.value.locale, props.locale));
@@ -183,6 +189,11 @@ var Transfer = defineComponent({
183
189
  }
184
190
  targetSelectedKeys.value = next;
185
191
  }
192
+ function updateTargetKeys(newTargetKeys, direction, movedKeys) {
193
+ emit("update:modelValue", newTargetKeys);
194
+ emit("update:targetKeys", newTargetKeys);
195
+ emit("change", newTargetKeys, direction, movedKeys);
196
+ }
186
197
  function moveRight() {
187
198
  if (!canMoveRight.value) return;
188
199
  const { targetKeys: newTargetKeys, movedKeys } = moveTransferItems(
@@ -192,8 +203,7 @@ var Transfer = defineComponent({
192
203
  props.dataSource
193
204
  );
194
205
  sourceSelectedKeys.value = /* @__PURE__ */ new Set();
195
- emit("update:modelValue", newTargetKeys);
196
- emit("change", newTargetKeys, "right", movedKeys);
206
+ updateTargetKeys(newTargetKeys, "right", movedKeys);
197
207
  }
198
208
  function moveLeft() {
199
209
  if (!canMoveLeft.value) return;
@@ -204,8 +214,7 @@ var Transfer = defineComponent({
204
214
  props.dataSource
205
215
  );
206
216
  targetSelectedKeys.value = /* @__PURE__ */ new Set();
207
- emit("update:modelValue", newTargetKeys);
208
- emit("change", newTargetKeys, "left", movedKeys);
217
+ updateTargetKeys(newTargetKeys, "left", movedKeys);
209
218
  }
210
219
  function renderPanel(title, items, selectedKeys, toggleFn, searchValue, onSearchInput) {
211
220
  return h("div", { class: transferPanelClasses, role: "group", "aria-label": title }, [
@@ -1,6 +1,9 @@
1
+ import {
2
+ useResponsiveChartSize
3
+ } from "./chunk-UEGNXN5B.mjs";
1
4
  import {
2
5
  useChartInteraction
3
- } from "./chunk-PE5OA4YG.mjs";
6
+ } from "./chunk-FHUGOSEY.mjs";
4
7
  import {
5
8
  ChartSeries
6
9
  } from "./chunk-2ZUEXCVJ.mjs";
@@ -12,7 +15,7 @@ import {
12
15
  } from "./chunk-ZWVA7HT3.mjs";
13
16
  import {
14
17
  ChartCanvas
15
- } from "./chunk-W5RZPTFD.mjs";
18
+ } from "./chunk-SNNT64HK.mjs";
16
19
  import {
17
20
  ChartGrid
18
21
  } from "./chunk-MI6TL3CQ.mjs";
@@ -30,7 +33,6 @@ import {
30
33
  ensureBarMinHeight,
31
34
  getStableChartGradientPrefix,
32
35
  getBarValueLabelY,
33
- getChartInnerRect,
34
36
  getNumberExtent,
35
37
  resolveChartPalette,
36
38
  buildChartLegendItems,
@@ -245,6 +247,7 @@ var BarChart = defineComponent({
245
247
  wrapperClasses
246
248
  } = useChartInteraction({
247
249
  hoverable: computed(() => props.hoverable),
250
+ showTooltip: computed(() => props.showTooltip),
248
251
  hoveredIndexProp: () => props.hoveredIndex,
249
252
  selectable: computed(() => props.selectable),
250
253
  selectedIndexProp: () => props.selectedIndex,
@@ -255,7 +258,12 @@ var BarChart = defineComponent({
255
258
  getData: (index) => props.data[index],
256
259
  eventNames: { hover: "bar-hover", click: "bar-click" }
257
260
  });
258
- const innerRect = computed(() => getChartInnerRect(props.width, props.height, props.padding));
261
+ const { innerRect, onResolvedSizeChange } = useResponsiveChartSize(
262
+ () => props.width,
263
+ () => props.height,
264
+ () => props.padding,
265
+ () => props.responsive
266
+ );
259
267
  const xDomain = computed(() => props.data.map((item) => String(item.x)));
260
268
  const yValues = computed(() => props.data.map((item) => item.y));
261
269
  const resolvedXScale = computed(() => {
@@ -379,7 +387,8 @@ var BarChart = defineComponent({
379
387
  responsive: props.responsive,
380
388
  title: props.title,
381
389
  desc: props.desc,
382
- className: classNames(props.className)
390
+ className: classNames(props.className),
391
+ onResolvedSizeChange
383
392
  },
384
393
  {
385
394
  default: () => [
@@ -452,7 +461,7 @@ var BarChart = defineComponent({
452
461
  ].filter(Boolean)
453
462
  }
454
463
  );
455
- const tooltip = props.showTooltip && props.hoverable ? h(ChartTooltip, {
464
+ const tooltip = props.showTooltip ? h(ChartTooltip, {
456
465
  content: tooltipContent.value,
457
466
  open: resolvedHoveredIndex.value !== null && tooltipContent.value !== "",
458
467
  x: tooltipPosition.value.x,