@semcore/d3-chart 18.1.0 → 18.2.0-prerelease.0

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 (292) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/lib/cjs/Area.js +12 -12
  3. package/lib/cjs/Axis.js +15 -15
  4. package/lib/cjs/Bar.js +206 -21
  5. package/lib/cjs/Bar.js.map +1 -1
  6. package/lib/cjs/Bubble.js +85 -38
  7. package/lib/cjs/Bubble.js.map +1 -1
  8. package/lib/cjs/CompactHorizontalBar.js +16 -16
  9. package/lib/cjs/Donut.js +65 -152
  10. package/lib/cjs/Donut.js.map +1 -1
  11. package/lib/cjs/Dots.js +13 -13
  12. package/lib/cjs/Dots.js.map +1 -1
  13. package/lib/cjs/HorizontalBar.js +32 -25
  14. package/lib/cjs/HorizontalBar.js.map +1 -1
  15. package/lib/cjs/Hover.js +64 -153
  16. package/lib/cjs/Hover.js.map +1 -1
  17. package/lib/cjs/Line.js +9 -9
  18. package/lib/cjs/Pattern.js +267 -273
  19. package/lib/cjs/Pattern.js.map +1 -1
  20. package/lib/cjs/Plot.js +4 -4
  21. package/lib/cjs/Plot.js.map +1 -1
  22. package/lib/cjs/Radar.js +19 -19
  23. package/lib/cjs/RadialTree.js +12 -12
  24. package/lib/cjs/Reference.js +31 -29
  25. package/lib/cjs/Reference.js.map +1 -1
  26. package/lib/cjs/ScatterPlot.js +9 -9
  27. package/lib/cjs/StackBar.js +7 -2
  28. package/lib/cjs/StackBar.js.map +1 -1
  29. package/lib/cjs/Tooltip.js +14 -13
  30. package/lib/cjs/Tooltip.js.map +1 -1
  31. package/lib/cjs/Venn.js +9 -9
  32. package/lib/cjs/a11y/DataAccessibilityTable.js +1 -1
  33. package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
  34. package/lib/cjs/a11y/PlotA11yModule.js +2 -2
  35. package/lib/cjs/a11y/PlotA11yView.js +2 -2
  36. package/lib/cjs/component/Chart/AbstractChart.js +28 -21
  37. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  38. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  39. package/lib/cjs/component/Chart/BarChart.js +51 -0
  40. package/lib/cjs/component/Chart/BarChart.js.map +1 -1
  41. package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
  42. package/lib/cjs/component/Chart/BubbleChart.js +104 -20
  43. package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
  44. package/lib/cjs/component/Chart/DonutChart.js +27 -3
  45. package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
  46. package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
  47. package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
  48. package/lib/cjs/component/Chart/ScoreBar/ScoreBarChart.js +165 -0
  49. package/lib/cjs/component/Chart/ScoreBar/ScoreBarChart.js.map +1 -0
  50. package/lib/cjs/component/Chart/ScoreBar/ScoreBarChart.type.js +2 -0
  51. package/lib/cjs/component/Chart/ScoreBar/ScoreBarChart.type.js.map +1 -0
  52. package/lib/cjs/component/Chart/ScoreBar/ScoreBarItem.js +147 -0
  53. package/lib/cjs/component/Chart/ScoreBar/ScoreBarItem.js.map +1 -0
  54. package/lib/cjs/component/Chart/ScoreBar/ScoreBarItem.type.js +2 -0
  55. package/lib/cjs/component/Chart/ScoreBar/ScoreBarItem.type.js.map +1 -0
  56. package/lib/cjs/component/Chart/ScoreBar/scoreBarChart.shadow.css +130 -0
  57. package/lib/cjs/component/Chart/ScoreDonutChart.js +196 -0
  58. package/lib/cjs/component/Chart/ScoreDonutChart.js.map +1 -0
  59. package/lib/cjs/component/Chart/ScoreDonutChart.type.js +2 -0
  60. package/lib/cjs/component/Chart/ScoreDonutChart.type.js.map +1 -0
  61. package/lib/cjs/component/Chart/index.js +8 -1
  62. package/lib/cjs/component/Chart/index.js.map +1 -1
  63. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +7 -7
  64. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +18 -21
  65. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  66. package/lib/cjs/component/ChartLegend/LegendItem/legend-item.shadow.css +7 -4
  67. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +11 -11
  68. package/lib/cjs/component/Hover/HoverLine.js +144 -0
  69. package/lib/cjs/component/Hover/HoverLine.js.map +1 -0
  70. package/lib/cjs/component/Hover/HoverLine.type.js +2 -0
  71. package/lib/cjs/component/Hover/HoverLine.type.js.map +1 -0
  72. package/lib/cjs/component/Hover/HoveredTick.js +77 -0
  73. package/lib/cjs/component/Hover/HoveredTick.js.map +1 -0
  74. package/lib/cjs/component/Hover/hover.shadow.css +4 -0
  75. package/lib/cjs/component/Hover/hoveredTick.shadow.css +34 -0
  76. package/lib/cjs/style/area.shadow.css +5 -4
  77. package/lib/cjs/style/bar.shadow.css +1 -1
  78. package/lib/cjs/style/bubble.shadow.css +29 -24
  79. package/lib/cjs/style/donut.shadow.css +7 -9
  80. package/lib/cjs/style/dot.shadow.css +1 -1
  81. package/lib/cjs/style/hover.shadow.css +0 -40
  82. package/lib/cjs/style/line.shadow.css +1 -1
  83. package/lib/cjs/style/radar.shadow.css +2 -2
  84. package/lib/cjs/style/radial-tree.shadow.css +4 -4
  85. package/lib/cjs/style/scatterplot.shadow.css +2 -2
  86. package/lib/cjs/style/venn.shadow.css +3 -3
  87. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +2 -0
  88. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  89. package/lib/cjs/types/Bar.d.js.map +1 -1
  90. package/lib/cjs/types/Bubble.d.js.map +1 -1
  91. package/lib/cjs/types/Donut.d.js.map +1 -1
  92. package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
  93. package/lib/cjs/types/Plot.d.js.map +1 -1
  94. package/lib/cjs/types/index.d.js +24 -0
  95. package/lib/cjs/types/index.d.js.map +1 -1
  96. package/lib/cjs/utils.js +78 -30
  97. package/lib/cjs/utils.js.map +1 -1
  98. package/lib/es6/Area.js +12 -12
  99. package/lib/es6/Axis.js +15 -15
  100. package/lib/es6/Bar.js +207 -22
  101. package/lib/es6/Bar.js.map +1 -1
  102. package/lib/es6/Bubble.js +86 -39
  103. package/lib/es6/Bubble.js.map +1 -1
  104. package/lib/es6/CompactHorizontalBar.js +16 -16
  105. package/lib/es6/Donut.js +65 -152
  106. package/lib/es6/Donut.js.map +1 -1
  107. package/lib/es6/Dots.js +13 -13
  108. package/lib/es6/Dots.js.map +1 -1
  109. package/lib/es6/HorizontalBar.js +32 -25
  110. package/lib/es6/HorizontalBar.js.map +1 -1
  111. package/lib/es6/Hover.js +64 -153
  112. package/lib/es6/Hover.js.map +1 -1
  113. package/lib/es6/Line.js +9 -9
  114. package/lib/es6/Pattern.js +266 -272
  115. package/lib/es6/Pattern.js.map +1 -1
  116. package/lib/es6/Plot.js +4 -4
  117. package/lib/es6/Plot.js.map +1 -1
  118. package/lib/es6/Radar.js +19 -19
  119. package/lib/es6/RadialTree.js +12 -12
  120. package/lib/es6/Reference.js +31 -29
  121. package/lib/es6/Reference.js.map +1 -1
  122. package/lib/es6/ScatterPlot.js +9 -9
  123. package/lib/es6/StackBar.js +7 -2
  124. package/lib/es6/StackBar.js.map +1 -1
  125. package/lib/es6/Tooltip.js +14 -13
  126. package/lib/es6/Tooltip.js.map +1 -1
  127. package/lib/es6/Venn.js +9 -9
  128. package/lib/es6/a11y/DataAccessibilityTable.js +1 -1
  129. package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
  130. package/lib/es6/a11y/PlotA11yModule.js +2 -2
  131. package/lib/es6/a11y/PlotA11yView.js +2 -2
  132. package/lib/es6/component/Chart/AbstractChart.js +29 -22
  133. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  134. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  135. package/lib/es6/component/Chart/BarChart.js +51 -1
  136. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  137. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  138. package/lib/es6/component/Chart/BubbleChart.js +105 -21
  139. package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
  140. package/lib/es6/component/Chart/DonutChart.js +27 -3
  141. package/lib/es6/component/Chart/DonutChart.js.map +1 -1
  142. package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
  143. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  144. package/lib/es6/component/Chart/ScoreBar/ScoreBarChart.js +161 -0
  145. package/lib/es6/component/Chart/ScoreBar/ScoreBarChart.js.map +1 -0
  146. package/lib/es6/component/Chart/ScoreBar/ScoreBarChart.type.js +2 -0
  147. package/lib/es6/component/Chart/ScoreBar/ScoreBarChart.type.js.map +1 -0
  148. package/lib/es6/component/Chart/ScoreBar/ScoreBarItem.js +141 -0
  149. package/lib/es6/component/Chart/ScoreBar/ScoreBarItem.js.map +1 -0
  150. package/lib/es6/component/Chart/ScoreBar/ScoreBarItem.type.js +2 -0
  151. package/lib/es6/component/Chart/ScoreBar/ScoreBarItem.type.js.map +1 -0
  152. package/lib/es6/component/Chart/ScoreBar/scoreBarChart.shadow.css +130 -0
  153. package/lib/es6/component/Chart/ScoreDonutChart.js +189 -0
  154. package/lib/es6/component/Chart/ScoreDonutChart.js.map +1 -0
  155. package/lib/es6/component/Chart/ScoreDonutChart.type.js +2 -0
  156. package/lib/es6/component/Chart/ScoreDonutChart.type.js.map +1 -0
  157. package/lib/es6/component/Chart/index.js +8 -1
  158. package/lib/es6/component/Chart/index.js.map +1 -1
  159. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +7 -7
  160. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +24 -26
  161. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  162. package/lib/es6/component/ChartLegend/LegendItem/legend-item.shadow.css +7 -4
  163. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +11 -11
  164. package/lib/es6/component/Hover/HoverLine.js +138 -0
  165. package/lib/es6/component/Hover/HoverLine.js.map +1 -0
  166. package/lib/es6/component/Hover/HoverLine.type.js +2 -0
  167. package/lib/es6/component/Hover/HoverLine.type.js.map +1 -0
  168. package/lib/es6/component/Hover/HoveredTick.js +71 -0
  169. package/lib/es6/component/Hover/HoveredTick.js.map +1 -0
  170. package/lib/es6/component/Hover/hover.shadow.css +4 -0
  171. package/lib/es6/component/Hover/hoveredTick.shadow.css +34 -0
  172. package/lib/es6/style/area.shadow.css +5 -4
  173. package/lib/es6/style/bar.shadow.css +1 -1
  174. package/lib/es6/style/bubble.shadow.css +29 -24
  175. package/lib/es6/style/donut.shadow.css +7 -9
  176. package/lib/es6/style/dot.shadow.css +1 -1
  177. package/lib/es6/style/hover.shadow.css +0 -40
  178. package/lib/es6/style/line.shadow.css +1 -1
  179. package/lib/es6/style/radar.shadow.css +2 -2
  180. package/lib/es6/style/radial-tree.shadow.css +4 -4
  181. package/lib/es6/style/scatterplot.shadow.css +2 -2
  182. package/lib/es6/style/venn.shadow.css +3 -3
  183. package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -0
  184. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  185. package/lib/es6/types/Bar.d.js.map +1 -1
  186. package/lib/es6/types/Bubble.d.js.map +1 -1
  187. package/lib/es6/types/Donut.d.js.map +1 -1
  188. package/lib/es6/types/HorizontalBar.d.js.map +1 -1
  189. package/lib/es6/types/Plot.d.js.map +1 -1
  190. package/lib/es6/types/index.d.js +2 -0
  191. package/lib/es6/types/index.d.js.map +1 -1
  192. package/lib/es6/utils.js +71 -28
  193. package/lib/es6/utils.js.map +1 -1
  194. package/lib/esm/Area.mjs +13 -13
  195. package/lib/esm/Axis.mjs +16 -16
  196. package/lib/esm/Bar.mjs +205 -22
  197. package/lib/esm/Bubble.mjs +87 -40
  198. package/lib/esm/CompactHorizontalBar.mjs +17 -17
  199. package/lib/esm/Donut.mjs +66 -151
  200. package/lib/esm/Dots.mjs +14 -14
  201. package/lib/esm/HorizontalBar.mjs +33 -26
  202. package/lib/esm/Hover.mjs +65 -154
  203. package/lib/esm/Line.mjs +10 -10
  204. package/lib/esm/Pattern.mjs +268 -273
  205. package/lib/esm/Plot.mjs +5 -5
  206. package/lib/esm/Radar.mjs +20 -20
  207. package/lib/esm/RadialTree.mjs +13 -13
  208. package/lib/esm/Reference.mjs +33 -30
  209. package/lib/esm/ScatterPlot.mjs +10 -10
  210. package/lib/esm/StackBar.mjs +7 -2
  211. package/lib/esm/Tooltip.mjs +15 -14
  212. package/lib/esm/Venn.mjs +10 -10
  213. package/lib/esm/a11y/DataAccessibilityTable.mjs +1 -1
  214. package/lib/esm/a11y/PlotA11yModule.mjs +3 -3
  215. package/lib/esm/a11y/PlotA11yView.mjs +3 -3
  216. package/lib/esm/component/Chart/AbstractChart.mjs +30 -23
  217. package/lib/esm/component/Chart/BarChart.mjs +49 -0
  218. package/lib/esm/component/Chart/BubbleChart.mjs +104 -20
  219. package/lib/esm/component/Chart/DonutChart.mjs +27 -3
  220. package/lib/esm/component/Chart/ScoreBar/ScoreBarChart.mjs +160 -0
  221. package/lib/esm/component/Chart/ScoreBar/ScoreBarItem.mjs +149 -0
  222. package/lib/esm/component/Chart/ScoreBar/scoreBarChart.shadow.css +130 -0
  223. package/lib/esm/component/Chart/ScoreDonutChart.mjs +186 -0
  224. package/lib/esm/component/Chart/index.mjs +8 -1
  225. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +8 -8
  226. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +19 -22
  227. package/lib/esm/component/ChartLegend/LegendItem/legend-item.shadow.css +7 -4
  228. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +12 -12
  229. package/lib/esm/component/Hover/HoverLine.mjs +146 -0
  230. package/lib/esm/component/Hover/HoveredTick.mjs +79 -0
  231. package/lib/esm/component/Hover/hover.shadow.css +4 -0
  232. package/lib/esm/component/Hover/hoveredTick.shadow.css +34 -0
  233. package/lib/esm/style/area.shadow.css +5 -4
  234. package/lib/esm/style/bar.shadow.css +1 -1
  235. package/lib/esm/style/bubble.shadow.css +29 -24
  236. package/lib/esm/style/donut.shadow.css +7 -9
  237. package/lib/esm/style/dot.shadow.css +1 -1
  238. package/lib/esm/style/hover.shadow.css +0 -40
  239. package/lib/esm/style/line.shadow.css +1 -1
  240. package/lib/esm/style/radar.shadow.css +2 -2
  241. package/lib/esm/style/radial-tree.shadow.css +4 -4
  242. package/lib/esm/style/scatterplot.shadow.css +2 -2
  243. package/lib/esm/style/venn.shadow.css +3 -3
  244. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -0
  245. package/lib/esm/translations/de.json.mjs +12 -0
  246. package/lib/esm/utils.mjs +75 -28
  247. package/lib/types/Bar.d.ts +3 -0
  248. package/lib/types/Bubble.d.ts +4 -1
  249. package/lib/types/Donut.d.ts +0 -4
  250. package/lib/types/HorizontalBar.d.ts +3 -0
  251. package/lib/types/Pattern.d.ts +10 -8
  252. package/lib/types/Pattern.d.ts.map +1 -1
  253. package/lib/types/Plot.d.ts +6 -1
  254. package/lib/types/component/Chart/AbstractChart.d.ts +15 -1
  255. package/lib/types/component/Chart/AbstractChart.d.ts.map +1 -1
  256. package/lib/types/component/Chart/AbstractChart.type.d.ts +28 -0
  257. package/lib/types/component/Chart/AbstractChart.type.d.ts.map +1 -1
  258. package/lib/types/component/Chart/BarChart.d.ts.map +1 -1
  259. package/lib/types/component/Chart/BarChart.type.d.ts +9 -1
  260. package/lib/types/component/Chart/BarChart.type.d.ts.map +1 -1
  261. package/lib/types/component/Chart/BubbleChart.d.ts.map +1 -1
  262. package/lib/types/component/Chart/DonutChart.d.ts.map +1 -1
  263. package/lib/types/component/Chart/DonutChart.type.d.ts +5 -2
  264. package/lib/types/component/Chart/DonutChart.type.d.ts.map +1 -1
  265. package/lib/types/component/Chart/LineChart.type.d.ts +2 -30
  266. package/lib/types/component/Chart/LineChart.type.d.ts.map +1 -1
  267. package/lib/types/component/Chart/ScoreBar/ScoreBarChart.d.ts +8 -0
  268. package/lib/types/component/Chart/ScoreBar/ScoreBarChart.d.ts.map +1 -0
  269. package/lib/types/component/Chart/ScoreBar/ScoreBarChart.type.d.ts +80 -0
  270. package/lib/types/component/Chart/ScoreBar/ScoreBarChart.type.d.ts.map +1 -0
  271. package/lib/types/component/Chart/ScoreBar/ScoreBarItem.d.ts +3 -0
  272. package/lib/types/component/Chart/ScoreBar/ScoreBarItem.d.ts.map +1 -0
  273. package/lib/types/component/Chart/ScoreBar/ScoreBarItem.type.d.ts +20 -0
  274. package/lib/types/component/Chart/ScoreBar/ScoreBarItem.type.d.ts.map +1 -0
  275. package/lib/types/component/Chart/ScoreDonutChart.d.ts +8 -0
  276. package/lib/types/component/Chart/ScoreDonutChart.d.ts.map +1 -0
  277. package/lib/types/component/Chart/ScoreDonutChart.type.d.ts +40 -0
  278. package/lib/types/component/Chart/ScoreDonutChart.type.d.ts.map +1 -0
  279. package/lib/types/component/Chart/index.d.ts +5 -0
  280. package/lib/types/component/Chart/index.d.ts.map +1 -1
  281. package/lib/types/component/Hover/HoverLine.d.ts +2 -0
  282. package/lib/types/component/Hover/HoverLine.d.ts.map +1 -0
  283. package/lib/types/component/Hover/HoverLine.type.d.ts +17 -0
  284. package/lib/types/component/Hover/HoverLine.type.d.ts.map +1 -0
  285. package/lib/types/component/Hover/HoveredTick.d.ts +21 -0
  286. package/lib/types/component/Hover/HoveredTick.d.ts.map +1 -0
  287. package/lib/types/index.d.ts +2 -0
  288. package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +5 -0
  289. package/lib/types/translations/__intergalactic-dynamic-locales.d.ts.map +1 -1
  290. package/lib/types/utils.d.ts +11 -2
  291. package/lib/types/utils.d.ts.map +1 -1
  292. package/package.json +9 -10
@@ -0,0 +1,138 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import { sstyled as _sstyled } from "@semcore/core";
3
+ import { Component, sstyled } from '@semcore/core';
4
+ import React from 'react';
5
+ /*!__reshadow-styles__:"./hover.shadow.css"*/
6
+ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SHoverLine_2o2ug_gg_,.___SHoverLine_2o2ug_gg_:focus-visible{outline:none;stroke:var(--intergalactic-chart-grid-x-axis,oklch(.88 .011 234.9))}", /*__inner_css_end__*/"2o2ug_gg_"),
7
+ /*__reshadow_css_end__*/
8
+ {
9
+ "__SHoverLine": "___SHoverLine_2o2ug_gg_"
10
+ });
11
+ import { HoveredTick } from './HoveredTick';
12
+ import createElement from '../../createElement';
13
+ import { scaleOfBandwidth } from '../../utils';
14
+ const STROKE_WIDTH = 1;
15
+ const NOTCH_WIDTH = 9;
16
+ const NOTCH_DELTA = NOTCH_WIDTH / 2 - STROKE_WIDTH / 4;
17
+ class HoverLineComponent extends Component {
18
+ constructor(...args) {
19
+ super(...args);
20
+ _defineProperty(this, "Element", void 0);
21
+ }
22
+ isEquals(a, b) {
23
+ if (a === b) {
24
+ return true;
25
+ }
26
+ if (a instanceof Date && b instanceof Date) {
27
+ return a.getTime() === b.getTime();
28
+ }
29
+ return false;
30
+ }
31
+ getValue(index, key) {
32
+ const {
33
+ data
34
+ } = this.asProps;
35
+ if (typeof key === 'string') {
36
+ const value = index !== null ? data[index]?.[key] : undefined;
37
+ return value;
38
+ }
39
+ return undefined;
40
+ }
41
+ getInitPoint(scale, value) {
42
+ if (typeof value === 'string' || typeof value === 'number' || value instanceof Date) {
43
+ const initPoint = value !== undefined ? scaleOfBandwidth(scale, value) : undefined;
44
+ return initPoint;
45
+ }
46
+ return undefined;
47
+ }
48
+ render() {
49
+ var _ref;
50
+ const SHoverLine = this.Element;
51
+ const {
52
+ meta,
53
+ xIndex,
54
+ yIndex,
55
+ styles,
56
+ x,
57
+ y,
58
+ data,
59
+ scale,
60
+ dataHints,
61
+ hideTickHover,
62
+ formatValue
63
+ } = this.asProps;
64
+ const [xScale, yScale] = scale;
65
+ const [xFormatValue, yFormatValue] = Array.isArray(formatValue) ? formatValue : [formatValue, formatValue];
66
+ const xRange = xScale.range();
67
+ const yRange = yScale.range();
68
+ const xValue = this.getValue(xIndex, x);
69
+ const yValue = this.getValue(yIndex, y);
70
+ const x1 = this.getInitPoint(xScale, xValue);
71
+ const y1 = this.getInitPoint(yScale, yValue);
72
+ const xTicks = xScale.domain?.() ?? [];
73
+ const yTicks = yScale.domain?.() ?? [];
74
+ return _ref = sstyled(styles), /*#__PURE__*/React.createElement(React.Fragment, null, xIndex !== null && typeof x1 === 'number' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SHoverLine, _ref.cn("SHoverLine", {
75
+ "render": 'g',
76
+ "stroke-width": STROKE_WIDTH,
77
+ "aria-hidden": true
78
+ }), /*#__PURE__*/React.createElement("line", _ref.cn("line", {
79
+ "x1": x1 - NOTCH_DELTA,
80
+ "x2": x1 + NOTCH_DELTA,
81
+ "y1": yRange[0],
82
+ "y2": yRange[0]
83
+ })), /*#__PURE__*/React.createElement("line", _ref.cn("line", {
84
+ "x1": x1,
85
+ "y1": yRange[0],
86
+ "x2": x1,
87
+ "y2": yRange[1]
88
+ })), /*#__PURE__*/React.createElement("line", _ref.cn("line", {
89
+ "x1": x1 - NOTCH_DELTA,
90
+ "x2": x1 + NOTCH_DELTA,
91
+ "y1": yRange[1],
92
+ "y2": yRange[1]
93
+ }))), !hideTickHover && xValue !== undefined && /*#__PURE__*/React.createElement(HoveredTick, _ref.cn("HoveredTick", {
94
+ "size": meta.getTicksSize('horizontal'),
95
+ "position": meta.getTicksPosition('horizontal'),
96
+ "tickFormatter": dataHints.titles.getHorizontalAxesTitle ?? xFormatValue,
97
+ "value": xValue,
98
+ "isFirstTick": this.isEquals(xValue, xTicks.at(0)),
99
+ "isLastTick": this.isEquals(xValue, xTicks.at(-1)),
100
+ "x": x1,
101
+ "xRange": xRange,
102
+ "yRange": yRange
103
+ }))) : null, yIndex !== null && typeof y1 === 'number' ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(SHoverLine, _ref.cn("SHoverLine", {
104
+ "render": 'g',
105
+ "stroke-width": STROKE_WIDTH,
106
+ "aria-hidden": true
107
+ }), /*#__PURE__*/React.createElement("line", _ref.cn("line", {
108
+ "x1": xRange[0],
109
+ "y1": y1 - NOTCH_DELTA,
110
+ "x2": xRange[0],
111
+ "y2": y1 + NOTCH_DELTA
112
+ })), /*#__PURE__*/React.createElement("line", _ref.cn("line", {
113
+ "x1": xRange[0],
114
+ "y1": y1,
115
+ "x2": xRange[1],
116
+ "y2": y1
117
+ })), /*#__PURE__*/React.createElement("line", _ref.cn("line", {
118
+ "x1": xRange[1],
119
+ "y1": y1 - NOTCH_DELTA,
120
+ "x2": xRange[1],
121
+ "y2": y1 + NOTCH_DELTA
122
+ }))), !hideTickHover && yValue !== undefined && /*#__PURE__*/React.createElement(HoveredTick, _ref.cn("HoveredTick", {
123
+ "size": meta.getTicksSize('vertical'),
124
+ "position": meta.getTicksPosition('vertical'),
125
+ "tickFormatter": dataHints.titles.getVerticalAxesTitle ?? yFormatValue,
126
+ "value": yValue,
127
+ "isFirstTick": this.isEquals(yValue, yTicks.at(0)),
128
+ "isLastTick": this.isEquals(yValue, yTicks.at(-1)),
129
+ "y": y1,
130
+ "xRange": xRange,
131
+ "yRange": yRange
132
+ }))) : null);
133
+ }
134
+ }
135
+ _defineProperty(HoverLineComponent, "displayName", 'HoverLine');
136
+ _defineProperty(HoverLineComponent, "style", style);
137
+ export const HoverLine = createElement(HoverLineComponent);
138
+ //# sourceMappingURL=HoverLine.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HoverLine.js","names":["Component","sstyled","React","style","_sstyled","insert","HoveredTick","createElement","scaleOfBandwidth","STROKE_WIDTH","NOTCH_WIDTH","NOTCH_DELTA","HoverLineComponent","constructor","args","_defineProperty","isEquals","a","b","Date","getTime","getValue","index","key","data","asProps","value","undefined","getInitPoint","scale","initPoint","render","_ref","SHoverLine","Element","meta","xIndex","yIndex","styles","x","y","dataHints","hideTickHover","formatValue","xScale","yScale","xFormatValue","yFormatValue","Array","isArray","xRange","range","yRange","xValue","yValue","x1","y1","xTicks","domain","yTicks","Fragment","cn","getTicksSize","getTicksPosition","titles","getHorizontalAxesTitle","at","getVerticalAxesTitle","HoverLine"],"sources":["../../../../src/component/Hover/HoverLine.tsx"],"sourcesContent":["import { Component, sstyled } from '@semcore/core';\nimport type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\nimport React from 'react';\n\nimport style from './hover.shadow.css';\nimport { HoveredTick } from './HoveredTick';\nimport type { HoverLineProps } from './HoverLine.type';\nimport createElement from '../../createElement';\nimport { scaleOfBandwidth } from '../../utils';\n\nconst STROKE_WIDTH = 1;\nconst NOTCH_WIDTH = 9;\nconst NOTCH_DELTA = NOTCH_WIDTH / 2 - STROKE_WIDTH / 4;\n\nclass HoverLineComponent extends Component<HoverLineProps> {\n static displayName = 'HoverLine';\n static style = style;\n\n Element!: React.FC<{ children?: React.ReactNode; render: string }>;\n\n isEquals(a: ReturnType<typeof this.getValue>, b: ReturnType<typeof this.getValue>) {\n if (a === b) {\n return true;\n }\n\n if (a instanceof Date && b instanceof Date) {\n return a.getTime() === b.getTime();\n }\n\n return false;\n }\n\n getValue(index: number | null, key: string | symbol) {\n const { data } = this.asProps;\n if (typeof key === 'string') {\n const value = index !== null ? data[index]?.[key] : undefined;\n\n return value;\n }\n\n return undefined;\n }\n\n getInitPoint(scale: ScaleBand<any> | ScaleTime<any, any> | ScaleLinear<any, any>, value: ReturnType<typeof this.getValue>) {\n if (typeof value === 'string' || typeof value === 'number' || value instanceof Date) {\n const initPoint = value !== undefined ? scaleOfBandwidth(scale, value) : undefined;\n\n return initPoint;\n }\n\n return undefined;\n }\n\n render() {\n const SHoverLine = this.Element;\n const { meta, xIndex, yIndex, styles, x, y, data, scale, dataHints, hideTickHover, formatValue } = this.asProps;\n const [xScale, yScale] = scale;\n const [xFormatValue, yFormatValue] = Array.isArray(formatValue) ? formatValue : [formatValue, formatValue];\n\n const xRange = xScale.range();\n const yRange = yScale.range();\n const xValue = this.getValue(xIndex, x);\n const yValue = this.getValue(yIndex, y);\n\n const x1 = this.getInitPoint(xScale, xValue);\n const y1 = this.getInitPoint(yScale, yValue);\n\n const xTicks = xScale.domain?.() ?? [];\n const yTicks = yScale.domain?.() ?? [];\n\n return sstyled(styles)(\n <>\n {xIndex !== null && typeof x1 === 'number'\n ? (\n <>\n <SHoverLine render='g' 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 && xValue !== undefined && (\n <HoveredTick\n size={meta.getTicksSize('horizontal')}\n position={meta.getTicksPosition('horizontal')}\n tickFormatter={dataHints.titles.getHorizontalAxesTitle ?? xFormatValue}\n value={xValue}\n isFirstTick={this.isEquals(xValue, xTicks.at(0))}\n isLastTick={this.isEquals(xValue, xTicks.at(-1))}\n x={x1}\n xRange={xRange}\n yRange={yRange}\n />\n )}\n </>\n )\n : null}\n {yIndex !== null && typeof y1 === 'number'\n ? (\n <>\n <SHoverLine render='g' 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 {!hideTickHover && yValue !== undefined && (\n <HoveredTick\n size={meta.getTicksSize('vertical')}\n position={meta.getTicksPosition('vertical')}\n tickFormatter={dataHints.titles.getVerticalAxesTitle ?? yFormatValue}\n value={yValue}\n isFirstTick={this.isEquals(yValue, yTicks.at(0))}\n isLastTick={this.isEquals(yValue, yTicks.at(-1))}\n y={y1}\n xRange={xRange}\n yRange={yRange}\n />\n )}\n </>\n )\n : null}\n </>,\n );\n }\n}\n\nexport const HoverLine = createElement(HoverLineComponent);\n"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,OAAO,QAAQ,eAAe;AAElD,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,MAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;AAAA;AAG1B,SAASC,WAAW,QAAQ,eAAe;AAE3C,OAAOC,aAAa,MAAM,qBAAqB;AAC/C,SAASC,gBAAgB,QAAQ,aAAa;AAE9C,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,WAAW,GAAG,CAAC;AACrB,MAAMC,WAAW,GAAGD,WAAW,GAAG,CAAC,GAAGD,YAAY,GAAG,CAAC;AAEtD,MAAMG,kBAAkB,SAASZ,SAAS,CAAiB;EAAAa,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA;EAAA;EAMzDC,QAAQA,CAACC,CAAmC,EAAEC,CAAmC,EAAE;IACjF,IAAID,CAAC,KAAKC,CAAC,EAAE;MACX,OAAO,IAAI;IACb;IAEA,IAAID,CAAC,YAAYE,IAAI,IAAID,CAAC,YAAYC,IAAI,EAAE;MAC1C,OAAOF,CAAC,CAACG,OAAO,CAAC,CAAC,KAAKF,CAAC,CAACE,OAAO,CAAC,CAAC;IACpC;IAEA,OAAO,KAAK;EACd;EAEAC,QAAQA,CAACC,KAAoB,EAAEC,GAAoB,EAAE;IACnD,MAAM;MAAEC;IAAK,CAAC,GAAG,IAAI,CAACC,OAAO;IAC7B,IAAI,OAAOF,GAAG,KAAK,QAAQ,EAAE;MAC3B,MAAMG,KAAK,GAAGJ,KAAK,KAAK,IAAI,GAAGE,IAAI,CAACF,KAAK,CAAC,GAAGC,GAAG,CAAC,GAAGI,SAAS;MAE7D,OAAOD,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,WAAW;MAAA,MAAMuC,MAAM,CAAC,CAAC,CAAC;MAAA,MAAMM,EAAE,GAAG7C;IAAW,EAAG,CACvE,CAAC,EACZ,CAAC+B,aAAa,IAAIY,MAAM,KAAK3B,SAAS,iBACrCzB,KAAA,CAAAK,aAAA,CAACD,WAAW,EAAA0B,IAAA,CAAA6B,EAAA;MAAA,QACJ1B,IAAI,CAAC2B,YAAY,CAAC,UAAU,CAAC;MAAA,YACzB3B,IAAI,CAAC4B,gBAAgB,CAAC,UAAU,CAAC;MAAA,iBAC5BtB,SAAS,CAACuB,MAAM,CAACG,oBAAoB,IAAIpB,YAAY;MAAA,SAC7DO,MAAM;MAAA,eACA,IAAI,CAACtC,QAAQ,CAACsC,MAAM,EAAEK,MAAM,CAACO,EAAE,CAAC,CAAC,CAAC,CAAC;MAAA,cACpC,IAAI,CAAClD,QAAQ,CAACsC,MAAM,EAAEK,MAAM,CAACO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;MAAA,KAC7CV,EAAE;MAAA,UACGN,MAAM;MAAA,UACNE;IAAM,EACf,CAEH,CAAC,GAEL,IACJ,CAAC;EAEP;AACF;AAACrC,eAAA,CA7GKH,kBAAkB,iBACD,WAAW;AAAAG,eAAA,CAD5BH,kBAAkB,WAEPT,KAAK;AA6GtB,OAAO,MAAMiE,SAAS,GAAG7D,aAAa,CAACK,kBAAkB,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=HoverLine.type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HoverLine.type.js","names":[],"sources":["../../../../src/component/Hover/HoverLine.type.ts"],"sourcesContent":["import type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';\n\nimport type { makeDataHintsContainer } from '../../a11y/hints';\nimport type { ChartMetaData } from '../../ChartMetaData';\nimport type { ListData } from '../Chart/AbstractChart.type';\n\nexport type HoverLineProps = {\n data: ListData;\n x: keyof HoverLineProps['data'][number];\n y: keyof HoverLineProps['data'][number];\n scale: [ScaleBand<any> | ScaleTime<any, any> | ScaleLinear<any, any>, ScaleBand<any> | ScaleTime<any, any> | ScaleLinear<any, any>];\n meta: ChartMetaData;\n xIndex: number | null;\n yIndex: number | null;\n hideTickHover?: boolean;\n dataHints: ReturnType<typeof makeDataHintsContainer>;\n formatValue: (value: unknown) => string | [((value: unknown) => string), ((value: unknown) => string)];\n};\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,71 @@
1
+ import { sstyled as _sstyled } from "@semcore/core";
2
+ import { sstyled } from '@semcore/core';
3
+ import { getFocusableIn } from '@semcore/core/lib/utils/focus-lock/getFocusableIn';
4
+ import useEnhancedEffect from '@semcore/core/lib/utils/use/useEnhancedEffect';
5
+ import React from 'react';
6
+ /*!__reshadow-styles__:"./hoveredTick.shadow.css"*/
7
+ const styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SHoveredTickWrapper_1xgb9_gg_{font-size:var(--intergalactic-fs-100,12px);font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;line-height:var(--intergalactic-lh-100,1.3334);color:var(--intergalactic-chart-grid-text-label,#00132466);text-align:center}.___SHoveredTickWrapper_1xgb9_gg_[data-is-first=true]{text-align:left}.___SHoveredTickWrapper_1xgb9_gg_[data-is-last=true]{text-align:right}.___SHoveredTickWrapper_1xgb9_gg_._position_top_1xgb9_gg_ .___SHoveredTickContent_1xgb9_gg_{align-content:end}.___SHoveredTickWrapper_1xgb9_gg_ .___SHoveredTickContent_1xgb9_gg_{height:100%}.___SHoveredTickWrapper_1xgb9_gg_ .___SHoveredTick_1xgb9_gg_{display:inline-block;padding:3px 12px;border-radius:6px;background-color:var(--intergalactic-chart-x-axis-accent-tick,oklch(.96 .005 232.5))}", /*__inner_css_end__*/"1xgb9_gg_"),
8
+ /*__reshadow_css_end__*/
9
+ {
10
+ "__SHoveredTickWrapper": "___SHoveredTickWrapper_1xgb9_gg_",
11
+ "_position_top": "_position_top_1xgb9_gg_",
12
+ "__SHoveredTickContent": "___SHoveredTickContent_1xgb9_gg_",
13
+ "__SHoveredTick": "___SHoveredTick_1xgb9_gg_"
14
+ });
15
+ const HOVERED_TICK_MARGIN_Y = 8;
16
+ const HOVERED_TICK_PADDING_Y = 3;
17
+ const HOVERED_TICK_PADDING_X = 12;
18
+ export function HoveredTick(props) {
19
+ var _ref;
20
+ const {
21
+ tickFormatter,
22
+ value,
23
+ isFirstTick = false,
24
+ isLastTick = false,
25
+ x,
26
+ yRange,
27
+ y,
28
+ size,
29
+ position
30
+ } = props;
31
+ const formattedValue = tickFormatter(value);
32
+ const contentRef = React.useRef(null);
33
+ const isRendered = size?.width !== undefined && size?.height !== undefined && position !== null;
34
+ const isMightBeInteractive = formattedValue !== null && typeof formattedValue === 'object';
35
+ useEnhancedEffect(() => {
36
+ if (!isRendered || !isMightBeInteractive || !contentRef.current) return;
37
+ getFocusableIn(contentRef.current).forEach(node => node.setAttribute('tabindex', '-1'));
38
+ }, [value, isRendered, isMightBeInteractive]);
39
+ if (!isRendered) return null;
40
+ const {
41
+ width,
42
+ height
43
+ } = size;
44
+ const SHoveredTickWrapper = 'foreignObject';
45
+ const SHoveredTickContent = 'div';
46
+ const SHoveredTick = 'span';
47
+ const w = width + HOVERED_TICK_PADDING_X * 2;
48
+ let tickX;
49
+ let tickY;
50
+ if (x !== undefined) {
51
+ tickX = isFirstTick ? x : isLastTick ? x - w : x - w / 2;
52
+ tickY = position === 'top' ? yRange[1] - height - HOVERED_TICK_MARGIN_Y + HOVERED_TICK_PADDING_Y : yRange[0] + HOVERED_TICK_MARGIN_Y - HOVERED_TICK_PADDING_Y;
53
+ } else {
54
+ tickX = 0 - HOVERED_TICK_PADDING_X;
55
+ tickY = isFirstTick ? y : isLastTick ? y - height : y - height / 2;
56
+ }
57
+ return _ref = sstyled(styles), /*#__PURE__*/React.createElement(SHoveredTickWrapper, _ref.cn("SHoveredTickWrapper", {
58
+ "x": tickX,
59
+ "y": tickY,
60
+ "width": w,
61
+ "height": height,
62
+ "data-is-first": isFirstTick,
63
+ "data-is-last": isLastTick,
64
+ "data-hovered-tick": true,
65
+ "aria-hidden": 'true',
66
+ "position": position
67
+ }), /*#__PURE__*/React.createElement(SHoveredTickContent, _ref.cn("SHoveredTickContent", {
68
+ "ref": contentRef
69
+ }), /*#__PURE__*/React.createElement(SHoveredTick, _ref.cn("SHoveredTick", {}), formattedValue)));
70
+ }
71
+ //# sourceMappingURL=HoveredTick.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HoveredTick.js","names":["sstyled","getFocusableIn","useEnhancedEffect","React","styles","_sstyled","insert","HOVERED_TICK_MARGIN_Y","HOVERED_TICK_PADDING_Y","HOVERED_TICK_PADDING_X","HoveredTick","props","_ref","tickFormatter","value","isFirstTick","isLastTick","x","yRange","y","size","position","formattedValue","contentRef","useRef","isRendered","width","undefined","height","isMightBeInteractive","current","forEach","node","setAttribute","SHoveredTickWrapper","SHoveredTickContent","SHoveredTick","w","tickX","tickY","createElement","cn"],"sources":["../../../../src/component/Hover/HoveredTick.tsx"],"sourcesContent":["import { sstyled } from '@semcore/core';\nimport { getFocusableIn } from '@semcore/core/lib/utils/focus-lock/getFocusableIn';\nimport useEnhancedEffect from '@semcore/core/lib/utils/use/useEnhancedEffect';\nimport React from 'react';\n\nimport styles from './hoveredTick.shadow.css';\nimport type { ChartMetaData } from '../../ChartMetaData';\n\nconst HOVERED_TICK_MARGIN_Y = 8;\nconst HOVERED_TICK_PADDING_Y = 3;\nconst HOVERED_TICK_PADDING_X = 12;\n\ntype HoveredTickProps = {\n tickFormatter: (value: unknown) => string;\n value: unknown;\n isFirstTick?: boolean;\n isLastTick?: boolean;\n size: ReturnType<ChartMetaData['getTicksSize']>;\n position: ReturnType<ChartMetaData['getTicksPosition']>;\n xRange: number[];\n yRange: number[];\n} & ({ x: number; y?: never } | { y: number; x?: never });\n\nexport function HoveredTick(props: HoveredTickProps) {\n const { tickFormatter, value, isFirstTick = false, isLastTick = false, x, yRange, y, size, position } = props;\n\n const formattedValue = tickFormatter(value);\n\n const contentRef = React.useRef(null);\n\n const isRendered = size?.width !== undefined && size?.height !== undefined && position !== null;\n const isMightBeInteractive = formattedValue !== null && typeof formattedValue === 'object';\n\n useEnhancedEffect(() => {\n if (!isRendered || !isMightBeInteractive || !contentRef.current) return;\n\n getFocusableIn(contentRef.current).forEach((node) => node.setAttribute('tabindex', '-1'));\n }, [value, isRendered, isMightBeInteractive]);\n\n if (!isRendered) 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\n let tickX: number;\n let tickY: number;\n\n if (x !== undefined) {\n tickX = isFirstTick\n ? x\n : isLastTick\n ? x - w\n : x - w / 2;\n\n 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 } else {\n tickX = 0 - HOVERED_TICK_PADDING_X;\n\n tickY = isFirstTick\n ? y\n : isLastTick\n ? y - height\n : y - height / 2;\n }\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 data-hovered-tick\n aria-hidden='true'\n // @ts-expect-error for css only\n position={position}\n >\n <SHoveredTickContent ref={contentRef}>\n <SHoveredTick>{formattedValue}</SHoveredTick>\n </SHoveredTickContent>\n </SHoveredTickWrapper>,\n );\n}\n"],"mappings":";AAAA,SAASA,OAAO,QAAQ,eAAe;AACvC,SAASC,cAAc,QAAQ,mDAAmD;AAClF,OAAOC,iBAAiB,MAAM,+CAA+C;AAC7E,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,MAAAC,MAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAK1B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apper {
2
+ font-size: var(--intergalactic-fs-100, 12px);
3
+ font-variant-numeric: tabular-nums;
4
+ line-height: var(--intergalactic-lh-100, 1.3334);
5
+ color: var(--intergalactic-chart-grid-text-label, oklch(from oklch(0.182 0.045 244.8 / 0.593) l c h / 0.4));
6
+
7
+ text-align: center;
8
+
9
+ &[data-is-first='true'] {
10
+ text-align: start;
11
+ }
12
+
13
+ &[data-is-last='true'] {
14
+ text-align: end;
15
+ }
16
+
17
+ &[position='top'] {
18
+ SHoveredTickContent {
19
+ align-content: end;
20
+ }
21
+ }
22
+
23
+ /* FF fix */
24
+ SHoveredTickContent {
25
+ height: 100%;
26
+ }
27
+
28
+ SHoveredTick {
29
+ display: inline-block;
30
+ padding: 3px 12px;
31
+ border-radius: 6px;
32
+ background-color: var(--intergalactic-chart-x-axis-accent-tick, oklch(0.96 0.005 232.5));
33
+ }
34
+ }
@@ -1,6 +1,7 @@
1
1
  SArea {
2
2
  fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
3
3
  fill-opacity: 0.1;
4
+ stroke: none;
4
5
  }
5
6
 
6
7
  SArea[withGradient] {
@@ -13,17 +14,17 @@ SArea[color] {
13
14
 
14
15
  SArea[pattern] {
15
16
  fill: var(--pattern);
16
- fill-opacity: 0.5;
17
+ fill-opacity: 0.8;
17
18
  }
18
19
 
19
20
  SArea[transparent] {
20
- opacity: 0.3;
21
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
21
22
  }
22
23
 
23
24
  SAreaLine {
24
25
  stroke: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
25
26
  stroke-width: 2;
26
- fill: transparent;
27
+ fill: none;
27
28
  }
28
29
 
29
30
  SAreaLine[color] {
@@ -31,7 +32,7 @@ SAreaLine[color] {
31
32
  }
32
33
 
33
34
  SAreaLine[transparent] {
34
- opacity: 0.3;
35
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
35
36
  }
36
37
 
37
38
  SArea,
@@ -20,7 +20,7 @@ SBar[hide] {
20
20
  }
21
21
 
22
22
  SBar[transparent] {
23
- opacity: 0.3;
23
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
24
24
  }
25
25
 
26
26
  SBar[onClick] {
@@ -1,52 +1,57 @@
1
1
  SBubble {
2
- fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
3
2
  stroke: var(--intergalactic-chart-grid-border, #ffffff);
4
3
  stroke-width: 2px;
5
4
  transition-property: cx, cy;
6
5
  transition-duration: var(--duration);
7
6
  transition-timing-function: ease-in-out;
8
- opacity: 0.5;
9
7
 
10
- &:hover {
11
- opacity: 0.8;
8
+ fill-opacity: 0.1;
9
+
10
+ &[withPatterns] {
11
+ fill-opacity: 0.5;
12
12
  }
13
13
  }
14
14
 
15
- g[visible='false'] {
15
+ SGroup[visible='false'] {
16
16
  display: none;
17
17
  }
18
18
 
19
+ SGroup[hovered], SGroup:hover {
20
+ & > SBubble {
21
+ fill-opacity: 0.3;
22
+
23
+ &[withPatterns] {
24
+ fill-opacity: 1;
25
+ }
26
+ }
27
+
28
+ & > SCenterHover {
29
+ opacity: 1;
30
+ filter: var(--intergalactic-box-shadow-chart-elevated, drop-shadow(0px 0px 2px oklch(from oklch(0.23 0.009 245) l c h / 0.165)) drop-shadow(0px 1px 2px oklch(from oklch(0.23 0.009 245) l c h / 0.165)));
31
+ }
32
+ }
33
+
19
34
  SBubble[clickable] {
20
35
  cursor: pointer;
21
36
  }
22
37
 
23
38
  SBubble[color] {
24
- fill: var(--color);
25
- }
26
-
27
- SBubble[pattern][color] {
28
- fill: var(--pattern);
29
39
  stroke: var(--color);
30
- stroke-width: 1px;
31
40
  }
32
41
 
33
- SBubble[transparent] {
34
- opacity: 0.3;
35
- }
36
-
37
- SCenter {
38
- text-anchor: middle;
39
- /* disable-tokens-validator */
40
- font-size: calc(var(--intergalactic-fs-100, 12px) - 1px);
41
- stroke: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
42
+ SBubble[pattern] {
43
+ fill: var(--pattern);
42
44
  }
43
45
 
44
46
  SCenter[color] {
45
47
  stroke: var(--color);
48
+ stroke-width: 1px;
46
49
  }
47
50
 
48
- SCenter[transparent] {
49
- opacity: 0.3;
51
+ SCenterHover {
52
+ opacity: 0;
53
+ stroke: var(--intergalactic-chart-grid-border, #ffffff);
54
+ stroke-width: 3px;
50
55
  }
51
56
 
52
57
  SLabel {
@@ -65,6 +70,6 @@ SLabel[color] {
65
70
  fill: var(--color);
66
71
  }
67
72
 
68
- SLabel[transparent] {
69
- opacity: 0.3;
73
+ SBubble[transparent], SCenter[transparent], SLabel[transparent] {
74
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
70
75
  }
@@ -1,6 +1,7 @@
1
1
  SPie {
2
2
  stroke: var(--intergalactic-chart-grid-border, #ffffff);
3
3
  fill: var(--intergalactic-chart-palette-order-1, oklch(0.23 0.009 245));
4
+ transition: opacity calc(var(--intergalactic-duration-extra-fast, 100) * 1ms) ease-out;
4
5
  }
5
6
 
6
7
  SPie[color] {
@@ -14,7 +15,12 @@ SPie[pattern][color] {
14
15
  }
15
16
 
16
17
  SPie[transparent] {
17
- opacity: 0.3;
18
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
19
+ }
20
+
21
+ SLabel {
22
+ overflow-wrap: anywhere;
23
+ pointer-events: none;
18
24
  }
19
25
 
20
26
  SEmptyData {
@@ -24,11 +30,3 @@ SEmptyData {
24
30
  SEmptyData[color] {
25
31
  fill: var(--color);
26
32
  }
27
-
28
- SLabel {
29
- text-anchor: middle;
30
- vertical-anchor: middle;
31
- font-size: var(--intergalactic-fs-200, 14px);
32
- line-height: var(--intergalactic-lh-200, 1.4286);
33
-
34
- }
@@ -49,7 +49,7 @@ SDotBorder {
49
49
  }
50
50
 
51
51
  SDot[transparent] {
52
- opacity: 0.3;
52
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
53
53
  }
54
54
 
55
55
  SDotBackdrop {
@@ -1,44 +1,4 @@
1
- SHoverLine, SHoverLine:focus-visible {
2
- outline: none;
3
- stroke: var(--intergalactic-chart-grid-x-axis, oklch(0.88 0.011 234.9));
4
- }
5
-
6
1
  SHoverRect, SHoverRect:focus-visible {
7
2
  outline: none;
8
3
  fill: var(--intergalactic-chart-grid-bar-hover, oklch(0.375 0.09 242.7 / 0.05));
9
4
  }
10
-
11
- SHoveredTickWrapper {
12
- font-size: var(--intergalactic-fs-100, 12px);
13
- font-variant-numeric: tabular-nums;
14
- line-height: var(--intergalactic-lh-100, 1.3334);
15
- color: var(--intergalactic-chart-grid-text-label, oklch(from oklch(0.182 0.045 244.8 / 0.593) l c h / 0.4));
16
-
17
- text-align: center;
18
-
19
- &[data-is-first='true'] {
20
- text-align: start;
21
- }
22
-
23
- &[data-is-last='true'] {
24
- text-align: end;
25
- }
26
-
27
- &[position='top'] {
28
- SHoveredTickContent {
29
- align-content: end;
30
- }
31
- }
32
-
33
- /* FF fix */
34
- SHoveredTickContent {
35
- height: 100%;
36
- }
37
-
38
- SHoveredTick {
39
- display: inline-block;
40
- padding: 3px 12px;
41
- border-radius: 6px;
42
- background-color: var(--intergalactic-chart-x-axis-accent-tick, oklch(0.96 0.005 232.5));
43
- }
44
- }
@@ -16,7 +16,7 @@ SLine[hide] {
16
16
  }
17
17
 
18
18
  SLine[transparent] {
19
- opacity: 0.3;
19
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
20
20
  }
21
21
 
22
22
  SNull {
@@ -53,7 +53,7 @@ SPolygonDot {
53
53
  }
54
54
 
55
55
  SPolygonDot[transparent] {
56
- opacity: 0.3;
56
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
57
57
  }
58
58
 
59
59
  SPolygonDot[color] {
@@ -67,7 +67,7 @@ SPolygonLine {
67
67
  }
68
68
 
69
69
  SPolygonLine[transparent] {
70
- opacity: 0.3;
70
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
71
71
  }
72
72
 
73
73
  SPolygonLine[color] {
@@ -12,7 +12,7 @@ SLine[stroke] {
12
12
  }
13
13
 
14
14
  SLine[transparent] {
15
- opacity: 0.3;
15
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
16
16
  }
17
17
 
18
18
  SCap {
@@ -25,11 +25,11 @@ SCap[pattern] {
25
25
  }
26
26
 
27
27
  SCap[transparent] {
28
- opacity: 0.3;
28
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
29
29
  }
30
30
 
31
31
  SIcon[transparent] {
32
- opacity: 0.3;
32
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
33
33
  }
34
34
 
35
35
  SLabel {
@@ -37,7 +37,7 @@ SLabel {
37
37
  }
38
38
 
39
39
  SLabel[transparent] {
40
- opacity: 0.3;
40
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
41
41
  }
42
42
 
43
43
  SRadian:hover SLabel {
@@ -21,7 +21,7 @@ SScatterPlot[pattern][color] {
21
21
  }
22
22
 
23
23
  SScatterPlot[transparent] {
24
- opacity: 0.3;
24
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
25
25
  }
26
26
 
27
27
  SValue {
@@ -35,5 +35,5 @@ SValue[color] {
35
35
  }
36
36
 
37
37
  SValue[transparent] {
38
- opacity: 0.3;
38
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
39
39
  }
@@ -28,7 +28,7 @@ SCircle[pattern][color] {
28
28
  }
29
29
 
30
30
  SCircle[transparent] {
31
- opacity: 0.3;
31
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
32
32
  }
33
33
 
34
34
  SIntersection {
@@ -42,5 +42,5 @@ SIntersection {
42
42
  }
43
43
 
44
44
  SIntersection[transparent] {
45
- opacity: 0.3;
46
- }
45
+ opacity: var(--intergalactic-chart-transparent-opacity, 0.3);
46
+ }
@@ -1,3 +1,4 @@
1
+ import de from './de.json';
1
2
  import en from './en.json';
2
3
  import es from './es.json';
3
4
  import fr from './fr.json';
@@ -12,6 +13,7 @@ import tr from './tr.json';
12
13
  import vi from './vi.json';
13
14
  import zh from './zh.json';
14
15
  export const localizedMessages = {
16
+ de,
15
17
  en,
16
18
  es,
17
19
  fr,
@@ -1 +1 @@
1
- {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["en","es","fr","it","ja","ko","nl","pl","pt","sv","tr","vi","zh","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pl from './pl.json';\nimport pt from './pt.json';\nimport sv from './sv.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,MAAMC,iBAAiB,GAAG;EAC/Bb,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFE,EAAE;EACFE,EAAE;EACFC,EAAE;EACFC,EAAE;EACFL,EAAE;EACFE;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"__intergalactic-dynamic-locales.js","names":["de","en","es","fr","it","ja","ko","nl","pl","pt","sv","tr","vi","zh","localizedMessages"],"sources":["../../../src/translations/__intergalactic-dynamic-locales.ts"],"sourcesContent":["import de from './de.json';\nimport en from './en.json';\nimport es from './es.json';\nimport fr from './fr.json';\nimport it from './it.json';\nimport ja from './ja.json';\nimport ko from './ko.json';\nimport nl from './nl.json';\nimport pl from './pl.json';\nimport pt from './pt.json';\nimport sv from './sv.json';\nimport tr from './tr.json';\nimport vi from './vi.json';\nimport zh from './zh.json';\n\nexport const localizedMessages = {\n de,\n en,\n es,\n fr,\n it,\n ja,\n ko,\n nl,\n pt,\n tr,\n vi,\n zh,\n pl,\n sv,\n};\n"],"mappings":"AAAA,OAAOA,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAC1B,OAAOC,EAAE,MAAM,WAAW;AAE1B,OAAO,MAAMC,iBAAiB,GAAG;EAC/Bd,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFC,EAAE;EACFE,EAAE;EACFE,EAAE;EACFC,EAAE;EACFC,EAAE;EACFL,EAAE;EACFE;AACF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Bar.d.js","names":[],"sources":["../../../src/types/Bar.d.ts"],"sourcesContent":["import type { UnknownProperties } from '@semcore/core';\nimport type { ScaleBand, ScaleLinear } from 'd3-scale';\nimport type React from 'react';\n\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IBarProps extends BarProps, UnknownProperties {}\nexport type BarProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Line color */\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of curvature\n * @default 2\n */\n r?: number | number[];\n /** Minimal height\n * @default 2\n */\n hMin?: number;\n /**\n * Bar click handler\n */\n onClick?: (\n data: { [key: string]: string | number | Date },\n event: React.SyntheticEvent,\n barIndex: number,\n barKey: string,\n ) => void;\n /** Enables element transparency */\n transparent?: boolean;\n /**\n * The maximum width of each Bar\n */\n maxBarSize?: number;\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n /**\n * Defines the x and y offset for positioning bars\n */\n offset?: [number, number] | ((index: number) => [number, number]);\n};\n\n/** @deprecated */\nexport interface IBarContext extends BarContext, UnknownProperties {}\nexport type BarContext = {\n scale: [ScaleBand<any>, ScaleLinear<any, any>];\n /** @deprecated */\n value: unknown;\n /** Index in `data` array */\n index: number;\n x: number;\n y: number;\n width: number;\n height: number;\n};\n\n/** @deprecated */\nexport interface IBackgroundProps extends BackgroundProps, UnknownProperties {}\nexport type BackgroundProps = Context & {\n /** Coordinate x */\n x?: number | string;\n /** Coordinate y */\n y?: number | string;\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Width rect */\n width?: number | string;\n /** Height rect */\n height?: number | string;\n};\n\ntype BackgroundContext = Context & {\n /** Index in `data` array */\n index: number;\n};\n\ndeclare const Bar: IntergalacticD3Component<'rect', BarProps, BarContext> & {\n Background: IntergalacticD3Component<'rect', BackgroundProps, BackgroundContext>;\n};\n\nexport default Bar;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"Bar.d.js","names":[],"sources":["../../../src/types/Bar.d.ts"],"sourcesContent":["import type { UnknownProperties } from '@semcore/core';\nimport type { ScaleBand, ScaleLinear } from 'd3-scale';\nimport type React from 'react';\n\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IBarProps extends BarProps, UnknownProperties {}\nexport type BarProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n /** Line color */\n color?: string;\n /** Element hide property */\n hide?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Radius of curvature\n * @default 2\n */\n r?: number | number[];\n /** Minimal height\n * @default 2\n */\n hMin?: number;\n /**\n * Bar click handler\n */\n onClick?: (\n data: { [key: string]: string | number | Date },\n event: React.SyntheticEvent,\n barIndex: number,\n barKey: string,\n ) => void;\n /** Enables element transparency */\n transparent?: boolean;\n /**\n * The maximum width of each Bar\n */\n maxBarSize?: number;\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n /**\n * Defines the x and y offset for positioning bars\n */\n offset?: [number, number] | ((index: number) => [number, number]);\n};\n\n/** @deprecated */\nexport interface IBarContext extends BarContext, UnknownProperties {}\nexport type BarContext = {\n scale: [ScaleBand<any>, ScaleLinear<any, any>];\n /** @deprecated */\n value: unknown;\n /** Index in `data` array */\n index: number;\n x: number;\n y: number;\n width: number;\n height: number;\n};\n\n/** @deprecated */\nexport interface IBackgroundProps extends BackgroundProps, UnknownProperties {}\nexport type BackgroundProps = Context & {\n /** Coordinate x */\n x?: number | string;\n /** Coordinate y */\n y?: number | string;\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Width rect */\n width?: number | string;\n /** Height rect */\n height?: number | string;\n};\n\ntype BackgroundContext = Context & {\n /** Index in `data` array */\n index: number;\n};\n\ndeclare const Bar: IntergalacticD3Component<'rect', BarProps, BarContext> & {\n /**\n * @deprecated. Since the new design was applied, you shouldn't use it anymore for Bar charts.\n */\n Background: IntergalacticD3Component<'rect', BackgroundProps, BackgroundContext>;\n};\n\nexport default Bar;\n"],"mappings":"","ignoreList":[]}