@semcore/d3-chart 17.3.0 → 17.3.1-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 (216) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/lib/cjs/Area.js +11 -11
  3. package/lib/cjs/Axis.js +16 -16
  4. package/lib/cjs/Bar.js +16 -16
  5. package/lib/cjs/Bubble.js +14 -14
  6. package/lib/cjs/CompactHorizontalBar.js +16 -16
  7. package/lib/cjs/Donut.js +9 -9
  8. package/lib/cjs/Dots.js +8 -8
  9. package/lib/cjs/HorizontalBar.js +16 -16
  10. package/lib/cjs/Hover.js +3 -3
  11. package/lib/cjs/Line.js +9 -9
  12. package/lib/cjs/Plot.js +2 -2
  13. package/lib/cjs/Radar.js +19 -19
  14. package/lib/cjs/RadialTree.js +12 -12
  15. package/lib/cjs/Reference.js +12 -12
  16. package/lib/cjs/ScatterPlot.js +9 -9
  17. package/lib/cjs/Tooltip.js +9 -9
  18. package/lib/cjs/Venn.js +9 -9
  19. package/lib/cjs/a11y/PlotA11yModule.js +2 -2
  20. package/lib/cjs/a11y/PlotA11yView.js +2 -2
  21. package/lib/cjs/component/Chart/AbstractChart.js +5 -5
  22. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  23. package/lib/cjs/component/Chart/CigaretteChart.js +1 -1
  24. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  25. package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
  26. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  27. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  28. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +17 -17
  29. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  30. package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
  31. package/lib/cjs/types/Hover.d.js.map +1 -1
  32. package/lib/cjs/types/Line.d.js.map +1 -1
  33. package/lib/cjs/types/Plot.d.js.map +1 -1
  34. package/lib/cjs/types/Radar.d.js.map +1 -1
  35. package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
  36. package/lib/cjs/types/Tooltip.d.js.map +1 -1
  37. package/lib/cjs/types/Venn.d.js.map +1 -1
  38. package/lib/es6/Area.js +11 -11
  39. package/lib/es6/Axis.js +16 -16
  40. package/lib/es6/Bar.js +16 -16
  41. package/lib/es6/Bubble.js +14 -14
  42. package/lib/es6/CompactHorizontalBar.js +16 -16
  43. package/lib/es6/Donut.js +9 -9
  44. package/lib/es6/Dots.js +8 -8
  45. package/lib/es6/HorizontalBar.js +16 -16
  46. package/lib/es6/Hover.js +3 -3
  47. package/lib/es6/Line.js +9 -9
  48. package/lib/es6/Plot.js +2 -2
  49. package/lib/es6/Radar.js +19 -19
  50. package/lib/es6/RadialTree.js +12 -12
  51. package/lib/es6/Reference.js +12 -12
  52. package/lib/es6/ScatterPlot.js +9 -9
  53. package/lib/es6/Tooltip.js +9 -9
  54. package/lib/es6/Venn.js +9 -9
  55. package/lib/es6/a11y/PlotA11yModule.js +2 -2
  56. package/lib/es6/a11y/PlotA11yView.js +2 -2
  57. package/lib/es6/component/Chart/AbstractChart.js +5 -5
  58. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  59. package/lib/es6/component/Chart/CigaretteChart.js +1 -1
  60. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  61. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  62. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +4 -4
  63. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  64. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +17 -17
  65. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +6 -6
  66. package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
  67. package/lib/es6/types/Hover.d.js.map +1 -1
  68. package/lib/es6/types/Line.d.js.map +1 -1
  69. package/lib/es6/types/Plot.d.js.map +1 -1
  70. package/lib/es6/types/Radar.d.js.map +1 -1
  71. package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
  72. package/lib/es6/types/Tooltip.d.js.map +1 -1
  73. package/lib/es6/types/Venn.d.js.map +1 -1
  74. package/lib/esm/Area.mjs +12 -12
  75. package/lib/esm/Axis.mjs +17 -17
  76. package/lib/esm/Bar.mjs +17 -17
  77. package/lib/esm/Bubble.mjs +15 -15
  78. package/lib/esm/CompactHorizontalBar.mjs +17 -17
  79. package/lib/esm/Donut.mjs +10 -10
  80. package/lib/esm/Dots.mjs +9 -9
  81. package/lib/esm/HorizontalBar.mjs +17 -17
  82. package/lib/esm/Hover.mjs +4 -4
  83. package/lib/esm/Line.mjs +10 -10
  84. package/lib/esm/Plot.mjs +3 -3
  85. package/lib/esm/Radar.mjs +20 -20
  86. package/lib/esm/RadialTree.mjs +13 -13
  87. package/lib/esm/Reference.mjs +13 -13
  88. package/lib/esm/ScatterPlot.mjs +10 -10
  89. package/lib/esm/Tooltip.mjs +10 -10
  90. package/lib/esm/Venn.mjs +10 -10
  91. package/lib/esm/a11y/PlotA11yModule.mjs +3 -3
  92. package/lib/esm/a11y/PlotA11yView.mjs +3 -3
  93. package/lib/esm/component/Chart/AbstractChart.mjs +6 -6
  94. package/lib/esm/component/Chart/CigaretteChart.mjs +1 -1
  95. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +5 -5
  96. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +18 -18
  97. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +7 -7
  98. package/lib/types/CompactHorizontalBar.d.ts +8 -8
  99. package/lib/types/Hover.d.ts +2 -2
  100. package/lib/types/Line.d.ts +2 -2
  101. package/lib/types/Pattern.d.ts +1 -0
  102. package/lib/types/Pattern.d.ts.map +1 -0
  103. package/lib/types/Plot.d.ts +2 -2
  104. package/lib/types/Radar.d.ts +2 -2
  105. package/lib/types/RadialTree.d.ts +1 -0
  106. package/lib/types/RadialTree.d.ts.map +1 -0
  107. package/lib/types/ResponsiveContainer.d.ts +2 -2
  108. package/lib/types/Tooltip.d.ts +9 -9
  109. package/lib/types/Venn.d.ts +3 -3
  110. package/lib/types/a11y/DataAccessibilityTable.d.ts +1 -0
  111. package/lib/types/a11y/DataAccessibilityTable.d.ts.map +1 -0
  112. package/lib/types/a11y/PlotA11yModule.d.ts +1 -0
  113. package/lib/types/a11y/PlotA11yModule.d.ts.map +1 -0
  114. package/lib/types/a11y/PlotA11yView.d.ts +1 -0
  115. package/lib/types/a11y/PlotA11yView.d.ts.map +1 -0
  116. package/lib/types/a11y/bezier.d.ts +1 -0
  117. package/lib/types/a11y/bezier.d.ts.map +1 -0
  118. package/lib/types/a11y/focus.d.ts +1 -0
  119. package/lib/types/a11y/focus.d.ts.map +1 -0
  120. package/lib/types/a11y/hints.d.ts +1 -0
  121. package/lib/types/a11y/hints.d.ts.map +1 -0
  122. package/lib/types/a11y/insights.d.ts +1 -0
  123. package/lib/types/a11y/insights.d.ts.map +1 -0
  124. package/lib/types/a11y/intl.d.ts +1 -0
  125. package/lib/types/a11y/intl.d.ts.map +1 -0
  126. package/lib/types/a11y/locale.d.ts +1 -0
  127. package/lib/types/a11y/locale.d.ts.map +1 -0
  128. package/lib/types/a11y/serialize.d.ts +1 -0
  129. package/lib/types/a11y/serialize.d.ts.map +1 -0
  130. package/lib/types/a11y/summarize.d.ts +1 -0
  131. package/lib/types/a11y/summarize.d.ts.map +1 -0
  132. package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts +1 -0
  133. package/lib/types/a11y/translations/module/__intergalactic-dynamic-locales.d.ts.map +1 -0
  134. package/lib/types/a11y/translations/view/__intergalactic-dynamic-locales.d.ts +1 -0
  135. package/lib/types/a11y/translations/view/__intergalactic-dynamic-locales.d.ts.map +1 -0
  136. package/lib/types/component/Chart/AbstractChart.d.ts +1 -0
  137. package/lib/types/component/Chart/AbstractChart.d.ts.map +1 -0
  138. package/lib/types/component/Chart/AbstractChart.type.d.ts +3 -2
  139. package/lib/types/component/Chart/AbstractChart.type.d.ts.map +1 -0
  140. package/lib/types/component/Chart/AreaChart.d.ts +1 -0
  141. package/lib/types/component/Chart/AreaChart.d.ts.map +1 -0
  142. package/lib/types/component/Chart/AreaChart.type.d.ts +1 -0
  143. package/lib/types/component/Chart/AreaChart.type.d.ts.map +1 -0
  144. package/lib/types/component/Chart/BarChart.d.ts +1 -0
  145. package/lib/types/component/Chart/BarChart.d.ts.map +1 -0
  146. package/lib/types/component/Chart/BarChart.type.d.ts +1 -0
  147. package/lib/types/component/Chart/BarChart.type.d.ts.map +1 -0
  148. package/lib/types/component/Chart/BubbleChart.d.ts +1 -0
  149. package/lib/types/component/Chart/BubbleChart.d.ts.map +1 -0
  150. package/lib/types/component/Chart/BubbleChart.type.d.ts +1 -0
  151. package/lib/types/component/Chart/BubbleChart.type.d.ts.map +1 -0
  152. package/lib/types/component/Chart/CigaretteChart.d.ts +1 -0
  153. package/lib/types/component/Chart/CigaretteChart.d.ts.map +1 -0
  154. package/lib/types/component/Chart/CigaretteChart.type.d.ts +1 -0
  155. package/lib/types/component/Chart/CigaretteChart.type.d.ts.map +1 -0
  156. package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts +1 -0
  157. package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts.map +1 -0
  158. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +1 -0
  159. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts.map +1 -0
  160. package/lib/types/component/Chart/DonutChart.d.ts +1 -0
  161. package/lib/types/component/Chart/DonutChart.d.ts.map +1 -0
  162. package/lib/types/component/Chart/DonutChart.type.d.ts +1 -0
  163. package/lib/types/component/Chart/DonutChart.type.d.ts.map +1 -0
  164. package/lib/types/component/Chart/HistogramChart.d.ts +1 -0
  165. package/lib/types/component/Chart/HistogramChart.d.ts.map +1 -0
  166. package/lib/types/component/Chart/HistogramChart.type.d.ts +1 -0
  167. package/lib/types/component/Chart/HistogramChart.type.d.ts.map +1 -0
  168. package/lib/types/component/Chart/LineChart.d.ts +1 -0
  169. package/lib/types/component/Chart/LineChart.d.ts.map +1 -0
  170. package/lib/types/component/Chart/LineChart.type.d.ts +1 -0
  171. package/lib/types/component/Chart/LineChart.type.d.ts.map +1 -0
  172. package/lib/types/component/Chart/RadarChart.d.ts +1 -0
  173. package/lib/types/component/Chart/RadarChart.d.ts.map +1 -0
  174. package/lib/types/component/Chart/RadarChart.type.d.ts +1 -0
  175. package/lib/types/component/Chart/RadarChart.type.d.ts.map +1 -0
  176. package/lib/types/component/Chart/ScatterPlotChart.d.ts +1 -0
  177. package/lib/types/component/Chart/ScatterPlotChart.d.ts.map +1 -0
  178. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +1 -0
  179. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts.map +1 -0
  180. package/lib/types/component/Chart/VennChart.d.ts +1 -0
  181. package/lib/types/component/Chart/VennChart.d.ts.map +1 -0
  182. package/lib/types/component/Chart/VennChart.type.d.ts +1 -0
  183. package/lib/types/component/Chart/VennChart.type.d.ts.map +1 -0
  184. package/lib/types/component/Chart/index.d.ts +1 -0
  185. package/lib/types/component/Chart/index.d.ts.map +1 -0
  186. package/lib/types/component/ChartLegend/BaseLegend.d.ts +1 -0
  187. package/lib/types/component/ChartLegend/BaseLegend.d.ts.map +1 -0
  188. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +4 -3
  189. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts.map +1 -0
  190. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +1 -0
  191. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts.map +1 -0
  192. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +4 -3
  193. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts.map +1 -0
  194. package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +1 -0
  195. package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts.map +1 -0
  196. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +1 -0
  197. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts.map +1 -0
  198. package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +1 -0
  199. package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts.map +1 -0
  200. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +1 -0
  201. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts.map +1 -0
  202. package/lib/types/component/ChartLegend/index.d.ts +1 -0
  203. package/lib/types/component/ChartLegend/index.d.ts.map +1 -0
  204. package/lib/types/component/Cigarette/Cigarette.d.ts +1 -0
  205. package/lib/types/component/Cigarette/Cigarette.d.ts.map +1 -0
  206. package/lib/types/component/StackGroupBar/StackGroupBar.d.ts +1 -0
  207. package/lib/types/component/StackGroupBar/StackGroupBar.d.ts.map +1 -0
  208. package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts +1 -0
  209. package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts.map +1 -0
  210. package/lib/types/component/SvgElement.d.ts +1 -0
  211. package/lib/types/component/SvgElement.d.ts.map +1 -0
  212. package/lib/types/translations/__intergalactic-dynamic-locales.d.ts +1 -0
  213. package/lib/types/translations/__intergalactic-dynamic-locales.d.ts.map +1 -0
  214. package/lib/types/utils.d.ts +1 -0
  215. package/lib/types/utils.d.ts.map +1 -0
  216. package/package.json +14 -14
@@ -9,17 +9,17 @@ import React from 'react';
9
9
  import createElement from './createElement';
10
10
  import { PatternFill } from './Pattern';
11
11
  /*!__reshadow-styles__:"./style/scatterplot.shadow.css"*/
12
- const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SScatterPlot_14241_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.58 .168 278.2));transition-property:cx,cy;transition-duration:var(--duration_14241);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_14241_gg_:hover{opacity:.8}}.___SScatterPlot_14241_gg_.__color_14241_gg_{fill:var(--color_14241)}.___SScatterPlot_14241_gg_.__pattern_14241_gg_.__color_14241_gg_{fill:var(--pattern_14241);stroke:var(--color_14241);stroke-width:1px}.___SScatterPlot_14241_gg_.__transparent_14241_gg_{opacity:.3}.___SValue_14241_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50,10px);stroke:var(--intergalactic-chart-palette-order-9,oklch(.53 .157 279.2))}.___SValue_14241_gg_.__color_14241_gg_{stroke:var(--color_14241)}.___SValue_14241_gg_.__transparent_14241_gg_{opacity:.3}", /*__inner_css_end__*/"14241_gg_"),
12
+ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SScatterPlot_14nlj_gg_{fill:var(--intergalactic-chart-palette-order-1,oklch(.58 .168 278.2));transition-property:cx,cy;transition-duration:var(--duration_14nlj);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_14nlj_gg_:hover{opacity:.8}}.___SScatterPlot_14nlj_gg_.__color_14nlj_gg_{fill:var(--color_14nlj)}.___SScatterPlot_14nlj_gg_.__pattern_14nlj_gg_.__color_14nlj_gg_{fill:var(--pattern_14nlj);stroke:var(--color_14nlj);stroke-width:1px}.___SScatterPlot_14nlj_gg_.__transparent_14nlj_gg_{opacity:.3}.___SValue_14nlj_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50,10px);stroke:var(--intergalactic-chart-palette-order-9,oklch(.53 .157 279.2))}.___SValue_14nlj_gg_.__color_14nlj_gg_{stroke:var(--color_14nlj)}.___SValue_14nlj_gg_.__transparent_14nlj_gg_{opacity:.3}", /*__inner_css_end__*/"14nlj_gg_"),
13
13
  /*__reshadow_css_end__*/
14
14
  {
15
- "__SScatterPlot": "___SScatterPlot_14241_gg_",
16
- "_color": "__color_14241_gg_",
17
- "--color": "--color_14241",
18
- "_pattern": "__pattern_14241_gg_",
19
- "--pattern": "--pattern_14241",
20
- "_transparent": "__transparent_14241_gg_",
21
- "__SValue": "___SValue_14241_gg_",
22
- "--duration": "--duration_14241"
15
+ "__SScatterPlot": "___SScatterPlot_14nlj_gg_",
16
+ "_color": "__color_14nlj_gg_",
17
+ "--color": "--color_14nlj",
18
+ "_pattern": "__pattern_14nlj_gg_",
19
+ "--pattern": "--pattern_14nlj",
20
+ "_transparent": "__transparent_14nlj_gg_",
21
+ "__SValue": "___SValue_14nlj_gg_",
22
+ "--duration": "--duration_14nlj"
23
23
  });
24
24
  import Tooltip from './Tooltip';
25
25
  import { getScatterPlotRadius } from './utils';
@@ -13,17 +13,17 @@ import React from 'react';
13
13
  import createElement from './createElement';
14
14
  import { PatternSymbol } from './Pattern';
15
15
  /*!__reshadow-styles__:"./style/tooltip.shadow.css"*/
16
- const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___STooltip_j5bmf_gg_{font-size:var(--intergalactic-fs-100,12px);line-height:var(--intergalactic-lh-100,133%);position:relative;background-color:var(--intergalactic-bg-primary-neutral,oklch(1 0 0));border-radius:var(--intergalactic-popper-rounded,6px);border:1px solid var(--intergalactic-border-secondary,#00151012);box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 #00151012);padding:var(--intergalactic-spacing-3x,12px)}@media (color-gamut:p3){.___STooltip_j5bmf_gg_{border:1px solid var(--intergalactic-border-secondary,oklch(.176 .033 175.7/.07));box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 oklch(.176 .033 175.7/.07))}}.___STitle_j5bmf_gg_{color:var(--intergalactic-text-secondary,#00030095);margin-bottom:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___STitle_j5bmf_gg_{color:var(--intergalactic-text-secondary,oklch(.088 .026 147.7/.583))}}.___SDotGroup_j5bmf_gg_{display:flex;align-items:center}.___SDot_j5bmf_gg_{margin-right:var(--intergalactic-spacing-2x,8px)}.___SDotCircle_j5bmf_gg_.__color_j5bmf_gg_{background-color:var(--color_j5bmf);width:8px;height:8px;border-radius:50%}.___SFooter_j5bmf_gg_{background:var(--intergalactic-bg-secondary-neutral,oklch(.98 .001 180));padding:var(--intergalactic-spacing-1x,4px) var(--intergalactic-spacing-3x,12px);border-radius:0 0 var(--intergalactic-rounded-medium,6px) var(--intergalactic-rounded-medium,6px);margin:var(--intergalactic-spacing-3x,12px) calc(var(--intergalactic-spacing-3x, 12px)*-1) calc(var(--intergalactic-spacing-3x, 12px)*-1)}", /*__inner_css_end__*/"j5bmf_gg_"),
16
+ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___STooltip_dy7ls_gg_{font-size:var(--intergalactic-fs-100,12px);line-height:var(--intergalactic-lh-100,133%);position:relative;background-color:var(--intergalactic-bg-primary-neutral,oklch(1 0 0));border-radius:var(--intergalactic-popper-rounded,6px);border:1px solid var(--intergalactic-border-secondary,#00151012);box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 #00151012);padding:var(--intergalactic-spacing-3x,12px)}@media (color-gamut:p3){.___STooltip_dy7ls_gg_{border:1px solid var(--intergalactic-border-secondary,oklch(.176 .033 175.7/.07));box-shadow:var(--intergalactic-box-shadow-popper,1px 1px 10px 0 oklch(.176 .033 175.7/.07))}}.___STitle_dy7ls_gg_{color:var(--intergalactic-text-secondary,#00030095);margin-bottom:var(--intergalactic-spacing-2x,8px)}@media (color-gamut:p3){.___STitle_dy7ls_gg_{color:var(--intergalactic-text-secondary,oklch(.088 .026 147.7/.583))}}.___SDotGroup_dy7ls_gg_{display:flex;align-items:center}.___SDot_dy7ls_gg_{margin-right:var(--intergalactic-spacing-2x,8px)}.___SDotCircle_dy7ls_gg_.__color_dy7ls_gg_{background-color:var(--color_dy7ls);width:8px;height:8px;border-radius:50%}.___SFooter_dy7ls_gg_{background:var(--intergalactic-bg-secondary-neutral,oklch(.98 .001 180));padding:var(--intergalactic-spacing-1x,4px) var(--intergalactic-spacing-3x,12px);border-radius:0 0 var(--intergalactic-rounded-medium,6px) var(--intergalactic-rounded-medium,6px);margin:var(--intergalactic-spacing-3x,12px) calc(var(--intergalactic-spacing-3x, 12px)*-1) calc(var(--intergalactic-spacing-3x, 12px)*-1)}", /*__inner_css_end__*/"dy7ls_gg_"),
17
17
  /*__reshadow_css_end__*/
18
18
  {
19
- "__STooltip": "___STooltip_j5bmf_gg_",
20
- "__STitle": "___STitle_j5bmf_gg_",
21
- "__SDotGroup": "___SDotGroup_j5bmf_gg_",
22
- "__SDot": "___SDot_j5bmf_gg_",
23
- "__SDotCircle": "___SDotCircle_j5bmf_gg_",
24
- "_color": "__color_j5bmf_gg_",
25
- "--color": "--color_j5bmf",
26
- "__SFooter": "___SFooter_j5bmf_gg_"
19
+ "__STooltip": "___STooltip_dy7ls_gg_",
20
+ "__STitle": "___STitle_dy7ls_gg_",
21
+ "__SDotGroup": "___SDotGroup_dy7ls_gg_",
22
+ "__SDot": "___SDot_dy7ls_gg_",
23
+ "__SDotCircle": "___SDotCircle_dy7ls_gg_",
24
+ "_color": "__color_dy7ls_gg_",
25
+ "--color": "--color_dy7ls",
26
+ "__SFooter": "___SFooter_dy7ls_gg_"
27
27
  });
28
28
  import { getChartDefaultColorName } from './utils';
29
29
 
package/lib/es6/Venn.js CHANGED
@@ -12,17 +12,17 @@ import React from 'react';
12
12
  import createElement from './createElement';
13
13
  import { PatternFill } from './Pattern';
14
14
  /*!__reshadow-styles__:"./style/venn.shadow.css"*/
15
- const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SCircle_1gs70_gg_{fill:var(--intergalactic-chart-palette-order-2,oklch(.82 .15 170));stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_1gs70);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_1gs70_gg_:hover{fill-opacity:.7}}.___SCircle_1gs70_gg_.__color_1gs70_gg_{fill:var(--color_1gs70)}.___SCircle_1gs70_gg_.__pattern_1gs70_gg_.__color_1gs70_gg_{fill:var(--pattern_1gs70);fill-opacity:.7;stroke:var(--color_1gs70);stroke-width:1px}@media (hover:hover){.___SCircle_1gs70_gg_.__pattern_1gs70_gg_.__color_1gs70_gg_:hover{fill-opacity:.85}}.___SCircle_1gs70_gg_.__transparent_1gs70_gg_{opacity:.3}.___SIntersection_1gs70_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:0}@media (hover:hover){.___SIntersection_1gs70_gg_:hover{fill-opacity:.1}}.___SIntersection_1gs70_gg_.__transparent_1gs70_gg_{opacity:.3}", /*__inner_css_end__*/"1gs70_gg_"),
15
+ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SCircle_iqwwn_gg_{fill:var(--intergalactic-chart-palette-order-2,oklch(.82 .15 170));stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_iqwwn);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_iqwwn_gg_:hover{fill-opacity:.7}}.___SCircle_iqwwn_gg_.__color_iqwwn_gg_{fill:var(--color_iqwwn)}.___SCircle_iqwwn_gg_.__pattern_iqwwn_gg_.__color_iqwwn_gg_{fill:var(--pattern_iqwwn);fill-opacity:.7;stroke:var(--color_iqwwn);stroke-width:1px}@media (hover:hover){.___SCircle_iqwwn_gg_.__pattern_iqwwn_gg_.__color_iqwwn_gg_:hover{fill-opacity:.85}}.___SCircle_iqwwn_gg_.__transparent_iqwwn_gg_{opacity:.3}.___SIntersection_iqwwn_gg_{stroke:var(--intergalactic-chart-grid-border,#fff);stroke-width:2px;fill-opacity:0}@media (hover:hover){.___SIntersection_iqwwn_gg_:hover{fill-opacity:.1}}.___SIntersection_iqwwn_gg_.__transparent_iqwwn_gg_{opacity:.3}", /*__inner_css_end__*/"iqwwn_gg_"),
16
16
  /*__reshadow_css_end__*/
17
17
  {
18
- "__SCircle": "___SCircle_1gs70_gg_",
19
- "_color": "__color_1gs70_gg_",
20
- "--color": "--color_1gs70",
21
- "_transparent": "__transparent_1gs70_gg_",
22
- "__SIntersection": "___SIntersection_1gs70_gg_",
23
- "--duration": "--duration_1gs70",
24
- "_pattern": "__pattern_1gs70_gg_",
25
- "--pattern": "--pattern_1gs70"
18
+ "__SCircle": "___SCircle_iqwwn_gg_",
19
+ "_color": "__color_iqwwn_gg_",
20
+ "--color": "--color_iqwwn",
21
+ "_transparent": "__transparent_iqwwn_gg_",
22
+ "__SIntersection": "___SIntersection_iqwwn_gg_",
23
+ "--duration": "--duration_iqwwn",
24
+ "_pattern": "__pattern_iqwwn_gg_",
25
+ "--pattern": "--pattern_iqwwn"
26
26
  });
27
27
  import Tooltip from './Tooltip';
28
28
  import { getChartDefaultColorName } from './utils';
@@ -7,10 +7,10 @@ import { Context as I18nContext, useI18n } from '@semcore/core/lib/utils/enhance
7
7
  import React from 'react';
8
8
  import { normalizeLocale } from './locale';
9
9
  /*!__reshadow-styles__:"../style/plotA11yModule.shadow.css"*/
10
- const styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SPlotA11yModule_18sta_gg_{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}", /*__inner_css_end__*/"18sta_gg_"),
10
+ const styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SPlotA11yModule_cs6a2_gg_{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}", /*__inner_css_end__*/"cs6a2_gg_"),
11
11
  /*__reshadow_css_end__*/
12
12
  {
13
- "__SPlotA11yModule": "___SPlotA11yModule_18sta_gg_"
13
+ "__SPlotA11yModule": "___SPlotA11yModule_cs6a2_gg_"
14
14
  });
15
15
  import { localizedMessages } from './translations/module/__intergalactic-dynamic-locales';
16
16
  export function PlotA11yModule(props) {
@@ -10,10 +10,10 @@ import { makeDataSummarizationConfig } from './hints';
10
10
  import { getIntl } from './intl';
11
11
  import { summarize } from './summarize';
12
12
  /*!__reshadow-styles__:"../style/plotA11yView.shadow.css"*/
13
- const styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SPlotA11yView_1hm9h_gg_{position:relative;display:block;background-color:var(--intergalactic-bg-primary-neutral,oklch(1 0 0));color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));border:3px solid var(--intergalactic-border-primary,#000c0829);font-size:var(--intergalactic-fs-50,10px);z-index:var(--intergalactic-z-index-overlay,500);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}@media (color-gamut:p3){.___SPlotA11yView_1hm9h_gg_{border:3px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___SPlotA11yView_1hm9h_gg_ a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x,8px);display:block}.___SPlotA11yView_1hm9h_gg_ :is(table,td,th){border:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___SPlotA11yView_1hm9h_gg_ :is(table,td,th){border:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}", /*__inner_css_end__*/"1hm9h_gg_"),
13
+ const styles = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SPlotA11yView_2vwyq_gg_{position:relative;display:block;background-color:var(--intergalactic-bg-primary-neutral,oklch(1 0 0));color:var(--intergalactic-text-primary,oklch(.1 .03 137/.899));border:3px solid var(--intergalactic-border-primary,#000c0829);font-size:var(--intergalactic-fs-50,10px);z-index:var(--intergalactic-z-index-overlay,500);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}@media (color-gamut:p3){.___SPlotA11yView_2vwyq_gg_{border:3px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}.___SPlotA11yView_2vwyq_gg_ a{cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x,8px);display:block}.___SPlotA11yView_2vwyq_gg_ :is(table,td,th){border:1px solid var(--intergalactic-border-primary,#000c0829)}@media (color-gamut:p3){.___SPlotA11yView_2vwyq_gg_ :is(table,td,th){border:1px solid var(--intergalactic-border-primary,oklch(.137 .026 175.7/.161))}}", /*__inner_css_end__*/"2vwyq_gg_"),
14
14
  /*__reshadow_css_end__*/
15
15
  {
16
- "__SPlotA11yView": "___SPlotA11yView_1hm9h_gg_"
16
+ "__SPlotA11yView": "___SPlotA11yView_2vwyq_gg_"
17
17
  });
18
18
  import { localizedMessages } from './translations/view/__intergalactic-dynamic-locales';
19
19
  export function PlotA11yView({
@@ -19,13 +19,13 @@ import React, { Fragment } from 'react';
19
19
  import { Plot, XAxis, YAxis } from '../..';
20
20
  import { makeDataHintsContainer } from '../../a11y/hints';
21
21
  /*!__reshadow-styles__:"../../style/abstract-chart.shadow.css"*/
22
- const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SChart_giu6t_gg_{width:100%;height:100%;min-width:0;min-height:0}.___STooltipChildrenWrapper_giu6t_gg_{display:grid;grid-column-gap:var(--intergalactic-spacing-2x,8px);-moz-column-gap:var(--intergalactic-spacing-2x,8px);column-gap:var(--intergalactic-spacing-2x,8px)}.___STooltipChildrenWrapper_giu6t_gg_._columnsCount_2_giu6t_gg_{grid-template-columns:auto minmax(28px,max-content)}.___STooltipChildrenWrapper_giu6t_gg_._columnsCount_3_giu6t_gg_{grid-template-columns:auto minmax(28px,max-content) minmax(28px,max-content)}", /*__inner_css_end__*/"giu6t_gg_"),
22
+ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SChart_lpxhx_gg_{width:100%;height:100%;min-width:0;min-height:0}.___STooltipChildrenWrapper_lpxhx_gg_{display:grid;grid-column-gap:var(--intergalactic-spacing-2x,8px);-moz-column-gap:var(--intergalactic-spacing-2x,8px);column-gap:var(--intergalactic-spacing-2x,8px)}.___STooltipChildrenWrapper_lpxhx_gg_._columnsCount_2_lpxhx_gg_{grid-template-columns:auto minmax(28px,max-content)}.___STooltipChildrenWrapper_lpxhx_gg_._columnsCount_3_lpxhx_gg_{grid-template-columns:auto minmax(28px,max-content) minmax(28px,max-content)}", /*__inner_css_end__*/"lpxhx_gg_"),
23
23
  /*__reshadow_css_end__*/
24
24
  {
25
- "__SChart": "___SChart_giu6t_gg_",
26
- "__STooltipChildrenWrapper": "___STooltipChildrenWrapper_giu6t_gg_",
27
- "_columnsCount_2": "_columnsCount_2_giu6t_gg_",
28
- "_columnsCount_3": "_columnsCount_3_giu6t_gg_"
25
+ "__SChart": "___SChart_lpxhx_gg_",
26
+ "__STooltipChildrenWrapper": "___STooltipChildrenWrapper_lpxhx_gg_",
27
+ "_columnsCount_2": "_columnsCount_2_lpxhx_gg_",
28
+ "_columnsCount_3": "_columnsCount_3_lpxhx_gg_"
29
29
  });
30
30
  import { interpolateValue } from '../../utils';
31
31
  import ChartLegend, { ChartLegendTable } from '../ChartLegend';
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractChart.type.js","names":[],"sources":["../../../../src/component/Chart/AbstractChart.type.ts"],"sourcesContent":["import type { FlexProps } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type Icon from '@semcore/icon';\nimport type React from 'react';\n\nimport type { PatternsConfig } from '../../Pattern';\n// @ts-ignore\nimport type { PlotSummarizerConfig } from '../../Plot';\nimport type { PlotEventEmitter } from '../../utils';\nimport type { BaseChartLegendProps } from '../ChartLegend/BaseLegend.type';\nimport type { TrendProps } from '../ChartLegend/LegendFlex/LegendFlex.type';\nimport type { LegendItemKey } from '../ChartLegend/LegendItem/LegendItem.type';\n\nexport type BaseLegendProps = BaseChartLegendProps & {\n /**\n * Disable hover (for transition items legend of each not hovered)\n */\n disableHoverItems?: boolean;\n /**\n * Disable selectable of data items by checkboxes in Legend\n */\n disableSelectItems?: boolean;\n} & (\n | (TrendProps & {\n /**\n * How to render Legend - Flex view. Just list of legend items\n */\n legendType?: never | 'Flex';\n /**\n * Config for Legend items\n */\n legendMap?: LegendDataMap<'Flex'>;\n })\n | {\n /**\n * How to render Legend - Table view. Table of legend items with some additional information in columns\n */\n legendType: 'Table';\n /**\n * Config for Legend items\n */\n legendMap?: LegendDataMap<'Table'>;\n }\n );\n\nexport type ObjectData = Record<string, unknown>;\nexport type ListData = ObjectData[];\n\n/**\n * Chart, Legend must have an accessible names (aria-name).\n * It should describe chart or legend content.\n */\nexport type AriaNameProps = Intergalactic.RequireAtLeastOne<{\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'title'?: string;\n}>;\n\nexport type BaseChartProps<T extends ListData | ObjectData> = FlexProps & {\n /**\n * Chart data. For all charts except Donut(Pie), Radar and Venn should be an Array\n */\n data: T;\n /**\n * Width of plot\n * @default width is 100% of the parent element.\n */\n plotWidth?: number;\n /**\n * Height of plot\n * @default height is 100% of the parent element.\n */\n plotHeight?: number;\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n /**\n * Margin (for Y axis points) from left side of chart container to Y axis\n */\n marginY?: number;\n /**\n * Margin (for X axis points) from bottom of chart container to X axis\n */\n marginX?: number;\n /**\n * invert axis and show horizontal charts (only for Bars!)\n */\n invertAxis?: boolean;\n\n /**\n * Show X axis\n * @default true (for charts with axis: Area, Line, Bar, ScatterPlot, ...)\n */\n showXAxis?: boolean;\n /**\n * Show Y axis\n * @default true (for charts with axis: Area, Line, Bar, ScatterPlot, ...)\n */\n showYAxis?: boolean;\n /**\n * Map with colors for data items\n */\n colorMap?: Record<string, string>;\n /**\n * Show tooltip's.\n * @default true\n */\n showTooltip?: boolean;\n /**\n * Show sum of values for selected point in tooltip\n */\n showTotalInTooltip?: boolean;\n /**\n * Scale for xAxis (see more in d3-scale)\n */\n xScale?: unknown;\n /**\n * Scale for yAxis (see more in d3-scale)\n */\n yScale?: unknown;\n /**\n * Count of ticks for X axis\n */\n xTicksCount?: number;\n /**\n * Count of ticks for Y axis\n */\n yTicksCount?: number;\n /** Enables multiline tick labels for X axis, applicable only for band scales */\n multilineXTicks?: boolean;\n /** Enables multiline tick labels for Y axis, applicable only for band scales */\n multilineYTicks?: boolean;\n /**\n * Group key for all array-based charts (for get keys of items for legend except that group key)\n */\n groupKey?: string;\n /**\n * function for format axis item text\n */\n axisXValueFormatter?: (value: unknown) => string;\n axisYValueFormatter?: (value: unknown) => string;\n /**\n * Function for format text for tooltip\n */\n tooltipValueFormatter?: (value?: unknown) => string;\n /**\n * Custom event emitter. Could be useful to handle event on few charts at the same time.\n */\n eventEmitter?: InstanceType<typeof PlotEventEmitter>;\n /**\n * Config for a11y summary\n */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /**\n * Animations duration, set 0 to disable animations\n */\n duration?: number;\n /**\n * Flag to show/hide legend\n */\n showLegend?: boolean;\n /**\n * Relation between height and width dimensions block.\n * height = width / aspect, so an aspect could be set as `16 / 9` for example.\n */\n aspect?: number;\n /** Callback which will be called after changing the block size */\n onResize?: (size: [number, number], entries: ResizeObserverEntry[]) => void;\n /**\n * Props for Legend\n */\n legendProps?: Partial<BaseLegendProps>;\n} & (\n | {\n /**\n * Don't show legend\n */\n showLegend?: false;\n legendProps?: never;\n }\n | {\n /**\n * By default (if showLegend don't set), for one data item on chart,\n * Legend component will be hide, and show for more then 1 data item.\n * If set `true` - Legend component will show always.\n */\n showLegend?: true;\n /**\n * Props for Legend\n */\n legendProps?: Partial<BaseLegendProps>;\n }\n );\n\ntype LegendDataMap<T extends 'Flex' | 'Table'> = Record<\n LegendItemKey,\n {\n /**\n * Custom label for legend item (by default use keys from data item object)\n */\n label?: string;\n /**\n * Additional text after label\n */\n additionalInfo?: string;\n /**\n * Count after label\n */\n count?: number;\n /**\n * Custom Icon\n */\n icon?: typeof Icon;\n /**\n * Flag for uncheck some items by default\n */\n defaultChecked?: boolean;\n } & (T extends 'Table' ? { columns?: React.ReactNode[] } : { columns?: never })\n>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"AbstractChart.type.js","names":[],"sources":["../../../../src/component/Chart/AbstractChart.type.ts"],"sourcesContent":["import type { NSFlex } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\nimport type Icon from '@semcore/icon';\nimport type React from 'react';\n\nimport type { PatternsConfig } from '../../Pattern';\n// @ts-ignore\nimport type { PlotSummarizerConfig } from '../../Plot';\nimport type { PlotEventEmitter } from '../../utils';\nimport type { BaseChartLegendProps } from '../ChartLegend/BaseLegend.type';\nimport type { TrendProps } from '../ChartLegend/LegendFlex/LegendFlex.type';\nimport type { LegendItemKey } from '../ChartLegend/LegendItem/LegendItem.type';\n\nexport type BaseLegendProps = BaseChartLegendProps & {\n /**\n * Disable hover (for transition items legend of each not hovered)\n */\n disableHoverItems?: boolean;\n /**\n * Disable selectable of data items by checkboxes in Legend\n */\n disableSelectItems?: boolean;\n} & (\n | (TrendProps & {\n /**\n * How to render Legend - Flex view. Just list of legend items\n */\n legendType?: never | 'Flex';\n /**\n * Config for Legend items\n */\n legendMap?: LegendDataMap<'Flex'>;\n })\n | {\n /**\n * How to render Legend - Table view. Table of legend items with some additional information in columns\n */\n legendType: 'Table';\n /**\n * Config for Legend items\n */\n legendMap?: LegendDataMap<'Table'>;\n }\n );\n\nexport type ObjectData = Record<string, unknown>;\nexport type ListData = ObjectData[];\n\n/**\n * Chart, Legend must have an accessible names (aria-name).\n * It should describe chart or legend content.\n */\nexport type AriaNameProps = Intergalactic.RequireAtLeastOne<{\n 'aria-label'?: string;\n 'aria-labelledby'?: string;\n 'title'?: string;\n}>;\n\nexport type BaseChartProps<T extends ListData | ObjectData> = NSFlex.Props & {\n /**\n * Chart data. For all charts except Donut(Pie), Radar and Venn should be an Array\n */\n data: T;\n /**\n * Width of plot\n * @default width is 100% of the parent element.\n */\n plotWidth?: number;\n /**\n * Height of plot\n * @default height is 100% of the parent element.\n */\n plotHeight?: number;\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n /**\n * Margin (for Y axis points) from left side of chart container to Y axis\n */\n marginY?: number;\n /**\n * Margin (for X axis points) from bottom of chart container to X axis\n */\n marginX?: number;\n /**\n * invert axis and show horizontal charts (only for Bars!)\n */\n invertAxis?: boolean;\n\n /**\n * Show X axis\n * @default true (for charts with axis: Area, Line, Bar, ScatterPlot, ...)\n */\n showXAxis?: boolean;\n /**\n * Show Y axis\n * @default true (for charts with axis: Area, Line, Bar, ScatterPlot, ...)\n */\n showYAxis?: boolean;\n /**\n * Map with colors for data items\n */\n colorMap?: Record<string, string>;\n /**\n * Show tooltip's.\n * @default true\n */\n showTooltip?: boolean;\n /**\n * Show sum of values for selected point in tooltip\n */\n showTotalInTooltip?: boolean;\n /**\n * Scale for xAxis (see more in d3-scale)\n */\n xScale?: unknown;\n /**\n * Scale for yAxis (see more in d3-scale)\n */\n yScale?: unknown;\n /**\n * Count of ticks for X axis\n */\n xTicksCount?: number;\n /**\n * Count of ticks for Y axis\n */\n yTicksCount?: number;\n /** Enables multiline tick labels for X axis, applicable only for band scales */\n multilineXTicks?: boolean;\n /** Enables multiline tick labels for Y axis, applicable only for band scales */\n multilineYTicks?: boolean;\n /**\n * Group key for all array-based charts (for get keys of items for legend except that group key)\n */\n groupKey?: string;\n /**\n * function for format axis item text\n */\n axisXValueFormatter?: (value: unknown) => string;\n axisYValueFormatter?: (value: unknown) => string;\n /**\n * Function for format text for tooltip\n */\n tooltipValueFormatter?: (value?: unknown) => string;\n /**\n * Custom event emitter. Could be useful to handle event on few charts at the same time.\n */\n eventEmitter?: InstanceType<typeof PlotEventEmitter>;\n /**\n * Config for a11y summary\n */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /**\n * Animations duration, set 0 to disable animations\n */\n duration?: number;\n /**\n * Flag to show/hide legend\n */\n showLegend?: boolean;\n /**\n * Relation between height and width dimensions block.\n * height = width / aspect, so an aspect could be set as `16 / 9` for example.\n */\n aspect?: number;\n /** Callback which will be called after changing the block size */\n onResize?: (size: [number, number], entries: ResizeObserverEntry[]) => void;\n /**\n * Props for Legend\n */\n legendProps?: Partial<BaseLegendProps>;\n} & (\n | {\n /**\n * Don't show legend\n */\n showLegend?: false;\n legendProps?: never;\n }\n | {\n /**\n * By default (if showLegend don't set), for one data item on chart,\n * Legend component will be hide, and show for more then 1 data item.\n * If set `true` - Legend component will show always.\n */\n showLegend?: true;\n /**\n * Props for Legend\n */\n legendProps?: Partial<BaseLegendProps>;\n }\n );\n\ntype LegendDataMap<T extends 'Flex' | 'Table'> = Record<\n LegendItemKey,\n {\n /**\n * Custom label for legend item (by default use keys from data item object)\n */\n label?: string;\n /**\n * Additional text after label\n */\n additionalInfo?: string;\n /**\n * Count after label\n */\n count?: number;\n /**\n * Custom Icon\n */\n icon?: typeof Icon;\n /**\n * Flag for uncheck some items by default\n */\n defaultChecked?: boolean;\n } & (T extends 'Table' ? { columns?: React.ReactNode[] } : { columns?: never })\n>;\n"],"mappings":"","ignoreList":[]}
@@ -292,7 +292,7 @@ class CigaretteChartComponent extends AbstractChart {
292
292
  return {
293
293
  children: (_ref4 = sstyled(styles), /*#__PURE__*/React.createElement(Flex, _ref4.cn("Flex", {
294
294
  "direction": 'column'
295
- }), tooltipTitle && /*#__PURE__*/React.createElement(HoverRect.Tooltip.Title, null, "Some tooltip title"), /*#__PURE__*/React.createElement(STooltipChildrenWrapper, _ref4.cn("STooltipChildrenWrapper", {
295
+ }), tooltipTitle && /*#__PURE__*/React.createElement(HoverRect.Tooltip.Title, null, tooltipTitle), /*#__PURE__*/React.createElement(STooltipChildrenWrapper, _ref4.cn("STooltipChildrenWrapper", {
296
296
  ..._assignProps2({
297
297
  "columnsCount": showPercentColumn ? '3' : '2',
298
298
  "__excludeProps": ['data']
@@ -1 +1 @@
1
- {"version":3,"file":"CigaretteChart.js","names":["Box","Flex","createComponent","Root","sstyled","i18nEnhance","resolveColorEnhance","trottle","uniqueIDEnhancement","Divider","Text","scaleThreshold","scaleLinear","React","HoverRect","Plot","AbstractChart","NOT_A_VALUE","AnimatedClipPath","localizedMessages","eventToPoint","interpolateValue","Cigarette","DEFAULT_MINIMAL_BAR_WIDTH","DEFAULT_GAP","CigaretteChartComponent","constructor","props","_defineProperty","createRef","event","plotRef","current","pX","pY","setState","state","activeDataDefinitions","dataDefinitions","filter","checked","activePositiveDataDefinitions","data","asProps","id","itemValue","resolveColor","index","colorMap","getDefaultDataDefinitions","map","dataDef","columns","slice","defaultLegendProps","legendType","w","totalValue","reduce","acc","computeCigaretteItems","invertAxis","minimalBarWidth","plotWidth","plotHeight","reverse","count","length","totalGapWidth","Math","max","availableSpace","dataDefinitionsItemSize","result","dd","value","dataWidth","visualWidth","isMinVisible","smallItems","r","extraNeeded","smallItem","donors","donorCapacity","s","d","donor","available","share","taken","xScale","yScale","renderChart","uid","duration","patterns","onClick","highlightedLine","offset","items","createElement","Fragment","item","height","width","y","x","key","dataKey","hide","color","direction","hovered","undefined","renderTooltip","_ref","tooltipTitle","tooltipViewType","showPercentValueInTooltip","styles","showTooltip","STooltipChildrenWrapper","Tooltip","wMin","hideHoverLine","xIndex","visualScale","yIndex","tooltipProps","_ref4","showPercentColumn","_ref3","find","dataDefItem","children","cn","_assignProps","Dot","mr","label","percentValue","tooltipValueFormatter","Title","_assignProps2","style","opacity","textAlign","bold","renderTooltipTotalLine","percentFormatter","total","rawPercent","formattedPercent","round","dataItem","showTotalInTooltip","mt","Number","isNaN","renderHeader","header","render","_ref2","_ref6","SChart","a11yAltTextConfig","_ref5","_assignProps3","chartRef","dataHints","onPlotMouseMove","onPlotMouseLeave","renderLegend","_assignProps4","getLegendAriaLabel","getI18nText","chartType","cigaretteItems","range","domain","push","lastAddedDomain","showXAxis","showYAxis","showLegend","marginX","marginY","CigaretteChart"],"sources":["../../../../src/component/Chart/CigaretteChart.tsx"],"sourcesContent":["import { Box, Flex } from '@semcore/base-components';\nimport { createComponent, Root, sstyled } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport trottle from '@semcore/core/lib/utils/rafTrottle';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport Divider from '@semcore/divider';\nimport { Text } from '@semcore/typography';\nimport { scaleThreshold, scaleLinear, scaleBand } from 'd3-scale';\nimport React from 'react';\n\nimport type { CigaretteChartData, CigaretteChartDataKey, CigaretteChartDefaultProps, CigaretteChartProps, CigaretteChartType } from './CigaretteChart.type';\n// @ts-ignore\nimport { HoverRect, Plot } from '../..';\nimport type { ChartState } from './AbstractChart';\nimport { AbstractChart, NOT_A_VALUE } from './AbstractChart';\nimport type { ObjectData } from './AbstractChart.type';\n// @ts-ignore\nimport AnimatedClipPath from '../../AnimatedClipPath';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport { eventToPoint, interpolateValue } from '../../utils';\nimport type { LegendItem } from '../ChartLegend/LegendItem/LegendItem.type';\nimport Cigarette from '../Cigarette/Cigarette';\n\nconst DEFAULT_MINIMAL_BAR_WIDTH = 2;\nconst DEFAULT_GAP = 2;\n\ntype ScaleThresholdConfig = { range: Array<CigaretteChartDataKey>; domain: Array<number> };\n\ntype CigaretteChartState = ChartState & {\n pX: number | null;\n pY: number | null;\n};\n\nclass CigaretteChartComponent extends AbstractChart<\n CigaretteChartData,\n CigaretteChartProps,\n typeof CigaretteChartComponent.enhance,\n {},\n CigaretteChartState,\n CigaretteChartDefaultProps\n> {\n static displayName = 'Cigarette.Bar';\n\n static defaultProps = (props: CigaretteChartProps) => {\n const invertAxis = props.invertAxis ?? true;\n return {\n invertAxis,\n showXAxis: false,\n showYAxis: false,\n showTooltip: true,\n showLegend: false,\n marginX: 0,\n marginY: 0,\n duration: 500,\n plotWidth: !invertAxis && !props.plotWidth ? 44 : props.plotWidth,\n plotHeight: invertAxis && !props.plotHeight ? 28 : props.plotHeight,\n showPercentValueInTooltip: false,\n minimalBarWidth: DEFAULT_MINIMAL_BAR_WIDTH,\n direction: invertAxis ? 'column' : 'row',\n } as const;\n };\n\n static enhance = [\n resolveColorEnhance(),\n uniqueIDEnhancement(),\n i18nEnhance(localizedMessages),\n ] as const;\n\n constructor(props: CigaretteChartProps) {\n super(props);\n\n this.state = {\n ...this.state,\n pX: null,\n pY: null,\n };\n }\n\n private plotRef = React.createRef<SVGElement>();\n\n protected override plotPadding = 0;\n\n private offset = 0;\n\n private get activeDataDefinitions() {\n const { dataDefinitions } = this.state;\n\n return dataDefinitions.filter(({ checked }) => checked);\n }\n\n private get activePositiveDataDefinitions() {\n const { data } = this.asProps;\n\n return this.activeDataDefinitions.filter(({ id }) => {\n const itemValue = data[id];\n\n return typeof itemValue === 'number' && itemValue > 0;\n });\n }\n\n protected override resolveColor(id: string, index: number) {\n return this.props.colorMap?.[id] ?? `blue-${5 - index}00`;\n }\n\n protected override getDefaultDataDefinitions(): Array<\n LegendItem & { columns: React.ReactNode[] }\n > {\n const dataDefinitions = super.getDefaultDataDefinitions();\n\n return dataDefinitions.map((dataDef) => {\n dataDef.columns = dataDef.columns.slice(1);\n return dataDef;\n });\n }\n\n protected override defaultLegendProps() {\n return {\n legendType: 'Table' as const,\n w: 'fit-content',\n };\n }\n\n private onPlotMouseMove = trottle((event: React.MouseEvent<HTMLElement>) => {\n if (!this.plotRef.current) return;\n\n const [pX, pY] = eventToPoint(event, this.plotRef.current);\n\n this.setState(() => ({ pX, pY }));\n });\n\n private onPlotMouseLeave = trottle(() => {\n this.setState(() => ({ pX: null, pY: null }));\n });\n\n protected override totalValue() {\n const { data } = this.asProps;\n\n return this.activeDataDefinitions.reduce((acc, { id }) => {\n const itemValue = data[id];\n\n if (typeof itemValue === 'number') {\n acc += itemValue;\n }\n\n return acc;\n }, 0);\n }\n\n private computeCigaretteItems() {\n const { data, invertAxis, minimalBarWidth } = this.asProps;\n const { plotWidth, plotHeight } = this;\n\n const dataDefinitions = invertAxis\n ? this.activeDataDefinitions\n : [...this.activeDataDefinitions].reverse();\n\n const count = this.activePositiveDataDefinitions.length;\n const totalGapWidth = DEFAULT_GAP * Math.max(0, count - 1);\n const availableSpace = Math.max(0, (invertAxis ? plotWidth : plotHeight) - totalGapWidth);\n\n const totalValue = this.totalValue();\n\n const dataDefinitionsItemSize = dataDefinitions.map(({ id }) => {\n if (totalValue === 0) {\n return 0;\n }\n\n const itemValue = data[id];\n\n if (typeof itemValue !== 'number') return 0;\n\n return (itemValue / totalValue) * availableSpace;\n });\n\n const result = dataDefinitions.map((dd, index) => ({\n ...dd,\n value: data[dd.id],\n dataWidth: dataDefinitionsItemSize[index],\n visualWidth: dataDefinitionsItemSize[index],\n isMinVisible: false,\n }));\n\n const smallItems = result.filter((r) => {\n const { value, dataWidth } = r;\n\n if (typeof value !== 'number') return false;\n\n return value > 0 && dataWidth < minimalBarWidth;\n });\n\n if (smallItems.length === 0) return result;\n\n let extraNeeded = 0;\n\n for (const smallItem of smallItems) {\n extraNeeded += minimalBarWidth - smallItem.dataWidth;\n smallItem.visualWidth = minimalBarWidth;\n smallItem.isMinVisible = true;\n }\n\n const donors = result.filter((r) => !r.isMinVisible && r.dataWidth > minimalBarWidth);\n const donorCapacity = donors.reduce(\n (s, d) => s + (d.dataWidth - minimalBarWidth),\n 0,\n );\n\n for (const donor of donors) {\n const available = donor.dataWidth - minimalBarWidth;\n const share = available / donorCapacity;\n const taken = share * extraNeeded;\n donor.visualWidth = donor.dataWidth - taken;\n }\n\n return result;\n };\n\n get xScale() {\n const { plotWidth } = this;\n\n return scaleLinear([0, plotWidth]);\n }\n\n get yScale() {\n const { plotHeight } = this;\n\n return scaleLinear([plotHeight, 0]);\n }\n\n renderChart() {\n const { invertAxis, data, uid, duration, patterns, onClick } =\n this.asProps;\n const { dataDefinitions, highlightedLine } = this.state;\n const { plotWidth, plotHeight } = this;\n\n this.offset = 0;\n\n const items = this.computeCigaretteItems();\n\n return (\n <>\n {items.map((item, index) => {\n const { visualWidth, id } = item;\n const value = data[id];\n\n if (value === interpolateValue || value === null) {\n return null;\n }\n\n const height = invertAxis ? plotHeight - DEFAULT_GAP * 2 : plotWidth - DEFAULT_GAP * 2;\n const width = visualWidth;\n const y = DEFAULT_GAP;\n const x = this.offset;\n const r = height < 28 ? 2 : 4;\n\n this.offset += visualWidth;\n\n if (index < items.length - 1) {\n this.offset += DEFAULT_GAP;\n }\n\n return (\n <Cigarette\n key={item.id}\n dataKey={item.id}\n index={index}\n y={invertAxis ? y : x}\n x={invertAxis ? x : y}\n width={invertAxis ? width : height}\n height={invertAxis ? height : width}\n uid={uid}\n hide={!item.checked}\n duration={duration}\n r={index === 0 || index === dataDefinitions.length - 1 ? r : 0}\n color={item.color}\n patterns={patterns}\n direction={invertAxis ? 'horizontal' : 'vertical'}\n onClick={onClick}\n hovered={\n highlightedLine === index ? true : highlightedLine === -1 ? undefined : false\n }\n />\n );\n })}\n\n <AnimatedClipPath\n aria-hidden\n duration={duration}\n id={uid}\n x='0'\n y='0'\n width={invertAxis ? 0 : plotWidth}\n height={invertAxis ? plotHeight : 0}\n />\n </>\n );\n }\n\n renderTooltip(): React.ReactNode {\n const { data, invertAxis, tooltipTitle, tooltipViewType, showPercentValueInTooltip, styles, showTooltip } =\n this.asProps;\n const { dataDefinitions, pX, pY } = this.state;\n const STooltipChildrenWrapper = Root;\n\n if (!showTooltip) {\n return null;\n }\n\n return (\n <HoverRect.Tooltip\n x={invertAxis ? '' : undefined}\n y={invertAxis ? undefined : ''}\n wMin={100}\n hideHoverLine={true}\n xIndex={pX !== null ? this.visualScale(pX) : undefined}\n yIndex={pY !== null ? this.visualScale(pY) : undefined}\n >\n {(tooltipProps: any) => {\n const dataKey = invertAxis ? tooltipProps.xIndex : tooltipProps.yIndex;\n const showPercentColumn = showPercentValueInTooltip && this.totalValue() !== 0;\n\n if (tooltipViewType === 'single') {\n const item = dataDefinitions.find((dataDefItem) => dataDefItem.id === dataKey);\n if (!item) {\n return {\n children: null,\n };\n }\n\n return {\n children: sstyled(styles)(\n <STooltipChildrenWrapper render={Box} columnsCount={showPercentColumn ? '3' : '2'} __excludeProps={['data']}>\n <HoverRect.Tooltip.Dot mr={2} color={item.color}>\n {item.label}\n </HoverRect.Tooltip.Dot>\n { showPercentColumn && <Text textAlign='end' color='text-secondary'>{this.percentValue(data, item.id)}</Text> }\n <Text textAlign='end' bold>{this.tooltipValueFormatter(data[item.id])}</Text>\n </STooltipChildrenWrapper>,\n ),\n };\n }\n\n return {\n children: sstyled(styles)(\n <Flex direction='column'>\n {tooltipTitle && (\n <HoverRect.Tooltip.Title>Some tooltip title</HoverRect.Tooltip.Title>\n )}\n\n <STooltipChildrenWrapper render={Box} columnsCount={showPercentColumn ? '3' : '2'} __excludeProps={['data']}>\n {dataDefinitions.map((item) => {\n const style = { opacity: item.id === dataKey ? 1 : 0.3 };\n return (\n item.checked && (\n <React.Fragment key={item.id}>\n <HoverRect.Tooltip.Dot mr={2} color={item.color} style={style}>\n {item.label}\n </HoverRect.Tooltip.Dot>\n { showPercentColumn && <Text textAlign='end' color='text-secondary' style={style}>{this.percentValue(data, item.id)}</Text> }\n <Text textAlign='end' bold style={style}>{this.tooltipValueFormatter(data[item.id])}</Text>\n </React.Fragment>\n )\n );\n })}\n\n {this.renderTooltipTotalLine(data)}\n </STooltipChildrenWrapper>\n </Flex>,\n ),\n };\n }}\n </HoverRect.Tooltip>\n );\n }\n\n protected percentValue(data: ObjectData, key: string): string {\n const { percentFormatter } = this.asProps;\n\n const total = this.totalValue();\n\n const value = data[key];\n\n if (typeof value === 'number' && total !== 0) {\n const rawPercent = (100 * value) / total;\n const formattedPercent = percentFormatter ? percentFormatter(rawPercent) : Math.round(rawPercent);\n\n return `${formattedPercent}%`;\n }\n\n if (value === null) {\n return `0%`;\n }\n\n return NOT_A_VALUE;\n }\n\n protected override renderTooltipTotalLine<D extends ObjectData>(dataItem: D) {\n const { showTotalInTooltip, showPercentValueInTooltip } = this.asProps;\n\n if (!showTotalInTooltip) {\n return null;\n }\n\n const total = this.totalValue();\n\n return (\n <>\n <Box mt={2} mr={2}>Total</Box>\n { showPercentValueInTooltip && total !== 0 && <Text mt={2} textAlign='end' color='text-secondary'>{Number.isNaN(total) ? NOT_A_VALUE : '100%'}</Text> }\n <Text mt={2} textAlign='end' bold>{Number.isNaN(total) ? NOT_A_VALUE : total}</Text>\n </>\n );\n }\n\n renderHeader() {\n return this.asProps.header ?? null;\n }\n\n override render() {\n const SChart = Root;\n const { styles, data, patterns, direction, invertAxis, a11yAltTextConfig } = this.asProps;\n const { plotWidth, plotHeight } = this;\n const header = this.renderHeader();\n\n if (invertAxis) {\n return sstyled(styles)(\n <SChart render={Flex} gap={6} direction={direction} __excludeProps={['onClick', 'data']} ref={this.chartRef}>\n <Flex direction='column'>\n {header}\n <Plot\n ref={this.plotRef}\n data={data}\n scale={[this.xScale, this.yScale]}\n width={plotWidth}\n height={plotHeight}\n dataHints={this.dataHints}\n patterns={patterns}\n a11yAltTextConfig={a11yAltTextConfig}\n onMouseMove={this.onPlotMouseMove}\n onMouseLeave={this.onPlotMouseLeave}\n >\n {this.renderTooltip()}\n {this.renderChart()}\n </Plot>\n </Flex>\n {this.renderLegend()}\n </SChart>,\n );\n }\n\n return sstyled(styles)(\n <SChart render={Flex} gap={6} __excludeProps={['onClick', 'data']} ref={this.chartRef}>\n <Plot\n ref={this.plotRef}\n data={data}\n scale={[this.xScale, this.yScale]}\n width={plotWidth}\n height={plotHeight}\n dataHints={this.dataHints}\n patterns={patterns}\n a11yAltTextConfig={a11yAltTextConfig}\n onMouseMove={this.onPlotMouseMove}\n onMouseLeave={this.onPlotMouseLeave}\n >\n {this.renderTooltip()}\n {this.renderChart()}\n </Plot>\n <Flex direction='column' gap={2}>\n {header && (\n <>\n <Box>{header}</Box>\n <Divider />\n </>\n )}\n {this.renderLegend()}\n </Flex>\n </SChart>,\n );\n }\n\n protected getLegendAriaLabel(): string {\n return this.asProps.getI18nText('legendForChart', { chartType: 'Cigarette' });\n }\n\n private get visualScale() {\n const cigaretteItems = this.computeCigaretteItems();\n\n const { range, domain } = cigaretteItems.reduce<ScaleThresholdConfig>((acc, { id, visualWidth }, index) => {\n const { range, domain } = acc;\n\n if (visualWidth) {\n range.push(id);\n\n if (domain.length === 0) {\n domain.push(visualWidth + DEFAULT_GAP);\n\n return acc;\n }\n\n if (index !== cigaretteItems.length - 1) {\n const lastAddedDomain = domain[domain.length - 1];\n domain.push(lastAddedDomain + visualWidth + DEFAULT_GAP);\n }\n }\n\n return acc;\n }, { range: [], domain: [] });\n\n return scaleThreshold(domain, range);\n }\n}\n\n/**\n * CigaretteChart\n *\n * {@link https://developer.semrush.com/intergalactic/data-display/cigarette-chart/cigarette-chart-api/|API} | {@link https://developer.semrush.com/intergalactic/data-display/cigarette-chart/cigarette-chart-code/|Examples}\n */\nexport const CigaretteChart = createComponent<\n CigaretteChartType,\n typeof CigaretteChartComponent\n>(CigaretteChartComponent);\n"],"mappings":";;;;;AAAA,SAASA,GAAG,EAAEC,IAAI,QAAQ,0BAA0B;AACpD,SAASC,eAAe,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAC9D,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,mBAAmB,MAAM,sDAAsD;AACtF,OAAOC,OAAO,MAAM,oCAAoC;AACxD,OAAOC,mBAAmB,MAAM,kCAAkC;AAClE,OAAOC,OAAO,MAAM,kBAAkB;AACtC,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,SAASC,cAAc,EAAEC,WAAW,QAAmB,UAAU;AACjE,OAAOC,KAAK,MAAM,OAAO;AAGzB;AACA,SAASC,SAAS,EAAEC,IAAI,QAAQ,OAAO;AAEvC,SAASC,aAAa,EAAEC,WAAW,QAAQ,iBAAiB;AAE5D;AACA,OAAOC,gBAAgB,MAAM,wBAAwB;AACrD,SAASC,iBAAiB,QAAQ,oDAAoD;AACtF,SAASC,YAAY,EAAEC,gBAAgB,QAAQ,aAAa;AAE5D,OAAOC,SAAS,MAAM,wB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AAAAG,eAAA,CARhCH,uBAAuB,kBAUJE,KAA0B,IAAK;EACpD,MAAMkC,UAAU,GAAGlC,KAAK,CAACkC,UAAU,IAAI,IAAI;EAC3C,OAAO;IACLA,UAAU;IACV0H,SAAS,EAAE,KAAK;IAChBC,SAAS,EAAE,KAAK;IAChB/D,WAAW,EAAE,IAAI;IACjBgE,UAAU,EAAE,KAAK;IACjBC,OAAO,EAAE,CAAC;IACVC,OAAO,EAAE,CAAC;IACV5F,QAAQ,EAAE,GAAG;IACbhC,SAAS,EAAE,CAACF,UAAU,IAAI,CAAClC,KAAK,CAACoC,SAAS,GAAG,EAAE,GAAGpC,KAAK,CAACoC,SAAS;IACjEC,UAAU,EAAEH,UAAU,IAAI,CAAClC,KAAK,CAACqC,UAAU,GAAG,EAAE,GAAGrC,KAAK,CAACqC,UAAU;IACnEuD,yBAAyB,EAAE,KAAK;IAChCzD,eAAe,EAAEvC,yBAAyB;IAC1CyF,SAAS,EAAEnD,UAAU,GAAG,QAAQ,GAAG;EACrC,CAAC;AACH,CAAC;AAAAjC,eAAA,CA3BGH,uBAAuB,aA6BV,CACfnB,mBAAmB,CAAC,CAAC,EACrBE,mBAAmB,CAAC,CAAC,EACrBH,WAAW,CAACc,iBAAiB,CAAC,CAC/B;AAkcH,OAAO,MAAMyK,cAAc,GAAG1L,eAAe,CAG3CuB,uBAAuB,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"CigaretteChart.js","names":["Box","Flex","createComponent","Root","sstyled","i18nEnhance","resolveColorEnhance","trottle","uniqueIDEnhancement","Divider","Text","scaleThreshold","scaleLinear","React","HoverRect","Plot","AbstractChart","NOT_A_VALUE","AnimatedClipPath","localizedMessages","eventToPoint","interpolateValue","Cigarette","DEFAULT_MINIMAL_BAR_WIDTH","DEFAULT_GAP","CigaretteChartComponent","constructor","props","_defineProperty","createRef","event","plotRef","current","pX","pY","setState","state","activeDataDefinitions","dataDefinitions","filter","checked","activePositiveDataDefinitions","data","asProps","id","itemValue","resolveColor","index","colorMap","getDefaultDataDefinitions","map","dataDef","columns","slice","defaultLegendProps","legendType","w","totalValue","reduce","acc","computeCigaretteItems","invertAxis","minimalBarWidth","plotWidth","plotHeight","reverse","count","length","totalGapWidth","Math","max","availableSpace","dataDefinitionsItemSize","result","dd","value","dataWidth","visualWidth","isMinVisible","smallItems","r","extraNeeded","smallItem","donors","donorCapacity","s","d","donor","available","share","taken","xScale","yScale","renderChart","uid","duration","patterns","onClick","highlightedLine","offset","items","createElement","Fragment","item","height","width","y","x","key","dataKey","hide","color","direction","hovered","undefined","renderTooltip","_ref","tooltipTitle","tooltipViewType","showPercentValueInTooltip","styles","showTooltip","STooltipChildrenWrapper","Tooltip","wMin","hideHoverLine","xIndex","visualScale","yIndex","tooltipProps","_ref4","showPercentColumn","_ref3","find","dataDefItem","children","cn","_assignProps","Dot","mr","label","percentValue","tooltipValueFormatter","Title","_assignProps2","style","opacity","textAlign","bold","renderTooltipTotalLine","percentFormatter","total","rawPercent","formattedPercent","round","dataItem","showTotalInTooltip","mt","Number","isNaN","renderHeader","header","render","_ref2","_ref6","SChart","a11yAltTextConfig","_ref5","_assignProps3","chartRef","dataHints","onPlotMouseMove","onPlotMouseLeave","renderLegend","_assignProps4","getLegendAriaLabel","getI18nText","chartType","cigaretteItems","range","domain","push","lastAddedDomain","showXAxis","showYAxis","showLegend","marginX","marginY","CigaretteChart"],"sources":["../../../../src/component/Chart/CigaretteChart.tsx"],"sourcesContent":["import { Box, Flex } from '@semcore/base-components';\nimport { createComponent, Root, sstyled } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport trottle from '@semcore/core/lib/utils/rafTrottle';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport Divider from '@semcore/divider';\nimport { Text } from '@semcore/typography';\nimport { scaleThreshold, scaleLinear, scaleBand } from 'd3-scale';\nimport React from 'react';\n\nimport type { CigaretteChartData, CigaretteChartDataKey, CigaretteChartDefaultProps, CigaretteChartProps, CigaretteChartType } from './CigaretteChart.type';\n// @ts-ignore\nimport { HoverRect, Plot } from '../..';\nimport type { ChartState } from './AbstractChart';\nimport { AbstractChart, NOT_A_VALUE } from './AbstractChart';\nimport type { ObjectData } from './AbstractChart.type';\n// @ts-ignore\nimport AnimatedClipPath from '../../AnimatedClipPath';\nimport { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';\nimport { eventToPoint, interpolateValue } from '../../utils';\nimport type { LegendItem } from '../ChartLegend/LegendItem/LegendItem.type';\nimport Cigarette from '../Cigarette/Cigarette';\n\nconst DEFAULT_MINIMAL_BAR_WIDTH = 2;\nconst DEFAULT_GAP = 2;\n\ntype ScaleThresholdConfig = { range: Array<CigaretteChartDataKey>; domain: Array<number> };\n\ntype CigaretteChartState = ChartState & {\n pX: number | null;\n pY: number | null;\n};\n\nclass CigaretteChartComponent extends AbstractChart<\n CigaretteChartData,\n CigaretteChartProps,\n typeof CigaretteChartComponent.enhance,\n {},\n CigaretteChartState,\n CigaretteChartDefaultProps\n> {\n static displayName = 'Cigarette.Bar';\n\n static defaultProps = (props: CigaretteChartProps) => {\n const invertAxis = props.invertAxis ?? true;\n return {\n invertAxis,\n showXAxis: false,\n showYAxis: false,\n showTooltip: true,\n showLegend: false,\n marginX: 0,\n marginY: 0,\n duration: 500,\n plotWidth: !invertAxis && !props.plotWidth ? 44 : props.plotWidth,\n plotHeight: invertAxis && !props.plotHeight ? 28 : props.plotHeight,\n showPercentValueInTooltip: false,\n minimalBarWidth: DEFAULT_MINIMAL_BAR_WIDTH,\n direction: invertAxis ? 'column' : 'row',\n } as const;\n };\n\n static enhance = [\n resolveColorEnhance(),\n uniqueIDEnhancement(),\n i18nEnhance(localizedMessages),\n ] as const;\n\n constructor(props: CigaretteChartProps) {\n super(props);\n\n this.state = {\n ...this.state,\n pX: null,\n pY: null,\n };\n }\n\n private plotRef = React.createRef<SVGElement>();\n\n protected override plotPadding = 0;\n\n private offset = 0;\n\n private get activeDataDefinitions() {\n const { dataDefinitions } = this.state;\n\n return dataDefinitions.filter(({ checked }) => checked);\n }\n\n private get activePositiveDataDefinitions() {\n const { data } = this.asProps;\n\n return this.activeDataDefinitions.filter(({ id }) => {\n const itemValue = data[id];\n\n return typeof itemValue === 'number' && itemValue > 0;\n });\n }\n\n protected override resolveColor(id: string, index: number) {\n return this.props.colorMap?.[id] ?? `blue-${5 - index}00`;\n }\n\n protected override getDefaultDataDefinitions(): Array<\n LegendItem & { columns: React.ReactNode[] }\n > {\n const dataDefinitions = super.getDefaultDataDefinitions();\n\n return dataDefinitions.map((dataDef) => {\n dataDef.columns = dataDef.columns.slice(1);\n return dataDef;\n });\n }\n\n protected override defaultLegendProps() {\n return {\n legendType: 'Table' as const,\n w: 'fit-content',\n };\n }\n\n private onPlotMouseMove = trottle((event: React.MouseEvent<HTMLElement>) => {\n if (!this.plotRef.current) return;\n\n const [pX, pY] = eventToPoint(event, this.plotRef.current);\n\n this.setState(() => ({ pX, pY }));\n });\n\n private onPlotMouseLeave = trottle(() => {\n this.setState(() => ({ pX: null, pY: null }));\n });\n\n protected override totalValue() {\n const { data } = this.asProps;\n\n return this.activeDataDefinitions.reduce((acc, { id }) => {\n const itemValue = data[id];\n\n if (typeof itemValue === 'number') {\n acc += itemValue;\n }\n\n return acc;\n }, 0);\n }\n\n private computeCigaretteItems() {\n const { data, invertAxis, minimalBarWidth } = this.asProps;\n const { plotWidth, plotHeight } = this;\n\n const dataDefinitions = invertAxis\n ? this.activeDataDefinitions\n : [...this.activeDataDefinitions].reverse();\n\n const count = this.activePositiveDataDefinitions.length;\n const totalGapWidth = DEFAULT_GAP * Math.max(0, count - 1);\n const availableSpace = Math.max(0, (invertAxis ? plotWidth : plotHeight) - totalGapWidth);\n\n const totalValue = this.totalValue();\n\n const dataDefinitionsItemSize = dataDefinitions.map(({ id }) => {\n if (totalValue === 0) {\n return 0;\n }\n\n const itemValue = data[id];\n\n if (typeof itemValue !== 'number') return 0;\n\n return (itemValue / totalValue) * availableSpace;\n });\n\n const result = dataDefinitions.map((dd, index) => ({\n ...dd,\n value: data[dd.id],\n dataWidth: dataDefinitionsItemSize[index],\n visualWidth: dataDefinitionsItemSize[index],\n isMinVisible: false,\n }));\n\n const smallItems = result.filter((r) => {\n const { value, dataWidth } = r;\n\n if (typeof value !== 'number') return false;\n\n return value > 0 && dataWidth < minimalBarWidth;\n });\n\n if (smallItems.length === 0) return result;\n\n let extraNeeded = 0;\n\n for (const smallItem of smallItems) {\n extraNeeded += minimalBarWidth - smallItem.dataWidth;\n smallItem.visualWidth = minimalBarWidth;\n smallItem.isMinVisible = true;\n }\n\n const donors = result.filter((r) => !r.isMinVisible && r.dataWidth > minimalBarWidth);\n const donorCapacity = donors.reduce(\n (s, d) => s + (d.dataWidth - minimalBarWidth),\n 0,\n );\n\n for (const donor of donors) {\n const available = donor.dataWidth - minimalBarWidth;\n const share = available / donorCapacity;\n const taken = share * extraNeeded;\n donor.visualWidth = donor.dataWidth - taken;\n }\n\n return result;\n };\n\n get xScale() {\n const { plotWidth } = this;\n\n return scaleLinear([0, plotWidth]);\n }\n\n get yScale() {\n const { plotHeight } = this;\n\n return scaleLinear([plotHeight, 0]);\n }\n\n renderChart() {\n const { invertAxis, data, uid, duration, patterns, onClick } =\n this.asProps;\n const { dataDefinitions, highlightedLine } = this.state;\n const { plotWidth, plotHeight } = this;\n\n this.offset = 0;\n\n const items = this.computeCigaretteItems();\n\n return (\n <>\n {items.map((item, index) => {\n const { visualWidth, id } = item;\n const value = data[id];\n\n if (value === interpolateValue || value === null) {\n return null;\n }\n\n const height = invertAxis ? plotHeight - DEFAULT_GAP * 2 : plotWidth - DEFAULT_GAP * 2;\n const width = visualWidth;\n const y = DEFAULT_GAP;\n const x = this.offset;\n const r = height < 28 ? 2 : 4;\n\n this.offset += visualWidth;\n\n if (index < items.length - 1) {\n this.offset += DEFAULT_GAP;\n }\n\n return (\n <Cigarette\n key={item.id}\n dataKey={item.id}\n index={index}\n y={invertAxis ? y : x}\n x={invertAxis ? x : y}\n width={invertAxis ? width : height}\n height={invertAxis ? height : width}\n uid={uid}\n hide={!item.checked}\n duration={duration}\n r={index === 0 || index === dataDefinitions.length - 1 ? r : 0}\n color={item.color}\n patterns={patterns}\n direction={invertAxis ? 'horizontal' : 'vertical'}\n onClick={onClick}\n hovered={\n highlightedLine === index ? true : highlightedLine === -1 ? undefined : false\n }\n />\n );\n })}\n\n <AnimatedClipPath\n aria-hidden\n duration={duration}\n id={uid}\n x='0'\n y='0'\n width={invertAxis ? 0 : plotWidth}\n height={invertAxis ? plotHeight : 0}\n />\n </>\n );\n }\n\n renderTooltip(): React.ReactNode {\n const { data, invertAxis, tooltipTitle, tooltipViewType, showPercentValueInTooltip, styles, showTooltip } =\n this.asProps;\n const { dataDefinitions, pX, pY } = this.state;\n const STooltipChildrenWrapper = Root;\n\n if (!showTooltip) {\n return null;\n }\n\n return (\n <HoverRect.Tooltip\n x={invertAxis ? '' : undefined}\n y={invertAxis ? undefined : ''}\n wMin={100}\n hideHoverLine={true}\n xIndex={pX !== null ? this.visualScale(pX) : undefined}\n yIndex={pY !== null ? this.visualScale(pY) : undefined}\n >\n {(tooltipProps: any) => {\n const dataKey = invertAxis ? tooltipProps.xIndex : tooltipProps.yIndex;\n const showPercentColumn = showPercentValueInTooltip && this.totalValue() !== 0;\n\n if (tooltipViewType === 'single') {\n const item = dataDefinitions.find((dataDefItem) => dataDefItem.id === dataKey);\n if (!item) {\n return {\n children: null,\n };\n }\n\n return {\n children: sstyled(styles)(\n <STooltipChildrenWrapper render={Box} columnsCount={showPercentColumn ? '3' : '2'} __excludeProps={['data']}>\n <HoverRect.Tooltip.Dot mr={2} color={item.color}>\n {item.label}\n </HoverRect.Tooltip.Dot>\n { showPercentColumn && <Text textAlign='end' color='text-secondary'>{this.percentValue(data, item.id)}</Text> }\n <Text textAlign='end' bold>{this.tooltipValueFormatter(data[item.id])}</Text>\n </STooltipChildrenWrapper>,\n ),\n };\n }\n\n return {\n children: sstyled(styles)(\n <Flex direction='column'>\n {tooltipTitle && (\n <HoverRect.Tooltip.Title>{tooltipTitle}</HoverRect.Tooltip.Title>\n )}\n\n <STooltipChildrenWrapper render={Box} columnsCount={showPercentColumn ? '3' : '2'} __excludeProps={['data']}>\n {dataDefinitions.map((item) => {\n const style = { opacity: item.id === dataKey ? 1 : 0.3 };\n return (\n item.checked && (\n <React.Fragment key={item.id}>\n <HoverRect.Tooltip.Dot mr={2} color={item.color} style={style}>\n {item.label}\n </HoverRect.Tooltip.Dot>\n { showPercentColumn && <Text textAlign='end' color='text-secondary' style={style}>{this.percentValue(data, item.id)}</Text> }\n <Text textAlign='end' bold style={style}>{this.tooltipValueFormatter(data[item.id])}</Text>\n </React.Fragment>\n )\n );\n })}\n\n {this.renderTooltipTotalLine(data)}\n </STooltipChildrenWrapper>\n </Flex>,\n ),\n };\n }}\n </HoverRect.Tooltip>\n );\n }\n\n protected percentValue(data: ObjectData, key: string): string {\n const { percentFormatter } = this.asProps;\n\n const total = this.totalValue();\n\n const value = data[key];\n\n if (typeof value === 'number' && total !== 0) {\n const rawPercent = (100 * value) / total;\n const formattedPercent = percentFormatter ? percentFormatter(rawPercent) : Math.round(rawPercent);\n\n return `${formattedPercent}%`;\n }\n\n if (value === null) {\n return `0%`;\n }\n\n return NOT_A_VALUE;\n }\n\n protected override renderTooltipTotalLine<D extends ObjectData>(dataItem: D) {\n const { showTotalInTooltip, showPercentValueInTooltip } = this.asProps;\n\n if (!showTotalInTooltip) {\n return null;\n }\n\n const total = this.totalValue();\n\n return (\n <>\n <Box mt={2} mr={2}>Total</Box>\n { showPercentValueInTooltip && total !== 0 && <Text mt={2} textAlign='end' color='text-secondary'>{Number.isNaN(total) ? NOT_A_VALUE : '100%'}</Text> }\n <Text mt={2} textAlign='end' bold>{Number.isNaN(total) ? NOT_A_VALUE : total}</Text>\n </>\n );\n }\n\n renderHeader() {\n return this.asProps.header ?? null;\n }\n\n override render() {\n const SChart = Root;\n const { styles, data, patterns, direction, invertAxis, a11yAltTextConfig } = this.asProps;\n const { plotWidth, plotHeight } = this;\n const header = this.renderHeader();\n\n if (invertAxis) {\n return sstyled(styles)(\n <SChart render={Flex} gap={6} direction={direction} __excludeProps={['onClick', 'data']} ref={this.chartRef}>\n <Flex direction='column'>\n {header}\n <Plot\n ref={this.plotRef}\n data={data}\n scale={[this.xScale, this.yScale]}\n width={plotWidth}\n height={plotHeight}\n dataHints={this.dataHints}\n patterns={patterns}\n a11yAltTextConfig={a11yAltTextConfig}\n onMouseMove={this.onPlotMouseMove}\n onMouseLeave={this.onPlotMouseLeave}\n >\n {this.renderTooltip()}\n {this.renderChart()}\n </Plot>\n </Flex>\n {this.renderLegend()}\n </SChart>,\n );\n }\n\n return sstyled(styles)(\n <SChart render={Flex} gap={6} __excludeProps={['onClick', 'data']} ref={this.chartRef}>\n <Plot\n ref={this.plotRef}\n data={data}\n scale={[this.xScale, this.yScale]}\n width={plotWidth}\n height={plotHeight}\n dataHints={this.dataHints}\n patterns={patterns}\n a11yAltTextConfig={a11yAltTextConfig}\n onMouseMove={this.onPlotMouseMove}\n onMouseLeave={this.onPlotMouseLeave}\n >\n {this.renderTooltip()}\n {this.renderChart()}\n </Plot>\n <Flex direction='column' gap={2}>\n {header && (\n <>\n <Box>{header}</Box>\n <Divider />\n </>\n )}\n {this.renderLegend()}\n </Flex>\n </SChart>,\n );\n }\n\n protected getLegendAriaLabel(): string {\n return this.asProps.getI18nText('legendForChart', { chartType: 'Cigarette' });\n }\n\n private get visualScale() {\n const cigaretteItems = this.computeCigaretteItems();\n\n const { range, domain } = cigaretteItems.reduce<ScaleThresholdConfig>((acc, { id, visualWidth }, index) => {\n const { range, domain } = acc;\n\n if (visualWidth) {\n range.push(id);\n\n if (domain.length === 0) {\n domain.push(visualWidth + DEFAULT_GAP);\n\n return acc;\n }\n\n if (index !== cigaretteItems.length - 1) {\n const lastAddedDomain = domain[domain.length - 1];\n domain.push(lastAddedDomain + visualWidth + DEFAULT_GAP);\n }\n }\n\n return acc;\n }, { range: [], domain: [] });\n\n return scaleThreshold(domain, range);\n }\n}\n\n/**\n * CigaretteChart\n *\n * {@link https://developer.semrush.com/intergalactic/data-display/cigarette-chart/cigarette-chart-api/|API} | {@link https://developer.semrush.com/intergalactic/data-display/cigarette-chart/cigarette-chart-code/|Examples}\n */\nexport const CigaretteChart = createComponent<\n CigaretteChartType,\n typeof CigaretteChartComponent\n>(CigaretteChartComponent);\n"],"mappings":";;;;;AAAA,SAASA,GAAG,EAAEC,IAAI,QAAQ,0BAA0B;AACpD,SAASC,eAAe,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AAC9D,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,mBAAmB,MAAM,sDAAsD;AACtF,OAAOC,OAAO,MAAM,oCAAoC;AACxD,OAAOC,mBAAmB,MAAM,kCAAkC;AAClE,OAAOC,OAAO,MAAM,kBAAkB;AACtC,SAASC,IAAI,QAAQ,qBAAqB;AAC1C,SAASC,cAAc,EAAEC,WAAW,QAAmB,UAAU;AACjE,OAAOC,KAAK,MAAM,OAAO;AAGzB;AACA,SAASC,SAAS,EAAEC,IAAI,QAAQ,OAAO;AAEvC,SAASC,aAAa,EAAEC,WAAW,QAAQ,iBAAiB;AAE5D;AACA,OAAOC,gBAAgB,MAAM,wBAAwB;AACrD,SAASC,iBAAiB,QAAQ,oDAAoD;AACtF,SAASC,YAAY,EAAEC,gBAAgB,QAAQ,aAAa;AAE5D,OAAOC,SAAS,MAAM,wBAAwB;AAE9C,MAAMC,yBAAyB,GAAG,CAAC;AACnC,MAAMC,WAAW,GAAG,CAAC;AASrB,MAAMC,uBAAuB,SAAST,aAAa,CAOjD;EA4BAU,WAAWA,CAACC,KAA0B,EAAE;IACtC,KAAK,CAACA,KAAK,CAAC;IAACC,eAAA,+BASGf,KAAK,CAACgB,SAAS,CAAa,CAAC;IAAAD,eAAA,sBAEd,CAAC;IAAAA,eAAA,iBA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OAAO,EAAE,CAAC;IACV5F,QAAQ,EAAE,GAAG;IACbhC,SAAS,EAAE,CAACF,UAAU,IAAI,CAAClC,KAAK,CAACoC,SAAS,GAAG,EAAE,GAAGpC,KAAK,CAACoC,SAAS;IACjEC,UAAU,EAAEH,UAAU,IAAI,CAAClC,KAAK,CAACqC,UAAU,GAAG,EAAE,GAAGrC,KAAK,CAACqC,UAAU;IACnEuD,yBAAyB,EAAE,KAAK;IAChCzD,eAAe,EAAEvC,yBAAyB;IAC1CyF,SAAS,EAAEnD,UAAU,GAAG,QAAQ,GAAG;EACrC,CAAC;AACH,CAAC;AAAAjC,eAAA,CA3BGH,uBAAuB,aA6BV,CACfnB,mBAAmB,CAAC,CAAC,EACrBE,mBAAmB,CAAC,CAAC,EACrBH,WAAW,CAACc,iBAAiB,CAAC,CAC/B;AAkcH,OAAO,MAAMyK,cAAc,GAAG1L,eAAe,CAG3CuB,uBAAuB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"BaseLegend.type.js","names":[],"sources":["../../../../src/component/ChartLegend/BaseLegend.type.ts"],"sourcesContent":["import type { BoxProps, FlexProps } from '@semcore/base-components';\n\nimport type { LegendItem, LegendItemKey, ShapeType } from './LegendItem/LegendItem.type';\nimport type { DataStructureHints } from '../../a11y/hints';\nimport type { PatternsConfig } from '../../Pattern';\nimport type { AriaNameProps } from '../Chart/AbstractChart.type';\n\nexport type LSize = 'm' | 'l';\n\nexport type BaseChartLegendProps = FlexProps &\n AriaNameProps & {\n /**\n * Size for legend items\n */\n size?: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape?: ShapeType;\n /**\n * Handler for change visible for data items. Doesn't work if Shape one of 'Circle' | 'Line' | 'Square'\n */\n onChangeVisibleItem?: (key: LegendItemKey, isVisible: boolean) => void;\n\n onMouseEnterItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n onMouseLeaveItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n dataHints?: DataStructureHints;\n };\n\nexport type LegendProps = BoxProps &\n BaseChartLegendProps & {\n /**\n * Legend items\n */\n items: LegendItem[];\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"BaseLegend.type.js","names":[],"sources":["../../../../src/component/ChartLegend/BaseLegend.type.ts"],"sourcesContent":["import type { NSBox, NSFlex } from '@semcore/base-components';\n\nimport type { LegendItem, LegendItemKey, ShapeType } from './LegendItem/LegendItem.type';\nimport type { DataStructureHints } from '../../a11y/hints';\nimport type { PatternsConfig } from '../../Pattern';\nimport type { AriaNameProps } from '../Chart/AbstractChart.type';\n\nexport type LSize = 'm' | 'l';\n\nexport type BaseChartLegendProps = NSFlex.Props &\n AriaNameProps & {\n /**\n * Size for legend items\n */\n size?: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape?: ShapeType;\n /**\n * Handler for change visible for data items. Doesn't work if Shape one of 'Circle' | 'Line' | 'Square'\n */\n onChangeVisibleItem?: (key: LegendItemKey, isVisible: boolean) => void;\n\n onMouseEnterItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n onMouseLeaveItem?: (key: LegendItemKey, e?: React.SyntheticEvent) => void;\n\n dataHints?: DataStructureHints;\n };\n\nexport type LegendProps = NSBox.Props &\n BaseChartLegendProps & {\n /**\n * Legend items\n */\n items: LegendItem[];\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n };\n"],"mappings":"","ignoreList":[]}
@@ -8,12 +8,12 @@ import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
8
8
  import Divider from '@semcore/divider';
9
9
  import React from 'react';
10
10
  /*!__reshadow-styles__:"./legend-flex.shadow.css"*/
11
- const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendFlex_e76xg_gg_._direction_row_e76xg_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:8px 16px}.___SLegendFlex_e76xg_gg_._direction_column_e76xg_gg_{align-items:flex-start;flex-wrap:wrap;gap:8px}", /*__inner_css_end__*/"e76xg_gg_"),
11
+ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendFlex_1s327_gg_._direction_row_1s327_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:8px 16px}.___SLegendFlex_1s327_gg_._direction_column_1s327_gg_{align-items:flex-start;flex-wrap:wrap;gap:8px}", /*__inner_css_end__*/"1s327_gg_"),
12
12
  /*__reshadow_css_end__*/
13
13
  {
14
- "__SLegendFlex": "___SLegendFlex_e76xg_gg_",
15
- "_direction_row": "_direction_row_e76xg_gg_",
16
- "_direction_column": "_direction_column_e76xg_gg_"
14
+ "__SLegendFlex": "___SLegendFlex_1s327_gg_",
15
+ "_direction_row": "_direction_row_1s327_gg_",
16
+ "_direction_column": "_direction_column_1s327_gg_"
17
17
  });
18
18
  import { localizedMessages } from '../../../translations/__intergalactic-dynamic-locales';
19
19
  import { BaseLegend } from '../BaseLegend';
@@ -1 +1 @@
1
- {"version":3,"file":"LegendFlex.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendFlex/LegendFlex.type.ts"],"sourcesContent":["import type { Flex, FlexProps } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\n\nimport type { LegendProps } from '../BaseLegend.type';\nimport type { LegendItemType } from '../LegendItem/LegendItem.type';\n\nexport type TrendProps = {\n /**\n * Flag for include trend LegendItem in Legend\n */\n withTrend: true;\n /**\n * Trend label (for localization)\n */\n trendLabel?: string;\n /**\n * Flag for describe are trend is visible\n */\n trendIsVisible: boolean;\n /**\n * Handler for change trend visibility\n */\n onTrendIsVisibleChange: (isVisible: boolean) => void;\n};\n\ntype SuffixProps = {\n /**\n * Element after all Legend items\n */\n suffix?: React.ReactElement;\n};\n\ntype AddonProps = ({ withTrend?: never } & SuffixProps) | ({ suffix?: never } & TrendProps);\n\nexport type LegendFlexProps = LegendProps & AddonProps & FlexProps;\n\nexport type LegendFlexDefaultProps = {\n direction: 'row';\n children: React.JSX.Element;\n};\n\nexport type LegendFlexType = Intergalactic.Component<typeof Flex, LegendFlexProps> & {\n LegendItem: LegendItemType;\n};\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"LegendFlex.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendFlex/LegendFlex.type.ts"],"sourcesContent":["import type { NSFlex } from '@semcore/base-components';\nimport type { Intergalactic } from '@semcore/core';\n\nimport type { LegendProps } from '../BaseLegend.type';\nimport type { LegendItemType } from '../LegendItem/LegendItem.type';\n\nexport type TrendProps = {\n /**\n * Flag for include trend LegendItem in Legend\n */\n withTrend: true;\n /**\n * Trend label (for localization)\n */\n trendLabel?: string;\n /**\n * Flag for describe are trend is visible\n */\n trendIsVisible: boolean;\n /**\n * Handler for change trend visibility\n */\n onTrendIsVisibleChange: (isVisible: boolean) => void;\n};\n\ntype SuffixProps = {\n /**\n * Element after all Legend items\n */\n suffix?: React.ReactElement;\n};\n\ntype AddonProps = ({ withTrend?: never } & SuffixProps) | ({ suffix?: never } & TrendProps);\n\nexport type LegendFlexProps = LegendProps & AddonProps & NSFlex.Props;\n\nexport type LegendFlexDefaultProps = {\n direction: 'row';\n children: React.JSX.Element;\n};\n\nexport type LegendFlexType = Intergalactic.Component<NSFlex.Component, LegendFlexProps> & {\n LegendItem: LegendItemType;\n};\n"],"mappings":"","ignoreList":[]}
@@ -14,25 +14,25 @@ import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
14
14
  import { Text as TypographyText } from '@semcore/typography';
15
15
  import React from 'react';
16
16
  /*!__reshadow-styles__:"./legend-item.shadow.css"*/
17
- const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendItem_e035q_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_e035q_gg_:hover{cursor:pointer}.___SLegendItem_e035q_gg_.__disabled_e035q_gg_:hover{cursor:default}}.___SPointShape_e035q_gg_.__color_e035q_gg_{background-color:var(--color_e035q);margin-right:8px;flex-shrink:0}.___SPointShape_e035q_gg_._shape_Circle_e035q_gg_._size_l_e035q_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_e035q_gg_._shape_Circle_e035q_gg_._size_m_e035q_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_e035q_gg_._shape_Line_e035q_gg_._size_l_e035q_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_e035q_gg_._shape_Line_e035q_gg_._size_m_e035q_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_e035q_gg_._shape_Square_e035q_gg_._size_l_e035q_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_e035q_gg_._shape_Square_e035q_gg_._size_m_e035q_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_e035q_gg_._shape_Pattern_e035q_gg_{background-color:initial;margin-right:4px}.___SIcon_e035q_gg_{line-height:0;margin-right:4px}.___SIcon_e035q_gg_._size_l_e035q_gg_{margin-top:4px}.___SIcon_e035q_gg_._size_m_e035q_gg_{margin-top:2px}.___SLabel_e035q_gg_{min-width:0}.___SAdditionalLabel_e035q_gg_._size_l_e035q_gg_,.___SCount_e035q_gg_._size_l_e035q_gg_,.___SLabel_e035q_gg_._size_l_e035q_gg_{font-size:var(--intergalactic-fs-300,16px);line-height:var(--intergalactic-lh-300,150%)}.___SAdditionalLabel_e035q_gg_._size_m_e035q_gg_,.___SCount_e035q_gg_._size_m_e035q_gg_,.___SLabel_e035q_gg_._size_m_e035q_gg_{font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%)}.___SAdditionalLabel_e035q_gg_,.___SCount_e035q_gg_{margin-left:4px}.___SAdditionalLabel_e035q_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_e035q_gg_:before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary,#00030095);height:4px;width:4px;border-radius:2px;margin-right:4px}@media (color-gamut:p3){.___SAdditionalLabel_e035q_gg_:before{background-color:var(--intergalactic-text-secondary,oklch(.088 .026 147.7/.583))}}.___SAdditionalLabel_e035q_gg_._size_l_e035q_gg_:before{margin-top:10px}.___SAdditionalLabel_e035q_gg_._size_m_e035q_gg_:before{margin-top:8px}.___SPatternSymbol_e035q_gg_{transform:scale(.8)}", /*__inner_css_end__*/"e035q_gg_"),
17
+ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendItem_de4s5_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_de4s5_gg_:hover{cursor:pointer}.___SLegendItem_de4s5_gg_.__disabled_de4s5_gg_:hover{cursor:default}}.___SPointShape_de4s5_gg_.__color_de4s5_gg_{background-color:var(--color_de4s5);margin-right:8px;flex-shrink:0}.___SPointShape_de4s5_gg_._shape_Circle_de4s5_gg_._size_l_de4s5_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_de4s5_gg_._shape_Circle_de4s5_gg_._size_m_de4s5_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_de4s5_gg_._shape_Line_de4s5_gg_._size_l_de4s5_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_de4s5_gg_._shape_Line_de4s5_gg_._size_m_de4s5_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_de4s5_gg_._shape_Square_de4s5_gg_._size_l_de4s5_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_de4s5_gg_._shape_Square_de4s5_gg_._size_m_de4s5_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_de4s5_gg_._shape_Pattern_de4s5_gg_{background-color:initial;margin-right:4px}.___SIcon_de4s5_gg_{line-height:0;margin-right:4px}.___SIcon_de4s5_gg_._size_l_de4s5_gg_{margin-top:4px}.___SIcon_de4s5_gg_._size_m_de4s5_gg_{margin-top:2px}.___SLabel_de4s5_gg_{min-width:0}.___SAdditionalLabel_de4s5_gg_._size_l_de4s5_gg_,.___SCount_de4s5_gg_._size_l_de4s5_gg_,.___SLabel_de4s5_gg_._size_l_de4s5_gg_{font-size:var(--intergalactic-fs-300,16px);line-height:var(--intergalactic-lh-300,150%)}.___SAdditionalLabel_de4s5_gg_._size_m_de4s5_gg_,.___SCount_de4s5_gg_._size_m_de4s5_gg_,.___SLabel_de4s5_gg_._size_m_de4s5_gg_{font-size:var(--intergalactic-fs-200,14px);line-height:var(--intergalactic-lh-200,142%)}.___SAdditionalLabel_de4s5_gg_,.___SCount_de4s5_gg_{margin-left:4px}.___SAdditionalLabel_de4s5_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_de4s5_gg_:before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary,#00030095);height:4px;width:4px;border-radius:2px;margin-right:4px}@media (color-gamut:p3){.___SAdditionalLabel_de4s5_gg_:before{background-color:var(--intergalactic-text-secondary,oklch(.088 .026 147.7/.583))}}.___SAdditionalLabel_de4s5_gg_._size_l_de4s5_gg_:before{margin-top:10px}.___SAdditionalLabel_de4s5_gg_._size_m_de4s5_gg_:before{margin-top:8px}.___SPatternSymbol_de4s5_gg_{transform:scale(.8)}", /*__inner_css_end__*/"de4s5_gg_"),
18
18
  /*__reshadow_css_end__*/
19
19
  {
20
- "__SLegendItem": "___SLegendItem_e035q_gg_",
21
- "_disabled": "__disabled_e035q_gg_",
22
- "__SPointShape": "___SPointShape_e035q_gg_",
23
- "_color": "__color_e035q_gg_",
24
- "--color": "--color_e035q",
25
- "_shape_Circle": "_shape_Circle_e035q_gg_",
26
- "_size_l": "_size_l_e035q_gg_",
27
- "_size_m": "_size_m_e035q_gg_",
28
- "_shape_Line": "_shape_Line_e035q_gg_",
29
- "_shape_Square": "_shape_Square_e035q_gg_",
30
- "_shape_Pattern": "_shape_Pattern_e035q_gg_",
31
- "__SIcon": "___SIcon_e035q_gg_",
32
- "__SLabel": "___SLabel_e035q_gg_",
33
- "__SAdditionalLabel": "___SAdditionalLabel_e035q_gg_",
34
- "__SCount": "___SCount_e035q_gg_",
35
- "__SPatternSymbol": "___SPatternSymbol_e035q_gg_"
20
+ "__SLegendItem": "___SLegendItem_de4s5_gg_",
21
+ "_disabled": "__disabled_de4s5_gg_",
22
+ "__SPointShape": "___SPointShape_de4s5_gg_",
23
+ "_color": "__color_de4s5_gg_",
24
+ "--color": "--color_de4s5",
25
+ "_shape_Circle": "_shape_Circle_de4s5_gg_",
26
+ "_size_l": "_size_l_de4s5_gg_",
27
+ "_size_m": "_size_m_de4s5_gg_",
28
+ "_shape_Line": "_shape_Line_de4s5_gg_",
29
+ "_shape_Square": "_shape_Square_de4s5_gg_",
30
+ "_shape_Pattern": "_shape_Pattern_de4s5_gg_",
31
+ "__SIcon": "___SIcon_de4s5_gg_",
32
+ "__SLabel": "___SLabel_de4s5_gg_",
33
+ "__SAdditionalLabel": "___SAdditionalLabel_de4s5_gg_",
34
+ "__SCount": "___SCount_de4s5_gg_",
35
+ "__SPatternSymbol": "___SPatternSymbol_de4s5_gg_"
36
36
  });
37
37
  import { StaticShapes } from './LegendItem.type';
38
38
  import { PatternSymbol } from '../../../Pattern';
@@ -6,14 +6,14 @@ import { Box } from '@semcore/base-components';
6
6
  import { createComponent, sstyled, Root } from '@semcore/core';
7
7
  import React from 'react';
8
8
  /*!__reshadow-styles__:"./legend-table.shadow.css"*/
9
- const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendTable_11u3t_gg_.__columns-count_11u3t_gg_{font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;display:grid;grid-template-columns:auto .2fr;align-items:center;height:-moz-fit-content;height:fit-content;grid-column-gap:16px;grid-row-gap:8px}.___SColumnItem_11u3t_gg_._size_l_11u3t_gg_{font-size:var(--intergalactic-fs-300,16px);text-align:right}.___SColumnItem_11u3t_gg_._size_m_11u3t_gg_{font-size:var(--intergalactic-fs-200,14px);text-align:right}", /*__inner_css_end__*/"11u3t_gg_"),
9
+ const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendTable_12pme_gg_.__columns-count_12pme_gg_{font-feature-settings:\"tnum\";font-variant-numeric:tabular-nums;display:grid;grid-template-columns:auto .2fr;align-items:center;height:-moz-fit-content;height:fit-content;grid-column-gap:16px;grid-row-gap:8px}.___SColumnItem_12pme_gg_._size_l_12pme_gg_{font-size:var(--intergalactic-fs-300,16px);text-align:right}.___SColumnItem_12pme_gg_._size_m_12pme_gg_{font-size:var(--intergalactic-fs-200,14px);text-align:right}", /*__inner_css_end__*/"12pme_gg_"),
10
10
  /*__reshadow_css_end__*/
11
11
  {
12
- "__SLegendTable": "___SLegendTable_11u3t_gg_",
13
- "_columns-count": "__columns-count_11u3t_gg_",
14
- "__SColumnItem": "___SColumnItem_11u3t_gg_",
15
- "_size_l": "_size_l_11u3t_gg_",
16
- "_size_m": "_size_m_11u3t_gg_"
12
+ "__SLegendTable": "___SLegendTable_12pme_gg_",
13
+ "_columns-count": "__columns-count_12pme_gg_",
14
+ "__SColumnItem": "___SColumnItem_12pme_gg_",
15
+ "_size_l": "_size_l_12pme_gg_",
16
+ "_size_m": "_size_m_12pme_gg_"
17
17
  });
18
18
  import { BaseLegend } from '../BaseLegend';
19
19
  import { LegendItemComponent } from '../LegendItem/LegendItem';
@@ -1 +1 @@
1
- {"version":3,"file":"CompactHorizontalBar.d.js","names":[],"sources":["../../../src/types/CompactHorizontalBar.d.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\n\nimport type { BackgroundProps } from './Bar';\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { IntergalacticD3Component } from './Plot';\nimport type { TooltipType } from './Tooltip';\n\nexport type CompactHorizontalBarProps = 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 /**\n * Bars rounded corners\n * @default 2\n */\n radius?: number;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n};\n\ntype BarContext = {\n /** Index in `data` array of the current items */\n index: number;\n};\n\nexport type CompactHorizontalBarHoverProps = BoxProps;\ntype Hover = IntergalacticD3Component<'rect', CompactHorizontalBarHoverProps, Context>;\nexport type CompactHorizontalBarAnnotationProps = BoxProps;\ntype Annotation = IntergalacticD3Component<\n 'foreignObject',\n CompactHorizontalBarAnnotationProps,\n Context & BarContext\n>;\nexport type CompactHorizontalBarLabelProps = BoxProps;\ntype Label = IntergalacticD3Component<'div', CompactHorizontalBarLabelProps, Context & BarContext>;\nexport type CompactHorizontalBarPercentProps = BoxProps;\nexport type CompactHorizontalBarPercentContext = {\n formatted: string;\n percent: number;\n} & BarContext;\ntype Percent = IntergalacticD3Component<\n 'div',\n CompactHorizontalBarPercentProps,\n Context & CompactHorizontalBarPercentContext\n>;\nexport type CompactHorizontalBarValueProps = BoxProps;\nexport type CompactHorizontalBarValueContext = { formatted: string; value: number } & BarContext;\ntype Value = IntergalacticD3Component<\n 'div',\n CompactHorizontalBarValueProps,\n Context & CompactHorizontalBarValueContext\n>;\nexport type CompactHorizontalBarBarProps = {};\ntype Bar = IntergalacticD3Component<'g', CompactHorizontalBarBarProps, Context & BarContext>;\nexport type CompactHorizontalBarBackgroundProps = BoxProps;\ntype Background = IntergalacticD3Component<'rect', BackgroundProps, Context & BarContext>;\nexport type CompactHorizontalBarFillProps = BoxProps & {\n patterns?: PatternsConfig;\n color?: string;\n transparent?: boolean;\n hide?: boolean;\n};\ntype Fill = IntergalacticD3Component<'rect', CompactHorizontalBarFillProps, Context & BarContext>;\n\ndeclare const CompactHorizontalBar: IntergalacticD3Component<\n 'g',\n CompactHorizontalBarProps,\n BarContext\n> & {\n Hover: Hover;\n Annotation: Annotation;\n Label: Label;\n Percent: Percent;\n Value: Value;\n Bar: Bar & {\n Background: Background;\n Fill: Fill;\n };\n Tooltip: TooltipType<BarContext>;\n};\n\nexport default CompactHorizontalBar;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"CompactHorizontalBar.d.js","names":[],"sources":["../../../src/types/CompactHorizontalBar.d.ts"],"sourcesContent":["import type { NSBox } from '@semcore/base-components';\n\nimport type { BackgroundProps } from './Bar';\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { IntergalacticD3Component } from './Plot';\nimport type { TooltipType } from './Tooltip';\n\nexport type CompactHorizontalBarProps = 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 /**\n * Bars rounded corners\n * @default 2\n */\n radius?: number;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n};\n\ntype BarContext = {\n /** Index in `data` array of the current items */\n index: number;\n};\n\nexport type CompactHorizontalBarHoverProps = NSBox.Props;\ntype Hover = IntergalacticD3Component<'rect', CompactHorizontalBarHoverProps, Context>;\nexport type CompactHorizontalBarAnnotationProps = NSBox.Props;\ntype Annotation = IntergalacticD3Component<\n 'foreignObject',\n CompactHorizontalBarAnnotationProps,\n Context & BarContext\n>;\nexport type CompactHorizontalBarLabelProps = NSBox.Props;\ntype Label = IntergalacticD3Component<'div', CompactHorizontalBarLabelProps, Context & BarContext>;\nexport type CompactHorizontalBarPercentProps = NSBox.Props;\nexport type CompactHorizontalBarPercentContext = {\n formatted: string;\n percent: number;\n} & BarContext;\ntype Percent = IntergalacticD3Component<\n 'div',\n CompactHorizontalBarPercentProps,\n Context & CompactHorizontalBarPercentContext\n>;\nexport type CompactHorizontalBarValueProps = NSBox.Props;\nexport type CompactHorizontalBarValueContext = { formatted: string; value: number } & BarContext;\ntype Value = IntergalacticD3Component<\n 'div',\n CompactHorizontalBarValueProps,\n Context & CompactHorizontalBarValueContext\n>;\nexport type CompactHorizontalBarBarProps = {};\ntype Bar = IntergalacticD3Component<'g', CompactHorizontalBarBarProps, Context & BarContext>;\nexport type CompactHorizontalBarBackgroundProps = NSBox.Props;\ntype Background = IntergalacticD3Component<'rect', BackgroundProps, Context & BarContext>;\nexport type CompactHorizontalBarFillProps = NSBox.Props & {\n patterns?: PatternsConfig;\n color?: string;\n transparent?: boolean;\n hide?: boolean;\n};\ntype Fill = IntergalacticD3Component<'rect', CompactHorizontalBarFillProps, Context & BarContext>;\n\ndeclare const CompactHorizontalBar: IntergalacticD3Component<\n 'g',\n CompactHorizontalBarProps,\n BarContext\n> & {\n Hover: Hover;\n Annotation: Annotation;\n Label: Label;\n Percent: Percent;\n Value: Value;\n Bar: Bar & {\n Background: Background;\n Fill: Fill;\n };\n Tooltip: TooltipType<BarContext>;\n};\n\nexport default CompactHorizontalBar;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Hover.d.js","names":[],"sources":["../../../src/types/Hover.d.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { UnknownProperties, ReturnEl } from '@semcore/core';\nimport type React from 'react';\n\nimport type { Context } from './context';\nimport type { IntergalacticD3Component } from './Plot';\nimport type { TooltipTypeBase } from './Tooltip';\n\n/** @deprecated */\nexport interface IHoverProps extends HoverProps, UnknownProperties {}\nexport type HoverProps = 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};\n\ntype HoverTooltip = (<X, Y>(\n props: {\n /** Field name from `data` array item for the XAxis */\n x?: X;\n /** Field name from `data` array item for the YAxis */\n y?: Y;\n /** Handle click by trigger has an index - it is an index of the data array. */\n onClick?: (index: number, e: React.SyntheticEvent) => void;\n children: (props: {\n /** Index in `data` array of the current item */\n xIndex: X extends string ? number : never;\n /** Index in `data` array of the current item */\n yIndex: Y extends string ? number : never;\n }) => { children: ReturnEl };\n /** Flag for hide line on hovered value */\n hideHoverLine?: boolean | ((xIndex: number | null, yIndex: number | null) => boolean);\n } & Omit<BoxProps, 'children'>,\n) => ReturnEl) &\nTooltipTypeBase;\n\ntype HoverContext = {\n /** Index in `data` array of the current item */\n index: number;\n};\n\ndeclare const HoverLine: IntergalacticD3Component<'g', HoverProps, HoverContext> & {\n Tooltip: HoverTooltip;\n};\n\ndeclare const HoverRect: IntergalacticD3Component<'g', HoverProps, HoverContext> & {\n Tooltip: HoverTooltip;\n};\nexport { HoverLine, HoverRect };\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"Hover.d.js","names":[],"sources":["../../../src/types/Hover.d.ts"],"sourcesContent":["import type { NSBox } from '@semcore/base-components';\nimport type { UnknownProperties, ReturnEl } from '@semcore/core';\nimport type React from 'react';\n\nimport type { Context } from './context';\nimport type { IntergalacticD3Component } from './Plot';\nimport type { TooltipTypeBase } from './Tooltip';\n\n/** @deprecated */\nexport interface IHoverProps extends HoverProps, UnknownProperties {}\nexport type HoverProps = 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};\n\ntype HoverTooltip = (<X, Y>(\n props: {\n /** Field name from `data` array item for the XAxis */\n x?: X;\n /** Field name from `data` array item for the YAxis */\n y?: Y;\n /** Handle click by trigger has an index - it is an index of the data array. */\n onClick?: (index: number, e: React.SyntheticEvent) => void;\n children: (props: {\n /** Index in `data` array of the current item */\n xIndex: X extends string ? number : never;\n /** Index in `data` array of the current item */\n yIndex: Y extends string ? number : never;\n }) => { children: ReturnEl };\n /** Flag for hide line on hovered value */\n hideHoverLine?: boolean | ((xIndex: number | null, yIndex: number | null) => boolean);\n } & Omit<NSBox.Props, 'children'>,\n) => ReturnEl) &\nTooltipTypeBase;\n\ntype HoverContext = {\n /** Index in `data` array of the current item */\n index: number;\n};\n\ndeclare const HoverLine: IntergalacticD3Component<'g', HoverProps, HoverContext> & {\n Tooltip: HoverTooltip;\n};\n\ndeclare const HoverRect: IntergalacticD3Component<'g', HoverProps, HoverContext> & {\n Tooltip: HoverTooltip;\n};\nexport { HoverLine, HoverRect };\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Line.d.js","names":[],"sources":["../../../src/types/Line.d.ts"],"sourcesContent":["import type { FadeInOutProps } from '@semcore/base-components';\nimport type { UnknownProperties } from '@semcore/core';\nimport type { CurveFactory } from 'd3-shape';\n\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface ILineProps extends LineProps, UnknownProperties {}\nexport type LineProps = 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 /** Curve method */\n curve?: CurveFactory;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n /** Callback triggered when a user clicks on a line */\n onClick?: (index: number, event: React.SyntheticEvent) => void;\n};\n\n/** @deprecated */\nexport interface ILineDotsProps extends LineDotsProps, UnknownProperties {}\nexport type LineDotsProps = Context &\n Omit<FadeInOutProps, 'display'> & {\n /** Show dots */\n display?: boolean | ((index: number, active: boolean, single: boolean) => boolean);\n /** Hide property */\n hide?: boolean;\n /** Index active of element */\n activeIndex?: number;\n /** Dot radius, radius of active dot is 4/3 times larger\n * @default 6\n */\n radius?: number;\n };\n\n/** @deprecated */\nexport interface ILineDotsContext extends LineDotsContext, UnknownProperties {}\nexport type LineDotsContext = {\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Index element of data */\n index?: number;\n};\n\n/** @deprecated */\nexport interface ILineNullProps extends LineNullProps, UnknownProperties {}\nexport type LineNullProps = Context & {\n /** Hide property */\n hide?: boolean;\n};\n\nexport type LineAreaProps = Omit<LineProps, 'transparent'> & {\n /**\n * Field name from `data` (or from `area`, if passed) array for y0 point by the YAxis for the Area\n */\n y0: string;\n /**\n * Field name from `data` (or from `area`, if passed) array for y1 point by the YAxis for the Area\n */\n y1: string;\n\n /**\n * Optional data for render area\n */\n area?: Array<{ [key: string]: number }>;\n\n /**\n * If disabled, area will not be rendered if corresponding position data is null. That case you use\n * `interpolateValue` symbol for spot data interpolation.\n * @default true\n */\n autoInterpolate?: boolean;\n};\n\ndeclare const Line: IntergalacticD3Component<'line', LineProps, Context> & {\n Dots: IntergalacticD3Component<'circle', LineDotsProps, LineDotsContext>;\n Null: IntergalacticD3Component<'path', LineNullProps>;\n Area: IntergalacticD3Component<'path', LineAreaProps>;\n};\n\nexport default Line;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"Line.d.js","names":[],"sources":["../../../src/types/Line.d.ts"],"sourcesContent":["import type { NSAnimation } from '@semcore/base-components';\nimport type { UnknownProperties } from '@semcore/core';\nimport type { CurveFactory } from 'd3-shape';\n\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface ILineProps extends LineProps, UnknownProperties {}\nexport type LineProps = 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 /** Curve method */\n curve?: CurveFactory;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n /** Enables element transparency */\n transparent?: boolean;\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n /** Callback triggered when a user clicks on a line */\n onClick?: (index: number, event: React.SyntheticEvent) => void;\n};\n\n/** @deprecated */\nexport interface ILineDotsProps extends LineDotsProps, UnknownProperties {}\nexport type LineDotsProps = Context &\n Omit<NSAnimation.FadeInOut.Props, 'display'> & {\n /** Show dots */\n display?: boolean | ((index: number, active: boolean, single: boolean) => boolean);\n /** Hide property */\n hide?: boolean;\n /** Index active of element */\n activeIndex?: number;\n /** Dot radius, radius of active dot is 4/3 times larger\n * @default 6\n */\n radius?: number;\n };\n\n/** @deprecated */\nexport interface ILineDotsContext extends LineDotsContext, UnknownProperties {}\nexport type LineDotsContext = {\n /** Value element of data */\n /** @deprecated */\n value?: any;\n /** Index element of data */\n index?: number;\n};\n\n/** @deprecated */\nexport interface ILineNullProps extends LineNullProps, UnknownProperties {}\nexport type LineNullProps = Context & {\n /** Hide property */\n hide?: boolean;\n};\n\nexport type LineAreaProps = Omit<LineProps, 'transparent'> & {\n /**\n * Field name from `data` (or from `area`, if passed) array for y0 point by the YAxis for the Area\n */\n y0: string;\n /**\n * Field name from `data` (or from `area`, if passed) array for y1 point by the YAxis for the Area\n */\n y1: string;\n\n /**\n * Optional data for render area\n */\n area?: Array<{ [key: string]: number }>;\n\n /**\n * If disabled, area will not be rendered if corresponding position data is null. That case you use\n * `interpolateValue` symbol for spot data interpolation.\n * @default true\n */\n autoInterpolate?: boolean;\n};\n\ndeclare const Line: IntergalacticD3Component<'line', LineProps, Context> & {\n Dots: IntergalacticD3Component<'circle', LineDotsProps, LineDotsContext>;\n Null: IntergalacticD3Component<'path', LineNullProps>;\n Area: IntergalacticD3Component<'path', LineAreaProps>;\n};\n\nexport default Line;\n"],"mappings":"","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import type { BoxProps } from '@semcore/base-components';\nimport type { UnknownProperties, Intergalactic } from '@semcore/core';\n\nimport type { DataStructureHints } from './a11y/hints';\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { PlotEventEmitter } from './utils';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n BoxProps & {\n /** Width of the svg element\n * @default 0 */\n width?: number;\n /** Height of the svg element\n * @default 0 */\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Optional container for data hints (use it if you have a legend component upper in tree)\n */\n dataHints?: DataStructureHints;\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n\n /** Event emitter for chart interactions */\n eventEmitter?: InstanceType<typeof PlotEventEmitter>;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n /** Allows to format titles (e.g. axes) in alt text and data table */\n titlesFormatter?: (key: string | number | null) => string | undefined;\n /** Allows to format values in alt text and data table */\n valuesFormatter?: (value: unknown, key: string | number | null) => string | undefined;\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\nIntergalactic.InternalTypings.ComponentAdditive<BaseTag, BaseTag, Props>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"file":"Plot.d.js","names":[],"sources":["../../../src/types/Plot.d.ts"],"sourcesContent":["import type { NSBox } from '@semcore/base-components';\nimport type { UnknownProperties, Intergalactic } from '@semcore/core';\n\nimport type { DataStructureHints } from './a11y/hints';\nimport type { Context } from './context';\nimport type { PatternsConfig } from './Pattern';\nimport type { PlotEventEmitter } from './utils';\n\n/** @deprecated */\nexport interface IPlotProps extends PlotProps, UnknownProperties {}\nexport type PlotProps = Context &\n NSBox.Props & {\n /** Width of the svg element\n * @default 0 */\n width?: number;\n /** Height of the svg element\n * @default 0 */\n height?: number;\n /** Human readable chart name (e.g \"Last market trends\") */\n label?: string;\n /**\n * Locale for displaying the days of a week and months, to be transferred to `Intl`\n * @default en\n * */\n locale?: NavigatorLanguage['language'];\n /**\n * Optional container for data hints (use it if you have a legend component upper in tree)\n */\n dataHints?: DataStructureHints;\n /** Optional prop to tune up alt text generating for charts */\n a11yAltTextConfig?: PlotSummarizerConfig;\n\n /** Enables charts patterns that enhances charts accessibility */\n patterns?: PatternsConfig;\n\n /** Event emitter for chart interactions */\n eventEmitter?: InstanceType<typeof PlotEventEmitter>;\n };\n\nexport type PlotSummarizerConfig = {\n /** Totally disable automatic data summarization */\n disable?: boolean;\n /** Disable automatic data summarization and use provided text */\n override?: string;\n /** Tuning up time series trends analyzing. Represents angle tangens of time series change of different strength */\n trendTangens?: {\n /** Angle tangens of time series that have meaningful trending change\n * @default 1/15\n */\n static?: number;\n /** Angle tangens of time series that have weak trending change\n * @default 1/10\n */\n weak?: number;\n /** Angle tangens of time series that have medium trending change\n * @default 1/5\n */\n medium?: number;\n /** Angle tangens of time series that have strong trending change\n * @default Infinity\n */\n strong?: number;\n };\n /** Tuning up time series local trends detection based on moving averages */\n movingAverage?: {\n /** Frame size of long moving average\n * @default Math.sqrt(data.length)\n */\n longSize?: number;\n /** Frame size of short moving average\n * @default Math.sqrt(data.length)/2\n */\n shortSize?: number;\n /** Absolute difference between values on moving averages crossing to\n * be handled as local trend change.\n * @default StandardDeviation/10\n */\n notableDiff?: number;\n };\n /** The way data to be interpreted as. By default is based on used used Plot elements and data structure.\n */\n dataType?: 'time-series' | 'points-cloud' | 'values-set';\n /** Grid size to split data of point clouds into clusters.\n */\n clustersGridSize?: number;\n /** Limits some output lists in chart alt text\n * @default 100\n * **/\n maxListSymbols?: number;\n /** Always add time to dates in chart alt text **/\n datesWithTime?: boolean;\n /** Described clusters count before text \"and X more\"\n * @default false\n * **/\n clustersLimit?: number;\n /** Described values count before text \"and X more\"\n * @default false\n * **/\n valuesLimit?: number;\n /** Described grouped value groups count before text \"and X more\"\n * @default false\n * **/\n groupsLimit?: number;\n /** Additional field for extra text description to the data\n * **/\n additionalFields?: string[];\n /** Allows to format titles (e.g. axes) in alt text and data table */\n titlesFormatter?: (key: string | number | null) => string | undefined;\n /** Allows to format values in alt text and data table */\n valuesFormatter?: (value: unknown, key: string | number | null) => string | undefined;\n};\n\n/** @deprecated */\nexport type MapProps<Props, Ctx = {}, UCProps = {}> = Props & {\n children?:\n | ((props: Props & Ctx, handlers: UCProps) => Props | React.PropsWithChildren)\n | React.ReactNode;\n};\n\nexport type IntergalacticD3Component<BaseTag extends Intergalactic.Tag, Props, Context = {}> = (<\n Tag extends Intergalactic.Tag = BaseTag,\n>(\n props: Intergalactic.InternalTypings.PropsRenderingResultComponentProps<Tag, Props, Context>,\n) => Intergalactic.InternalTypings.ComponentRenderingResults) &\nIntergalactic.InternalTypings.ComponentAdditive<BaseTag, BaseTag, Props>;\n\ndeclare const Plot: IntergalacticD3Component<'svg', PlotProps, Context>;\nexport default Plot;\n"],"mappings":"","ignoreList":[]}