@semcore/d3-chart 16.0.2-prerelease.4 → 16.0.3-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 (453) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +1 -50
  3. package/lib/cjs/AnimatedClipPath.js +13 -13
  4. package/lib/cjs/AnimatedClipPath.js.map +1 -1
  5. package/lib/cjs/Area.js +29 -27
  6. package/lib/cjs/Area.js.map +1 -1
  7. package/lib/cjs/Axis.js +97 -101
  8. package/lib/cjs/Axis.js.map +1 -1
  9. package/lib/cjs/Bar.js +31 -32
  10. package/lib/cjs/Bar.js.map +1 -1
  11. package/lib/cjs/Bubble.js +26 -27
  12. package/lib/cjs/Bubble.js.map +1 -1
  13. package/lib/cjs/CompactHorizontalBar.js +65 -68
  14. package/lib/cjs/CompactHorizontalBar.js.map +1 -1
  15. package/lib/cjs/Donut.js +94 -95
  16. package/lib/cjs/Donut.js.map +1 -1
  17. package/lib/cjs/Dots.js +36 -34
  18. package/lib/cjs/Dots.js.map +1 -1
  19. package/lib/cjs/GroupBar.js +16 -16
  20. package/lib/cjs/GroupBar.js.map +1 -1
  21. package/lib/cjs/HorizontalBar.js +30 -31
  22. package/lib/cjs/HorizontalBar.js.map +1 -1
  23. package/lib/cjs/Hover.js +27 -33
  24. package/lib/cjs/Hover.js.map +1 -1
  25. package/lib/cjs/Line.js +23 -23
  26. package/lib/cjs/Line.js.map +1 -1
  27. package/lib/cjs/Pattern.js +13 -11
  28. package/lib/cjs/Pattern.js.map +1 -1
  29. package/lib/cjs/Plot.js +26 -27
  30. package/lib/cjs/Plot.js.map +1 -1
  31. package/lib/cjs/Radar.js +125 -132
  32. package/lib/cjs/Radar.js.map +1 -1
  33. package/lib/cjs/RadialTree.js +164 -145
  34. package/lib/cjs/RadialTree.js.map +1 -1
  35. package/lib/cjs/Reference.js +47 -49
  36. package/lib/cjs/Reference.js.map +1 -1
  37. package/lib/cjs/ResponsiveContainer.js +19 -20
  38. package/lib/cjs/ResponsiveContainer.js.map +1 -1
  39. package/lib/cjs/ScatterPlot.js +24 -25
  40. package/lib/cjs/ScatterPlot.js.map +1 -1
  41. package/lib/cjs/StackBar.js +20 -23
  42. package/lib/cjs/StackBar.js.map +1 -1
  43. package/lib/cjs/StackedArea.js +14 -15
  44. package/lib/cjs/StackedArea.js.map +1 -1
  45. package/lib/cjs/Tooltip.js +34 -35
  46. package/lib/cjs/Tooltip.js.map +1 -1
  47. package/lib/cjs/Venn.js +28 -29
  48. package/lib/cjs/Venn.js.map +1 -1
  49. package/lib/cjs/a11y/DataAccessibilityTable.js +2 -3
  50. package/lib/cjs/a11y/DataAccessibilityTable.js.map +1 -1
  51. package/lib/cjs/a11y/PlotA11yModule.js +11 -12
  52. package/lib/cjs/a11y/PlotA11yModule.js.map +1 -1
  53. package/lib/cjs/a11y/PlotA11yView.js +10 -11
  54. package/lib/cjs/a11y/PlotA11yView.js.map +1 -1
  55. package/lib/cjs/a11y/bezier.js +1 -2
  56. package/lib/cjs/a11y/bezier.js.map +1 -1
  57. package/lib/cjs/a11y/focus.js +4 -5
  58. package/lib/cjs/a11y/focus.js.map +1 -1
  59. package/lib/cjs/a11y/hints.js +5 -8
  60. package/lib/cjs/a11y/hints.js.map +1 -1
  61. package/lib/cjs/a11y/insights.js +63 -64
  62. package/lib/cjs/a11y/insights.js.map +1 -1
  63. package/lib/cjs/a11y/intl.js +1 -2
  64. package/lib/cjs/a11y/intl.js.map +1 -1
  65. package/lib/cjs/a11y/locale.js +4 -5
  66. package/lib/cjs/a11y/locale.js.map +1 -1
  67. package/lib/cjs/a11y/serialize.js +15 -17
  68. package/lib/cjs/a11y/serialize.js.map +1 -1
  69. package/lib/cjs/a11y/summarize.js +1 -2
  70. package/lib/cjs/a11y/summarize.js.map +1 -1
  71. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js +4 -5
  72. package/lib/cjs/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  73. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js +4 -5
  74. package/lib/cjs/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  75. package/lib/cjs/color.js +2 -3
  76. package/lib/cjs/color.js.map +1 -1
  77. package/lib/cjs/component/Chart/AbstractChart.js +43 -46
  78. package/lib/cjs/component/Chart/AbstractChart.js.map +1 -1
  79. package/lib/cjs/component/Chart/AbstractChart.type.js.map +1 -1
  80. package/lib/cjs/component/Chart/AreaChart.js +17 -20
  81. package/lib/cjs/component/Chart/AreaChart.js.map +1 -1
  82. package/lib/cjs/component/Chart/AreaChart.type.js.map +1 -1
  83. package/lib/cjs/component/Chart/BarChart.js +17 -21
  84. package/lib/cjs/component/Chart/BarChart.js.map +1 -1
  85. package/lib/cjs/component/Chart/BarChart.type.js.map +1 -1
  86. package/lib/cjs/component/Chart/BubbleChart.js +18 -19
  87. package/lib/cjs/component/Chart/BubbleChart.js.map +1 -1
  88. package/lib/cjs/component/Chart/BubbleChart.type.js.map +1 -1
  89. package/lib/cjs/component/Chart/CigaretteChart.js +19 -23
  90. package/lib/cjs/component/Chart/CigaretteChart.js.map +1 -1
  91. package/lib/cjs/component/Chart/CigaretteChart.type.js.map +1 -1
  92. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js +13 -14
  93. package/lib/cjs/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  94. package/lib/cjs/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  95. package/lib/cjs/component/Chart/DonutChart.js +13 -14
  96. package/lib/cjs/component/Chart/DonutChart.js.map +1 -1
  97. package/lib/cjs/component/Chart/DonutChart.type.js.map +1 -1
  98. package/lib/cjs/component/Chart/HistogramChart.js +15 -16
  99. package/lib/cjs/component/Chart/HistogramChart.js.map +1 -1
  100. package/lib/cjs/component/Chart/HistogramChart.type.js.map +1 -1
  101. package/lib/cjs/component/Chart/LineChart.js +17 -18
  102. package/lib/cjs/component/Chart/LineChart.js.map +1 -1
  103. package/lib/cjs/component/Chart/LineChart.type.js.map +1 -1
  104. package/lib/cjs/component/Chart/RadarChart.js +14 -17
  105. package/lib/cjs/component/Chart/RadarChart.js.map +1 -1
  106. package/lib/cjs/component/Chart/RadarChart.type.js.map +1 -1
  107. package/lib/cjs/component/Chart/ScatterPlotChart.js +14 -15
  108. package/lib/cjs/component/Chart/ScatterPlotChart.js.map +1 -1
  109. package/lib/cjs/component/Chart/ScatterPlotChart.type.js.map +1 -1
  110. package/lib/cjs/component/Chart/VennChart.js +12 -13
  111. package/lib/cjs/component/Chart/VennChart.js.map +1 -1
  112. package/lib/cjs/component/Chart/VennChart.type.js.map +1 -1
  113. package/lib/cjs/component/Chart/index.js +7 -8
  114. package/lib/cjs/component/Chart/index.js.map +1 -1
  115. package/lib/cjs/component/ChartLegend/BaseLegend.js +42 -20
  116. package/lib/cjs/component/ChartLegend/BaseLegend.js.map +1 -1
  117. package/lib/cjs/component/ChartLegend/BaseLegend.type.js.map +1 -1
  118. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js +20 -20
  119. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  120. package/lib/cjs/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  121. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js +79 -67
  122. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  123. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js +1 -2
  124. package/lib/cjs/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  125. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js +18 -18
  126. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  127. package/lib/cjs/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  128. package/lib/cjs/component/ChartLegend/index.js +1 -2
  129. package/lib/cjs/component/ChartLegend/index.js.map +1 -1
  130. package/lib/cjs/component/Cigarette/Cigarette.js +18 -19
  131. package/lib/cjs/component/Cigarette/Cigarette.js.map +1 -1
  132. package/lib/cjs/component/StackGroupBar/StackGroupBar.js +22 -26
  133. package/lib/cjs/component/StackGroupBar/StackGroupBar.js.map +1 -1
  134. package/lib/cjs/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
  135. package/lib/cjs/component/SvgElement.js +21 -0
  136. package/lib/cjs/component/SvgElement.js.map +1 -0
  137. package/lib/cjs/createElement.d.js.map +1 -1
  138. package/lib/cjs/createElement.js +7 -8
  139. package/lib/cjs/createElement.js.map +1 -1
  140. package/lib/cjs/index.js +9 -2
  141. package/lib/cjs/index.js.map +1 -1
  142. package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
  143. package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
  144. package/lib/cjs/types/Area.d.js.map +1 -1
  145. package/lib/cjs/types/Axis.d.js.map +1 -1
  146. package/lib/cjs/types/Bar.d.js.map +1 -1
  147. package/lib/cjs/types/Bubble.d.js.map +1 -1
  148. package/lib/cjs/types/ClipPath.d.js.map +1 -1
  149. package/lib/cjs/types/CompactHorizontalBar.d.js.map +1 -1
  150. package/lib/cjs/types/Donut.d.js.map +1 -1
  151. package/lib/cjs/types/GroupBar.d.js.map +1 -1
  152. package/lib/cjs/types/HorizontalBar.d.js.map +1 -1
  153. package/lib/cjs/types/Hover.d.js.map +1 -1
  154. package/lib/cjs/types/Line.d.js.map +1 -1
  155. package/lib/cjs/types/Plot.d.js.map +1 -1
  156. package/lib/cjs/types/Radar.d.js.map +1 -1
  157. package/lib/cjs/types/Reference.d.js.map +1 -1
  158. package/lib/cjs/types/ResponsiveContainer.d.js.map +1 -1
  159. package/lib/cjs/types/ScatterPlot.d.js.map +1 -1
  160. package/lib/cjs/types/StackBar.d.js.map +1 -1
  161. package/lib/cjs/types/StackedArea.d.js.map +1 -1
  162. package/lib/cjs/types/Tooltip.d.js.map +1 -1
  163. package/lib/cjs/types/Venn.d.js.map +1 -1
  164. package/lib/cjs/types/context.d.js.map +1 -1
  165. package/lib/cjs/types/index.d.js +2 -2
  166. package/lib/cjs/types/index.d.js.map +1 -1
  167. package/lib/cjs/utils.js +31 -52
  168. package/lib/cjs/utils.js.map +1 -1
  169. package/lib/es6/AnimatedClipPath.js +11 -10
  170. package/lib/es6/AnimatedClipPath.js.map +1 -1
  171. package/lib/es6/Area.js +27 -24
  172. package/lib/es6/Area.js.map +1 -1
  173. package/lib/es6/Axis.js +96 -98
  174. package/lib/es6/Axis.js.map +1 -1
  175. package/lib/es6/Bar.js +28 -27
  176. package/lib/es6/Bar.js.map +1 -1
  177. package/lib/es6/Bubble.js +24 -24
  178. package/lib/es6/Bubble.js.map +1 -1
  179. package/lib/es6/CompactHorizontalBar.js +63 -65
  180. package/lib/es6/CompactHorizontalBar.js.map +1 -1
  181. package/lib/es6/Donut.js +92 -92
  182. package/lib/es6/Donut.js.map +1 -1
  183. package/lib/es6/Dots.js +36 -33
  184. package/lib/es6/Dots.js.map +1 -1
  185. package/lib/es6/GroupBar.js +14 -13
  186. package/lib/es6/GroupBar.js.map +1 -1
  187. package/lib/es6/HorizontalBar.js +27 -26
  188. package/lib/es6/HorizontalBar.js.map +1 -1
  189. package/lib/es6/Hover.js +24 -28
  190. package/lib/es6/Hover.js.map +1 -1
  191. package/lib/es6/Line.js +20 -19
  192. package/lib/es6/Line.js.map +1 -1
  193. package/lib/es6/Pattern.js +4 -2
  194. package/lib/es6/Pattern.js.map +1 -1
  195. package/lib/es6/Plot.js +25 -25
  196. package/lib/es6/Plot.js.map +1 -1
  197. package/lib/es6/Radar.js +122 -128
  198. package/lib/es6/Radar.js.map +1 -1
  199. package/lib/es6/RadialTree.js +162 -142
  200. package/lib/es6/RadialTree.js.map +1 -1
  201. package/lib/es6/Reference.js +44 -43
  202. package/lib/es6/Reference.js.map +1 -1
  203. package/lib/es6/ResponsiveContainer.js +17 -17
  204. package/lib/es6/ResponsiveContainer.js.map +1 -1
  205. package/lib/es6/ScatterPlot.js +22 -22
  206. package/lib/es6/ScatterPlot.js.map +1 -1
  207. package/lib/es6/StackBar.js +17 -19
  208. package/lib/es6/StackBar.js.map +1 -1
  209. package/lib/es6/StackedArea.js +12 -12
  210. package/lib/es6/StackedArea.js.map +1 -1
  211. package/lib/es6/Tooltip.js +33 -33
  212. package/lib/es6/Tooltip.js.map +1 -1
  213. package/lib/es6/Venn.js +26 -26
  214. package/lib/es6/Venn.js.map +1 -1
  215. package/lib/es6/a11y/DataAccessibilityTable.js.map +1 -1
  216. package/lib/es6/a11y/PlotA11yModule.js +11 -11
  217. package/lib/es6/a11y/PlotA11yModule.js.map +1 -1
  218. package/lib/es6/a11y/PlotA11yView.js +9 -9
  219. package/lib/es6/a11y/PlotA11yView.js.map +1 -1
  220. package/lib/es6/a11y/bezier.js.map +1 -1
  221. package/lib/es6/a11y/focus.js +3 -3
  222. package/lib/es6/a11y/focus.js.map +1 -1
  223. package/lib/es6/a11y/hints.js +1 -1
  224. package/lib/es6/a11y/hints.js.map +1 -1
  225. package/lib/es6/a11y/insights.js +61 -61
  226. package/lib/es6/a11y/insights.js.map +1 -1
  227. package/lib/es6/a11y/intl.js.map +1 -1
  228. package/lib/es6/a11y/locale.js +2 -2
  229. package/lib/es6/a11y/locale.js.map +1 -1
  230. package/lib/es6/a11y/serialize.js +14 -13
  231. package/lib/es6/a11y/serialize.js.map +1 -1
  232. package/lib/es6/a11y/summarize.js.map +1 -1
  233. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js +2 -2
  234. package/lib/es6/a11y/translations/module/__intergalactic-dynamic-locales.js.map +1 -1
  235. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js +2 -2
  236. package/lib/es6/a11y/translations/view/__intergalactic-dynamic-locales.js.map +1 -1
  237. package/lib/es6/color.js +1 -1
  238. package/lib/es6/color.js.map +1 -1
  239. package/lib/es6/component/Chart/AbstractChart.js +40 -41
  240. package/lib/es6/component/Chart/AbstractChart.js.map +1 -1
  241. package/lib/es6/component/Chart/AbstractChart.type.js.map +1 -1
  242. package/lib/es6/component/Chart/AreaChart.js +16 -16
  243. package/lib/es6/component/Chart/AreaChart.js.map +1 -1
  244. package/lib/es6/component/Chart/AreaChart.type.js.map +1 -1
  245. package/lib/es6/component/Chart/BarChart.js +15 -17
  246. package/lib/es6/component/Chart/BarChart.js.map +1 -1
  247. package/lib/es6/component/Chart/BarChart.type.js.map +1 -1
  248. package/lib/es6/component/Chart/BubbleChart.js +17 -15
  249. package/lib/es6/component/Chart/BubbleChart.js.map +1 -1
  250. package/lib/es6/component/Chart/BubbleChart.type.js.map +1 -1
  251. package/lib/es6/component/Chart/CigaretteChart.js +17 -17
  252. package/lib/es6/component/Chart/CigaretteChart.js.map +1 -1
  253. package/lib/es6/component/Chart/CigaretteChart.type.js.map +1 -1
  254. package/lib/es6/component/Chart/CompactHorizontalBarChart.js +11 -10
  255. package/lib/es6/component/Chart/CompactHorizontalBarChart.js.map +1 -1
  256. package/lib/es6/component/Chart/CompactHorizontalBarChart.type.js.map +1 -1
  257. package/lib/es6/component/Chart/DonutChart.js +12 -10
  258. package/lib/es6/component/Chart/DonutChart.js.map +1 -1
  259. package/lib/es6/component/Chart/DonutChart.type.js.map +1 -1
  260. package/lib/es6/component/Chart/HistogramChart.js +14 -12
  261. package/lib/es6/component/Chart/HistogramChart.js.map +1 -1
  262. package/lib/es6/component/Chart/HistogramChart.type.js.map +1 -1
  263. package/lib/es6/component/Chart/LineChart.js +15 -14
  264. package/lib/es6/component/Chart/LineChart.js.map +1 -1
  265. package/lib/es6/component/Chart/LineChart.type.js.map +1 -1
  266. package/lib/es6/component/Chart/RadarChart.js +12 -13
  267. package/lib/es6/component/Chart/RadarChart.js.map +1 -1
  268. package/lib/es6/component/Chart/RadarChart.type.js.map +1 -1
  269. package/lib/es6/component/Chart/ScatterPlotChart.js +13 -11
  270. package/lib/es6/component/Chart/ScatterPlotChart.js.map +1 -1
  271. package/lib/es6/component/Chart/ScatterPlotChart.type.js.map +1 -1
  272. package/lib/es6/component/Chart/VennChart.js +10 -9
  273. package/lib/es6/component/Chart/VennChart.js.map +1 -1
  274. package/lib/es6/component/Chart/VennChart.type.js.map +1 -1
  275. package/lib/es6/component/Chart/index.js +6 -6
  276. package/lib/es6/component/Chart/index.js.map +1 -1
  277. package/lib/es6/component/ChartLegend/BaseLegend.js +40 -17
  278. package/lib/es6/component/ChartLegend/BaseLegend.js.map +1 -1
  279. package/lib/es6/component/ChartLegend/BaseLegend.type.js.map +1 -1
  280. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js +18 -17
  281. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.js.map +1 -1
  282. package/lib/es6/component/ChartLegend/LegendFlex/LegendFlex.type.js.map +1 -1
  283. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js +77 -64
  284. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.js.map +1 -1
  285. package/lib/es6/component/ChartLegend/LegendItem/LegendItem.type.js.map +1 -1
  286. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js +16 -15
  287. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.js.map +1 -1
  288. package/lib/es6/component/ChartLegend/LegendTable/LegendTable.type.js.map +1 -1
  289. package/lib/es6/component/ChartLegend/index.js.map +1 -1
  290. package/lib/es6/component/Cigarette/Cigarette.js +16 -16
  291. package/lib/es6/component/Cigarette/Cigarette.js.map +1 -1
  292. package/lib/es6/component/StackGroupBar/StackGroupBar.js +20 -21
  293. package/lib/es6/component/StackGroupBar/StackGroupBar.js.map +1 -1
  294. package/lib/es6/component/StackGroupBar/StackGroupBar.type.js.map +1 -1
  295. package/lib/es6/component/SvgElement.js +14 -0
  296. package/lib/es6/component/SvgElement.js.map +1 -0
  297. package/lib/es6/createElement.d.js.map +1 -1
  298. package/lib/es6/createElement.js +5 -5
  299. package/lib/es6/createElement.js.map +1 -1
  300. package/lib/es6/index.js +1 -0
  301. package/lib/es6/index.js.map +1 -1
  302. package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
  303. package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
  304. package/lib/es6/types/Area.d.js.map +1 -1
  305. package/lib/es6/types/Axis.d.js.map +1 -1
  306. package/lib/es6/types/Bar.d.js.map +1 -1
  307. package/lib/es6/types/Bubble.d.js.map +1 -1
  308. package/lib/es6/types/ClipPath.d.js.map +1 -1
  309. package/lib/es6/types/CompactHorizontalBar.d.js.map +1 -1
  310. package/lib/es6/types/Donut.d.js.map +1 -1
  311. package/lib/es6/types/GroupBar.d.js.map +1 -1
  312. package/lib/es6/types/HorizontalBar.d.js.map +1 -1
  313. package/lib/es6/types/Hover.d.js.map +1 -1
  314. package/lib/es6/types/Line.d.js.map +1 -1
  315. package/lib/es6/types/Plot.d.js.map +1 -1
  316. package/lib/es6/types/Radar.d.js.map +1 -1
  317. package/lib/es6/types/Reference.d.js.map +1 -1
  318. package/lib/es6/types/ResponsiveContainer.d.js.map +1 -1
  319. package/lib/es6/types/ScatterPlot.d.js.map +1 -1
  320. package/lib/es6/types/StackBar.d.js.map +1 -1
  321. package/lib/es6/types/StackedArea.d.js.map +1 -1
  322. package/lib/es6/types/Tooltip.d.js.map +1 -1
  323. package/lib/es6/types/Venn.d.js.map +1 -1
  324. package/lib/es6/types/context.d.js.map +1 -1
  325. package/lib/es6/types/index.d.js +1 -0
  326. package/lib/es6/types/index.d.js.map +1 -1
  327. package/lib/es6/utils.js +11 -13
  328. package/lib/es6/utils.js.map +1 -1
  329. package/lib/esm/AnimatedClipPath.mjs +10 -7
  330. package/lib/esm/Area.mjs +30 -25
  331. package/lib/esm/Axis.mjs +67 -67
  332. package/lib/esm/Bar.mjs +31 -28
  333. package/lib/esm/Bubble.mjs +28 -26
  334. package/lib/esm/CompactHorizontalBar.mjs +61 -60
  335. package/lib/esm/Donut.mjs +50 -49
  336. package/lib/esm/Dots.mjs +32 -27
  337. package/lib/esm/GroupBar.mjs +14 -11
  338. package/lib/esm/HorizontalBar.mjs +30 -27
  339. package/lib/esm/Hover.mjs +28 -30
  340. package/lib/esm/Line.mjs +23 -20
  341. package/lib/esm/Pattern.mjs +1 -1
  342. package/lib/esm/Plot.mjs +27 -25
  343. package/lib/esm/Radar.mjs +90 -94
  344. package/lib/esm/RadialTree.mjs +86 -86
  345. package/lib/esm/Reference.mjs +34 -31
  346. package/lib/esm/ResponsiveContainer.mjs +19 -17
  347. package/lib/esm/ScatterPlot.mjs +26 -24
  348. package/lib/esm/StackBar.mjs +17 -17
  349. package/lib/esm/StackedArea.mjs +13 -11
  350. package/lib/esm/Tooltip.mjs +35 -33
  351. package/lib/esm/Venn.mjs +29 -27
  352. package/lib/esm/a11y/DataAccessibilityTable.mjs +2 -2
  353. package/lib/esm/a11y/PlotA11yModule.mjs +8 -8
  354. package/lib/esm/a11y/PlotA11yView.mjs +9 -9
  355. package/lib/esm/a11y/focus.mjs +3 -3
  356. package/lib/esm/a11y/hints.mjs +1 -1
  357. package/lib/esm/a11y/insights.mjs +77 -78
  358. package/lib/esm/a11y/intl.mjs +1 -1
  359. package/lib/esm/a11y/locale.mjs +2 -2
  360. package/lib/esm/a11y/serialize.mjs +12 -12
  361. package/lib/esm/a11y/translations/module/__intergalactic-dynamic-locales.mjs +2 -2
  362. package/lib/esm/a11y/translations/view/__intergalactic-dynamic-locales.mjs +2 -2
  363. package/lib/esm/component/Chart/AbstractChart.mjs +38 -37
  364. package/lib/esm/component/Chart/AreaChart.mjs +19 -15
  365. package/lib/esm/component/Chart/BarChart.mjs +20 -17
  366. package/lib/esm/component/Chart/BubbleChart.mjs +16 -13
  367. package/lib/esm/component/Chart/CigaretteChart.mjs +24 -17
  368. package/lib/esm/component/Chart/CompactHorizontalBarChart.mjs +18 -10
  369. package/lib/esm/component/Chart/DonutChart.mjs +13 -10
  370. package/lib/esm/component/Chart/HistogramChart.mjs +18 -12
  371. package/lib/esm/component/Chart/LineChart.mjs +18 -12
  372. package/lib/esm/component/Chart/RadarChart.mjs +19 -12
  373. package/lib/esm/component/Chart/ScatterPlotChart.mjs +14 -11
  374. package/lib/esm/component/Chart/VennChart.mjs +12 -9
  375. package/lib/esm/component/Chart/index.mjs +6 -6
  376. package/lib/esm/component/ChartLegend/BaseLegend.mjs +42 -17
  377. package/lib/esm/component/ChartLegend/LegendFlex/LegendFlex.mjs +21 -18
  378. package/lib/esm/component/ChartLegend/LegendItem/LegendItem.mjs +67 -56
  379. package/lib/esm/component/ChartLegend/LegendTable/LegendTable.mjs +23 -20
  380. package/lib/esm/component/Cigarette/Cigarette.mjs +18 -16
  381. package/lib/esm/component/StackGroupBar/StackGroupBar.mjs +20 -19
  382. package/lib/esm/component/SvgElement.mjs +14 -0
  383. package/lib/esm/createElement.mjs +5 -5
  384. package/lib/esm/index.mjs +2 -0
  385. package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
  386. package/lib/esm/utils.mjs +8 -8
  387. package/lib/types/Area.d.ts +7 -6
  388. package/lib/types/Axis.d.ts +4 -3
  389. package/lib/types/Bar.d.ts +7 -6
  390. package/lib/types/Bubble.d.ts +6 -5
  391. package/lib/types/ClipPath.d.ts +4 -3
  392. package/lib/types/CompactHorizontalBar.d.ts +7 -8
  393. package/lib/types/Donut.d.ts +6 -5
  394. package/lib/types/GroupBar.d.ts +6 -6
  395. package/lib/types/HorizontalBar.d.ts +7 -6
  396. package/lib/types/Hover.d.ts +8 -8
  397. package/lib/types/Line.d.ts +7 -6
  398. package/lib/types/Pattern.d.ts +51 -51
  399. package/lib/types/Plot.d.ts +10 -9
  400. package/lib/types/Radar.d.ts +8 -7
  401. package/lib/types/RadialTree.d.ts +9 -54
  402. package/lib/types/Reference.d.ts +5 -4
  403. package/lib/types/ResponsiveContainer.d.ts +5 -4
  404. package/lib/types/ScatterPlot.d.ts +6 -5
  405. package/lib/types/StackBar.d.ts +7 -6
  406. package/lib/types/StackedArea.d.ts +6 -5
  407. package/lib/types/Tooltip.d.ts +14 -12
  408. package/lib/types/Venn.d.ts +7 -6
  409. package/lib/types/a11y/DataAccessibilityTable.d.ts +2 -2
  410. package/lib/types/a11y/PlotA11yModule.d.ts +1 -1
  411. package/lib/types/a11y/hints.d.ts +5 -5
  412. package/lib/types/a11y/insights.d.ts +1 -1
  413. package/lib/types/a11y/intl.d.ts +1 -1
  414. package/lib/types/a11y/serialize.d.ts +7 -7
  415. package/lib/types/a11y/summarize.d.ts +2 -2
  416. package/lib/types/component/Chart/AbstractChart.d.ts +6 -6
  417. package/lib/types/component/Chart/AbstractChart.type.d.ts +27 -27
  418. package/lib/types/component/Chart/AreaChart.d.ts +1 -1
  419. package/lib/types/component/Chart/AreaChart.type.d.ts +6 -6
  420. package/lib/types/component/Chart/BarChart.d.ts +1 -1
  421. package/lib/types/component/Chart/BarChart.type.d.ts +6 -6
  422. package/lib/types/component/Chart/BubbleChart.d.ts +1 -1
  423. package/lib/types/component/Chart/BubbleChart.type.d.ts +4 -4
  424. package/lib/types/component/Chart/CigaretteChart.d.ts +1 -1
  425. package/lib/types/component/Chart/CigaretteChart.type.d.ts +4 -4
  426. package/lib/types/component/Chart/CompactHorizontalBarChart.d.ts +1 -1
  427. package/lib/types/component/Chart/CompactHorizontalBarChart.type.d.ts +5 -5
  428. package/lib/types/component/Chart/DonutChart.d.ts +1 -1
  429. package/lib/types/component/Chart/DonutChart.type.d.ts +5 -5
  430. package/lib/types/component/Chart/HistogramChart.d.ts +1 -1
  431. package/lib/types/component/Chart/HistogramChart.type.d.ts +4 -4
  432. package/lib/types/component/Chart/LineChart.d.ts +1 -1
  433. package/lib/types/component/Chart/LineChart.type.d.ts +7 -7
  434. package/lib/types/component/Chart/RadarChart.d.ts +1 -1
  435. package/lib/types/component/Chart/RadarChart.type.d.ts +4 -4
  436. package/lib/types/component/Chart/ScatterPlotChart.d.ts +1 -1
  437. package/lib/types/component/Chart/ScatterPlotChart.type.d.ts +5 -5
  438. package/lib/types/component/Chart/VennChart.d.ts +1 -1
  439. package/lib/types/component/Chart/VennChart.type.d.ts +4 -4
  440. package/lib/types/component/ChartLegend/BaseLegend.d.ts +6 -4
  441. package/lib/types/component/ChartLegend/BaseLegend.type.d.ts +4 -5
  442. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.d.ts +1 -1
  443. package/lib/types/component/ChartLegend/LegendFlex/LegendFlex.type.d.ts +4 -5
  444. package/lib/types/component/ChartLegend/LegendItem/LegendItem.d.ts +1 -1
  445. package/lib/types/component/ChartLegend/LegendItem/LegendItem.type.d.ts +17 -10
  446. package/lib/types/component/ChartLegend/LegendTable/LegendTable.d.ts +1 -1
  447. package/lib/types/component/ChartLegend/LegendTable/LegendTable.type.d.ts +5 -5
  448. package/lib/types/component/StackGroupBar/StackGroupBar.d.ts +1 -1
  449. package/lib/types/component/StackGroupBar/StackGroupBar.type.d.ts +3 -4
  450. package/lib/types/component/SvgElement.d.ts +10 -0
  451. package/lib/types/index.d.ts +2 -1
  452. package/lib/types/utils.d.ts +6 -6
  453. package/package.json +22 -23
@@ -1 +1 @@
1
- {"version":3,"file":"BaseLegend.js","names":["Component","makeDataHintsHandlers","BaseLegend","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","id","checked","_this$props$onChangeV","_this$props","props","onChangeVisibleItem","e","_this$props$onMouseEn","_this$props2","onMouseEnterItem","_this$props$onMouseLe","_this$props3","onMouseLeaveItem","_createClass","key","value","componentDidMount","setHints","componentDidUpdate","prevProps","items","dataHints","_this$asProps","asProps","dataHintsHandler","undefined","forEach","legendItem","labelKey","label","getItem","index","line","Error","getLegendItemProps","_","_this$asProps2","_this$asProps2$shape","shape","_this$asProps2$size","size","patterns","_objectSpread","onChangeLegendItem","onMouseEnter","bindOnMouseEnterItem","onMouseLeave","bindOnMouseLeaveItem","style","gridRowStart","gridRowEnd"],"sources":["../../../../src/component/ChartLegend/BaseLegend.tsx"],"sourcesContent":["import React from 'react';\nimport { Component, Intergalactic } from '@semcore/core';\nimport { LegendItemKey, LegendItemProps } from './LegendItem/LegendItem.type';\nimport { LegendProps } from './BaseLegend.type';\nimport { makeDataHintsHandlers } from '../../a11y/hints';\n\nexport abstract class BaseLegend<T extends LegendProps> extends Component<T> {\n componentDidMount() {\n this.setHints();\n }\n\n componentDidUpdate(prevProps: T) {\n if (prevProps.items !== this.props.items || prevProps.dataHints !== this.props.dataHints) {\n this.setHints();\n }\n }\n\n setHints() {\n const { items, dataHints } = this.asProps;\n const dataHintsHandler = dataHints ? makeDataHintsHandlers(dataHints) : undefined;\n\n items.forEach((legendItem) => {\n dataHintsHandler?.labelKey('value', legendItem.id, legendItem.label);\n });\n }\n\n getItem(index: number) {\n const line = this.asProps.items[index];\n\n if (line === undefined) {\n throw new Error(`No index \"${index}\" in lines`);\n }\n\n return line;\n }\n\n getLegendItemProps(\n _: {},\n index: number,\n ): LegendItemProps & Intergalactic.InternalTypings.ComponentPropsNesting<'div'> {\n const { shape = 'Checkbox', size = 'm', patterns } = this.asProps;\n const line = this.getItem(index);\n\n return {\n ...line,\n shape,\n size,\n onChangeLegendItem: this.onChangeLegendItem,\n onMouseEnter: this.bindOnMouseEnterItem(line.id),\n onMouseLeave: this.bindOnMouseLeaveItem(line.id),\n style: { gridRowStart: `${index + 1}`, gridRowEnd: `${index + 2}` },\n patterns,\n };\n }\n\n onChangeLegendItem = (id: LegendItemKey, checked: boolean) => {\n this.props.onChangeVisibleItem?.(id, checked);\n };\n\n bindOnMouseEnterItem = (id: LegendItemKey) => {\n return (e: React.SyntheticEvent) => {\n this.props.onMouseEnterItem?.(id, e);\n };\n };\n\n bindOnMouseLeaveItem = (id: LegendItemKey) => {\n return (e: React.SyntheticEvent) => {\n this.props.onMouseLeaveItem?.(id, e);\n };\n };\n}\n"],"mappings":";;;;;;;AACA,SAASA,SAAS,QAAuB,eAAe;AAGxD,SAASC,qBAAqB,QAAQ,kBAAkB;AAExD,WAAsBC,UAAU,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,UAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC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C,IAAI;IACb;EAAC;IAAAlB,GAAA;IAAAC,KAAA,EAED,SAAAmB,mBACEC,CAAK,EACLJ,KAAa,EACiE;MAC9E,IAAAK,cAAA,GAAqD,IAAI,CAACb,OAAO;QAAAc,oBAAA,GAAAD,cAAA,CAAzDE,KAAK;QAALA,KAAK,GAAAD,oBAAA,cAAG,UAAU,GAAAA,oBAAA;QAAAE,mBAAA,GAAAH,cAAA,CAAEI,IAAI;QAAJA,IAAI,GAAAD,mBAAA,cAAG,GAAG,GAAAA,mBAAA;QAAEE,QAAQ,GAAAL,cAAA,CAARK,QAAQ;MAChD,IAAMT,IAAI,GAAG,IAAI,CAACF,OAAO,CAACC,KAAK,CAAC;MAEhC,OAAAW,aAAA,CAAAA,aAAA,KACKV,IAAI;QACPM,KAAK,EAALA,KAAK;QACLE,IAAI,EAAJA,IAAI;QACJG,kBAAkB,EAAE,IAAI,CAACA,kBAAkB;QAC3CC,YAAY,EAAE,IAAI,CAACC,oBAAoB,CAACb,IAAI,CAAChC,EAAE,CAAC;QAChD8C,YAAY,EAAE,IAAI,CAACC,oBAAoB,CAACf,IAAI,CAAChC,EAAE,CAAC;QAChDgD,KAAK,EAAE;UAAEC,YAAY,KAAApD,MAAA,CAAKkC,KAAK,GAAG,CAAC,CAAE;UAAEmB,UAAU,KAAArD,MAAA,CAAKkC,KAAK,GAAG,CAAC;QAAG,CAAC;QACnEU,QAAQ,EAARA;MAAQ;IAEZ;EAAC;EAAA,OAAA3D,UAAA;AAAA,EA/C6DF,SAAS"}
1
+ {"version":3,"file":"BaseLegend.js","names":["Component","makeDataHintsHandlers","BaseLegend","_Component","_this","_classCallCheck","_len","arguments","length","args","Array","_key","_callSuper","concat","_defineProperty","id","checked","_this$props$onChangeV","_this$props","props","onChangeVisibleItem","call","_this$props$onMouseEn","_this$props2","onMouseEnterItem","_this$props$onMouseLe","_this$props3","onMouseLeaveItem","_this$props$onMouseEn2","_this$props5","_this$props$onMouseLe2","_this$props4","_this$props$onMouseLe3","_this$props6","e","_this$props$onMouseEn3","_this$props7","_this$props$onMouseLe4","_this$props8","_inherits","_createClass","key","value","componentDidMount","setHints","componentDidUpdate","prevProps","items","dataHints","_this$asProps","asProps","dataHintsHandler","undefined","forEach","legendItem","labelKey","label","getItem","index","line","Error","getLegendItemProps","_","_this$asProps2","_this$asProps2$shape","shape","_this$asProps2$size","size","patterns","_objectSpread","onFocusLegendItem","onBlurLegendItem","onChangeLegendItem","onMouseEnter","bindOnMouseEnterItem","onMouseLeave","bindOnMouseLeaveItem","style","gridRowStart","gridRowEnd"],"sources":["../../../../src/component/ChartLegend/BaseLegend.tsx"],"sourcesContent":["import { Component, type Intergalactic } from '@semcore/core';\nimport type React from 'react';\n\nimport type { LegendProps } from './BaseLegend.type';\nimport type { LegendItemKey, LegendItemProps } from './LegendItem/LegendItem.type';\nimport { makeDataHintsHandlers } from '../../a11y/hints';\n\nexport abstract class BaseLegend<T extends LegendProps> extends Component<T> {\n componentDidMount() {\n this.setHints();\n }\n\n componentDidUpdate(prevProps: T) {\n if (prevProps.items !== this.props.items || prevProps.dataHints !== this.props.dataHints) {\n this.setHints();\n }\n }\n\n setHints() {\n const { items, dataHints } = this.asProps;\n const dataHintsHandler = dataHints ? makeDataHintsHandlers(dataHints) : undefined;\n\n items.forEach((legendItem) => {\n dataHintsHandler?.labelKey('value', legendItem.id, legendItem.label);\n });\n }\n\n getItem(index: number) {\n const line = this.asProps.items[index];\n\n if (line === undefined) {\n throw new Error(`No index \"${index}\" in lines`);\n }\n\n return line;\n }\n\n getLegendItemProps(\n _: {},\n index: number,\n ): LegendItemProps & Intergalactic.InternalTypings.ComponentPropsNesting<'div'> {\n const { shape = 'Checkbox', size = 'm', patterns } = this.asProps;\n const line = this.getItem(index);\n\n return {\n ...line,\n shape,\n size,\n onFocusLegendItem: this.onFocusLegendItem(line.checked),\n onBlurLegendItem: this.onBlurLegendItem,\n onChangeLegendItem: this.onChangeLegendItem,\n onMouseEnter: line.checked ? this.bindOnMouseEnterItem(line.id) : undefined,\n onMouseLeave: this.bindOnMouseLeaveItem(line.id),\n style: { gridRowStart: `${index + 1}`, gridRowEnd: `${index + 2}` },\n patterns,\n };\n }\n\n onChangeLegendItem = (id: LegendItemKey, checked: boolean) => {\n this.props.onChangeVisibleItem?.(id, checked);\n\n if (checked) {\n this.props.onMouseEnterItem?.(id);\n } else {\n this.props.onMouseLeaveItem?.(id);\n }\n };\n\n onFocusLegendItem = (checked: boolean) => (id: LegendItemKey) => {\n if (!checked) {\n return this.props.onMouseLeaveItem?.(id);\n }\n\n this.props.onMouseEnterItem?.(id);\n };\n\n onBlurLegendItem = (id: LegendItemKey) => {\n this.props.onMouseLeaveItem?.(id);\n };\n\n bindOnMouseEnterItem = (id: LegendItemKey) => {\n return (e: React.SyntheticEvent) => {\n this.props.onMouseEnterItem?.(id, e);\n };\n };\n\n bindOnMouseLeaveItem = (id: LegendItemKey) => {\n return (e: React.SyntheticEvent) => {\n this.props.onMouseLeaveItem?.(id, e);\n };\n };\n}\n"],"mappings":";;;;;;;;;AAAA,SAASA,SAAS,QAA4B,eAAe;AAK7D,SAASC,qBAAqB,QAAQ,kBAAkB;AAExD,WAAsBC,UAAU,0BAAAC,UAAA;EAAA,SAAAD,WAAA;IAAA,IAAAE,KAAA;IAAAC,eAAA,OAAAH,UAAA;IAAA,SAAAI,IAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAC,IAAA,OAAAC,KAAA,CAAAJ,IAAA,GAAAK,IAAA,MAAAA,IAAA,GAAAL,IAAA,EAAAK,IAAA;MAAAF,IAAA,CAAAE,IAAA,IAAAJ,SAAA,CAAAI,IAAA;IAAA;IAAAP,KAAA,GAAAQ,UAAA,OAAAV,UAAA,KAAAW,MAAA,CAAAJ,IAAA;IAAAK,eAAA,CAAAV,KAAA,wBAmDT,UAACW,EAAiB,EAAEC,OAAgB,EAAK;MAAA,IAAAC,qBAAA,EAAAC,WAAA;MAC5D,CAAAD,qBAAA,IAAAC,WAAA,GAAAd,KAAA,CAAK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AI,EAAJA,IAAI;QACJG,iBAAiB,EAAE,IAAI,CAACA,iBAAiB,CAACX,IAAI,CAAC3C,OAAO,CAAC;QACvDuD,gBAAgB,EAAE,IAAI,CAACA,gBAAgB;QACvCC,kBAAkB,EAAE,IAAI,CAACA,kBAAkB;QAC3CC,YAAY,EAAEd,IAAI,CAAC3C,OAAO,GAAG,IAAI,CAAC0D,oBAAoB,CAACf,IAAI,CAAC5C,EAAE,CAAC,GAAGqC,SAAS;QAC3EuB,YAAY,EAAE,IAAI,CAACC,oBAAoB,CAACjB,IAAI,CAAC5C,EAAE,CAAC;QAChD8D,KAAK,EAAE;UAAEC,YAAY,KAAAjE,MAAA,CAAK6C,KAAK,GAAG,CAAC,CAAE;UAAEqB,UAAU,KAAAlE,MAAA,CAAK6C,KAAK,GAAG,CAAC;QAAG,CAAC;QACnEU,QAAQ,EAARA;MAAQ;IAEZ;EAAC;AAAA,EAjD6DpE,SAAS","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"BaseLegend.type.js","names":[],"sources":["../../../../src/component/ChartLegend/BaseLegend.type.ts"],"sourcesContent":["import { BoxProps, FlexProps } from '@semcore/flex-box';\nimport { LegendItem, LegendItemKey, ShapeType } from './LegendItem/LegendItem.type';\nimport { DataStructureHints } from '../../a11y/hints';\nimport type { PatternsConfig } from '../../Pattern';\nimport { 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":""}
1
+ {"version":3,"file":"BaseLegend.type.js","names":[],"sources":["../../../../src/component/ChartLegend/BaseLegend.type.ts"],"sourcesContent":["import type { BoxProps, FlexProps } from '@semcore/flex-box';\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,36 +1,38 @@
1
1
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
2
2
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
3
3
  import _createClass from "@babel/runtime/helpers/createClass";
4
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
5
+ import _isNativeReflectConstruct from "@babel/runtime/helpers/isNativeReflectConstruct";
6
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
4
7
  import _inherits from "@babel/runtime/helpers/inherits";
5
- import _createSuper from "@babel/runtime/helpers/createSuper";
6
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
7
9
  import { sstyled as _sstyled } from "@semcore/core";
8
10
  import { assignProps as _assignProps } from "@semcore/core";
9
- import React from 'react';
11
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
12
+ import Checkbox from '@semcore/checkbox';
10
13
  import { createComponent, sstyled, Root } from '@semcore/core';
14
+ import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
15
+ import Divider from '@semcore/divider';
11
16
  import { Flex } from '@semcore/flex-box';
17
+ import React from 'react';
12
18
  /*!__reshadow-styles__:"./legend-flex.shadow.css"*/
13
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SLegendFlex_ww5w4_gg_._direction_row_ww5w4_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:8px 16px}.___SLegendFlex_ww5w4_gg_._direction_column_ww5w4_gg_{align-items:flex-start;flex-wrap:wrap;gap:8px}", /*__inner_css_end__*/"ww5w4_gg_"),
19
+ var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendFlex_pc68p_gg_._direction_row_pc68p_gg_{align-items:flex-start;align-content:flex-start;flex-wrap:wrap;gap:8px 16px}.___SLegendFlex_pc68p_gg_._direction_column_pc68p_gg_{align-items:flex-start;flex-wrap:wrap;gap:8px}", /*__inner_css_end__*/"pc68p_gg_"),
14
20
  /*__reshadow_css_end__*/
15
21
  {
16
- "__SLegendFlex": "___SLegendFlex_ww5w4_gg_",
17
- "_direction_row": "_direction_row_ww5w4_gg_",
18
- "_direction_column": "_direction_column_ww5w4_gg_"
22
+ "__SLegendFlex": "___SLegendFlex_pc68p_gg_",
23
+ "_direction_row": "_direction_row_pc68p_gg_",
24
+ "_direction_column": "_direction_column_pc68p_gg_"
19
25
  });
20
- import { LegendItemComponent } from '../LegendItem/LegendItem';
21
- import Divider from '@semcore/divider';
22
- import Checkbox from '@semcore/checkbox';
23
- import { BaseLegend } from '../BaseLegend';
24
26
  import { localizedMessages } from '../../../translations/__intergalactic-dynamic-locales';
25
- import i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';
27
+ import { BaseLegend } from '../BaseLegend';
28
+ import { LegendItemComponent } from '../LegendItem/LegendItem';
26
29
  var LegendFlexRoot = /*#__PURE__*/function (_BaseLegend) {
27
- _inherits(LegendFlexRoot, _BaseLegend);
28
- var _super = _createSuper(LegendFlexRoot);
29
30
  function LegendFlexRoot() {
30
31
  _classCallCheck(this, LegendFlexRoot);
31
- return _super.apply(this, arguments);
32
+ return _callSuper(this, LegendFlexRoot, arguments);
32
33
  }
33
- _createClass(LegendFlexRoot, [{
34
+ _inherits(LegendFlexRoot, _BaseLegend);
35
+ return _createClass(LegendFlexRoot, [{
34
36
  key: "renderTrend",
35
37
  value: function renderTrend() {
36
38
  var _ref3 = this.asProps,
@@ -42,7 +44,7 @@ var LegendFlexRoot = /*#__PURE__*/function (_BaseLegend) {
42
44
  return /*#__PURE__*/React.createElement(Checkbox, {
43
45
  checked: trendIsVisible,
44
46
  onChange: onTrendIsVisibleChange,
45
- theme: 'gray-400',
47
+ theme: "gray-400",
46
48
  label: trendLabel !== null && trendLabel !== void 0 ? trendLabel : getI18nText('trend'),
47
49
  size: size
48
50
  });
@@ -73,7 +75,6 @@ var LegendFlexRoot = /*#__PURE__*/function (_BaseLegend) {
73
75
  })), withTrend && this.renderTrend(), suffix ? suffix : null);
74
76
  }
75
77
  }]);
76
- return LegendFlexRoot;
77
78
  }(BaseLegend);
78
79
  _defineProperty(LegendFlexRoot, "displayName", 'LegendFlex');
79
80
  _defineProperty(LegendFlexRoot, "style", style);
@@ -1 +1 @@
1
- {"version":3,"file":"LegendFlex.js","names":["React","createComponent","sstyled","Root","Flex","style","_sstyled","insert","LegendItemComponent","Divider","Checkbox","BaseLegend","localizedMessages","i18nEnhance","LegendFlexRoot","_BaseLegend","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","renderTrend","_ref3","asProps","onTrendIsVisibleChange","trendIsVisible","trendLabel","size","getI18nText","createElement","checked","onChange","theme","label","render","_ref","_ref2","SLegendFlex","_this$asProps","styles","Children","direction","withTrend","suffix","items","orientation","cn","_objectSpread","_assignProps","map","_ref4","id","_defineProperty","children","LegendFlex","LegendItem"],"sources":["../../../../../src/component/ChartLegend/LegendFlex/LegendFlex.tsx"],"sourcesContent":["import React from 'react';\nimport { createComponent, sstyled, Root } from '@semcore/core';\nimport { Flex } from '@semcore/flex-box';\nimport style from './legend-flex.shadow.css';\nimport { LegendFlexType, LegendFlexProps, TrendProps } from './LegendFlex.type';\nimport { LegendItemComponent } from '../LegendItem/LegendItem';\nimport Divider from '@semcore/divider';\nimport Checkbox from '@semcore/checkbox';\nimport { BaseLegend } from '../BaseLegend';\nimport { localizedMessages } from '../../../translations/__intergalactic-dynamic-locales';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\n\nclass LegendFlexRoot extends BaseLegend<LegendFlexProps> {\n static displayName = 'LegendFlex';\n static style = style;\n\n static enhance = [i18nEnhance(localizedMessages)];\n\n static defaultProps = () => ({\n direction: 'row',\n children: <LegendFlex.LegendItem />,\n });\n\n renderTrend() {\n const { onTrendIsVisibleChange, trendIsVisible, trendLabel, size, getI18nText } = this\n .asProps as TrendProps & LegendFlexProps & { getI18nText: (s: string) => string };\n\n return (\n <Checkbox\n checked={trendIsVisible}\n onChange={onTrendIsVisibleChange}\n theme={'gray-400'}\n label={trendLabel ?? getI18nText('trend')}\n size={size}\n />\n );\n }\n\n render() {\n const SLegendFlex = Root;\n const { styles, Children, direction, withTrend, suffix, items } = this.asProps;\n const orientation = direction === 'row' ? 'vertical' : 'horizontal';\n\n return sstyled(styles)(\n <SLegendFlex render={Flex} role={'group'}>\n {items.map(({ id }) => {\n return <Children key={id} />;\n })}\n {(withTrend || suffix) && <Divider orientation={orientation} />}\n {withTrend && this.renderTrend()}\n {suffix ? suffix : null}\n </SLegendFlex>,\n );\n }\n}\n\nexport const LegendFlex: LegendFlexType = createComponent(LegendFlexRoot, {\n LegendItem: LegendItemComponent,\n});\n"],"mappings":";;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,eAAe,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AAC9D,SAASC,IAAI,QAAQ,mBAAmB;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;AAAA;AAGzC,SAASC,mBAAmB,QAAQ,0BAA0B;AAC9D,OAAOC,OAAO,MAAM,kBAAkB;AACtC,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,iBAAiB,QAAQ,uDAAuD;AACzF,OAAOC,WAAW,MAAM,8CAA8C;AAAC,IAEjEC,cAAc,0BAAAC,WAAA;EAAAC,SAAA,CAAAF,cAAA,EAAAC,WAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ,cAAA;EAAA,SAAAA,eAAA;IAAAK,eAAA,OAAAL,cAAA;IAAA,OAAAG,MAAA,CAAAG,KAAA,OAAAC,SAAA;EAAA;EAAAC,YAAA,CAAAR,cAAA;IAAAS,GAAA;IAAAC,KAAA,EAWlB,SAAAC,YAAA,EAAc;MACZ,IAAAC,KAAA,GAAkF,IAAI,CACnFC,OAAO;QADFC,sBAAsB,GAAAF,KAAA,CAAtBE,sBAAsB;QAAEC,cAAc,GAAAH,KAAA,CAAdG,cAAc;QAAEC,UAAU,GAAAJ,KAAA,CAAVI,UAAU;QAAEC,IAAI,GAAAL,KAAA,CAAJK,IAAI;QAAEC,WAAW,GAAAN,KAAA,CAAXM,WAAW;MAG7E,oBACEhC,KAAA,CAAAiC,aAAA,CAACvB,QAAQ;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ACrB,WAAW,EAAE,EAC/BsB,MAAM,GAAGA,MAAM,GAAG,IAAI,CACX;IAElB;EAAC;EAAA,OAAAjC,cAAA;AAAA,EAzC0BH,UAAU;AAAA6C,eAAA,CAAjC1C,cAAc,iBACG,YAAY;AAAA0C,eAAA,CAD7B1C,cAAc,WAEHT,KAAK;AAAAmD,eAAA,CAFhB1C,cAAc,aAID,CAACD,WAAW,CAACD,iBAAiB,CAAC,CAAC;AAAA4C,eAAA,CAJ7C1C,cAAc,kBAMI;EAAA,OAAO;IAC3B+B,SAAS,EAAE,KAAK;IAChBY,QAAQ,eAAEzD,KAAA,CAAAiC,aAAA,CAACyB,UAAU,CAACC,UAAU;EAClC,CAAC;AAAA,CAAC;AAmCJ,OAAO,IAAMD,UAA0B,GAAGzD,eAAe,CAACa,cAAc,EAAE;EACxE6C,UAAU,EAAEnD;AACd,CAAC,CAAC"}
1
+ {"version":3,"file":"LegendFlex.js","names":["Checkbox","createComponent","sstyled","Root","i18nEnhance","Divider","Flex","React","style","_sstyled","insert","localizedMessages","BaseLegend","LegendItemComponent","LegendFlexRoot","_BaseLegend","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","renderTrend","_ref3","asProps","onTrendIsVisibleChange","trendIsVisible","trendLabel","size","getI18nText","createElement","checked","onChange","theme","label","render","_ref","_ref2","SLegendFlex","_this$asProps","styles","Children","direction","withTrend","suffix","items","orientation","cn","_objectSpread","_assignProps","map","_ref4","id","_defineProperty","children","LegendFlex","LegendItem"],"sources":["../../../../../src/component/ChartLegend/LegendFlex/LegendFlex.tsx"],"sourcesContent":["import Checkbox from '@semcore/checkbox';\nimport { createComponent, sstyled, Root } from '@semcore/core';\nimport i18nEnhance from '@semcore/core/lib/utils/enhances/i18nEnhance';\nimport Divider from '@semcore/divider';\nimport { Flex } from '@semcore/flex-box';\nimport React from 'react';\n\nimport style from './legend-flex.shadow.css';\nimport type { LegendFlexType, LegendFlexProps, TrendProps } from './LegendFlex.type';\nimport { localizedMessages } from '../../../translations/__intergalactic-dynamic-locales';\nimport { BaseLegend } from '../BaseLegend';\nimport { LegendItemComponent } from '../LegendItem/LegendItem';\n\nclass LegendFlexRoot extends BaseLegend<LegendFlexProps> {\n static displayName = 'LegendFlex';\n static style = style;\n\n static enhance = [i18nEnhance(localizedMessages)];\n\n static defaultProps = () => ({\n direction: 'row',\n children: <LegendFlex.LegendItem />,\n });\n\n renderTrend() {\n const { onTrendIsVisibleChange, trendIsVisible, trendLabel, size, getI18nText } = this\n .asProps as TrendProps & LegendFlexProps & { getI18nText: (s: string) => string };\n\n return (\n <Checkbox\n checked={trendIsVisible}\n onChange={onTrendIsVisibleChange}\n theme='gray-400'\n label={trendLabel ?? getI18nText('trend')}\n size={size}\n />\n );\n }\n\n render() {\n const SLegendFlex = Root;\n const { styles, Children, direction, withTrend, suffix, items } = this.asProps;\n const orientation = direction === 'row' ? 'vertical' : 'horizontal';\n\n return sstyled(styles)(\n <SLegendFlex render={Flex} role='group'>\n {items.map(({ id }) => {\n return <Children key={id} />;\n })}\n {(withTrend || suffix) && <Divider orientation={orientation} />}\n {withTrend && this.renderTrend()}\n {suffix ? suffix : null}\n </SLegendFlex>,\n );\n }\n}\n\nexport const LegendFlex: LegendFlexType = createComponent(LegendFlexRoot, {\n LegendItem: LegendItemComponent,\n});\n"],"mappings":";;;;;;;;;;;AAAA,OAAOA,QAAQ,MAAM,mBAAmB;AACxC,SAASC,eAAe,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AAC9D,OAAOC,WAAW,MAAM,8CAA8C;AACtE,OAAOC,OAAO,MAAM,kBAAkB;AACtC,SAASC,IAAI,QAAQ,mBAAmB;AACxC,OAAOC,KAAK,MAAM,OAAO;AAAC;AAAA,IAAAC,KAAA,8BAAAC,QAAA,CAAAC,MAAA;AAAA;AAAA;EAAA;EAAA;EAAA;AAAA;AAI1B,SAASC,iBAAiB,QAAQ,uDAAuD;AACzF,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,mBAAmB,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egend/LegendFlex/LegendFlex.type.ts"],"sourcesContent":["import { Flex, FlexProps } from '@semcore/flex-box';\nimport { Intergalactic } from '@semcore/core';\nimport { LegendItemType } from '../LegendItem/LegendItem.type';\nimport { LegendProps } from '../BaseLegend.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 LegendFlexType = Intergalactic.Component<typeof Flex, LegendFlexProps> & {\n LegendItem: LegendItemType;\n};\n"],"mappings":""}
1
+ {"version":3,"file":"LegendFlex.type.js","names":[],"sources":["../../../../../src/component/ChartLegend/LegendFlex/LegendFlex.type.ts"],"sourcesContent":["import type { Intergalactic } from '@semcore/core';\nimport type { Flex, FlexProps } from '@semcore/flex-box';\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 LegendFlexType = Intergalactic.Component<typeof Flex, LegendFlexProps> & {\n LegendItem: LegendItemType;\n};\n"],"mappings":"","ignoreList":[]}
@@ -2,8 +2,10 @@ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProper
2
2
  import _objectSpread from "@babel/runtime/helpers/objectSpread2";
3
3
  import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime/helpers/createClass";
5
+ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
+ import _isNativeReflectConstruct from "@babel/runtime/helpers/isNativeReflectConstruct";
7
+ import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
5
8
  import _inherits from "@babel/runtime/helpers/inherits";
6
- import _createSuper from "@babel/runtime/helpers/createSuper";
7
9
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
8
10
  import { sstyled as _sstyled } from "@semcore/core";
9
11
  import { assignProps as _assignProps6 } from "@semcore/core";
@@ -13,46 +15,46 @@ import { assignProps as _assignProps3 } from "@semcore/core";
13
15
  import { assignProps as _assignProps2 } from "@semcore/core";
14
16
  import { assignProps as _assignProps } from "@semcore/core";
15
17
  var _excluded = ["id", "checked", "color", "onChangeLegendItem", "shape"];
16
- import React from 'react';
18
+ function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
19
+ import Checkbox from '@semcore/checkbox';
17
20
  import { createComponent, Component, sstyled, Root } from '@semcore/core';
21
+ import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
22
+ import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
18
23
  import { Flex, Box } from '@semcore/flex-box';
19
- import Checkbox from '@semcore/checkbox';
20
24
  import { Text as TypographyText } from '@semcore/typography';
25
+ import React from 'react';
21
26
  /*!__reshadow-styles__:"./legend-item.shadow.css"*/
22
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SLegendItem_11zva_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_11zva_gg_:hover{cursor:pointer}.___SLegendItem_11zva_gg_.__disabled_11zva_gg_:hover{cursor:default}}.___SPointShape_11zva_gg_.__color_11zva_gg_{background-color:var(--color_11zva);margin-right:8px;flex-shrink:0}.___SPointShape_11zva_gg_._shape_Circle_11zva_gg_._size_l_11zva_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_11zva_gg_._shape_Circle_11zva_gg_._size_m_11zva_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_11zva_gg_._shape_Line_11zva_gg_._size_l_11zva_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_11zva_gg_._shape_Line_11zva_gg_._size_m_11zva_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_11zva_gg_._shape_Square_11zva_gg_._size_l_11zva_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_11zva_gg_._shape_Square_11zva_gg_._size_m_11zva_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_11zva_gg_._shape_Pattern_11zva_gg_{background-color:transparent;margin-right:4px}.___SIcon_11zva_gg_{line-height:0;margin-right:4px}.___SIcon_11zva_gg_._size_l_11zva_gg_{margin-top:4px}.___SIcon_11zva_gg_._size_m_11zva_gg_{margin-top:2px}.___SLabel_11zva_gg_{min-width:0}.___SAdditionalLabel_11zva_gg_._size_l_11zva_gg_,.___SCount_11zva_gg_._size_l_11zva_gg_,.___SLabel_11zva_gg_._size_l_11zva_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SAdditionalLabel_11zva_gg_._size_m_11zva_gg_,.___SCount_11zva_gg_._size_m_11zva_gg_,.___SLabel_11zva_gg_._size_m_11zva_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SAdditionalLabel_11zva_gg_,.___SCount_11zva_gg_{margin-left:4px}.___SAdditionalLabel_11zva_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_11zva_gg_::before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary, #6c6e79);height:4px;width:4px;border-radius:2px;margin-right:4px}.___SAdditionalLabel_11zva_gg_._size_l_11zva_gg_::before{margin-top:10px}.___SAdditionalLabel_11zva_gg_._size_m_11zva_gg_::before{margin-top:8px}.___SPatternSymbol_11zva_gg_{transform:scale(.8)}", /*__inner_css_end__*/"11zva_gg_"),
27
+ var style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SLegendItem_1feua_gg_{min-width:0;align-items:flex-start}@media (hover:hover){.___SLegendItem_1feua_gg_:hover{cursor:pointer}.___SLegendItem_1feua_gg_.__disabled_1feua_gg_:hover{cursor:default}}.___SPointShape_1feua_gg_.__color_1feua_gg_{background-color:var(--color_1feua);margin-right:8px;flex-shrink:0}.___SPointShape_1feua_gg_._shape_Circle_1feua_gg_._size_l_1feua_gg_{width:16px;height:16px;border-radius:8px;margin-top:4px}.___SPointShape_1feua_gg_._shape_Circle_1feua_gg_._size_m_1feua_gg_{width:12px;height:12px;border-radius:6px;margin-top:4px}.___SPointShape_1feua_gg_._shape_Line_1feua_gg_._size_l_1feua_gg_{width:16px;height:4px;border-radius:3px;margin-top:9px}.___SPointShape_1feua_gg_._shape_Line_1feua_gg_._size_m_1feua_gg_{width:12px;height:4px;border-radius:3px;margin-top:8px}.___SPointShape_1feua_gg_._shape_Square_1feua_gg_._size_l_1feua_gg_{width:16px;height:16px;border-radius:2px;margin-top:4px}.___SPointShape_1feua_gg_._shape_Square_1feua_gg_._size_m_1feua_gg_{width:12px;height:12px;border-radius:2px;margin-top:4px}.___SPointShape_1feua_gg_._shape_Pattern_1feua_gg_{background-color:transparent;margin-right:4px}.___SIcon_1feua_gg_{line-height:0;margin-right:4px}.___SIcon_1feua_gg_._size_l_1feua_gg_{margin-top:4px}.___SIcon_1feua_gg_._size_m_1feua_gg_{margin-top:2px}.___SLabel_1feua_gg_{min-width:0}.___SAdditionalLabel_1feua_gg_._size_l_1feua_gg_,.___SCount_1feua_gg_._size_l_1feua_gg_,.___SLabel_1feua_gg_._size_l_1feua_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%)}.___SAdditionalLabel_1feua_gg_._size_m_1feua_gg_,.___SCount_1feua_gg_._size_m_1feua_gg_,.___SLabel_1feua_gg_._size_m_1feua_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%)}.___SAdditionalLabel_1feua_gg_,.___SCount_1feua_gg_{margin-left:4px}.___SAdditionalLabel_1feua_gg_{white-space:nowrap;display:flex;align-items:flex-start}.___SAdditionalLabel_1feua_gg_::before{content:\"\";display:inline-block;background-color:var(--intergalactic-text-secondary, #6c6e79);height:4px;width:4px;border-radius:2px;margin-right:4px}.___SAdditionalLabel_1feua_gg_._size_l_1feua_gg_::before{margin-top:10px}.___SAdditionalLabel_1feua_gg_._size_m_1feua_gg_::before{margin-top:8px}.___SPatternSymbol_1feua_gg_{transform:scale(.8)}", /*__inner_css_end__*/"1feua_gg_"),
23
28
  /*__reshadow_css_end__*/
24
29
  {
25
- "__SLegendItem": "___SLegendItem_11zva_gg_",
26
- "_disabled": "__disabled_11zva_gg_",
27
- "__SPointShape": "___SPointShape_11zva_gg_",
28
- "_color": "__color_11zva_gg_",
29
- "--color": "--color_11zva",
30
- "_shape_Circle": "_shape_Circle_11zva_gg_",
31
- "_size_l": "_size_l_11zva_gg_",
32
- "_size_m": "_size_m_11zva_gg_",
33
- "_shape_Line": "_shape_Line_11zva_gg_",
34
- "_shape_Square": "_shape_Square_11zva_gg_",
35
- "_shape_Pattern": "_shape_Pattern_11zva_gg_",
36
- "__SIcon": "___SIcon_11zva_gg_",
37
- "__SLabel": "___SLabel_11zva_gg_",
38
- "__SAdditionalLabel": "___SAdditionalLabel_11zva_gg_",
39
- "__SCount": "___SCount_11zva_gg_",
40
- "__SPatternSymbol": "___SPatternSymbol_11zva_gg_"
30
+ "__SLegendItem": "___SLegendItem_1feua_gg_",
31
+ "_disabled": "__disabled_1feua_gg_",
32
+ "__SPointShape": "___SPointShape_1feua_gg_",
33
+ "_color": "__color_1feua_gg_",
34
+ "--color": "--color_1feua",
35
+ "_shape_Circle": "_shape_Circle_1feua_gg_",
36
+ "_size_l": "_size_l_1feua_gg_",
37
+ "_size_m": "_size_m_1feua_gg_",
38
+ "_shape_Line": "_shape_Line_1feua_gg_",
39
+ "_shape_Square": "_shape_Square_1feua_gg_",
40
+ "_shape_Pattern": "_shape_Pattern_1feua_gg_",
41
+ "__SIcon": "___SIcon_1feua_gg_",
42
+ "__SLabel": "___SLabel_1feua_gg_",
43
+ "__SAdditionalLabel": "___SAdditionalLabel_1feua_gg_",
44
+ "__SCount": "___SCount_1feua_gg_",
45
+ "__SPatternSymbol": "___SPatternSymbol_1feua_gg_"
41
46
  });
42
47
  import { StaticShapes } from './LegendItem.type';
43
- import resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';
44
- import uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';
45
48
  import { PatternSymbol } from '../../../Pattern';
46
49
  import { getChartDefaultColorName } from '../../../utils';
47
50
  var enhance = [resolveColorEnhance(), uniqueIDEnhancement()];
48
51
  var LegendItemRoot = /*#__PURE__*/function (_Component) {
49
- _inherits(LegendItemRoot, _Component);
50
- var _super = _createSuper(LegendItemRoot);
51
52
  function LegendItemRoot() {
52
53
  _classCallCheck(this, LegendItemRoot);
53
- return _super.apply(this, arguments);
54
+ return _callSuper(this, LegendItemRoot, arguments);
54
55
  }
55
- _createClass(LegendItemRoot, [{
56
+ _inherits(LegendItemRoot, _Component);
57
+ return _createClass(LegendItemRoot, [{
56
58
  key: "getUniqueID",
57
59
  value: function getUniqueID() {
58
60
  var uid = this.asProps.uid;
@@ -70,18 +72,26 @@ var LegendItemRoot = /*#__PURE__*/function (_Component) {
70
72
  size = _this$asProps.size,
71
73
  resolveColor = _this$asProps.resolveColor,
72
74
  patterns = _this$asProps.patterns,
73
- onChangeLegendItem = _this$asProps.onChangeLegendItem;
75
+ onChangeLegendItem = _this$asProps.onChangeLegendItem,
76
+ onFocusLegendItem = _this$asProps.onFocusLegendItem,
77
+ onBlurLegendItem = _this$asProps.onBlurLegendItem;
74
78
  return {
75
79
  label: label,
76
80
  shape: shape,
77
81
  checked: checked,
78
- color: resolveColor(color),
79
- patternKey: color,
82
+ 'color': resolveColor(color),
83
+ 'patternKey': color,
80
84
  patterns: patterns,
81
85
  size: size,
82
- onChange: function onChange(value) {
86
+ 'onChange': function onChange(value) {
83
87
  onChangeLegendItem(id, value);
84
88
  },
89
+ 'onFocus': function onFocus() {
90
+ return onFocusLegendItem(id);
91
+ },
92
+ 'onBlur': function onBlur() {
93
+ return onBlurLegendItem(id);
94
+ },
85
95
  'aria-labelledby': shape === 'Checkbox' ? this.getUniqueID() : null
86
96
  };
87
97
  }
@@ -99,9 +109,9 @@ var LegendItemRoot = /*#__PURE__*/function (_Component) {
99
109
  var _this$asProps2 = this.asProps,
100
110
  id = _this$asProps2.id,
101
111
  checked = _this$asProps2.checked,
102
- color = _this$asProps2.color,
112
+ _color = _this$asProps2.color,
103
113
  onChangeLegendItem = _this$asProps2.onChangeLegendItem,
104
- shape = _this$asProps2.shape,
114
+ _shape = _this$asProps2.shape,
105
115
  props = _objectWithoutProperties(_this$asProps2, _excluded);
106
116
  return _objectSpread(_objectSpread({}, props), {}, {
107
117
  id: this.getUniqueID(),
@@ -149,7 +159,6 @@ var LegendItemRoot = /*#__PURE__*/function (_Component) {
149
159
  }, _ref))), /*#__PURE__*/React.createElement(Children, _ref7.cn("Children", {})));
150
160
  }
151
161
  }]);
152
- return LegendItemRoot;
153
162
  }(Component);
154
163
  _defineProperty(LegendItemRoot, "displayName", 'LegendItem');
155
164
  _defineProperty(LegendItemRoot, "style", style);
@@ -161,7 +170,7 @@ _defineProperty(LegendItemRoot, "defaultProps", function () {
161
170
  });
162
171
  function Shape(props) {
163
172
  var _ref2 = arguments[0],
164
- _ref10;
173
+ _ref0;
165
174
  var SPointShape = Box;
166
175
  var SPatternSymbol = PatternSymbol;
167
176
  var styles = props.styles,
@@ -174,7 +183,9 @@ function Shape(props) {
174
183
  Children = props.Children,
175
184
  hasChildren = props.children,
176
185
  patterns = props.patterns,
177
- onChange = props.onChange;
186
+ onChange = props.onChange,
187
+ onFocus = props.onFocus,
188
+ onBlur = props.onBlur;
178
189
  if (hasChildren) {
179
190
  return /*#__PURE__*/React.createElement(Children, null);
180
191
  }
@@ -195,6 +206,8 @@ function Shape(props) {
195
206
  "checked": checked,
196
207
  "theme": checked ? color : undefined,
197
208
  "onChange": onChange,
209
+ "onFocus": onFocus,
210
+ "onBlur": onBlur,
198
211
  "aria-labelledby": props['aria-labelledby']
199
212
  })), patterns && /*#__PURE__*/React.createElement(Box, _ref9.cn("Box", {
200
213
  "mt": '2px',
@@ -205,66 +218,66 @@ function Shape(props) {
205
218
  "aria-hidden": true
206
219
  }))));
207
220
  }
208
- return _ref10 = sstyled(styles), /*#__PURE__*/React.createElement(SPointShape, _ref10.cn("SPointShape", _objectSpread({}, _assignProps2({}, _ref2))), /*#__PURE__*/React.createElement(Children, _ref10.cn("Children", {})));
221
+ return _ref0 = sstyled(styles), /*#__PURE__*/React.createElement(SPointShape, _ref0.cn("SPointShape", _objectSpread({}, _assignProps2({}, _ref2))), /*#__PURE__*/React.createElement(Children, _ref0.cn("Children", {})));
209
222
  }
210
- function Icon(_ref15) {
223
+ function Icon(_ref13) {
211
224
  var _ref3 = arguments[0],
212
- _ref11;
213
- var styles = _ref15.styles,
214
- hasChildren = _ref15.children,
215
- Children = _ref15.Children;
225
+ _ref1;
226
+ var styles = _ref13.styles,
227
+ hasChildren = _ref13.children,
228
+ Children = _ref13.Children;
216
229
  var SIcon = Box;
217
230
  if (!hasChildren) {
218
231
  return null;
219
232
  }
220
- return _ref11 = sstyled(styles), /*#__PURE__*/React.createElement(SIcon, _ref11.cn("SIcon", _objectSpread({}, _assignProps3({
233
+ return _ref1 = sstyled(styles), /*#__PURE__*/React.createElement(SIcon, _ref1.cn("SIcon", _objectSpread({}, _assignProps3({
221
234
  "tag": 'span'
222
- }, _ref3))), /*#__PURE__*/React.createElement(Children, _ref11.cn("Children", {})));
235
+ }, _ref3))), /*#__PURE__*/React.createElement(Children, _ref1.cn("Children", {})));
223
236
  }
224
237
  Icon.displayName = 'Icon';
225
- function Label(_ref16) {
238
+ function Label(_ref14) {
226
239
  var _ref4 = arguments[0],
227
- _ref12;
228
- var styles = _ref16.styles,
229
- hasChildren = _ref16.children,
230
- Children = _ref16.Children;
240
+ _ref10;
241
+ var styles = _ref14.styles,
242
+ hasChildren = _ref14.children,
243
+ Children = _ref14.Children;
231
244
  var SLabel = TypographyText;
232
245
  if (!hasChildren) {
233
246
  return null;
234
247
  }
235
- return _ref12 = sstyled(styles), /*#__PURE__*/React.createElement(SLabel, _ref12.cn("SLabel", _objectSpread({}, _assignProps4({
248
+ return _ref10 = sstyled(styles), /*#__PURE__*/React.createElement(SLabel, _ref10.cn("SLabel", _objectSpread({}, _assignProps4({
236
249
  "use": 'primary'
237
- }, _ref4))), /*#__PURE__*/React.createElement(Children, _ref12.cn("Children", {})));
250
+ }, _ref4))), /*#__PURE__*/React.createElement(Children, _ref10.cn("Children", {})));
238
251
  }
239
252
  Label.displayName = 'Label';
240
- function AdditionalLabel(_ref17) {
253
+ function AdditionalLabel(_ref15) {
241
254
  var _ref5 = arguments[0],
242
- _ref13;
243
- var styles = _ref17.styles,
244
- hasChildren = _ref17.children,
245
- Children = _ref17.Children;
255
+ _ref11;
256
+ var styles = _ref15.styles,
257
+ hasChildren = _ref15.children,
258
+ Children = _ref15.Children;
246
259
  var SAdditionalLabel = TypographyText;
247
260
  if (!hasChildren) {
248
261
  return null;
249
262
  }
250
- return _ref13 = sstyled(styles), /*#__PURE__*/React.createElement(SAdditionalLabel, _ref13.cn("SAdditionalLabel", _objectSpread({}, _assignProps5({
263
+ return _ref11 = sstyled(styles), /*#__PURE__*/React.createElement(SAdditionalLabel, _ref11.cn("SAdditionalLabel", _objectSpread({}, _assignProps5({
251
264
  "use": 'secondary'
252
- }, _ref5))), /*#__PURE__*/React.createElement(Children, _ref13.cn("Children", {})));
265
+ }, _ref5))), /*#__PURE__*/React.createElement(Children, _ref11.cn("Children", {})));
253
266
  }
254
267
  AdditionalLabel.displayName = 'AdditionalLabel';
255
- function Count(_ref18) {
268
+ function Count(_ref16) {
256
269
  var _ref6 = arguments[0],
257
- _ref14;
258
- var styles = _ref18.styles,
259
- hasChildren = _ref18.children,
260
- Children = _ref18.Children;
270
+ _ref12;
271
+ var styles = _ref16.styles,
272
+ hasChildren = _ref16.children,
273
+ Children = _ref16.Children;
261
274
  var SCount = TypographyText;
262
275
  if (!hasChildren) {
263
276
  return null;
264
277
  }
265
- return _ref14 = sstyled(styles), /*#__PURE__*/React.createElement(SCount, _ref14.cn("SCount", _objectSpread({}, _assignProps6({
278
+ return _ref12 = sstyled(styles), /*#__PURE__*/React.createElement(SCount, _ref12.cn("SCount", _objectSpread({}, _assignProps6({
266
279
  "use": 'secondary'
267
- }, _ref6))), /*#__PURE__*/React.createElement(Children, _ref14.cn("Children", {})));
280
+ }, _ref6))), /*#__PURE__*/React.createElement(Children, _ref12.cn("Children", {})));
268
281
  }
269
282
  Count.displayName = 'Count';
270
283
  export var LegendItemComponent = createComponent(LegendItemRoot, {
@@ -1 +1 @@
1
- {"version":3,"file":"LegendItem.js","names":["React","createComponent","Component","sstyled","Root","Flex","Box","Checkbox","Text","TypographyText","style","_sstyled","insert","StaticShapes","resolveColorEnhance","uniqueIDEnhancement","PatternSymbol","getChartDefaultColorName","enhance","LegendItemRoot","_Component","_inherits","_super","_createSuper","_classCallCheck","apply","arguments","_createClass","key","value","getUniqueID","uid","asProps","concat","getShapeProps","_this$asProps","checked","color","shape","label","id","size","resolveColor","patterns","onChangeLegendItem","patternKey","onChange","getIconProps","props","_objectSpread","children","icon","getLabelProps","_this$asProps2","_objectWithoutProperties","_excluded","onClick","getAdditionalLabelProps","additionalInfo","undefined","getCountProps","count","render","_ref","_ref7","SLegendItem","_this$asProps3","styles","Children","disabled","includes","createElement","cn","_assignProps","_defineProperty","Fragment","LegendItemComponent","Shape","Icon","Label","AdditionalLabel","Count","_ref2","arguments[0]","_ref10","SPointShape","SPatternSymbol","_props$patternKey","hasChildren","_ref8","_ref9","_assignProps2","_ref15","_ref3","_ref11","SIcon","_assignProps3","displayName","_ref16","_ref4","_ref12","SLabel","_assignProps4","_ref17","_ref5","_ref13","SAdditionalLabel","_assignProps5","_ref18","_ref6","_ref14","SCount","_assignProps6"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.tsx"],"sourcesContent":["import React, { DOMAttributes } from 'react';\nimport { createComponent, Component, sstyled, Root, IRootComponentProps } from '@semcore/core';\nimport { Flex, Box } from '@semcore/flex-box';\nimport Checkbox from '@semcore/checkbox';\nimport { Text as TypographyText } from '@semcore/typography';\n\nimport style from './legend-item.shadow.css';\nimport {\n ShapeProps,\n LegendItemProps,\n LegendItemType,\n LegendItem,\n StaticShapes,\n} from './LegendItem.type';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport { PatternSymbol } from '../../../Pattern';\nimport { getChartDefaultColorName } from '../../../utils';\n\nconst enhance = [resolveColorEnhance(), uniqueIDEnhancement()] as const;\nclass LegendItemRoot extends Component<LegendItemProps, {}, {}, typeof enhance> {\n static displayName = 'LegendItem';\n static style = style;\n\n static enhance = enhance;\n\n static defaultProps = () => ({\n children: (\n <>\n <LegendItemComponent.Shape />\n <LegendItemComponent.Icon />\n <LegendItemComponent.Label />\n <LegendItemComponent.AdditionalLabel />\n <LegendItemComponent.Count />\n </>\n ),\n });\n\n getUniqueID() {\n const { uid } = this.asProps;\n return `chart-legend-item-${uid}`;\n }\n\n getShapeProps() {\n const { checked, color, shape, label, id, size, resolveColor, patterns, onChangeLegendItem } =\n this.asProps;\n return {\n label,\n shape,\n checked,\n color: resolveColor(color),\n patternKey: color,\n patterns,\n size,\n onChange: (value: boolean) => {\n onChangeLegendItem(id, value);\n },\n 'aria-labelledby': shape === 'Checkbox' ? this.getUniqueID() : null,\n };\n }\n\n getIconProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n return {\n ...props,\n children: props.icon,\n };\n }\n\n getLabelProps(): Omit<LegendItem, 'color'> & IRootComponentProps & { onClick: () => void } {\n const { id, checked, color, onChangeLegendItem, shape, ...props } = this.asProps;\n\n return {\n ...props,\n id: this.getUniqueID(),\n checked,\n onClick: () => onChangeLegendItem(id, !checked),\n children: props.label,\n };\n }\n\n getAdditionalLabelProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children: additionalInfo && 'label' in additionalInfo ? `${additionalInfo.label}` : undefined,\n };\n }\n\n getCountProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children:\n additionalInfo && 'count' in additionalInfo ? `(${additionalInfo.count})` : undefined,\n };\n }\n\n render() {\n const SLegendItem = Root;\n const { styles, Children, shape } = this.asProps;\n\n // @ts-ignore\n const disabled = StaticShapes.includes(shape);\n\n return sstyled(styles)(\n <SLegendItem render={Flex} disabled={disabled} __excludeProps={['id']}>\n <Children />\n </SLegendItem>,\n );\n }\n}\n\nfunction Shape(props: IRootComponentProps & ShapeProps & DOMAttributes<HTMLLabelElement>) {\n const SPointShape = Root;\n const SPatternSymbol = PatternSymbol;\n const {\n styles,\n size,\n shape,\n checked,\n color,\n patternKey = getChartDefaultColorName(0),\n Children,\n children: hasChildren,\n patterns,\n onChange,\n } = props;\n\n if (hasChildren) {\n return <Children />;\n }\n\n if (shape === 'Pattern') {\n return sstyled(styles)(\n <Box mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} aria-hidden />\n </Box>,\n );\n }\n\n if (shape === 'Checkbox') {\n return sstyled(styles)(\n <>\n <Checkbox\n size={size}\n checked={checked}\n theme={checked ? color : undefined}\n onChange={onChange}\n aria-labelledby={props['aria-labelledby']}\n />\n {patterns && (\n <Box mt={'2px'} mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} aria-hidden />\n </Box>\n )}\n </>,\n );\n }\n\n return sstyled(styles)(\n <SPointShape render={Box}>\n <Children />\n </SPointShape>,\n );\n}\n\nfunction Icon({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SIcon = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SIcon render={Box} tag={'span'}>\n <Children />\n </SIcon>,\n );\n}\nIcon.displayName = 'Icon';\n\nfunction Label({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SLabel render={TypographyText} use={'primary'}>\n <Children />\n </SLabel>,\n );\n}\nLabel.displayName = 'Label';\n\nfunction AdditionalLabel({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SAdditionalLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SAdditionalLabel render={TypographyText} use={'secondary'}>\n <Children />\n </SAdditionalLabel>,\n );\n}\nAdditionalLabel.displayName = 'AdditionalLabel';\n\nfunction Count({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SCount = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SCount render={TypographyText} use={'secondary'}>\n <Children />\n </SCount>,\n );\n}\nCount.displayName = 'Count';\n\nexport const LegendItemComponent: LegendItemType = createComponent(LegendItemRoot, {\n Shape,\n Icon,\n Label,\n AdditionalLabel,\n Count,\n});\n"],"mappings":";;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAyB,OAAO;AAC5C,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,I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IAAhE3C,MAAM,GAAAyC,MAAA,CAANzC,MAAM;IAAYqB,WAAW,GAAAoB,MAAA,CAArB1D,QAAQ;IAAekB,QAAQ,GAAAwC,MAAA,CAARxC,QAAQ;EACtD,IAAM2C,MAAM,GAOMtG,cAAc;EALhC,IAAI,CAAC+E,WAAW,EAAE;IAChB,OAAO,IAAI;EACb;EAEA,OAAAsB,MAAA,GAAO3G,OAAO,CAACgE,MAAM,CAAC,eACpBnE,KAAA,CAAAuE,aAAA,CAACwC,MAAM,EAAAD,MAAA,CAAAtC,EAAA,WAAAvB,aAAA,KAAA+D,aAAA;IAAA,OAA8B;EAAW,GAAAH,KAAA,kBAC9C7G,KAAA,CAAAuE,aAAA,CAACH,QAAQ,EAAA0C,MAAA,CAAAtC,EAAA,iBAAG,CACL;AAEb;AACAS,KAAK,CAACgB,WAAW,GAAG,OAAO;AAE3B,OAAO,IAAMrB,mBAAmC,GAAG3E,eAAe,CAACkB,cAAc,EAAE;EACjF0D,KAAK,EAALA,KAAK;EACLC,IAAI,EAAJA,IAAI;EACJC,KAAK,EAALA,KAAK;EACLC,eAAe,EAAfA,eAAe;EACfC,KAAK,EAALA;AACF,CAAC,CAAC"}
1
+ {"version":3,"file":"LegendItem.js","names":["Checkbox","createComponent","Component","sstyled","Root","resolveColorEnhance","uniqueIDEnhancement","Flex","Box","Text","TypographyText","React","style","_sstyled","insert","StaticShapes","PatternSymbol","getChartDefaultColorName","enhance","LegendItemRoot","_Component","_classCallCheck","_callSuper","arguments","_inherits","_createClass","key","value","getUniqueID","uid","asProps","concat","getShapeProps","_this$asProps","checked","color","shape","label","id","size","resolveColor","patterns","onChangeLegendItem","onFocusLegendItem","onBlurLegendItem","onChange","onFocus","onBlur","getIconProps","props","_objectSpread","children","icon","getLabelProps","_this$asProps2","_color","_shape","_objectWithoutProperties","_excluded","onClick","getAdditionalLabelProps","additionalInfo","undefined","getCountProps","count","render","_ref","_ref7","SLegendItem","_this$asProps3","styles","Children","disabled","includes","createElement","cn","_assignProps","_defineProperty","Fragment","LegendItemComponent","Shape","Icon","Label","AdditionalLabel","Count","_ref2","arguments[0]","_ref0","SPointShape","SPatternSymbol","_props$patternKey","patternKey","hasChildren","_ref8","_ref9","_assignProps2","_ref13","_ref3","_ref1","SIcon","_assignProps3","displayName","_ref14","_ref4","_ref10","SLabel","_assignProps4","_ref15","_ref5","_ref11","SAdditionalLabel","_assignProps5","_ref16","_ref6","_ref12","SCount","_assignProps6"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.tsx"],"sourcesContent":["import Checkbox from '@semcore/checkbox';\nimport { createComponent, Component, sstyled, Root, type IRootComponentProps } from '@semcore/core';\nimport resolveColorEnhance from '@semcore/core/lib/utils/enhances/resolveColorEnhance';\nimport uniqueIDEnhancement from '@semcore/core/lib/utils/uniqueID';\nimport { Flex, Box } from '@semcore/flex-box';\nimport { Text as TypographyText } from '@semcore/typography';\nimport type { DOMAttributes } from 'react';\nimport React from 'react';\n\nimport style from './legend-item.shadow.css';\nimport {\n type ShapeProps,\n type LegendItemProps,\n type LegendItemType,\n type LegendItem,\n StaticShapes,\n} from './LegendItem.type';\nimport { PatternSymbol } from '../../../Pattern';\nimport { getChartDefaultColorName } from '../../../utils';\n\nconst enhance = [resolveColorEnhance(), uniqueIDEnhancement()] as const;\nclass LegendItemRoot extends Component<LegendItemProps, {}, {}, typeof enhance> {\n static displayName = 'LegendItem';\n static style = style;\n\n static enhance = enhance;\n\n static defaultProps = () => ({\n children: (\n <>\n <LegendItemComponent.Shape />\n <LegendItemComponent.Icon />\n <LegendItemComponent.Label />\n <LegendItemComponent.AdditionalLabel />\n <LegendItemComponent.Count />\n </>\n ),\n });\n\n getUniqueID() {\n const { uid } = this.asProps;\n return `chart-legend-item-${uid}`;\n }\n\n getShapeProps() {\n const { checked, color, shape, label, id, size, resolveColor, patterns, onChangeLegendItem, onFocusLegendItem, onBlurLegendItem } =\n this.asProps;\n return {\n label,\n shape,\n checked,\n 'color': resolveColor(color),\n 'patternKey': color,\n patterns,\n size,\n 'onChange': (value: boolean) => {\n onChangeLegendItem(id, value);\n },\n 'onFocus': () => onFocusLegendItem(id),\n 'onBlur': () => onBlurLegendItem(id),\n 'aria-labelledby': shape === 'Checkbox' ? this.getUniqueID() : null,\n };\n }\n\n getIconProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n return {\n ...props,\n children: props.icon,\n };\n }\n\n getLabelProps(): Omit<LegendItem, 'color'> & IRootComponentProps & { onClick: () => void } {\n const { id, checked, color: _color, onChangeLegendItem, shape: _shape, ...props } = this.asProps;\n\n return {\n ...props,\n id: this.getUniqueID(),\n checked,\n onClick: () => onChangeLegendItem(id, !checked),\n children: props.label,\n };\n }\n\n getAdditionalLabelProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children: additionalInfo && 'label' in additionalInfo ? `${additionalInfo.label}` : undefined,\n };\n }\n\n getCountProps(): LegendItem & IRootComponentProps {\n const props = this.asProps;\n\n const { additionalInfo } = props;\n\n return {\n ...props,\n children:\n additionalInfo && 'count' in additionalInfo ? `(${additionalInfo.count})` : undefined,\n };\n }\n\n render() {\n const SLegendItem = Root;\n const { styles, Children, shape } = this.asProps;\n\n // @ts-ignore\n const disabled = StaticShapes.includes(shape);\n\n return sstyled(styles)(\n <SLegendItem render={Flex} disabled={disabled} __excludeProps={['id']}>\n <Children />\n </SLegendItem>,\n );\n }\n}\n\nfunction Shape(props: IRootComponentProps & ShapeProps & DOMAttributes<HTMLLabelElement>) {\n const SPointShape = Root;\n const SPatternSymbol = PatternSymbol;\n const {\n styles,\n size,\n shape,\n checked,\n color,\n patternKey = getChartDefaultColorName(0),\n Children,\n children: hasChildren,\n patterns,\n onChange,\n onFocus,\n onBlur,\n } = props;\n\n if (hasChildren) {\n return <Children />;\n }\n\n if (shape === 'Pattern') {\n return sstyled(styles)(\n <Box mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} aria-hidden />\n </Box>,\n );\n }\n\n if (shape === 'Checkbox') {\n return sstyled(styles)(\n <>\n <Checkbox\n size={size}\n checked={checked}\n theme={checked ? color : undefined}\n onChange={onChange}\n onFocus={onFocus}\n onBlur={onBlur}\n aria-labelledby={props['aria-labelledby']}\n />\n {patterns && (\n <Box mt='2px' mr={1}>\n <SPatternSymbol color={color} patternKey={patternKey} aria-hidden />\n </Box>\n )}\n </>,\n );\n }\n\n return sstyled(styles)(\n <SPointShape render={Box}>\n <Children />\n </SPointShape>,\n );\n}\n\nfunction Icon({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SIcon = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SIcon render={Box} tag='span'>\n <Children />\n </SIcon>,\n );\n}\nIcon.displayName = 'Icon';\n\nfunction Label({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SLabel render={TypographyText} use='primary'>\n <Children />\n </SLabel>,\n );\n}\nLabel.displayName = 'Label';\n\nfunction AdditionalLabel({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SAdditionalLabel = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SAdditionalLabel render={TypographyText} use='secondary'>\n <Children />\n </SAdditionalLabel>,\n );\n}\nAdditionalLabel.displayName = 'AdditionalLabel';\n\nfunction Count({ styles, children: hasChildren, Children }: IRootComponentProps) {\n const SCount = Root;\n\n if (!hasChildren) {\n return null;\n }\n\n return sstyled(styles)(\n <SCount render={TypographyText} use='secondary'>\n <Children />\n </SCount>,\n );\n}\nCount.displayName = 'Count';\n\nexport const LegendItemComponent: LegendItemType = createComponent(LegendItemRoot, {\n Shape,\n Icon,\n Label,\n AdditionalLabel,\n Count,\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,OAAOA,QAAQ,MAAM,mBAAmB;AACxC,SAASC,eAAe,EAAEC,SAAS,EAAEC,OAAO,EAAEC,IAAI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[]}
@@ -1 +1 @@
1
- {"version":3,"file":"LegendItem.type.js","names":["StaticShapes"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.type.ts"],"sourcesContent":["import { Flex } from '@semcore/flex-box';\nimport { Intergalactic, Root } from '@semcore/core';\nimport Icon from '@semcore/icon';\nimport { Text } from '@semcore/typography';\nimport { LSize } from '../BaseLegend.type';\nimport { PatternsConfig } from '../../../Pattern';\n\n/**\n * Key of chart data item\n */\nexport type LegendItemKey = string;\n\nexport type LegendItem = {\n /**\n * One of keys from data set\n */\n id: LegendItemKey;\n /**\n * Label for data item in Legend\n */\n label: string;\n /**\n * Flag for selected data item\n */\n checked: boolean;\n /**\n * Color of data item\n */\n color: string;\n /**\n * Icon before label\n */\n icon?: typeof Icon;\n /**\n * Additional info with sub-label or count\n */\n additionalInfo?: { label: string } | { count: number };\n\n patternKey?: string;\n\n /** Enables patterns symbols that enhances charts accessibility */\n patterns?: PatternsConfig;\n};\n\nexport type LegendItemProps = LegendItem & {\n /**\n * Size for legend item\n */\n size: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape: ShapeType;\n /**\n * Handler for select/deselect legend item.\n * !Need to redefine onClick, because we don't have `event` in it.\n * @deprecated\n */\n onClick?: () => void;\n\n /** Enables patterns symbols that enhances charts accessibility */\n patterns?: PatternsConfig;\n\n /**\n * Handler for select/deselect legend item\n */\n onChangeLegendItem: (id: LegendItemKey, checked: boolean) => void;\n};\n\nexport type ShapeProps = LegendItem &\n (\n | {\n size: LSize;\n shape: Exclude<ShapeType, 'Checkbox'>;\n }\n | {\n size: LSize;\n shape: Extract<ShapeType, 'Checkbox'>;\n onChange: (checked: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n 'aria-labelledby'?: string;\n }\n );\n\nexport const StaticShapes = ['Circle', 'Line', 'Square', 'Pattern'] as const;\n\nexport type ShapeType = 'Checkbox' | typeof StaticShapes[number];\n\nexport type LegendItemType = Intergalactic.Component<typeof Flex, Partial<LegendItemProps>> & {\n Shape: Intergalactic.Component<typeof Root, Partial<ShapeProps>>;\n Icon: Intergalactic.Component<typeof Icon, Partial<LegendItem>>;\n Label: Intergalactic.Component<typeof Text, Partial<Omit<LegendItem, 'theme'>>>;\n AdditionalLabel: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n Count: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n};\n"],"mappings":"AAOA;AACA;AACA;;AA0EA,OAAO,IAAMA,YAAY,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAU"}
1
+ {"version":3,"file":"LegendItem.type.js","names":["StaticShapes"],"sources":["../../../../../src/component/ChartLegend/LegendItem/LegendItem.type.ts"],"sourcesContent":["import type { Intergalactic, Root } from '@semcore/core';\nimport type { Flex } from '@semcore/flex-box';\nimport type Icon from '@semcore/icon';\nimport type { Text } from '@semcore/typography';\n\nimport type { PatternsConfig } from '../../../Pattern';\nimport type { LSize } from '../BaseLegend.type';\n\n/**\n * Key of chart data item\n */\nexport type LegendItemKey = string;\n\nexport type LegendItem = {\n /**\n * One of keys from data set\n */\n id: LegendItemKey;\n /**\n * Label for data item in Legend\n */\n label: string;\n /**\n * Flag for selected data item\n */\n checked: boolean;\n /**\n * Color of data item\n */\n color: string;\n /**\n * Icon before label\n */\n icon?: typeof Icon;\n /**\n * Additional info with sub-label or count\n */\n additionalInfo?: { label: string } | { count: number };\n\n patternKey?: string;\n\n /** Enables patterns symbols that enhances charts accessibility */\n patterns?: PatternsConfig;\n};\n\nexport type LegendItemProps = LegendItem & {\n /**\n * Size for legend item\n */\n size: LSize;\n /**\n * Shape of data item on Legend panel\n */\n shape: ShapeType;\n /**\n * Handler for select/deselect legend item.\n * !Need to redefine onClick, because we don't have `event` in it.\n * @deprecated\n */\n onClick?: () => void;\n\n /** Enables patterns symbols that enhances charts accessibility */\n patterns?: PatternsConfig;\n\n /**\n * Handler for select/deselect legend item\n */\n onChangeLegendItem: (id: LegendItemKey, checked: boolean) => void;\n\n /**\n * Handler for focus legend item\n */\n onFocusLegendItem: (id: LegendItemKey) => void;\n\n /**\n * Handler for focus out legend item\n */\n onBlurLegendItem: (id: LegendItemKey) => void;\n};\n\nexport type ShapeProps = LegendItem &\n (\n | {\n size: LSize;\n shape: Exclude<ShapeType, 'Checkbox'>;\n }\n | {\n 'size': LSize;\n 'shape': Extract<ShapeType, 'Checkbox'>;\n 'onChange': (checked: boolean, e?: React.SyntheticEvent<HTMLInputElement>) => void;\n 'aria-labelledby'?: string;\n }\n );\n\nexport const StaticShapes = ['Circle', 'Line', 'Square', 'Pattern'] as const;\n\nexport type ShapeType = 'Checkbox' | typeof StaticShapes[number];\n\nexport type LegendItemType = Intergalactic.Component<typeof Flex, Partial<LegendItemProps>> & {\n Shape: Intergalactic.Component<typeof Root, Partial<ShapeProps>>;\n Icon: Intergalactic.Component<typeof Icon, Partial<LegendItem>>;\n Label: Intergalactic.Component<typeof Text, Partial<Omit<LegendItem, 'theme'>>>;\n AdditionalLabel: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n Count: Intergalactic.Component<typeof Text, Partial<LegendItem>>;\n};\n"],"mappings":"AAQA;AACA;AACA;;AAoFA,OAAO,IAAMA,YAAY,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAU","ignoreList":[]}