@fluentui/react-charts 9.2.3 → 9.3.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 (347) hide show
  1. package/CHANGELOG.md +79 -10
  2. package/dist/index.d.ts +98 -5
  3. package/lib/components/AreaChart/AreaChart.js +8 -6
  4. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  5. package/lib/components/AreaChart/useAreaChartStyles.styles.js +4 -2
  6. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  7. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +4 -15
  8. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  9. package/lib/components/ChartTable/ChartTable.js +95 -8
  10. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  11. package/lib/components/ChartTable/useChartTableStyles.styles.js +5 -3
  12. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  13. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +3 -2
  14. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  15. package/lib/components/CommonComponents/CartesianChart.js +45 -42
  16. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  17. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  18. package/lib/components/CommonComponents/ChartPopover.js +14 -5
  19. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  20. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +19 -14
  21. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  22. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +7 -33
  23. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  24. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +5 -3
  25. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  26. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
  27. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  28. package/lib/components/DeclarativeChart/DeclarativeChart.js +56 -16
  29. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  30. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +19 -0
  31. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  32. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +1096 -337
  33. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  34. package/lib/components/DeclarativeChart/imageExporter.js +1 -0
  35. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -1
  36. package/lib/components/DonutChart/Arc/Arc.js +8 -8
  37. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  38. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  39. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +9 -2
  40. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  41. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -1
  42. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  43. package/lib/components/DonutChart/DonutChart.js +61 -25
  44. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  45. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  46. package/lib/components/DonutChart/Pie/Pie.js +1 -0
  47. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  48. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  49. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +2 -0
  50. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  51. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js +1 -0
  52. package/lib/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
  53. package/lib/components/DonutChart/useDonutChartStyles.styles.js +23 -4
  54. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  55. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +9 -4
  56. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  57. package/lib/components/FunnelChart/FunnelChart.js +11 -5
  58. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  59. package/lib/components/FunnelChart/funnelGeometry.js.map +1 -1
  60. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +2 -0
  61. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  62. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +1 -0
  63. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  64. package/lib/components/GanttChart/GanttChart.js +1 -0
  65. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  66. package/lib/components/GaugeChart/GaugeChart.js +2 -2
  67. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  68. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +2 -0
  69. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  70. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +1 -0
  71. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  72. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +15 -9
  73. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  74. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +6 -17
  75. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  76. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +5 -21
  77. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  78. package/lib/components/HeatMapChart/HeatMapChart.js +2 -1
  79. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  80. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +2 -0
  81. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  82. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +1 -0
  83. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  84. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +3 -3
  85. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  86. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +8 -2
  87. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  88. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -1
  89. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  90. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
  91. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  92. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +2 -0
  93. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  94. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +1 -0
  95. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  96. package/lib/components/Legends/Legends.js +1 -0
  97. package/lib/components/Legends/Legends.js.map +1 -1
  98. package/lib/components/Legends/OverflowMenu.js +1 -0
  99. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  100. package/lib/components/Legends/shape.js +1 -0
  101. package/lib/components/Legends/shape.js.map +1 -1
  102. package/lib/components/Legends/useLegendsStyles.styles.js +2 -0
  103. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  104. package/lib/components/Legends/useLegendsStyles.styles.raw.js +1 -0
  105. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  106. package/lib/components/LineChart/LineChart.js +284 -281
  107. package/lib/components/LineChart/LineChart.js.map +1 -1
  108. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  109. package/lib/components/LineChart/eventAnnotation/LabelLink.js +1 -0
  110. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  111. package/lib/components/LineChart/eventAnnotation/Textbox.js +1 -0
  112. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  113. package/lib/components/LineChart/useLineChartStyles.styles.js +25 -10
  114. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  115. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +5 -21
  116. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  117. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +1 -0
  118. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  119. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +2 -0
  120. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
  121. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +1 -0
  122. package/lib/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
  123. package/lib/components/ResponsiveContainer/withResponsiveContainer.js +1 -0
  124. package/lib/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  125. package/lib/components/SankeyChart/SankeyChart.js +1 -0
  126. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  127. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +14 -25
  128. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  129. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +3 -12
  130. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  131. package/lib/components/ScatterChart/ScatterChart.js +121 -81
  132. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  133. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  134. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +13 -7
  135. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  136. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +5 -22
  137. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  138. package/lib/components/Sparkline/Sparkline.js +1 -0
  139. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  140. package/lib/components/Sparkline/useSparklineStyles.styles.js +2 -0
  141. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
  142. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js +1 -0
  143. package/lib/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
  144. package/lib/components/VerticalBarChart/VerticalBarChart.js +17 -12
  145. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  146. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +10 -6
  147. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  148. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +6 -19
  149. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  150. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +30 -25
  151. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  152. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +9 -6
  153. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  154. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +5 -19
  155. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  156. package/lib/types/DataPoint.js +3 -1
  157. package/lib/types/DataPoint.js.map +1 -1
  158. package/lib/utilities/Common.styles.js +47 -0
  159. package/lib/utilities/Common.styles.js.map +1 -0
  160. package/lib/utilities/Common.styles.raw.js +47 -0
  161. package/lib/utilities/Common.styles.raw.js.map +1 -0
  162. package/lib/utilities/FocusableTooltipText.js +1 -0
  163. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  164. package/lib/utilities/SVGTooltipText.js +1 -0
  165. package/lib/utilities/SVGTooltipText.js.map +1 -1
  166. package/lib/utilities/image-export-utils.js +1 -0
  167. package/lib/utilities/image-export-utils.js.map +1 -1
  168. package/lib/utilities/index.js +1 -0
  169. package/lib/utilities/index.js.map +1 -1
  170. package/lib/utilities/scatterpolar-utils.js +52 -0
  171. package/lib/utilities/scatterpolar-utils.js.map +1 -0
  172. package/lib/utilities/utilities.js +314 -146
  173. package/lib/utilities/utilities.js.map +1 -1
  174. package/lib/utilities/vbc-utils.js.map +1 -1
  175. package/lib-commonjs/components/AreaChart/AreaChart.js +7 -5
  176. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  177. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +1 -0
  178. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  179. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -14
  180. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  181. package/lib-commonjs/components/ChartTable/ChartTable.js +95 -8
  182. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  183. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +4 -3
  184. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  185. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +3 -2
  186. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  187. package/lib-commonjs/components/CommonComponents/CartesianChart.js +45 -42
  188. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  189. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  190. package/lib-commonjs/components/CommonComponents/ChartPopover.js +14 -5
  191. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  192. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +16 -13
  193. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  194. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +5 -32
  195. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  196. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +4 -3
  197. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  198. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
  199. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  200. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +60 -20
  201. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  202. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +22 -0
  203. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  204. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +1109 -338
  205. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  206. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +1 -0
  207. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -1
  208. package/lib-commonjs/components/DonutChart/Arc/Arc.js +8 -8
  209. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  210. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  211. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +11 -1
  212. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  213. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +6 -1
  214. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  215. package/lib-commonjs/components/DonutChart/DonutChart.js +61 -25
  216. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  217. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  218. package/lib-commonjs/components/DonutChart/Pie/Pie.js +2 -1
  219. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  220. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  221. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +1 -0
  222. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -1
  223. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js +1 -0
  224. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.raw.js.map +1 -1
  225. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +33 -4
  226. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  227. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +9 -4
  228. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  229. package/lib-commonjs/components/FunnelChart/FunnelChart.js +11 -5
  230. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  231. package/lib-commonjs/components/FunnelChart/funnelGeometry.js.map +1 -1
  232. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +1 -0
  233. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  234. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +1 -0
  235. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  236. package/lib-commonjs/components/GanttChart/GanttChart.js +1 -0
  237. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  238. package/lib-commonjs/components/GaugeChart/GaugeChart.js +2 -2
  239. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  240. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +1 -0
  241. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  242. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +1 -0
  243. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  244. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +15 -9
  245. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  246. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +3 -19
  247. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  248. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +4 -20
  249. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  250. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +2 -1
  251. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  252. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +1 -0
  253. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  254. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +1 -0
  255. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  256. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +3 -3
  257. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -1
  258. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +10 -2
  259. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  260. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +5 -1
  261. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  262. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
  263. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  264. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +1 -0
  265. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  266. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +1 -0
  267. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  268. package/lib-commonjs/components/Legends/Legends.js +1 -0
  269. package/lib-commonjs/components/Legends/Legends.js.map +1 -1
  270. package/lib-commonjs/components/Legends/OverflowMenu.js +1 -0
  271. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  272. package/lib-commonjs/components/Legends/shape.js +1 -0
  273. package/lib-commonjs/components/Legends/shape.js.map +1 -1
  274. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +1 -0
  275. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  276. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +1 -0
  277. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  278. package/lib-commonjs/components/LineChart/LineChart.js +282 -279
  279. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  280. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  281. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +1 -0
  282. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -1
  283. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +1 -0
  284. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -1
  285. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +31 -9
  286. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  287. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +3 -20
  288. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  289. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +1 -0
  290. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -1
  291. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js +1 -0
  292. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.js.map +1 -1
  293. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js +1 -0
  294. package/lib-commonjs/components/ResponsiveContainer/useResponsiveChildStyles.styles.raw.js.map +1 -1
  295. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js +2 -1
  296. package/lib-commonjs/components/ResponsiveContainer/withResponsiveContainer.js.map +1 -1
  297. package/lib-commonjs/components/SankeyChart/SankeyChart.js +1 -0
  298. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  299. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +24 -33
  300. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  301. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -12
  302. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  303. package/lib-commonjs/components/ScatterChart/ScatterChart.js +118 -78
  304. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  305. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  306. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +14 -7
  307. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  308. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -20
  309. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  310. package/lib-commonjs/components/Sparkline/Sparkline.js +1 -0
  311. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  312. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +1 -0
  313. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -1
  314. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js +1 -0
  315. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.raw.js.map +1 -1
  316. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +16 -11
  317. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  318. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +6 -3
  319. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  320. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +4 -17
  321. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  322. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +29 -24
  323. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  324. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +6 -3
  325. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  326. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +4 -18
  327. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  328. package/lib-commonjs/types/DataPoint.js +3 -1
  329. package/lib-commonjs/types/DataPoint.js.map +1 -1
  330. package/lib-commonjs/utilities/Common.styles.js +71 -0
  331. package/lib-commonjs/utilities/Common.styles.js.map +1 -0
  332. package/lib-commonjs/utilities/Common.styles.raw.js +71 -0
  333. package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -0
  334. package/lib-commonjs/utilities/FocusableTooltipText.js +2 -1
  335. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  336. package/lib-commonjs/utilities/SVGTooltipText.js +1 -0
  337. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  338. package/lib-commonjs/utilities/image-export-utils.js +1 -0
  339. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  340. package/lib-commonjs/utilities/index.js +1 -0
  341. package/lib-commonjs/utilities/index.js.map +1 -1
  342. package/lib-commonjs/utilities/scatterpolar-utils.js +67 -0
  343. package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -0
  344. package/lib-commonjs/utilities/utilities.js +327 -137
  345. package/lib-commonjs/utilities/utilities.js.map +1 -1
  346. package/lib-commonjs/utilities/vbc-utils.js.map +1 -1
  347. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/LineChart/LineChart.types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { RenderFunction } from '../../utilities/index';\nimport {\n ChartProps,\n LineChartPoints,\n Margins,\n Basestate,\n RefArrayData,\n CustomizedCalloutData,\n} from '../../types/index';\nimport { EventAnnotation } from '../../types/EventAnnotation';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n ChildProps,\n} from '../CommonComponents/index';\n\nexport type { ChildProps, LineChartPoints, Margins, Basestate, RefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface LineChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: ChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: LineChartStyles;\n\n /**\n * Show event annotation\n */\n eventAnnotationProps?: EventsAnnotationProps;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: CustomizedCalloutData) => string | undefined;\n\n /*\n * Color fill bars for the chart,\n */\n colorFillBars?: ColorFillBarsProps[];\n\n /**\n * if this is set to true, then for each line there will be a unique shape assigned to the point,\n * there are total 8 shapes which are as follow circle, square, triangele, diamond, pyramid,\n * hexagon, pentagon and octagon, which will get assigned as respectively, if there are more\n * than 8 lines in the line chart then it will again start from cicle to octagon.\n * setting this flag to true will also change the behavior of the points, like for a\n * line, last point shape and first point shape will be visible all the times, and all\n * other points will get enlarge only when hovered over them\n * if set to false default shape will be circle, with the existing behavior\n * @default false\n */\n allowMultipleShapesForPoints?: boolean;\n\n /*\n * Optimize line chart rendering for large data set. If this prop is enabled, line chart\n * can easily render over 10K datapoints with multiple lines smoothly.\n * This rendering mechanism does not support gaps in lines.\n */\n optimizeLargeData?: boolean;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface EventsAnnotationProps {\n events: EventAnnotation[];\n strokeColor?: string;\n labelColor?: string;\n labelHeight?: number;\n labelWidth?: number;\n mergedLabel: (count: number) => string;\n}\n\n/**\n * Line Chart styles\n * {@docCategory LineChart}\n */\nexport interface LineChartStyles extends CartesianChartStyles {\n /**\n * styles for line border\n */\n lineBorder?: string;\n\n /**\n * styles for marker label\n */\n markerLabel?: string;\n}\n\n/**\n * Line Chart style properties\n * {@docCategory LineChart}\n */\nexport interface LineChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarsProps {\n legend: string;\n color: string;\n data: ColorFillBarData[];\n applyPattern?: boolean;\n onLegendClick?: (selectedLegend: string | string[] | null) => void | undefined;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarData {\n startX: number | Date;\n endX: number | Date;\n}\n"],"names":[],"mappings":"AAAA,uDAAuD,GAyIvD;;CAEC,GACD,WAGC"}
1
+ {"version":3,"sources":["../src/components/LineChart/LineChart.types.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { RenderFunction } from '../../utilities/index';\nimport {\n ChartProps,\n LineChartPoints,\n Margins,\n Basestate,\n RefArrayData,\n CustomizedCalloutData,\n} from '../../types/index';\nimport { EventAnnotation } from '../../types/EventAnnotation';\nimport {\n CartesianChartProps,\n CartesianChartStyleProps,\n CartesianChartStyles,\n ChildProps,\n} from '../CommonComponents/index';\n\nexport type { ChildProps, LineChartPoints, Margins, Basestate, RefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface LineChartProps extends CartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: ChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: LineChartStyles;\n\n /**\n * Show event annotation\n */\n eventAnnotationProps?: EventsAnnotationProps;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Define a custom callout renderer for a stack; default is to render per data point\n */\n onRenderCalloutPerStack?: RenderFunction<CustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: CustomizedCalloutData) => string | undefined;\n\n /*\n * Color fill bars for the chart,\n */\n colorFillBars?: ColorFillBarsProps[];\n\n /**\n * if this is set to true, then for each line there will be a unique shape assigned to the point,\n * there are total 8 shapes which are as follow circle, square, triangele, diamond, pyramid,\n * hexagon, pentagon and octagon, which will get assigned as respectively, if there are more\n * than 8 lines in the line chart then it will again start from cicle to octagon.\n * setting this flag to true will also change the behavior of the points, like for a\n * line, last point shape and first point shape will be visible all the times, and all\n * other points will get enlarge only when hovered over them\n * if set to false default shape will be circle, with the existing behavior\n * @default false\n */\n allowMultipleShapesForPoints?: boolean;\n\n /*\n * Optimize line chart rendering for large data set. If this prop is enabled, line chart\n * can easily render over 10K datapoints with multiple lines smoothly.\n * This rendering mechanism does not support gaps in lines.\n */\n optimizeLargeData?: boolean;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * @default false\n * The prop used to enable the perf optimization\n */\n enablePerfOptimization?: boolean;\n\n /**\n * To enable callout for individual line or complete stack.\n * @default true\n * @type \\{boolean \\}\n */\n isCalloutForStack?: boolean;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface EventsAnnotationProps {\n events: EventAnnotation[];\n strokeColor?: string;\n labelColor?: string;\n labelHeight?: number;\n labelWidth?: number;\n mergedLabel: (count: number) => string;\n}\n\n/**\n * Line Chart styles\n * {@docCategory LineChart}\n */\nexport interface LineChartStyles extends CartesianChartStyles {\n /**\n * styles for line border\n */\n lineBorder?: string;\n\n /**\n * styles for marker label\n */\n markerLabel?: string;\n}\n\n/**\n * Line Chart style properties\n * {@docCategory LineChart}\n */\nexport interface LineChartStyleProps extends CartesianChartStyleProps {}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarsProps {\n legend: string;\n color: string;\n data: ColorFillBarData[];\n applyPattern?: boolean;\n onLegendClick?: (selectedLegend: string | string[] | null) => void | undefined;\n}\n\n/**\n * {@docCategory LineChart}\n */\nexport interface ColorFillBarData {\n startX: number | Date;\n endX: number | Date;\n}\n"],"names":[],"mappings":"AAAA,uDAAuD,GAgJvD;;CAEC,GACD,WAGC"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/LineChart/eventAnnotation/LabelLink.tsx"],"sourcesContent":["import * as React from 'react';\nimport { EventAnnotation } from '../../../types/EventAnnotation';\nimport { Textbox } from './Textbox';\nimport { getColorFromToken } from '../../../utilities/colors';\nimport { tokens } from '@fluentui/react-theme';\n\nexport interface LineDef extends EventAnnotation {\n x: number;\n}\n\nexport interface LabelDef {\n x: number;\n aggregatedIdx: number[];\n anchor: 'start' | 'end';\n}\n\ninterface LabelLinkProps {\n lineDefs: LineDef[];\n labelDef: LabelDef;\n textY: number;\n textWidth: number;\n textLineHeight: number;\n textFontSize: string;\n textColor: string | undefined;\n mergedLabel: (count: number) => string;\n}\n\nexport const LabelLink: React.FunctionComponent<LabelLinkProps> = props => {\n const gRef = React.useRef<SVGGElement>(null);\n const [showCard, setShowCard] = React.useState(false);\n const onClick = () => setShowCard(true);\n\n let callout: React.ReactNode = null;\n if (showCard) {\n const cards = props.labelDef.aggregatedIdx.map(i => props.lineDefs[i].onRenderCard!).filter(c => !!c);\n if (cards.length > 0) {\n callout = null;\n // TODO - need to replace callout with popover\n /*callout = {\n /* <Callout\n target={gRef.current}\n // eslint-disable-next-line react/jsx-no-bind\n onDismiss={onDismiss}\n setInitialFocus={true}\n role=\"dialog\"\n >\n <FocusZone isCircularNavigation={true} direction={FocusZoneDirection.vertical}>\n <List<() => React.ReactNode>\n items={cards}\n // eslint-disable-next-line react/jsx-no-bind\n onRenderCell={onRenderCell}\n />\n </FocusZone>\n </Callout>\n };*/\n }\n }\n\n let text: string;\n const fill: string | undefined = props.textColor\n ? getColorFromToken(props.textColor, false)\n : tokens.colorNeutralForeground1;\n\n if (props.labelDef.aggregatedIdx.length === 1) {\n text = props.lineDefs[props.labelDef.aggregatedIdx[0]].event;\n } else {\n text = props.mergedLabel(props.labelDef.aggregatedIdx.length);\n }\n\n return (\n <>\n <g ref={gRef} onClick={onClick} data-is-focusable={false} style={{ cursor: 'pointer' }} role=\"button\">\n <Textbox\n text={text}\n x={props.labelDef.x}\n y={props.textY}\n width={props.textWidth}\n lineHeight={props.textLineHeight}\n textAnchor={props.labelDef.anchor}\n fontSize={props.textFontSize}\n fill={fill}\n />\n </g>\n {callout}\n </>\n );\n};\n"],"names":["React","Textbox","getColorFromToken","tokens","LabelLink","props","gRef","useRef","showCard","setShowCard","useState","onClick","callout","cards","labelDef","aggregatedIdx","map","i","lineDefs","onRenderCard","filter","c","length","text","fill","textColor","colorNeutralForeground1","event","mergedLabel","g","ref","data-is-focusable","style","cursor","role","x","y","textY","width","textWidth","lineHeight","textLineHeight","textAnchor","anchor","fontSize","textFontSize"],"mappings":";;;;+BA2BaI;;;;;;;iEA3BU,QAAQ;yBAEP,YAAY;wBACF,4BAA4B;4BACvC,wBAAwB;AAuBxC,kBAA2DC,CAAAA;IAChE,MAAMC,OAAON,OAAMO,MAAM,CAAc;IACvC,MAAM,CAACC,UAAUC,YAAY,GAAGT,OAAMU,QAAQ,CAAC;IAC/C,MAAMC,UAAU,IAAMF,YAAY;IAElC,IAAIG,UAA2B;IAC/B,IAAIJ,UAAU;QACZ,MAAMK,QAAQR,MAAMS,QAAQ,CAACC,aAAa,CAACC,GAAG,CAACC,CAAAA,IAAKZ,MAAMa,QAAQ,CAACD,EAAE,CAACE,YAAY,EAAGC,MAAM,CAACC,CAAAA,IAAK,CAAC,CAACA;QACnG,IAAIR,MAAMS,MAAM,GAAG,GAAG;YACpBV,UAAU;QACV,8CAA8C;QAC9C;;;;;;;;;;;;;;;;QAgBE,GACJ;IACF;IAEA,IAAIW;IACJ,MAAMC,OAA2BnB,MAAMoB,SAAS,OAC5CvB,yBAAAA,EAAkBG,MAAMoB,SAAS,EAAE,SACnCtB,kBAAAA,CAAOuB,uBAAuB;IAElC,IAAIrB,MAAMS,QAAQ,CAACC,aAAa,CAACO,MAAM,KAAK,GAAG;QAC7CC,OAAOlB,MAAMa,QAAQ,CAACb,MAAMS,QAAQ,CAACC,aAAa,CAAC,EAAE,CAAC,CAACY,KAAK;IAC9D,OAAO;QACLJ,OAAOlB,MAAMuB,WAAW,CAACvB,MAAMS,QAAQ,CAACC,aAAa,CAACO,MAAM;IAC9D;IAEA,OAAA,WAAA,GACE,OAAA,aAAA,CAAA,OAAA,QAAA,EAAA,MAAA,WAAA,GACE,OAAA,aAAA,CAACO,KAAAA;QAAEC,KAAKxB;QAAMK,SAASA;QAASoB,qBAAmB;QAAOC,OAAO;YAAEC,QAAQ;QAAU;QAAGC,MAAK;qBAC3F,OAAA,aAAA,CAACjC,gBAAAA,EAAAA;QACCsB,MAAMA;QACNY,GAAG9B,MAAMS,QAAQ,CAACqB,CAAC;QACnBC,GAAG/B,MAAMgC,KAAK;QACdC,OAAOjC,MAAMkC,SAAS;QACtBC,YAAYnC,MAAMoC,cAAc;QAChCC,YAAYrC,MAAMS,QAAQ,CAAC6B,MAAM;QACjCC,UAAUvC,MAAMwC,YAAY;QAC5BrB,MAAMA;SAGTZ;AAGP,EAAE"}
1
+ {"version":3,"sources":["../src/components/LineChart/eventAnnotation/LabelLink.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { EventAnnotation } from '../../../types/EventAnnotation';\nimport { Textbox } from './Textbox';\nimport { getColorFromToken } from '../../../utilities/colors';\nimport { tokens } from '@fluentui/react-theme';\n\nexport interface LineDef extends EventAnnotation {\n x: number;\n}\n\nexport interface LabelDef {\n x: number;\n aggregatedIdx: number[];\n anchor: 'start' | 'end';\n}\n\ninterface LabelLinkProps {\n lineDefs: LineDef[];\n labelDef: LabelDef;\n textY: number;\n textWidth: number;\n textLineHeight: number;\n textFontSize: string;\n textColor: string | undefined;\n mergedLabel: (count: number) => string;\n}\n\nexport const LabelLink: React.FunctionComponent<LabelLinkProps> = props => {\n const gRef = React.useRef<SVGGElement>(null);\n const [showCard, setShowCard] = React.useState(false);\n const onClick = () => setShowCard(true);\n\n let callout: React.ReactNode = null;\n if (showCard) {\n const cards = props.labelDef.aggregatedIdx.map(i => props.lineDefs[i].onRenderCard!).filter(c => !!c);\n if (cards.length > 0) {\n callout = null;\n // TODO - need to replace callout with popover\n /*callout = {\n /* <Callout\n target={gRef.current}\n // eslint-disable-next-line react/jsx-no-bind\n onDismiss={onDismiss}\n setInitialFocus={true}\n role=\"dialog\"\n >\n <FocusZone isCircularNavigation={true} direction={FocusZoneDirection.vertical}>\n <List<() => React.ReactNode>\n items={cards}\n // eslint-disable-next-line react/jsx-no-bind\n onRenderCell={onRenderCell}\n />\n </FocusZone>\n </Callout>\n };*/\n }\n }\n\n let text: string;\n const fill: string | undefined = props.textColor\n ? getColorFromToken(props.textColor, false)\n : tokens.colorNeutralForeground1;\n\n if (props.labelDef.aggregatedIdx.length === 1) {\n text = props.lineDefs[props.labelDef.aggregatedIdx[0]].event;\n } else {\n text = props.mergedLabel(props.labelDef.aggregatedIdx.length);\n }\n\n return (\n <>\n <g ref={gRef} onClick={onClick} data-is-focusable={false} style={{ cursor: 'pointer' }} role=\"button\">\n <Textbox\n text={text}\n x={props.labelDef.x}\n y={props.textY}\n width={props.textWidth}\n lineHeight={props.textLineHeight}\n textAnchor={props.labelDef.anchor}\n fontSize={props.textFontSize}\n fill={fill}\n />\n </g>\n {callout}\n </>\n );\n};\n"],"names":["React","Textbox","getColorFromToken","tokens","LabelLink","props","gRef","useRef","showCard","setShowCard","useState","onClick","callout","cards","labelDef","aggregatedIdx","map","i","lineDefs","onRenderCard","filter","c","length","text","fill","textColor","colorNeutralForeground1","event","mergedLabel","g","ref","data-is-focusable","style","cursor","role","x","y","textY","width","textWidth","lineHeight","textLineHeight","textAnchor","anchor","fontSize","textFontSize"],"mappings":"AAAA;;;;;+BA6BaI;;;;;;;iEA3BU,QAAQ;yBAEP,YAAY;wBACF,4BAA4B;4BACvC,wBAAwB;AAuBxC,kBAA2DC,CAAAA;IAChE,MAAMC,OAAON,OAAMO,MAAM,CAAc;IACvC,MAAM,CAACC,UAAUC,YAAY,GAAGT,OAAMU,QAAQ,CAAC;IAC/C,MAAMC,UAAU,IAAMF,YAAY;IAElC,IAAIG,UAA2B;IAC/B,IAAIJ,UAAU;QACZ,MAAMK,QAAQR,MAAMS,QAAQ,CAACC,aAAa,CAACC,GAAG,CAACC,CAAAA,IAAKZ,MAAMa,QAAQ,CAACD,EAAE,CAACE,YAAY,EAAGC,MAAM,CAACC,CAAAA,IAAK,CAAC,CAACA;QACnG,IAAIR,MAAMS,MAAM,GAAG,GAAG;YACpBV,UAAU;QACV,8CAA8C;QAC9C;;;;;;;;;;;;;;;;QAgBE,GACJ;IACF;IAEA,IAAIW;IACJ,MAAMC,OAA2BnB,MAAMoB,SAAS,OAC5CvB,yBAAAA,EAAkBG,MAAMoB,SAAS,EAAE,SACnCtB,kBAAAA,CAAOuB,uBAAuB;IAElC,IAAIrB,MAAMS,QAAQ,CAACC,aAAa,CAACO,MAAM,KAAK,GAAG;QAC7CC,OAAOlB,MAAMa,QAAQ,CAACb,MAAMS,QAAQ,CAACC,aAAa,CAAC,EAAE,CAAC,CAACY,KAAK;IAC9D,OAAO;QACLJ,OAAOlB,MAAMuB,WAAW,CAACvB,MAAMS,QAAQ,CAACC,aAAa,CAACO,MAAM;IAC9D;IAEA,OAAA,WAAA,GACE,OAAA,aAAA,CAAA,OAAA,QAAA,EAAA,MAAA,WAAA,GACE,OAAA,aAAA,CAACO,KAAAA;QAAEC,KAAKxB;QAAMK,SAASA;QAASoB,qBAAmB;QAAOC,OAAO;YAAEC,QAAQ;QAAU;QAAGC,MAAK;qBAC3F,OAAA,aAAA,CAACjC,gBAAAA,EAAAA;QACCsB,MAAMA;QACNY,GAAG9B,MAAMS,QAAQ,CAACqB,CAAC;QACnBC,GAAG/B,MAAMgC,KAAK;QACdC,OAAOjC,MAAMkC,SAAS;QACtBC,YAAYnC,MAAMoC,cAAc;QAChCC,YAAYrC,MAAMS,QAAQ,CAAC6B,MAAM;QACjCC,UAAUvC,MAAMwC,YAAY;QAC5BrB,MAAMA;SAGTZ;AAGP,EAAE"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/LineChart/eventAnnotation/Textbox.tsx"],"sourcesContent":["import * as React from 'react';\nimport { select } from 'd3-selection';\nimport { getSecureProps } from '../../../utilities/utilities';\n\ninterface TextboxProps {\n text: string;\n width: number;\n x: number;\n y: number;\n lineHeight: number;\n textAnchor?: 'start' | 'middle' | 'end';\n fontSize?: string;\n fill?: string;\n}\n\nexport const Textbox: React.FunctionComponent<TextboxProps> = props => {\n const textElementRef: React.RefObject<SVGTextElement> = React.useRef(null);\n\n const wrapWords = () => {\n if (!textElementRef.current) {\n return;\n }\n const text = select(textElementRef.current);\n const words = props.text.split(/\\s+/);\n let line: string[] = [];\n let tspan = text.append<SVGTSpanElement>('tspan');\n let numLines = 0;\n\n words.forEach(word => {\n line.push(word);\n tspan.text(line.join(' '));\n const node = tspan.node();\n if (node && node.getComputedTextLength() > props.width && line.length > 1) {\n numLines++;\n line.pop();\n tspan.text(line.join(' '));\n line = [word];\n tspan = text.append<SVGTSpanElement>('tspan').text(word).attr('dy', props.lineHeight).attr('x', props.x);\n }\n });\n // bottom aligns text\n text.attr('dy', -numLines * props.lineHeight);\n\n return () => {\n text.selectAll('tspan').remove();\n };\n };\n React.useEffect(wrapWords);\n\n const { lineHeight, ...rest } = props;\n\n return <text ref={textElementRef} {...getSecureProps(rest)} />;\n};\n"],"names":["React","select","getSecureProps","Textbox","props","textElementRef","useRef","wrapWords","current","text","words","split","line","tspan","append","numLines","forEach","word","push","join","node","getComputedTextLength","width","length","pop","attr","lineHeight","x","selectAll","remove","useEffect","rest","ref"],"mappings":";;;;+BAeaG;;;;;;;iEAfU,QAAQ;6BACR,eAAe;2BACP,+BAA+B;AAavD,gBAAuDC,CAAAA;IAC5D,MAAMC,iBAAkDL,OAAMM,MAAM,CAAC;IAErE,MAAMC,YAAY;QAChB,IAAI,CAACF,eAAeG,OAAO,EAAE;YAC3B;QACF;QACA,MAAMC,OAAOR,uBAAAA,EAAOI,eAAeG,OAAO;QAC1C,MAAME,QAAQN,MAAMK,IAAI,CAACE,KAAK,CAAC;QAC/B,IAAIC,OAAiB,EAAE;QACvB,IAAIC,QAAQJ,KAAKK,MAAM,CAAkB;QACzC,IAAIC,WAAW;QAEfL,MAAMM,OAAO,CAACC,CAAAA;YACZL,KAAKM,IAAI,CAACD;YACVJ,MAAMJ,IAAI,CAACG,KAAKO,IAAI,CAAC;YACrB,MAAMC,OAAOP,MAAMO,IAAI;YACvB,IAAIA,QAAQA,KAAKC,qBAAqB,KAAKjB,MAAMkB,KAAK,IAAIV,KAAKW,MAAM,GAAG,GAAG;gBACzER;gBACAH,KAAKY,GAAG;gBACRX,MAAMJ,IAAI,CAACG,KAAKO,IAAI,CAAC;gBACrBP,OAAO;oBAACK;iBAAK;gBACbJ,QAAQJ,KAAKK,MAAM,CAAkB,SAASL,IAAI,CAACQ,MAAMQ,IAAI,CAAC,MAAMrB,MAAMsB,UAAU,EAAED,IAAI,CAAC,KAAKrB,MAAMuB,CAAC;YACzG;QACF;QACA,qBAAqB;QACrBlB,KAAKgB,IAAI,CAAC,MAAM,CAACV,WAAWX,MAAMsB,UAAU;QAE5C,OAAO;YACLjB,KAAKmB,SAAS,CAAC,SAASC,MAAM;QAChC;IACF;IACA7B,OAAM8B,SAAS,CAACvB;IAEhB,MAAM,EAAEmB,UAAU,EAAE,GAAGK,MAAM,GAAG3B;IAEhC,OAAA,WAAA,GAAO,OAAA,aAAA,CAACK,QAAAA;QAAKuB,KAAK3B;QAAiB,OAAGH,yBAAAA,EAAe6B,KAAK;;AAC5D,EAAE"}
1
+ {"version":3,"sources":["../src/components/LineChart/eventAnnotation/Textbox.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { select } from 'd3-selection';\nimport { getSecureProps } from '../../../utilities/utilities';\n\ninterface TextboxProps {\n text: string;\n width: number;\n x: number;\n y: number;\n lineHeight: number;\n textAnchor?: 'start' | 'middle' | 'end';\n fontSize?: string;\n fill?: string;\n}\n\nexport const Textbox: React.FunctionComponent<TextboxProps> = props => {\n const textElementRef: React.RefObject<SVGTextElement> = React.useRef(null);\n\n const wrapWords = () => {\n if (!textElementRef.current) {\n return;\n }\n const text = select(textElementRef.current);\n const words = props.text.split(/\\s+/);\n let line: string[] = [];\n let tspan = text.append<SVGTSpanElement>('tspan');\n let numLines = 0;\n\n words.forEach(word => {\n line.push(word);\n tspan.text(line.join(' '));\n const node = tspan.node();\n if (node && node.getComputedTextLength() > props.width && line.length > 1) {\n numLines++;\n line.pop();\n tspan.text(line.join(' '));\n line = [word];\n tspan = text.append<SVGTSpanElement>('tspan').text(word).attr('dy', props.lineHeight).attr('x', props.x);\n }\n });\n // bottom aligns text\n text.attr('dy', -numLines * props.lineHeight);\n\n return () => {\n text.selectAll('tspan').remove();\n };\n };\n React.useEffect(wrapWords);\n\n const { lineHeight, ...rest } = props;\n\n return <text ref={textElementRef} {...getSecureProps(rest)} />;\n};\n"],"names":["React","select","getSecureProps","Textbox","props","textElementRef","useRef","wrapWords","current","text","words","split","line","tspan","append","numLines","forEach","word","push","join","node","getComputedTextLength","width","length","pop","attr","lineHeight","x","selectAll","remove","useEffect","rest","ref"],"mappings":"AAAA;;;;;+BAiBaG;;;;;;;iEAfU,QAAQ;6BACR,eAAe;2BACP,+BAA+B;AAavD,gBAAuDC,CAAAA;IAC5D,MAAMC,iBAAkDL,OAAMM,MAAM,CAAC;IAErE,MAAMC,YAAY;QAChB,IAAI,CAACF,eAAeG,OAAO,EAAE;YAC3B;QACF;QACA,MAAMC,WAAOR,mBAAAA,EAAOI,eAAeG,OAAO;QAC1C,MAAME,QAAQN,MAAMK,IAAI,CAACE,KAAK,CAAC;QAC/B,IAAIC,OAAiB,EAAE;QACvB,IAAIC,QAAQJ,KAAKK,MAAM,CAAkB;QACzC,IAAIC,WAAW;QAEfL,MAAMM,OAAO,CAACC,CAAAA;YACZL,KAAKM,IAAI,CAACD;YACVJ,MAAMJ,IAAI,CAACG,KAAKO,IAAI,CAAC;YACrB,MAAMC,OAAOP,MAAMO,IAAI;YACvB,IAAIA,QAAQA,KAAKC,qBAAqB,KAAKjB,MAAMkB,KAAK,IAAIV,KAAKW,MAAM,GAAG,GAAG;gBACzER;gBACAH,KAAKY,GAAG;gBACRX,MAAMJ,IAAI,CAACG,KAAKO,IAAI,CAAC;gBACrBP,OAAO;oBAACK;iBAAK;gBACbJ,QAAQJ,KAAKK,MAAM,CAAkB,SAASL,IAAI,CAACQ,MAAMQ,IAAI,CAAC,MAAMrB,MAAMsB,UAAU,EAAED,IAAI,CAAC,KAAKrB,MAAMuB,CAAC;YACzG;QACF;QACA,qBAAqB;QACrBlB,KAAKgB,IAAI,CAAC,MAAM,CAACV,WAAWX,MAAMsB,UAAU;QAE5C,OAAO;YACLjB,KAAKmB,SAAS,CAAC,SAASC,MAAM;QAChC;IACF;IACA7B,OAAM8B,SAAS,CAACvB;IAEhB,MAAM,EAAEmB,UAAU,EAAE,GAAGK,MAAM,GAAG3B;IAEhC,OAAA,WAAA,GAAO,OAAA,aAAA,CAACK,QAAAA;QAAKuB,KAAK3B;QAAiB,OAAGH,yBAAAA,EAAe6B,KAAK;;AAC5D,EAAE"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
@@ -40,6 +41,10 @@ const linechartClassNames = {
40
41
  * Base Styles
41
42
  */ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
42
43
  tooltip: {
44
+ Bahqtrf: "fk6fouc",
45
+ Be2twd7: "fkhj508",
46
+ Bhrd7zp: "figsok6",
47
+ Bg96gwp: "f1i3iumi",
43
48
  mc9l5x: "f22iagw",
44
49
  Beiy3e4: "f1vx9l62",
45
50
  z8tnut: "f17mpqex",
@@ -55,24 +60,34 @@ const linechartClassNames = {
55
60
  qhf8xq: "f1euv43f",
56
61
  fsow6f: "f17mccla",
57
62
  Bhzewxz: "fr6rvge",
58
- Bkfmm31: "f5q6cfr",
63
+ De3pzq: "fxugw4r",
59
64
  Beyfa6y: 0,
60
65
  Bbmb7ep: 0,
61
66
  Btl43ni: 0,
62
67
  B7oj6ja: 0,
63
68
  Dimara: "fq9zq91",
64
- Bkecrkj: "f1aehjj5"
69
+ Bkecrkj: "f1aehjj5",
70
+ sj55zd: "f19n0e5"
71
+ },
72
+ markerLabel: {
73
+ Bahqtrf: "fk6fouc",
74
+ Be2twd7: "fkhj508",
75
+ Bhrd7zp: "figsok6",
76
+ Bg96gwp: "f1i3iumi",
77
+ Bkfmm31: "fhuob2q",
78
+ jzqdnp: "fdxigdc",
79
+ a6j6cd: "folz2wl"
65
80
  },
66
81
  lineBorder: {
67
82
  ojy3ng: "f1yuyku4",
68
83
  Bpvj6i6: "fdvt8h6"
69
- },
70
- markerLabel: {
71
- Bkfmm31: "fhuob2q",
72
- jzqdnp: "fdxigdc"
73
84
  }
74
85
  }, {
75
86
  d: [
87
+ ".fk6fouc{font-family:var(--fontFamilyBase);}",
88
+ ".fkhj508{font-size:var(--fontSizeBase300);}",
89
+ ".figsok6{font-weight:var(--fontWeightRegular);}",
90
+ ".f1i3iumi{line-height:var(--lineHeightBase300);}",
76
91
  ".f22iagw{display:flex;}",
77
92
  ".f1vx9l62{flex-direction:column;}",
78
93
  ".f17mpqex{padding-top:var(--spacingHorizontalS);}",
@@ -82,7 +97,7 @@ const linechartClassNames = {
82
97
  ".f1euv43f{position:absolute;}",
83
98
  ".f17mccla{text-align:center;}",
84
99
  ".fr6rvge{top:var(--spacingVerticalNone);}",
85
- ".f5q6cfr{fill:var(--colorNeutralBackground1);}",
100
+ ".fxugw4r{background-color:var(--colorNeutralBackground1);}",
86
101
  [
87
102
  ".fq9zq91{border-radius:var(--borderRadiusSmall);}",
88
103
  {
@@ -90,11 +105,18 @@ const linechartClassNames = {
90
105
  }
91
106
  ],
92
107
  ".f1aehjj5{pointer-events:none;}",
93
- ".f1yuyku4{stroke:var(--colorNeutralBackground1);}",
108
+ ".f19n0e5{color:var(--colorNeutralForeground1);}",
94
109
  ".fhuob2q{fill:var(--colorNeutralForeground1);}",
95
- ".fdxigdc{text-anchor:middle;}"
110
+ ".fdxigdc{text-anchor:middle;}",
111
+ ".f1yuyku4{stroke:var(--colorNeutralBackground1);}"
96
112
  ],
97
113
  m: [
114
+ [
115
+ "@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.folz2wl{fill:CanvasText;}}",
116
+ {
117
+ m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
118
+ }
119
+ ],
98
120
  [
99
121
  "@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.fdvt8h6{stroke:Canvas;}}",
100
122
  {
@@ -1 +1 @@
1
- {"version":3,"sources":["useLineChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\n/**\n * @internal\n */ export const linechartClassNames = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: ''\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n tooltip: {\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none'\n },\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas'\n }\n },\n markerLabel: {\n fill: tokens.colorNeutralForeground1,\n textAnchor: 'middle',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText'\n }\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useLineChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/ ),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/ )\n };\n};\n"],"names":["__styles","mergeClasses","shorthands","tokens","HighContrastSelector","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","ojy3ng","Bpvj6i6","jzqdnp","d","p","m","useLineChartStyles","props","baseStyles"],"mappings":";;;;;;;;;;;IAKiBK,mBAAmB;;;sBAmDD;eAAlByC;;;uBAxDoC,gBAAgB;AAK1D,4BAA4B;IACnCxC,OAAO,EAAE,mBAAmB;IAC5BC,UAAU,EAAE,qBAAqB;IACjCC,WAAW,EAAE,uBAAuB;IACpCC,IAAI,EAAE,gBAAgB;IACtBC,KAAK,EAAE,iBAAiB;IACxBC,KAAK,EAAE,iBAAiB;IACxBC,eAAe,EAAE,2BAA2B;IAC5CC,KAAK,EAAE,iBAAiB;IACxBC,kBAAkB,EAAE,8BAA8B;IAClDC,SAAS,EAAE,qBAAqB;IAChCC,UAAU,EAAE,sBAAsB;IAClCC,oBAAoB,EAAE,gCAAgC;IACtDC,WAAW,EAAE,uBAAuB;IACpCC,YAAY,EAAE,wBAAwB;IACtCC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAE,EAAE;IACTC,cAAc,EAAE;AACpB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AAW,CAAC,2BAAA,EAA8B;IACpH,CAAC;AACL,CAAC"}
1
+ {"version":3,"sources":["useLineChartStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';\n/**\n * @internal\n */ export const linechartClassNames = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: ''\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n tooltip: getTooltipStyle(),\n markerLabel: getMarkerLabelStyle(),\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas'\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useLineChartStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ ),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/ ),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/ )\n };\n};\n"],"names":["__styles","mergeClasses","tokens","HighContrastSelector","getMarkerLabelStyle","getTooltipStyle","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","De3pzq","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","sj55zd","Bkfmm31","jzqdnp","a6j6cd","ojy3ng","Bpvj6i6","d","p","m","useLineChartStyles","props","baseStyles"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAOKM,mBAAmB;;;sBAiCD;eAAlBgD;;;uBAvCwB,gBAAgB;AAM9C,4BAA4B;IACnC/C,OAAO,EAAE,mBAAmB;IAC5BC,UAAU,EAAE,qBAAqB;IACjCC,WAAW,EAAE,uBAAuB;IACpCC,IAAI,EAAE,gBAAgB;IACtBC,KAAK,EAAE,iBAAiB;IACxBC,KAAK,EAAE,iBAAiB;IACxBC,eAAe,EAAE,2BAA2B;IAC5CC,KAAK,EAAE,iBAAiB;IACxBC,kBAAkB,EAAE,8BAA8B;IAClDC,SAAS,EAAE,qBAAqB;IAChCC,UAAU,EAAE,sBAAsB;IAClCC,oBAAoB,EAAE,gCAAgC;IACtDC,WAAW,EAAE,uBAAuB;IACpCC,YAAY,EAAE,wBAAwB;IACtCC,UAAU,EAAE,EAAE;IACdC,KAAK,EAAE,EAAE;IACTC,cAAc,EAAE;AACpB,CAAC;AACD;;CAEA,GAAI,MAAMC,SAAS,GAAA,WAAA,OAAGxB,eAAA,EAAA;IAAAO,OAAA,EAAA;QAAAkB,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,MAAA,E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 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
@@ -41,31 +42,13 @@ const linechartClassNames = {
41
42
  /**
42
43
  * Base Styles
43
44
  */ const useStyles = (0, _react.makeStyles)({
44
- tooltip: {
45
- display: 'flex',
46
- flexDirection: 'column',
47
- ..._react.shorthands.padding(_reacttheme.tokens.spacingHorizontalS),
48
- position: 'absolute',
49
- textAlign: 'center',
50
- top: _reacttheme.tokens.spacingVerticalNone,
51
- fill: _reacttheme.tokens.colorNeutralBackground1,
52
- borderRadius: _reacttheme.tokens.borderRadiusSmall,
53
- pointerEvents: 'none'
54
- },
45
+ tooltip: (0, _index.getTooltipStyle)(),
46
+ markerLabel: (0, _index.getMarkerLabelStyle)(),
55
47
  lineBorder: {
56
48
  stroke: _reacttheme.tokens.colorNeutralBackground1,
57
49
  [_index.HighContrastSelector]: {
58
50
  stroke: 'Canvas'
59
51
  }
60
- },
61
- markerLabel: {
62
- fill: _reacttheme.tokens.colorNeutralForeground1,
63
- textAnchor: 'middle',
64
- selectors: {
65
- [_index.HighContrastSelector]: {
66
- fill: 'CanvasText'
67
- }
68
- }
69
52
  }
70
53
  });
71
54
  const useLineChartStyles = (props)=>{
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/LineChart/useLineChartStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { LineChartProps, LineChartStyles } from './LineChart.types';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { HighContrastSelector } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const linechartClassNames: SlotClassNames<LineChartStyles> = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n tooltip: {\n display: 'flex',\n flexDirection: 'column',\n ...shorthands.padding(tokens.spacingHorizontalS),\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n fill: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n },\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas',\n },\n },\n markerLabel: {\n fill: tokens.colorNeutralForeground1,\n textAnchor: 'middle',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useLineChartStyles = (props: LineChartProps): LineChartStyles => {\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","HighContrastSelector","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","display","flexDirection","padding","spacingHorizontalS","position","textAlign","top","spacingVerticalNone","fill","colorNeutralBackground1","borderRadius","borderRadiusSmall","pointerEvents","stroke","colorNeutralForeground1","textAnchor","selectors","useLineChartSt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AAEmC,WAAWnC,WAAW,CAAC,2BAA2B;IAC/G;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/LineChart/useLineChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { LineChartProps, LineChartStyles } from './LineChart.types';\nimport { SlotClassNames } from '@fluentui/react-utilities/src/index';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getMarkerLabelStyle, getTooltipStyle } from '../../utilities/index';\n\n/**\n * @internal\n */\nexport const linechartClassNames: SlotClassNames<LineChartStyles> = {\n tooltip: 'fui-line__tooltip',\n lineBorder: 'fui-line_lineBorder',\n markerLabel: 'fui-line__markerLabel',\n root: 'fui-line__root',\n xAxis: 'fui-line__xAxis',\n yAxis: 'fui-line__yAxis',\n legendContainer: 'fui-line__legendContainer',\n hover: 'fui-line__hover',\n descriptionMessage: 'fui-line__descriptionMessage',\n axisTitle: 'fui-line__axisTitle',\n chartTitle: 'fui-line__chartTitle',\n opacityChangeOnHover: 'fui-line__opacityChangeOnHover',\n shapeStyles: 'fui-line__shapeStyles',\n chartWrapper: 'fui-line__chartWrapper',\n svgTooltip: '',\n chart: '',\n axisAnnotation: '',\n};\n\n/**\n * Base Styles\n */\nconst useStyles = makeStyles({\n tooltip: getTooltipStyle() as GriffelStyle,\n markerLabel: getMarkerLabelStyle() as GriffelStyle,\n lineBorder: {\n stroke: tokens.colorNeutralBackground1,\n [HighContrastSelector]: {\n stroke: 'Canvas',\n },\n },\n});\n\n/**\n * Apply styling to the Carousel slots based on the state\n */\nexport const useLineChartStyles = (props: LineChartProps): LineChartStyles => {\n const baseStyles = useStyles();\n return {\n tooltip: mergeClasses(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/),\n lineBorder: mergeClasses(linechartClassNames.lineBorder, baseStyles.lineBorder /*props.styles?.lineBorder*/),\n markerLabel: mergeClasses(linechartClassNames.markerLabel, baseStyles.markerLabel /*props.styles?.markerLabel*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","HighContrastSelector","getMarkerLabelStyle","getTooltipStyle","linechartClassNames","tooltip","lineBorder","markerLabel","root","xAxis","yAxis","legendContainer","hover","descriptionMessage","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","svgTooltip","chart","axisAnnotation","useStyles","stroke","colorNeutralBackground1","useLineChartStyles","props","baseStyles"],"mappings":"AAAA;;;;;;;;;;;;IAYaM,mBAAAA;;;IAqCAqB,kBAAAA;;;;uBA/C0C,iBAAiB;4BACjD,wBAAwB;uBAGV,wBAAwB;AAMtD,4BAA6D;IAClEpB,SAAS;IACTC,YAAY;IACZC,aAAa;IACbC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,YAAY;IACZC,OAAO;IACPC,gBAAgB;AAClB,EAAE;AAEF;;CAEC,GACD,MAAMC,gBAAYxB,iBAAAA,EAAW;IAC3BO,aAASF,sBAAAA;IACTI,iBAAaL,0BAAAA;IACbI,YAAY;QACViB,QAAQvB,kBAAAA,CAAOwB,uBAAuB;QACtC,CAACvB,2BAAAA,CAAqB,EAAE;YACtBsB,QAAQ;QACV;IACF;AACF;AAKO,2BAA2B,CAACG;IACjC,MAAMC,aAAaL;IACnB,OAAO;QACLjB,aAASN,mBAAAA,EAAaK,oBAAoBC,OAAO,EAAEsB,WAAWtB,OAAO,CAAC,uBAAuB;QAC7FC,gBAAYP,mBAAAA,EAAaK,oBAAoBE,UAAU,EAAEqB,WAAWrB,UAAU,CAAC,0BAA0B;QACzGC,iBAAaR,mBAAAA,EAAaK,oBAAoBG,WAAW,EAAEoB,WAAWpB,WAAW,CAAC,2BAA2B;IAC/G;AACF,EAAE"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ResponsiveContainer/ResponsiveContainer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getWindow } from '../../utilities/getWindow';\nimport { ResponsiveChildProps, ResponsiveContainerProps } from './ResponsiveContainer.types';\nimport { useResponsiveChildStyles } from './useResponsiveChildStyles.styles';\nimport { mergeClasses } from '@griffel/react';\n\n/**\n * Responsive Container component\n * {@docCategory ResponsiveContainer}\n */\nexport const ResponsiveContainer: React.FC<ResponsiveContainerProps> = props => {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const onResizeRef = React.useRef<ResponsiveContainerProps['onResize']>();\n const childClasses = useResponsiveChildStyles();\n\n const [size, setSize] = React.useState<{ containerWidth?: number; containerHeight?: number }>({});\n\n onResizeRef.current = props.onResize;\n\n React.useEffect(() => {\n const _window = getWindow(containerRef.current) as (Window & typeof globalThis) | undefined;\n let animationFrameId: number | undefined;\n let resizeObserver: ResizeObserver | undefined;\n\n const resizeCallback = (entries: ResizeObserverEntry[]) => {\n const { width: containerWidth, height: containerHeight } = entries[0].contentRect;\n // rAF is an alternative to the throttle function. For more info, see:\n // https://css-tricks.com/debouncing-throttling-explained-examples/#aa-requestanimationframe-raf\n animationFrameId = _window?.requestAnimationFrame(() => {\n setSize(prevSize => {\n const roundedWidth = Math.floor(containerWidth);\n const roundedHeight = Math.floor(containerHeight);\n if (prevSize.containerWidth === roundedWidth && prevSize.containerHeight === roundedHeight) {\n return prevSize;\n }\n\n return { containerWidth: roundedWidth, containerHeight: roundedHeight };\n });\n });\n onResizeRef.current?.(containerWidth, containerHeight);\n };\n\n if (_window && _window.ResizeObserver) {\n resizeObserver = new _window.ResizeObserver(resizeCallback);\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current);\n }\n }\n\n return () => {\n if (animationFrameId) {\n _window?.cancelAnimationFrame(animationFrameId);\n }\n\n resizeObserver?.disconnect();\n };\n }, []);\n\n const chartContent = React.useMemo(() => {\n let calculatedWidth = size.containerWidth;\n let calculatedHeight = size.containerHeight;\n\n if (typeof props.aspect === 'number' && props.aspect > 0) {\n if (calculatedWidth) {\n calculatedHeight = calculatedWidth / props.aspect;\n } else if (calculatedHeight) {\n calculatedWidth = calculatedHeight * props.aspect;\n }\n\n if (typeof props.maxHeight === 'number' && calculatedHeight && calculatedHeight > props.maxHeight) {\n calculatedHeight = props.maxHeight;\n }\n }\n\n return React.Children.map(props.children, child => {\n return React.cloneElement<ResponsiveChildProps>(child, {\n width: calculatedWidth,\n height: calculatedHeight,\n // For SankeyChart\n shouldResize: (calculatedWidth ?? 0) + (calculatedHeight ?? 0),\n styles: {\n root: mergeClasses(child.props.styles?.root, childClasses.root),\n chartWrapper: mergeClasses(child.props.styles?.chartWrapper, childClasses.chartWrapper),\n chart: mergeClasses(child.props.styles?.chart, childClasses.chart),\n },\n });\n });\n }, [size, props.aspect, props.maxHeight, props.children]);\n\n return (\n <div\n ref={containerRef}\n style={{\n width: props.width ?? '100%',\n height: props.height ?? '100%',\n minWidth: props.minWidth,\n minHeight: props.minHeight,\n maxHeight: props.maxHeight,\n }}\n >\n {chartContent}\n </div>\n );\n};\nResponsiveContainer.displayName = 'ResponsiveContainer';\n"],"names":["React","getWindow","useResponsiveChildStyles","mergeClasses","ResponsiveContainer","props","containerRef","useRef","onResizeRef","childClasses","size","setSize","useState","current","onResize","useEffect","_window","animationFrameId","resizeObserver","resizeCallback","entries","width","containerWidth","height","containerHeight","contentRect","requestAnimationFrame","prevSize","roundedWidth","Math","floor","roundedHeight","ResizeObserver","observe","cancelAnimationFrame","disconnect","chartContent","useMemo","calculatedWidth","calculatedHeight","aspect","maxHeight","Children","map","children","child","cloneElement","shouldResize","styles","root","chartWrapper","chart","div","ref","style","minWidth","minHeight","displayName"],"mappings":";;;;+BAUaI;;;;;;;iEAVU,QAAQ;2BACL,4BAA4B;gDAEb,oCAAoC;wBAChD,iBAAiB;AAMvC,4BAAgEC,CAAAA;IACrE,MAAM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AAA,KAAAA,IAAAA,KAAAA,IAAAA,qBAAoBK,YAAY,EAAEzC,aAAayC,YAAY;oBACtFC,WAAOhD,oBAAAA,EAAAA,CAAa0C,uBAAAA,MAAMxC,KAAK,CAAC2C,MAAAA,AAAM,MAAA,QAAlBH,yBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,qBAAoBM,KAAK,EAAE1C,aAAa0C,KAAK;gBACnE;YACF;QACF;IACF,GAAG;QAACzC;QAAML,MAAMmC,MAAM;QAAEnC,MAAMoC,SAAS;QAAEpC,MAAMuC,QAAQ;KAAC;QAM3CvC,cACCA;IALd,OAAA,WAAA,GACE,OAAA,aAAA,CAAC+C,OAAAA;QACCC,KAAK/C;QACLgD,OAAO;YACLjC,OAAOhB,gBAAAA,MAAMgB,KAAAA,AAAK,MAAA,QAAXhB,iBAAAA,KAAAA,IAAAA,eAAe;YACtBkB,QAAQlB,CAAAA,gBAAAA,MAAMkB,MAAAA,AAAM,MAAA,QAAZlB,kBAAAA,KAAAA,IAAAA,gBAAgB;YACxBkD,UAAUlD,MAAMkD,QAAQ;YACxBC,WAAWnD,MAAMmD,SAAS;YAC1Bf,WAAWpC,MAAMoC,SAAS;QAC5B;OAECL;AAGP,EAAE;AACFhC,oBAAoBqD,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/ResponsiveContainer/ResponsiveContainer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getWindow } from '../../utilities/getWindow';\nimport { ResponsiveChildProps, ResponsiveContainerProps } from './ResponsiveContainer.types';\nimport { useResponsiveChildStyles } from './useResponsiveChildStyles.styles';\nimport { mergeClasses } from '@griffel/react';\n\n/**\n * Responsive Container component\n * {@docCategory ResponsiveContainer}\n */\nexport const ResponsiveContainer: React.FC<ResponsiveContainerProps> = props => {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const onResizeRef = React.useRef<ResponsiveContainerProps['onResize']>();\n const childClasses = useResponsiveChildStyles();\n\n const [size, setSize] = React.useState<{ containerWidth?: number; containerHeight?: number }>({});\n\n onResizeRef.current = props.onResize;\n\n React.useEffect(() => {\n const _window = getWindow(containerRef.current) as (Window & typeof globalThis) | undefined;\n let animationFrameId: number | undefined;\n let resizeObserver: ResizeObserver | undefined;\n\n const resizeCallback = (entries: ResizeObserverEntry[]) => {\n const { width: containerWidth, height: containerHeight } = entries[0].contentRect;\n // rAF is an alternative to the throttle function. For more info, see:\n // https://css-tricks.com/debouncing-throttling-explained-examples/#aa-requestanimationframe-raf\n animationFrameId = _window?.requestAnimationFrame(() => {\n setSize(prevSize => {\n const roundedWidth = Math.floor(containerWidth);\n const roundedHeight = Math.floor(containerHeight);\n if (prevSize.containerWidth === roundedWidth && prevSize.containerHeight === roundedHeight) {\n return prevSize;\n }\n\n return { containerWidth: roundedWidth, containerHeight: roundedHeight };\n });\n });\n onResizeRef.current?.(containerWidth, containerHeight);\n };\n\n if (_window && _window.ResizeObserver) {\n resizeObserver = new _window.ResizeObserver(resizeCallback);\n if (containerRef.current) {\n resizeObserver.observe(containerRef.current);\n }\n }\n\n return () => {\n if (animationFrameId) {\n _window?.cancelAnimationFrame(animationFrameId);\n }\n\n resizeObserver?.disconnect();\n };\n }, []);\n\n const chartContent = React.useMemo(() => {\n let calculatedWidth = size.containerWidth;\n let calculatedHeight = size.containerHeight;\n\n if (typeof props.aspect === 'number' && props.aspect > 0) {\n if (calculatedWidth) {\n calculatedHeight = calculatedWidth / props.aspect;\n } else if (calculatedHeight) {\n calculatedWidth = calculatedHeight * props.aspect;\n }\n\n if (typeof props.maxHeight === 'number' && calculatedHeight && calculatedHeight > props.maxHeight) {\n calculatedHeight = props.maxHeight;\n }\n }\n\n return React.Children.map(props.children, child => {\n return React.cloneElement<ResponsiveChildProps>(child, {\n width: calculatedWidth,\n height: calculatedHeight,\n // For SankeyChart\n shouldResize: (calculatedWidth ?? 0) + (calculatedHeight ?? 0),\n styles: {\n root: mergeClasses(child.props.styles?.root, childClasses.root),\n chartWrapper: mergeClasses(child.props.styles?.chartWrapper, childClasses.chartWrapper),\n chart: mergeClasses(child.props.styles?.chart, childClasses.chart),\n },\n });\n });\n }, [size, props.aspect, props.maxHeight, props.children]);\n\n return (\n <div\n ref={containerRef}\n style={{\n width: props.width ?? '100%',\n height: props.height ?? '100%',\n minWidth: props.minWidth,\n minHeight: props.minHeight,\n maxHeight: props.maxHeight,\n }}\n >\n {chartContent}\n </div>\n );\n};\nResponsiveContainer.displayName = 'ResponsiveContainer';\n"],"names":["React","getWindow","useResponsiveChildStyles","mergeClasses","ResponsiveContainer","props","containerRef","useRef","onResizeRef","childClasses","size","setSize","useState","current","onResize","useEffect","_window","animationFrameId","resizeObserver","resizeCallback","entries","width","containerWidth","height","containerHeight","contentRect","requestAnimationFrame","prevSize","roundedWidth","Math","floor","roundedHeight","ResizeObserver","observe","cancelAnimationFrame","disconnect","chartContent","useMemo","calculatedWidth","calculatedHeight","aspect","maxHeight","Children","map","children","child","cloneElement","shouldResize","styles","root","chartWrapper","chart","div","ref","style","minWidth","minHeight","displayName"],"mappings":"AAAA;;;;;+BAYaI;;;;;;;iEAVU,QAAQ;2BACL,4BAA4B;gDAEb,oCAAoC;wBAChD,iBAAiB;AAMvC,4BAAgEC,CAAAA;IACrE,MAAMC,eAAeN,OAAMO,MAAM,CAAiB;IAClD,MAAMC,cAAcR,OAAMO,MAAM;IAChC,MAAME,mBAAeP,wDAAAA;IAErB,MAAM,CAACQ,MAAMC,QAAQ,GAAGX,OAAMY,QAAQ,CAAwD,CAAC;IAE/FJ,YAAYK,OAAO,GAAGR,MAAMS,QAAQ;IAEpCd,OAAMe,SAAS,CAAC;QACd,MAAMC,cAAUf,oBAAAA,EAAUK,aAAaO,OAAO;QAC9C,IAAII;QACJ,IAAIC;QAEJ,MAAMC,iBAAiB,CAACC;gBAetBZ;YAdA,MAAM,EAAEa,OAAOC,cAAc,EAAEC,QAAQC,eAAe,EAAE,GAAGJ,OAAO,CAAC,EAAE,CAACK,WAAW;YACjF,sEAAsE;YACtE,gGAA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eAAAA,MAAMgB,KAAAA,AAAK,MAAA,QAAXhB,iBAAAA,KAAAA,IAAAA,eAAe;YACtBkB,QAAQlB,CAAAA,gBAAAA,MAAMkB,MAAAA,AAAM,MAAA,QAAZlB,kBAAAA,KAAAA,IAAAA,gBAAgB;YACxBkD,UAAUlD,MAAMkD,QAAQ;YACxBC,WAAWnD,MAAMmD,SAAS;YAC1Bf,WAAWpC,MAAMoC,SAAS;QAC5B;OAECL;AAGP,EAAE;AACFhC,oBAAoBqD,WAAW,GAAG"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
@@ -1 +1 @@
1
- {"version":3,"sources":["useResponsiveChildStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nexport const responsiveChildClassNames = {\n root: 'fui-charts-resp-child__root',\n chartWrapper: 'fui-charts-resp-child__chartWrapper',\n chart: 'fui-charts-resp-child__chart'\n};\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%'\n },\n chartWrapper: {\n width: '100%'\n },\n chart: {\n // This overrides the pixel width of svg allowing it to resize properly within a flexbox or grid layout.\n // Note: height is not set to 100% because that causes the charts to resize vertically in an infinite loop.\n width: '100%'\n }\n});\nexport const useResponsiveChildStyles = ()=>{\n const baseStyles = useStyles();\n return {\n root: mergeClasses(responsiveChildClassNames.root, baseStyles.root),\n chartWrapper: mergeClasses(responsiveChildClassNames.chartWrapper, baseStyles.chartWrapper),\n chart: mergeClasses(responsiveChildClassNames.chart, baseStyles.chart)\n };\n};\n"],"names":["__styles","mergeClasses","responsiveChildClassNames","root","chartWrapper","chart","useStyles","a9b677","Bqenvij","d","useResponsiveChildStyles","baseStyles"],"mappings":";;;;;;;;;;;IACaE,yBAAyB;;;4BAmBD;;;;uBApBI,gBAAgB;AAClD,kCAAkC;IACrCC,IAAI,EAAE,6BAA6B;IACnCC,YAAY,EAAE,qCAAqC;IACnDC,KAAK,EAAE;AACX,CAAC;AACD,MAAMC,SAAS,GAAA,WAAA,OAAGN,eAAA,EAAA;IAAAG,IAAA,EAAA;QAAAI,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAJ,YAAA,EAAA;QAAAG,MAAA,EAAA;IAAA;IAAAF,KAAA,EAAA;QAAAE,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAE,CAAA,EAAA;QAAA;QAAA;KAAA;AAAA,CAajB,CAAC;AACK,MAAMC,2BAA2BA,CAAA,KAAI;IACxC,MAAMC,UAAU,GAAGL,SAAS,CAAC,CAAC;IAC9B,OAAO;QACHH,IAAI,MAAEF,mBAAY,EAACC,yBAAyB,CAACC,IAAI,EAAEQ,UAAU,CAACR,IAAI,CAAC;QACnEC,YAAY,MAAEH,mBAAY,EAACC,yBAAyB,CAACE,YAAY,EAAEO,UAAU,CAACP,YAAY,CAAC;QAC3FC,KAAK,MAAEJ,mBAAY,EAACC,yBAAyB,CAACG,KAAK,EAAEM,UAAU,CAACN,KAAK;IACzE,CAAC;AACL,CAAC"}
1
+ {"version":3,"sources":["useResponsiveChildStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nexport const responsiveChildClassNames = {\n root: 'fui-charts-resp-child__root',\n chartWrapper: 'fui-charts-resp-child__chartWrapper',\n chart: 'fui-charts-resp-child__chart'\n};\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%'\n },\n chartWrapper: {\n width: '100%'\n },\n chart: {\n // This overrides the pixel width of svg allowing it to resize properly within a flexbox or grid layout.\n // Note: height is not set to 100% because that causes the charts to resize vertically in an infinite loop.\n width: '100%'\n }\n});\nexport const useResponsiveChildStyles = ()=>{\n const baseStyles = useStyles();\n return {\n root: mergeClasses(responsiveChildClassNames.root, baseStyles.root),\n chartWrapper: mergeClasses(responsiveChildClassNames.chartWrapper, baseStyles.chartWrapper),\n chart: mergeClasses(responsiveChildClassNames.chart, baseStyles.chart)\n };\n};\n"],"names":["__styles","mergeClasses","responsiveChildClassNames","root","chartWrapper","chart","useStyles","a9b677","Bqenvij","d","useResponsiveChildStyles","baseStyles"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAECE,yBAAyB;;;IAmBzBQ,wBAAwB;;;;uBApBI,gBAAgB;AAClD,kCAAkC;IACrCP,IAAI,EAAE,6BAA6B;IACnCC,YAAY,EAAE,qCAAqC;IACnDC,KAAK,EAAE;AACX,CAAC;AACD,MAAMC,SAAS,GAAA,WAAA,OAAGN,eAAA,EAAA;IAAAG,IAAA,EAAA;QAAAI,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAJ,YAAA,EAAA;QAAAG,MAAA,EAAA;IAAA;IAAAF,KAAA,EAAA;QAAAE,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAE,CAAA,EAAA;QAAA;QAAA;KAAA;AAAA,CAajB,CAAC;AACK,iCAAiCC,CAAA,KAAI;IACxC,MAAMC,UAAU,GAAGL,SAAS,CAAC,CAAC;IAC9B,OAAO;QACHH,IAAI,MAAEF,mBAAY,EAACC,yBAAyB,CAACC,IAAI,EAAEQ,UAAU,CAACR,IAAI,CAAC;QACnEC,YAAY,MAAEH,mBAAY,EAACC,yBAAyB,CAACE,YAAY,EAAEO,UAAU,CAACP,YAAY,CAAC;QAC3FC,KAAK,MAAEJ,mBAAY,EAACC,yBAAyB,CAACG,KAAK,EAAEM,UAAU,CAACN,KAAK;IACzE,CAAC;AACL,CAAC"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ResponsiveContainer/useResponsiveChildStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { ResponsiveChildStyles } from './ResponsiveContainer.types';\nimport { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const responsiveChildClassNames: SlotClassNames<ResponsiveChildStyles> = {\n root: 'fui-charts-resp-child__root',\n chartWrapper: 'fui-charts-resp-child__chartWrapper',\n chart: 'fui-charts-resp-child__chart',\n};\n\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%',\n },\n chartWrapper: {\n width: '100%',\n },\n chart: {\n // This overrides the pixel width of svg allowing it to resize properly within a flexbox or grid layout.\n // Note: height is not set to 100% because that causes the charts to resize vertically in an infinite loop.\n width: '100%',\n },\n});\n\nexport const useResponsiveChildStyles = (): ResponsiveChildStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(responsiveChildClassNames.root, baseStyles.root),\n chartWrapper: mergeClasses(responsiveChildClassNames.chartWrapper, baseStyles.chartWrapper),\n chart: mergeClasses(responsiveChildClassNames.chart, baseStyles.chart),\n };\n};\n"],"names":["makeStyles","mergeClasses","responsiveChildClassNames","root","chartWrapper","chart","useStyles","width","height","useResponsiveChildStyles","baseStyles"],"mappings":";;;;;;;;;;;IAIaE,yBAAAA;;;IAqBAO,wBAAAA;;;;uBAzB4B,iBAAiB;AAInD,kCAAyE;IAC9EN,MAAM;IACNC,cAAc;IACdC,OAAO;AACT,EAAE;AAEF,MAAMC,gBAAYN,iBAAAA,EAAW;IAC3BG,MAAM;QACJI,OAAO;QACPC,QAAQ;IACV;IACAJ,cAAc;QACZG,OAAO;IACT;IACAF,OAAO;QACL,wGAAwG;QACxG,2GAA2G;QAC3GE,OAAO;IACT;AACF;AAEO,iCAAiC;IACtC,MAAMG,aAAaJ;IAEnB,OAAO;QACLH,UAAMF,mBAAAA,EAAaC,0BAA0BC,IAAI,EAAEO,WAAWP,IAAI;QAClEC,kBAAcH,mBAAAA,EAAaC,0BAA0BE,YAAY,EAAEM,WAAWN,YAAY;QAC1FC,WAAOJ,mBAAAA,EAAaC,0BAA0BG,KAAK,EAAEK,WAAWL,KAAK;IACvE;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/ResponsiveContainer/useResponsiveChildStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { ResponsiveChildStyles } from './ResponsiveContainer.types';\nimport { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const responsiveChildClassNames: SlotClassNames<ResponsiveChildStyles> = {\n root: 'fui-charts-resp-child__root',\n chartWrapper: 'fui-charts-resp-child__chartWrapper',\n chart: 'fui-charts-resp-child__chart',\n};\n\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%',\n },\n chartWrapper: {\n width: '100%',\n },\n chart: {\n // This overrides the pixel width of svg allowing it to resize properly within a flexbox or grid layout.\n // Note: height is not set to 100% because that causes the charts to resize vertically in an infinite loop.\n width: '100%',\n },\n});\n\nexport const useResponsiveChildStyles = (): ResponsiveChildStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(responsiveChildClassNames.root, baseStyles.root),\n chartWrapper: mergeClasses(responsiveChildClassNames.chartWrapper, baseStyles.chartWrapper),\n chart: mergeClasses(responsiveChildClassNames.chart, baseStyles.chart),\n };\n};\n"],"names":["makeStyles","mergeClasses","responsiveChildClassNames","root","chartWrapper","chart","useStyles","width","height","useResponsiveChildStyles","baseStyles"],"mappings":"AAAA;;;;;;;;;;;;IAMaE,yBAAAA;;;4BAqBAO;eAAAA;;;uBAzB4B,iBAAiB;AAInD,kCAAyE;IAC9EN,MAAM;IACNC,cAAc;IACdC,OAAO;AACT,EAAE;AAEF,MAAMC,gBAAYN,iBAAAA,EAAW;IAC3BG,MAAM;QACJI,OAAO;QACPC,QAAQ;IACV;IACAJ,cAAc;QACZG,OAAO;IACT;IACAF,OAAO;QACL,wGAAwG;QACxG,2GAA2G;QAC3GE,OAAO;IACT;AACF;AAEO,iCAAiC;IACtC,MAAMG,aAAaJ;IAEnB,OAAO;QACLH,UAAMF,mBAAAA,EAAaC,0BAA0BC,IAAI,EAAEO,WAAWP,IAAI;QAClEC,kBAAcH,mBAAAA,EAAaC,0BAA0BE,YAAY,EAAEM,WAAWN,YAAY;QAC1FC,WAAOJ,mBAAAA,EAAaC,0BAA0BG,KAAK,EAAEK,WAAWL,KAAK;IACvE;AACF,EAAE"}
@@ -1,4 +1,5 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */ "use strict";
1
+ 'use client';
2
+ "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true
4
5
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ResponsiveContainer/withResponsiveContainer.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as React from 'react';\nimport { ResponsiveContainer } from './ResponsiveContainer';\nimport { ResponsiveContainerProps } from './ResponsiveContainer.types';\n\n/**\n * An HOC to update wrapped component on container resize.\n * {@docCategory ResponsiveContainer}\n */\nexport function withResponsiveContainer<TProps extends Omit<ResponsiveContainerProps, 'children'>>(\n WrappedComponent: React.ComponentType<TProps>,\n) {\n const ComponentWithResponsiveContainer: React.FC<TProps> = ({\n aspect,\n width,\n height,\n minWidth,\n minHeight,\n maxHeight,\n onResize,\n ...restProps\n }) => {\n return (\n <ResponsiveContainer\n aspect={aspect}\n width={width}\n height={height}\n minWidth={minWidth}\n minHeight={minHeight}\n maxHeight={maxHeight}\n onResize={onResize}\n >\n <WrappedComponent {...(restProps as any)} />\n </ResponsiveContainer>\n );\n };\n\n return ComponentWithResponsiveContainer;\n}\n"],"names":["React","ResponsiveContainer","withResponsiveContainer","WrappedComponent","ComponentWithResponsiveContainer","aspect","width","height","minWidth","minHeight","maxHeight","onResize","restProps"],"mappings":"AAAA,qDAAqD,GACrD,YAAYA;;;;;;;;;;;iEAAW,QAAQ;qCACK,wBAAwB;AAOrD,SAASE,wBACdC,gBAA6C;IAE7C,MAAMC,mCAAqD,CAAC,EAC1DC,MAAM,EACNC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACR,GAAGC,WACJ;QACC,OAAA,WAAA,GACE,OAAA,aAAA,CAACX,wCAAAA,EAAAA;YACCI,QAAQA;YACRC,OAAOA;YACPC,QAAQA;YACRC,UAAUA;YACVC,WAAWA;YACXC,WAAWA;YACXC,UAAUA;yBAEV,OAAA,aAAA,CAACR,kBAAsBS;IAG7B;IAEA,OAAOR;AACT"}
1
+ {"version":3,"sources":["../src/components/ResponsiveContainer/withResponsiveContainer.tsx"],"sourcesContent":["'use client';\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as React from 'react';\nimport { ResponsiveContainer } from './ResponsiveContainer';\nimport { ResponsiveContainerProps } from './ResponsiveContainer.types';\n\n/**\n * An HOC to update wrapped component on container resize.\n * {@docCategory ResponsiveContainer}\n */\nexport function withResponsiveContainer<TProps extends Omit<ResponsiveContainerProps, 'children'>>(\n WrappedComponent: React.ComponentType<TProps>,\n): React.FC<TProps> {\n const ComponentWithResponsiveContainer: React.FC<TProps> = ({\n aspect,\n width,\n height,\n minWidth,\n minHeight,\n maxHeight,\n onResize,\n ...restProps\n }) => {\n return (\n <ResponsiveContainer\n aspect={aspect}\n width={width}\n height={height}\n minWidth={minWidth}\n minHeight={minHeight}\n maxHeight={maxHeight}\n onResize={onResize}\n >\n <WrappedComponent {...(restProps as any)} />\n </ResponsiveContainer>\n );\n };\n\n return ComponentWithResponsiveContainer;\n}\n"],"names":["React","ResponsiveContainer","withResponsiveContainer","WrappedComponent","ComponentWithResponsiveContainer","aspect","width","height","minWidth","minHeight","maxHeight","onResize","restProps"],"mappings":"AAAA;;;;;+BAWgBE;;;;;;;iEARO,QAAQ;qCACK,wBAAwB;AAOrD,iCACLC,gBAA6C;IAE7C,MAAMC,mCAAqD,CAAC,EAC1DC,MAAM,EACNC,KAAK,EACLC,MAAM,EACNC,QAAQ,EACRC,SAAS,EACTC,SAAS,EACTC,QAAQ,EACR,GAAGC,WACJ;QACC,OAAA,WAAA,GACE,OAAA,aAAA,CAACX,wCAAAA,EAAAA;YACCI,QAAQA;YACRC,OAAOA;YACPC,QAAQA;YACRC,UAAUA;YACVC,WAAWA;YACXC,WAAWA;YACXC,UAAUA;yBAEV,OAAA,aAAA,CAACR,kBAAsBS;IAG7B;IAEA,OAAOR;AACT"}
@@ -1,3 +1,4 @@
1
+ 'use client';
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", {
3
4
  value: true