@fluentui/react-charts 1.2.0 → 9.0.1

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 (364) hide show
  1. package/CHANGELOG.md +193 -15
  2. package/LICENSE +11 -17
  3. package/README.md +174 -23
  4. package/dist/index.d.ts +2143 -0
  5. package/lib/CartesianChart.js +1 -0
  6. package/lib/CartesianChart.js.map +1 -0
  7. package/lib/DeclarativeChart.js +1 -0
  8. package/lib/DeclarativeChart.js.map +1 -0
  9. package/lib/DonutChart.js +1 -0
  10. package/lib/DonutChart.js.map +1 -0
  11. package/lib/HorizontalBarChart.js +1 -0
  12. package/lib/HorizontalBarChart.js.map +1 -0
  13. package/lib/Legends.js +1 -0
  14. package/lib/Legends.js.map +1 -0
  15. package/lib/LineChart.js +1 -0
  16. package/lib/LineChart.js.map +1 -0
  17. package/lib/Popover.js +1 -0
  18. package/lib/Popover.js.map +1 -0
  19. package/lib/ResponsiveContainer.js +1 -0
  20. package/lib/ResponsiveContainer.js.map +1 -0
  21. package/lib/Sparkline.js +1 -0
  22. package/lib/Sparkline.js.map +1 -0
  23. package/lib/VerticalBarChart.js +1 -0
  24. package/lib/VerticalBarChart.js.map +1 -0
  25. package/lib/components/CommonComponents/CartesianChart.js +462 -0
  26. package/lib/components/CommonComponents/CartesianChart.js.map +1 -0
  27. package/lib/components/CommonComponents/CartesianChart.types.js +1 -0
  28. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -0
  29. package/lib/components/CommonComponents/ChartPopover.js +187 -0
  30. package/lib/components/CommonComponents/ChartPopover.js.map +1 -0
  31. package/lib/components/CommonComponents/ChartPopover.types.js +1 -0
  32. package/lib/components/CommonComponents/ChartPopover.types.js.map +1 -0
  33. package/lib/components/CommonComponents/index.js +4 -0
  34. package/lib/components/CommonComponents/index.js.map +1 -0
  35. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +229 -0
  36. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
  37. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +178 -0
  38. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
  39. package/lib/components/DeclarativeChart/DeclarativeChart.js +150 -0
  40. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
  41. package/lib/components/DeclarativeChart/PlotlySchema.js +7 -0
  42. package/lib/components/DeclarativeChart/PlotlySchema.js.map +1 -0
  43. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +400 -0
  44. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
  45. package/lib/components/DeclarativeChart/imageExporter.js +221 -0
  46. package/lib/components/DeclarativeChart/imageExporter.js.map +1 -0
  47. package/lib/components/DeclarativeChart/index.js +1 -0
  48. package/lib/components/DeclarativeChart/index.js.map +1 -0
  49. package/lib/components/DonutChart/Arc/Arc.js +110 -0
  50. package/lib/components/DonutChart/Arc/Arc.js.map +1 -0
  51. package/lib/components/DonutChart/Arc/Arc.types.js +1 -0
  52. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -0
  53. package/lib/components/DonutChart/Arc/index.js +2 -0
  54. package/lib/components/DonutChart/Arc/index.js.map +1 -0
  55. package/lib/components/DonutChart/Arc/useArcStyles.styles.js +54 -0
  56. package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
  57. package/lib/components/DonutChart/DonutChart.js +291 -0
  58. package/lib/components/DonutChart/DonutChart.js.map +1 -0
  59. package/lib/components/DonutChart/DonutChart.types.js +1 -0
  60. package/lib/components/DonutChart/DonutChart.types.js.map +1 -0
  61. package/lib/components/DonutChart/Pie/Pie.js +72 -0
  62. package/lib/components/DonutChart/Pie/Pie.js.map +1 -0
  63. package/lib/components/DonutChart/Pie/Pie.types.js +1 -0
  64. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -0
  65. package/lib/components/DonutChart/Pie/index.js +2 -0
  66. package/lib/components/DonutChart/Pie/index.js.map +1 -0
  67. package/lib/components/DonutChart/Pie/usePieStyles.styles.js +44 -0
  68. package/lib/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
  69. package/lib/components/DonutChart/index.js +3 -0
  70. package/lib/components/DonutChart/index.js.map +1 -0
  71. package/lib/components/DonutChart/useDonutChartStyles.styles.js +58 -0
  72. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
  73. package/lib/components/HorizontalBarChart/HorizontalBarChart.js +402 -0
  74. package/lib/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  75. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js +6 -0
  76. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
  77. package/lib/components/HorizontalBarChart/index.js +3 -0
  78. package/lib/components/HorizontalBarChart/index.js.map +1 -0
  79. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +163 -0
  80. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
  81. package/lib/components/Legends/Legends.js +302 -0
  82. package/lib/components/Legends/Legends.js.map +1 -0
  83. package/lib/components/Legends/Legends.types.js +1 -0
  84. package/lib/components/Legends/Legends.types.js.map +1 -0
  85. package/lib/components/Legends/OverflowMenu.js +25 -0
  86. package/lib/components/Legends/OverflowMenu.js.map +1 -0
  87. package/lib/components/Legends/index.js +3 -0
  88. package/lib/components/Legends/index.js.map +1 -0
  89. package/lib/components/Legends/shape.js +35 -0
  90. package/lib/components/Legends/shape.js.map +1 -0
  91. package/lib/components/Legends/useLegendsStyles.styles.js +147 -0
  92. package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -0
  93. package/lib/components/LineChart/LineChart.js +1026 -0
  94. package/lib/components/LineChart/LineChart.js.map +1 -0
  95. package/lib/components/LineChart/LineChart.types.js +3 -0
  96. package/lib/components/LineChart/LineChart.types.js.map +1 -0
  97. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js +119 -0
  98. package/lib/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
  99. package/lib/components/LineChart/eventAnnotation/LabelLink.js +57 -0
  100. package/lib/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
  101. package/lib/components/LineChart/eventAnnotation/Textbox.js +40 -0
  102. package/lib/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
  103. package/lib/components/LineChart/index.js +4 -0
  104. package/lib/components/LineChart/index.js.map +1 -0
  105. package/lib/components/LineChart/useLineChartStyles.styles.js +65 -0
  106. package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -0
  107. package/lib/components/ResponsiveContainer/ResponsiveContainer.js +65 -0
  108. package/lib/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
  109. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js +1 -0
  110. package/lib/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
  111. package/lib/components/ResponsiveContainer/index.js +1 -0
  112. package/lib/components/ResponsiveContainer/index.js.map +1 -0
  113. package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +23 -0
  114. package/lib/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
  115. package/lib/components/Sparkline/Sparkline.js +119 -0
  116. package/lib/components/Sparkline/Sparkline.js.map +1 -0
  117. package/lib/components/Sparkline/Sparkline.types.js +4 -0
  118. package/lib/components/Sparkline/Sparkline.types.js.map +1 -0
  119. package/lib/components/Sparkline/index.js +3 -0
  120. package/lib/components/Sparkline/index.js.map +1 -0
  121. package/lib/components/Sparkline/useSparklineStyles.styles.js +49 -0
  122. package/lib/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
  123. package/lib/components/VerticalBarChart/VerticalBarChart.js +849 -0
  124. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
  125. package/lib/components/VerticalBarChart/VerticalBarChart.types.js +4 -0
  126. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
  127. package/lib/components/VerticalBarChart/index.js +3 -0
  128. package/lib/components/VerticalBarChart/index.js.map +1 -0
  129. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +74 -0
  130. package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
  131. package/lib/index.js +12 -8
  132. package/lib/index.js.map +1 -1
  133. package/lib/types/DataPoint.js +3 -0
  134. package/lib/types/DataPoint.js.map +1 -0
  135. package/lib/types/EventAnnotation.js +1 -0
  136. package/lib/types/EventAnnotation.js.map +1 -0
  137. package/lib/types/LegendDataItem.js +1 -0
  138. package/lib/types/LegendDataItem.js.map +1 -0
  139. package/lib/types/index.js +2 -2
  140. package/lib/types/index.js.map +1 -1
  141. package/lib/utilities/FocusableTooltipText.js +65 -0
  142. package/lib/utilities/FocusableTooltipText.js.map +1 -0
  143. package/lib/utilities/KeyCodes.js +8 -0
  144. package/lib/utilities/KeyCodes.js.map +1 -0
  145. package/lib/utilities/SVGTooltipText.js +138 -0
  146. package/lib/utilities/SVGTooltipText.js.map +1 -0
  147. package/lib/utilities/async-utils.js +380 -0
  148. package/lib/utilities/async-utils.js.map +1 -0
  149. package/lib/utilities/colors.js +249 -0
  150. package/lib/utilities/colors.js.map +1 -0
  151. package/lib/utilities/getWindow.js +25 -0
  152. package/lib/utilities/getWindow.js.map +1 -0
  153. package/lib/utilities/index.js +3 -0
  154. package/lib/utilities/index.js.map +1 -0
  155. package/lib/utilities/locale-util.js +15 -0
  156. package/lib/utilities/locale-util.js.map +1 -0
  157. package/lib/utilities/overflow-utils.js +27 -0
  158. package/lib/utilities/overflow-utils.js.map +1 -0
  159. package/lib/utilities/test-data.js +276 -0
  160. package/lib/utilities/test-data.js.map +1 -0
  161. package/lib/utilities/utilities.js +1215 -0
  162. package/lib/utilities/utilities.js.map +1 -0
  163. package/lib/utilities/vbc-utils.js +27 -0
  164. package/lib/utilities/vbc-utils.js.map +1 -0
  165. package/lib-commonjs/CartesianChart.js +6 -0
  166. package/lib-commonjs/CartesianChart.js.map +1 -0
  167. package/lib-commonjs/DeclarativeChart.js +6 -0
  168. package/lib-commonjs/DeclarativeChart.js.map +1 -0
  169. package/lib-commonjs/DonutChart.js +6 -0
  170. package/lib-commonjs/DonutChart.js.map +1 -0
  171. package/lib-commonjs/HorizontalBarChart.js +6 -0
  172. package/lib-commonjs/HorizontalBarChart.js.map +1 -0
  173. package/lib-commonjs/Legends.js +6 -0
  174. package/lib-commonjs/Legends.js.map +1 -0
  175. package/lib-commonjs/LineChart.js +6 -0
  176. package/lib-commonjs/LineChart.js.map +1 -0
  177. package/lib-commonjs/Popover.js +6 -0
  178. package/lib-commonjs/Popover.js.map +1 -0
  179. package/lib-commonjs/ResponsiveContainer.js +6 -0
  180. package/lib-commonjs/ResponsiveContainer.js.map +1 -0
  181. package/lib-commonjs/Sparkline.js +6 -0
  182. package/lib-commonjs/Sparkline.js.map +1 -0
  183. package/lib-commonjs/VerticalBarChart.js +6 -0
  184. package/lib-commonjs/VerticalBarChart.js.map +1 -0
  185. package/lib-commonjs/components/CommonComponents/CartesianChart.js +469 -0
  186. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -0
  187. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js +6 -0
  188. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -0
  189. package/lib-commonjs/components/CommonComponents/ChartPopover.js +197 -0
  190. package/lib-commonjs/components/CommonComponents/ChartPopover.js.map +1 -0
  191. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js +4 -0
  192. package/lib-commonjs/components/CommonComponents/ChartPopover.types.js.map +1 -0
  193. package/lib-commonjs/components/CommonComponents/index.js +9 -0
  194. package/lib-commonjs/components/CommonComponents/index.js.map +1 -0
  195. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +356 -0
  196. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -0
  197. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +261 -0
  198. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -0
  199. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +158 -0
  200. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -0
  201. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js +10 -0
  202. package/lib-commonjs/components/DeclarativeChart/PlotlySchema.js.map +1 -0
  203. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +445 -0
  204. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -0
  205. package/lib-commonjs/components/DeclarativeChart/imageExporter.js +231 -0
  206. package/lib-commonjs/components/DeclarativeChart/imageExporter.js.map +1 -0
  207. package/lib-commonjs/components/DeclarativeChart/index.js +6 -0
  208. package/lib-commonjs/components/DeclarativeChart/index.js.map +1 -0
  209. package/lib-commonjs/components/DonutChart/Arc/Arc.js +117 -0
  210. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -0
  211. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js +4 -0
  212. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -0
  213. package/lib-commonjs/components/DonutChart/Arc/index.js +7 -0
  214. package/lib-commonjs/components/DonutChart/Arc/index.js.map +1 -0
  215. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +83 -0
  216. package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -0
  217. package/lib-commonjs/components/DonutChart/DonutChart.js +298 -0
  218. package/lib-commonjs/components/DonutChart/DonutChart.js.map +1 -0
  219. package/lib-commonjs/components/DonutChart/DonutChart.types.js +6 -0
  220. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -0
  221. package/lib-commonjs/components/DonutChart/Pie/Pie.js +79 -0
  222. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -0
  223. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js +4 -0
  224. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -0
  225. package/lib-commonjs/components/DonutChart/Pie/index.js +7 -0
  226. package/lib-commonjs/components/DonutChart/Pie/index.js.map +1 -0
  227. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js +61 -0
  228. package/lib-commonjs/components/DonutChart/Pie/usePieStyles.styles.js.map +1 -0
  229. package/lib-commonjs/components/DonutChart/index.js +8 -0
  230. package/lib-commonjs/components/DonutChart/index.js.map +1 -0
  231. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +82 -0
  232. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -0
  233. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js +408 -0
  234. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.js.map +1 -0
  235. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js +17 -0
  236. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -0
  237. package/lib-commonjs/components/HorizontalBarChart/index.js +8 -0
  238. package/lib-commonjs/components/HorizontalBarChart/index.js.map +1 -0
  239. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +251 -0
  240. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -0
  241. package/lib-commonjs/components/Legends/Legends.js +313 -0
  242. package/lib-commonjs/components/Legends/Legends.js.map +1 -0
  243. package/lib-commonjs/components/Legends/Legends.types.js +6 -0
  244. package/lib-commonjs/components/Legends/Legends.types.js.map +1 -0
  245. package/lib-commonjs/components/Legends/OverflowMenu.js +36 -0
  246. package/lib-commonjs/components/Legends/OverflowMenu.js.map +1 -0
  247. package/lib-commonjs/components/Legends/index.js +8 -0
  248. package/lib-commonjs/components/Legends/index.js.map +1 -0
  249. package/lib-commonjs/components/Legends/shape.js +46 -0
  250. package/lib-commonjs/components/Legends/shape.js.map +1 -0
  251. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +304 -0
  252. package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -0
  253. package/lib-commonjs/components/LineChart/LineChart.js +1032 -0
  254. package/lib-commonjs/components/LineChart/LineChart.js.map +1 -0
  255. package/lib-commonjs/components/LineChart/LineChart.types.js +6 -0
  256. package/lib-commonjs/components/LineChart/LineChart.types.js.map +1 -0
  257. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js +129 -0
  258. package/lib-commonjs/components/LineChart/eventAnnotation/EventAnnotation.js.map +1 -0
  259. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js +68 -0
  260. package/lib-commonjs/components/LineChart/eventAnnotation/LabelLink.js.map +1 -0
  261. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js +51 -0
  262. package/lib-commonjs/components/LineChart/eventAnnotation/Textbox.js.map +1 -0
  263. package/lib-commonjs/components/LineChart/index.js +9 -0
  264. package/lib-commonjs/components/LineChart/index.js.map +1 -0
  265. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +96 -0
  266. package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -0
  267. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js +76 -0
  268. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.js.map +1 -0
  269. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js +6 -0
  270. package/lib-commonjs/components/ResponsiveContainer/ResponsiveContainer.types.js.map +1 -0
  271. package/lib-commonjs/components/ResponsiveContainer/index.js +6 -0
  272. package/lib-commonjs/components/ResponsiveContainer/index.js.map +1 -0
  273. package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js +47 -0
  274. package/lib-commonjs/components/ResponsiveContainer/useResponsiveContainerStyles.styles.js.map +1 -0
  275. package/lib-commonjs/components/Sparkline/Sparkline.js +125 -0
  276. package/lib-commonjs/components/Sparkline/Sparkline.js.map +1 -0
  277. package/lib-commonjs/components/Sparkline/Sparkline.types.js +7 -0
  278. package/lib-commonjs/components/Sparkline/Sparkline.types.js.map +1 -0
  279. package/lib-commonjs/components/Sparkline/index.js +8 -0
  280. package/lib-commonjs/components/Sparkline/index.js.map +1 -0
  281. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js +77 -0
  282. package/lib-commonjs/components/Sparkline/useSparklineStyles.styles.js.map +1 -0
  283. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +851 -0
  284. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -0
  285. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js +7 -0
  286. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -0
  287. package/lib-commonjs/components/VerticalBarChart/index.js +8 -0
  288. package/lib-commonjs/components/VerticalBarChart/index.js.map +1 -0
  289. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +117 -0
  290. package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -0
  291. package/lib-commonjs/index.js +17 -0
  292. package/lib-commonjs/index.js.map +1 -0
  293. package/lib-commonjs/types/DataPoint.js +6 -0
  294. package/lib-commonjs/types/DataPoint.js.map +1 -0
  295. package/lib-commonjs/types/EventAnnotation.js +6 -0
  296. package/lib-commonjs/types/EventAnnotation.js.map +1 -0
  297. package/lib-commonjs/types/LegendDataItem.js +4 -0
  298. package/lib-commonjs/types/LegendDataItem.js.map +1 -0
  299. package/lib-commonjs/types/index.js +7 -0
  300. package/lib-commonjs/types/index.js.map +1 -0
  301. package/lib-commonjs/utilities/FocusableTooltipText.js +75 -0
  302. package/lib-commonjs/utilities/FocusableTooltipText.js.map +1 -0
  303. package/lib-commonjs/utilities/KeyCodes.js +18 -0
  304. package/lib-commonjs/utilities/KeyCodes.js.map +1 -0
  305. package/lib-commonjs/utilities/SVGTooltipText.js +148 -0
  306. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -0
  307. package/lib-commonjs/utilities/async-utils.js +382 -0
  308. package/lib-commonjs/utilities/async-utils.js.map +1 -0
  309. package/lib-commonjs/utilities/colors.js +270 -0
  310. package/lib-commonjs/utilities/colors.js.map +1 -0
  311. package/lib-commonjs/utilities/getWindow.js +28 -0
  312. package/lib-commonjs/utilities/getWindow.js.map +1 -0
  313. package/lib-commonjs/utilities/index.js +8 -0
  314. package/lib-commonjs/utilities/index.js.map +1 -0
  315. package/lib-commonjs/utilities/locale-util.js +25 -0
  316. package/lib-commonjs/utilities/locale-util.js.map +1 -0
  317. package/lib-commonjs/utilities/overflow-utils.js +36 -0
  318. package/lib-commonjs/utilities/overflow-utils.js.map +1 -0
  319. package/lib-commonjs/utilities/test-data.js +324 -0
  320. package/lib-commonjs/utilities/test-data.js.map +1 -0
  321. package/lib-commonjs/utilities/utilities.js +1184 -0
  322. package/lib-commonjs/utilities/utilities.js.map +1 -0
  323. package/lib-commonjs/utilities/vbc-utils.js +45 -0
  324. package/lib-commonjs/utilities/vbc-utils.js.map +1 -0
  325. package/package.json +80 -72
  326. package/CHANGELOG.json +0 -65
  327. package/lib/chart/chart-legend.d.ts +0 -6
  328. package/lib/chart/chart-legend.js +0 -445
  329. package/lib/chart/chart-legend.js.map +0 -1
  330. package/lib/chart/chart-render.d.ts +0 -3
  331. package/lib/chart/chart-render.js +0 -50
  332. package/lib/chart/chart-render.js.map +0 -1
  333. package/lib/chart/chart.d.ts +0 -3
  334. package/lib/chart/chart.js +0 -10
  335. package/lib/chart/chart.js.map +0 -1
  336. package/lib/chart/index.d.ts +0 -1
  337. package/lib/chart/index.js +0 -2
  338. package/lib/chart/index.js.map +0 -1
  339. package/lib/index.d.ts +0 -7
  340. package/lib/lib/builder.d.ts +0 -89
  341. package/lib/lib/builder.js +0 -379
  342. package/lib/lib/builder.js.map +0 -1
  343. package/lib/lib/datasets.d.ts +0 -123
  344. package/lib/lib/datasets.js +0 -285
  345. package/lib/lib/datasets.js.map +0 -1
  346. package/lib/lib/patterns.d.ts +0 -43
  347. package/lib/lib/patterns.js +0 -433
  348. package/lib/lib/patterns.js.map +0 -1
  349. package/lib/lib/plugins.d.ts +0 -11
  350. package/lib/lib/plugins.js +0 -403
  351. package/lib/lib/plugins.js.map +0 -1
  352. package/lib/lib/settings.d.ts +0 -12
  353. package/lib/lib/settings.js +0 -368
  354. package/lib/lib/settings.js.map +0 -1
  355. package/lib/lib/storybook.d.ts +0 -11
  356. package/lib/lib/storybook.js +0 -13
  357. package/lib/lib/storybook.js.map +0 -1
  358. package/lib/lib/utils.d.ts +0 -34
  359. package/lib/lib/utils.js +0 -253
  360. package/lib/lib/utils.js.map +0 -1
  361. package/lib/types/index.d.ts +0 -1
  362. package/lib/types/types.d.ts +0 -101
  363. package/lib/types/types.js +0 -41
  364. package/lib/types/types.js.map +0 -1
@@ -0,0 +1,96 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ linechartClassNames: function() {
13
+ return linechartClassNames;
14
+ },
15
+ useLineChartStyles: function() {
16
+ return useLineChartStyles;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const linechartClassNames = {
21
+ tooltip: 'fui-line__tooltip',
22
+ root: 'fui-line__root',
23
+ xAxis: 'fui-line__xAxis',
24
+ yAxis: 'fui-line__yAxis',
25
+ legendContainer: 'fui-line__legendContainer',
26
+ hover: 'fui-line__hover',
27
+ calloutContentRoot: 'fui-line__calloutContentRoot',
28
+ calloutContentX: 'fui-line__calloutContentX',
29
+ calloutContentY: 'fui-line__calloutContentY',
30
+ descriptionMessage: 'fui-line__descriptionMessage',
31
+ calloutDateTimeContainer: 'fui-line__calloutDateTimeContainer',
32
+ calloutInfoContainer: 'fui-line__calloutInfoContainer',
33
+ calloutBlockContainer: 'fui-line__calloutBlockContainer',
34
+ calloutlegendText: 'fui-line__calloutLegendText',
35
+ axisTitle: 'fui-line__axisTitle',
36
+ chartTitle: 'fui-line__chartTitle',
37
+ opacityChangeOnHover: 'fui-line__opacityChangeOnHover',
38
+ shapeStyles: 'fui-line__shapeStyles',
39
+ chartWrapper: 'fui-line__chartWrapper',
40
+ calloutBlockContainertoDrawShapefalse: '',
41
+ calloutBlockContainertoDrawShapetrue: ''
42
+ };
43
+ /**
44
+ * Base Styles
45
+ */ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
46
+ tooltip: {
47
+ mc9l5x: "f22iagw",
48
+ Beiy3e4: "f1vx9l62",
49
+ z8tnut: "f17mpqex",
50
+ z189sj: [
51
+ "f1vdfbxk",
52
+ "f1f5gg8d"
53
+ ],
54
+ Byoj8tv: "fdvome7",
55
+ uwmqm3: [
56
+ "f1f5gg8d",
57
+ "f1vdfbxk"
58
+ ],
59
+ qhf8xq: "f1euv43f",
60
+ fsow6f: "f17mccla",
61
+ Bhzewxz: "fr6rvge",
62
+ Bkfmm31: "f5q6cfr",
63
+ Beyfa6y: 0,
64
+ Bbmb7ep: 0,
65
+ Btl43ni: 0,
66
+ B7oj6ja: 0,
67
+ Dimara: "fq9zq91",
68
+ Bkecrkj: "f1aehjj5"
69
+ }
70
+ }, {
71
+ d: [
72
+ ".f22iagw{display:flex;}",
73
+ ".f1vx9l62{flex-direction:column;}",
74
+ ".f17mpqex{padding-top:var(--spacingHorizontalS);}",
75
+ ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}",
76
+ ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}",
77
+ ".fdvome7{padding-bottom:var(--spacingHorizontalS);}",
78
+ ".f1euv43f{position:absolute;}",
79
+ ".f17mccla{text-align:center;}",
80
+ ".fr6rvge{top:var(--spacingVerticalNone);}",
81
+ ".f5q6cfr{fill:var(--colorNeutralBackground1);}",
82
+ [
83
+ ".fq9zq91{border-radius:var(--borderRadiusSmall);}",
84
+ {
85
+ p: -1
86
+ }
87
+ ],
88
+ ".f1aehjj5{pointer-events:none;}"
89
+ ]
90
+ });
91
+ const useLineChartStyles = (props)=>{
92
+ const baseStyles = useStyles();
93
+ return {
94
+ tooltip: (0, _react.mergeClasses)(linechartClassNames.tooltip, baseStyles.tooltip /*props.styles?.tooltip*/ )
95
+ };
96
+ }; //# sourceMappingURL=useLineChartStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useLineChartStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\n/**\n * @internal\n */ export const linechartClassNames = {\n tooltip: 'fui-line__tooltip',\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 calloutContentRoot: 'fui-line__calloutContentRoot',\n calloutContentX: 'fui-line__calloutContentX',\n calloutContentY: 'fui-line__calloutContentY',\n descriptionMessage: 'fui-line__descriptionMessage',\n calloutDateTimeContainer: 'fui-line__calloutDateTimeContainer',\n calloutInfoContainer: 'fui-line__calloutInfoContainer',\n calloutBlockContainer: 'fui-line__calloutBlockContainer',\n calloutlegendText: 'fui-line__calloutLegendText',\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 calloutBlockContainertoDrawShapefalse: '',\n calloutBlockContainertoDrawShapetrue: ''\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});\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 };\n};\n"],"names":["linechartClassNames","useLineChartStyles","tooltip","root","xAxis","yAxis","legendContainer","hover","calloutContentRoot","calloutContentX","calloutContentY","descriptionMessage","calloutDateTimeContainer","calloutInfoContainer","calloutBlockContainer","calloutlegendText","axisTitle","chartTitle","opacityChangeOnHover","shapeStyles","chartWrapper","calloutBlockContainertoDrawShapefalse","calloutBlockContainertoDrawShapetrue","useStyles","__styles","mc9l5x","Beiy3e4","z8tnut","z189sj","Byoj8tv","uwmqm3","qhf8xq","fsow6f","Bhzewxz","Bkfmm31","Beyfa6y","Bbmb7ep","Btl43ni","B7oj6ja","Dimara","Bkecrkj","d","p","props","baseStyles","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAIiBA,mBAAmB;eAAnBA;;IAwCAC,kBAAkB;eAAlBA;;;uBA5CoC;AAI1C,MAAMD,sBAAsB;IACnCE,SAAS;IACTC,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,iBAAiB;IACjBC,OAAO;IACPC,oBAAoB;IACpBC,iBAAiB;IACjBC,iBAAiB;IACjBC,oBAAoB;IACpBC,0BAA0B;IAC1BC,sBAAsB;IACtBC,uBAAuB;IACvBC,mBAAmB;IACnBC,WAAW;IACXC,YAAY;IACZC,sBAAsB;IACtBC,aAAa;IACbC,cAAc;IACdC,uCAAuC;IACvCC,sCAAsC;AAC1C;AACA;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAtB,SAAA;QAAAuB,QAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,SAAA;QAAAC,QAAA;YAAA;YAAA;SAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;YAAA;YAAA;gBAAAC,GAAA,CAAA;YAAA;SAAA;QAAA;KAAA;AAAA;AAeX,MAAMzC,qBAAsB0C,CAAAA;IACnC,MAAMC,aAAarB;IACnB,OAAO;QACHrB,SAAS2C,IAAAA,mBAAY,EAAC7C,oBAAoBE,OAAO,EAAE0C,WAAW1C,OAAO,CAAC,uBAAA;IAC1E;AACJ"}
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "ResponsiveContainer", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return ResponsiveContainer;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
14
+ const _useResponsiveContainerStylesstyles = require("./useResponsiveContainerStyles.styles");
15
+ const ResponsiveContainer = (props)=>{
16
+ const containerRef = _react.useRef(null);
17
+ const onResizeRef = _react.useRef();
18
+ const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)();
19
+ const classes = (0, _useResponsiveContainerStylesstyles.useResponsiveContainerStyles)(props);
20
+ const [size, setSize] = _react.useState({});
21
+ onResizeRef.current = props.onResize;
22
+ const _window = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.defaultView;
23
+ _react.useEffect(()=>{
24
+ let animationFrameId;
25
+ // eslint-disable-next-line no-restricted-globals
26
+ let resizeObserver;
27
+ const resizeCallback = (entries)=>{
28
+ var _onResizeRef_current;
29
+ const { width: containerWidth, height: containerHeight } = entries[0].contentRect;
30
+ // rAF is an alternative to the throttle function. For more info, see:
31
+ // https://css-tricks.com/debouncing-throttling-explained-examples/#aa-requestanimationframe-raf
32
+ animationFrameId = _window === null || _window === void 0 ? void 0 : _window.requestAnimationFrame(()=>{
33
+ setSize((prevSize)=>{
34
+ const roundedWidth = Math.floor(containerWidth);
35
+ const roundedHeight = Math.floor(containerHeight);
36
+ if (prevSize.containerWidth === roundedWidth && prevSize.containerHeight === roundedHeight) {
37
+ return prevSize;
38
+ }
39
+ return {
40
+ containerWidth: roundedWidth,
41
+ containerHeight: roundedHeight
42
+ };
43
+ });
44
+ });
45
+ (_onResizeRef_current = onResizeRef.current) === null || _onResizeRef_current === void 0 ? void 0 : _onResizeRef_current.call(onResizeRef, containerWidth, containerHeight);
46
+ };
47
+ if (_window === null || _window === void 0 ? void 0 : _window.ResizeObserver) {
48
+ resizeObserver = new _window.ResizeObserver(resizeCallback);
49
+ if (containerRef.current) {
50
+ resizeObserver.observe(containerRef.current);
51
+ }
52
+ }
53
+ return ()=>{
54
+ if (animationFrameId) {
55
+ _window === null || _window === void 0 ? void 0 : _window.cancelAnimationFrame(animationFrameId);
56
+ }
57
+ resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
58
+ };
59
+ }, [
60
+ _window
61
+ ]);
62
+ return /*#__PURE__*/ _react.createElement("div", {
63
+ ref: containerRef,
64
+ className: classes.root,
65
+ style: {
66
+ width: props.width,
67
+ height: props.height
68
+ }
69
+ }, _react.Children.map(props.children, (child)=>{
70
+ return /*#__PURE__*/ _react.cloneElement(child, {
71
+ width: size.containerWidth,
72
+ height: size.containerHeight
73
+ });
74
+ }));
75
+ };
76
+ ResponsiveContainer.displayName = 'ResponsiveContainer';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ResponsiveContainer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { ResponsiveContainerProps } from './ResponsiveContainer.types';\nimport { useResponsiveContainerStyles } from './useResponsiveContainerStyles.styles';\n\nexport const ResponsiveContainer: React.FC<ResponsiveContainerProps> = props => {\n const containerRef = React.useRef<HTMLDivElement>(null);\n const onResizeRef = React.useRef<ResponsiveContainerProps['onResize']>();\n const { targetDocument } = useFluent_unstable();\n const classes = useResponsiveContainerStyles(props);\n\n const [size, setSize] = React.useState<{ containerWidth?: number; containerHeight?: number }>({});\n\n onResizeRef.current = props.onResize;\n const _window = targetDocument?.defaultView;\n\n React.useEffect(() => {\n let animationFrameId: number | undefined;\n // eslint-disable-next-line no-restricted-globals\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?.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 }, [_window]);\n\n return (\n <div ref={containerRef} className={classes.root} style={{ width: props.width, height: props.height }}>\n {React.Children.map(props.children, child => {\n return React.cloneElement(child, {\n width: size.containerWidth,\n height: size.containerHeight,\n });\n })}\n </div>\n );\n};\nResponsiveContainer.displayName = 'ResponsiveContainer';\n"],"names":["ResponsiveContainer","props","containerRef","React","useRef","onResizeRef","targetDocument","useFluent_unstable","classes","useResponsiveContainerStyles","size","setSize","useState","current","onResize","_window","defaultView","useEffect","animationFrameId","resizeObserver","resizeCallback","entries","width","containerWidth","height","containerHeight","contentRect","requestAnimationFrame","prevSize","roundedWidth","Math","floor","roundedHeight","ResizeObserver","observe","cancelAnimationFrame","disconnect","createElement","div","ref","className","root","style","Children","map","children","child","cloneElement","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAKaA;;;eAAAA;;;;iEALU;qCACY;oDAEU;AAEtC,MAAMA,sBAA0DC,CAAAA;IACrE,MAAMC,eAAeC,OAAMC,MAAM,CAAiB;IAClD,MAAMC,cAAcF,OAAMC,MAAM;IAChC,MAAM,EAAEE,cAAc,EAAE,GAAGC,IAAAA,uCAAAA;IAC3B,MAAMC,UAAUC,IAAAA,gEAAAA,EAA6BR;IAE7C,MAAM,CAACS,MAAMC,QAAQ,GAAGR,OAAMS,QAAQ,CAAwD,CAAC;IAE/FP,YAAYQ,OAAO,GAAGZ,MAAMa,QAAQ;IACpC,MAAMC,UAAUT,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBU,WAAW;IAE3Cb,OAAMc,SAAS,CAAC;QACd,IAAIC;QACJ,iDAAiD;QACjD,IAAIC;QAEJ,MAAMC,iBAAiB,CAACC;gBAetBhB;YAdA,MAAM,EAAEiB,OAAOC,cAAc,EAAEC,QAAQC,eAAe,EAAE,GAAGJ,OAAO,CAAC,EAAE,CAACK,WAAW;YACjF,sEAAsE;YACtE,gGAAgG;YAChGR,mBAAmBH,YAAAA,QAAAA,YAAAA,KAAAA,IAAAA,KAAAA,IAAAA,QAASY,qBAAqB,CAAC;gBAChDhB,QAAQiB,CAAAA;oBACN,MAAMC,eAAeC,KAAKC,KAAK,CAACR;oBAChC,MAAMS,gBAAgBF,KAAKC,KAAK,CAACN;oBACjC,IAAIG,SAASL,cAAc,KAAKM,gBAAgBD,SAASH,eAAe,KAAKO,eAAe;wBAC1F,OAAOJ;oBACT;oBAEA,OAAO;wBAAEL,gBAAgBM;wBAAcJ,iBAAiBO;oBAAc;gBACxE;YACF;YACA3B,CAAAA,uBAAAA,YAAYQ,OAAO,AAAPA,MAAO,QAAnBR,yBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,qBAAAA,IAAAA,CAAAA,aAAsBkB,gBAAgBE;QACxC;QAEA,IAAIV,YAAAA,QAAAA,YAAAA,KAAAA,IAAAA,KAAAA,IAAAA,QAASkB,cAAc,EAAE;YAC3Bd,iBAAiB,IAAIJ,QAAQkB,cAAc,CAACb;YAC5C,IAAIlB,aAAaW,OAAO,EAAE;gBACxBM,eAAee,OAAO,CAAChC,aAAaW,OAAO;YAC7C;QACF;QAEA,OAAO;YACL,IAAIK,kBAAkB;gBACpBH,YAAAA,QAAAA,YAAAA,KAAAA,IAAAA,KAAAA,IAAAA,QAASoB,oBAAoB,CAACjB;YAChC;YAEAC,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBiB,UAAU;QAC5B;IACF,GAAG;QAACrB;KAAQ;IAEZ,OAAA,WAAA,GACEZ,OAAAkC,aAAA,CAACC,OAAAA;QAAIC,KAAKrC;QAAcsC,WAAWhC,QAAQiC,IAAI;QAAEC,OAAO;YAAEpB,OAAOrB,MAAMqB,KAAK;YAAEE,QAAQvB,MAAMuB,MAAM;QAAC;OAChGrB,OAAMwC,QAAQ,CAACC,GAAG,CAAC3C,MAAM4C,QAAQ,EAAEC,CAAAA;QAClC,OAAA,WAAA,GAAO3C,OAAM4C,YAAY,CAACD,OAAO;YAC/BxB,OAAOZ,KAAKa,cAAc;YAC1BC,QAAQd,KAAKe,eAAe;QAC9B;IACF;AAGN;AACAzB,oBAAoBgD,WAAW,GAAG"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
6
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ResponsiveContainer.types.ts"],"sourcesContent":["import * as React from 'react';\n\nexport interface ResponsiveContainerProps {\n children: React.ReactElement;\n onResize?: (width: number, height: number) => void;\n width?: number | string;\n height?: number | string;\n}\n\nexport interface ResponsiveContainerStyles {\n root: string;\n}\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./ResponsiveContainer"), exports);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './ResponsiveContainer';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ responsiveContainerClassNames: function() {
13
+ return responsiveContainerClassNames;
14
+ },
15
+ useResponsiveContainerStyles: function() {
16
+ return useResponsiveContainerStyles;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const responsiveContainerClassNames = {
21
+ root: 'fui-charts-resp__root'
22
+ };
23
+ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
24
+ root: {
25
+ a9b677: "fly5x3f",
26
+ Bqenvij: "f1l02sjl",
27
+ Bvcz5cu: "fx80qsw",
28
+ Bjw6159: "f4wz6dc",
29
+ B5pe6w7: "f17klwcu",
30
+ p4uzdd: "ffmg4tr"
31
+ }
32
+ }, {
33
+ d: [
34
+ ".fly5x3f{width:100%;}",
35
+ ".f1l02sjl{height:100%;}",
36
+ ".fx80qsw [class*=\"chartWrapper\"]{width:100%;}",
37
+ ".f4wz6dc [class*=\"chartWrapper\"]{height:100%;}",
38
+ ".f17klwcu svg{width:100%;}",
39
+ ".ffmg4tr svg{height:100%;}"
40
+ ]
41
+ });
42
+ const useResponsiveContainerStyles = (props)=>{
43
+ const baseStyles = useStyles();
44
+ return {
45
+ root: (0, _react.mergeClasses)(responsiveContainerClassNames.root, baseStyles.root)
46
+ };
47
+ }; //# sourceMappingURL=useResponsiveContainerStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useResponsiveContainerStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nexport const responsiveContainerClassNames = {\n root: 'fui-charts-resp__root'\n};\nconst useStyles = makeStyles({\n root: {\n width: '100%',\n height: '100%',\n '& [class*=\"chartWrapper\"]': {\n width: '100%',\n // To prevent chart height from collapsing while resizing\n height: '100%'\n },\n '& svg': {\n // This overrides the pixel width and height of svg allowing it to resize properly within flexbox\n width: '100%',\n height: '100%'\n }\n }\n});\nexport const useResponsiveContainerStyles = (props)=>{\n const baseStyles = useStyles();\n return {\n root: mergeClasses(responsiveContainerClassNames.root, baseStyles.root)\n };\n};\n"],"names":["responsiveContainerClassNames","useResponsiveContainerStyles","root","useStyles","__styles","a9b677","Bqenvij","Bvcz5cu","Bjw6159","B5pe6w7","p4uzdd","d","props","baseStyles","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACaA,6BAA6B;eAA7BA;;IAmBAC,4BAA4B;eAA5BA;;;uBApB4B;AAClC,MAAMD,gCAAgC;IACzCE,MAAM;AACV;AACA,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAF,MAAA;QAAAG,QAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,QAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA;AAgBX,MAAMV,+BAAgCW,CAAAA;IACzC,MAAMC,aAAaV;IACnB,OAAO;QACHD,MAAMY,IAAAA,mBAAY,EAACd,8BAA8BE,IAAI,EAAEW,WAAWX,IAAI;IAC1E;AACJ"}
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "Sparkline", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return Sparkline;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _useSparklineStylesstyles = require("./useSparklineStyles.styles");
14
+ const _d3scale = require("d3-scale");
15
+ const _d3shape = require("d3-shape");
16
+ const _d3array = require("d3-array");
17
+ const _reacttabster = require("@fluentui/react-tabster");
18
+ const _index = require("../../utilities/index");
19
+ const Sparkline = /*#__PURE__*/ _react.forwardRef((props, forwardedRef)=>{
20
+ let margin = {
21
+ top: 2,
22
+ right: 0,
23
+ bottom: 0,
24
+ left: 0
25
+ };
26
+ let x;
27
+ let y;
28
+ let _emptyChartId = '_SparklineChart_empty';
29
+ let _isRTL = (0, _index.useRtl)();
30
+ const [points, setPoints] = _react.useState([]);
31
+ const width = 80;
32
+ const height = 20;
33
+ const valueTextWidth = 80;
34
+ const line = _react.useMemo(()=>{
35
+ return (0, _d3shape.line)().x((d)=>x(d.x)).y((d)=>y(d.y)).curve(_d3shape.curveLinear);
36
+ }, [
37
+ x,
38
+ y
39
+ ]);
40
+ const area = _react.useMemo(()=>{
41
+ return (0, _d3shape.area)().x((d)=>x(d.x)).y0(height).y1((d)=>y(d.y)).curve(_d3shape.curveLinear);
42
+ }, [
43
+ height,
44
+ x,
45
+ y
46
+ ]);
47
+ _react.useEffect(()=>{
48
+ if (!_isChartEmpty()) {
49
+ // eslint-disable-next-line @typescript-eslint/no-shadow
50
+ const _points = props.data.lineChartData[0].data;
51
+ /* eslint-disable @typescript-eslint/no-explicit-any */ const [xMin, xMax] = (0, _d3array.extent)(_points, (d)=>d.x);
52
+ // eslint-disable-next-line react-hooks/exhaustive-deps
53
+ x = (0, _d3scale.scaleLinear)().domain([
54
+ xMin,
55
+ xMax
56
+ ]).range([
57
+ margin.left,
58
+ width - margin.right
59
+ ]);
60
+ // eslint-disable-next-line react-hooks/exhaustive-deps
61
+ y = (0, _d3scale.scaleLinear)()/* eslint-disable @typescript-eslint/no-explicit-any */ .domain([
62
+ 0,
63
+ (0, _d3array.max)(_points, (d)=>d.y)
64
+ ]).range([
65
+ height - margin.bottom,
66
+ margin.top
67
+ ]);
68
+ setPoints(_points);
69
+ }
70
+ }, []);
71
+ const { data } = props;
72
+ function _isChartEmpty() {
73
+ return !(data && data.lineChartData && data.lineChartData.length > 0 && data.lineChartData.filter((item)=>item.data.length === 0).length === 0);
74
+ }
75
+ function drawSparkline() {
76
+ if (!line || !area) {
77
+ return null;
78
+ }
79
+ return /*#__PURE__*/ _react.createElement(_react.Fragment, null, /*#__PURE__*/ _react.createElement("path", {
80
+ className: "line",
81
+ d: line(points),
82
+ fill: 'transparent',
83
+ opacity: 1,
84
+ strokeWidth: 2,
85
+ stroke: data.lineChartData[0].color
86
+ }), /*#__PURE__*/ _react.createElement("path", {
87
+ className: "area",
88
+ d: area(points),
89
+ opacity: 1,
90
+ fillOpacity: 0.2,
91
+ fill: data.lineChartData[0].color,
92
+ role: "img",
93
+ "aria-hidden": true
94
+ }));
95
+ }
96
+ const classes = (0, _useSparklineStylesstyles.useSparklineStyles)(props);
97
+ const focusAttributes = (0, _reacttabster.useFocusableGroup)();
98
+ return !_isChartEmpty() ? /*#__PURE__*/ _react.createElement("div", {
99
+ className: classes.inlineBlock,
100
+ ...focusAttributes
101
+ }, width >= 50 && height >= 16 ? /*#__PURE__*/ _react.createElement("svg", {
102
+ width: width,
103
+ height: height,
104
+ "aria-label": `Sparkline with label ${data.lineChartData[0].legend}`,
105
+ tabIndex: 0
106
+ }, points ? drawSparkline() : null) : /*#__PURE__*/ _react.createElement(_react.Fragment, null), props.showLegend && props.data.lineChartData[0].legend ? /*#__PURE__*/ _react.createElement("svg", {
107
+ width: valueTextWidth,
108
+ height: height
109
+ }, /*#__PURE__*/ _react.createElement("text", {
110
+ x: "0%",
111
+ textAnchor: _isRTL ? 'end' : 'start',
112
+ dx: 8,
113
+ y: "100%",
114
+ dy: -5,
115
+ className: classes.valueText
116
+ }, props.data.lineChartData[0].legend)) : /*#__PURE__*/ _react.createElement(_react.Fragment, null)) : /*#__PURE__*/ _react.createElement("div", {
117
+ id: _emptyChartId,
118
+ role: 'alert',
119
+ style: {
120
+ opacity: '0'
121
+ },
122
+ "aria-label": 'Graph has no data to display'
123
+ });
124
+ });
125
+ Sparkline.displayName = 'Sparkline';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["Sparkline.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useSparklineStyles } from './useSparklineStyles.styles';\nimport { scaleLinear as d3ScaleLinear } from 'd3-scale';\nimport { area as d3Area, line as d3Line, curveLinear as d3curveLinear } from 'd3-shape';\nimport { max as d3Max, extent as d3Extent } from 'd3-array';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { LineChartDataPoint } from '../../types/DataPoint';\nimport { useRtl } from '../../utilities/index';\nimport { SparklineProps } from '../../index';\n\n/**\n * Sparkline is the context wrapper and container for all Sparkline content/controls,\n * It has no direct style or slot opinions.\n *\n * Sparkline also provides API interfaces for callbacks that will occur on navigation events.\n */\nexport const Sparkline: React.FunctionComponent<SparklineProps> = React.forwardRef<HTMLDivElement, SparklineProps>(\n (props, forwardedRef) => {\n let margin = {\n top: 2,\n right: 0,\n bottom: 0,\n left: 0,\n };\n let x: any;\n let y: any;\n let _emptyChartId: string = '_SparklineChart_empty';\n let _isRTL: boolean = useRtl();\n const [points, setPoints] = React.useState<LineChartDataPoint[]>([]);\n const width = 80;\n const height = 20;\n const valueTextWidth = 80;\n\n const line = React.useMemo(() => {\n return d3Line<LineChartDataPoint>()\n .x((d: LineChartDataPoint) => x(d.x))\n .y((d: LineChartDataPoint) => y(d.y))\n .curve(d3curveLinear);\n }, [x, y]);\n\n const area = React.useMemo(() => {\n return d3Area<LineChartDataPoint>()\n .x((d: LineChartDataPoint) => x(d.x))\n .y0(height)\n .y1((d: LineChartDataPoint) => y(d.y))\n .curve(d3curveLinear);\n }, [height, x, y]);\n\n React.useEffect(() => {\n if (!_isChartEmpty()) {\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const _points = props.data!.lineChartData![0].data;\n\n /* eslint-disable @typescript-eslint/no-explicit-any */\n const [xMin, xMax] = d3Extent(_points, (d: any) => d.x);\n\n // eslint-disable-next-line react-hooks/exhaustive-deps\n x = d3ScaleLinear()\n .domain([xMin, xMax])\n .range([margin.left!, width - margin.right!]);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n y = d3ScaleLinear()\n /* eslint-disable @typescript-eslint/no-explicit-any */\n .domain([0, d3Max(_points, (d: any) => d.y)])\n .range([height - margin.bottom!, margin.top!]);\n\n setPoints(_points);\n }\n }, []);\n\n const { data } = props;\n function _isChartEmpty(): boolean {\n return !(\n data &&\n data.lineChartData &&\n data.lineChartData.length > 0 &&\n data.lineChartData.filter(item => item.data.length === 0).length === 0\n );\n }\n function drawSparkline() {\n if (!line || !area) {\n return null;\n }\n return (\n <>\n <path\n className=\"line\"\n d={line(points)!}\n fill={'transparent'}\n opacity={1}\n strokeWidth={2}\n stroke={data!.lineChartData![0].color!}\n />\n <path\n className=\"area\"\n d={area(points)!}\n opacity={1}\n fillOpacity={0.2}\n fill={data!.lineChartData![0].color!}\n role=\"img\"\n aria-hidden\n />\n </>\n );\n }\n\n const classes = useSparklineStyles(props);\n const focusAttributes = useFocusableGroup();\n return !_isChartEmpty() ? (\n <div className={classes.inlineBlock} {...focusAttributes}>\n {width >= 50 && height >= 16 ? (\n <svg\n width={width}\n height={height}\n aria-label={`Sparkline with label ${data!.lineChartData![0].legend!}`}\n tabIndex={0}\n >\n {points ? drawSparkline() : null}\n </svg>\n ) : (\n <></>\n )}\n {props.showLegend && props.data!.lineChartData![0].legend ? (\n <svg width={valueTextWidth} height={height}>\n <text x=\"0%\" textAnchor={_isRTL ? 'end' : 'start'} dx={8} y=\"100%\" dy={-5} className={classes.valueText}>\n {props.data!.lineChartData![0].legend!}\n </text>\n </svg>\n ) : (\n <></>\n )}\n </div>\n ) : (\n <div id={_emptyChartId} role={'alert'} style={{ opacity: '0' }} aria-label={'Graph has no data to display'} />\n );\n },\n);\nSparkline.displayName = 'Sparkline';\n"],"names":["Sparkline","React","forwardRef","props","forwardedRef","margin","top","right","bottom","left","x","y","_emptyChartId","_isRTL","useRtl","points","setPoints","useState","width","height","valueTextWidth","line","useMemo","d3Line","d","curve","d3curveLinear","area","d3Area","y0","y1","useEffect","_isChartEmpty","_points","data","lineChartData","xMin","xMax","d3Extent","d3ScaleLinear","domain","range","d3Max","length","filter","item","drawSparkline","createElement","Fragment","path","className","fill","opacity","strokeWidth","stroke","color","fillOpacity","role","aria-hidden","classes","useSparklineStyles","focusAttributes","useFocusableGroup","div","inlineBlock","svg","aria-label","legend","tabIndex","showLegend","text","textAnchor","dx","dy","valueText","id","style","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"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"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Sparkline styles
3
+ * {@docCategory SparklineChart}
4
+ */ "use strict";
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["Sparkline.types.ts"],"sourcesContent":["import { ChartProps } from './index';\nimport { CartesianChartStyleProps } from '../CommonComponents/index';\n\nexport interface SparklineStyleProps extends CartesianChartStyleProps {}\n\n/**\n * Sparkline properties\n * {@docCategory SparklineChart}\n */\nexport interface SparklineProps extends React.RefAttributes<HTMLDivElement> {\n /**\n * An array of chart data points for the Sparkline chart\n */\n data?: ChartProps;\n\n /**\n * Width of chart\n * * @default 80\n */\n width?: number;\n\n /**\n * Height of chart\n * @default 20\n */\n height?: number;\n\n /**\n * Width of value text\n * * @default 80\n */\n valueTextWidth?: number;\n\n /**\n * Additional CSS class(es) to apply to the SparklineChart.\n */\n className?: string;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n\n /**\n * Prop used to determine whether to show the legend or not\n */\n showLegend?: boolean;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: SparklineStyles;\n}\n\n/**\n * Sparkline styles\n * {@docCategory SparklineChart}\n */\nexport interface SparklineStyles {\n inlineBlock?: string;\n valueText?: string;\n}\n"],"names":[],"rangeMappings":";;;","mappings":"AAsDA;;;CAGC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./Sparkline"), exports);
7
+ _export_star._(require("./Sparkline.types"), exports);
8
+ _export_star._(require("../../types/index"), exports);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Sparkline';\nexport * from './Sparkline.types';\nexport * from '../../types/index';\n"],"names":[],"rangeMappings":";;;;;;;","mappings":";;;;;uBAAc;uBACA;uBACA"}
@@ -0,0 +1,77 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ sparklineClassNames: function() {
13
+ return sparklineClassNames;
14
+ },
15
+ useSparklineStyles: function() {
16
+ return useSparklineStyles;
17
+ }
18
+ });
19
+ const _react = require("@griffel/react");
20
+ const sparklineClassNames = {
21
+ inlineBlock: 'fui-sprk__inlineBlock',
22
+ valueText: 'fui-sprk__valueText'
23
+ };
24
+ /**
25
+ * Base Styles
26
+ */ const useStyles = /*#__PURE__*/ (0, _react.__styles)({
27
+ inlineBlock: {
28
+ mc9l5x: "f1w7gpdv"
29
+ },
30
+ valueText: {
31
+ Bahqtrf: "fk6fouc",
32
+ Be2twd7: "fy9rknc",
33
+ Bhrd7zp: "figsok6",
34
+ Bg96gwp: "fwrc4pm",
35
+ Bkfmm31: "fhuob2q",
36
+ Bcwlslt: "fase104",
37
+ Bpvj6i6: "fzgeahw",
38
+ B93v9kj: "f15mrrko"
39
+ }
40
+ }, {
41
+ d: [
42
+ ".f1w7gpdv{display:inline;}",
43
+ ".fk6fouc{font-family:var(--fontFamilyBase);}",
44
+ ".fy9rknc{font-size:var(--fontSizeBase200);}",
45
+ ".figsok6{font-weight:var(--fontWeightRegular);}",
46
+ ".fwrc4pm{line-height:var(--lineHeightBase200);}",
47
+ ".fhuob2q{fill:var(--colorNeutralForeground1);}"
48
+ ],
49
+ m: [
50
+ [
51
+ "@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.fase104{opacity:0.1;}}",
52
+ {
53
+ m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
54
+ }
55
+ ],
56
+ [
57
+ "@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.fzgeahw{stroke:rgb(179, 179, 179);}}",
58
+ {
59
+ m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
60
+ }
61
+ ],
62
+ [
63
+ "@media screen and (-ms-high-contrast: active),screen and (forced-colors: active){.f15mrrko{forced-color-adjust:none;}}",
64
+ {
65
+ m: "screen and (-ms-high-contrast: active), screen and (forced-colors: active)"
66
+ }
67
+ ]
68
+ ]
69
+ });
70
+ const useSparklineStyles = (props)=>{
71
+ var _props_styles, _props_styles1;
72
+ const baseStyles = useStyles();
73
+ return {
74
+ inlineBlock: (0, _react.mergeClasses)(sparklineClassNames.inlineBlock, baseStyles.inlineBlock, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.inlineBlock),
75
+ valueText: (0, _react.mergeClasses)(sparklineClassNames.valueText, baseStyles.valueText, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.valueText)
76
+ };
77
+ }; //# sourceMappingURL=useSparklineStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useSparklineStyles.styles.js"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\n/**\n * @internal\n */ export const sparklineClassNames = {\n inlineBlock: 'fui-sprk__inlineBlock',\n valueText: 'fui-sprk__valueText'\n};\n/**\n * Base Styles\n */ const useStyles = makeStyles({\n inlineBlock: {\n display: 'inline'\n },\n valueText: {\n ...typographyStyles.caption1,\n fill: tokens.colorNeutralForeground1,\n [HighContrastSelector]: {\n opacity: 0.1,\n stroke: 'rgb(179, 179, 179)',\n forcedColorAdjust: 'none'\n }\n }\n});\n/**\n * Apply styling to the Carousel slots based on the state\n */ export const useSparklineStyles = (props)=>{\n var _props_styles, _props_styles1;\n const baseStyles = useStyles();\n return {\n inlineBlock: mergeClasses(sparklineClassNames.inlineBlock, baseStyles.inlineBlock, (_props_styles = props.styles) === null || _props_styles === void 0 ? void 0 : _props_styles.inlineBlock),\n valueText: mergeClasses(sparklineClassNames.valueText, baseStyles.valueText, (_props_styles1 = props.styles) === null || _props_styles1 === void 0 ? void 0 : _props_styles1.valueText)\n };\n};\n"],"names":["sparklineClassNames","useSparklineStyles","inlineBlock","valueText","useStyles","__styles","mc9l5x","Bahqtrf","Be2twd7","Bhrd7zp","Bg96gwp","Bkfmm31","Bcwlslt","Bpvj6i6","B93v9kj","d","m","props","_props_styles","_props_styles1","baseStyles","mergeClasses","styles"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAKiBA,mBAAmB;eAAnBA;;IAsBAC,kBAAkB;eAAlBA;;;uBA3BwB;AAK9B,MAAMD,sBAAsB;IACnCE,aAAa;IACbC,WAAW;AACf;AACA;;CAEA,GAAI,MAAMC,YAAS,WAAA,GAAGC,IAAAA,eAAA,EAAA;IAAAH,aAAA;QAAAI,QAAA;IAAA;IAAAH,WAAA;QAAAI,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;KAAA;IAAAC,GAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;QAAA;YAAA;YAAA;gBAAAA,GAAA;YAAA;SAAA;KAAA;AAAA;AAgBX,MAAMf,qBAAsBgB,CAAAA;IACnC,IAAIC,eAAeC;IACnB,MAAMC,aAAahB;IACnB,OAAO;QACHF,aAAamB,IAAAA,mBAAY,EAACrB,oBAAoBE,WAAW,EAAEkB,WAAWlB,WAAW,EAAE,AAACgB,CAAAA,gBAAgBD,MAAMK,MAAM,AAANA,MAAY,QAAQJ,kBAAkB,KAAK,IAAI,KAAK,IAAIA,cAAchB,WAAW;QAC3LC,WAAWkB,IAAAA,mBAAY,EAACrB,oBAAoBG,SAAS,EAAEiB,WAAWjB,SAAS,EAAE,AAACgB,CAAAA,iBAAiBF,MAAMK,MAAM,AAANA,MAAY,QAAQH,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAehB,SAAS;IAC1L;AACJ"}