@elliemae/ds-dataviz 3.80.0-next.67 → 3.80.0-next.71

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 (398) hide show
  1. package/dist/cjs/constants/index.js +73 -0
  2. package/dist/cjs/constants/index.js.map +7 -0
  3. package/dist/cjs/graphs/Chart/Chart.js +6 -1
  4. package/dist/cjs/graphs/Chart/Chart.js.map +2 -2
  5. package/dist/cjs/graphs/Chart/ChartContext.js.map +2 -2
  6. package/dist/cjs/graphs/Chart/SingleStackedBar/SingleStackedBar.js +36 -24
  7. package/dist/cjs/graphs/Chart/SingleStackedBar/SingleStackedBar.js.map +3 -3
  8. package/dist/cjs/graphs/Chart/SingleStackedBar/styles.js +12 -5
  9. package/dist/cjs/graphs/Chart/SingleStackedBar/styles.js.map +2 -2
  10. package/dist/cjs/graphs/Chart/config/chartInteractionStore.js +98 -0
  11. package/dist/cjs/graphs/Chart/config/chartInteractionStore.js.map +7 -0
  12. package/dist/cjs/graphs/Chart/config/useChart.js +56 -40
  13. package/dist/cjs/graphs/Chart/config/useChart.js.map +2 -2
  14. package/dist/cjs/graphs/Chart/config/useChartDescription.js +62 -0
  15. package/dist/cjs/graphs/Chart/config/useChartDescription.js.map +7 -0
  16. package/dist/cjs/graphs/Chart/config/useEntranceAnimation.js +141 -0
  17. package/dist/cjs/graphs/Chart/config/useEntranceAnimation.js.map +7 -0
  18. package/dist/cjs/graphs/Chart/config/useGetters.js +10 -0
  19. package/dist/cjs/graphs/Chart/config/useGetters.js.map +2 -2
  20. package/dist/cjs/graphs/Chart/config/useInternalMargins.js +25 -5
  21. package/dist/cjs/graphs/Chart/config/useInternalMargins.js.map +2 -2
  22. package/dist/cjs/graphs/Chart/config/useKeyboardNavigation.js +35 -51
  23. package/dist/cjs/graphs/Chart/config/useKeyboardNavigation.js.map +2 -2
  24. package/dist/cjs/graphs/Chart/config/useScales.js +200 -67
  25. package/dist/cjs/graphs/Chart/config/useScales.js.map +2 -2
  26. package/dist/cjs/graphs/Chart/config/useValidateProps.js +53 -4
  27. package/dist/cjs/graphs/Chart/config/useValidateProps.js.map +2 -2
  28. package/dist/cjs/graphs/Chart/config/useValueAxisTransition.js +128 -0
  29. package/dist/cjs/graphs/Chart/config/useValueAxisTransition.js.map +7 -0
  30. package/dist/cjs/graphs/Chart/config/useWheelScroll.js +111 -0
  31. package/dist/cjs/graphs/Chart/config/useWheelScroll.js.map +7 -0
  32. package/dist/cjs/graphs/Chart/helpers/alignedTicks.js +56 -0
  33. package/dist/cjs/graphs/Chart/helpers/alignedTicks.js.map +7 -0
  34. package/dist/cjs/graphs/Chart/helpers/barPath.js +53 -0
  35. package/dist/cjs/graphs/Chart/helpers/barPath.js.map +7 -0
  36. package/dist/cjs/graphs/Chart/{react-desc-prop-types.js → helpers/dataInView.js} +26 -27
  37. package/dist/cjs/graphs/Chart/helpers/dataInView.js.map +7 -0
  38. package/dist/cjs/graphs/Chart/helpers/index.js +34 -0
  39. package/dist/cjs/graphs/Chart/helpers/index.js.map +2 -2
  40. package/dist/cjs/graphs/Chart/{SingleStackedBar/exported-related/theming.js → helpers/logAxis.js} +13 -9
  41. package/dist/cjs/graphs/Chart/helpers/logAxis.js.map +7 -0
  42. package/dist/cjs/graphs/Chart/helpers/tickRotation.js +54 -0
  43. package/dist/cjs/graphs/Chart/helpers/tickRotation.js.map +7 -0
  44. package/dist/cjs/graphs/Chart/helpers/timeTicks.js +56 -0
  45. package/dist/cjs/graphs/Chart/helpers/timeTicks.js.map +7 -0
  46. package/dist/cjs/graphs/Chart/helpers/trend.js +45 -0
  47. package/dist/cjs/graphs/Chart/helpers/trend.js.map +7 -0
  48. package/dist/cjs/graphs/Chart/{SingleStackedBar/exported-related/index.js → helpers/useSerieDimming.js} +20 -6
  49. package/dist/cjs/graphs/Chart/helpers/useSerieDimming.js.map +7 -0
  50. package/dist/cjs/graphs/Chart/helpers/useUniqueData.js +15 -18
  51. package/dist/cjs/graphs/Chart/helpers/useUniqueData.js.map +2 -2
  52. package/dist/cjs/graphs/Chart/helpers/useVirtualizedSeries.js +12 -5
  53. package/dist/cjs/graphs/Chart/helpers/useVirtualizedSeries.js.map +2 -2
  54. package/dist/cjs/graphs/Chart/{DataTestIds.js → helpers/zeroLine.js} +12 -9
  55. package/dist/cjs/graphs/Chart/helpers/zeroLine.js.map +7 -0
  56. package/dist/cjs/graphs/Chart/parts/A11yRegion.js +8 -2
  57. package/dist/cjs/graphs/Chart/parts/A11yRegion.js.map +2 -2
  58. package/dist/cjs/graphs/Chart/parts/Axis/Axis.js +40 -4
  59. package/dist/cjs/graphs/Chart/parts/Axis/Axis.js.map +2 -2
  60. package/dist/cjs/graphs/Chart/parts/Axis/AxisBottom.js +18 -4
  61. package/dist/cjs/graphs/Chart/parts/Axis/AxisBottom.js.map +2 -2
  62. package/dist/cjs/graphs/Chart/parts/Axis/AxisLeft.js +14 -6
  63. package/dist/cjs/graphs/Chart/parts/Axis/AxisLeft.js.map +2 -2
  64. package/dist/cjs/graphs/Chart/parts/Axis/AxisRight.js +14 -4
  65. package/dist/cjs/graphs/Chart/parts/Axis/AxisRight.js.map +2 -2
  66. package/dist/cjs/graphs/Chart/parts/Axis/GridLine.js +15 -1
  67. package/dist/cjs/graphs/Chart/parts/Axis/GridLine.js.map +2 -2
  68. package/dist/cjs/graphs/Chart/parts/Axis/Tick.js +10 -4
  69. package/dist/cjs/graphs/Chart/parts/Axis/Tick.js.map +2 -2
  70. package/dist/cjs/graphs/Chart/parts/Axis/useTickTransition.js +170 -0
  71. package/dist/cjs/graphs/Chart/parts/Axis/useTickTransition.js.map +7 -0
  72. package/dist/cjs/graphs/Chart/parts/ChartContainer.js +41 -19
  73. package/dist/cjs/graphs/Chart/parts/ChartContainer.js.map +2 -2
  74. package/dist/cjs/graphs/Chart/parts/FocusableRegion.js +6 -3
  75. package/dist/cjs/graphs/Chart/parts/FocusableRegion.js.map +2 -2
  76. package/dist/cjs/graphs/Chart/parts/HoverBand.js +86 -0
  77. package/dist/cjs/graphs/Chart/parts/HoverBand.js.map +7 -0
  78. package/dist/cjs/graphs/Chart/parts/Labels/Label.js +12 -1
  79. package/dist/cjs/graphs/Chart/parts/Labels/Label.js.map +2 -2
  80. package/dist/cjs/graphs/Chart/parts/Labels/index.js +12 -4
  81. package/dist/cjs/graphs/Chart/parts/Labels/index.js.map +2 -2
  82. package/dist/cjs/graphs/Chart/parts/Legend/BottomLegend.js +6 -3
  83. package/dist/cjs/graphs/Chart/parts/Legend/BottomLegend.js.map +2 -2
  84. package/dist/cjs/graphs/Chart/parts/Legend/LeftLegend.js +2 -6
  85. package/dist/cjs/graphs/Chart/parts/Legend/LeftLegend.js.map +2 -2
  86. package/dist/cjs/graphs/Chart/parts/Legend/LegendItem.js +91 -9
  87. package/dist/cjs/graphs/Chart/parts/Legend/LegendItem.js.map +2 -2
  88. package/dist/cjs/graphs/Chart/parts/Legend/RightLegend.js +3 -4
  89. package/dist/cjs/graphs/Chart/parts/Legend/RightLegend.js.map +2 -2
  90. package/dist/cjs/graphs/Chart/parts/Legend/TopLegend.js +8 -6
  91. package/dist/cjs/graphs/Chart/parts/Legend/TopLegend.js.map +2 -2
  92. package/dist/cjs/graphs/Chart/parts/Scrapper/Scrapper.js +29 -3
  93. package/dist/cjs/graphs/Chart/parts/Scrapper/Scrapper.js.map +2 -2
  94. package/dist/cjs/graphs/Chart/parts/Scrapper/ScrapperLine.js +82 -55
  95. package/dist/cjs/graphs/Chart/parts/Scrapper/ScrapperLine.js.map +3 -3
  96. package/dist/cjs/graphs/Chart/parts/Scrapper/VerticalScrapper.js +14 -6
  97. package/dist/cjs/graphs/Chart/parts/Scrapper/VerticalScrapper.js.map +2 -2
  98. package/dist/cjs/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js +67 -43
  99. package/dist/cjs/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js.map +2 -2
  100. package/dist/cjs/graphs/Chart/{SingleStackedBar/exported-related/data-test-ids.js → parts/ScreenReaderText.js} +17 -7
  101. package/dist/cjs/graphs/Chart/parts/ScreenReaderText.js.map +7 -0
  102. package/dist/cjs/graphs/Chart/parts/Scroller/BlurMask.js +14 -9
  103. package/dist/cjs/graphs/Chart/parts/Scroller/BlurMask.js.map +2 -2
  104. package/dist/cjs/graphs/Chart/parts/Scroller/Controllers.js +152 -49
  105. package/dist/cjs/graphs/Chart/parts/Scroller/Controllers.js.map +2 -2
  106. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollBarX.js +22 -6
  107. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollBarX.js.map +2 -2
  108. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollBarY.js +13 -6
  109. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollBarY.js.map +2 -2
  110. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollableContainerX.js +42 -35
  111. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollableContainerX.js.map +2 -2
  112. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollableContainerY.js +9 -4
  113. package/dist/cjs/graphs/Chart/parts/Scroller/ScrollableContainerY.js.map +2 -2
  114. package/dist/cjs/graphs/Chart/parts/SeriesFactory.js +39 -30
  115. package/dist/cjs/graphs/Chart/parts/SeriesFactory.js.map +2 -2
  116. package/dist/cjs/graphs/Chart/parts/TrendHighlight.js +57 -19
  117. package/dist/cjs/graphs/Chart/parts/TrendHighlight.js.map +2 -2
  118. package/dist/cjs/graphs/Chart/parts/ZeroLine.js +66 -0
  119. package/dist/cjs/graphs/Chart/parts/ZeroLine.js.map +7 -0
  120. package/dist/cjs/graphs/Chart/scales/index.js +50 -20
  121. package/dist/cjs/graphs/Chart/scales/index.js.map +3 -3
  122. package/dist/cjs/graphs/Chart/series/Area.js +76 -9
  123. package/dist/cjs/graphs/Chart/series/Area.js.map +2 -2
  124. package/dist/cjs/graphs/Chart/series/Bars.js +3 -1
  125. package/dist/cjs/graphs/Chart/series/Bars.js.map +2 -2
  126. package/dist/cjs/graphs/Chart/series/HorizontalBars.js +4 -1
  127. package/dist/cjs/graphs/Chart/series/HorizontalBars.js.map +2 -2
  128. package/dist/cjs/graphs/Chart/series/HorizontalStackedBars.js +14 -7
  129. package/dist/cjs/graphs/Chart/series/HorizontalStackedBars.js.map +2 -2
  130. package/dist/cjs/graphs/Chart/series/Line.js +9 -7
  131. package/dist/cjs/graphs/Chart/series/Line.js.map +2 -2
  132. package/dist/cjs/graphs/Chart/series/Point.js +114 -128
  133. package/dist/cjs/graphs/Chart/series/Point.js.map +3 -3
  134. package/dist/cjs/graphs/Chart/series/Points.js +8 -2
  135. package/dist/cjs/graphs/Chart/series/Points.js.map +2 -2
  136. package/dist/cjs/graphs/Chart/series/Rect.js +133 -122
  137. package/dist/cjs/graphs/Chart/series/Rect.js.map +3 -3
  138. package/dist/cjs/graphs/Chart/series/StackedBar.js +14 -6
  139. package/dist/cjs/graphs/Chart/series/StackedBar.js.map +2 -2
  140. package/dist/cjs/graphs/Chart/styles.js +65 -34
  141. package/dist/cjs/graphs/Chart/styles.js.map +2 -2
  142. package/dist/cjs/graphs/constants.js +24 -9
  143. package/dist/cjs/graphs/constants.js.map +2 -2
  144. package/dist/cjs/index.js +17 -6
  145. package/dist/cjs/index.js.map +3 -3
  146. package/dist/cjs/react-desc-prop-types.js +150 -0
  147. package/dist/cjs/react-desc-prop-types.js.map +7 -0
  148. package/dist/cjs/typescript-testing/slot-props.js +69 -0
  149. package/dist/cjs/typescript-testing/slot-props.js.map +7 -0
  150. package/dist/cjs/typescript-testing/typescript-data-viz-valid.js +34 -2
  151. package/dist/cjs/typescript-testing/typescript-data-viz-valid.js.map +2 -2
  152. package/dist/cjs/typescript-testing/typescript-single-stacked-bar-valid.js +93 -0
  153. package/dist/cjs/typescript-testing/typescript-single-stacked-bar-valid.js.map +7 -0
  154. package/dist/esm/constants/index.js +43 -0
  155. package/dist/esm/constants/index.js.map +7 -0
  156. package/dist/esm/graphs/Chart/Chart.js +6 -1
  157. package/dist/esm/graphs/Chart/Chart.js.map +2 -2
  158. package/dist/esm/graphs/Chart/ChartContext.js.map +2 -2
  159. package/dist/esm/graphs/Chart/SingleStackedBar/SingleStackedBar.js +40 -23
  160. package/dist/esm/graphs/Chart/SingleStackedBar/SingleStackedBar.js.map +2 -2
  161. package/dist/esm/graphs/Chart/SingleStackedBar/styles.js +12 -5
  162. package/dist/esm/graphs/Chart/SingleStackedBar/styles.js.map +2 -2
  163. package/dist/esm/graphs/Chart/config/chartInteractionStore.js +68 -0
  164. package/dist/esm/graphs/Chart/config/chartInteractionStore.js.map +7 -0
  165. package/dist/esm/graphs/Chart/config/useChart.js +58 -42
  166. package/dist/esm/graphs/Chart/config/useChart.js.map +2 -2
  167. package/dist/esm/graphs/Chart/config/useChartDescription.js +32 -0
  168. package/dist/esm/graphs/Chart/config/useChartDescription.js.map +7 -0
  169. package/dist/esm/graphs/Chart/config/useEntranceAnimation.js +111 -0
  170. package/dist/esm/graphs/Chart/config/useEntranceAnimation.js.map +7 -0
  171. package/dist/esm/graphs/Chart/config/useGetters.js +10 -0
  172. package/dist/esm/graphs/Chart/config/useGetters.js.map +2 -2
  173. package/dist/esm/graphs/Chart/config/useInternalMargins.js +26 -6
  174. package/dist/esm/graphs/Chart/config/useInternalMargins.js.map +2 -2
  175. package/dist/esm/graphs/Chart/config/useKeyboardNavigation.js +35 -51
  176. package/dist/esm/graphs/Chart/config/useKeyboardNavigation.js.map +2 -2
  177. package/dist/esm/graphs/Chart/config/useScales.js +202 -69
  178. package/dist/esm/graphs/Chart/config/useScales.js.map +2 -2
  179. package/dist/esm/graphs/Chart/config/useValidateProps.js +53 -4
  180. package/dist/esm/graphs/Chart/config/useValidateProps.js.map +2 -2
  181. package/dist/esm/graphs/Chart/config/useValueAxisTransition.js +98 -0
  182. package/dist/esm/graphs/Chart/config/useValueAxisTransition.js.map +7 -0
  183. package/dist/esm/graphs/Chart/config/useWheelScroll.js +81 -0
  184. package/dist/esm/graphs/Chart/config/useWheelScroll.js.map +7 -0
  185. package/dist/esm/graphs/Chart/helpers/alignedTicks.js +26 -0
  186. package/dist/esm/graphs/Chart/helpers/alignedTicks.js.map +7 -0
  187. package/dist/esm/graphs/Chart/helpers/barPath.js +23 -0
  188. package/dist/esm/graphs/Chart/helpers/barPath.js.map +7 -0
  189. package/dist/esm/graphs/Chart/helpers/dataInView.js +28 -0
  190. package/dist/esm/graphs/Chart/helpers/dataInView.js.map +7 -0
  191. package/dist/esm/graphs/Chart/helpers/index.js +34 -0
  192. package/dist/esm/graphs/Chart/helpers/index.js.map +2 -2
  193. package/dist/esm/graphs/Chart/helpers/logAxis.js +14 -0
  194. package/dist/esm/graphs/Chart/helpers/logAxis.js.map +7 -0
  195. package/dist/esm/graphs/Chart/helpers/tickRotation.js +24 -0
  196. package/dist/esm/graphs/Chart/helpers/tickRotation.js.map +7 -0
  197. package/dist/esm/graphs/Chart/helpers/timeTicks.js +26 -0
  198. package/dist/esm/graphs/Chart/helpers/timeTicks.js.map +7 -0
  199. package/dist/esm/graphs/Chart/helpers/trend.js +15 -0
  200. package/dist/esm/graphs/Chart/helpers/trend.js.map +7 -0
  201. package/dist/esm/graphs/Chart/helpers/useSerieDimming.js +15 -0
  202. package/dist/esm/graphs/Chart/helpers/useSerieDimming.js.map +7 -0
  203. package/dist/esm/graphs/Chart/helpers/useUniqueData.js +15 -18
  204. package/dist/esm/graphs/Chart/helpers/useUniqueData.js.map +2 -2
  205. package/dist/esm/graphs/Chart/helpers/useVirtualizedSeries.js +12 -5
  206. package/dist/esm/graphs/Chart/helpers/useVirtualizedSeries.js.map +2 -2
  207. package/dist/esm/graphs/Chart/helpers/zeroLine.js +13 -0
  208. package/dist/esm/graphs/Chart/helpers/zeroLine.js.map +7 -0
  209. package/dist/esm/graphs/Chart/parts/A11yRegion.js +7 -1
  210. package/dist/esm/graphs/Chart/parts/A11yRegion.js.map +2 -2
  211. package/dist/esm/graphs/Chart/parts/Axis/Axis.js +40 -4
  212. package/dist/esm/graphs/Chart/parts/Axis/Axis.js.map +2 -2
  213. package/dist/esm/graphs/Chart/parts/Axis/AxisBottom.js +18 -4
  214. package/dist/esm/graphs/Chart/parts/Axis/AxisBottom.js.map +2 -2
  215. package/dist/esm/graphs/Chart/parts/Axis/AxisLeft.js +14 -6
  216. package/dist/esm/graphs/Chart/parts/Axis/AxisLeft.js.map +2 -2
  217. package/dist/esm/graphs/Chart/parts/Axis/AxisRight.js +14 -4
  218. package/dist/esm/graphs/Chart/parts/Axis/AxisRight.js.map +2 -2
  219. package/dist/esm/graphs/Chart/parts/Axis/GridLine.js +16 -2
  220. package/dist/esm/graphs/Chart/parts/Axis/GridLine.js.map +2 -2
  221. package/dist/esm/graphs/Chart/parts/Axis/Tick.js +11 -5
  222. package/dist/esm/graphs/Chart/parts/Axis/Tick.js.map +2 -2
  223. package/dist/esm/graphs/Chart/parts/Axis/useTickTransition.js +140 -0
  224. package/dist/esm/graphs/Chart/parts/Axis/useTickTransition.js.map +7 -0
  225. package/dist/esm/graphs/Chart/parts/ChartContainer.js +41 -19
  226. package/dist/esm/graphs/Chart/parts/ChartContainer.js.map +2 -2
  227. package/dist/esm/graphs/Chart/parts/FocusableRegion.js +7 -4
  228. package/dist/esm/graphs/Chart/parts/FocusableRegion.js.map +2 -2
  229. package/dist/esm/graphs/Chart/parts/HoverBand.js +56 -0
  230. package/dist/esm/graphs/Chart/parts/HoverBand.js.map +7 -0
  231. package/dist/esm/graphs/Chart/parts/Labels/Label.js +12 -1
  232. package/dist/esm/graphs/Chart/parts/Labels/Label.js.map +2 -2
  233. package/dist/esm/graphs/Chart/parts/Labels/index.js +12 -4
  234. package/dist/esm/graphs/Chart/parts/Labels/index.js.map +2 -2
  235. package/dist/esm/graphs/Chart/parts/Legend/BottomLegend.js +7 -4
  236. package/dist/esm/graphs/Chart/parts/Legend/BottomLegend.js.map +2 -2
  237. package/dist/esm/graphs/Chart/parts/Legend/LeftLegend.js +3 -7
  238. package/dist/esm/graphs/Chart/parts/Legend/LeftLegend.js.map +2 -2
  239. package/dist/esm/graphs/Chart/parts/Legend/LegendItem.js +91 -9
  240. package/dist/esm/graphs/Chart/parts/Legend/LegendItem.js.map +2 -2
  241. package/dist/esm/graphs/Chart/parts/Legend/RightLegend.js +4 -5
  242. package/dist/esm/graphs/Chart/parts/Legend/RightLegend.js.map +2 -2
  243. package/dist/esm/graphs/Chart/parts/Legend/TopLegend.js +9 -7
  244. package/dist/esm/graphs/Chart/parts/Legend/TopLegend.js.map +2 -2
  245. package/dist/esm/graphs/Chart/parts/Scrapper/Scrapper.js +29 -3
  246. package/dist/esm/graphs/Chart/parts/Scrapper/Scrapper.js.map +2 -2
  247. package/dist/esm/graphs/Chart/parts/Scrapper/ScrapperLine.js +83 -56
  248. package/dist/esm/graphs/Chart/parts/Scrapper/ScrapperLine.js.map +3 -3
  249. package/dist/esm/graphs/Chart/parts/Scrapper/VerticalScrapper.js +14 -6
  250. package/dist/esm/graphs/Chart/parts/Scrapper/VerticalScrapper.js.map +2 -2
  251. package/dist/esm/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js +68 -44
  252. package/dist/esm/graphs/Chart/parts/Scrapper/VerticalScrapperLine.js.map +2 -2
  253. package/dist/esm/graphs/Chart/parts/ScreenReaderText.js +18 -0
  254. package/dist/esm/graphs/Chart/parts/ScreenReaderText.js.map +7 -0
  255. package/dist/esm/graphs/Chart/parts/Scroller/BlurMask.js +14 -9
  256. package/dist/esm/graphs/Chart/parts/Scroller/BlurMask.js.map +2 -2
  257. package/dist/esm/graphs/Chart/parts/Scroller/Controllers.js +154 -51
  258. package/dist/esm/graphs/Chart/parts/Scroller/Controllers.js.map +2 -2
  259. package/dist/esm/graphs/Chart/parts/Scroller/ScrollBarX.js +22 -6
  260. package/dist/esm/graphs/Chart/parts/Scroller/ScrollBarX.js.map +2 -2
  261. package/dist/esm/graphs/Chart/parts/Scroller/ScrollBarY.js +13 -6
  262. package/dist/esm/graphs/Chart/parts/Scroller/ScrollBarY.js.map +2 -2
  263. package/dist/esm/graphs/Chart/parts/Scroller/ScrollableContainerX.js +43 -36
  264. package/dist/esm/graphs/Chart/parts/Scroller/ScrollableContainerX.js.map +2 -2
  265. package/dist/esm/graphs/Chart/parts/Scroller/ScrollableContainerY.js +10 -5
  266. package/dist/esm/graphs/Chart/parts/Scroller/ScrollableContainerY.js.map +2 -2
  267. package/dist/esm/graphs/Chart/parts/SeriesFactory.js +40 -31
  268. package/dist/esm/graphs/Chart/parts/SeriesFactory.js.map +2 -2
  269. package/dist/esm/graphs/Chart/parts/TrendHighlight.js +58 -20
  270. package/dist/esm/graphs/Chart/parts/TrendHighlight.js.map +2 -2
  271. package/dist/esm/graphs/Chart/parts/ZeroLine.js +36 -0
  272. package/dist/esm/graphs/Chart/parts/ZeroLine.js.map +7 -0
  273. package/dist/esm/graphs/Chart/scales/index.js +51 -21
  274. package/dist/esm/graphs/Chart/scales/index.js.map +3 -3
  275. package/dist/esm/graphs/Chart/series/Area.js +77 -10
  276. package/dist/esm/graphs/Chart/series/Area.js.map +2 -2
  277. package/dist/esm/graphs/Chart/series/Bars.js +3 -1
  278. package/dist/esm/graphs/Chart/series/Bars.js.map +2 -2
  279. package/dist/esm/graphs/Chart/series/HorizontalBars.js +4 -1
  280. package/dist/esm/graphs/Chart/series/HorizontalBars.js.map +2 -2
  281. package/dist/esm/graphs/Chart/series/HorizontalStackedBars.js +15 -8
  282. package/dist/esm/graphs/Chart/series/HorizontalStackedBars.js.map +2 -2
  283. package/dist/esm/graphs/Chart/series/Line.js +9 -7
  284. package/dist/esm/graphs/Chart/series/Line.js.map +2 -2
  285. package/dist/esm/graphs/Chart/series/Point.js +120 -130
  286. package/dist/esm/graphs/Chart/series/Point.js.map +3 -3
  287. package/dist/esm/graphs/Chart/series/Points.js +8 -2
  288. package/dist/esm/graphs/Chart/series/Points.js.map +2 -2
  289. package/dist/esm/graphs/Chart/series/Rect.js +134 -123
  290. package/dist/esm/graphs/Chart/series/Rect.js.map +3 -3
  291. package/dist/esm/graphs/Chart/series/StackedBar.js +15 -7
  292. package/dist/esm/graphs/Chart/series/StackedBar.js.map +2 -2
  293. package/dist/esm/graphs/Chart/styles.js +66 -35
  294. package/dist/esm/graphs/Chart/styles.js.map +2 -2
  295. package/dist/esm/graphs/constants.js +25 -10
  296. package/dist/esm/graphs/constants.js.map +2 -2
  297. package/dist/esm/index.js +19 -7
  298. package/dist/esm/index.js.map +2 -2
  299. package/dist/esm/react-desc-prop-types.js +125 -0
  300. package/dist/esm/react-desc-prop-types.js.map +7 -0
  301. package/dist/esm/typescript-testing/slot-props.js +46 -0
  302. package/dist/esm/typescript-testing/slot-props.js.map +7 -0
  303. package/dist/esm/typescript-testing/typescript-data-viz-valid.js +35 -3
  304. package/dist/esm/typescript-testing/typescript-data-viz-valid.js.map +2 -2
  305. package/dist/esm/typescript-testing/typescript-single-stacked-bar-valid.js +70 -0
  306. package/dist/esm/typescript-testing/typescript-single-stacked-bar-valid.js.map +7 -0
  307. package/dist/types/constants/index.d.ts +42 -0
  308. package/dist/types/graphs/Chart/Chart.d.ts +4 -2
  309. package/dist/types/graphs/Chart/ChartContext.d.ts +9 -11
  310. package/dist/types/graphs/Chart/SingleStackedBar/SingleStackedBar.d.ts +1 -1
  311. package/dist/types/graphs/Chart/config/chartInteractionStore.d.ts +32 -0
  312. package/dist/types/graphs/Chart/config/useChart.d.ts +9 -11
  313. package/dist/types/graphs/Chart/config/useChartDescription.d.ts +5 -0
  314. package/dist/types/graphs/Chart/config/useEntranceAnimation.d.ts +16 -0
  315. package/dist/types/graphs/Chart/config/useGetters.d.ts +1 -1
  316. package/dist/types/graphs/Chart/config/useInternalMargins.d.ts +4 -1
  317. package/dist/types/graphs/Chart/config/useKeyboardNavigation.d.ts +1 -1
  318. package/dist/types/graphs/Chart/config/useScales.d.ts +8 -2
  319. package/dist/types/graphs/Chart/config/useValidateProps.d.ts +7 -1
  320. package/dist/types/graphs/Chart/config/useValueAxisTransition.d.ts +6 -0
  321. package/dist/types/graphs/Chart/config/useWheelScroll.d.ts +2 -0
  322. package/dist/types/graphs/Chart/helpers/alignedTicks.d.ts +1 -0
  323. package/dist/types/graphs/Chart/helpers/barPath.d.ts +11 -0
  324. package/dist/types/graphs/Chart/helpers/dataInView.d.ts +6 -0
  325. package/dist/types/graphs/Chart/helpers/index.d.ts +10 -1
  326. package/dist/types/graphs/Chart/helpers/logAxis.d.ts +8 -0
  327. package/dist/types/graphs/Chart/helpers/tickRotation.d.ts +2 -0
  328. package/dist/types/graphs/Chart/helpers/timeTicks.d.ts +2 -0
  329. package/dist/types/graphs/Chart/helpers/trend.d.ts +3 -0
  330. package/dist/types/graphs/Chart/helpers/useSerieDimming.d.ts +3 -0
  331. package/dist/types/graphs/Chart/helpers/useUniqueData.d.ts +1 -1
  332. package/dist/types/graphs/Chart/helpers/useVirtualizedSeries.d.ts +1 -1
  333. package/dist/types/graphs/Chart/helpers/zeroLine.d.ts +2 -0
  334. package/dist/types/graphs/Chart/parts/Axis/Axis.d.ts +4 -1
  335. package/dist/types/graphs/Chart/parts/Axis/Tick.d.ts +1 -0
  336. package/dist/types/graphs/Chart/parts/Axis/useTickTransition.d.ts +24 -0
  337. package/dist/types/graphs/Chart/parts/HoverBand.d.ts +2 -0
  338. package/dist/types/graphs/Chart/parts/Labels/Label.d.ts +3 -0
  339. package/dist/types/graphs/Chart/parts/Scrapper/ScrapperLine.d.ts +11 -1
  340. package/dist/types/graphs/Chart/parts/Scrapper/VerticalScrapperLine.d.ts +6 -7
  341. package/dist/types/graphs/Chart/parts/ScreenReaderText.d.ts +5 -0
  342. package/dist/types/graphs/Chart/parts/TrendHighlight.d.ts +3 -2
  343. package/dist/types/graphs/Chart/parts/ZeroLine.d.ts +2 -0
  344. package/dist/types/graphs/Chart/scales/index.d.ts +10 -3
  345. package/dist/types/graphs/Chart/series/Area.d.ts +1 -1
  346. package/dist/types/graphs/Chart/series/Bars.d.ts +1 -1
  347. package/dist/types/graphs/Chart/series/HorizontalBars.d.ts +1 -1
  348. package/dist/types/graphs/Chart/series/HorizontalStackedBars.d.ts +1 -1
  349. package/dist/types/graphs/Chart/series/Line.d.ts +1 -1
  350. package/dist/types/graphs/Chart/series/Point.d.ts +3 -2
  351. package/dist/types/graphs/Chart/series/Points.d.ts +1 -1
  352. package/dist/types/graphs/Chart/series/Rect.d.ts +3 -2
  353. package/dist/types/graphs/Chart/series/StackedBar.d.ts +1 -1
  354. package/dist/types/graphs/Chart/styles.d.ts +18 -5
  355. package/dist/types/graphs/constants.d.ts +13 -1
  356. package/dist/types/index.d.ts +6 -1
  357. package/dist/types/react-desc-prop-types.d.ts +228 -0
  358. package/package.json +8 -7
  359. package/dist/cjs/graphs/Chart/DataTestIds.js.map +0 -7
  360. package/dist/cjs/graphs/Chart/SingleStackedBar/exported-related/data-test-ids.js.map +0 -7
  361. package/dist/cjs/graphs/Chart/SingleStackedBar/exported-related/index.js.map +0 -7
  362. package/dist/cjs/graphs/Chart/SingleStackedBar/exported-related/theming.js.map +0 -7
  363. package/dist/cjs/graphs/Chart/SingleStackedBar/index.js +0 -31
  364. package/dist/cjs/graphs/Chart/SingleStackedBar/index.js.map +0 -7
  365. package/dist/cjs/graphs/Chart/SingleStackedBar/react-desc-prop-types.js +0 -51
  366. package/dist/cjs/graphs/Chart/SingleStackedBar/react-desc-prop-types.js.map +0 -7
  367. package/dist/cjs/graphs/Chart/index.js +0 -33
  368. package/dist/cjs/graphs/Chart/index.js.map +0 -7
  369. package/dist/cjs/graphs/Chart/react-desc-prop-types.js.map +0 -7
  370. package/dist/cjs/graphs/index.js +0 -31
  371. package/dist/cjs/graphs/index.js.map +0 -7
  372. package/dist/esm/graphs/Chart/DataTestIds.js +0 -10
  373. package/dist/esm/graphs/Chart/DataTestIds.js.map +0 -7
  374. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/data-test-ids.js +0 -8
  375. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/data-test-ids.js.map +0 -7
  376. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/index.js +0 -4
  377. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/index.js.map +0 -7
  378. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/theming.js +0 -10
  379. package/dist/esm/graphs/Chart/SingleStackedBar/exported-related/theming.js.map +0 -7
  380. package/dist/esm/graphs/Chart/SingleStackedBar/index.js +0 -4
  381. package/dist/esm/graphs/Chart/SingleStackedBar/index.js.map +0 -7
  382. package/dist/esm/graphs/Chart/SingleStackedBar/react-desc-prop-types.js +0 -21
  383. package/dist/esm/graphs/Chart/SingleStackedBar/react-desc-prop-types.js.map +0 -7
  384. package/dist/esm/graphs/Chart/index.js +0 -6
  385. package/dist/esm/graphs/Chart/index.js.map +0 -7
  386. package/dist/esm/graphs/Chart/react-desc-prop-types.js +0 -29
  387. package/dist/esm/graphs/Chart/react-desc-prop-types.js.map +0 -7
  388. package/dist/esm/graphs/index.js +0 -4
  389. package/dist/esm/graphs/index.js.map +0 -7
  390. package/dist/types/graphs/Chart/DataTestIds.d.ts +0 -5
  391. package/dist/types/graphs/Chart/SingleStackedBar/exported-related/data-test-ids.d.ts +0 -3
  392. package/dist/types/graphs/Chart/SingleStackedBar/exported-related/index.d.ts +0 -2
  393. package/dist/types/graphs/Chart/SingleStackedBar/exported-related/theming.d.ts +0 -4
  394. package/dist/types/graphs/Chart/SingleStackedBar/index.d.ts +0 -3
  395. package/dist/types/graphs/Chart/SingleStackedBar/react-desc-prop-types.d.ts +0 -44
  396. package/dist/types/graphs/Chart/index.d.ts +0 -4
  397. package/dist/types/graphs/Chart/react-desc-prop-types.d.ts +0 -510
  398. package/dist/types/graphs/index.d.ts +0 -2
@@ -33,131 +33,142 @@ __export(Rect_exports, {
33
33
  module.exports = __toCommonJS(Rect_exports);
34
34
  var React = __toESM(require("react"));
35
35
  var import_jsx_runtime = require("react/jsx-runtime");
36
- var import_react = require("react");
36
+ var import_react = __toESM(require("react"));
37
+ var import_ds_system = require("@elliemae/ds-system");
37
38
  var import_ChartContext = require("../ChartContext.js");
39
+ var import_chartInteractionStore = require("../config/chartInteractionStore.js");
38
40
  var import_constants = require("../../constants.js");
39
41
  var import_FocusableRegion = require("../parts/FocusableRegion.js");
40
- var import_DataTestIds = require("../DataTestIds.js");
41
- const Rect = ({
42
- name,
43
- width,
44
- height,
45
- isNegative = false,
46
- x = 0,
47
- y = 0,
48
- id,
49
- xValue,
50
- yValue,
51
- datum
52
- }) => {
53
- const {
54
- activePoint,
55
- chartId,
56
- isHorizontal,
57
- setActivePoint,
58
- getYValueFormatted,
59
- getXValueFormatted,
60
- props: { TooltipRenderer, scrapper, xAxis, yAxis, y2Axis }
61
- } = (0, import_react.useContext)(import_ChartContext.ChartContext);
62
- const finalYAxis = datum.scale === "y2" ? y2Axis : yAxis;
63
- const yValueFormatted = getYValueFormatted(datum);
64
- const xValueFormatted = getXValueFormatted(datum);
65
- const isFocused = activePoint?.key === id;
66
- const clipPathSign = (0, import_react.useMemo)(() => {
67
- if (isHorizontal) return "";
68
- if (isNegative) return `url(#rects-negative-${chartId})`;
69
- return `url(#rects-positive-${chartId})`;
70
- }, [chartId, isHorizontal, isNegative]);
71
- const transform = (0, import_react.useMemo)(() => {
72
- if (isHorizontal) return ``;
73
- return `scale(1,-1) translate(0,${-height})`;
74
- }, [height, isHorizontal]);
75
- const handleMouseEnter = (0, import_react.useCallback)(() => {
76
- if (!scrapper) setActivePoint(datum);
77
- }, [datum, scrapper, setActivePoint]);
78
- const handleOnMouseLeave = (0, import_react.useCallback)(() => {
79
- if (!scrapper) setActivePoint(null);
80
- }, [scrapper, setActivePoint]);
81
- return (0, import_react.useMemo)(
82
- () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { clipPath: clipPathSign, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
83
- "g",
84
- {
85
- id: isFocused ? `data-focused-${chartId}` : "",
86
- transform,
87
- onMouseEnter: handleMouseEnter,
88
- onMouseLeave: handleOnMouseLeave,
89
- "data-testid": import_DataTestIds.DataVizDataTestIds.BAR,
90
- children: [
91
- isFocused ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
92
- "rect",
93
- {
94
- x: (isHorizontal ? x : 0) - import_constants.FOCUS_RING.STROKE_WIDTH,
95
- y: (!isHorizontal ? -y : 0) - import_constants.FOCUS_RING.STROKE_WIDTH,
96
- width: width + import_constants.FOCUS_RING.OFFSET,
97
- height: height + import_constants.FOCUS_RING.OFFSET,
98
- fill: "none",
99
- rx: "1",
100
- ry: "1",
101
- stroke: import_constants.FOCUS_RING.COLOR,
102
- strokeWidth: import_constants.FOCUS_RING.STROKE_WIDTH
103
- }
104
- ) : null,
105
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
106
- "rect",
107
- {
108
- width,
109
- height,
110
- y: -y,
111
- x,
112
- "aria-label": `${datum.serie} ${xAxis.label || ""} ${xValueFormatted} ${finalYAxis?.label || ""} ${yValueFormatted}`,
113
- role: "img",
114
- tabIndex: -1,
115
- ref: (_ref) => {
116
- if (isFocused) {
117
- _ref?.focus();
118
- }
119
- }
120
- }
121
- ),
122
- activePoint?.key === id && TooltipRenderer ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
123
- import_FocusableRegion.FocusableRegion,
124
- {
125
- id,
126
- y,
127
- x,
128
- width,
129
- height,
130
- transform,
131
- content: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipRenderer, { data: [{ name, yValue, xValue, datum }] })
132
- }
133
- ) : ""
134
- ]
135
- }
136
- ) }),
137
- [
138
- clipPathSign,
139
- isFocused,
42
+ var import_styles = require("../styles.js");
43
+ var import_barPath = require("../helpers/barPath.js");
44
+ var import_helpers = require("../helpers/index.js");
45
+ const FOCUS_RING_DISTANCE = import_constants.FOCUS_RING.GAP + import_constants.FOCUS_RING.STROKE_WIDTH / 2;
46
+ const getDataEnd = (isHorizontal, isNegativeValue, isStackEdge) => {
47
+ if (!isStackEdge) return "none";
48
+ if (isHorizontal) return isNegativeValue ? "left" : "right";
49
+ return isNegativeValue ? "bottom" : "top";
50
+ };
51
+ const Rect = import_react.default.memo(
52
+ ({ name, width, height, isNegative = false, isStackEdge = true, x = 0, y = 0, id, xValue, yValue, datum }) => {
53
+ const {
140
54
  chartId,
141
- transform,
142
- handleMouseEnter,
143
- handleOnMouseLeave,
144
55
  isHorizontal,
145
- x,
146
- y,
147
- width,
148
- height,
149
- datum,
150
- xAxis.label,
151
- xValueFormatted,
152
- finalYAxis?.label,
153
- yValueFormatted,
154
- activePoint?.key,
155
- id,
156
- TooltipRenderer,
157
- name,
158
- yValue,
159
- xValue
160
- ]
161
- );
162
- };
56
+ setActivePoint,
57
+ getYValueFormatted,
58
+ getXValueFormatted,
59
+ getOwnerProps,
60
+ containerRef,
61
+ props: { TooltipRenderer, scrapper, xAxis, yAxis, y2Axis }
62
+ } = (0, import_react.useContext)(import_ChartContext.ChartContext);
63
+ const theme = (0, import_react.useContext)(import_ds_system.ThemeContext);
64
+ const focusRingColor = theme?.colors?.brand?.["700"] ?? import_constants.FOCUS_RING.COLOR;
65
+ const finalYAxis = datum.scale === "y2" ? y2Axis : yAxis;
66
+ const yValueFormatted = getYValueFormatted(datum);
67
+ const xValueFormatted = getXValueFormatted(datum);
68
+ const isFocused = (0, import_chartInteractionStore.useChartInteraction)((state) => state.activePoint?.key === id);
69
+ const clipPathSign = (0, import_react.useMemo)(() => {
70
+ if (isHorizontal) return "";
71
+ if (isNegative) return `url(#rects-negative-${chartId})`;
72
+ return `url(#rects-positive-${chartId})`;
73
+ }, [chartId, isHorizontal, isNegative]);
74
+ const bar = (0, import_react.useMemo)(() => {
75
+ const rawValue = typeof datum.value === "number" ? datum.value : datum.value?.[isHorizontal ? "x" : "y"];
76
+ const isNegativeValue = isNegative || (rawValue ?? 0) < 0;
77
+ if (isHorizontal) {
78
+ const thickness2 = Math.min(height, import_constants.MARKS.BAR_MAX_THICKNESS);
79
+ const dataEnd2 = getDataEnd(true, isNegativeValue, isStackEdge);
80
+ return { x, y: -y + (height - thickness2) / 2, width: Math.max(width, 0), height: thickness2, dataEnd: dataEnd2 };
81
+ }
82
+ const thickness = Math.min(width, import_constants.MARKS.BAR_MAX_THICKNESS);
83
+ const dataEnd = getDataEnd(false, isNegativeValue, isStackEdge);
84
+ return { x: x + (width - thickness) / 2, y, width: thickness, height: Math.max(height, 0), dataEnd };
85
+ }, [datum.value, height, isHorizontal, isNegative, isStackEdge, width, x, y]);
86
+ const handleMouseEnter = (0, import_react.useCallback)(() => {
87
+ if (!scrapper) setActivePoint(datum);
88
+ }, [datum, scrapper, setActivePoint]);
89
+ const handleOnMouseLeave = (0, import_react.useCallback)(() => {
90
+ if (!scrapper) setActivePoint(null);
91
+ }, [scrapper, setActivePoint]);
92
+ return (0, import_react.useMemo)(
93
+ () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { clipPath: clipPathSign, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
94
+ import_styles.StyledBarGroup,
95
+ {
96
+ id: isFocused ? `data-focused-${chartId}` : "",
97
+ onMouseEnter: handleMouseEnter,
98
+ onMouseLeave: handleOnMouseLeave,
99
+ getOwnerProps,
100
+ getOwnerPropsArguments: () => ({ datum }),
101
+ children: [
102
+ isFocused ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
103
+ "rect",
104
+ {
105
+ x: bar.x - FOCUS_RING_DISTANCE,
106
+ y: bar.y - FOCUS_RING_DISTANCE,
107
+ width: bar.width + FOCUS_RING_DISTANCE * 2,
108
+ height: bar.height + FOCUS_RING_DISTANCE * 2,
109
+ fill: "none",
110
+ rx: import_constants.MARKS.BAR_RADIUS + FOCUS_RING_DISTANCE,
111
+ stroke: focusRingColor,
112
+ strokeWidth: import_constants.FOCUS_RING.STROKE_WIDTH
113
+ }
114
+ ) : null,
115
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
116
+ "path",
117
+ {
118
+ d: (0, import_barPath.getBarPath)({ ...bar, radius: import_constants.MARKS.BAR_RADIUS }),
119
+ "aria-label": (0, import_helpers.getDatumLabel)([
120
+ datum.serie,
121
+ xAxis.label,
122
+ xValueFormatted,
123
+ finalYAxis?.label,
124
+ yValueFormatted
125
+ ]),
126
+ role: "img",
127
+ tabIndex: -1,
128
+ ref: (_ref) => {
129
+ if (isFocused && containerRef?.contains(document.activeElement)) {
130
+ _ref?.focus();
131
+ }
132
+ }
133
+ }
134
+ ),
135
+ isFocused && TooltipRenderer && !scrapper ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
136
+ import_FocusableRegion.FocusableRegion,
137
+ {
138
+ id,
139
+ y: bar.y,
140
+ x: bar.x,
141
+ width: bar.width,
142
+ height: bar.height,
143
+ content: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TooltipRenderer, { data: [{ name, yValue, xValue, datum }] })
144
+ }
145
+ ) : ""
146
+ ]
147
+ }
148
+ ) }),
149
+ [
150
+ clipPathSign,
151
+ isFocused,
152
+ chartId,
153
+ handleMouseEnter,
154
+ handleOnMouseLeave,
155
+ bar,
156
+ focusRingColor,
157
+ datum,
158
+ xAxis.label,
159
+ xValueFormatted,
160
+ finalYAxis?.label,
161
+ yValueFormatted,
162
+ id,
163
+ TooltipRenderer,
164
+ scrapper,
165
+ name,
166
+ yValue,
167
+ xValue,
168
+ getOwnerProps,
169
+ containerRef
170
+ ]
171
+ );
172
+ }
173
+ );
163
174
  //# sourceMappingURL=Rect.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/graphs/Chart/series/Rect.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useMemo, useContext, useCallback } from 'react';\nimport { ChartContext } from '../ChartContext.js';\nimport { FOCUS_RING } from '../../constants.js';\nimport { FocusableRegion } from '../parts/FocusableRegion.js';\nimport { DataVizDataTestIds } from '../DataTestIds.js';\nimport type { DSChartT } from '../react-desc-prop-types.js';\ninterface RectProps {\n name: string;\n width: number;\n height: number;\n isNegative?: boolean;\n x?: number;\n y?: number;\n id: string;\n xValue: number;\n yValue: number;\n datum: DSChartT.InternalDatum;\n}\n\nexport const Rect: React.ComponentType<RectProps> = ({\n name,\n width,\n height,\n isNegative = false,\n x = 0,\n y = 0,\n id,\n xValue,\n yValue,\n datum,\n}) => {\n const {\n activePoint,\n chartId,\n isHorizontal,\n setActivePoint,\n getYValueFormatted,\n getXValueFormatted,\n props: { TooltipRenderer, scrapper, xAxis, yAxis, y2Axis },\n } = useContext(ChartContext);\n const finalYAxis = datum.scale === 'y2' ? y2Axis : yAxis;\n const yValueFormatted = getYValueFormatted(datum);\n const xValueFormatted = getXValueFormatted(datum);\n\n const isFocused = activePoint?.key === id;\n const clipPathSign = useMemo(() => {\n // @todo horizontal clip paths\n if (isHorizontal) return '';\n if (isNegative) return `url(#rects-negative-${chartId})`;\n return `url(#rects-positive-${chartId})`;\n }, [chartId, isHorizontal, isNegative]);\n\n const transform = useMemo(() => {\n if (isHorizontal) return ``;\n return `scale(1,-1) translate(0,${-height})`;\n }, [height, isHorizontal]);\n\n const handleMouseEnter = useCallback(() => {\n if (!scrapper) setActivePoint(datum);\n }, [datum, scrapper, setActivePoint]);\n\n const handleOnMouseLeave = useCallback(() => {\n if (!scrapper) setActivePoint(null);\n }, [scrapper, setActivePoint]);\n\n return useMemo(\n () => (\n <g clipPath={clipPathSign}>\n <g\n id={isFocused ? `data-focused-${chartId}` : ''}\n transform={transform}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n data-testid={DataVizDataTestIds.BAR}\n >\n {isFocused ? (\n <rect\n x={(isHorizontal ? x : 0) - FOCUS_RING.STROKE_WIDTH}\n y={(!isHorizontal ? -y : 0) - FOCUS_RING.STROKE_WIDTH}\n width={width + FOCUS_RING.OFFSET}\n height={height + FOCUS_RING.OFFSET}\n fill=\"none\"\n rx=\"1\"\n ry=\"1\"\n stroke={FOCUS_RING.COLOR}\n strokeWidth={FOCUS_RING.STROKE_WIDTH}\n ></rect>\n ) : null}\n <rect\n width={width}\n height={height}\n y={-y}\n x={x}\n aria-label={`${datum.serie} ${xAxis.label || ''} ${xValueFormatted} ${\n finalYAxis?.label || ''\n } ${yValueFormatted}`}\n role=\"img\"\n tabIndex={-1}\n ref={(_ref) => {\n if (isFocused) {\n _ref?.focus();\n }\n }}\n ></rect>\n {activePoint?.key === id && TooltipRenderer ? (\n <FocusableRegion\n id={id}\n y={y}\n x={x}\n width={width}\n height={height}\n transform={transform}\n content={<TooltipRenderer data={[{ name, yValue, xValue, datum }]} />}\n />\n ) : (\n ''\n )}\n </g>\n </g>\n ),\n [\n clipPathSign,\n isFocused,\n chartId,\n transform,\n handleMouseEnter,\n handleOnMouseLeave,\n isHorizontal,\n x,\n y,\n width,\n height,\n datum,\n xAxis.label,\n xValueFormatted,\n finalYAxis?.label,\n yValueFormatted,\n activePoint?.key,\n id,\n TooltipRenderer,\n name,\n yValue,\n xValue,\n ],\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoEf;AApER,mBAAwD;AACxD,0BAA6B;AAC7B,uBAA2B;AAC3B,6BAAgC;AAChC,yBAAmC;AAe5B,MAAM,OAAuC,CAAC;AAAA,EACnD;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AAAA,EACb,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,OAAO,EAAE,iBAAiB,UAAU,OAAO,OAAO,OAAO;AAAA,EAC3D,QAAI,yBAAW,gCAAY;AAC3B,QAAM,aAAa,MAAM,UAAU,OAAO,SAAS;AACnD,QAAM,kBAAkB,mBAAmB,KAAK;AAChD,QAAM,kBAAkB,mBAAmB,KAAK;AAEhD,QAAM,YAAY,aAAa,QAAQ;AACvC,QAAM,mBAAe,sBAAQ,MAAM;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ACnB,MAAK;AAAA,cACL,UAAU;AAAA,cACV,KAAK,CAAC,SAAS;AACb,oBAAI,WAAW;AACb,wBAAM,MAAM;AAAA,gBACd;AAAA,cACF;AAAA;AAAA,UACD;AAAA,UACA,aAAa,QAAQ,MAAM,kBAC1B;AAAA,YAAC;AAAA;AAAA,cACC;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA,cACA,SAAS,4CAAC,mBAAgB,MAAM,CAAC,EAAE,MAAM,QAAQ,QAAQ,MAAM,CAAC,GAAG;AAAA;AAAA,UACrE,IAEA;AAAA;AAAA;AAAA,IAEJ,GACF;AAAA,IAEF;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,MAAM;AAAA,MACN;AAAA,MACA,YAAY;AAAA,MACZ;AAAA,MACA,aAAa;AAAA,MACb;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;",
6
- "names": []
4
+ "sourcesContent": ["/* eslint-disable complexity */\nimport React, { useMemo, useContext, useCallback } from 'react';\nimport { ThemeContext } from '@elliemae/ds-system';\nimport { ChartContext } from '../ChartContext.js';\nimport { useChartInteraction } from '../config/chartInteractionStore.js';\nimport { FOCUS_RING, MARKS } from '../../constants.js';\nimport { FocusableRegion } from '../parts/FocusableRegion.js';\nimport { StyledBarGroup } from '../styles.js';\nimport { getBarPath, type BarDataEndT } from '../helpers/barPath.js';\nimport { getDatumLabel } from '../helpers/index.js';\nimport type { DSChartT } from '../../../react-desc-prop-types.js';\ninterface RectProps {\n name: string;\n width: number;\n height: number;\n isNegative?: boolean;\n // false for the inner segments of a stack: only the outer end of a stack is rounded\n isStackEdge?: boolean;\n x?: number;\n y?: number;\n id: string;\n xValue: number;\n yValue: number;\n datum: DSChartT.InternalDatum;\n}\n\n// distance from the bar to the middle of its focus ring stroke: the gap, then half the stroke\nconst FOCUS_RING_DISTANCE = FOCUS_RING.GAP + FOCUS_RING.STROKE_WIDTH / 2;\n\n// the end of the bar away from its baseline; none for the inner segments of a stack\nconst getDataEnd = (isHorizontal: boolean, isNegativeValue: boolean, isStackEdge: boolean): BarDataEndT => {\n if (!isStackEdge) return 'none';\n if (isHorizontal) return isNegativeValue ? 'left' : 'right';\n return isNegativeValue ? 'bottom' : 'top';\n};\n\n// Memoized, like Point: the bars that stay in the window of a scrollable chart skip the render when it moves\nexport const Rect = React.memo<RectProps>(\n ({ name, width, height, isNegative = false, isStackEdge = true, x = 0, y = 0, id, xValue, yValue, datum }) => {\n const {\n chartId,\n isHorizontal,\n setActivePoint,\n getYValueFormatted,\n getXValueFormatted,\n getOwnerProps,\n containerRef,\n props: { TooltipRenderer, scrapper, xAxis, yAxis, y2Axis },\n } = useContext(ChartContext);\n const theme = useContext(ThemeContext);\n const focusRingColor = theme?.colors?.brand?.['700'] ?? FOCUS_RING.COLOR;\n const finalYAxis = datum.scale === 'y2' ? y2Axis : yAxis;\n const yValueFormatted = getYValueFormatted(datum);\n const xValueFormatted = getXValueFormatted(datum);\n\n // its own slice of the hover state: a hover re-renders this bar only when it becomes active or stops being so\n const isFocused = useChartInteraction((state) => state.activePoint?.key === id);\n const clipPathSign = useMemo(() => {\n // @todo horizontal clip paths\n if (isHorizontal) return '';\n if (isNegative) return `url(#rects-negative-${chartId})`;\n return `url(#rects-positive-${chartId})`;\n }, [chartId, isHorizontal, isNegative]);\n\n // The visible bar: as thick as its band allows up to the maximum thickness, centered in the band, with its data end\n // (the end away from the baseline) rounded. The sign comes from the raw value, the stacked ones receive a length.\n const bar = useMemo(() => {\n const rawValue = typeof datum.value === 'number' ? datum.value : datum.value?.[isHorizontal ? 'x' : 'y'];\n const isNegativeValue = isNegative || (rawValue ?? 0) < 0;\n if (isHorizontal) {\n const thickness = Math.min(height, MARKS.BAR_MAX_THICKNESS);\n const dataEnd = getDataEnd(true, isNegativeValue, isStackEdge);\n return { x, y: -y + (height - thickness) / 2, width: Math.max(width, 0), height: thickness, dataEnd };\n }\n const thickness = Math.min(width, MARKS.BAR_MAX_THICKNESS);\n const dataEnd = getDataEnd(false, isNegativeValue, isStackEdge);\n return { x: x + (width - thickness) / 2, y, width: thickness, height: Math.max(height, 0), dataEnd };\n }, [datum.value, height, isHorizontal, isNegative, isStackEdge, width, x, y]);\n\n const handleMouseEnter = useCallback(() => {\n if (!scrapper) setActivePoint(datum);\n }, [datum, scrapper, setActivePoint]);\n\n const handleOnMouseLeave = useCallback(() => {\n if (!scrapper) setActivePoint(null);\n }, [scrapper, setActivePoint]);\n\n return useMemo(\n () => (\n <g clipPath={clipPathSign}>\n <StyledBarGroup\n id={isFocused ? `data-focused-${chartId}` : ''}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={() => ({ datum })}\n >\n {isFocused ? (\n <rect\n x={bar.x - FOCUS_RING_DISTANCE}\n y={bar.y - FOCUS_RING_DISTANCE}\n width={bar.width + FOCUS_RING_DISTANCE * 2}\n height={bar.height + FOCUS_RING_DISTANCE * 2}\n fill=\"none\"\n rx={MARKS.BAR_RADIUS + FOCUS_RING_DISTANCE}\n stroke={focusRingColor}\n strokeWidth={FOCUS_RING.STROKE_WIDTH}\n ></rect>\n ) : null}\n <path\n d={getBarPath({ ...bar, radius: MARKS.BAR_RADIUS })}\n aria-label={getDatumLabel([\n datum.serie,\n xAxis.label,\n xValueFormatted,\n finalYAxis?.label,\n yValueFormatted,\n ])}\n role=\"img\"\n tabIndex={-1}\n ref={(_ref) => {\n // the keyboard focus follows the active point only while it is already in the chart: hovering a bar\n // must not pull the focus away from the rest of the page\n if (isFocused && containerRef?.contains(document.activeElement)) {\n _ref?.focus();\n }\n }}\n ></path>\n {/* with a scrapper, its tooltip shows every series of the position, this one included */}\n {isFocused && TooltipRenderer && !scrapper ? (\n <FocusableRegion\n id={id}\n y={bar.y}\n x={bar.x}\n width={bar.width}\n height={bar.height}\n content={<TooltipRenderer data={[{ name, yValue, xValue, datum }]} />}\n />\n ) : (\n ''\n )}\n </StyledBarGroup>\n </g>\n ),\n [\n clipPathSign,\n isFocused,\n chartId,\n handleMouseEnter,\n handleOnMouseLeave,\n bar,\n focusRingColor,\n datum,\n xAxis.label,\n xValueFormatted,\n finalYAxis?.label,\n yValueFormatted,\n id,\n TooltipRenderer,\n scrapper,\n name,\n yValue,\n xValue,\n getOwnerProps,\n containerRef,\n ],\n );\n },\n);\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD0Fb;AAzFV,mBAAwD;AACxD,uBAA6B;AAC7B,0BAA6B;AAC7B,mCAAoC;AACpC,uBAAkC;AAClC,6BAAgC;AAChC,oBAA+B;AAC/B,qBAA6C;AAC7C,qBAA8B;AAkB9B,MAAM,sBAAsB,4BAAW,MAAM,4BAAW,eAAe;AAGvE,MAAM,aAAa,CAAC,cAAuB,iBAA0B,gBAAsC;AACzG,MAAI,CAAC,YAAa,QAAO;AACzB,MAAI,aAAc,QAAO,kBAAkB,SAAS;AACpD,SAAO,kBAAkB,WAAW;AACtC;AAGO,MAAM,OAAO,aAAAA,QAAM;AAAA,EACxB,CAAC,EAAE,MAAM,OAAO,QAAQ,aAAa,OAAO,cAAc,MAAM,IAAI,GAAG,IAAI,GAAG,IAAI,QAAQ,QAAQ,MAAM,MAAM;AAC5G,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAO,EAAE,iBAAiB,UAAU,OAAO,OAAO,OAAO;AAAA,IAC3D,QAAI,yBAAW,gCAAY;AAC3B,UAAM,YAAQ,yBAAW,6BAAY;AACrC,UAAM,iBAAiB,OAAO,QAAQ,QAAQ,KAAK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AC,GAAG;AAAA;AAAA,YACrE,IAEA;AAAA;AAAA;AAAA,MAEJ,GACF;AAAA,MAEF;AAAA,QACE;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,MAAM;AAAA,QACN;AAAA,QACA,YAAY;AAAA,QACZ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;",
6
+ "names": ["React", "thickness", "dataEnd"]
7
7
  }
@@ -36,7 +36,9 @@ var import_jsx_runtime = require("react/jsx-runtime");
36
36
  var import_react = require("react");
37
37
  var import_Rect = require("./Rect.js");
38
38
  var import_ChartContext = require("../ChartContext.js");
39
+ var import_useSerieDimming = require("../helpers/useSerieDimming.js");
39
40
  var import_helpers = require("../helpers/index.js");
41
+ var import_constants = require("../../constants.js");
40
42
  const StackedBar = ({ serie }) => {
41
43
  const {
42
44
  props: { groups },
@@ -44,6 +46,7 @@ const StackedBar = ({ serie }) => {
44
46
  yScale,
45
47
  stackedData,
46
48
  subGroupScale,
49
+ getBandwidth,
47
50
  colorScale,
48
51
  chartId,
49
52
  getXValue,
@@ -51,16 +54,20 @@ const StackedBar = ({ serie }) => {
51
54
  } = (0, import_react.useContext)(import_ChartContext.ChartContext);
52
55
  const serieWithStackedValues = (0, import_helpers.getStackedData)(stackedData, serie);
53
56
  const stackIndex = (0, import_helpers.getStackedIndex)(groups, serie.name);
54
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { clipPath: `url(#rect-focus-ring-${chartId})`, children: serie.data.map((bar, i) => {
57
+ const dimmedStyle = (0, import_useSerieDimming.useSerieDimming)(serie.name);
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { clipPath: `url(#rect-focus-ring-${chartId})`, style: dimmedStyle, children: serie.data.map((bar, i) => {
55
59
  const sequence = serieWithStackedValues ? serieWithStackedValues[bar.position] : [0, 0];
56
- const isFloorStack = sequence[0] === 0;
60
+ const isNegativeSegment = sequence[0] < 0;
61
+ const gapBelow = !isNegativeSegment && sequence[0] > 0 ? import_constants.MARKS.STACK_GAP : 0;
62
+ const gapAbove = isNegativeSegment && sequence[1] < 0 ? import_constants.MARKS.STACK_GAP : 0;
57
63
  const xValue = getXValue(bar);
58
64
  const xScaleValue = getXScaleValue(bar) ?? 0;
59
65
  const yValue = sequence[1] - sequence[0];
60
66
  const width = subGroupScale?.bandwidth() ?? 0;
61
- const height = (yScale?.get(sequence[0]) ?? 0) - (yScale?.get(sequence[1]) ?? 0) - (!isFloorStack ? 1 : 0);
62
- const transformY = (yScale?.get(sequence[1]) ?? 0) + (sequence[0] < 0 ? 2 : 0);
63
- const transformX = xScale?.type !== "BAND" ? xScaleValue - width / 2 : xScaleValue + (subGroupScale ? subGroupScale(`stacked-data-${stackIndex}`) ?? 0 : 0);
67
+ const height = (yScale?.get(sequence[0]) ?? 0) - (yScale?.get(sequence[1]) ?? 0) - gapBelow - gapAbove;
68
+ const transformY = (yScale?.get(sequence[1]) ?? 0) + gapAbove;
69
+ const slotStart = xScale?.type !== "BAND" ? xScaleValue - getBandwidth() / 2 : xScaleValue;
70
+ const transformX = slotStart + (subGroupScale ? subGroupScale(`stacked-data-${stackIndex}`) ?? 0 : 0);
64
71
  return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { fill: colorScale(serie.name), transform: `translate(${transformX},0)`, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
65
72
  import_Rect.Rect,
66
73
  {
@@ -71,7 +78,8 @@ const StackedBar = ({ serie }) => {
71
78
  y: transformY,
72
79
  id: serie.data[i].key,
73
80
  name: serie.name,
74
- datum: bar
81
+ datum: bar,
82
+ isStackEdge: (0, import_helpers.isStackedSegmentEdge)(stackedData, serie, bar.position)
75
83
  }
76
84
  ) }, serie.data[i].key);
77
85
  }) });
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../src/graphs/Chart/series/StackedBar.tsx", "../../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable complexity */\n/* prettier-ignore */\nimport React, { useContext } from 'react';\nimport { Rect } from './Rect.js';\nimport { ChartContext } from '../ChartContext.js';\nimport { getStackedData, getStackedIndex } from '../helpers/index.js';\nimport type { DSChartT } from '../react-desc-prop-types.js';\n\nexport const StackedBar: React.ComponentType<DSChartT.SerieComponentT> = ({ serie }) => {\n const {\n props: { groups },\n xScale,\n yScale,\n stackedData,\n subGroupScale,\n colorScale,\n chartId,\n getXValue,\n getXScaleValue,\n } = useContext(ChartContext);\n\n const serieWithStackedValues = getStackedData(stackedData, serie);\n const stackIndex = getStackedIndex(groups, serie.name);\n return (\n <g clipPath={`url(#rect-focus-ring-${chartId})`}>\n {serie.data.map((bar, i) => {\n const sequence = serieWithStackedValues ? serieWithStackedValues[bar.position] : [0, 0];\n\n const isFloorStack = sequence[0] === 0;\n\n const xValue = getXValue(bar) as number;\n const xScaleValue = getXScaleValue(bar) ?? 0;\n const yValue = sequence[1] - sequence[0];\n const width = subGroupScale?.bandwidth() ?? 0;\n const height =\n (yScale?.get(sequence[0] as never) ?? 0) - (yScale?.get(sequence[1] as never) ?? 0) - (!isFloorStack ? 1 : 0);\n const transformY = (yScale?.get(sequence[1] as never) ?? 0) + (sequence[0] < 0 ? 2 : 0);\n\n const transformX =\n xScale?.type !== 'BAND'\n ? xScaleValue - width / 2\n : xScaleValue + (subGroupScale ? (subGroupScale(`stacked-data-${stackIndex}`) ?? 0) : 0);\n return (\n <g key={serie.data[i].key} fill={colorScale(serie.name) as string} transform={`translate(${transformX},0)`}>\n <Rect\n width={width}\n height={height}\n xValue={xValue}\n yValue={yValue}\n y={transformY}\n id={serie.data[i].key}\n name={serie.name}\n datum={bar}\n />\n </g>\n );\n })}\n </g>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;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AA,QACA;AAAA,QACA;AAAA,QACA,GAAG;AAAA,QACH,IAAI,MAAM,KAAK,CAAC,EAAE;AAAA,QAClB,MAAM,MAAM;AAAA,QACZ,OAAO;AAAA;AAAA,IACT,KAVM,MAAM,KAAK,CAAC,EAAE,GAWtB;AAAA,EAEJ,CAAC,GACH;AAEJ;",
4
+ "sourcesContent": ["/* eslint-disable complexity */\n/* prettier-ignore */\nimport React, { useContext } from 'react';\nimport { Rect } from './Rect.js';\nimport { ChartContext } from '../ChartContext.js';\nimport { useSerieDimming } from '../helpers/useSerieDimming.js';\nimport { getStackedData, getStackedIndex, isStackedSegmentEdge } from '../helpers/index.js';\nimport { MARKS } from '../../constants.js';\nimport type { DSChartT } from '../../../react-desc-prop-types.js';\n\nexport const StackedBar: React.ComponentType<DSChartT.SerieComponentT> = ({ serie }) => {\n const {\n props: { groups },\n xScale,\n yScale,\n stackedData,\n subGroupScale,\n getBandwidth,\n colorScale,\n chartId,\n getXValue,\n getXScaleValue,\n } = useContext(ChartContext);\n\n const serieWithStackedValues = getStackedData(stackedData, serie);\n const stackIndex = getStackedIndex(groups, serie.name);\n const dimmedStyle = useSerieDimming(serie.name);\n return (\n <g clipPath={`url(#rect-focus-ring-${chartId})`} style={dimmedStyle}>\n {serie.data.map((bar, i) => {\n const sequence = serieWithStackedValues ? serieWithStackedValues[bar.position] : [0, 0];\n\n // the surface gap sits on the side of the previous segment: below a positive one, above a negative one\n const isNegativeSegment = sequence[0] < 0;\n const gapBelow = !isNegativeSegment && sequence[0] > 0 ? MARKS.STACK_GAP : 0;\n const gapAbove = isNegativeSegment && sequence[1] < 0 ? MARKS.STACK_GAP : 0;\n\n const xValue = getXValue(bar) as number;\n const xScaleValue = getXScaleValue(bar) ?? 0;\n const yValue = sequence[1] - sequence[0];\n const width = subGroupScale?.bandwidth() ?? 0;\n const height =\n (yScale?.get(sequence[0] as never) ?? 0) - (yScale?.get(sequence[1] as never) ?? 0) - gapBelow - gapAbove;\n const transformY = (yScale?.get(sequence[1] as never) ?? 0) + gapAbove;\n\n // the slot of the value, centered on it on a linear or a time axis, with each stack in its place (see Bars)\n const slotStart = xScale?.type !== 'BAND' ? xScaleValue - getBandwidth() / 2 : xScaleValue;\n const transformX = slotStart + (subGroupScale ? (subGroupScale(`stacked-data-${stackIndex}`) ?? 0) : 0);\n return (\n <g key={serie.data[i].key} fill={colorScale(serie.name) as string} transform={`translate(${transformX},0)`}>\n <Rect\n width={width}\n height={height}\n xValue={xValue}\n yValue={yValue}\n y={transformY}\n id={serie.data[i].key}\n name={serie.name}\n datum={bar}\n isStackEdge={isStackedSegmentEdge(stackedData, serie, bar.position)}\n />\n </g>\n );\n })}\n </g>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADkDX;AAhDZ,mBAAkC;AAClC,kBAAqB;AACrB,0BAA6B;AAC7B,6BAAgC;AAChC,qBAAsE;AACtE,uBAAsB;AAGf,MAAM,aAA4D,CAAC,EAAE,MAAM,MAAM;AACtF,QAAM;AAAA,IACJ,OAAO,EAAE,OAAO;AAAA,IAChB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,yBAAW,gCAAY;AAE3B,QAAM,6BAAyB,+BAAe,aAAa,KAAK;AAChE,QAAM,iBAAa,gCAAgB,QAAQ,MAAM,IAAI;AACrD,QAAM,kBAAc,wCAAgB,MAAM,IAAI;AAC9C,SACE,4CAAC,OAAE,UAAU,wBAAwB,OAAO,KAAK,OAAO,aACrD,gBAAM,KAAK,IAAI,CAAC,KAAK,MAAM;AAC1B,UAAM,WAAW,yBAAyB,uBAAuB,IAAI,QAAQ,IAAI,CAAC,GAAG,CAAC;AAGtF,UAAM,oBAAoB,SAAS,CAAC,IAAI;AACxC,UAAM,WAAW,CAAC,qBAAqB,SAAS,CAAC,IAAI,IAAI,uBAAM,YAAY;AAC3E,UAAM,WAAW,qBAAqB,SAAS,CAAC,IAAI,IAAI,uBAAM,YAAY;AAE1E,UAAM,SAAS,UAAU,GAAG;AAC5B,UAAM,cAAc,eAAe,GAAG,KAAK;AAC3C,UAAM,SAAS,SAAS,CAAC,IAAI,SAAS,CAAC;AACvC,UAAM,QAAQ,eAAe,UAAU,KAAK;AAC5C,UAAM,UACH,QAAQ,IAAI,SAAS,CAAC,CAAU,KAAK,MAAM,QAAQ,IAAI,SAAS,CAAC,CAAU,KAAK,KAAK,WAAW;AACnG,UAAM,cAAc,QAAQ,IAAI,SAAS,CAAC,CAAU,KAAK,KAAK;AAG9D,UAAM,YAAY,QAAQ,SAAS,SAAS,cAAc,aAAa,IAAI,IAAI;AAC/E,UAAM,aAAa,aAAa,gBAAiB,cAAc,gBAAgB,UAAU,EAAE,KAAK,IAAK;AACrG,WACE,4CAAC,OAA0B,MAAM,WAAW,MAAM,IAAI,GAAa,WAAW,aAAa,UAAU,OACnG;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,GAAG;AAAA,QACH,IAAI,MAAM,KAAK,CAAC,EAAE;AAAA,QAClB,MAAM,MAAM;AAAA,QACZ,OAAO;AAAA,QACP,iBAAa,qCAAqB,aAAa,OAAO,IAAI,QAAQ;AAAA;AAAA,IACpE,KAXM,MAAM,KAAK,CAAC,EAAE,GAYtB;AAAA,EAEJ,CAAC,GACH;AAEJ;",
6
6
  "names": []
7
7
  }
@@ -28,24 +28,31 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
29
  var styles_exports = {};
30
30
  __export(styles_exports, {
31
- StyleFocusableRegion: () => StyleFocusableRegion,
32
31
  StyledArea: () => StyledArea,
33
32
  StyledAxis: () => StyledAxis,
34
33
  StyledAxisLabel: () => StyledAxisLabel,
35
- StyledGrid: () => StyledGrid,
36
- StyledLine: () => StyledLine,
34
+ StyledBarGroup: () => StyledBarGroup,
35
+ StyledLineGroup: () => StyledLineGroup,
37
36
  StyledMouseOverDetectionBox: () => StyledMouseOverDetectionBox,
37
+ StyledPointGroup: () => StyledPointGroup,
38
+ StyledResetter: () => StyledResetter,
38
39
  StyledSVGWrapper: () => StyledSVGWrapper,
39
- StyledTooltipContainer: () => StyledTooltipContainer
40
+ StyledTooltipContainer: () => StyledTooltipContainer,
41
+ StyledZoomInButton: () => StyledZoomInButton,
42
+ StyledZoomOutButton: () => StyledZoomOutButton,
43
+ TOOLTIP_CONTENT_SLOT_PROPS: () => TOOLTIP_CONTENT_SLOT_PROPS
40
44
  });
41
45
  module.exports = __toCommonJS(styles_exports);
42
46
  var React = __toESM(require("react"));
43
47
  var import_ds_system = require("@elliemae/ds-system");
44
- const StyledSVGWrapper = import_ds_system.styled.div`
48
+ var import_constants = require("../../constants/index.js");
49
+ const StyledSVGWrapper = (0, import_ds_system.styled)("div", { name: import_constants.DSDatavizName, slot: import_constants.DATAVIZ_SLOTS.ROOT })`
45
50
  rect:focus,
46
51
  rect:focus-visible,
47
52
  circle:focus,
48
- circle:focus-visible {
53
+ circle:focus-visible,
54
+ path:focus,
55
+ path:focus-visible {
49
56
  outline: none;
50
57
  }
51
58
 
@@ -54,51 +61,55 @@ const StyledSVGWrapper = import_ds_system.styled.div`
54
61
  outline: none;
55
62
  }
56
63
 
64
+ /* the series that step back while a legend item is hovered fade in and out (see useSerieDimming); the roots of the
65
+ series are the groups of the content, or of the groups that tell how each series enters */
66
+ g.content > g,
67
+ g.content > [data-entrance-animation] > g {
68
+ transition: opacity 150ms ease-out;
69
+ }
70
+
71
+ /* a legend item reached with the keyboard, in the color of the focus ring of the data points */
72
+ g.cell:focus-visible {
73
+ outline: 2px solid ${({ theme }) => theme.colors.brand["700"]};
74
+ outline-offset: 2px;
75
+ }
76
+
57
77
  cursor: ${({ isGrabbed }) => isGrabbed ? "grabbing" : "default"};
58
78
 
59
79
  text {
60
- font-size: 1rem;
80
+ font-size: ${({ theme }) => theme.fontSizes.label[300]};
61
81
  }
62
82
 
63
83
  min-width: 300px;
64
84
  `;
65
- const StyledAxis = (0, import_ds_system.styled)("line")`
66
- stroke-width: 2px;
67
- stroke: ${({ theme }) => theme.colors.neutral["700"]};
85
+ const StyledAxis = (0, import_ds_system.styled)("line", { name: import_constants.DSDatavizName, slot: import_constants.DATAVIZ_SLOTS.AXIS_LINE })`
86
+ stroke-width: 1px;
87
+ shape-rendering: crispEdges;
88
+ /* a hairline baseline; the vertical axes rely on their labels and the grid unless they are given a color */
89
+ stroke: ${({ theme, isVertical }) => isVertical ? "transparent" : theme.colors.neutral["300"]};
68
90
  ${({ axisColor }) => axisColor ? `stroke: ${axisColor}` : ""}
69
91
  `;
70
- const StyledAxisLabel = (0, import_ds_system.styled)("text")`
71
- font-size: 1rem;
92
+ const StyledAxisLabel = (0, import_ds_system.styled)("text", { name: import_constants.DSDatavizName, slot: import_constants.DATAVIZ_SLOTS.AXIS_LABEL })`
72
93
  font-weight: 600;
94
+ fill: ${({ theme }) => theme.colors.neutral["700"]};
73
95
  `;
74
- const StyledGrid = (0, import_ds_system.styled)("g")`
75
- line {
76
- opacity: 0.2;
77
- }
78
- `;
79
- const StyleFocusableRegion = import_ds_system.styled.div`
80
- width: ${({ size = 1 }) => size * 2}px;
81
- height: ${({ size = 1 }) => size * 2}px;
82
- outline: none;
83
- &:focus {
84
- outline: none;
85
- }
86
- `;
87
- const StyledLine = (0, import_ds_system.styled)("path")`
88
- fill: none;
96
+ const StyledLineGroup = (0, import_ds_system.styled)("g", { name: import_constants.DSDatavizName, slot: import_constants.DATAVIZ_SLOTS.LINE })``;
97
+ const StyledArea = (0, import_ds_system.styled)("path", { name: import_constants.DSDatavizName, slot: import_constants.DATAVIZ_SLOTS.AREA })`
89
98
  stroke-width: 3;
90
99
  stroke-linejoin: round;
91
100
  `;
92
- const StyledArea = (0, import_ds_system.styled)("path")`
93
- stroke-width: 3;
94
- stroke-linejoin: round;
95
- opacity: 0.2;
96
- `;
97
- const StyledTooltipContainer = import_ds_system.styled.div`
101
+ const StyledBarGroup = (0, import_ds_system.styled)("g", { name: import_constants.DSDatavizName, slot: import_constants.DATAVIZ_SLOTS.BAR })``;
102
+ const StyledPointGroup = (0, import_ds_system.styled)("g", { name: import_constants.DSDatavizName, slot: import_constants.DATAVIZ_SLOTS.POINT })``;
103
+ const StyledTooltipContainer = (0, import_ds_system.styled)("div", { name: import_constants.DSDatavizName, slot: import_constants.DATAVIZ_SLOTS.TOOLTIP })`
98
104
  max-width: 350px;
99
105
  background-color: white;
106
+ border-radius: inherit;
100
107
  `;
101
- const StyledMouseOverDetectionBox = import_ds_system.styled.div`
108
+ const TOOLTIP_CONTENT_SLOT_PROPS = { style: { borderRadius: "4px" } };
109
+ const StyledMouseOverDetectionBox = (0, import_ds_system.styled)("div", {
110
+ name: import_constants.DSDatavizName,
111
+ slot: import_constants.DATAVIZ_SLOTS.TOOLTIP_HOVER_AREA
112
+ })`
102
113
  position: absolute;
103
114
  top: -15px;
104
115
  right: -15px;
@@ -106,4 +117,24 @@ const StyledMouseOverDetectionBox = import_ds_system.styled.div`
106
117
  height: calc(100% + 30px);
107
118
  z-index: -1;
108
119
  `;
120
+ const toolbarButtonStyles = import_ds_system.css`
121
+ cursor: ${({ isDisabled }) => isDisabled ? "not-allowed" : "pointer"};
122
+ opacity: ${({ isDisabled }) => isDisabled ? "0.4" : "1"};
123
+ &:focus {
124
+ outline: none;
125
+ }
126
+ &:focus-visible {
127
+ outline: 2px solid ${({ theme }) => theme.colors.brand["700"]};
128
+ outline-offset: 2px;
129
+ }
130
+ `;
131
+ const StyledResetter = (0, import_ds_system.styled)("g", { name: import_constants.DSDatavizName, slot: import_constants.DATAVIZ_SLOTS.RESET_ZOOM_BUTTON })`
132
+ ${toolbarButtonStyles}
133
+ `;
134
+ const StyledZoomInButton = (0, import_ds_system.styled)("g", { name: import_constants.DSDatavizName, slot: import_constants.DATAVIZ_SLOTS.ZOOM_IN_BUTTON })`
135
+ ${toolbarButtonStyles}
136
+ `;
137
+ const StyledZoomOutButton = (0, import_ds_system.styled)("g", { name: import_constants.DSDatavizName, slot: import_constants.DATAVIZ_SLOTS.ZOOM_OUT_BUTTON })`
138
+ ${toolbarButtonStyles}
139
+ `;
109
140
  //# sourceMappingURL=styles.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/graphs/Chart/styles.tsx", "../../../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import { styled } from '@elliemae/ds-system';\n\ninterface StyledAxisT {\n axisColor: string;\n}\nexport const StyledSVGWrapper = styled.div<{ isGrabbed: boolean }>`\n rect:focus,\n rect:focus-visible,\n circle:focus,\n circle:focus-visible {\n outline: none;\n }\n\n :focus,\n :focus-visible {\n outline: none;\n }\n\n cursor: ${({ isGrabbed }) => (isGrabbed ? 'grabbing' : 'default')};\n\n text {\n font-size: 1rem;\n }\n\n min-width: 300px;\n`;\n\nexport const StyledAxis = styled('line')<StyledAxisT>`\n stroke-width: 2px;\n stroke: ${({ theme }) => theme.colors.neutral['700']};\n ${({ axisColor }) => (axisColor ? `stroke: ${axisColor}` : '')}\n`;\n\nexport const StyledAxisLabel = styled('text')`\n font-size: 1rem;\n font-weight: 600;\n`;\n\nexport const StyledGrid = styled('g')`\n line {\n opacity: 0.2;\n }\n`;\n\nexport const StyleFocusableRegion = styled.div<{ size?: number }>`\n width: ${({ size = 1 }) => size * 2}px;\n height: ${({ size = 1 }) => size * 2}px;\n outline: none;\n &:focus {\n outline: none;\n }\n`;\n\nexport const StyledLine = styled('path')`\n fill: none;\n stroke-width: 3;\n stroke-linejoin: round;\n`;\nexport const StyledArea = styled('path')`\n stroke-width: 3;\n stroke-linejoin: round;\n opacity: 0.2;\n`;\n\nexport const StyledTooltipContainer = styled.div`\n max-width: 350px;\n background-color: white;\n`;\n\nexport const StyledMouseOverDetectionBox = styled.div`\n position: absolute;\n top: -15px;\n right: -15px;\n width: calc(100% + 30px);\n height: calc(100% + 30px);\n z-index: -1;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AAKhB,MAAM,mBAAmB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAa3B,CAAC,EAAE,UAAU,MAAO,YAAY,aAAa,SAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS5D,MAAM,iBAAa,yBAAO,MAAM;AAAA;AAAA,YAE3B,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK,CAAC;AAAA,IAClD,CAAC,EAAE,UAAU,MAAO,YAAY,WAAW,SAAS,KAAK,EAAG;AAAA;AAGzD,MAAM,sBAAkB,yBAAO,MAAM;AAAA;AAAA;AAAA;AAKrC,MAAM,iBAAa,yBAAO,GAAG;AAAA;AAAA;AAAA;AAAA;AAM7B,MAAM,uBAAuB,wBAAO;AAAA,WAChC,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAAA,YACzB,CAAC,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAO/B,MAAM,iBAAa,yBAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAKhC,MAAM,iBAAa,yBAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAMhC,MAAM,yBAAyB,wBAAO;AAAA;AAAA;AAAA;AAKtC,MAAM,8BAA8B,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
4
+ "sourcesContent": ["import { css, styled } from '@elliemae/ds-system';\nimport { DATAVIZ_SLOTS, DSDatavizName } from '../../constants/index.js';\n\ninterface StyledAxisT {\n axisColor: string;\n isVertical: boolean;\n}\nexport const StyledSVGWrapper = styled('div', { name: DSDatavizName, slot: DATAVIZ_SLOTS.ROOT })<{\n isGrabbed: boolean;\n}>`\n rect:focus,\n rect:focus-visible,\n circle:focus,\n circle:focus-visible,\n path:focus,\n path:focus-visible {\n outline: none;\n }\n\n :focus,\n :focus-visible {\n outline: none;\n }\n\n /* the series that step back while a legend item is hovered fade in and out (see useSerieDimming); the roots of the\n series are the groups of the content, or of the groups that tell how each series enters */\n g.content > g,\n g.content > [data-entrance-animation] > g {\n transition: opacity 150ms ease-out;\n }\n\n /* a legend item reached with the keyboard, in the color of the focus ring of the data points */\n g.cell:focus-visible {\n outline: 2px solid ${({ theme }) => theme.colors.brand['700']};\n outline-offset: 2px;\n }\n\n cursor: ${({ isGrabbed }) => (isGrabbed ? 'grabbing' : 'default')};\n\n text {\n font-size: ${({ theme }) => theme.fontSizes.label[300]};\n }\n\n min-width: 300px;\n`;\n\nexport const StyledAxis = styled('line', { name: DSDatavizName, slot: DATAVIZ_SLOTS.AXIS_LINE })<StyledAxisT>`\n stroke-width: 1px;\n shape-rendering: crispEdges;\n /* a hairline baseline; the vertical axes rely on their labels and the grid unless they are given a color */\n stroke: ${({ theme, isVertical }) => (isVertical ? 'transparent' : theme.colors.neutral['300'])};\n ${({ axisColor }) => (axisColor ? `stroke: ${axisColor}` : '')}\n`;\n\nexport const StyledAxisLabel = styled('text', { name: DSDatavizName, slot: DATAVIZ_SLOTS.AXIS_LABEL })`\n font-weight: 600;\n fill: ${({ theme }) => theme.colors.neutral['700']};\n`;\n\n// the line series is drawn with d3 inside this group, so the group is the slot\nexport const StyledLineGroup = styled('g', { name: DSDatavizName, slot: DATAVIZ_SLOTS.LINE })``;\n\n// filled with a vertical gradient of the series color (see Area), so overlapping areas stay readable\nexport const StyledArea = styled('path', { name: DSDatavizName, slot: DATAVIZ_SLOTS.AREA })`\n stroke-width: 3;\n stroke-linejoin: round;\n`;\n\nexport const StyledBarGroup = styled('g', { name: DSDatavizName, slot: DATAVIZ_SLOTS.BAR })``;\n\nexport const StyledPointGroup = styled('g', { name: DSDatavizName, slot: DATAVIZ_SLOTS.POINT })``;\n\nexport const StyledTooltipContainer = styled('div', { name: DSDatavizName, slot: DATAVIZ_SLOTS.TOOLTIP })`\n max-width: 350px;\n background-color: white;\n border-radius: inherit;\n`;\n\n// slot props for the content box of the floating wrapper, the box that carries the tooltip shadow: rounded corners\nexport const TOOLTIP_CONTENT_SLOT_PROPS = { style: { borderRadius: '4px' } };\n\nexport const StyledMouseOverDetectionBox = styled('div', {\n name: DSDatavizName,\n slot: DATAVIZ_SLOTS.TOOLTIP_HOVER_AREA,\n})`\n position: absolute;\n top: -15px;\n right: -15px;\n width: calc(100% + 30px);\n height: calc(100% + 30px);\n z-index: -1;\n`;\n\n// the buttons of the zoom toolbar: a disabled one fades and keeps its place; the focus ring is the one of the data\n// points (the \"&focus\" selector it had matched nothing, so the buttons showed no focus)\nconst toolbarButtonStyles = css<{ isDisabled: boolean }>`\n cursor: ${({ isDisabled }) => (isDisabled ? 'not-allowed' : 'pointer')};\n opacity: ${({ isDisabled }) => (isDisabled ? '0.4' : '1')};\n &:focus {\n outline: none;\n }\n &:focus-visible {\n outline: 2px solid ${({ theme }) => theme.colors.brand['700']};\n outline-offset: 2px;\n }\n`;\n\nexport const StyledResetter = styled('g', { name: DSDatavizName, slot: DATAVIZ_SLOTS.RESET_ZOOM_BUTTON })<{\n isDisabled: boolean;\n}>`\n ${toolbarButtonStyles}\n`;\n\nexport const StyledZoomInButton = styled('g', { name: DSDatavizName, slot: DATAVIZ_SLOTS.ZOOM_IN_BUTTON })<{\n isDisabled: boolean;\n}>`\n ${toolbarButtonStyles}\n`;\n\nexport const StyledZoomOutButton = styled('g', { name: DSDatavizName, slot: DATAVIZ_SLOTS.ZOOM_OUT_BUTTON })<{\n isDisabled: boolean;\n}>`\n ${toolbarButtonStyles}\n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