@fluentui/react-charts 9.3.5 → 9.3.7

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 (337) hide show
  1. package/CHANGELOG.md +42 -2
  2. package/dist/index.d.ts +239 -55
  3. package/lib/AnnotationOnlyChart.js +1 -0
  4. package/lib/AnnotationOnlyChart.js.map +1 -0
  5. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js +194 -0
  6. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  7. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +1 -0
  8. package/lib/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  9. package/lib/components/AnnotationOnlyChart/index.js +2 -0
  10. package/lib/components/AnnotationOnlyChart/index.js.map +1 -0
  11. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +31 -0
  12. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
  13. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +23 -0
  14. package/lib/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
  15. package/lib/components/AreaChart/AreaChart.js +3 -16
  16. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  17. package/lib/components/AreaChart/useAreaChartStyles.styles.js +11 -6
  18. package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  19. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
  20. package/lib/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  21. package/lib/components/ChartTable/ChartTable.js +2 -10
  22. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  23. package/lib/components/ChartTable/ChartTable.types.js.map +1 -1
  24. package/lib/components/ChartTable/useChartTableStyles.styles.js +59 -39
  25. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  26. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +5 -5
  27. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  28. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js +617 -0
  29. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  30. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +1 -0
  31. package/lib/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  32. package/lib/components/CommonComponents/Annotations/index.js +2 -0
  33. package/lib/components/CommonComponents/Annotations/index.js.map +1 -0
  34. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +173 -0
  35. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
  36. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +126 -0
  37. package/lib/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
  38. package/lib/components/CommonComponents/CartesianChart.js +159 -132
  39. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  40. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  41. package/lib/components/CommonComponents/ChartPopover.js +1 -2
  42. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  43. package/lib/components/CommonComponents/index.js +2 -0
  44. package/lib/components/CommonComponents/index.js.map +1 -1
  45. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +32 -14
  46. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  47. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +17 -2
  48. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  49. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +2 -6
  50. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  51. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +1 -2
  52. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  53. package/lib/components/DeclarativeChart/DeclarativeChart.js +83 -40
  54. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  55. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +4 -8
  56. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  57. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +692 -94
  58. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  59. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +23 -8
  60. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  61. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +2 -2
  62. package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  63. package/lib/components/DonutChart/DonutChart.js +3 -12
  64. package/lib/components/DonutChart/DonutChart.js.map +1 -1
  65. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  66. package/lib/components/DonutChart/Pie/Pie.js +4 -2
  67. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  68. package/lib/components/DonutChart/useDonutChartStyles.styles.js +2 -2
  69. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  70. package/lib/components/FunnelChart/FunnelChart.js +2 -10
  71. package/lib/components/FunnelChart/FunnelChart.js.map +1 -1
  72. package/lib/components/FunnelChart/FunnelChart.types.js.map +1 -1
  73. package/lib/components/GanttChart/GanttChart.js +6 -19
  74. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  75. package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
  76. package/lib/components/GanttChart/useGanttChartStyles.styles.js +3 -1
  77. package/lib/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
  78. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
  79. package/lib/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  80. package/lib/components/GaugeChart/GaugeChart.js +2 -10
  81. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  82. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  83. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +8 -20
  84. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  85. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +11 -6
  86. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  87. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
  88. package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  89. package/lib/components/HeatMapChart/HeatMapChart.js +4 -17
  90. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  91. package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  92. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
  93. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  94. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
  95. package/lib/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  96. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +25 -12
  97. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  98. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +4 -4
  99. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  100. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +5 -23
  101. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  102. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  103. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
  104. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  105. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
  106. package/lib/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  107. package/lib/components/Legends/Legends.types.js.map +1 -1
  108. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  109. package/lib/components/Legends/useLegendsStyles.styles.js +97 -37
  110. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
  111. package/lib/components/Legends/useLegendsStyles.styles.raw.js +10 -11
  112. package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  113. package/lib/components/LineChart/LineChart.js +11 -20
  114. package/lib/components/LineChart/LineChart.js.map +1 -1
  115. package/lib/components/LineChart/LineChart.types.js +1 -1
  116. package/lib/components/LineChart/LineChart.types.js.map +1 -1
  117. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +3 -4
  118. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  119. package/lib/components/LineChart/useLineChartStyles.styles.js +15 -10
  120. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  121. package/lib/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
  122. package/lib/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  123. package/lib/components/SankeyChart/SankeyChart.js +3 -9
  124. package/lib/components/SankeyChart/SankeyChart.js.map +1 -1
  125. package/lib/components/SankeyChart/SankeyChart.types.js.map +1 -1
  126. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +13 -10
  127. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  128. package/lib/components/ScatterChart/ScatterChart.js +24 -24
  129. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  130. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
  131. package/lib/components/ScatterChart/useScatterChartStyles.styles.js +13 -8
  132. package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  133. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
  134. package/lib/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  135. package/lib/components/Sparkline/Sparkline.js +11 -7
  136. package/lib/components/Sparkline/Sparkline.js.map +1 -1
  137. package/lib/components/VerticalBarChart/VerticalBarChart.js +3 -15
  138. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  139. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +13 -8
  140. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  141. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
  142. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  143. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +8 -18
  144. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  145. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  146. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +11 -6
  147. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  148. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
  149. package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  150. package/lib/index.js +1 -0
  151. package/lib/index.js.map +1 -1
  152. package/lib/types/ChartAnnotation.js +1 -0
  153. package/lib/types/ChartAnnotation.js.map +1 -0
  154. package/lib/types/DataPoint.js.map +1 -1
  155. package/lib/types/index.js +1 -0
  156. package/lib/types/index.js.map +1 -1
  157. package/lib/utilities/Common.styles.js +1 -2
  158. package/lib/utilities/Common.styles.js.map +1 -1
  159. package/lib/utilities/Common.styles.raw.js +1 -2
  160. package/lib/utilities/Common.styles.raw.js.map +1 -1
  161. package/lib/utilities/FocusableTooltipText.js +1 -1
  162. package/lib/utilities/FocusableTooltipText.js.map +1 -1
  163. package/lib/utilities/getWindow.js +0 -1
  164. package/lib/utilities/getWindow.js.map +1 -1
  165. package/lib/utilities/hooks.js +34 -0
  166. package/lib/utilities/hooks.js.map +1 -0
  167. package/lib/utilities/image-export-utils.js +221 -73
  168. package/lib/utilities/image-export-utils.js.map +1 -1
  169. package/lib/utilities/utilities.js +39 -37
  170. package/lib/utilities/utilities.js.map +1 -1
  171. package/lib-commonjs/AnnotationOnlyChart.js +6 -0
  172. package/lib-commonjs/AnnotationOnlyChart.js.map +1 -0
  173. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js +205 -0
  174. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.js.map +1 -0
  175. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js +6 -0
  176. package/lib-commonjs/components/AnnotationOnlyChart/AnnotationOnlyChart.types.js.map +1 -0
  177. package/lib-commonjs/components/AnnotationOnlyChart/index.js +7 -0
  178. package/lib-commonjs/components/AnnotationOnlyChart/index.js.map +1 -0
  179. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js +56 -0
  180. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.js.map +1 -0
  181. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js +33 -0
  182. package/lib-commonjs/components/AnnotationOnlyChart/useAnnotationOnlyChartStyles.styles.raw.js.map +1 -0
  183. package/lib-commonjs/components/AreaChart/AreaChart.js +2 -15
  184. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  185. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +14 -15
  186. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
  187. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js +3 -1
  188. package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.raw.js.map +1 -1
  189. package/lib-commonjs/components/ChartTable/ChartTable.js +3 -10
  190. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  191. package/lib-commonjs/components/ChartTable/ChartTable.types.js.map +1 -1
  192. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +74 -102
  193. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  194. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +4 -4
  195. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  196. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js +628 -0
  197. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.js.map +1 -0
  198. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js +4 -0
  199. package/lib-commonjs/components/CommonComponents/Annotations/ChartAnnotationLayer.types.js.map +1 -0
  200. package/lib-commonjs/components/CommonComponents/Annotations/index.js +7 -0
  201. package/lib-commonjs/components/CommonComponents/Annotations/index.js.map +1 -0
  202. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js +265 -0
  203. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.js.map +1 -0
  204. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js +161 -0
  205. package/lib-commonjs/components/CommonComponents/Annotations/useChartAnnotationLayer.styles.raw.js.map +1 -0
  206. package/lib-commonjs/components/CommonComponents/CartesianChart.js +159 -131
  207. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  208. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  209. package/lib-commonjs/components/CommonComponents/ChartPopover.js +1 -2
  210. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -1
  211. package/lib-commonjs/components/CommonComponents/index.js +2 -0
  212. package/lib-commonjs/components/CommonComponents/index.js.map +1 -1
  213. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +35 -22
  214. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  215. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +17 -2
  216. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  217. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -14
  218. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  219. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +0 -1
  220. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  221. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +82 -39
  222. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  223. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  224. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +678 -60
  225. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  226. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +25 -16
  227. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
  228. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +1 -1
  229. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
  230. package/lib-commonjs/components/DonutChart/DonutChart.js +2 -11
  231. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -1
  232. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  233. package/lib-commonjs/components/DonutChart/Pie/Pie.js +4 -2
  234. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  235. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +2 -2
  236. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  237. package/lib-commonjs/components/FunnelChart/FunnelChart.js +2 -10
  238. package/lib-commonjs/components/FunnelChart/FunnelChart.js.map +1 -1
  239. package/lib-commonjs/components/FunnelChart/FunnelChart.types.js.map +1 -1
  240. package/lib-commonjs/components/GanttChart/GanttChart.js +5 -18
  241. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
  242. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
  243. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js +3 -1
  244. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.js.map +1 -1
  245. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js +3 -1
  246. package/lib-commonjs/components/GanttChart/useGanttChartStyles.styles.raw.js.map +1 -1
  247. package/lib-commonjs/components/GaugeChart/GaugeChart.js +2 -10
  248. package/lib-commonjs/components/GaugeChart/GaugeChart.js.map +1 -1
  249. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  250. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +8 -20
  251. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  252. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +14 -15
  253. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
  254. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js +3 -1
  255. package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.raw.js.map +1 -1
  256. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +3 -16
  257. package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
  258. package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
  259. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js +3 -1
  260. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.js.map +1 -1
  261. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js +3 -1
  262. package/lib-commonjs/components/HeatMapChart/useHeatMapChartStyles.styles.raw.js.map +1 -1
  263. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +47 -34
  264. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  265. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +3 -3
  266. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  267. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +4 -21
  268. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  269. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  270. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js +3 -1
  271. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.js.map +1 -1
  272. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js +3 -1
  273. package/lib-commonjs/components/HorizontalBarChartWithAxis/useHorizontalBarChartWithAxisStyles.styles.raw.js.map +1 -1
  274. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -1
  275. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -1
  276. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +144 -86
  277. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
  278. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +9 -10
  279. package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
  280. package/lib-commonjs/components/LineChart/LineChart.js +11 -20
  281. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
  282. package/lib-commonjs/components/LineChart/LineChart.types.js +1 -1
  283. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -1
  284. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +2 -2
  285. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -1
  286. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +18 -19
  287. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
  288. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js +3 -1
  289. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.raw.js.map +1 -1
  290. package/lib-commonjs/components/SankeyChart/SankeyChart.js +3 -9
  291. package/lib-commonjs/components/SankeyChart/SankeyChart.js.map +1 -1
  292. package/lib-commonjs/components/SankeyChart/SankeyChart.types.js.map +1 -1
  293. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +16 -19
  294. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  295. package/lib-commonjs/components/ScatterChart/ScatterChart.js +22 -22
  296. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
  297. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
  298. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +16 -17
  299. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
  300. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js +3 -1
  301. package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.raw.js.map +1 -1
  302. package/lib-commonjs/components/Sparkline/Sparkline.js +11 -7
  303. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -1
  304. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +3 -15
  305. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  306. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +16 -17
  307. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
  308. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js +3 -1
  309. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.raw.js.map +1 -1
  310. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +7 -17
  311. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  312. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  313. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +14 -15
  314. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
  315. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js +3 -1
  316. package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.raw.js.map +1 -1
  317. package/lib-commonjs/index.js +1 -0
  318. package/lib-commonjs/index.js.map +1 -1
  319. package/lib-commonjs/types/ChartAnnotation.js +6 -0
  320. package/lib-commonjs/types/ChartAnnotation.js.map +1 -0
  321. package/lib-commonjs/types/DataPoint.js.map +1 -1
  322. package/lib-commonjs/types/index.js +1 -0
  323. package/lib-commonjs/types/index.js.map +1 -1
  324. package/lib-commonjs/utilities/Common.styles.js +1 -2
  325. package/lib-commonjs/utilities/Common.styles.js.map +1 -1
  326. package/lib-commonjs/utilities/Common.styles.raw.js +1 -2
  327. package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
  328. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -1
  329. package/lib-commonjs/utilities/getWindow.js +0 -1
  330. package/lib-commonjs/utilities/getWindow.js.map +1 -1
  331. package/lib-commonjs/utilities/hooks.js +45 -0
  332. package/lib-commonjs/utilities/hooks.js.map +1 -0
  333. package/lib-commonjs/utilities/image-export-utils.js +222 -74
  334. package/lib-commonjs/utilities/image-export-utils.js.map +1 -1
  335. package/lib-commonjs/utilities/utilities.js +37 -33
  336. package/lib-commonjs/utilities/utilities.js.map +1 -1
  337. package/package.json +11 -11
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ChartTable/ChartTable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChartTableProps } from './ChartTable.types';\nimport { useChartTableStyles } from './useChartTableStyles.styles';\nimport { useRtl } from '../../utilities/utilities';\nimport { ImageExportOptions } from '../../types/index';\nimport { toImage } from '../../utilities/image-export-utils';\nimport { tokens } from '@fluentui/react-theme';\nimport * as d3 from 'd3-color';\nimport { getColorContrast } from '../../utilities/colors';\nimport { resolveCSSVariables } from '../../utilities/utilities';\n\nfunction invertHexColor(hex: string): string {\n const color = d3.color(hex);\n if (!color) {\n return tokens.colorNeutralForeground1!;\n }\n const rgb = color.rgb();\n return d3.rgb(255 - rgb.r, 255 - rgb.g, 255 - rgb.b).formatHex();\n}\n\nfunction getSafeBackgroundColor(chartContainer: HTMLElement, foreground?: string, background?: string): string {\n const fallbackFg = tokens.colorNeutralForeground1;\n const fallbackBg = tokens.colorNeutralBackground1;\n if (!chartContainer) {\n return fallbackBg;\n }\n\n const resolvedFg = resolveCSSVariables(chartContainer, foreground || fallbackFg);\n const resolvedBg = resolveCSSVariables(chartContainer, background || fallbackBg);\n\n const fg = d3.color(resolvedFg);\n const bg = d3.color(resolvedBg);\n\n if (!fg || !bg) {\n return resolvedBg;\n }\n const contrast = getColorContrast(fg.formatHex(), bg.formatHex());\n if (contrast >= 3) {\n return bg.formatHex();\n }\n\n const invertedBg = invertHexColor(bg.formatHex());\n const invertedContrast = getColorContrast(fg.formatHex(), invertedBg);\n return invertedContrast >= 3 ? invertedBg : fallbackBg;\n}\n\nexport const ChartTable: React.FunctionComponent<ChartTableProps> = React.forwardRef<HTMLDivElement, ChartTableProps>(\n (props, forwardedRef) => {\n const { headers, rows, width, height } = props;\n const _isRTL: boolean = useRtl();\n const _rootElem = React.useRef<HTMLDivElement | null>(null);\n const classes = useChartTableStyles(props);\n\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n chartContainer: _rootElem.current,\n toImage: (opts?: ImageExportOptions): Promise<string> => {\n return toImage(_rootElem.current, undefined, _isRTL, opts);\n },\n }),\n [],\n );\n\n if (!headers || headers.length === 0) {\n return <div>No data available</div>;\n }\n\n const bgColorSet = new Set<string>();\n headers.forEach(header => {\n const bg = header?.style?.backgroundColor;\n const normalized = d3.color(bg || '')?.formatHex();\n if (normalized) {\n bgColorSet.add(normalized);\n }\n });\n let sharedBackgroundColor: string | undefined;\n let useSharedBackground = false;\n\n /*\n If we have only one or two unique background colors, we can consider using a shared background color\n for the table headers. This is to ensure better contrast with the foreground text.\n For size 1, we will consider that as default color if it satisfies the contrast ratio.\n There could also be a scenario where backgroundcolor array is of size 2, for eg: [\"dimsgray\", \"gray\"],\n which will assign 1st column header bg color to dimsgray and rest to gray. so our logic of shared background\n color won't run here. So will consider for size 2 as well.\n For size greater than this, we will consider that user wants different colors and will let color contrast fail\n if any.\n */\n if (bgColorSet.size === 1 || bgColorSet.size === 2) {\n const candidateBg = bgColorSet.size === 1 ? Array.from(bgColorSet)[0] : Array.from(bgColorSet)[1];\n for (const header of headers) {\n const fg = header?.style?.color;\n if (fg && getColorContrast(fg, candidateBg) >= 3) {\n sharedBackgroundColor = candidateBg;\n useSharedBackground = true;\n break;\n }\n }\n }\n\n return (\n <div\n ref={el => {\n _rootElem.current = el;\n }}\n className={classes.root as string}\n style={{ height: height ? `${height}px` : '650px', overflow: 'hidden' }}\n >\n <svg width={width ?? '100%'} height={height ?? '650px'}>\n <foreignObject x=\"0\" y=\"0\" width=\"100%\" height=\"100%\">\n <div\n style={{\n maxHeight: height ? `${height}px` : '650px',\n overflowY: 'auto',\n overflowX: 'auto',\n }}\n >\n <table\n className={classes.table}\n style={{\n width: width ? `${width}px` : '100%',\n }}\n >\n <thead>\n <tr>\n {headers.map((header, idx) => {\n const style = { ...header?.style };\n const fg = style.color;\n const bg = style.backgroundColor;\n\n if (useSharedBackground) {\n style.backgroundColor = sharedBackgroundColor;\n } else if (fg || bg) {\n style.backgroundColor = getSafeBackgroundColor(_rootElem.current!, fg, bg);\n }\n return (\n <th key={idx} className={classes.headerCell} style={style} tabIndex={0}>\n {header.value}\n </th>\n );\n })}\n </tr>\n </thead>\n {rows && rows.length > 0 && (\n <tbody>\n {rows.map((row, rowIdx) => (\n <tr key={rowIdx}>\n {row.map((cell, colIdx) => {\n const style = { ...cell?.style };\n const fg = style.color;\n const bg = style.backgroundColor;\n if (fg || bg) {\n style.backgroundColor = getSafeBackgroundColor(_rootElem.current!, fg, bg);\n }\n return (\n <td key={colIdx} className={classes.bodyCell} style={style} tabIndex={0}>\n {cell.value}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n )}\n </table>\n </div>\n </foreignObject>\n </svg>\n </div>\n );\n },\n);\n\nChartTable.displayName = 'ChartTable';\n"],"names":["React","useChartTableStyles","useRtl","toImage","tokens","d3","getColorContrast","resolveCSSVariables","invertHexColor","hex","color","colorNeutralForeground1","rgb","r","g","b","formatHex","getSafeBackgroundColor","chartContainer","foreground","background","fallbackFg","fallbackBg","colorNeutralBackground1","resolvedFg","resolvedBg","fg","bg","contrast","invertedBg","invertedContrast","ChartTable","forwardRef","props","forwardedRef","headers","rows","width","height","_isRTL","_rootElem","useRef","classes","useImperativeHandle","componentRef","current","opts","undefined","length","div","bgColorSet","Set","forEach","header","style","backgroundColor","normalized","add","sharedBackgroundColor","useSharedBackground","size","candidateBg","Array","from","ref","el","className","root","overflow","svg","foreignObject","x","y","maxHeight","overflowY","overflowX","table","thead","tr","map","idx","th","key","headerCell","tabIndex","value","tbody","row","rowIdx","cell","colIdx","td","bodyCell","displayName"],"mappings":"AAAA;;;;;;;;eAgDa+B;;;;iEA9CU,QAAQ;2CAEK,+BAA+B;2BAC5C,4BAA4B;kCAE3B,qCAAqC;4BACtC,wBAAwB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AAGG;QAC1B,OAAO,IAAIhC,MAAMC,IAAI;YACnB2B,MAAMC,eAAe,GAAGtC,uBAAuBuB,UAAUK,OAAO,EAAGnB,IAAIC;QACzE;QACA,OAAA,WAAA,GACE,OAAA,aAAA,CAACsD,MAAAA;YAAGC,KAAKF;YAAKd,WAAWxB,QAAQyC,UAAU;YAAE7B,OAAOA;YAAO8B,UAAU;WAClE/B,OAAOgC,KAAK;IAGnB,MAGHjD,QAAQA,KAAKY,MAAM,GAAG,KAAA,WAAA,GACrB,OAAA,aAAA,CAACsC,SAAAA,MACElD,KAAK2C,GAAG,CAAC,CAACQ,KAAKC,SAAAA,WAAAA,GACd,OAAA,aAAA,CAACV,MAAAA;YAAGI,KAAKM;WACND,IAAIR,GAAG,CAAC,CAACU,MAAMC;YACd,MAAMpC,QAAQ;mBAAKmC,SAAAA,QAAAA,SAAAA,KAAAA,IAAAA,KAAAA,IAAAA,KAAMnC,KAAT;YAAe;YAC/B,MAAM5B,KAAK4B,MAAM5C,KAAK;YACtB,MAAMiB,KAAK2B,MAAMC,eAAe;YAChC,IAAI7B,MAAMC,IAAI;gBACZ2B,MAAMC,eAAe,GAAGtC,uBAAuBuB,UAAUK,OAAO,EAAGnB,IAAIC;YACzE;YACA,OAAA,WAAA,GACE,OAAA,aAAA,CAACgE,MAAAA;gBAAGT,KAAKQ;gBAAQxB,WAAWxB,QAAQkD,QAAQ;gBAAEtC,OAAOA;gBAAO8B,UAAU;eACnEK,KAAKJ,KAAK;QAGjB;AAWtB,GACA;AAEFtD,WAAW8D,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/ChartTable/ChartTable.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChartTableProps } from './ChartTable.types';\nimport { useChartTableStyles } from './useChartTableStyles.styles';\nimport { tokens } from '@fluentui/react-theme';\nimport * as d3 from 'd3-color';\nimport { getColorContrast } from '../../utilities/colors';\nimport { resolveCSSVariables } from '../../utilities/utilities';\nimport { useImageExport } from '../../utilities/hooks';\n\nfunction invertHexColor(hex: string): string {\n const color = d3.color(hex);\n if (!color) {\n return tokens.colorNeutralForeground1!;\n }\n const rgb = color.rgb();\n return d3.rgb(255 - rgb.r, 255 - rgb.g, 255 - rgb.b).formatHex();\n}\n\nfunction getSafeBackgroundColor(chartContainer: HTMLElement, foreground?: string, background?: string): string {\n const fallbackFg = tokens.colorNeutralForeground1;\n const fallbackBg = tokens.colorNeutralBackground1;\n if (!chartContainer) {\n return fallbackBg;\n }\n\n const resolvedFg = resolveCSSVariables(chartContainer, foreground || fallbackFg);\n const resolvedBg = resolveCSSVariables(chartContainer, background || fallbackBg);\n\n const fg = d3.color(resolvedFg);\n const bg = d3.color(resolvedBg);\n\n if (!fg || !bg) {\n return resolvedBg;\n }\n const contrast = getColorContrast(fg.formatHex(), bg.formatHex());\n if (contrast >= 3) {\n return bg.formatHex();\n }\n\n const invertedBg = invertHexColor(bg.formatHex());\n const invertedContrast = getColorContrast(fg.formatHex(), invertedBg);\n return invertedContrast >= 3 ? invertedBg : fallbackBg;\n}\n\nexport const ChartTable: React.FunctionComponent<ChartTableProps> = React.forwardRef<HTMLDivElement, ChartTableProps>(\n (props, forwardedRef) => {\n const { headers, rows, width, height } = props;\n const { chartContainerRef: _rootElem } = useImageExport(props.componentRef, true, false);\n const classes = useChartTableStyles(props);\n\n if (!headers || headers.length === 0) {\n return <div>No data available</div>;\n }\n\n const bgColorSet = new Set<string>();\n headers.forEach(header => {\n const bg = header?.style?.backgroundColor;\n const normalized = d3.color(bg || '')?.formatHex();\n if (normalized) {\n bgColorSet.add(normalized);\n }\n });\n let sharedBackgroundColor: string | undefined;\n let useSharedBackground = false;\n\n /*\n If we have only one or two unique background colors, we can consider using a shared background color\n for the table headers. This is to ensure better contrast with the foreground text.\n For size 1, we will consider that as default color if it satisfies the contrast ratio.\n There could also be a scenario where backgroundcolor array is of size 2, for eg: [\"dimsgray\", \"gray\"],\n which will assign 1st column header bg color to dimsgray and rest to gray. so our logic of shared background\n color won't run here. So will consider for size 2 as well.\n For size greater than this, we will consider that user wants different colors and will let color contrast fail\n if any.\n */\n if (bgColorSet.size === 1 || bgColorSet.size === 2) {\n const candidateBg = bgColorSet.size === 1 ? Array.from(bgColorSet)[0] : Array.from(bgColorSet)[1];\n for (const header of headers) {\n const fg = header?.style?.color;\n if (fg && getColorContrast(fg, candidateBg) >= 3) {\n sharedBackgroundColor = candidateBg;\n useSharedBackground = true;\n break;\n }\n }\n }\n\n return (\n <div\n ref={el => {\n _rootElem.current = el;\n }}\n className={classes.root as string}\n style={{ height: height ? `${height}px` : '650px', overflow: 'hidden' }}\n >\n <svg width={width ?? '100%'} height={height ?? '650px'}>\n <foreignObject x=\"0\" y=\"0\" width=\"100%\" height=\"100%\">\n <div\n style={{\n maxHeight: height ? `${height}px` : '650px',\n overflowY: 'auto',\n overflowX: 'auto',\n }}\n >\n <table\n className={classes.table}\n style={{\n width: width ? `${width}px` : '100%',\n }}\n >\n <thead>\n <tr>\n {headers.map((header, idx) => {\n const style = { ...header?.style };\n const fg = style.color;\n const bg = style.backgroundColor;\n\n if (useSharedBackground) {\n style.backgroundColor = sharedBackgroundColor;\n } else if (fg || bg) {\n style.backgroundColor = getSafeBackgroundColor(_rootElem.current!, fg, bg);\n }\n return (\n <th key={idx} className={classes.headerCell} style={style} tabIndex={0}>\n {header.value}\n </th>\n );\n })}\n </tr>\n </thead>\n {rows && rows.length > 0 && (\n <tbody>\n {rows.map((row, rowIdx) => (\n <tr key={rowIdx}>\n {row.map((cell, colIdx) => {\n const style = { ...cell?.style };\n const fg = style.color;\n const bg = style.backgroundColor;\n if (fg || bg) {\n style.backgroundColor = getSafeBackgroundColor(_rootElem.current!, fg, bg);\n }\n return (\n <td key={colIdx} className={classes.bodyCell} style={style} tabIndex={0}>\n {cell.value}\n </td>\n );\n })}\n </tr>\n ))}\n </tbody>\n )}\n </table>\n </div>\n </foreignObject>\n </svg>\n </div>\n );\n },\n);\n\nChartTable.displayName = 'ChartTable';\n"],"names":["React","useChartTableStyles","tokens","d3","getColorContrast","resolveCSSVariables","useImageExport","invertHexColor","hex","color","colorNeutralForeground1","rgb","r","g","b","formatHex","getSafeBackgroundColor","chartContainer","foreground","background","fallbackFg","fallbackBg","colorNeutralBackground1","resolvedFg","resolvedBg","fg","bg","contrast","invertedBg","invertedContrast","ChartTable","forwardRef","props","forwardedRef","headers","rows","width","height","chartContainerRef","_rootElem","componentRef","classes","length","div","bgColorSet","Set","forEach","header","style","backgroundColor","normalized","add","sharedBackgroundColor","useSharedBackground","size","candidateBg","Array","from","ref","el","current","className","root","overflow","svg","foreignObject","x","y","maxHeight","overflowY","overflowX","table","thead","tr","map","idx","th","key","headerCell","tabIndex","value","tbody","row","rowIdx","cell","colIdx","td","bodyCell","displayName"],"mappings":"AAAA;;;;;;;;eA8Ca8B;;;;iEA5CU,QAAQ;2CAEK,+BAA+B;4BAC5C,wBAAwB;mEAC3B,WAAW;wBACE,yBAAyB;2BACtB,4BAA4B;uBACjC,wBAAwB;AAEvD,SAASvB,eAAeC,GAAW;IACjC,MAAMC,QAAQN,SAAGM,KAAK,CAACD;IACvB,IAAI,CAACC,OAAO;QACV,OAAOP,kBAAAA,CAAOQ,uBAAuB;IACvC;IACA,MAAMC,MAAMF,MAAME,GAAG;IACrB,OAAOR,SAAGQ,GAAG,CAAC,MAAMA,IAAIC,CAAC,EAAE,MAAMD,IAAIE,CAAC,EAAE,MAAMF,IAAIG,CAAC,EAAEC,SAAS;AAChE;AAEA,SAASC,uBAAuBC,cAA2B,EAAEC,UAAmB,EAAEC,UAAmB;IACnG,MAAMC,aAAalB,kBAAAA,CAAOQ,uBAAuB;IACjD,MAAMW,aAAanB,kBAAAA,CAAOoB,uBAAuB;IACjD,IAAI,CAACL,gBAAgB;QACnB,OAAOI;IACT;IAEA,MAAME,iBAAalB,8BAAAA,EAAoBY,gBAAgBC,cAAcE;IACrE,MAAMI,iBAAanB,8BAAAA,EAAoBY,gBAAgBE,cAAcE;IAErE,MAAMI,KAAKt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AKQ;gBAAQxB,WAAWpB,QAAQ8C,QAAQ;gBAAEvC,OAAOA;gBAAO+B,UAAU;eACnEK,KAAKJ,KAAK;QAGjB;AAWtB,GACA;AAEFlD,WAAW0D,WAAW,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ChartTable/ChartTable.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { Chart } from './index';\n\n/**\n * Chart Table properties\n * {@docCategory ChartTable}\n */\nexport interface ChartTableProps {\n /**\n * 1d or 2d Array of header values.\n */\n headers: { value: string | number | boolean | null; style?: React.CSSProperties }[];\n\n /**\n * Array of rows. Each row corresponds to one data entry under each column.\n */\n rows: { value: string | number | boolean | null; style?: React.CSSProperties }[][];\n\n /**\n * Optional width for the table\n * @default '100%'\n */\n width?: string | number;\n\n /**\n * Optional height for the table\n * @default '650px'\n */\n height?: string | number;\n\n /**\n * Additional class name(s) to apply to the table chart\n */\n className?: string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: ChartTableStyles;\n\n /**\n * Optional callback to access the Chart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.RefObject<Chart>;\n}\n\n/**\n * Table Chart styles\n * {@docCategory ChartTable}\n */\nexport interface ChartTableStyles {\n root?: string | React.CSSProperties;\n table?: string;\n headerCell?: string;\n bodyCell?: string;\n chart?: string;\n}\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
1
+ {"version":3,"sources":["../src/components/ChartTable/ChartTable.types.ts"],"sourcesContent":["import * as React from 'react';\nimport { Chart } from './index';\n\n/**\n * Chart Table properties\n * {@docCategory ChartTable}\n */\nexport interface ChartTableProps {\n /**\n * 1d or 2d Array of header values.\n */\n headers: { value: string | number | boolean | null; style?: React.CSSProperties }[];\n\n /**\n * Array of rows. Each row corresponds to one data entry under each column.\n */\n rows: { value: string | number | boolean | null; style?: React.CSSProperties }[][];\n\n /**\n * Optional width for the table\n * @default '100%'\n */\n width?: string | number;\n\n /**\n * Optional height for the table\n * @default '650px'\n */\n height?: string | number;\n\n /**\n * Additional class name(s) to apply to the table chart\n */\n className?: string;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: ChartTableStyles;\n\n /**\n * Optional callback to access the Chart interface. Use this instead of ref for accessing\n * the public methods and properties of the component.\n */\n componentRef?: React.Ref<Chart>;\n}\n\n/**\n * Table Chart styles\n * {@docCategory ChartTable}\n */\nexport interface ChartTableStyles {\n root?: string | React.CSSProperties;\n table?: string;\n headerCell?: string;\n bodyCell?: string;\n chart?: string;\n}\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
@@ -40,104 +40,68 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
40
40
  Bg96gwp: "fwrc4pm",
41
41
  De3pzq: "f16xq7d1",
42
42
  sj55zd: "f19n0e5",
43
- z8tnut: "f17mpqex",
44
- z189sj: [
45
- "f1vdfbxk",
46
- "f1f5gg8d"
47
- ],
48
- Byoj8tv: "fdvome7",
49
- uwmqm3: [
50
- "f1f5gg8d",
51
- "f1vdfbxk"
52
- ],
43
+ Byoj8tv: 0,
44
+ uwmqm3: 0,
45
+ z189sj: 0,
46
+ z8tnut: 0,
47
+ B0ocmuz: "f1bnz8pu",
53
48
  fsow6f: [
54
49
  "f1o700av",
55
50
  "fes3tcz"
56
51
  ],
57
- B4j52fo: "f18zi460",
58
- Bekrc4i: [
59
- "f1wpluaz",
60
- "fsfsuhs"
61
- ],
62
- Bn0qgzm: "fmklw6v",
63
- ibv6hh: [
64
- "fsfsuhs",
65
- "f1wpluaz"
66
- ],
67
- icvyot: "fzkkow9",
68
- vrafjx: [
69
- "fcdblym",
70
- "fjik90z"
71
- ],
72
- oivjwe: "fg706s2",
73
- wvpqe5: [
74
- "fjik90z",
75
- "fcdblym"
76
- ],
77
- g2u3we: "f68mrw8",
78
- h3c5rm: [
79
- "f7pw515",
80
- "fw35ms5"
81
- ],
82
- B9xav0g: "frpde29",
83
- zhjwy3: [
84
- "fw35ms5",
85
- "f7pw515"
86
- ],
87
- Bsw6fvg: "f8pusc0",
88
- Bbusuzp: "fqgauei"
52
+ Bgfg5da: 0,
53
+ B9xav0g: 0,
54
+ oivjwe: 0,
55
+ Bn0qgzm: 0,
56
+ B4g9neb: 0,
57
+ zhjwy3: 0,
58
+ wvpqe5: 0,
59
+ ibv6hh: 0,
60
+ u1mtju: 0,
61
+ h3c5rm: 0,
62
+ vrafjx: 0,
63
+ Bekrc4i: 0,
64
+ i8vvqc: 0,
65
+ g2u3we: 0,
66
+ icvyot: 0,
67
+ B4j52fo: 0,
68
+ irswps: "fox1scm",
69
+ By8wz76: "ftx6bta",
70
+ B7iucu3: "fhs7xo9"
89
71
  },
90
72
  bodyCell: {
91
73
  Bahqtrf: "fk6fouc",
92
74
  Be2twd7: "fy9rknc",
93
75
  Bhrd7zp: "figsok6",
94
76
  Bg96gwp: "fwrc4pm",
95
- z8tnut: "f17mpqex",
96
- z189sj: [
97
- "f1vdfbxk",
98
- "f1f5gg8d"
99
- ],
100
- Byoj8tv: "fdvome7",
101
- uwmqm3: [
102
- "f1f5gg8d",
103
- "f1vdfbxk"
104
- ],
105
- B4j52fo: "f18zi460",
106
- Bekrc4i: [
107
- "f1wpluaz",
108
- "fsfsuhs"
109
- ],
110
- Bn0qgzm: "fmklw6v",
111
- ibv6hh: [
112
- "fsfsuhs",
113
- "f1wpluaz"
114
- ],
115
- icvyot: "fzkkow9",
116
- vrafjx: [
117
- "fcdblym",
118
- "fjik90z"
119
- ],
120
- oivjwe: "fg706s2",
121
- wvpqe5: [
122
- "fjik90z",
123
- "fcdblym"
124
- ],
125
- g2u3we: "f68mrw8",
126
- h3c5rm: [
127
- "f7pw515",
128
- "fw35ms5"
129
- ],
130
- B9xav0g: "frpde29",
131
- zhjwy3: [
132
- "fw35ms5",
133
- "f7pw515"
134
- ],
77
+ Byoj8tv: 0,
78
+ uwmqm3: 0,
79
+ z189sj: 0,
80
+ z8tnut: 0,
81
+ B0ocmuz: "f1bnz8pu",
82
+ Bgfg5da: 0,
83
+ B9xav0g: 0,
84
+ oivjwe: 0,
85
+ Bn0qgzm: 0,
86
+ B4g9neb: 0,
87
+ zhjwy3: 0,
88
+ wvpqe5: 0,
89
+ ibv6hh: 0,
90
+ u1mtju: 0,
91
+ h3c5rm: 0,
92
+ vrafjx: 0,
93
+ Bekrc4i: 0,
94
+ i8vvqc: 0,
95
+ g2u3we: 0,
96
+ icvyot: 0,
97
+ B4j52fo: 0,
98
+ irswps: "fox1scm",
135
99
  sj55zd: "f19n0e5",
136
100
  fsow6f: [
137
101
  "f1o700av",
138
102
  "fes3tcz"
139
103
  ],
140
- Bbusuzp: "fqgauei"
104
+ B7iucu3: "fhs7xo9"
141
105
  }
142
106
  }, {
143
107
  d: [
@@ -150,35 +114,43 @@ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
150
114
  ".fwrc4pm{line-height:var(--lineHeightBase200);}",
151
115
  ".f16xq7d1{background-color:var(--colorNeutralBackground3);}",
152
116
  ".f19n0e5{color:var(--colorNeutralForeground1);}",
153
- ".f17mpqex{padding-top:var(--spacingHorizontalS);}",
154
- ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",
155
- ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",
156
- ".fdvome7{padding-bottom:var(--spacingHorizontalS);}",
117
+ [
118
+ ".f1bnz8pu{padding:var(--spacingHorizontalS);}",
119
+ {
120
+ p: -1
121
+ }
122
+ ],
157
123
  ".f1o700av{text-align:left;}",
158
124
  ".fes3tcz{text-align:right;}",
159
- ".f18zi460{border-top-width:var(--strokeWidthThick);}",
160
- ".f1wpluaz{border-right-width:var(--strokeWidthThick);}",
161
- ".fsfsuhs{border-left-width:var(--strokeWidthThick);}",
162
- ".fmklw6v{border-bottom-width:var(--strokeWidthThick);}",
163
- ".fzkkow9{border-top-style:solid;}",
164
- ".fcdblym{border-right-style:solid;}",
165
- ".fjik90z{border-left-style:solid;}",
166
- ".fg706s2{border-bottom-style:solid;}",
167
- ".f68mrw8{border-top-color:var(--colorNeutralStroke2);}",
168
- ".f7pw515{border-right-color:var(--colorNeutralStroke2);}",
169
- ".fw35ms5{border-left-color:var(--colorNeutralStroke2);}",
170
- ".frpde29{border-bottom-color:var(--colorNeutralStroke2);}",
171
- ".figsok6{font-weight:var(--fontWeightRegular);}"
125
+ [
126
+ ".fox1scm{border:var(--strokeWidthThick) solid var(--colorNeutralStroke2);}",
127
+ {
128
+ p: -2
129
+ }
130
+ ],
131
+ ".figsok6{font-weight:var(--fontWeightRegular);}",
132
+ [
133
+ ".f1bnz8pu{padding:var(--spacingHorizontalS);}",
134
+ {
135
+ p: -1
136
+ }
137
+ ],
138
+ [
139
+ ".fox1scm{border:var(--strokeWidthThick) solid var(--colorNeutralStroke2);}",
140
+ {
141
+ p: -2
142
+ }
143
+ ]
172
144
  ],
173
145
  m: [
174
146
  [
175
- "@media (forced-colors: active){.f8pusc0{background-color:Window;}}",
147
+ "@media (forced-colors: active){.ftx6bta{background-color:Window;}}",
176
148
  {
177
149
  m: "(forced-colors: active)"
178
150
  }
179
151
  ],
180
152
  [
181
- "@media (forced-colors: active){.fqgauei{color:WindowText;}}",
153
+ "@media (forced-colors: active){.fhs7xo9{color:WindowText;}}",
182
154
  {
183
155
  m: "(forced-colors: active)"
184
156
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useChartTableStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const chartTableClassNames = {\n root: 'fui-ChartTable__root',\n table: 'fui-ChartTable__table',\n headerCell: 'fui-ChartTable__headerCell',\n bodyCell: 'fui-ChartTable__bodyCell',\n chart: 'fui-ChartTable__chart'\n};\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n overflowX: 'auto'\n },\n table: {\n borderCollapse: 'collapse'\n },\n headerCell: {\n ...typographyStyles.caption1,\n fontWeight: tokens.fontWeightSemibold,\n backgroundColor: tokens.colorNeutralBackground3,\n color: tokens.colorNeutralForeground1,\n ...shorthands.padding(tokens.spacingHorizontalS),\n textAlign: 'left',\n ...shorthands.border(tokens.strokeWidthThick, 'solid', tokens.colorNeutralStroke2),\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText'\n }\n },\n bodyCell: {\n ...typographyStyles.caption1,\n ...shorthands.padding(tokens.spacingHorizontalS),\n ...shorthands.border(tokens.strokeWidthThick, 'solid', tokens.colorNeutralStroke2),\n color: tokens.colorNeutralForeground1,\n textAlign: 'left',\n '@media (forced-colors: active)': {\n color: 'WindowText'\n }\n }\n});\n/**\n * Apply styling to the ChartTable slots based on the state\n */ export const useChartTableStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n root: mergeClasses(chartTableClassNames.root, baseStyles.root /*props.styles?.root*/ ),\n table: mergeClasses(chartTableClassNames.table, baseStyles.table /*props.styles?.table*/ ),\n headerCell: mergeClasses(chartTableClassNames.headerCell, baseStyles.headerCell /*props.styles?.headerCell*/ ),\n bodyCell: mergeClasses(chartTableClassNames.bodyCell, baseStyles.bodyCell /*props.styles?.bodyCell*/ ),\n chart: mergeClasses(chartTableClassNames.chart /*props.styles?.chart*/ )\n };\n};\n"],"names":["__styles","mergeClasses","shorthands","tokens","typographyStyles","chartTableClassNames","root","table","headerCell","bodyCell","chart","useStyles","a9b677","B68tc82","po53p8","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","De3pzq","sj55zd","z8tnut","z189sj","Byoj8tv","uwmqm3","fsow6f","B4j52fo","Bekrc4i","Bn0qgzm","ibv6hh","icvyot","vrafjx","oivjwe","wvpqe5","g2u3we","h3c5rm","B9xav0g","zhjwy3","Bsw6fvg","Bbusuzp","d","m","useChartTableStyles","props","baseStyles"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAKKK,oBAAoB;;;uBAyCD;eAAnBqC;;;uBA7CoC,gBAAgB;AAI1D,6BAA6B;IACpCpC,IAAI,EA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;QACtGC,KAAK,MAAET,mBAAY,EAACI,oBAAoB,CAACK,KAAK,CAAC,qBAAA,EAAwB;IAC3E,CAAC;AACL,CAAC"}
1
+ {"version":3,"sources":["useChartTableStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const chartTableClassNames = {\n root: 'fui-ChartTable__root',\n table: 'fui-ChartTable__table',\n headerCell: 'fui-ChartTable__headerCell',\n bodyCell: 'fui-ChartTable__bodyCell',\n chart: 'fui-ChartTable__chart'\n};\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n overflowX: 'auto'\n },\n table: {\n borderCollapse: 'collapse'\n },\n headerCell: {\n ...typographyStyles.caption1,\n fontWeight: tokens.fontWeightSemibold,\n backgroundColor: tokens.colorNeutralBackground3,\n color: tokens.colorNeutralForeground1,\n padding: tokens.spacingHorizontalS,\n textAlign: 'left',\n border: `${tokens.strokeWidthThick} solid ${tokens.colorNeutralStroke2}`,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText'\n }\n },\n bodyCell: {\n ...typographyStyles.caption1,\n padding: tokens.spacingHorizontalS,\n border: `${tokens.strokeWidthThick} solid ${tokens.colorNeutralStroke2}`,\n color: tokens.colorNeutralForeground1,\n textAlign: 'left',\n '@media (forced-colors: active)': {\n color: 'WindowText'\n }\n }\n});\n/**\n * Apply styling to the ChartTable slots based on the state\n */ export const useChartTableStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n root: mergeClasses(chartTableClassNames.root, baseStyles.root /*props.styles?.root*/ ),\n table: mergeClasses(chartTableClassNames.table, baseStyles.table /*props.styles?.table*/ ),\n headerCell: mergeClasses(chartTableClassNames.headerCell, baseStyles.headerCell /*props.styles?.headerCell*/ ),\n bodyCell: mergeClasses(chartTableClassNames.bodyCell, baseStyles.bodyCell /*props.styles?.bodyCell*/ ),\n chart: mergeClasses(chartTableClassNames.chart /*props.styles?.chart*/ )\n };\n};\n"],"names":["__styles","mergeClasses","tokens","typographyStyles","chartTableClassNames","root","table","headerCell","bodyCell","chart","useStyles","a9b677","B68tc82","po53p8","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","De3pzq","sj55zd","Byoj8tv","uwmqm3","z189sj","z8tnut","B0ocmuz","fsow6f","Bgfg5da","B9xav0g","oivjwe","Bn0qgzm","B4g9neb","zhjwy3","wvpqe5","ibv6hh","u1mtju","h3c5rm","vrafjx","Bekrc4i","i8vvqc","g2u3we","icvyot","B4j52fo","irswps","By8wz76","B7iucu3","d","p","m","useChartTableStyles","props","baseStyles"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAKKI,oBAAoB;;;uBAyCD;eAAnB4C;;;uBA7CwB,gBAAgB;AAI9C,6BAA6B;IACpC3C,IAAI,EAAE,sBAAsB;IAC5BC,KAAK,EAAE,uBAAuB;IAC9BC,UAAU,EAAE,4BAA4B;IACxCC,QAAQ,EAAE,0BAA0B;IACpCC,KAAK,EAAE;AACX,CAAC;AACD,MAAMC,SAAS,GAAA,WAAA,OAAGV,eAAA,EAAA;IAAAK,IAAA,EAAA;QAAAM,MAAA,EAAA;QAAAC,OAAA,EAAA;IAAA;IAAAN,KAAA,EAAA;QAAAO,MAAA,EAAA;IAAA;IAAAN,UAAA,EAAA;QAAAO,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;YAAA;YAAA;SAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,OAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC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;YAAA;gBAAAA,CAAA,EAAA;YAAA;SAAA;KAAA;AAAA,CA+BjB,CAAC;AAGS,6BAA6BE,KAAK,IAAG;IAC5C,MAAMC,UAAU,GAAGxC,SAAS,CAAC,CAAC;IAC9B,OAAO;QACHL,IAAI,MAAEJ,mBAAY,EAACG,oBAAoB,CAACC,IAAI,EAAE6C,UAAU,CAAC7C,IAAI,CAAC,oBAAA,EAAuB,CAAC;QACtFC,KAAK,MAAEL,mBAAY,EAACG,oBAAoB,CAACE,KAAK,EAAE4C,UAAU,CAAC5C,KAAK,CAAC,qBAAA,EAAwB,CAAC;QAC1FC,UAAU,EAAEN,uBAAY,EAACG,oBAAoB,CAACG,UAAU,EAAE2C,UAAU,CAAC3C,UAAU,CAAC,0BAAA,EAA6B,CAAC;QAC9GC,QAAQ,MAAEP,mBAAY,EAACG,oBAAoB,CAACI,QAAQ,EAAE0C,UAAU,CAAC1C,QAAQ,CAAC,wBAAA,EAA2B,CAAC;QACtGC,KAAK,MAAER,mBAAY,EAACG,oBAAoB,CAACK,KAAK,CAAC,qBAAA,EAAwB;IAC3E,CAAC;AACL,CAAC"}
@@ -39,9 +39,9 @@ const useStyles = (0, _react.makeStyles)({
39
39
  fontWeight: _reacttheme.tokens.fontWeightSemibold,
40
40
  backgroundColor: _reacttheme.tokens.colorNeutralBackground3,
41
41
  color: _reacttheme.tokens.colorNeutralForeground1,
42
- ..._react.shorthands.padding(_reacttheme.tokens.spacingHorizontalS),
42
+ padding: _reacttheme.tokens.spacingHorizontalS,
43
43
  textAlign: 'left',
44
- ..._react.shorthands.border(_reacttheme.tokens.strokeWidthThick, 'solid', _reacttheme.tokens.colorNeutralStroke2),
44
+ border: `${_reacttheme.tokens.strokeWidthThick} solid ${_reacttheme.tokens.colorNeutralStroke2}`,
45
45
  '@media (forced-colors: active)': {
46
46
  backgroundColor: 'Window',
47
47
  color: 'WindowText'
@@ -49,8 +49,8 @@ const useStyles = (0, _react.makeStyles)({
49
49
  },
50
50
  bodyCell: {
51
51
  ..._reacttheme.typographyStyles.caption1,
52
- ..._react.shorthands.padding(_reacttheme.tokens.spacingHorizontalS),
53
- ..._react.shorthands.border(_reacttheme.tokens.strokeWidthThick, 'solid', _reacttheme.tokens.colorNeutralStroke2),
52
+ padding: _reacttheme.tokens.spacingHorizontalS,
53
+ border: `${_reacttheme.tokens.strokeWidthThick} solid ${_reacttheme.tokens.colorNeutralStroke2}`,
54
54
  color: _reacttheme.tokens.colorNeutralForeground1,
55
55
  textAlign: 'left',
56
56
  '@media (forced-colors: active)': {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ChartTable/useChartTableStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { ChartTableProps, ChartTableStyles } from './ChartTable.types';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n\n/**\n * @internal\n */\nexport const chartTableClassNames: SlotClassNames<ChartTableStyles> = {\n root: 'fui-ChartTable__root',\n table: 'fui-ChartTable__table',\n headerCell: 'fui-ChartTable__headerCell',\n bodyCell: 'fui-ChartTable__bodyCell',\n chart: 'fui-ChartTable__chart',\n};\n\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n overflowX: 'auto',\n },\n table: {\n borderCollapse: 'collapse',\n },\n headerCell: {\n ...typographyStyles.caption1,\n fontWeight: tokens.fontWeightSemibold,\n backgroundColor: tokens.colorNeutralBackground3,\n color: tokens.colorNeutralForeground1,\n ...shorthands.padding(tokens.spacingHorizontalS),\n textAlign: 'left',\n ...shorthands.border(tokens.strokeWidthThick, 'solid', tokens.colorNeutralStroke2),\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n },\n },\n bodyCell: {\n ...typographyStyles.caption1,\n ...shorthands.padding(tokens.spacingHorizontalS),\n ...shorthands.border(tokens.strokeWidthThick, 'solid', tokens.colorNeutralStroke2),\n color: tokens.colorNeutralForeground1,\n textAlign: 'left',\n '@media (forced-colors: active)': {\n color: 'WindowText',\n },\n },\n});\n\n/**\n * Apply styling to the ChartTable slots based on the state\n */\nexport const useChartTableStyles = (props: ChartTableProps): ChartTableStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(chartTableClassNames.root, baseStyles.root /*props.styles?.root*/),\n table: mergeClasses(chartTableClassNames.table, baseStyles.table /*props.styles?.table*/),\n headerCell: mergeClasses(chartTableClassNames.headerCell, baseStyles.headerCell /*props.styles?.headerCell*/),\n bodyCell: mergeClasses(chartTableClassNames.bodyCell, baseStyles.bodyCell /*props.styles?.bodyCell*/),\n chart: mergeClasses(chartTableClassNames.chart /*props.styles?.chart*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","shorthands","tokens","typographyStyles","chartTableClassNames","root","table","headerCell","bodyCell","chart","useStyles","width","overflowX","borderCollapse","caption1","fontWeight","fontWeightSemibold","backgroundColor","colorNeutralBackground3","color","colorNeutralForeground1","padding","spacingHorizontalS","textAlign","border","strokeWidthThick","colorNeutralStroke2","useChartTableStyles","props","baseStyles"],"mappings":"AAAA;;;;;;;;;;;;IAUaK,oBAAAA;;;uBA4CAuB;eAAAA;;;uBApDwC,iBAAiB;4BAG7B,wBAAwB;AAK1D,6BAA+D;IACpEtB,MAAM;IACNC,OAAO;IACPC,YAAY;IACZC,UAAU;IACVC,OAAO;AACT,EAAE;AAEF,MAAMC,gBAAYX,iBAAAA,EAAW;IAC3BM,MAAM;QACJM,OAAO;QACPC,WAAW;IACb;IACAN,OAAO;QACLO,gBAAgB;IAClB;IACAN,YAAY;QACV,GAAGJ,4BAAAA,CAAiBW,QAAQ;QAC5BC,YAAYb,kBAAAA,CAAOc,kBAAkB;QACrCC,iBAAiBf,kBAAAA,CAAOgB,uBAAuB;QAC/CC,OAAOjB,kBAAAA,CAAOkB,uBAAuB;QACrC,GAAGnB,iBAAAA,CAAWoB,OAAO,CAACnB,kBAAAA,CAAOoB,kBAAkB,CAAC;QAChDC,WAAW;QACX,GAAGtB,iBAAAA,CAAWuB,MAAM,CAACtB,kBAAAA,CAAOuB,gBAAgB,EAAE,SAASvB,kBAAAA,CAAOwB,mBAAmB,CAAC;QAClF,kCAAkC;YAChCT,iBAAiB;YACjBE,OAAO;QACT;IACF;IACAX,UAAU;QACR,GAAGL,4BAAAA,CAAiBW,QAAQ;QAC5B,GAAGb,iBAAAA,CAAWoB,OAAO,CAACnB,kBAAAA,CAAOoB,kBAAkB,CAAC;QAChD,GAAGrB,iBAAAA,CAAWuB,MAAM,CAACtB,kBAAAA,CAAOuB,gBAAgB,EAAE,SAASvB,kBAAAA,CAAOwB,mBAAmB,CAAC;QAClFP,OAAOjB,kBAAAA,CAAOkB,uBAAuB;QACrCG,WAAW;QACX,kCAAkC;YAChCJ,OAAO;QACT;IACF;AACF;AAKO,4BAA4B,CAACS;IAClC,MAAMC,aAAanB;IAEnB,OAAO;QACLL,UAAML,mBAAAA,EAAaI,qBAAqBC,IAAI,EAAEwB,WAAWxB,IAAI,CAAC,oBAAoB;QAClFC,WAAON,mBAAAA,EAAaI,qBAAqBE,KAAK,EAAEuB,WAAWvB,KAAK,CAAC,qBAAqB;QACtFC,gBAAYP,mBAAAA,EAAaI,qBAAqBG,UAAU,EAAEsB,WAAWtB,UAAU,CAAC,0BAA0B;QAC1GC,cAAUR,mBAAAA,EAAaI,qBAAqBI,QAAQ,EAAEqB,WAAWrB,QAAQ,CAAC,wBAAwB;QAClGC,WAAOT,mBAAAA,EAAaI,qBAAqBK,KAAK,CAAC,qBAAqB;IACtE;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/ChartTable/useChartTableStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { ChartTableProps, ChartTableStyles } from './ChartTable.types';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\n\n/**\n * @internal\n */\nexport const chartTableClassNames: SlotClassNames<ChartTableStyles> = {\n root: 'fui-ChartTable__root',\n table: 'fui-ChartTable__table',\n headerCell: 'fui-ChartTable__headerCell',\n bodyCell: 'fui-ChartTable__bodyCell',\n chart: 'fui-ChartTable__chart',\n};\n\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n overflowX: 'auto',\n },\n table: {\n borderCollapse: 'collapse',\n },\n headerCell: {\n ...typographyStyles.caption1,\n fontWeight: tokens.fontWeightSemibold,\n backgroundColor: tokens.colorNeutralBackground3,\n color: tokens.colorNeutralForeground1,\n padding: tokens.spacingHorizontalS,\n textAlign: 'left',\n border: `${tokens.strokeWidthThick} solid ${tokens.colorNeutralStroke2}`,\n '@media (forced-colors: active)': {\n backgroundColor: 'Window',\n color: 'WindowText',\n },\n },\n bodyCell: {\n ...typographyStyles.caption1,\n padding: tokens.spacingHorizontalS,\n border: `${tokens.strokeWidthThick} solid ${tokens.colorNeutralStroke2}`,\n color: tokens.colorNeutralForeground1,\n textAlign: 'left',\n '@media (forced-colors: active)': {\n color: 'WindowText',\n },\n },\n});\n\n/**\n * Apply styling to the ChartTable slots based on the state\n */\nexport const useChartTableStyles = (props: ChartTableProps): ChartTableStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(chartTableClassNames.root, baseStyles.root /*props.styles?.root*/),\n table: mergeClasses(chartTableClassNames.table, baseStyles.table /*props.styles?.table*/),\n headerCell: mergeClasses(chartTableClassNames.headerCell, baseStyles.headerCell /*props.styles?.headerCell*/),\n bodyCell: mergeClasses(chartTableClassNames.bodyCell, baseStyles.bodyCell /*props.styles?.bodyCell*/),\n chart: mergeClasses(chartTableClassNames.chart /*props.styles?.chart*/),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","chartTableClassNames","root","table","headerCell","bodyCell","chart","useStyles","width","overflowX","borderCollapse","caption1","fontWeight","fontWeightSemibold","backgroundColor","colorNeutralBackground3","color","colorNeutralForeground1","padding","spacingHorizontalS","textAlign","border","strokeWidthThick","colorNeutralStroke2","useChartTableStyles","props","baseSty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