@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,6 +1,12 @@
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";
7
+ import {
8
+ ChartSeries
9
+ } from "./chunk-SDLMB34Y.mjs";
4
10
  import {
5
11
  ChartTooltip
6
12
  } from "./chunk-YORCCCQX.mjs";
@@ -9,16 +15,13 @@ import {
9
15
  } from "./chunk-RQSQXQN6.mjs";
10
16
  import {
11
17
  ChartCanvas
12
- } from "./chunk-DKNVSQSV.mjs";
18
+ } from "./chunk-CUAXRBKO.mjs";
13
19
  import {
14
20
  ChartGrid
15
21
  } from "./chunk-677VSTPW.mjs";
16
22
  import {
17
23
  ChartLegend
18
24
  } from "./chunk-F2ITBDUS.mjs";
19
- import {
20
- ChartSeries
21
- } from "./chunk-SDLMB34Y.mjs";
22
25
 
23
26
  // src/components/BarChart.tsx
24
27
  import { useId, useMemo } from "react";
@@ -31,7 +34,6 @@ import {
31
34
  getStableChartGradientPrefix,
32
35
  getBarValueLabelY,
33
36
  getChartElementOpacity,
34
- getChartInnerRect,
35
37
  getNumberExtent,
36
38
  resolveChartPalette,
37
39
  buildChartLegendItems,
@@ -117,6 +119,7 @@ var BarChart = ({
117
119
  wrapperClasses
118
120
  } = useChartInteraction({
119
121
  hoverable,
122
+ showTooltip,
120
123
  hoveredIndexProp,
121
124
  selectable,
122
125
  selectedIndexProp,
@@ -133,9 +136,11 @@ var BarChart = ({
133
136
  onClick: onBarClick
134
137
  }
135
138
  });
136
- const innerRect = useMemo(
137
- () => getChartInnerRect(width, height, padding),
138
- [width, height, padding]
139
+ const { innerRect, onResolvedSizeChange } = useResponsiveChartSize(
140
+ width,
141
+ height,
142
+ padding,
143
+ responsive
139
144
  );
140
145
  const xDomain = useMemo(() => data.map((item) => String(item.x)), [data]);
141
146
  const yValues = useMemo(() => data.map((item) => item.y), [data]);
@@ -229,6 +234,7 @@ var BarChart = ({
229
234
  title,
230
235
  desc,
231
236
  className: classNames(className),
237
+ onResolvedSizeChange,
232
238
  children: [
233
239
  gradient && /* @__PURE__ */ jsx("defs", { children: bars.map((bar) => /* @__PURE__ */ jsxs(
234
240
  "linearGradient",
@@ -342,7 +348,7 @@ var BarChart = ({
342
348
  ChartTooltip,
343
349
  {
344
350
  content: tooltipContent,
345
- open: hoverable && resolvedHoveredIndex !== null && tooltipContent !== "",
351
+ open: resolvedHoveredIndex !== null && tooltipContent !== "",
346
352
  x: tooltipPosition.x,
347
353
  y: tooltipPosition.y
348
354
  }
@@ -1,3 +1,7 @@
1
+ import {
2
+ useControlledState
3
+ } from "./chunk-MEFARVQI.mjs";
4
+
1
5
  // src/components/Switch.tsx
2
6
  import {
3
7
  getSwitchClasses,
@@ -5,7 +9,8 @@ import {
5
9
  } from "@expcat/tigercat-core";
6
10
  import { jsx } from "react/jsx-runtime";
7
11
  var Switch = ({
8
- checked = false,
12
+ checked: checkedProp,
13
+ defaultChecked,
9
14
  disabled = false,
10
15
  size = "md",
11
16
  onChange,
@@ -15,11 +20,12 @@ var Switch = ({
15
20
  tabIndex,
16
21
  ...props
17
22
  }) => {
23
+ const [checked, setChecked] = useControlledState(checkedProp, defaultChecked ?? false, onChange);
18
24
  const switchClasses = getSwitchClasses(size, checked, disabled, className);
19
25
  const thumbClasses = getSwitchThumbClasses(size, checked);
20
26
  const toggle = () => {
21
27
  if (disabled) return;
22
- onChange?.(!checked);
28
+ setChecked(!checked);
23
29
  };
24
30
  const handleClick = (event) => {
25
31
  onClick?.(event);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  PieChart
3
- } from "./chunk-QGZ32NFQ.mjs";
3
+ } from "./chunk-Z23KOLNU.mjs";
4
4
 
5
5
  // src/components/DonutChart.tsx
6
6
  import { useEffect, useMemo, useState } from "react";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-IIWUQK2P.mjs";
7
7
  import {
8
8
  Pagination
9
- } from "./chunk-HHIW7V7B.mjs";
9
+ } from "./chunk-M6ZPTGBV.mjs";
10
10
  import {
11
11
  Empty
12
12
  } from "./chunk-W7BC4I2Y.mjs";
@@ -292,7 +292,7 @@ function useTableState(input) {
292
292
  }
293
293
  if (sortState.key && sortState.direction) {
294
294
  const column = columnByKey[sortState.key];
295
- data = sortData(data, sortState.key, sortState.direction, column?.sortFn);
295
+ data = sortData(data, sortState.key, sortState.direction, column?.sortFn, columns);
296
296
  }
297
297
  return data;
298
298
  }, [dataSource, columns, filterState, sortState, columnByKey, filterMode, advancedFilterRules]);
@@ -555,7 +555,8 @@ import {
555
555
  getFixedColumnStyle,
556
556
  getCheckboxCellClasses,
557
557
  getExpandIconCellClasses,
558
- formatTableSortByText
558
+ formatTableSortByText,
559
+ tableSortButtonClasses
559
560
  } from "@expcat/tigercat-core";
560
561
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
561
562
  function renderTableHeader(ctx, view) {
@@ -595,6 +596,7 @@ function renderTableHeader(ctx, view) {
595
596
  width: typeof column.width === "number" ? `${column.width}px` : column.width
596
597
  } : void 0;
597
598
  const style = fixedStyle ? { ...widthStyle, ...fixedStyle } : widthStyle;
599
+ const titleNode = column.renderHeader ? column.renderHeader() : column.title;
598
600
  return /* @__PURE__ */ jsxs(
599
601
  "th",
600
602
  {
@@ -619,10 +621,21 @@ function renderTableHeader(ctx, view) {
619
621
  onDragStart: columnDraggable ? () => ctx.handleDragStart(column.key) : void 0,
620
622
  onDragOver: columnDraggable ? (e) => e.preventDefault() : void 0,
621
623
  onDrop: columnDraggable ? () => ctx.handleDrop(column.key) : void 0,
622
- onClick: column.sortable ? () => ctx.handleSort(column.key) : void 0,
623
624
  children: [
624
625
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
625
- column.renderHeader ? column.renderHeader() : column.title,
626
+ column.sortable ? /* @__PURE__ */ jsxs(
627
+ "button",
628
+ {
629
+ type: "button",
630
+ "data-tiger-table-sort": "",
631
+ className: tableSortButtonClasses,
632
+ onClick: () => ctx.handleSort(column.key),
633
+ children: [
634
+ titleNode,
635
+ /* @__PURE__ */ jsx2(SortIcon, { direction: sortDirection })
636
+ ]
637
+ }
638
+ ) : titleNode,
626
639
  columnLockable && /* @__PURE__ */ jsx2(
627
640
  "button",
628
641
  {
@@ -641,8 +654,7 @@ function renderTableHeader(ctx, view) {
641
654
  },
642
655
  children: /* @__PURE__ */ jsx2(LockIcon, { locked: column.fixed === "left" || column.fixed === "right" })
643
656
  }
644
- ),
645
- column.sortable && /* @__PURE__ */ jsx2(SortIcon, { direction: sortDirection })
657
+ )
646
658
  ] }),
647
659
  column.filter && /* @__PURE__ */ jsx2("div", { className: "mt-2", children: column.filter.type === "select" && column.filter.options ? /* @__PURE__ */ jsxs(
648
660
  "select",
@@ -1006,6 +1018,14 @@ function renderPagination(ctx, view) {
1006
1018
 
1007
1019
  // src/components/Table.tsx
1008
1020
  import { Fragment, jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
1021
+ var DEFAULT_TABLE_PAGINATION = {
1022
+ defaultCurrent: 1,
1023
+ defaultPageSize: 10,
1024
+ total: 0,
1025
+ pageSizeOptions: [10, 20, 50, 100],
1026
+ showSizeChanger: true,
1027
+ showTotal: true
1028
+ };
1009
1029
  function Table({
1010
1030
  columns,
1011
1031
  columnLockable = false,
@@ -1024,14 +1044,7 @@ function Table({
1024
1044
  locale,
1025
1045
  labels,
1026
1046
  emptyText,
1027
- pagination = {
1028
- current: 1,
1029
- pageSize: 10,
1030
- total: 0,
1031
- pageSizeOptions: [10, 20, 50, 100],
1032
- showSizeChanger: true,
1033
- showTotal: true
1034
- },
1047
+ pagination = DEFAULT_TABLE_PAGINATION,
1035
1048
  rowSelection,
1036
1049
  expandable,
1037
1050
  rowKey = "id",
@@ -1214,16 +1227,10 @@ function Table({
1214
1227
  [effectiveVirtual, virtualScrollTop, virtualHeight, virtualItemHeight, ctx.paginatedData.length]
1215
1228
  );
1216
1229
  const wrapperStyle = useMemo2(() => {
1217
- if (effectiveVirtual) {
1218
- return {
1219
- height: typeof virtualHeight === "number" ? `${virtualHeight}px` : virtualHeight,
1220
- overflow: "auto"
1221
- };
1222
- }
1223
1230
  return maxHeight ? {
1224
1231
  maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight
1225
1232
  } : void 0;
1226
- }, [effectiveVirtual, maxHeight, virtualHeight]);
1233
+ }, [maxHeight]);
1227
1234
  useEffect2(() => {
1228
1235
  if (!shouldObserveGeometry) {
1229
1236
  return void 0;
@@ -1245,16 +1252,86 @@ function Table({
1245
1252
  controller.observe(wrapper, tableRef.current);
1246
1253
  return () => controller.disconnect();
1247
1254
  }, [shouldObserveGeometry, ctx.displayColumns.length, ctx.paginatedData.length]);
1255
+ const tableInner = /* @__PURE__ */ jsxs4(
1256
+ "table",
1257
+ {
1258
+ ref: tableRef,
1259
+ className: classNames3(
1260
+ tableBaseClasses,
1261
+ getTableResponsiveTableClasses(responsiveMode, cardBreakpoint),
1262
+ tableLayout === "fixed" ? "table-fixed" : "table-auto",
1263
+ className
1264
+ ),
1265
+ ...props,
1266
+ style: ctx.fixedColumnsInfo.hasFixedColumns && ctx.fixedColumnsInfo.minTableWidth ? {
1267
+ ...props.style,
1268
+ minWidth: `${ctx.fixedColumnsInfo.minTableWidth}px`
1269
+ } : props.style,
1270
+ children: [
1271
+ (columnLockable || ctx.fixedColumnsInfo.hasFixedColumns) && /* @__PURE__ */ jsx6("colgroup", { children: getTableColgroup({
1272
+ columns: ctx.displayColumns,
1273
+ frozenWidths: ctx.frozenColumnWidths,
1274
+ size,
1275
+ hasSelectionColumn: !!internalRowSelection && internalRowSelection.showCheckbox !== false,
1276
+ expand: internalExpandable ? internalExpandable.expandIconPosition === "end" ? "end" : "start" : false
1277
+ }).map((entry, index) => /* @__PURE__ */ jsx6(
1278
+ "col",
1279
+ {
1280
+ style: entry.width ? { width: entry.width } : void 0
1281
+ },
1282
+ `${entry.key}-${index}`
1283
+ )) }),
1284
+ renderTableHeader(ctx, {
1285
+ size,
1286
+ stickyHeader,
1287
+ rowSelection: internalRowSelection,
1288
+ expandable: internalExpandable,
1289
+ columnLockable,
1290
+ columnDraggable,
1291
+ lockColumnAriaLabel: tableLabels.lockColumnAriaLabel,
1292
+ unlockColumnAriaLabel: tableLabels.unlockColumnAriaLabel,
1293
+ labels: tableLabels
1294
+ }),
1295
+ renderTableBody(ctx, {
1296
+ size,
1297
+ hoverable,
1298
+ striped,
1299
+ loading,
1300
+ emptyText: tableLabels.emptyText,
1301
+ rowSelection: internalRowSelection,
1302
+ expandable: internalExpandable,
1303
+ labels: tableLabels,
1304
+ rowClassName: internalRowClassName,
1305
+ rowDraggable,
1306
+ interactiveRows: !!onRowClick || !!internalRowSelection,
1307
+ virtualWindow
1308
+ }),
1309
+ renderSummaryRow(ctx, {
1310
+ size,
1311
+ rowSelection: internalRowSelection,
1312
+ expandable: internalExpandable,
1313
+ summaryRow
1314
+ })
1315
+ ]
1316
+ }
1317
+ );
1318
+ const tableContent = effectiveVirtual ? /* @__PURE__ */ jsx6(
1319
+ "div",
1320
+ {
1321
+ style: {
1322
+ height: typeof virtualHeight === "number" ? `${virtualHeight}px` : virtualHeight,
1323
+ overflow: "auto"
1324
+ },
1325
+ onScroll: (e) => setVirtualScrollTop(e.target.scrollTop),
1326
+ children: tableInner
1327
+ }
1328
+ ) : tableInner;
1248
1329
  return /* @__PURE__ */ jsxs4(
1249
1330
  "div",
1250
1331
  {
1251
1332
  ref: wrapperRef,
1252
- className: getTableWrapperClasses(
1253
- bordered,
1254
- maxHeight || (virtual ? virtualHeight : void 0)
1255
- ),
1333
+ className: getTableWrapperClasses(bordered, maxHeight),
1256
1334
  style: wrapperStyle,
1257
- onScroll: effectiveVirtual ? (e) => setVirtualScrollTop(e.target.scrollTop) : void 0,
1258
1335
  "data-tiger-virtual": virtualRecommendation.enabled ? "enabled" : void 0,
1259
1336
  "data-tiger-virtual-recommended": virtualRecommendation.recommended ? "true" : void 0,
1260
1337
  "data-tiger-virtual-threshold": virtualRecommendation.recommended ? virtualRecommendation.threshold : void 0,
@@ -1271,69 +1348,7 @@ function Table({
1271
1348
  children: exportFormat === "excel" ? tableLabels.exportExcelText : tableLabels.exportCsvText
1272
1349
  }
1273
1350
  ) }),
1274
- /* @__PURE__ */ jsxs4(
1275
- "table",
1276
- {
1277
- ref: tableRef,
1278
- className: classNames3(
1279
- tableBaseClasses,
1280
- getTableResponsiveTableClasses(responsiveMode, cardBreakpoint),
1281
- tableLayout === "fixed" ? "table-fixed" : "table-auto",
1282
- className
1283
- ),
1284
- ...props,
1285
- style: ctx.fixedColumnsInfo.hasFixedColumns && ctx.fixedColumnsInfo.minTableWidth ? {
1286
- ...props.style,
1287
- minWidth: `${ctx.fixedColumnsInfo.minTableWidth}px`
1288
- } : props.style,
1289
- children: [
1290
- (columnLockable || ctx.fixedColumnsInfo.hasFixedColumns) && /* @__PURE__ */ jsx6("colgroup", { children: getTableColgroup({
1291
- columns: ctx.displayColumns,
1292
- frozenWidths: ctx.frozenColumnWidths,
1293
- size,
1294
- hasSelectionColumn: !!internalRowSelection && internalRowSelection.showCheckbox !== false,
1295
- expand: internalExpandable ? internalExpandable.expandIconPosition === "end" ? "end" : "start" : false
1296
- }).map((entry, index) => /* @__PURE__ */ jsx6(
1297
- "col",
1298
- {
1299
- style: entry.width ? { width: entry.width } : void 0
1300
- },
1301
- `${entry.key}-${index}`
1302
- )) }),
1303
- renderTableHeader(ctx, {
1304
- size,
1305
- stickyHeader,
1306
- rowSelection: internalRowSelection,
1307
- expandable: internalExpandable,
1308
- columnLockable,
1309
- columnDraggable,
1310
- lockColumnAriaLabel: tableLabels.lockColumnAriaLabel,
1311
- unlockColumnAriaLabel: tableLabels.unlockColumnAriaLabel,
1312
- labels: tableLabels
1313
- }),
1314
- renderTableBody(ctx, {
1315
- size,
1316
- hoverable,
1317
- striped,
1318
- loading,
1319
- emptyText: tableLabels.emptyText,
1320
- rowSelection: internalRowSelection,
1321
- expandable: internalExpandable,
1322
- labels: tableLabels,
1323
- rowClassName: internalRowClassName,
1324
- rowDraggable,
1325
- interactiveRows: !!onRowClick || !!internalRowSelection,
1326
- virtualWindow
1327
- }),
1328
- renderSummaryRow(ctx, {
1329
- size,
1330
- rowSelection: internalRowSelection,
1331
- expandable: internalExpandable,
1332
- summaryRow
1333
- })
1334
- ]
1335
- }
1336
- ),
1351
+ tableContent,
1337
1352
  responsiveMode === "card" && /* @__PURE__ */ jsxs4(
1338
1353
  "div",
1339
1354
  {
@@ -56,7 +56,9 @@ var InputNumber = ({
56
56
  onChange,
57
57
  onFocus,
58
58
  onBlur,
59
- className
59
+ className,
60
+ style,
61
+ ...rest
60
62
  }) => {
61
63
  const inputGroup = useInputGroupContext();
62
64
  const effectiveSize = size ?? inputGroup?.size ?? "md";
@@ -181,7 +183,7 @@ var InputNumber = ({
181
183
  ),
182
184
  [effectiveSize, controls, controlsPosition]
183
185
  );
184
- return /* @__PURE__ */ jsxs("div", { className: wrapperClasses, children: [
186
+ return /* @__PURE__ */ jsxs("div", { className: wrapperClasses, style, children: [
185
187
  controls && controlsPosition === "both" && /* @__PURE__ */ jsx(
186
188
  "button",
187
189
  {
@@ -212,6 +214,7 @@ var InputNumber = ({
212
214
  /* @__PURE__ */ jsx(
213
215
  "input",
214
216
  {
217
+ ...rest,
215
218
  ref: inputRef,
216
219
  type: "text",
217
220
  inputMode: "decimal",
@@ -17,10 +17,12 @@ var ChartCanvas = ({
17
17
  title,
18
18
  desc,
19
19
  children,
20
+ onResolvedSizeChange,
20
21
  ...props
21
22
  }) => {
22
23
  const svgRef = useRef(null);
23
24
  const [observedSize, setObservedSize] = useState(null);
25
+ const lastReportedSizeRef = useRef(null);
24
26
  const resizeControllerRef = useRef(
25
27
  createChartResizeObserverController({
26
28
  onSizeChange: setObservedSize
@@ -47,6 +49,16 @@ var ChartCanvas = ({
47
49
  controller.observe(target);
48
50
  return () => controller.disconnect();
49
51
  }, [responsive]);
52
+ useEffect(() => {
53
+ if (!onResolvedSizeChange) return;
54
+ const prev = lastReportedSizeRef.current;
55
+ if (prev && prev.width === resolvedSize.width && prev.height === resolvedSize.height) {
56
+ return;
57
+ }
58
+ const nextSize = { width: resolvedSize.width, height: resolvedSize.height };
59
+ lastReportedSizeRef.current = nextSize;
60
+ onResolvedSizeChange(nextSize);
61
+ }, [resolvedSize.width, resolvedSize.height, onResolvedSizeChange]);
50
62
  return /* @__PURE__ */ jsxs(
51
63
  "svg",
52
64
  {
@@ -1,6 +1,12 @@
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";
7
+ import {
8
+ ChartSeries
9
+ } from "./chunk-SDLMB34Y.mjs";
4
10
  import {
5
11
  ChartTooltip
6
12
  } from "./chunk-YORCCCQX.mjs";
@@ -9,16 +15,13 @@ import {
9
15
  } from "./chunk-RQSQXQN6.mjs";
10
16
  import {
11
17
  ChartCanvas
12
- } from "./chunk-DKNVSQSV.mjs";
18
+ } from "./chunk-CUAXRBKO.mjs";
13
19
  import {
14
20
  ChartGrid
15
21
  } from "./chunk-677VSTPW.mjs";
16
22
  import {
17
23
  ChartLegend
18
24
  } from "./chunk-F2ITBDUS.mjs";
19
- import {
20
- ChartSeries
21
- } from "./chunk-SDLMB34Y.mjs";
22
25
  import {
23
26
  useTigerConfig
24
27
  } from "./chunk-YSIXURBW.mjs";
@@ -29,7 +32,6 @@ import {
29
32
  classNames,
30
33
  createLinearScale,
31
34
  getChartElementOpacity,
32
- getChartInnerRect,
33
35
  getNumberExtent,
34
36
  getStableChartGradientPrefix,
35
37
  getScatterHoverShadow,
@@ -137,6 +139,7 @@ var ScatterChart = ({
137
139
  wrapperClasses
138
140
  } = useChartInteraction({
139
141
  hoverable,
142
+ showTooltip,
140
143
  hoveredIndexProp,
141
144
  selectable,
142
145
  selectedIndexProp,
@@ -151,9 +154,11 @@ var ScatterChart = ({
151
154
  onSelectedIndexChange,
152
155
  callbacks: { onClick: onPointClick }
153
156
  });
154
- const innerRect = useMemo(
155
- () => getChartInnerRect(width, height, padding),
156
- [width, height, padding]
157
+ const { innerRect, onResolvedSizeChange } = useResponsiveChartSize(
158
+ width,
159
+ height,
160
+ padding,
161
+ responsive
157
162
  );
158
163
  const xValues = useMemo(() => data.map((item) => item.x), [data]);
159
164
  const yValues = useMemo(() => data.map((item) => item.y), [data]);
@@ -232,6 +237,7 @@ var ScatterChart = ({
232
237
  title,
233
238
  desc,
234
239
  className: classNames(className),
240
+ onResolvedSizeChange,
235
241
  children: [
236
242
  gradient && /* @__PURE__ */ jsx("defs", { children: palette.map((color, i) => /* @__PURE__ */ jsxs(
237
243
  "radialGradient",
@@ -330,20 +336,12 @@ var ScatterChart = ({
330
336
  `point-${index}`
331
337
  );
332
338
  }
333
- return /* @__PURE__ */ jsx(
334
- "path",
335
- {
336
- d: getScatterPointPath(pointStyle, point.r),
337
- transform: `translate(${point.cx},${point.cy})`,
338
- ...sharedProps
339
- },
340
- `point-${index}`
341
- );
339
+ return /* @__PURE__ */ jsx("g", { transform: `translate(${point.cx},${point.cy})`, children: /* @__PURE__ */ jsx("path", { d: getScatterPointPath(pointStyle, point.r), ...sharedProps }) }, `point-${index}`);
342
340
  }) })
343
341
  ]
344
342
  }
345
343
  );
346
- const tooltip = showTooltip && hoverable && /* @__PURE__ */ jsx(
344
+ const tooltip = showTooltip && /* @__PURE__ */ jsx(
347
345
  ChartTooltip,
348
346
  {
349
347
  content: tooltipContent,
@@ -113,24 +113,27 @@ var Affix = ({
113
113
  style: { display: "block", width: 0, height: 0, pointerEvents: "none" }
114
114
  }
115
115
  );
116
- if (state.affixed) {
116
+ const content = /* @__PURE__ */ jsx("div", { ref: wrapperRef, className: wrapperClasses, style: wrapperStyle, ...props, children });
117
+ const placeholder = state.affixed ? /* @__PURE__ */ jsx(
118
+ "div",
119
+ {
120
+ style: {
121
+ width: originalRectRef.current?.width ?? 0,
122
+ height: originalRectRef.current?.height ?? 0
123
+ }
124
+ }
125
+ ) : null;
126
+ if (offsetBottom !== void 0) {
117
127
  return /* @__PURE__ */ jsxs("div", { children: [
118
- sentinel,
119
- /* @__PURE__ */ jsx(
120
- "div",
121
- {
122
- style: {
123
- width: originalRectRef.current?.width ?? 0,
124
- height: originalRectRef.current?.height ?? 0
125
- }
126
- }
127
- ),
128
- /* @__PURE__ */ jsx("div", { ref: wrapperRef, className: wrapperClasses, style: wrapperStyle, ...props, children })
128
+ placeholder,
129
+ content,
130
+ sentinel
129
131
  ] });
130
132
  }
131
133
  return /* @__PURE__ */ jsxs("div", { children: [
132
134
  sentinel,
133
- /* @__PURE__ */ jsx("div", { ref: wrapperRef, className: wrapperClasses, style: wrapperStyle, ...props, children })
135
+ placeholder,
136
+ content
134
137
  ] });
135
138
  };
136
139
 
@@ -2,7 +2,7 @@ import {
2
2
  Dropdown,
3
3
  DropdownItem,
4
4
  DropdownMenu
5
- } from "./chunk-YI6YWH66.mjs";
5
+ } from "./chunk-RE5ZLA5D.mjs";
6
6
  import {
7
7
  useTigerConfig
8
8
  } from "./chunk-YSIXURBW.mjs";
@@ -61,7 +61,17 @@ var DataExport = ({
61
61
  setExporting(false);
62
62
  }
63
63
  },
64
- [columns, dataSource, sheetName, cellFormatter, fileName, disabled, exporting, onExport, onError]
64
+ [
65
+ columns,
66
+ dataSource,
67
+ sheetName,
68
+ cellFormatter,
69
+ fileName,
70
+ disabled,
71
+ exporting,
72
+ onExport,
73
+ onError
74
+ ]
65
75
  );
66
76
  const formatLabel = (format) => format === "xlsx" ? resolvedLabels.xlsxText : resolvedLabels.markdownText;
67
77
  if (formats.length === 0) return null;