@semcore/d3-chart 16.7.0-prerelease.1 → 16.7.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 (281) hide show
  1. package/lib/cjs/Area.js +11 -11
  2. package/lib/cjs/Axis.js +18 -16
  3. package/lib/cjs/Axis.js.map +1 -1
  4. package/lib/cjs/Bar.js +16 -16
  5. package/lib/cjs/Bubble.js +14 -14
  6. package/lib/cjs/CompactHorizontalBar.js +20 -20
  7. package/lib/cjs/CompactHorizontalBar.js.map +1 -1
  8. package/lib/cjs/Donut.js +9 -9
  9. package/lib/cjs/Dots.js +8 -8
  10. package/lib/cjs/HorizontalBar.js +17 -17
  11. package/lib/cjs/HorizontalBar.js.map +1 -1
  12. package/lib/cjs/Hover.js +3 -3
  13. package/lib/cjs/Line.js +9 -9
  14. package/lib/cjs/Plot.js +6 -9
  15. package/lib/cjs/Plot.js.map +1 -1
  16. package/lib/cjs/Radar.js +19 -19
  17. package/lib/cjs/RadialTree.js +12 -12
  18. package/lib/cjs/RadialTree.js.map +1 -1
  19. package/lib/cjs/Reference.js +12 -12
  20. package/lib/cjs/ResponsiveContainer.js +2 -2
  21. package/lib/cjs/ResponsiveContainer.js.map +1 -1
  22. package/lib/cjs/ScatterPlot.js +9 -9
  23. package/lib/cjs/StackBar.js +3 -8
  24. package/lib/cjs/StackBar.js.map +1 -1
  25. package/lib/cjs/Tooltip.js +18 -19
  26. package/lib/cjs/Tooltip.js.map +1 -1
  27. package/lib/cjs/Venn.js +12 -12
  28. package/lib/cjs/Venn.js.map +1 -1
  29. package/lib/cjs/a11y/PlotA11yModule.js +37 -79
  30. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  31. package/lib/cjs/a11y/PlotA11yView.js +39 -12
  32. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  33. package/lib/cjs/a11y/translations/module/de.json +2 -2
  34. package/lib/cjs/a11y/translations/module/en.json +2 -2
  35. package/lib/cjs/a11y/translations/module/es.json +2 -2
  36. package/lib/cjs/a11y/translations/module/fr.json +2 -2
  37. package/lib/cjs/a11y/translations/module/it.json +2 -2
  38. package/lib/cjs/a11y/translations/module/ja.json +2 -2
  39. package/lib/cjs/a11y/translations/module/ko.json +2 -2
  40. package/lib/cjs/a11y/translations/module/nl.json +2 -2
  41. package/lib/cjs/a11y/translations/module/pl.json +2 -2
  42. package/lib/cjs/a11y/translations/module/pt.json +2 -2
  43. package/lib/cjs/a11y/translations/module/sv.json +2 -2
  44. package/lib/cjs/a11y/translations/module/tr.json +2 -2
  45. package/lib/cjs/a11y/translations/module/vi.json +2 -2
  46. package/lib/cjs/a11y/translations/module/zh.json +2 -2
  47. package/lib/cjs/component/Chart/AbstractChart.js +9 -9
  48. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  49. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  50. package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
  51. package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
  52. package/lib/cjs/component/Chart/BarChart.js +66 -19
  53. package/lib/cjs/component/Chart/BarChart.js.map +1 -1
  54. package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
  55. package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
  56. package/lib/cjs/component/Chart/CigaretteChart.js +8 -8
  57. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  58. package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  59. package/lib/cjs/component/Chart/DonutChart.js +2 -2
  60. package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
  61. package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
  62. package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
  63. package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
  64. package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
  65. package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
  66. package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
  67. package/lib/cjs/component/ChartLegend/BaseLegend.js +1 -1
  68. package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
  69. package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
  70. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +6 -6
  71. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  72. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  73. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +23 -23
  74. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  75. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  76. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +9 -9
  77. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  78. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  79. package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
  80. package/lib/cjs/style/axis.shadow.css +3 -1
  81. package/lib/cjs/style/plot.shadow.css +1 -3
  82. package/lib/cjs/style/plotA11yModule.shadow.css +10 -11
  83. package/lib/cjs/style/plotA11yView.shadow.css +13 -26
  84. package/lib/cjs/types/Axis.d.js.map +1 -1
  85. package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
  86. package/lib/cjs/types/Hover.d.js.map +1 -1
  87. package/lib/cjs/types/Line.d.js.map +1 -1
  88. package/lib/cjs/types/Plot.d.js.map +1 -1
  89. package/lib/cjs/types/Radar.d.js.map +1 -1
  90. package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
  91. package/lib/cjs/types/Tooltip.d.js.map +1 -1
  92. package/lib/cjs/types/Venn.d.js.map +1 -1
  93. package/lib/cjs/utils.js.map +1 -1
  94. package/lib/es6/Area.js +11 -11
  95. package/lib/es6/Axis.js +18 -16
  96. package/lib/es6/Axis.js.map +1 -1
  97. package/lib/es6/Bar.js +16 -16
  98. package/lib/es6/Bubble.js +14 -14
  99. package/lib/es6/CompactHorizontalBar.js +17 -17
  100. package/lib/es6/CompactHorizontalBar.js.map +1 -1
  101. package/lib/es6/Donut.js +9 -9
  102. package/lib/es6/Dots.js +8 -8
  103. package/lib/es6/HorizontalBar.js +17 -17
  104. package/lib/es6/HorizontalBar.js.map +1 -1
  105. package/lib/es6/Hover.js +3 -3
  106. package/lib/es6/Line.js +9 -9
  107. package/lib/es6/Plot.js +5 -8
  108. package/lib/es6/Plot.js.map +1 -1
  109. package/lib/es6/Radar.js +19 -19
  110. package/lib/es6/RadialTree.js +12 -12
  111. package/lib/es6/RadialTree.js.map +1 -1
  112. package/lib/es6/Reference.js +12 -12
  113. package/lib/es6/ResponsiveContainer.js +1 -1
  114. package/lib/es6/ResponsiveContainer.js.map +1 -1
  115. package/lib/es6/ScatterPlot.js +9 -9
  116. package/lib/es6/StackBar.js +3 -8
  117. package/lib/es6/StackBar.js.map +1 -1
  118. package/lib/es6/Tooltip.js +10 -11
  119. package/lib/es6/Tooltip.js.map +1 -1
  120. package/lib/es6/Venn.js +10 -10
  121. package/lib/es6/Venn.js.map +1 -1
  122. package/lib/es6/a11y/PlotA11yModule.js +36 -80
  123. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  124. package/lib/es6/a11y/PlotA11yView.js +37 -10
  125. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  126. package/lib/es6/a11y/translations/module/de.json +2 -2
  127. package/lib/es6/a11y/translations/module/en.json +2 -2
  128. package/lib/es6/a11y/translations/module/es.json +2 -2
  129. package/lib/es6/a11y/translations/module/fr.json +2 -2
  130. package/lib/es6/a11y/translations/module/it.json +2 -2
  131. package/lib/es6/a11y/translations/module/ja.json +2 -2
  132. package/lib/es6/a11y/translations/module/ko.json +2 -2
  133. package/lib/es6/a11y/translations/module/nl.json +2 -2
  134. package/lib/es6/a11y/translations/module/pl.json +2 -2
  135. package/lib/es6/a11y/translations/module/pt.json +2 -2
  136. package/lib/es6/a11y/translations/module/sv.json +2 -2
  137. package/lib/es6/a11y/translations/module/tr.json +2 -2
  138. package/lib/es6/a11y/translations/module/vi.json +2 -2
  139. package/lib/es6/a11y/translations/module/zh.json +2 -2
  140. package/lib/es6/component/Chart/AbstractChart.js +5 -5
  141. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  142. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  143. package/lib/es6/component/Chart/AreaChart.js.map +1 -1
  144. package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
  145. package/lib/es6/component/Chart/BarChart.js +67 -20
  146. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  147. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  148. package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
  149. package/lib/es6/component/Chart/CigaretteChart.js +1 -1
  150. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  151. package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  152. package/lib/es6/component/Chart/DonutChart.js +1 -1
  153. package/lib/es6/component/Chart/DonutChart.js.map +1 -1
  154. package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
  155. package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
  156. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  157. package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
  158. package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
  159. package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
  160. package/lib/es6/component/ChartLegend/BaseLegend.js +1 -1
  161. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  162. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  163. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +5 -5
  164. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  165. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  166. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +18 -18
  167. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  168. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  169. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +7 -7
  170. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  171. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  172. package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
  173. package/lib/es6/style/axis.shadow.css +3 -1
  174. package/lib/es6/style/plot.shadow.css +1 -3
  175. package/lib/es6/style/plotA11yModule.shadow.css +10 -11
  176. package/lib/es6/style/plotA11yView.shadow.css +13 -26
  177. package/lib/es6/types/Axis.d.js.map +1 -1
  178. package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
  179. package/lib/es6/types/Hover.d.js.map +1 -1
  180. package/lib/es6/types/Line.d.js.map +1 -1
  181. package/lib/es6/types/Plot.d.js.map +1 -1
  182. package/lib/es6/types/Radar.d.js.map +1 -1
  183. package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
  184. package/lib/es6/types/Tooltip.d.js.map +1 -1
  185. package/lib/es6/types/Venn.d.js.map +1 -1
  186. package/lib/es6/utils.js.map +1 -1
  187. package/lib/esm/AnimatedClipPath.mjs +2 -7
  188. package/lib/esm/Area.mjs +14 -14
  189. package/lib/esm/Axis.mjs +21 -19
  190. package/lib/esm/Bar.mjs +17 -17
  191. package/lib/esm/Bubble.mjs +16 -16
  192. package/lib/esm/CompactHorizontalBar.mjs +20 -19
  193. package/lib/esm/Donut.mjs +15 -13
  194. package/lib/esm/Dots.mjs +10 -10
  195. package/lib/esm/HorizontalBar.mjs +18 -18
  196. package/lib/esm/Hover.mjs +6 -6
  197. package/lib/esm/Line.mjs +12 -12
  198. package/lib/esm/Plot.mjs +7 -10
  199. package/lib/esm/Radar.mjs +23 -23
  200. package/lib/esm/RadialTree.mjs +13 -13
  201. package/lib/esm/Reference.mjs +13 -13
  202. package/lib/esm/ResponsiveContainer.mjs +2 -2
  203. package/lib/esm/ScatterPlot.mjs +12 -11
  204. package/lib/esm/StackBar.mjs +4 -9
  205. package/lib/esm/StackedArea.mjs +2 -2
  206. package/lib/esm/Tooltip.mjs +13 -16
  207. package/lib/esm/Venn.mjs +13 -12
  208. package/lib/esm/a11y/PlotA11yModule.mjs +31 -69
  209. package/lib/esm/a11y/PlotA11yView.mjs +35 -10
  210. package/lib/esm/a11y/insights.mjs +2 -1
  211. package/lib/esm/a11y/intl.mjs +1 -1
  212. package/lib/esm/a11y/translations/module/de.json.mjs +2 -4
  213. package/lib/esm/a11y/translations/module/en.json.mjs +2 -4
  214. package/lib/esm/a11y/translations/module/es.json.mjs +2 -4
  215. package/lib/esm/a11y/translations/module/fr.json.mjs +2 -4
  216. package/lib/esm/a11y/translations/module/it.json.mjs +2 -4
  217. package/lib/esm/a11y/translations/module/ja.json.mjs +2 -4
  218. package/lib/esm/a11y/translations/module/ko.json.mjs +2 -4
  219. package/lib/esm/a11y/translations/module/nl.json.mjs +2 -4
  220. package/lib/esm/a11y/translations/module/pl.json.mjs +2 -4
  221. package/lib/esm/a11y/translations/module/pt.json.mjs +2 -4
  222. package/lib/esm/a11y/translations/module/sv.json.mjs +2 -4
  223. package/lib/esm/a11y/translations/module/tr.json.mjs +2 -4
  224. package/lib/esm/a11y/translations/module/vi.json.mjs +2 -4
  225. package/lib/esm/a11y/translations/module/zh.json.mjs +2 -4
  226. package/lib/esm/component/Chart/AbstractChart.mjs +12 -10
  227. package/lib/esm/component/Chart/AreaChart.mjs +5 -4
  228. package/lib/esm/component/Chart/BarChart.mjs +44 -3
  229. package/lib/esm/component/Chart/BubbleChart.mjs +3 -2
  230. package/lib/esm/component/Chart/CigaretteChart.mjs +6 -5
  231. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +2 -1
  232. package/lib/esm/component/Chart/DonutChart.mjs +3 -2
  233. package/lib/esm/component/Chart/HistogramChart.mjs +5 -4
  234. package/lib/esm/component/Chart/LineChart.mjs +4 -3
  235. package/lib/esm/component/Chart/RadarChart.mjs +2 -1
  236. package/lib/esm/component/Chart/ScatterPlotChart.mjs +3 -2
  237. package/lib/esm/component/Chart/VennChart.mjs +2 -1
  238. package/lib/esm/component/ChartLegend/BaseLegend.mjs +1 -1
  239. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +7 -7
  240. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +21 -25
  241. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +9 -9
  242. package/lib/esm/component/ChartLegend/index.mjs +2 -0
  243. package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +1 -1
  244. package/lib/esm/createElement.mjs +2 -4
  245. package/lib/esm/index.mjs +1 -0
  246. package/lib/esm/style/axis.shadow.css +3 -1
  247. package/lib/esm/style/plot.shadow.css +1 -3
  248. package/lib/esm/style/plotA11yModule.shadow.css +10 -11
  249. package/lib/esm/style/plotA11yView.shadow.css +13 -26
  250. package/lib/esm/utils.mjs +2 -2
  251. package/lib/types/Axis.d.ts +4 -0
  252. package/lib/types/CompactHorizontalBar.d.ts +1 -1
  253. package/lib/types/Hover.d.ts +1 -1
  254. package/lib/types/Line.d.ts +1 -1
  255. package/lib/types/Plot.d.ts +1 -1
  256. package/lib/types/Radar.d.ts +1 -1
  257. package/lib/types/ResponsiveContainer.d.ts +1 -1
  258. package/lib/types/Tooltip.d.ts +1 -3
  259. package/lib/types/Venn.d.ts +1 -1
  260. package/lib/types/a11y/PlotA11yModule.d.ts +4 -11
  261. package/lib/types/a11y/PlotA11yView.d.ts +13 -2
  262. package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +14 -14
  263. package/lib/types/component/Chart/AbstractChart.d.ts +1 -1
  264. package/lib/types/component/Chart/AbstractChart.type.d.ts +1 -1
  265. package/lib/types/component/Chart/AreaChart.type.d.ts +1 -1
  266. package/lib/types/component/Chart/BarChart.type.d.ts +1 -1
  267. package/lib/types/component/Chart/BubbleChart.type.d.ts +1 -1
  268. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +1 -1
  269. package/lib/types/component/Chart/DonutChart.type.d.ts +1 -1
  270. package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -1
  271. package/lib/types/component/Chart/LineChart.type.d.ts +1 -1
  272. package/lib/types/component/Chart/RadarChart.type.d.ts +1 -1
  273. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +1 -1
  274. package/lib/types/component/Chart/VennChart.type.d.ts +1 -1
  275. package/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -1
  276. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +1 -1
  277. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +1 -1
  278. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +1 -1
  279. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -1
  280. package/lib/types/utils.d.ts +10 -10
  281. package/package.json +19 -19
package/lib/esm/index.mjs CHANGED
@@ -1,4 +1,5 @@
1
1
  import { default as default2 } from "./Plot.mjs";
2
+ import "./component/ChartLegend/index.mjs";
2
3
  import { default as default3 } from "./component/Chart/index.mjs";
3
4
  import { default as default4 } from "./component/StackGroupBar/StackGroupBar.mjs";
4
5
  import { SvgElement } from "./component/SvgElement.mjs";
@@ -10,6 +10,9 @@ STick {
10
10
  font-size: var(--intergalactic-fs-100, 12px);
11
11
  fill: var(--intergalactic-chart-grid-text-label, oklch(0.088 0.026 147.7 / 0.583));
12
12
  }
13
+ STick[primaryText] {
14
+ fill: var(--intergalactic-text-primary, oklch(0.1 0.03 137 / 0.899));
15
+ }
13
16
 
14
17
  STick[hide] {
15
18
  display: none;
@@ -69,7 +72,6 @@ STick[position='bottom'] {
69
72
 
70
73
  STick[position='right'] {
71
74
  transform: translateX(16px);
72
- text-anchor: start;
73
75
  dominant-baseline: middle;
74
76
 
75
77
  tspan {
@@ -1,5 +1,3 @@
1
- @import './var.css';
2
-
3
1
  SPlot {
4
2
  overflow: hidden;
5
3
  }
@@ -17,7 +15,7 @@ foreignObject[data-aria-only] {
17
15
  pointer-events: none;
18
16
  }
19
17
 
20
- SPlot[keyboardFocused] {
18
+ SPlot:has(foreignObject[data-aria-only]:focus-within) {
21
19
  @mixin focus-outline-mixin;
22
20
  border-radius: var(--intergalactic-surface-rounded, calc(6px + 2px));
23
21
  }
@@ -1,12 +1,11 @@
1
- @import './var.css';
2
-
3
1
  SPlotA11yModule {
4
- user-select: none;
5
- pointer-events: none;
6
- opacity: 0;
7
- }
8
- SPlotA11yModule:focus {
9
- user-select: all;
10
- pointer-events: all;
11
- opacity: 1;
12
- }
2
+ position: absolute;
3
+ width: 1px;
4
+ height: 1px;
5
+ padding: 0;
6
+ margin: -1px;
7
+ overflow: hidden;
8
+ clip: rect(0, 0, 0, 0);
9
+ white-space: nowrap;
10
+ border: 0,
11
+ }
@@ -1,39 +1,26 @@
1
- @import './var.css';
2
-
3
1
  SPlotA11yView {
4
- user-select: none;
5
- pointer-events: none;
6
- opacity: 0;
2
+ position: relative;
3
+ display: block;
7
4
  background-color: var(--intergalactic-bg-primary-neutral, oklch(1 0 0));
8
5
  color: var(--intergalactic-text-primary, oklch(0.1 0.03 137 / 0.899));
9
6
  border: 3px solid var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161));
10
7
  font-size: var(--intergalactic-fs-50, 10px);
11
- /* disable-tokens-validator */
8
+ z-index: var(--intergalactic-z-index-overlay, 500);
12
9
  padding: 2px;
13
10
  width: 200px;
14
11
  height: 200px;
15
12
  max-width: 80%;
16
13
  max-height: 80%;
17
14
  overflow: auto;
18
- }
19
- SPlotA11yView:focus-within,
20
- SPlotA11yView:focus {
21
- user-select: all;
22
- pointer-events: all;
23
- opacity: 1;
24
- z-index: var(--intergalactic-z-index-overlay, 500);
25
- position: relative;
26
- display: block;
27
- }
28
- SPlotA11yView a {
29
- cursor: pointer;
30
- text-decoration: underline;
31
- margin-bottom: var(--intergalactic-spacing-2x, 8px);
32
- display: block;
33
- }
34
15
 
35
- SPlotA11yView table,
36
- SPlotA11yView td,
37
- SPlotA11yView th {
38
- border: 1px solid var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161));
16
+ a {
17
+ cursor: pointer;
18
+ text-decoration: underline;
19
+ margin-bottom: var(--intergalactic-spacing-2x, 8px);
20
+ display: block;
21
+ }
22
+
23
+ table, td, th {
24
+ border: 1px solid var(--intergalactic-border-primary, oklch(0.137 0.026 175.7 / 0.161));
25
+ }
39
26
  }
package/lib/esm/utils.mjs CHANGED
@@ -5,7 +5,7 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
5
5
  import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
6
6
  import EventEmitter from "@semcore/core/lib/utils/eventEmitter";
7
7
  import { extent, bisector } from "d3-array";
8
- import { scaleSqrt, scaleQuantize, scaleBand } from "d3-scale";
8
+ import { scaleQuantize, scaleBand, scaleSqrt } from "d3-scale";
9
9
  var eventToPoint = function eventToPoint2(event, svgRoot) {
10
10
  var node = event.currentTarget || event.target;
11
11
  var rect = svgRoot.getBoundingClientRect();
@@ -196,7 +196,7 @@ var uniqueId = function uniqueId2() {
196
196
  var prefix = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "id-";
197
197
  return "".concat(prefix).concat(idCounter++);
198
198
  };
199
- var interpolateValue = Symbol("intergalactic-d3-chart-line-interpolate");
199
+ var interpolateValue = /* @__PURE__ */ Symbol("intergalactic-d3-chart-line-interpolate");
200
200
  var getChartDefaultColorName = function getChartDefaultColorName2(index) {
201
201
  index++;
202
202
  if (index < 1) index = 1;
@@ -40,6 +40,10 @@ export type AxisTicksProps = Context & {
40
40
  ticks?: any[];
41
41
  /** Enables multiline tick labels, applicable only for band scales */
42
42
  multiline?: boolean;
43
+ /**
44
+ * Enable `--intergalactic-text-primary` color for ticks
45
+ */
46
+ primaryText?: boolean;
43
47
  };
44
48
 
45
49
  /** @deprecated */
@@ -1,4 +1,4 @@
1
- import type { BoxProps } from '@semcore/flex-box';
1
+ import type { BoxProps } from '@semcore/base-components';
2
2
 
3
3
  import type { BackgroundProps } from './Bar';
4
4
  import type { Context } from './context';
@@ -1,5 +1,5 @@
1
+ import type { BoxProps } from '@semcore/base-components';
1
2
  import type { UnknownProperties, ReturnEl } from '@semcore/core';
2
- import type { BoxProps } from '@semcore/flex-box';
3
3
  import type React from 'react';
4
4
 
5
5
  import type { Context } from './context';
@@ -1,4 +1,4 @@
1
- import type { FadeInOutProps } from '@semcore/animation';
1
+ import type { FadeInOutProps } from '@semcore/base-components';
2
2
  import type { UnknownProperties } from '@semcore/core';
3
3
  import type { CurveFactory } from 'd3-shape';
4
4
 
@@ -1,5 +1,5 @@
1
+ import type { BoxProps } from '@semcore/base-components';
1
2
  import type { UnknownProperties, Intergalactic } from '@semcore/core';
2
- import type { BoxProps } from '@semcore/flex-box';
3
3
 
4
4
  import type { DataStructureHints } from './a11y/hints';
5
5
  import type { Context } from './context';
@@ -1,5 +1,5 @@
1
+ import type { BoxProps } from '@semcore/base-components';
1
2
  import type { UnknownProperties } from '@semcore/core';
2
- import type { BoxProps } from '@semcore/flex-box';
3
3
  import type { CurveFactory } from 'd3-shape';
4
4
 
5
5
  import type { Context } from './context';
@@ -1,5 +1,5 @@
1
+ import type { BoxProps } from '@semcore/base-components';
1
2
  import type { UnknownProperties } from '@semcore/core';
2
- import type { BoxProps } from '@semcore/flex-box';
3
3
 
4
4
  import type { IntergalacticD3Component } from './Plot';
5
5
 
@@ -1,7 +1,5 @@
1
+ import type { Popper, Box, BoxProps, PopperProps, PopperTriggerProps } from '@semcore/base-components';
1
2
  import type { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';
2
- import type { Box, BoxProps } from '@semcore/flex-box';
3
- import type { PopperProps, PopperTriggerProps } from '@semcore/popper';
4
- import type Popper from '@semcore/popper';
5
3
  import type React from 'react';
6
4
 
7
5
  import type { Context } from './context';
@@ -1,4 +1,4 @@
1
- import type { FadeInOutProps } from '@semcore/animation';
1
+ import type { FadeInOutProps } from '@semcore/base-components';
2
2
  import type { UnknownProperties } from '@semcore/core';
3
3
 
4
4
  import type { Context } from './context';
@@ -1,12 +1,5 @@
1
1
  import React from 'react';
2
- import type { DataStructureHints, PartialDataSummarizationConfig } from './hints';
3
- export type A11yViewProps = {
4
- id: string;
5
- data: Record<string, unknown>[];
6
- hints: DataStructureHints;
7
- plotLabel: string;
8
- locale: NavigatorLanguage['language'];
9
- config: PartialDataSummarizationConfig;
10
- plotRef: React.RefObject<HTMLElement>;
11
- };
12
- export declare function PlotA11yModule(props: A11yViewProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
2
+ import type { A11yViewProps } from './PlotA11yView';
3
+ type A11yModuleProps = Omit<A11yViewProps, 'onBlurHandler' | 'triggerRef'>;
4
+ export declare function PlotA11yModule(props: A11yModuleProps): React.ReactNode;
5
+ export {};
@@ -1,3 +1,14 @@
1
1
  import React from 'react';
2
- import type { A11yViewProps } from './PlotA11yModule';
3
- export declare const PlotA11yView: React.FC<A11yViewProps>;
2
+ import type { DataStructureHints, PartialDataSummarizationConfig } from './hints';
3
+ export type A11yViewProps = {
4
+ id: string;
5
+ payload: Record<string, unknown>[];
6
+ hints: DataStructureHints;
7
+ plotLabel: string;
8
+ locale: NavigatorLanguage['language'];
9
+ config: PartialDataSummarizationConfig;
10
+ plotRef: React.RefObject<HTMLElement>;
11
+ triggerRef: React.RefObject<HTMLElement>;
12
+ onCloseHandler: () => void;
13
+ };
14
+ export declare function PlotA11yView({ id, payload: providedData, hints, plotLabel, triggerRef, plotRef, config: providedConfig, locale, onCloseHandler, }: A11yViewProps): React.ReactElement;
@@ -1,72 +1,72 @@
1
1
  export declare const localizedMessages: {
2
2
  de: {
3
- disabled: string;
4
3
  loading: string;
5
4
  failed: string;
5
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
6
6
  };
7
7
  en: {
8
- disabled: string;
9
8
  loading: string;
10
9
  failed: string;
10
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
11
11
  };
12
12
  es: {
13
- disabled: string;
14
13
  loading: string;
15
14
  failed: string;
15
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
16
16
  };
17
17
  fr: {
18
- disabled: string;
19
18
  loading: string;
20
19
  failed: string;
20
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
21
21
  };
22
22
  it: {
23
- disabled: string;
24
23
  loading: string;
25
24
  failed: string;
25
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
26
26
  };
27
27
  ja: {
28
- disabled: string;
29
28
  loading: string;
30
29
  failed: string;
30
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
31
31
  };
32
32
  ko: {
33
- disabled: string;
34
33
  loading: string;
35
34
  failed: string;
35
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
36
36
  };
37
37
  nl: {
38
- disabled: string;
39
38
  loading: string;
40
39
  failed: string;
40
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
41
41
  };
42
42
  pt: {
43
- disabled: string;
44
43
  loading: string;
45
44
  failed: string;
45
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
46
46
  };
47
47
  tr: {
48
- disabled: string;
49
48
  loading: string;
50
49
  failed: string;
50
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
51
51
  };
52
52
  vi: {
53
- disabled: string;
54
53
  loading: string;
55
54
  failed: string;
55
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
56
56
  };
57
57
  zh: {
58
- disabled: string;
59
58
  loading: string;
60
59
  failed: string;
60
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
61
61
  };
62
62
  pl: {
63
- disabled: string;
64
63
  loading: string;
65
64
  failed: string;
65
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
66
66
  };
67
67
  sv: {
68
- disabled: string;
69
68
  loading: string;
70
69
  failed: string;
70
+ "PlotA11yModule.ScreenReaderOnlyButton.Label": string;
71
71
  };
72
72
  };
@@ -13,7 +13,7 @@ export type ChartState = {
13
13
  withTrend: boolean;
14
14
  };
15
15
  export declare const NOT_A_VALUE = "n/a";
16
- export declare abstract class AbstractChart<Data extends ListData | ObjectData, Props extends BaseChartProps<Data>, Enhancers extends readonly ((...args: any[]) => any)[] = [], State extends ChartState = ChartState, DefaultProps = {}> extends Component<Props, {}, State, Enhancers, DefaultProps> {
16
+ export declare abstract class AbstractChart<Data extends ListData | ObjectData, Props extends BaseChartProps<Data>, Enhancers extends readonly ((...args: any[]) => any)[] = [], DefaultProps = {}, State extends ChartState = ChartState> extends Component<Props, Enhancers, Readonly<{}>, DefaultProps, State> {
17
17
  static style: {
18
18
  [key: string]: string;
19
19
  };
@@ -1,5 +1,5 @@
1
+ import type { FlexProps } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { FlexProps } from '@semcore/flex-box';
3
3
  import type Icon from '@semcore/icon';
4
4
  import type React from 'react';
5
5
  import type { PatternsConfig } from '../../Pattern';
@@ -1,5 +1,5 @@
1
+ import type { Flex } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Flex } from '@semcore/flex-box';
3
3
  import type { ScaleLinear, ScaleTime } from 'd3-scale';
4
4
  import type { CurveFactory } from 'd3-shape';
5
5
  import type { AriaNameProps, BaseChartProps } from './AbstractChart.type';
@@ -1,5 +1,5 @@
1
+ import type { Flex } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Flex } from '@semcore/flex-box';
3
3
  import type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';
4
4
  import type React from 'react';
5
5
  import type { AriaNameProps, BaseChartProps } from './AbstractChart.type';
@@ -1,5 +1,5 @@
1
+ import type { Flex } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Flex } from '@semcore/flex-box';
3
3
  import type { ScaleLinear } from 'd3-scale';
4
4
  import type { BaseChartProps } from './AbstractChart.type';
5
5
  export type ScaledValues = {
@@ -1,5 +1,5 @@
1
+ import type { Flex } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Flex } from '@semcore/flex-box';
3
3
  import type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';
4
4
  import type React from 'react';
5
5
  import type { BaseChartProps } from './AbstractChart.type';
@@ -1,5 +1,5 @@
1
+ import type { Flex } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Flex } from '@semcore/flex-box';
3
3
  import type { ScaleLinear } from 'd3-scale';
4
4
  import type React from 'react';
5
5
  import type { BaseChartProps } from './AbstractChart.type';
@@ -1,5 +1,5 @@
1
+ import type { Flex } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Flex } from '@semcore/flex-box';
3
3
  import type { ScaleBand, ScaleLinear, ScaleTime } from 'd3-scale';
4
4
  import type { BaseChartProps } from './AbstractChart.type';
5
5
  export type HistogramChartData = Array<Record<string, number | Date>>;
@@ -1,5 +1,5 @@
1
+ import type { Flex } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Flex } from '@semcore/flex-box';
3
3
  import type { ScaleLinear, ScaleTime } from 'd3-scale';
4
4
  import type { CurveFactory } from 'd3-shape';
5
5
  import type { BaseChartProps } from './AbstractChart.type';
@@ -1,5 +1,5 @@
1
+ import type { Flex } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Flex } from '@semcore/flex-box';
3
3
  import type { ScaleLinear } from 'd3-scale';
4
4
  import type { BaseChartProps } from './AbstractChart.type';
5
5
  export type RadarChartData = Record<string, string[] | number[]>;
@@ -1,5 +1,5 @@
1
+ import type { Flex } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Flex } from '@semcore/flex-box';
3
3
  import type { ScaleLinear, ScaleTime } from 'd3-scale';
4
4
  import type { BaseChartProps } from './AbstractChart.type';
5
5
  import type { interpolateValue } from '../../utils';
@@ -1,5 +1,5 @@
1
+ import type { Flex } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Flex } from '@semcore/flex-box';
3
3
  import type { ScaleLinear } from 'd3-scale';
4
4
  import type { BaseChartProps } from './AbstractChart.type';
5
5
  export type DataKey = string;
@@ -2,7 +2,7 @@ import { Component, type Intergalactic } from '@semcore/core';
2
2
  import type React from 'react';
3
3
  import type { LegendProps } from './BaseLegend.type';
4
4
  import { type LegendItemKey, type LegendItemProps, type ShapeType } from './LegendItem/LegendItem.type';
5
- export declare abstract class BaseLegend<T extends LegendProps> extends Component<T> {
5
+ export declare abstract class BaseLegend<T extends LegendProps, E extends readonly ((...args: any[]) => any)[] = never[]> extends Component<T, E> {
6
6
  componentDidMount(): void;
7
7
  componentDidUpdate(prevProps: T): void;
8
8
  setHints(): void;
@@ -1,4 +1,4 @@
1
- import type { BoxProps, FlexProps } from '@semcore/flex-box';
1
+ import type { BoxProps, FlexProps } from '@semcore/base-components';
2
2
  import type { LegendItem, LegendItemKey, ShapeType } from './LegendItem/LegendItem.type';
3
3
  import type { DataStructureHints } from '../../a11y/hints';
4
4
  import type { PatternsConfig } from '../../Pattern';
@@ -1,5 +1,5 @@
1
+ import type { Flex, FlexProps } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Flex, FlexProps } from '@semcore/flex-box';
3
3
  import type { LegendProps } from '../BaseLegend.type';
4
4
  import type { LegendItemType } from '../LegendItem/LegendItem.type';
5
5
  export type TrendProps = {
@@ -1,5 +1,5 @@
1
+ import type { Flex } from '@semcore/base-components';
1
2
  import type { Intergalactic, Root } from '@semcore/core';
2
- import type { Flex } from '@semcore/flex-box';
3
3
  import type Icon from '@semcore/icon';
4
4
  import type { Text } from '@semcore/typography';
5
5
  import type { PatternsConfig } from '../../../Pattern';
@@ -1,5 +1,5 @@
1
+ import type { Box } from '@semcore/base-components';
1
2
  import type { Intergalactic } from '@semcore/core';
2
- import type { Box } from '@semcore/flex-box';
3
3
  import type React from 'react';
4
4
  import type { LegendProps, LSize } from '../BaseLegend.type';
5
5
  import type { LegendItem, LegendItemType } from '../LegendItem/LegendItem.type';
@@ -35,14 +35,14 @@ type BubbleChartDataItem = {
35
35
  y: number;
36
36
  };
37
37
  export declare const calculateBubbleDomain: (data: Array<BubbleChartDataItem>, key: "x" | "y", range: [number, number]) => [min: number, max: number];
38
- interface PlotEventEmitterEmit {
39
- (event: `setTooltipVisible_${string}`, visible: boolean): void;
40
- (event: `setTooltipPosition_${string}`, x: number, y: number): void;
41
- }
42
- type Unsubscribe = () => void;
43
- interface PlotEventEmitterSubscribe {
44
- (event: `setTooltipVisible_${string}`, callback: (visible: boolean) => void): Unsubscribe;
45
- (event: `setTooltipPosition_${string}`, callback: (x: number, y: number) => void): Unsubscribe;
46
- }
47
- export declare const PlotEventEmitter: typeof EventEmitter<PlotEventEmitterEmit, PlotEventEmitterSubscribe>;
38
+ type CommonEvents = {
39
+ setTooltipVisible: (visible: boolean) => void;
40
+ setTooltipPosition: (x: number, y: number) => void;
41
+ };
42
+ type Events = {
43
+ [K in keyof CommonEvents as `${K}_${string}`]: CommonEvents[K];
44
+ };
45
+ export declare const PlotEventEmitter: {
46
+ new (): EventEmitter<Events, `setTooltipVisible_${string}` | `setTooltipPosition_${string}`, ((visible: boolean) => void) | ((x: number, y: number) => void)>;
47
+ };
48
48
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@semcore/d3-chart",
3
3
  "description": "Semrush D3 Chart Component",
4
- "version": "16.7.0-prerelease.1",
4
+ "version": "16.7.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/esm/index.mjs",
7
7
  "typings": "lib/types/index.d.ts",
@@ -15,13 +15,13 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@formatjs/intl": "2.3.0",
18
- "@semcore/animation": "16.1.0-prerelease.1",
19
- "@semcore/checkbox": "16.3.0-prerelease.1",
20
- "@semcore/divider": "16.1.0-prerelease.1",
21
- "@semcore/flex-box": "16.1.0-prerelease.1",
22
- "@semcore/icon": "16.8.0-prerelease.1",
23
- "@semcore/popper": "16.1.0-prerelease.1",
24
- "@semcore/typography": "16.4.0-prerelease.1",
18
+ "@semcore/animation": "16.1.0",
19
+ "@semcore/checkbox": "16.3.0",
20
+ "@semcore/divider": "16.1.0",
21
+ "@semcore/flex-box": "16.1.0",
22
+ "@semcore/icon": "16.8.0",
23
+ "@semcore/popper": "16.1.0",
24
+ "@semcore/typography": "16.4.0",
25
25
  "@types/d3-shape": "^3.1.7",
26
26
  "@upsetjs/venn.js": "1.4.2",
27
27
  "d3-array": "3.1.6",
@@ -35,7 +35,7 @@
35
35
  "hoist-non-react-statics": "3.3.2"
36
36
  },
37
37
  "peerDependencies": {
38
- "@semcore/base-components": "^16.6.0-prerelease.1"
38
+ "@semcore/base-components": "^16.6.0"
39
39
  },
40
40
  "repository": {
41
41
  "type": "git",
@@ -47,16 +47,16 @@
47
47
  "@types/d3-array": "^3.2.1",
48
48
  "@types/d3-scale": "^4.0.9",
49
49
  "@types/d3-transition": "^3.0.9",
50
- "@semcore/base-components": "16.6.0-prerelease.1",
51
- "@semcore/core": "16.6.0-prerelease.1",
52
- "@semcore/checkbox": "16.3.0-prerelease.1",
53
- "@semcore/ellipsis": "16.1.0-prerelease.1",
54
- "@semcore/button": "16.1.0-prerelease.1",
55
- "@semcore/dropdown-menu": "16.3.0-prerelease.1",
56
- "@semcore/divider": "16.1.0-prerelease.1",
57
- "@semcore/icon": "16.8.0-prerelease.1",
58
- "@semcore/typography": "16.4.0-prerelease.1",
59
- "@semcore/testing-utils": "1.0.0"
50
+ "@semcore/core": "16.6.0",
51
+ "@semcore/button": "16.1.0",
52
+ "@semcore/base-components": "16.6.0",
53
+ "@semcore/checkbox": "16.3.0",
54
+ "@semcore/dropdown-menu": "16.3.0",
55
+ "@semcore/ellipsis": "16.1.0",
56
+ "@semcore/testing-utils": "1.0.0",
57
+ "@semcore/divider": "16.1.0",
58
+ "@semcore/typography": "16.4.0",
59
+ "@semcore/icon": "16.8.0"
60
60
  },
61
61
  "scripts": {
62
62
  "build": "pnpm semcore-builder --source=js,ts && pnpm vite build"