@semcore/d3-chart 18.0.0-prerelease.2 → 18.0.0-prerelease.5

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 (203) hide show
  1. package/CHANGELOG.md +45 -3
  2. package/README.md +0 -1
  3. package/lib/cjs/Area.js +12 -12
  4. package/lib/cjs/Bar.js +16 -16
  5. package/lib/cjs/Bubble.js +14 -14
  6. package/lib/cjs/CompactHorizontalBar.js +17 -17
  7. package/lib/cjs/CompactHorizontalBar.js.map +1 -1
  8. package/lib/cjs/Donut.js +9 -9
  9. package/lib/cjs/Dots.js +12 -12
  10. package/lib/cjs/GroupBar.js +5 -2
  11. package/lib/cjs/GroupBar.js.map +1 -1
  12. package/lib/cjs/HorizontalBar.js +16 -16
  13. package/lib/cjs/Hover.js +2 -13
  14. package/lib/cjs/Hover.js.map +1 -1
  15. package/lib/cjs/Line.js +9 -9
  16. package/lib/cjs/RadialTree.js +12 -12
  17. package/lib/cjs/Reference.js +12 -12
  18. package/lib/cjs/ScatterPlot.js +9 -9
  19. package/lib/cjs/Tooltip.js +12 -12
  20. package/lib/cjs/Venn.js +9 -9
  21. package/lib/cjs/component/Chart/AbstractChart.js +20 -17
  22. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  23. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  24. package/lib/cjs/component/Chart/AreaChart.js +1 -1
  25. package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
  26. package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
  27. package/lib/cjs/component/Chart/BarChart.js +12 -6
  28. package/lib/cjs/component/Chart/BarChart.js.map +1 -1
  29. package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
  30. package/lib/cjs/component/Chart/CigaretteChart.js +5 -1
  31. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  32. package/lib/cjs/component/Chart/HistogramChart.js +1 -1
  33. package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
  34. package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
  35. package/lib/cjs/component/Chart/LineChart.js +1 -1
  36. package/lib/cjs/component/Chart/LineChart.js.map +1 -1
  37. package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
  38. package/lib/cjs/component/ChartLegend/BaseLegend.js +0 -4
  39. package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
  40. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +3 -1
  41. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  42. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +28 -21
  43. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  44. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  45. package/lib/cjs/component/ChartLegend/LegendTable/legend-table.shadow.css +30 -14
  46. package/lib/cjs/component/Cigarette/Cigarette.js +0 -1
  47. package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
  48. package/lib/cjs/component/Metric/Metric.js +78 -0
  49. package/lib/cjs/component/Metric/Metric.js.map +1 -0
  50. package/lib/cjs/component/Metric/Metric.type.js +2 -0
  51. package/lib/cjs/component/Metric/Metric.type.js.map +1 -0
  52. package/lib/cjs/index.js +8 -8
  53. package/lib/cjs/index.js.map +1 -1
  54. package/lib/cjs/style/abstract-chart.shadow.css +1 -1
  55. package/lib/cjs/style/area.shadow.css +0 -2
  56. package/lib/cjs/style/bar.shadow.css +1 -3
  57. package/lib/cjs/style/bubble.shadow.css +1 -3
  58. package/lib/cjs/style/donut.shadow.css +1 -3
  59. package/lib/cjs/style/dot.shadow.css +1 -3
  60. package/lib/cjs/style/line.shadow.css +0 -2
  61. package/lib/cjs/style/radial-tree.shadow.css +1 -3
  62. package/lib/cjs/style/reference.shadow.css +1 -1
  63. package/lib/cjs/style/scatterplot.shadow.css +1 -3
  64. package/lib/cjs/style/tooltip.shadow.css +0 -2
  65. package/lib/cjs/style/venn.shadow.css +0 -2
  66. package/lib/cjs/types/index.d.js +20 -0
  67. package/lib/cjs/types/index.d.js.map +1 -1
  68. package/lib/es6/Area.js +12 -12
  69. package/lib/es6/Bar.js +16 -16
  70. package/lib/es6/Bubble.js +14 -14
  71. package/lib/es6/CompactHorizontalBar.js +17 -17
  72. package/lib/es6/CompactHorizontalBar.js.map +1 -1
  73. package/lib/es6/Donut.js +9 -9
  74. package/lib/es6/Dots.js +12 -12
  75. package/lib/es6/GroupBar.js +5 -2
  76. package/lib/es6/GroupBar.js.map +1 -1
  77. package/lib/es6/HorizontalBar.js +16 -16
  78. package/lib/es6/Hover.js +2 -13
  79. package/lib/es6/Hover.js.map +1 -1
  80. package/lib/es6/Line.js +9 -9
  81. package/lib/es6/RadialTree.js +12 -12
  82. package/lib/es6/Reference.js +12 -12
  83. package/lib/es6/ScatterPlot.js +9 -9
  84. package/lib/es6/Tooltip.js +12 -12
  85. package/lib/es6/Venn.js +9 -9
  86. package/lib/es6/component/Chart/AbstractChart.js +20 -17
  87. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  88. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  89. package/lib/es6/component/Chart/AreaChart.js +1 -1
  90. package/lib/es6/component/Chart/AreaChart.js.map +1 -1
  91. package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
  92. package/lib/es6/component/Chart/BarChart.js +12 -6
  93. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  94. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  95. package/lib/es6/component/Chart/CigaretteChart.js +5 -1
  96. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  97. package/lib/es6/component/Chart/HistogramChart.js +1 -1
  98. package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
  99. package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
  100. package/lib/es6/component/Chart/LineChart.js +1 -1
  101. package/lib/es6/component/Chart/LineChart.js.map +1 -1
  102. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  103. package/lib/es6/component/ChartLegend/BaseLegend.js +0 -4
  104. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  105. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +3 -1
  106. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  107. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +28 -21
  108. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  109. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  110. package/lib/es6/component/ChartLegend/LegendTable/legend-table.shadow.css +30 -14
  111. package/lib/es6/component/Cigarette/Cigarette.js +0 -1
  112. package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
  113. package/lib/es6/component/Metric/Metric.js +72 -0
  114. package/lib/es6/component/Metric/Metric.js.map +1 -0
  115. package/lib/es6/component/Metric/Metric.type.js +2 -0
  116. package/lib/es6/component/Metric/Metric.type.js.map +1 -0
  117. package/lib/es6/index.js +1 -1
  118. package/lib/es6/index.js.map +1 -1
  119. package/lib/es6/style/abstract-chart.shadow.css +1 -1
  120. package/lib/es6/style/area.shadow.css +0 -2
  121. package/lib/es6/style/bar.shadow.css +1 -3
  122. package/lib/es6/style/bubble.shadow.css +1 -3
  123. package/lib/es6/style/donut.shadow.css +1 -3
  124. package/lib/es6/style/dot.shadow.css +1 -3
  125. package/lib/es6/style/line.shadow.css +0 -2
  126. package/lib/es6/style/radial-tree.shadow.css +1 -3
  127. package/lib/es6/style/reference.shadow.css +1 -1
  128. package/lib/es6/style/scatterplot.shadow.css +1 -3
  129. package/lib/es6/style/tooltip.shadow.css +0 -2
  130. package/lib/es6/style/venn.shadow.css +0 -2
  131. package/lib/es6/types/index.d.js +5 -7
  132. package/lib/es6/types/index.d.js.map +1 -1
  133. package/lib/esm/Area.mjs +13 -13
  134. package/lib/esm/Bar.mjs +17 -17
  135. package/lib/esm/Bubble.mjs +15 -15
  136. package/lib/esm/CompactHorizontalBar.mjs +18 -18
  137. package/lib/esm/Donut.mjs +10 -10
  138. package/lib/esm/Dots.mjs +13 -13
  139. package/lib/esm/GroupBar.mjs +5 -2
  140. package/lib/esm/HorizontalBar.mjs +17 -17
  141. package/lib/esm/Hover.mjs +2 -13
  142. package/lib/esm/Line.mjs +10 -10
  143. package/lib/esm/RadialTree.mjs +13 -13
  144. package/lib/esm/Reference.mjs +13 -13
  145. package/lib/esm/ScatterPlot.mjs +10 -10
  146. package/lib/esm/Tooltip.mjs +13 -13
  147. package/lib/esm/Venn.mjs +10 -10
  148. package/lib/esm/component/Chart/AbstractChart.mjs +19 -18
  149. package/lib/esm/component/Chart/AreaChart.mjs +1 -1
  150. package/lib/esm/component/Chart/BarChart.mjs +12 -6
  151. package/lib/esm/component/Chart/CigaretteChart.mjs +5 -1
  152. package/lib/esm/component/Chart/HistogramChart.mjs +1 -1
  153. package/lib/esm/component/Chart/LineChart.mjs +1 -1
  154. package/lib/esm/component/ChartLegend/BaseLegend.mjs +0 -4
  155. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +3 -1
  156. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +29 -22
  157. package/lib/esm/component/ChartLegend/LegendTable/legend-table.shadow.css +30 -14
  158. package/lib/esm/component/Cigarette/Cigarette.mjs +0 -1
  159. package/lib/esm/component/Metric/Metric.mjs +62 -0
  160. package/lib/esm/index.mjs +34 -34
  161. package/lib/esm/style/abstract-chart.shadow.css +1 -1
  162. package/lib/esm/style/area.shadow.css +0 -2
  163. package/lib/esm/style/bar.shadow.css +1 -3
  164. package/lib/esm/style/bubble.shadow.css +1 -3
  165. package/lib/esm/style/donut.shadow.css +1 -3
  166. package/lib/esm/style/dot.shadow.css +1 -3
  167. package/lib/esm/style/line.shadow.css +0 -2
  168. package/lib/esm/style/radial-tree.shadow.css +1 -3
  169. package/lib/esm/style/reference.shadow.css +1 -1
  170. package/lib/esm/style/scatterplot.shadow.css +1 -3
  171. package/lib/esm/style/tooltip.shadow.css +0 -2
  172. package/lib/esm/style/venn.shadow.css +0 -2
  173. package/lib/types/component/Chart/AbstractChart.d.ts +8 -4
  174. package/lib/types/component/Chart/AbstractChart.d.ts.map +1 -1
  175. package/lib/types/component/Chart/AbstractChart.type.d.ts +9 -7
  176. package/lib/types/component/Chart/AbstractChart.type.d.ts.map +1 -1
  177. package/lib/types/component/Chart/AreaChart.type.d.ts +1 -1
  178. package/lib/types/component/Chart/AreaChart.type.d.ts.map +1 -1
  179. package/lib/types/component/Chart/BarChart.d.ts.map +1 -1
  180. package/lib/types/component/Chart/BarChart.type.d.ts +3 -1
  181. package/lib/types/component/Chart/BarChart.type.d.ts.map +1 -1
  182. package/lib/types/component/Chart/CigaretteChart.d.ts.map +1 -1
  183. package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -1
  184. package/lib/types/component/Chart/HistogramChart.type.d.ts.map +1 -1
  185. package/lib/types/component/Chart/LineChart.type.d.ts +1 -1
  186. package/lib/types/component/Chart/LineChart.type.d.ts.map +1 -1
  187. package/lib/types/component/ChartLegend/BaseLegend.d.ts.map +1 -1
  188. package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts.map +1 -1
  189. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -3
  190. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts.map +1 -1
  191. package/lib/types/component/Metric/Metric.d.ts +9 -0
  192. package/lib/types/component/Metric/Metric.d.ts.map +1 -0
  193. package/lib/types/component/Metric/Metric.type.d.ts +33 -0
  194. package/lib/types/component/Metric/Metric.type.d.ts.map +1 -0
  195. package/lib/types/index.d.ts +5 -7
  196. package/package.json +16 -15
  197. package/lib/cjs/color.js +0 -132
  198. package/lib/cjs/color.js.map +0 -1
  199. package/lib/cjs/style/var.css +0 -125
  200. package/lib/es6/color.js +0 -127
  201. package/lib/es6/color.js.map +0 -1
  202. package/lib/es6/style/var.css +0 -125
  203. package/lib/esm/color.mjs +0 -127
@@ -14,24 +14,24 @@ var _createElement = _interopRequireDefault(require("./createElement"));
14
14
  var _Pattern = require("./Pattern");
15
15
  var _utils = require("./utils");
16
16
  /*!__reshadow-styles__:"./style/bar.shadow.css"*/
17
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SBar_avucd_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:height,width,y;transition-duration:var(--duration_avucd);transition-timing-function:ease-in-out}.___SBar_avucd_gg_.__color_avucd_gg_{fill:var(--color_avucd)}.___SBar_avucd_gg_.__pattern_avucd_gg_.__color_avucd_gg_{fill:var(--pattern_avucd);stroke:var(--color_avucd);stroke-width:1px}.___SBar_avucd_gg_.__hide_avucd_gg_{display:none}.___SBar_avucd_gg_.__transparent_avucd_gg_{opacity:.3}.___SBar_avucd_gg_.__onClick_avucd_gg_{cursor:pointer}.___SBackground_avucd_gg_{fill:var(--intergalactic-chart-grid-bar-base-bg,oklch(.92 .008 233.5));opacity:.4}.___SBackground_avucd_gg_.__onClick_avucd_gg_{cursor:pointer}.___SBarAnnotation_avucd_gg_{display:flex;justify-content:space-between}.___SBarLabel_avucd_gg_{color:var(--intergalactic-text-primary,oklch(.23 .009 245));margin-right:auto}.___SBarLabel_avucd_gg_,.___SBarPercent_avucd_gg_{font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286)}.___SBarPercent_avucd_gg_{color:var(--intergalactic-text-secondary,oklch(.182 .045 244.8/.593));margin-right:var(--intergalactic-spacing-2x,8px)}.___SBarValue_avucd_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary,oklch(.23 .009 245));font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286);text-align:right}.___SCompactHorizontalBarHoverRect_avucd_gg_{fill:var(--intergalactic-chart-grid-bar-hover,oklch(.375 .09 242.7/.05))}", /*__inner_css_end__*/"avucd_gg_"),
17
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SBar_1d6up_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:height,width,y;transition-duration:var(--duration_1d6up);transition-timing-function:ease-in-out}.___SBar_1d6up_gg_.__color_1d6up_gg_{fill:var(--color_1d6up)}.___SBar_1d6up_gg_.__pattern_1d6up_gg_.__color_1d6up_gg_{fill:var(--pattern_1d6up);stroke:var(--color_1d6up);stroke-width:1px}.___SBar_1d6up_gg_.__hide_1d6up_gg_{display:none}.___SBar_1d6up_gg_.__transparent_1d6up_gg_{opacity:.3}.___SBar_1d6up_gg_.__onClick_1d6up_gg_{cursor:pointer}.___SBackground_1d6up_gg_{fill:var(--intergalactic-chart-grid-bar-base-bg,oklch(.92 .008 233.5));opacity:.4}.___SBackground_1d6up_gg_.__onClick_1d6up_gg_{cursor:pointer}.___SBarAnnotation_1d6up_gg_{display:flex;justify-content:space-between}.___SBarLabel_1d6up_gg_{color:var(--intergalactic-text-primary,oklch(.23 .009 245));margin-right:auto}.___SBarLabel_1d6up_gg_,.___SBarPercent_1d6up_gg_{font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286)}.___SBarPercent_1d6up_gg_{color:var(--intergalactic-text-secondary,oklch(.182 .045 244.8/.593));margin-right:var(--intergalactic-spacing-2x,8px)}.___SBarValue_1d6up_gg_{min-width:52px;display:flex;justify-content:flex-end;color:var(--intergalactic-text-primary,oklch(.23 .009 245));font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,1.4286);text-align:right}.___SCompactHorizontalBarHoverRect_1d6up_gg_{fill:var(--intergalactic-chart-grid-bar-hover,oklch(.375 .09 242.7/.05))}", /*__inner_css_end__*/"1d6up_gg_"),
18
18
  /*__reshadow_css_end__*/
19
19
  {
20
- "__SBar": "___SBar_avucd_gg_",
21
- "--duration": "--duration_avucd",
22
- "_color": "__color_avucd_gg_",
23
- "--color": "--color_avucd",
24
- "_pattern": "__pattern_avucd_gg_",
25
- "--pattern": "--pattern_avucd",
26
- "_hide": "__hide_avucd_gg_",
27
- "_transparent": "__transparent_avucd_gg_",
28
- "_onClick": "__onClick_avucd_gg_",
29
- "__SBackground": "___SBackground_avucd_gg_",
30
- "__SBarAnnotation": "___SBarAnnotation_avucd_gg_",
31
- "__SBarLabel": "___SBarLabel_avucd_gg_",
32
- "__SBarPercent": "___SBarPercent_avucd_gg_",
33
- "__SBarValue": "___SBarValue_avucd_gg_",
34
- "__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_avucd_gg_"
20
+ "__SBar": "___SBar_1d6up_gg_",
21
+ "--duration": "--duration_1d6up",
22
+ "_color": "__color_1d6up_gg_",
23
+ "--color": "--color_1d6up",
24
+ "_pattern": "__pattern_1d6up_gg_",
25
+ "--pattern": "--pattern_1d6up",
26
+ "_hide": "__hide_1d6up_gg_",
27
+ "_transparent": "__transparent_1d6up_gg_",
28
+ "_onClick": "__onClick_1d6up_gg_",
29
+ "__SBackground": "___SBackground_1d6up_gg_",
30
+ "__SBarAnnotation": "___SBarAnnotation_1d6up_gg_",
31
+ "__SBarLabel": "___SBarLabel_1d6up_gg_",
32
+ "__SBarPercent": "___SBarPercent_1d6up_gg_",
33
+ "__SBarValue": "___SBarValue_1d6up_gg_",
34
+ "__SCompactHorizontalBarHoverRect": "___SCompactHorizontalBarHoverRect_1d6up_gg_"
35
35
  });
36
36
  const MIN_WIDTH = exports.MIN_WIDTH = 2;
37
37
  const calcPartBarX = (x, minWidth, width) => {
package/lib/cjs/Hover.js CHANGED
@@ -8,10 +8,8 @@ exports.HoverRect = exports.HoverLine = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _core = require("@semcore/core");
10
10
  var _canUseDOM = _interopRequireDefault(require("@semcore/core/lib/utils/canUseDOM"));
11
- var _getFocusableIn = require("@semcore/core/lib/utils/focus-lock/getFocusableIn");
12
11
  var _hasParent = require("@semcore/core/lib/utils/hasParent");
13
12
  var _rafTrottle = _interopRequireDefault(require("@semcore/core/lib/utils/rafTrottle"));
14
- var _useEnhancedEffect = _interopRequireDefault(require("@semcore/core/lib/utils/use/useEnhancedEffect"));
15
13
  var _react = _interopRequireDefault(require("react"));
16
14
  var _createElement = _interopRequireDefault(require("./createElement"));
17
15
  var _Tooltip = _interopRequireDefault(require("./Tooltip"));
@@ -297,16 +295,7 @@ function HoveredTick(props) {
297
295
  position
298
296
  } = props;
299
297
  const contentRef = _react.default.useRef(null);
300
- const [interactive, setInteractive] = _react.default.useState(false);
301
298
  const formattedValue = tickFormatter(value);
302
- const isMightBeInteractive = formattedValue !== null && typeof formattedValue === 'object';
303
- (0, _useEnhancedEffect.default)(() => {
304
- if (!isMightBeInteractive || !contentRef.current) {
305
- setInteractive(false);
306
- return;
307
- }
308
- setInteractive((0, _getFocusableIn.getFocusableIn)(contentRef.current).length > 0);
309
- });
310
299
  if (size?.width === undefined || size?.height === undefined || position === null) return null;
311
300
  const {
312
301
  width,
@@ -325,9 +314,9 @@ function HoveredTick(props) {
325
314
  "height": height,
326
315
  "data-is-first": isFirstTick,
327
316
  "data-is-last": isLastTick,
328
- "position": position,
329
- "aria-hidden": interactive ? undefined : true
317
+ "position": position
330
318
  }), /*#__PURE__*/_react.default.createElement(SHoveredTickContent, _ref5.cn("SHoveredTickContent", {
319
+ "inert": '',
331
320
  "ref": contentRef
332
321
  }), /*#__PURE__*/_react.default.createElement(SHoveredTick, _ref5.cn("SHoveredTick", {}), formattedValue)));
333
322
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Hover.js","names":["_core","require","_canUseDOM","_interopRequireDefault","_getFocusableIn","_hasParent","_rafTrottle","_useEnhancedEffect","_react","_createElement","_Tooltip","_utils","style","sstyled","insert","STROKE_WIDTH","NOTCH_WIDTH","NOTCH_DELTA","formatValue","locale","value","Date","Intl","DateTimeFormat","day","month","format","Hover","Component","constructor","args","_defineProperty2","default","xIndex","yIndex","canUseDOM","document","createElement","trottle","e","currentTarget","isTickUnder","eventEmitter","data","scale","x","y","rootRef","patterns","plotId","asProps","clientX","clientY","xScale","yScale","pX","pY","eventToPoint","current","vX","invert","vY","undefined","getIndexFromData","state","xRect","yRect","height","getBoundingClientRect","yOriginal","heightOriginal","isRootTooltip","hasParent","target","setState","diff","dimension","heightValue","emit","componentDidMount","unsubscribeMouseMoveRoot","subscribe","_","persist","handlerMouseMoveRoot","unsubscribeMouseLeaveRoot","handlerMouseLeaveRoot","componentWillUnmount","HoverLineRoot","render","_ref3","hideHoverLine","meta","isHide","SHoverLine","Element","styles","dataHints","hideTickHover","xRange","range","yRange","x1","scaleOfBandwidth","y1","Fragment","cn","HoveredTick","getTicksSize","getTicksPosition","titles","getHorizontalAxesTitle","bind","length","HoverRectRoot","_ref4","SHoverRect","xBand","scaleToBand","yBand","xStep","step","xPaddingInner","paddingInner","yStep","yPaddingInner","HOVERED_TICK_MARGIN_Y","HOVERED_TICK_PADDING_Y","HOVERED_TICK_PADDING_X","props","_ref5","tickFormatter","isFirstTick","isLastTick","size","position","contentRef","React","useRef","interactive","setInteractive","useState","formattedValue","isMightBeInteractive","useEnhancedEffect","getFocusableIn","width","SHoveredTickWrapper","SHoveredTickContent","SHoveredTick","w","tickX","tickY","HoverLineTooltip","_ref","arguments[0]","_ref6","SHoverLineTooltip","Tooltip","assignProps","HoverLine","HoverRectTooltip","_ref2","_ref7","SHoverRectTooltip","HoverRect","exports","_______childrenComponents"],"sources":["../../src/Hover.jsx"],"sourcesContent":["import { Component, sstyled, Root } from '@semcore/core';\nimport canUseDOM from '@semcore/core/lib/utils/canUseDOM';\nimport { getFocusableIn } from '@semcore/core/lib/utils/focus-lock/getFocusableIn';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\nimport trottle from '@semcore/core/lib/utils/rafTrottle';\nimport useEnhancedEffect from '@semcore/core/lib/utils/use/useEnhancedEffect';\nimport React from 'react';\n\nimport createElement from './createElement';\nimport style from './style/hover.shadow.css';\nimport Tooltip from './Tooltip';\nimport { scaleOfBandwidth, getIndexFromData, eventToPoint, invert, scaleToBand } from './utils';\n\nconst STROKE_WIDTH = 1;\nconst NOTCH_WIDTH = 9;\nconst NOTCH_DELTA = NOTCH_WIDTH / 2 - STROKE_WIDTH / 4;\n\nfunction formatValue(locale, value) {\n if (value instanceof Date) {\n return new Intl.DateTimeFormat(locale ?? 'en', {\n day: 'numeric',\n month: 'short',\n }).format(value);\n }\n return value;\n}\nclass Hover extends Component {\n static style = style;\n\n state = {\n xIndex: null,\n yIndex: null,\n };\n\n virtualElement = canUseDOM() ? document.createElement('div') : {};\n\n handlerMouseMoveRoot = trottle((e, currentTarget, isTickUnder) => {\n const { eventEmitter, data, scale, x, y, rootRef, patterns, plotId } = this.asProps;\n const { clientX, clientY } = e;\n const [xScale, yScale] = scale;\n const [pX, pY] = eventToPoint(e, rootRef.current);\n const vX = invert(xScale, pX);\n const vY = invert(yScale, pY);\n const xIndex = x === undefined || vX === undefined ? null : getIndexFromData(data, xScale, x, vX);\n const yIndex = y === undefined || vY === undefined ? null : getIndexFromData(data, yScale, y, vY);\n const state = { xIndex, yIndex, patterns };\n\n const { x: xRect, y: yRect, height } = rootRef.current.getBoundingClientRect();\n const { y: yOriginal, height: heightOriginal } = currentTarget.getBoundingClientRect();\n const isRootTooltip = hasParent(e.target, rootRef.current);\n\n this.setState(state, () => {\n let x, y;\n\n if (isRootTooltip) {\n x = clientX;\n // preserve static vertical position if it's a move on a tick.\n y = isTickUnder ? yRect + height / 2 : clientY;\n } else {\n const diff = clientY - yOriginal;\n const dimension = (diff / heightOriginal) * 100;\n const heightValue = (height / 100) * dimension;\n\n x = pX + xRect;\n // preserve static vertical position if it's a move on tick.\n y = isTickUnder ? yRect + height / 2 : yRect + heightValue;\n }\n\n eventEmitter.emit(`setTooltipPosition_${plotId}`, x, y);\n eventEmitter.emit(`setTooltipRenderingProps_${plotId}`, {}, state);\n eventEmitter.emit(`setTooltipVisible_${plotId}`, xIndex !== null || yIndex !== null);\n });\n });\n\n handlerMouseLeaveRoot = trottle(() => {\n const state = {\n xIndex: null,\n yIndex: null,\n patterns: this.asProps.patterns,\n };\n this.setState(state, () => {\n this.asProps.eventEmitter.emit(`setTooltipVisible_${this.asProps.plotId}`, false);\n });\n });\n\n componentDidMount() {\n const { eventEmitter } = this.asProps;\n this.unsubscribeMouseMoveRoot = eventEmitter.subscribe('onMouseMoveChart', (e, _, isTickUnder) => {\n e.persist();\n this.handlerMouseMoveRoot(e, e.currentTarget, isTickUnder);\n });\n this.unsubscribeMouseLeaveRoot = eventEmitter.subscribe('onMouseLeaveChart', this.handlerMouseLeaveRoot);\n }\n\n componentWillUnmount() {\n if (this.unsubscribeMouseMoveRoot) {\n this.unsubscribeMouseMoveRoot();\n }\n if (this.unsubscribeMouseLeaveRoot) {\n this.unsubscribeMouseLeaveRoot();\n }\n }\n}\n\nclass HoverLineRoot extends Hover {\n static displayName = 'HoverLine';\n\n render() {\n const { hideHoverLine, meta, locale } = this.asProps;\n const { xIndex, yIndex } = this.state;\n\n const isHide = typeof hideHoverLine === 'function' ? hideHoverLine(xIndex, yIndex) : hideHoverLine;\n\n if (isHide) {\n return null;\n }\n\n const SHoverLine = this.Element;\n const { styles, x, y, data, scale, dataHints, hideTickHover } = this.asProps;\n const [xScale, yScale] = scale;\n\n const xRange = xScale.range();\n const yRange = yScale.range();\n const x1 = xIndex !== null ? scaleOfBandwidth(xScale, data[xIndex][x]) : undefined;\n const y1 = yIndex !== null ? scaleOfBandwidth(yScale, data[yIndex][y]) : undefined;\n\n return sstyled(styles)(\n <>\n {xIndex !== null\n ? (\n <>\n <SHoverLine render='g' index={xIndex} stroke-width={STROKE_WIDTH} aria-hidden>\n <line x1={x1 - NOTCH_DELTA} x2={x1 + NOTCH_DELTA} y1={yRange[0]} y2={yRange[0]} />\n <line x1={x1} y1={yRange[0]} x2={x1} y2={yRange[1]} />\n <line x1={x1 - NOTCH_DELTA} x2={x1 + NOTCH_DELTA} y1={yRange[1]} y2={yRange[1]} />\n </SHoverLine>\n {!hideTickHover && (\n <HoveredTick\n size={meta.getTicksSize('horizontal')}\n position={meta.getTicksPosition('horizontal')}\n tickFormatter={dataHints.titles.getHorizontalAxesTitle ?? formatValue.bind(null, locale)}\n value={data[xIndex]?.[x]}\n isFirstTick={xIndex === 0}\n isLastTick={xIndex === data.length - 1}\n styles={styles}\n x={x1}\n yRange={yRange}\n />\n )}\n </>\n )\n : null}\n {yIndex !== null\n ? (\n <SHoverLine render='g' index={yIndex} stroke-width={STROKE_WIDTH} aria-hidden>\n <line x1={xRange[0]} y1={y1 - NOTCH_DELTA} x2={xRange[0]} y2={y1 + NOTCH_DELTA} />\n <line x1={xRange[0]} y1={y1} x2={xRange[1]} y2={y1} />\n <line x1={xRange[1]} y1={y1 - NOTCH_DELTA} x2={xRange[1]} y2={y1 + NOTCH_DELTA} />\n </SHoverLine>\n )\n : null}\n </>,\n );\n }\n}\n\nclass HoverRectRoot extends Hover {\n static displayName = 'HoverRect';\n\n render() {\n const { hideHoverLine, meta } = this.asProps;\n\n if (hideHoverLine) {\n return null;\n }\n\n const SHoverRect = this.Element;\n const { styles, x, y, data, scale, dataHints, hideTickHover, locale } = this.asProps;\n const { xIndex, yIndex } = this.state;\n const [xScale, yScale] = scale;\n\n const xRange = xScale.range();\n const yRange = yScale.range();\n const xBand = scaleToBand(xScale);\n const yBand = scaleToBand(yScale);\n\n const xStep = xBand.step();\n const xPaddingInner = xBand.paddingInner();\n const yStep = yBand.step();\n const yPaddingInner = yBand.paddingInner();\n\n return sstyled(styles)(\n <>\n {xIndex !== null && (\n <>\n <SHoverRect\n aria-hidden\n render='rect'\n index={xIndex}\n width={xStep - xPaddingInner / 2}\n height={yRange[0] - yRange[1]}\n x={xScale(data[xIndex][x]) - (xStep * xPaddingInner) / 2}\n y={yRange[1]}\n />\n {!hideTickHover && (\n <HoveredTick\n size={meta.getTicksSize('horizontal')}\n position={meta.getTicksPosition('horizontal')}\n tickFormatter={dataHints.titles.getHorizontalAxesTitle ?? formatValue.bind(null, locale)}\n value={data[xIndex]?.[x]}\n styles={styles}\n x={xScale(data[xIndex][x]) + (xStep * (1 - xPaddingInner)) / 2}\n yRange={yRange}\n />\n )}\n </>\n )}\n {yIndex !== null && (\n <SHoverRect\n aria-hidden\n render='rect'\n index={yIndex}\n width={xRange[1] - xRange[0]}\n height={yStep - yPaddingInner / 2}\n x={xRange[0]}\n y={yScale(data[yIndex][y]) - (yStep * yPaddingInner) / 2}\n />\n )}\n </>,\n );\n }\n}\n\nconst HOVERED_TICK_MARGIN_Y = 8;\nconst HOVERED_TICK_PADDING_Y = 3;\nconst HOVERED_TICK_PADDING_X = 12;\n\nfunction HoveredTick(props) {\n const { tickFormatter, value, isFirstTick = false, isLastTick = false, styles, x, yRange, size, position } = props;\n\n const contentRef = React.useRef(null);\n const [interactive, setInteractive] = React.useState(false);\n\n const formattedValue = tickFormatter(value);\n\n const isMightBeInteractive = formattedValue !== null && typeof formattedValue === 'object';\n\n useEnhancedEffect(() => {\n if (!isMightBeInteractive || !contentRef.current) {\n setInteractive(false);\n return;\n }\n\n setInteractive(getFocusableIn(contentRef.current).length > 0);\n });\n\n if (size?.width === undefined || size?.height === undefined || position === null) return null;\n\n const { width, height } = size;\n\n const SHoveredTickWrapper = 'foreignObject';\n const SHoveredTickContent = 'div';\n const SHoveredTick = 'span';\n\n const w = width + HOVERED_TICK_PADDING_X * 2;\n const tickX = isFirstTick\n ? x\n : isLastTick\n ? x - w\n : x - w / 2;\n const tickY = position === 'top'\n ? yRange[1] - height - HOVERED_TICK_MARGIN_Y + HOVERED_TICK_PADDING_Y\n : yRange[0] + HOVERED_TICK_MARGIN_Y - HOVERED_TICK_PADDING_Y;\n\n return sstyled(styles)(\n <SHoveredTickWrapper\n x={tickX}\n y={tickY}\n width={w}\n height={height}\n data-is-first={isFirstTick}\n data-is-last={isLastTick}\n position={position}\n aria-hidden={interactive ? undefined : true}\n >\n <SHoveredTickContent ref={contentRef}>\n <SHoveredTick>{formattedValue}</SHoveredTick>\n </SHoveredTickContent>\n </SHoveredTickWrapper>,\n );\n}\n\nfunction HoverLineTooltip(props) {\n const SHoverLineTooltip = Root;\n return sstyled(props.styles)(<SHoverLineTooltip render={Tooltip} tag={HoverLine} excludeAnchorProps />);\n}\nfunction HoverRectTooltip(props) {\n const SHoverRectTooltip = Root;\n return sstyled(props.styles)(<SHoverRectTooltip render={Tooltip} tag={HoverRect} excludeAnchorProps />);\n}\n\nconst HoverLine = createElement(HoverLineRoot, {\n Tooltip: [HoverLineTooltip, Tooltip._______childrenComponents],\n});\nconst HoverRect = createElement(HoverRectRoot, {\n Tooltip: [HoverRectTooltip, Tooltip._______childrenComponents],\n});\n\nexport { HoverLine, HoverRect };\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,kBAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,MAAA,GAAAL,sBAAA,CAAAF,OAAA;AAEA,IAAAQ,cAAA,GAAAN,sBAAA,CAAAF,OAAA;AAEA,IAAAS,QAAA,GAAAP,sBAAA,CAAAF,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AAAgG;AAAA,MAAAW,KAAA,8BAAAZ,KAAA,CAAAa,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAEhG,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,WAAW,GAAG,CAAC;AACrB,MAAMC,WAAW,GAAGD,WAAW,GAAG,CAAC,GAAGD,YAAY,GAAG,CAAC;AAEtD,SAASG,WAAWA,CAACC,MAAM,EAAEC,KAAK,EAAE;EAClC,IAAIA,KAAK,YAAYC,IAAI,EAAE;IACzB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List":[]}
1
+ {"version":3,"file":"Hover.js","names":["_core","require","_canUseDOM","_interopRequireDefault","_hasParent","_rafTrottle","_react","_createElement","_Tooltip","_utils","style","sstyled","insert","STROKE_WIDTH","NOTCH_WIDTH","NOTCH_DELTA","formatValue","locale","value","Date","Intl","DateTimeFormat","day","month","format","Hover","Component","constructor","args","_defineProperty2","default","xIndex","yIndex","canUseDOM","document","createElement","trottle","e","currentTarget","isTickUnder","eventEmitter","data","scale","x","y","rootRef","patterns","plotId","asProps","clientX","clientY","xScale","yScale","pX","pY","eventToPoint","current","vX","invert","vY","undefined","getIndexFromData","state","xRect","yRect","height","getBoundingClientRect","yOriginal","heightOriginal","isRootTooltip","hasParent","target","setState","diff","dimension","heightValue","emit","componentDidMount","unsubscribeMouseMoveRoot","subscribe","_","persist","handlerMouseMoveRoot","unsubscribeMouseLeaveRoot","handlerMouseLeaveRoot","componentWillUnmount","HoverLineRoot","render","_ref3","hideHoverLine","meta","isHide","SHoverLine","Element","styles","dataHints","hideTickHover","xRange","range","yRange","x1","scaleOfBandwidth","y1","Fragment","cn","HoveredTick","getTicksSize","getTicksPosition","titles","getHorizontalAxesTitle","bind","length","HoverRectRoot","_ref4","SHoverRect","xBand","scaleToBand","yBand","xStep","step","xPaddingInner","paddingInner","yStep","yPaddingInner","HOVERED_TICK_MARGIN_Y","HOVERED_TICK_PADDING_Y","HOVERED_TICK_PADDING_X","props","_ref5","tickFormatter","isFirstTick","isLastTick","size","position","contentRef","React","useRef","formattedValue","width","SHoveredTickWrapper","SHoveredTickContent","SHoveredTick","w","tickX","tickY","HoverLineTooltip","_ref","arguments[0]","_ref6","SHoverLineTooltip","Tooltip","assignProps","HoverLine","HoverRectTooltip","_ref2","_ref7","SHoverRectTooltip","HoverRect","exports","_______childrenComponents"],"sources":["../../src/Hover.jsx"],"sourcesContent":["import { Component, sstyled, Root } from '@semcore/core';\nimport canUseDOM from '@semcore/core/lib/utils/canUseDOM';\nimport { hasParent } from '@semcore/core/lib/utils/hasParent';\nimport trottle from '@semcore/core/lib/utils/rafTrottle';\nimport React from 'react';\n\nimport createElement from './createElement';\nimport style from './style/hover.shadow.css';\nimport Tooltip from './Tooltip';\nimport { scaleOfBandwidth, getIndexFromData, eventToPoint, invert, scaleToBand } from './utils';\n\nconst STROKE_WIDTH = 1;\nconst NOTCH_WIDTH = 9;\nconst NOTCH_DELTA = NOTCH_WIDTH / 2 - STROKE_WIDTH / 4;\n\nfunction formatValue(locale, value) {\n if (value instanceof Date) {\n return new Intl.DateTimeFormat(locale ?? 'en', {\n day: 'numeric',\n month: 'short',\n }).format(value);\n }\n return value;\n}\nclass Hover extends Component {\n static style = style;\n\n state = {\n xIndex: null,\n yIndex: null,\n };\n\n virtualElement = canUseDOM() ? document.createElement('div') : {};\n\n handlerMouseMoveRoot = trottle((e, currentTarget, isTickUnder) => {\n const { eventEmitter, data, scale, x, y, rootRef, patterns, plotId } = this.asProps;\n const { clientX, clientY } = e;\n const [xScale, yScale] = scale;\n const [pX, pY] = eventToPoint(e, rootRef.current);\n const vX = invert(xScale, pX);\n const vY = invert(yScale, pY);\n const xIndex = x === undefined || vX === undefined ? null : getIndexFromData(data, xScale, x, vX);\n const yIndex = y === undefined || vY === undefined ? null : getIndexFromData(data, yScale, y, vY);\n const state = { xIndex, yIndex, patterns };\n\n const { x: xRect, y: yRect, height } = rootRef.current.getBoundingClientRect();\n const { y: yOriginal, height: heightOriginal } = currentTarget.getBoundingClientRect();\n const isRootTooltip = hasParent(e.target, rootRef.current);\n\n this.setState(state, () => {\n let x, y;\n\n if (isRootTooltip) {\n x = clientX;\n // preserve static vertical position if it's a move on a tick.\n y = isTickUnder ? yRect + height / 2 : clientY;\n } else {\n const diff = clientY - yOriginal;\n const dimension = (diff / heightOriginal) * 100;\n const heightValue = (height / 100) * dimension;\n\n x = pX + xRect;\n // preserve static vertical position if it's a move on tick.\n y = isTickUnder ? yRect + height / 2 : yRect + heightValue;\n }\n\n eventEmitter.emit(`setTooltipPosition_${plotId}`, x, y);\n eventEmitter.emit(`setTooltipRenderingProps_${plotId}`, {}, state);\n eventEmitter.emit(`setTooltipVisible_${plotId}`, xIndex !== null || yIndex !== null);\n });\n });\n\n handlerMouseLeaveRoot = trottle(() => {\n const state = {\n xIndex: null,\n yIndex: null,\n patterns: this.asProps.patterns,\n };\n this.setState(state, () => {\n this.asProps.eventEmitter.emit(`setTooltipVisible_${this.asProps.plotId}`, false);\n });\n });\n\n componentDidMount() {\n const { eventEmitter } = this.asProps;\n this.unsubscribeMouseMoveRoot = eventEmitter.subscribe('onMouseMoveChart', (e, _, isTickUnder) => {\n e.persist();\n this.handlerMouseMoveRoot(e, e.currentTarget, isTickUnder);\n });\n this.unsubscribeMouseLeaveRoot = eventEmitter.subscribe('onMouseLeaveChart', this.handlerMouseLeaveRoot);\n }\n\n componentWillUnmount() {\n if (this.unsubscribeMouseMoveRoot) {\n this.unsubscribeMouseMoveRoot();\n }\n if (this.unsubscribeMouseLeaveRoot) {\n this.unsubscribeMouseLeaveRoot();\n }\n }\n}\n\nclass HoverLineRoot extends Hover {\n static displayName = 'HoverLine';\n\n render() {\n const { hideHoverLine, meta, locale } = this.asProps;\n const { xIndex, yIndex } = this.state;\n\n const isHide = typeof hideHoverLine === 'function' ? hideHoverLine(xIndex, yIndex) : hideHoverLine;\n\n if (isHide) {\n return null;\n }\n\n const SHoverLine = this.Element;\n const { styles, x, y, data, scale, dataHints, hideTickHover } = this.asProps;\n const [xScale, yScale] = scale;\n\n const xRange = xScale.range();\n const yRange = yScale.range();\n const x1 = xIndex !== null ? scaleOfBandwidth(xScale, data[xIndex][x]) : undefined;\n const y1 = yIndex !== null ? scaleOfBandwidth(yScale, data[yIndex][y]) : undefined;\n\n return sstyled(styles)(\n <>\n {xIndex !== null\n ? (\n <>\n <SHoverLine render='g' index={xIndex} stroke-width={STROKE_WIDTH} aria-hidden>\n <line x1={x1 - NOTCH_DELTA} x2={x1 + NOTCH_DELTA} y1={yRange[0]} y2={yRange[0]} />\n <line x1={x1} y1={yRange[0]} x2={x1} y2={yRange[1]} />\n <line x1={x1 - NOTCH_DELTA} x2={x1 + NOTCH_DELTA} y1={yRange[1]} y2={yRange[1]} />\n </SHoverLine>\n {!hideTickHover && (\n <HoveredTick\n size={meta.getTicksSize('horizontal')}\n position={meta.getTicksPosition('horizontal')}\n tickFormatter={dataHints.titles.getHorizontalAxesTitle ?? formatValue.bind(null, locale)}\n value={data[xIndex]?.[x]}\n isFirstTick={xIndex === 0}\n isLastTick={xIndex === data.length - 1}\n styles={styles}\n x={x1}\n yRange={yRange}\n />\n )}\n </>\n )\n : null}\n {yIndex !== null\n ? (\n <SHoverLine render='g' index={yIndex} stroke-width={STROKE_WIDTH} aria-hidden>\n <line x1={xRange[0]} y1={y1 - NOTCH_DELTA} x2={xRange[0]} y2={y1 + NOTCH_DELTA} />\n <line x1={xRange[0]} y1={y1} x2={xRange[1]} y2={y1} />\n <line x1={xRange[1]} y1={y1 - NOTCH_DELTA} x2={xRange[1]} y2={y1 + NOTCH_DELTA} />\n </SHoverLine>\n )\n : null}\n </>,\n );\n }\n}\n\nclass HoverRectRoot extends Hover {\n static displayName = 'HoverRect';\n\n render() {\n const { hideHoverLine, meta } = this.asProps;\n\n if (hideHoverLine) {\n return null;\n }\n\n const SHoverRect = this.Element;\n const { styles, x, y, data, scale, dataHints, hideTickHover, locale } = this.asProps;\n const { xIndex, yIndex } = this.state;\n const [xScale, yScale] = scale;\n\n const xRange = xScale.range();\n const yRange = yScale.range();\n const xBand = scaleToBand(xScale);\n const yBand = scaleToBand(yScale);\n\n const xStep = xBand.step();\n const xPaddingInner = xBand.paddingInner();\n const yStep = yBand.step();\n const yPaddingInner = yBand.paddingInner();\n\n return sstyled(styles)(\n <>\n {xIndex !== null && (\n <>\n <SHoverRect\n aria-hidden\n render='rect'\n index={xIndex}\n width={xStep - xPaddingInner / 2}\n height={yRange[0] - yRange[1]}\n x={xScale(data[xIndex][x]) - (xStep * xPaddingInner) / 2}\n y={yRange[1]}\n />\n {!hideTickHover && (\n <HoveredTick\n size={meta.getTicksSize('horizontal')}\n position={meta.getTicksPosition('horizontal')}\n tickFormatter={dataHints.titles.getHorizontalAxesTitle ?? formatValue.bind(null, locale)}\n value={data[xIndex]?.[x]}\n styles={styles}\n x={xScale(data[xIndex][x]) + (xStep * (1 - xPaddingInner)) / 2}\n yRange={yRange}\n />\n )}\n </>\n )}\n {yIndex !== null && (\n <SHoverRect\n aria-hidden\n render='rect'\n index={yIndex}\n width={xRange[1] - xRange[0]}\n height={yStep - yPaddingInner / 2}\n x={xRange[0]}\n y={yScale(data[yIndex][y]) - (yStep * yPaddingInner) / 2}\n />\n )}\n </>,\n );\n }\n}\n\nconst HOVERED_TICK_MARGIN_Y = 8;\nconst HOVERED_TICK_PADDING_Y = 3;\nconst HOVERED_TICK_PADDING_X = 12;\n\nfunction HoveredTick(props) {\n const { tickFormatter, value, isFirstTick = false, isLastTick = false, styles, x, yRange, size, position } = props;\n\n const contentRef = React.useRef(null);\n\n const formattedValue = tickFormatter(value);\n\n if (size?.width === undefined || size?.height === undefined || position === null) return null;\n\n const { width, height } = size;\n\n const SHoveredTickWrapper = 'foreignObject';\n const SHoveredTickContent = 'div';\n const SHoveredTick = 'span';\n\n const w = width + HOVERED_TICK_PADDING_X * 2;\n const tickX = isFirstTick\n ? x\n : isLastTick\n ? x - w\n : x - w / 2;\n const tickY = position === 'top'\n ? yRange[1] - height - HOVERED_TICK_MARGIN_Y + HOVERED_TICK_PADDING_Y\n : yRange[0] + HOVERED_TICK_MARGIN_Y - HOVERED_TICK_PADDING_Y;\n\n return sstyled(styles)(\n <SHoveredTickWrapper\n x={tickX}\n y={tickY}\n width={w}\n height={height}\n data-is-first={isFirstTick}\n data-is-last={isLastTick}\n position={position}\n >\n <SHoveredTickContent inert='' ref={contentRef}>\n <SHoveredTick>{formattedValue}</SHoveredTick>\n </SHoveredTickContent>\n </SHoveredTickWrapper>,\n );\n}\n\nfunction HoverLineTooltip(props) {\n const SHoverLineTooltip = Root;\n return sstyled(props.styles)(<SHoverLineTooltip render={Tooltip} tag={HoverLine} excludeAnchorProps />);\n}\nfunction HoverRectTooltip(props) {\n const SHoverRectTooltip = Root;\n return sstyled(props.styles)(<SHoverRectTooltip render={Tooltip} tag={HoverRect} excludeAnchorProps />);\n}\n\nconst HoverLine = createElement(HoverLineRoot, {\n Tooltip: [HoverLineTooltip, Tooltip._______childrenComponents],\n});\nconst HoverRect = createElement(HoverRectRoot, {\n Tooltip: [HoverRectTooltip, Tooltip._______childrenComponents],\n});\n\nexport { HoverLine, HoverRect };\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAH,sBAAA,CAAAF,OAAA;AAEA,IAAAM,cAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAEA,IAAAO,QAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAAgG;AAAA,MAAAS,KAAA,8BAAAV,KAAA,CAAAW,OAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAEhG,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,WAAW,GAAG,CAAC;AACrB,MAAMC,WAAW,GAAGD,WAAW,GAAG,CAAC,GAAGD,YAAY,GAAG,CAAC;AAEtD,SAASG,WAAWA,CAACC,MAAM,EAAEC,KAAK,EAAE;EAClC,IAAIA,KAAK,YAAYC,IAAI,EAAE;IACzB,OAAO,IAAIC,IAAI,CAACC,cAAc,CAACJ,MAAM,IAAI,IAAI,EAAE;MAC7CK,GAAG,EAAE,SAAS;MACdC,KAAK,EAAE;IACT,CAAC,CAAC,CAACC,MAAM,CAACN,KAAK,CAAC;EAClB;EACA,OAAOA,KAAK;AACd;AACA,M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AAAhJ,aAAO,EAACoH,KAAK,CAACjC,MAAM,CAAC,eAACxF,MAAA,CAAAwB,OAAA,CAAAK,aAAA,CAACyH,iBAAiB,EAAAD,KAAA,CAAAnD,EAAA;IAAA,OAAAxG,KAAA,CAAAuJ,WAAA;MAAA,OAAuBM,SAAS;MAAA;IAAA,GAAAH,KAAA;EAAA,EAAsB,CAAC;AACxG;AAEA,MAAMF,SAAS,GAAAM,OAAA,CAAAN,SAAA,GAAG,IAAArH,sBAAa,EAACmD,aAAa,EAAE;EAC7CgE,OAAO,EAAE,CAACL,gBAAgB,EAAEK,gBAAO,CAACS,yBAAyB;AAC/D,CAAC,CAAC;AACF,MAAMF,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAG,IAAA1H,sBAAa,EAAC6E,aAAa,EAAE;EAC7CsC,OAAO,EAAE,CAACG,gBAAgB,EAAEH,gBAAO,CAACS,yBAAyB;AAC/D,CAAC,CAAC","ignoreList":[]}
package/lib/cjs/Line.js CHANGED
@@ -20,17 +20,17 @@ var _Dots = _interopRequireDefault(require("./Dots"));
20
20
  var _Pattern = require("./Pattern");
21
21
  var _utils = require("./utils");
22
22
  /*!__reshadow-styles__:"./style/line.shadow.css"*/
23
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SLine_1g38p_gg_{fill:#0000;stroke-width:2;stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:d;transition-duration:var(--duration_1g38p);transition-timing-function:ease-in-out}.___SLine_1g38p_gg_.__color_1g38p_gg_{stroke:var(--color_1g38p)}.___SLine_1g38p_gg_.__hide_1g38p_gg_{display:none}.___SLine_1g38p_gg_.__transparent_1g38p_gg_{opacity:.3}.___SNull_1g38p_gg_{fill:#0000;stroke:var(--intergalactic-chart-palette-order-null,oklch(.9 .009 234));stroke-dasharray:4}.___SNull_1g38p_gg_.__hide_1g38p_gg_{display:none}.___SLineArea_1g38p_gg_{transition-property:d;transition-duration:var(--duration_1g38p);transition-timing-function:ease-in-out;opacity:.3;fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245))}.___SLineArea_1g38p_gg_.__color_1g38p_gg_{fill:var(--color_1g38p)}", /*__inner_css_end__*/"1g38p_gg_"),
23
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SLine_foqqi_gg_{fill:#0000;stroke-width:2;stroke:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:d;transition-duration:var(--duration_foqqi);transition-timing-function:ease-in-out}.___SLine_foqqi_gg_.__color_foqqi_gg_{stroke:var(--color_foqqi)}.___SLine_foqqi_gg_.__hide_foqqi_gg_{display:none}.___SLine_foqqi_gg_.__transparent_foqqi_gg_{opacity:.3}.___SNull_foqqi_gg_{fill:#0000;stroke:var(--intergalactic-chart-palette-order-null,oklch(.9 .009 234));stroke-dasharray:4}.___SNull_foqqi_gg_.__hide_foqqi_gg_{display:none}.___SLineArea_foqqi_gg_{transition-property:d;transition-duration:var(--duration_foqqi);transition-timing-function:ease-in-out;opacity:.3;fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245))}.___SLineArea_foqqi_gg_.__color_foqqi_gg_{fill:var(--color_foqqi)}", /*__inner_css_end__*/"foqqi_gg_"),
24
24
  /*__reshadow_css_end__*/
25
25
  {
26
- "__SLine": "___SLine_1g38p_gg_",
27
- "--duration": "--duration_1g38p",
28
- "_color": "__color_1g38p_gg_",
29
- "--color": "--color_1g38p",
30
- "_hide": "__hide_1g38p_gg_",
31
- "_transparent": "__transparent_1g38p_gg_",
32
- "__SNull": "___SNull_1g38p_gg_",
33
- "__SLineArea": "___SLineArea_1g38p_gg_"
26
+ "__SLine": "___SLine_foqqi_gg_",
27
+ "--duration": "--duration_foqqi",
28
+ "_color": "__color_foqqi_gg_",
29
+ "--color": "--color_foqqi",
30
+ "_hide": "__hide_foqqi_gg_",
31
+ "_transparent": "__transparent_foqqi_gg_",
32
+ "__SNull": "___SNull_foqqi_gg_",
33
+ "__SLineArea": "___SLineArea_foqqi_gg_"
34
34
  });
35
35
  class LineRoot extends _core.Component {
36
36
  getDotsProps() {
@@ -17,20 +17,20 @@ var _createElement = _interopRequireDefault(require("./createElement"));
17
17
  var _Pattern = require("./Pattern");
18
18
  var _utils = require("./utils");
19
19
  /*!__reshadow-styles__:"./style/radial-tree.shadow.css"*/
20
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SRadian_tu12w_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info,oklch(.23 .009 245))}.___SLine_tu12w_gg_{stroke:var(--intergalactic-text-large-info,oklch(.23 .009 245))}.___SLine_tu12w_gg_.__stroke_tu12w_gg_{stroke:var(--stroke_tu12w)}.___SLine_tu12w_gg_.__transparent_tu12w_gg_{opacity:.3}.___SCap_tu12w_gg_{transition:r .1s}.___SCap_tu12w_gg_.__pattern_tu12w_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:1px}.___SCap_tu12w_gg_.__transparent_tu12w_gg_,.___SIcon_tu12w_gg_.__transparent_tu12w_gg_{opacity:.3}.___SLabel_tu12w_gg_{fill:var(--color_tu12w)}.___SLabel_tu12w_gg_.__transparent_tu12w_gg_{opacity:.3}@media (hover:hover){.___SRadian_tu12w_gg_:hover .___SLabel_tu12w_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_tu12w_gg_{transition:none}}", /*__inner_css_end__*/"tu12w_gg_"),
20
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SRadian_1u9s6_gg_{cursor:pointer;fill:var(--intergalactic-text-large-info,oklch(.23 .009 245))}.___SLine_1u9s6_gg_{stroke:var(--intergalactic-text-large-info,oklch(.23 .009 245))}.___SLine_1u9s6_gg_.__stroke_1u9s6_gg_{stroke:var(--stroke_1u9s6)}.___SLine_1u9s6_gg_.__transparent_1u9s6_gg_{opacity:.3}.___SCap_1u9s6_gg_{transition:r .1s}.___SCap_1u9s6_gg_.__pattern_1u9s6_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:1px}.___SCap_1u9s6_gg_.__transparent_1u9s6_gg_,.___SIcon_1u9s6_gg_.__transparent_1u9s6_gg_{opacity:.3}.___SLabel_1u9s6_gg_{fill:var(--color_1u9s6)}.___SLabel_1u9s6_gg_.__transparent_1u9s6_gg_{opacity:.3}@media (hover:hover){.___SRadian_1u9s6_gg_:hover .___SLabel_1u9s6_gg_{cursor:pointer;filter:brightness(.6)}}@media (prefers-reduced-motion){.___SLineCap_1u9s6_gg_{transition:none}}", /*__inner_css_end__*/"1u9s6_gg_"),
21
21
  /*__reshadow_css_end__*/
22
22
  {
23
- "__SRadian": "___SRadian_tu12w_gg_",
24
- "__SLine": "___SLine_tu12w_gg_",
25
- "_stroke": "__stroke_tu12w_gg_",
26
- "--stroke": "--stroke_tu12w",
27
- "_transparent": "__transparent_tu12w_gg_",
28
- "__SCap": "___SCap_tu12w_gg_",
29
- "_pattern": "__pattern_tu12w_gg_",
30
- "__SIcon": "___SIcon_tu12w_gg_",
31
- "__SLabel": "___SLabel_tu12w_gg_",
32
- "--color": "--color_tu12w",
33
- "__SLineCap": "___SLineCap_tu12w_gg_"
23
+ "__SRadian": "___SRadian_1u9s6_gg_",
24
+ "__SLine": "___SLine_1u9s6_gg_",
25
+ "_stroke": "__stroke_1u9s6_gg_",
26
+ "--stroke": "--stroke_1u9s6",
27
+ "_transparent": "__transparent_1u9s6_gg_",
28
+ "__SCap": "___SCap_1u9s6_gg_",
29
+ "_pattern": "__pattern_1u9s6_gg_",
30
+ "__SIcon": "___SIcon_1u9s6_gg_",
31
+ "__SLabel": "___SLabel_1u9s6_gg_",
32
+ "--color": "--color_1u9s6",
33
+ "__SLineCap": "___SLineCap_1u9s6_gg_"
34
34
  });
35
35
  const baseAngle = -Math.PI / 2; // The top vertical line
36
36
 
@@ -12,20 +12,20 @@ var _react = _interopRequireDefault(require("react"));
12
12
  var _createElement = _interopRequireDefault(require("./createElement"));
13
13
  var _utils = require("./utils");
14
14
  /*!__reshadow-styles__:"./style/reference.shadow.css"*/
15
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SReferenceLine_w3kqr_gg_{fill:none;stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .011 234.9))}.___STitle_w3kqr_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label,#00132466);transform-origin:var(--transform-origin_w3kqr)}.___STitle_w3kqr_gg_._position_top_w3kqr_gg_{text-anchor:middle}.___STitle_w3kqr_gg_._position_bottom_w3kqr_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_w3kqr_gg_._position_left_w3kqr_gg_,.___STitle_w3kqr_gg_._position_right_w3kqr_gg_{transform:rotate(-90deg);dominant-baseline:middle;text-anchor:middle}.___SBackground_w3kqr_gg_{fill:var(--intergalactic-chart-grid-period-bg,oklch(.96 .005 232.5))}.___SStripes_w3kqr_gg_{fill:var(--fill_w3kqr)}.___SStripesPatternPath_w3kqr_gg_{stroke:var(--intergalactic-chart-grid-period-pattern,oklch(.95 .006 232.7));stroke-width:1px}", /*__inner_css_end__*/"w3kqr_gg_"),
15
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SReferenceLine_103dp_gg_{fill:none;stroke:var(--intergalactic-chart-grid-y-accent-hover-line,oklch(.88 .011 234.9))}.___STitle_103dp_gg_{font-size:var(--intergalactic-fs-100,12px);fill:var(--intergalactic-chart-grid-text-label,#00132466);transform-origin:var(--transform-origin_103dp)}.___STitle_103dp_gg_._position_top_103dp_gg_{text-anchor:middle}.___STitle_103dp_gg_._position_bottom_103dp_gg_{text-anchor:middle;dominant-baseline:hanging}.___STitle_103dp_gg_._position_left_103dp_gg_,.___STitle_103dp_gg_._position_right_103dp_gg_{transform:rotate(-90deg);dominant-baseline:middle;text-anchor:middle}.___SBackground_103dp_gg_{fill:var(--intergalactic-chart-grid-period-bg,oklch(.96 .005 232.5))}.___SStripes_103dp_gg_{fill:var(--fill_103dp)}.___SStripesPatternPath_103dp_gg_{stroke:var(--intergalactic-chart-grid-period-pattern,oklch(.95 .006 232.7));stroke-width:1px}", /*__inner_css_end__*/"103dp_gg_"),
16
16
  /*__reshadow_css_end__*/
17
17
  {
18
- "__SReferenceLine": "___SReferenceLine_w3kqr_gg_",
19
- "__STitle": "___STitle_w3kqr_gg_",
20
- "--transform-origin": "--transform-origin_w3kqr",
21
- "_position_top": "_position_top_w3kqr_gg_",
22
- "_position_bottom": "_position_bottom_w3kqr_gg_",
23
- "_position_right": "_position_right_w3kqr_gg_",
24
- "_position_left": "_position_left_w3kqr_gg_",
25
- "__SBackground": "___SBackground_w3kqr_gg_",
26
- "__SStripes": "___SStripes_w3kqr_gg_",
27
- "--fill": "--fill_w3kqr",
28
- "__SStripesPatternPath": "___SStripesPatternPath_w3kqr_gg_"
18
+ "__SReferenceLine": "___SReferenceLine_103dp_gg_",
19
+ "__STitle": "___STitle_103dp_gg_",
20
+ "--transform-origin": "--transform-origin_103dp",
21
+ "_position_top": "_position_top_103dp_gg_",
22
+ "_position_bottom": "_position_bottom_103dp_gg_",
23
+ "_position_right": "_position_right_103dp_gg_",
24
+ "_position_left": "_position_left_103dp_gg_",
25
+ "__SBackground": "___SBackground_103dp_gg_",
26
+ "__SStripes": "___SStripes_103dp_gg_",
27
+ "--fill": "--fill_103dp",
28
+ "__SStripesPatternPath": "___SStripesPatternPath_103dp_gg_"
29
29
  });
30
30
  const STROKE_WIDTH = 1;
31
31
  const NOTCH_WIDTH = 9;
@@ -16,17 +16,17 @@ var _Pattern = require("./Pattern");
16
16
  var _Tooltip = _interopRequireDefault(require("./Tooltip"));
17
17
  var _utils = require("./utils");
18
18
  /*!__reshadow-styles__:"./style/scatterplot.shadow.css"*/
19
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SScatterPlot_srw2j_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:cx,cy;transition-duration:var(--duration_srw2j);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_srw2j_gg_:hover{opacity:.8}}.___SScatterPlot_srw2j_gg_.__color_srw2j_gg_{fill:var(--color_srw2j)}.___SScatterPlot_srw2j_gg_.__pattern_srw2j_gg_.__color_srw2j_gg_{fill:var(--pattern_srw2j);stroke:var(--color_srw2j);stroke-width:1px}.___SScatterPlot_srw2j_gg_.__transparent_srw2j_gg_{opacity:.3}.___SValue_srw2j_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50,10px);stroke:var(--intergalactic-chart-palette-order-9,oklch(.53 .157 279.2))}.___SValue_srw2j_gg_.__color_srw2j_gg_{stroke:var(--color_srw2j)}.___SValue_srw2j_gg_.__transparent_srw2j_gg_{opacity:.3}", /*__inner_css_end__*/"srw2j_gg_"),
19
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SScatterPlot_v4rqi_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.23 .009 245));transition-property:cx,cy;transition-duration:var(--duration_v4rqi);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_v4rqi_gg_:hover{opacity:.8}}.___SScatterPlot_v4rqi_gg_.__color_v4rqi_gg_{fill:var(--color_v4rqi)}.___SScatterPlot_v4rqi_gg_.__pattern_v4rqi_gg_.__color_v4rqi_gg_{fill:var(--pattern_v4rqi);stroke:var(--color_v4rqi);stroke-width:1px}.___SScatterPlot_v4rqi_gg_.__transparent_v4rqi_gg_{opacity:.3}.___SValue_v4rqi_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50,10px);stroke:var(--intergalactic-chart-palette-order-9,oklch(.53 .157 279.2))}.___SValue_v4rqi_gg_.__color_v4rqi_gg_{stroke:var(--color_v4rqi)}.___SValue_v4rqi_gg_.__transparent_v4rqi_gg_{opacity:.3}", /*__inner_css_end__*/"v4rqi_gg_"),
20
20
  /*__reshadow_css_end__*/
21
21
  {
22
- "__SScatterPlot": "___SScatterPlot_srw2j_gg_",
23
- "_color": "__color_srw2j_gg_",
24
- "--color": "--color_srw2j",
25
- "_pattern": "__pattern_srw2j_gg_",
26
- "--pattern": "--pattern_srw2j",
27
- "_transparent": "__transparent_srw2j_gg_",
28
- "__SValue": "___SValue_srw2j_gg_",
29
- "--duration": "--duration_srw2j"
22
+ "__SScatterPlot": "___SScatterPlot_v4rqi_gg_",
23
+ "_color": "__color_v4rqi_gg_",
24
+ "--color": "--color_v4rqi",
25
+ "_pattern": "__pattern_v4rqi_gg_",
26
+ "--pattern": "--pattern_v4rqi",
27
+ "_transparent": "__transparent_v4rqi_gg_",
28
+ "__SValue": "___SValue_v4rqi_gg_",
29
+ "--duration": "--duration_v4rqi"
30
30
  });
31
31
  class ScatterPlotRoot extends _core.Component {
32
32
  constructor(...args) {
@@ -15,20 +15,20 @@ var _createElement = _interopRequireDefault(require("./createElement"));
15
15
  var _Pattern = require("./Pattern");
16
16
  var _utils = require("./utils");
17
17
  /*!__reshadow-styles__:"./style/tooltip.shadow.css"*/
18
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___STooltip_5s0wq_gg_{font-size:var(--intergalactic-fs-100,12px);line-height:var(--intergalactic-lh-100,1.3334);font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;position:relative;color:var(--intergalactic-text-primary-invert,oklch(.991 .005 232.5/.959));background-color:var(--intergalactic-tooltip-bg-invert,oklch(.23 .009 245));border-radius:var(--intergalactic-popper-rounded,6px);border:1px solid var(--intergalactic-tooltip-border-invert,oklch(.4 .015 245));box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 oklch(.324 .077 242.1/.079));padding:var(--intergalactic-spacing-3x,12px)}.___STitle_5s0wq_gg_{color:var(--intergalactic-text-secondary-invert,#e1f2ffb9);margin-bottom:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___STitle_5s0wq_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotGroup_5s0wq_gg_{display:flex;align-items:center}.___SDot_5s0wq_gg_{margin-right:var(--intergalactic-spacing-2x,8px)}.___SDotCircle_5s0wq_gg_.__color_5s0wq_gg_.__lightness_5s0wq_gg_{background-color:var(--color_5s0wq);width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 1px oklch(from var(--color_5s0wq) calc(l + var(--lightness_5s0wq)) c h)}.___SFooter_5s0wq_gg_{background:var(--intergalactic-bg-secondary-invert,oklch(.907 .048 245.2/.129));color:var(--intergalactic-text-secondary-invert,#e1f2ffb9);padding:var(--intergalactic-spacing-1x,4px) var(--intergalactic-spacing-3x,12px);border-radius:0 0 var(--intergalactic-rounded-medium,6px) var(--intergalactic-rounded-medium,6px);margin:var(--intergalactic-spacing-3x,12px) calc(var(--intergalactic-spacing-3x, 12px)*-1) calc(var(--intergalactic-spacing-3x, 12px)*-1)}@media (color-gamut:p3){.___SFooter_5s0wq_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotPattern_5s0wq_gg_{stroke-width:1px;stroke:oklch(from var(--intergalactic-chart-grid-border,#fff) l c h/.5)}", /*__inner_css_end__*/"5s0wq_gg_"),
18
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___STooltip_1bv2y_gg_{font-size:var(--intergalactic-fs-100,12px);line-height:var(--intergalactic-lh-100,1.3334);font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;position:relative;color:var(--intergalactic-text-primary-invert,oklch(.991 .005 232.5/.959));background-color:var(--intergalactic-tooltip-bg-invert,oklch(.23 .009 245));border-radius:var(--intergalactic-popper-rounded,6px);border:1px solid var(--intergalactic-tooltip-border-invert,oklch(.4 .015 245));box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 oklch(.324 .077 242.1/.079));padding:var(--intergalactic-spacing-3x,12px)}.___STitle_1bv2y_gg_{color:var(--intergalactic-text-secondary-invert,#e1f2ffb9);margin-bottom:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___STitle_1bv2y_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotGroup_1bv2y_gg_{display:flex;align-items:center}.___SDot_1bv2y_gg_{margin-right:var(--intergalactic-spacing-2x,8px)}.___SDotCircle_1bv2y_gg_.__color_1bv2y_gg_.__lightness_1bv2y_gg_{background-color:var(--color_1bv2y);width:10px;height:10px;border-radius:50%;box-shadow:0 0 0 1px oklch(from var(--color_1bv2y) calc(l + var(--lightness_1bv2y)) c h)}.___SFooter_1bv2y_gg_{background:var(--intergalactic-bg-secondary-invert,oklch(.907 .048 245.2/.129));color:var(--intergalactic-text-secondary-invert,#e1f2ffb9);padding:var(--intergalactic-spacing-1x,4px) var(--intergalactic-spacing-3x,12px);border-radius:0 0 var(--intergalactic-rounded-medium,6px) var(--intergalactic-rounded-medium,6px);margin:var(--intergalactic-spacing-3x,12px) calc(var(--intergalactic-spacing-3x, 12px)*-1) calc(var(--intergalactic-spacing-3x, 12px)*-1)}@media (color-gamut:p3){.___SFooter_1bv2y_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___SDotPattern_1bv2y_gg_{stroke-width:1px;stroke:oklch(from var(--intergalactic-chart-grid-border,#fff) l c h/.5)}", /*__inner_css_end__*/"1bv2y_gg_"),
19
19
  /*__reshadow_css_end__*/
20
20
  {
21
- "__STooltip": "___STooltip_5s0wq_gg_",
22
- "__STitle": "___STitle_5s0wq_gg_",
23
- "__SDotGroup": "___SDotGroup_5s0wq_gg_",
24
- "__SDot": "___SDot_5s0wq_gg_",
25
- "__SDotCircle": "___SDotCircle_5s0wq_gg_",
26
- "_color": "__color_5s0wq_gg_",
27
- "_lightness": "__lightness_5s0wq_gg_",
28
- "--color": "--color_5s0wq",
29
- "--lightness": "--lightness_5s0wq",
30
- "__SFooter": "___SFooter_5s0wq_gg_",
31
- "__SDotPattern": "___SDotPattern_5s0wq_gg_"
21
+ "__STooltip": "___STooltip_1bv2y_gg_",
22
+ "__STitle": "___STitle_1bv2y_gg_",
23
+ "__SDotGroup": "___SDotGroup_1bv2y_gg_",
24
+ "__SDot": "___SDot_1bv2y_gg_",
25
+ "__SDotCircle": "___SDotCircle_1bv2y_gg_",
26
+ "_color": "__color_1bv2y_gg_",
27
+ "_lightness": "__lightness_1bv2y_gg_",
28
+ "--color": "--color_1bv2y",
29
+ "--lightness": "--lightness_1bv2y",
30
+ "__SFooter": "___SFooter_1bv2y_gg_",
31
+ "__SDotPattern": "___SDotPattern_1bv2y_gg_"
32
32
  });
33
33
  /**
34
34
  * `TooltipDotRenderContext` is a hack to bypass problem that getDotProps doesn't work for D3 tooltip.
package/lib/cjs/Venn.js CHANGED
@@ -19,17 +19,17 @@ var _Pattern = require("./Pattern");
19
19
  var _Tooltip = _interopRequireDefault(require("./Tooltip"));
20
20
  var _utils = require("./utils");
21
21
  /*!__reshadow-styles__:"./style/venn.shadow.css"*/
22
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SCircle_1gi52_gg_{fill:var(--intergalactic-chart-palette-order-2,oklch(.58 .168 278.2));stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_1gi52);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_1gi52_gg_:hover{fill-opacity:.7}}.___SCircle_1gi52_gg_.__color_1gi52_gg_{fill:var(--color_1gi52)}.___SCircle_1gi52_gg_.__pattern_1gi52_gg_.__color_1gi52_gg_{fill:var(--pattern_1gi52);fill-opacity:.7;stroke:var(--color_1gi52);stroke-width:1px}@media (hover:hover){.___SCircle_1gi52_gg_.__pattern_1gi52_gg_.__color_1gi52_gg_:hover{fill-opacity:.85}}.___SCircle_1gi52_gg_.__transparent_1gi52_gg_{opacity:.3}.___SIntersection_1gi52_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:0}@media (hover:hover){.___SIntersection_1gi52_gg_:hover{fill-opacity:.1}}.___SIntersection_1gi52_gg_.__transparent_1gi52_gg_{opacity:.3}", /*__inner_css_end__*/"1gi52_gg_"),
22
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SCircle_gifii_gg_{fill:var(--intergalactic-chart-palette-order-2,oklch(.58 .168 278.2));stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_gifii);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_gifii_gg_:hover{fill-opacity:.7}}.___SCircle_gifii_gg_.__color_gifii_gg_{fill:var(--color_gifii)}.___SCircle_gifii_gg_.__pattern_gifii_gg_.__color_gifii_gg_{fill:var(--pattern_gifii);fill-opacity:.7;stroke:var(--color_gifii);stroke-width:1px}@media (hover:hover){.___SCircle_gifii_gg_.__pattern_gifii_gg_.__color_gifii_gg_:hover{fill-opacity:.85}}.___SCircle_gifii_gg_.__transparent_gifii_gg_{opacity:.3}.___SIntersection_gifii_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:0}@media (hover:hover){.___SIntersection_gifii_gg_:hover{fill-opacity:.1}}.___SIntersection_gifii_gg_.__transparent_gifii_gg_{opacity:.3}", /*__inner_css_end__*/"gifii_gg_"),
23
23
  /*__reshadow_css_end__*/
24
24
  {
25
- "__SCircle": "___SCircle_1gi52_gg_",
26
- "_color": "__color_1gi52_gg_",
27
- "--color": "--color_1gi52",
28
- "_transparent": "__transparent_1gi52_gg_",
29
- "__SIntersection": "___SIntersection_1gi52_gg_",
30
- "--duration": "--duration_1gi52",
31
- "_pattern": "__pattern_1gi52_gg_",
32
- "--pattern": "--pattern_1gi52"
25
+ "__SCircle": "___SCircle_gifii_gg_",
26
+ "_color": "__color_gifii_gg_",
27
+ "--color": "--color_gifii",
28
+ "_transparent": "__transparent_gifii_gg_",
29
+ "__SIntersection": "___SIntersection_gifii_gg_",
30
+ "--duration": "--duration_gifii",
31
+ "_pattern": "__pattern_gifii_gg_",
32
+ "--pattern": "--pattern_gifii"
33
33
  });
34
34
  class VennRoot extends _core.Component {
35
35
  constructor(...args) {
@@ -27,20 +27,20 @@ var _ChartLegend = _interopRequireWildcard(require("../ChartLegend"));
27
27
  // @ts-ignore
28
28
  // @ts-ignore
29
29
  /*!__reshadow-styles__:"../../style/abstract-chart.shadow.css"*/
30
- const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SChart_1e5sk_gg_{width:100%;height:100%;min-width:0;min-height:0}.___STooltipChildrenWrapper_1e5sk_gg_{display:grid;grid-gap:var(--intergalactic-spacing-2x,8px);gap:var(--intergalactic-spacing-2x,8px);align-items:center}.___STooltipChildrenWrapper_1e5sk_gg_._columnsCount_2_1e5sk_gg_{grid-template-columns:auto minmax(28px,max-content)}.___STooltipChildrenWrapper_1e5sk_gg_._columnsCount_2_1e5sk_gg_ .___STooltipDivider_1e5sk_gg_{grid-column:span 2}.___STooltipChildrenWrapper_1e5sk_gg_._columnsCount_3_1e5sk_gg_{grid-template-columns:auto minmax(28px,max-content) minmax(28px,max-content)}.___STooltipChildrenWrapper_1e5sk_gg_._columnsCount_3_1e5sk_gg_ .___STooltipDivider_1e5sk_gg_{grid-column:span 3}.___STooltipDeltaWrapper_1e5sk_gg_{gap:var(--intergalactic-spacing-05x,2px);justify-content:flex-end}.___STooltipDeltaWrapper_1e5sk_gg_._trend_upward_1e5sk_gg_{color:var(--intergalactic-chart-data-success,oklch(.82 .19 143))}.___STooltipDeltaWrapper_1e5sk_gg_._trend_downward_1e5sk_gg_{color:var(--intergalactic-chart-data-critical,#ff7d7d)}@media (color-gamut:p3){.___STooltipDeltaWrapper_1e5sk_gg_._trend_downward_1e5sk_gg_{color:var(--intergalactic-chart-data-critical,oklch(.74 .19 22))}}.___STooltipDeltaWrapper_1e5sk_gg_._trend_stable_1e5sk_gg_{color:var(--intergalactic-text-secondary-invert,#e1f2ffb9)}@media (color-gamut:p3){.___STooltipDeltaWrapper_1e5sk_gg_._trend_stable_1e5sk_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___STooltipDeltaWrapper_1e5sk_gg_._deltaPercentGrowthColor_critical_1e5sk_gg_._trend_upward_1e5sk_gg_{color:var(--intergalactic-chart-data-critical,#ff7d7d)}@media (color-gamut:p3){.___STooltipDeltaWrapper_1e5sk_gg_._deltaPercentGrowthColor_critical_1e5sk_gg_._trend_upward_1e5sk_gg_{color:var(--intergalactic-chart-data-critical,oklch(.74 .19 22))}}.___STooltipDeltaWrapper_1e5sk_gg_._deltaPercentGrowthColor_critical_1e5sk_gg_._trend_downward_1e5sk_gg_{color:var(--intergalactic-chart-data-success,oklch(.82 .19 143))}.___STooltipDeltaWrapper_1e5sk_gg_ .___STooltipDeltaIcon_1e5sk_gg_{align-self:center}", /*__inner_css_end__*/"1e5sk_gg_"),
30
+ const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SChart_s53or_gg_{width:100%;height:100%;min-width:0;min-height:0}.___STooltipChildrenWrapper_s53or_gg_{display:grid;grid-gap:var(--intergalactic-spacing-2x,8px);gap:var(--intergalactic-spacing-2x,8px);align-items:center}.___STooltipChildrenWrapper_s53or_gg_._columnsCount_2_s53or_gg_{grid-template-columns:auto minmax(28px,max-content)}.___STooltipChildrenWrapper_s53or_gg_._columnsCount_2_s53or_gg_ .___STooltipDivider_s53or_gg_{grid-column:span 2}.___STooltipChildrenWrapper_s53or_gg_._columnsCount_3_s53or_gg_{grid-template-columns:auto minmax(28px,max-content) minmax(28px,max-content)}.___STooltipChildrenWrapper_s53or_gg_._columnsCount_3_s53or_gg_ .___STooltipDivider_s53or_gg_{grid-column:span 3}.___STooltipDeltaWrapper_s53or_gg_{gap:var(--intergalactic-spacing-05x,2px);justify-content:flex-end}.___STooltipDeltaWrapper_s53or_gg_._trend_upward_s53or_gg_{color:var(--intergalactic-chart-data-success,oklch(.82 .19 143))}.___STooltipDeltaWrapper_s53or_gg_._trend_downward_s53or_gg_{color:var(--intergalactic-chart-data-critical,#ff7d7d)}@media (color-gamut:p3){.___STooltipDeltaWrapper_s53or_gg_._trend_downward_s53or_gg_{color:var(--intergalactic-chart-data-critical,oklch(.74 .19 22))}}.___STooltipDeltaWrapper_s53or_gg_._trend_stable_s53or_gg_{color:var(--intergalactic-text-secondary-invert,#e1f2ffb9)}@media (color-gamut:p3){.___STooltipDeltaWrapper_s53or_gg_._trend_stable_s53or_gg_{color:var(--intergalactic-text-secondary-invert,oklch(.953 .025 240.1/.726))}}.___STooltipDeltaWrapper_s53or_gg_._deltaPercentGrowthColor_bad_s53or_gg_._trend_upward_s53or_gg_{color:var(--intergalactic-chart-data-critical,#ff7d7d)}@media (color-gamut:p3){.___STooltipDeltaWrapper_s53or_gg_._deltaPercentGrowthColor_bad_s53or_gg_._trend_upward_s53or_gg_{color:var(--intergalactic-chart-data-critical,oklch(.74 .19 22))}}.___STooltipDeltaWrapper_s53or_gg_._deltaPercentGrowthColor_bad_s53or_gg_._trend_downward_s53or_gg_{color:var(--intergalactic-chart-data-success,oklch(.82 .19 143))}.___STooltipDeltaWrapper_s53or_gg_ .___STooltipDeltaIcon_s53or_gg_{align-self:center}", /*__inner_css_end__*/"s53or_gg_"),
31
31
  /*__reshadow_css_end__*/
32
32
  {
33
- "__SChart": "___SChart_1e5sk_gg_",
34
- "__STooltipChildrenWrapper": "___STooltipChildrenWrapper_1e5sk_gg_",
35
- "_columnsCount_2": "_columnsCount_2_1e5sk_gg_",
36
- "__STooltipDivider": "___STooltipDivider_1e5sk_gg_",
37
- "_columnsCount_3": "_columnsCount_3_1e5sk_gg_",
38
- "__STooltipDeltaWrapper": "___STooltipDeltaWrapper_1e5sk_gg_",
39
- "_trend_upward": "_trend_upward_1e5sk_gg_",
40
- "_trend_downward": "_trend_downward_1e5sk_gg_",
41
- "_trend_stable": "_trend_stable_1e5sk_gg_",
42
- "_deltaPercentGrowthColor_critical": "_deltaPercentGrowthColor_critical_1e5sk_gg_",
43
- "__STooltipDeltaIcon": "___STooltipDeltaIcon_1e5sk_gg_"
33
+ "__SChart": "___SChart_s53or_gg_",
34
+ "__STooltipChildrenWrapper": "___STooltipChildrenWrapper_s53or_gg_",
35
+ "_columnsCount_2": "_columnsCount_2_s53or_gg_",
36
+ "__STooltipDivider": "___STooltipDivider_s53or_gg_",
37
+ "_columnsCount_3": "_columnsCount_3_s53or_gg_",
38
+ "__STooltipDeltaWrapper": "___STooltipDeltaWrapper_s53or_gg_",
39
+ "_trend_upward": "_trend_upward_s53or_gg_",
40
+ "_trend_downward": "_trend_downward_s53or_gg_",
41
+ "_trend_stable": "_trend_stable_s53or_gg_",
42
+ "_deltaPercentGrowthColor_bad": "_deltaPercentGrowthColor_bad_s53or_gg_",
43
+ "__STooltipDeltaIcon": "___STooltipDeltaIcon_s53or_gg_"
44
44
  });
45
45
  const NOT_A_VALUE = exports.NOT_A_VALUE = 'n/a';
46
46
  class AbstractChart extends _core.Component {
@@ -99,13 +99,14 @@ class AbstractChart extends _core.Component {
99
99
  } = this.props;
100
100
  return this.dataKeys.map((key, index) => {
101
101
  const legendData = legendProps?.legendMap?.[key];
102
+
103
+ // @ts-expect-error will fill columns or rows later
102
104
  const dataDefinition = {
103
105
  id: key,
104
106
  label: legendData?.label ?? key,
105
107
  icon: legendData?.icon ?? undefined,
106
108
  checked: legendData?.defaultChecked ?? true,
107
- color: this.resolveColor(key, index),
108
- columns: []
109
+ color: this.resolveColor(key, index)
109
110
  };
110
111
  if (legendData?.additionalInfo || legendData?.count) {
111
112
  dataDefinition.additionalInfo = legendData.additionalInfo ? {
@@ -114,9 +115,11 @@ class AbstractChart extends _core.Component {
114
115
  count: legendData.count
115
116
  } : undefined;
116
117
  }
117
- if (legendData && 'columns' in legendData) {
118
+ if (legendData && 'rows' in legendData && !('columns' in dataDefinition)) {
119
+ dataDefinition.rows = legendData.rows || [];
120
+ } else if (legendData && 'columns' in legendData && !('rows' in dataDefinition)) {
118
121
  dataDefinition.columns = legendData.columns || [];
119
- } else if (!Array.isArray(data)) {
122
+ } else if (!Array.isArray(data) && !('rows' in dataDefinition)) {
120
123
  let value = undefined;
121
124
  let dataValue = data[key];
122
125
  if (data instanceof Map) {
@@ -604,7 +607,7 @@ class AbstractChart extends _core.Component {
604
607
  "eventEmitter": eventEmitter,
605
608
  "locale": locale,
606
609
  ...extractedAriaProps
607
- }), this.renderAxis(), !showTooltip ? null : this.renderTooltip(), this.renderChart()));
610
+ }), !showTooltip ? null : this.renderTooltip(), this.renderAxis(), this.renderChart()));
608
611
  }
609
612
  handleResize(entities) {
610
613
  const {