@redsift/charts 11.6.0-muiv5-alpha.4 → 11.6.0-muiv5-alpha.5

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 (275) hide show
  1. package/_internal/Arc.js +10 -0
  2. package/_internal/Arc.js.map +1 -0
  3. package/{components/Arc/Arc.js → _internal/Arc2.js} +52 -9
  4. package/_internal/Arc2.js.map +1 -0
  5. package/_internal/Arcs.js +10 -0
  6. package/_internal/Arcs.js.map +1 -0
  7. package/{components/Arcs/Arcs.js → _internal/Arcs2.js} +12 -8
  8. package/_internal/Arcs2.js.map +1 -0
  9. package/_internal/Axis.js +8 -0
  10. package/_internal/Axis.js.map +1 -0
  11. package/{types/axis.d.ts → _internal/Axis2.js} +2 -2
  12. package/_internal/Axis2.js.map +1 -0
  13. package/_internal/Bar.js +10 -0
  14. package/_internal/Bar.js.map +1 -0
  15. package/{components/Bar/Bar.js → _internal/Bar2.js} +85 -10
  16. package/_internal/Bar2.js.map +1 -0
  17. package/_internal/BarChart.js +17 -0
  18. package/_internal/BarChart.js.map +1 -0
  19. package/_internal/BarChart2.js +1419 -0
  20. package/_internal/BarChart2.js.map +1 -0
  21. package/_internal/ChartContainer.js +5 -0
  22. package/_internal/ChartContainer.js.map +1 -0
  23. package/{components/ChartContainer/ChartContainer.js → _internal/ChartContainer2.js} +105 -6
  24. package/_internal/ChartContainer2.js.map +1 -0
  25. package/_internal/DataPoint.js +7 -0
  26. package/_internal/DataPoint.js.map +1 -0
  27. package/{components/DataPoint/DataPoint.js → _internal/DataPoint2.js} +11 -5
  28. package/_internal/DataPoint2.js.map +1 -0
  29. package/_internal/Dot.js +10 -0
  30. package/_internal/Dot.js.map +1 -0
  31. package/{components/Dot/Dot.js → _internal/Dot2.js} +61 -6
  32. package/_internal/Dot2.js.map +1 -0
  33. package/_internal/Legend.js +10 -0
  34. package/_internal/Legend.js.map +1 -0
  35. package/{components/Legend/Legend.js → _internal/Legend3.js} +17 -6
  36. package/_internal/Legend3.js.map +1 -0
  37. package/_internal/LegendItem.js +21 -0
  38. package/_internal/LegendItem.js.map +1 -0
  39. package/{components/LegendItem/LegendItem.js → _internal/LegendItem2.js} +64 -7
  40. package/_internal/LegendItem2.js.map +1 -0
  41. package/_internal/Line.js +10 -0
  42. package/_internal/Line.js.map +1 -0
  43. package/{components/Line/Line.js → _internal/Line2.js} +12 -8
  44. package/_internal/Line2.js.map +1 -0
  45. package/_internal/LineChart.js +17 -0
  46. package/_internal/LineChart.js.map +1 -0
  47. package/{components/LineChart/RenderedLineChart.js → _internal/LineChart2.js} +317 -20
  48. package/_internal/LineChart2.js.map +1 -0
  49. package/_internal/PieChart.js +14 -0
  50. package/_internal/PieChart.js.map +1 -0
  51. package/_internal/PieChart2.js +605 -0
  52. package/_internal/PieChart2.js.map +1 -0
  53. package/_internal/ScatterPlot.js +17 -0
  54. package/_internal/ScatterPlot.js.map +1 -0
  55. package/_internal/ScatterPlot2.js +743 -0
  56. package/_internal/ScatterPlot2.js.map +1 -0
  57. package/{_virtual → _internal}/_rollupPluginBabelHelpers.js +1 -1
  58. package/_internal/config.js +13 -0
  59. package/_internal/config.js.map +1 -0
  60. package/{types/data.d.ts → _internal/data.js} +1 -1
  61. package/{types/legend.js → _internal/legend2.js} +2 -2
  62. package/_internal/legend2.js.map +1 -0
  63. package/{components/Axis/types.d.ts → _internal/scale.js} +47 -2
  64. package/{scheme.js → _internal/scheme.js} +1 -1
  65. package/_internal/scheme.js.map +1 -0
  66. package/{components/Arc/styles.d.ts → _internal/styles.js} +7 -5
  67. package/{components/Line/types.d.ts → _internal/styles10.js} +14 -5
  68. package/{components/LineChart/types.d.ts → _internal/styles11.js} +23 -12
  69. package/{components/PieChart/types.d.ts → _internal/styles12.js} +29 -11
  70. package/{components/ScatterPlot/types.d.ts → _internal/styles13.js} +23 -12
  71. package/{components/Arcs/types.d.ts → _internal/styles2.js} +11 -2
  72. package/{components/Axis/styles.d.ts → _internal/styles3.js} +6 -3
  73. package/{components/Bar/styles.d.ts → _internal/styles4.js} +7 -5
  74. package/{components/BarChart/types.d.ts → _internal/styles5.js} +49 -14
  75. package/{components/ChartContainer/styles.d.ts → _internal/styles6.js} +8 -3
  76. package/{components/DataPoint/styles.d.ts → _internal/styles7.js} +5 -2
  77. package/{components/Dot/styles.d.ts → _internal/styles8.js} +7 -4
  78. package/{components/Legend/styles.d.ts → _internal/styles9.js} +5 -2
  79. package/{utils/index.js → _internal/theme.js} +37 -2
  80. package/_internal/theme.js.map +1 -0
  81. package/{components/Arc/types.d.ts → _internal/types.js} +3 -3
  82. package/{components/Bar/types.d.ts → _internal/types2.js} +3 -3
  83. package/{components/ChartContainer/types.d.ts → _internal/types3.js} +1 -1
  84. package/{components/DataPoint/types.d.ts → _internal/types4.js} +29 -3
  85. package/{components/Dot/types.d.ts → _internal/types5.js} +3 -3
  86. package/{components/Legend/types.d.ts → _internal/types6.js} +4 -4
  87. package/{components/LegendItem/types.d.ts → _internal/types7.js} +8 -4
  88. package/{hooks → _internal}/useFormatCategoricalData.js +3 -4
  89. package/{hooks → _internal}/useFormatCategoricalData.js.map +1 -1
  90. package/index.js +129 -43
  91. package/index.js.map +1 -1
  92. package/index2.js +49 -0
  93. package/index2.js.map +1 -0
  94. package/package.json +2 -2
  95. package/components/Arc/Arc.d.ts +0 -6
  96. package/components/Arc/Arc.js.map +0 -1
  97. package/components/Arc/styles.js +0 -49
  98. package/components/Arc/styles.js.map +0 -1
  99. package/components/Arcs/Arcs.d.ts +0 -6
  100. package/components/Arcs/Arcs.js.map +0 -1
  101. package/components/Arcs/styles.d.ts +0 -9
  102. package/components/Arcs/styles.js +0 -9
  103. package/components/Arcs/styles.js.map +0 -1
  104. package/components/Axis/Axis.d.ts +0 -7
  105. package/components/Axis/Axis.js +0 -211
  106. package/components/Axis/Axis.js.map +0 -1
  107. package/components/Axis/computeTicks.js +0 -117
  108. package/components/Axis/computeTicks.js.map +0 -1
  109. package/components/Axis/styles.js +0 -51
  110. package/components/Axis/styles.js.map +0 -1
  111. package/components/Axis/types.js +0 -24
  112. package/components/Axis/types.js.map +0 -1
  113. package/components/Bar/Bar.d.ts +0 -6
  114. package/components/Bar/Bar.js.map +0 -1
  115. package/components/Bar/styles.js +0 -66
  116. package/components/Bar/styles.js.map +0 -1
  117. package/components/Bar/types.js +0 -18
  118. package/components/Bar/types.js.map +0 -1
  119. package/components/BarChart/BarChart.d.ts +0 -29
  120. package/components/BarChart/BarChart.js +0 -141
  121. package/components/BarChart/BarChart.js.map +0 -1
  122. package/components/BarChart/BarChartBars.js +0 -168
  123. package/components/BarChart/BarChartBars.js.map +0 -1
  124. package/components/BarChart/BarChartSection.js +0 -139
  125. package/components/BarChart/BarChartSection.js.map +0 -1
  126. package/components/BarChart/EmptyBarChart.js +0 -57
  127. package/components/BarChart/EmptyBarChart.js.map +0 -1
  128. package/components/BarChart/LoadingBarChart.js +0 -18
  129. package/components/BarChart/LoadingBarChart.js.map +0 -1
  130. package/components/BarChart/RenderedLinearBarChart.js +0 -549
  131. package/components/BarChart/RenderedLinearBarChart.js.map +0 -1
  132. package/components/BarChart/RenderedOrdinalBarChart.js +0 -236
  133. package/components/BarChart/RenderedOrdinalBarChart.js.map +0 -1
  134. package/components/BarChart/context.js +0 -13
  135. package/components/BarChart/context.js.map +0 -1
  136. package/components/BarChart/intl/en-US.json.js +0 -17
  137. package/components/BarChart/intl/en-US.json.js.map +0 -1
  138. package/components/BarChart/intl/fr-FR.json.js +0 -17
  139. package/components/BarChart/intl/fr-FR.json.js.map +0 -1
  140. package/components/BarChart/intl/index.js +0 -10
  141. package/components/BarChart/intl/index.js.map +0 -1
  142. package/components/BarChart/styles.d.ts +0 -19
  143. package/components/BarChart/styles.js +0 -71
  144. package/components/BarChart/styles.js.map +0 -1
  145. package/components/BarChart/types.js +0 -17
  146. package/components/BarChart/types.js.map +0 -1
  147. package/components/BarChart/utils.js +0 -69
  148. package/components/BarChart/utils.js.map +0 -1
  149. package/components/ChartContainer/ChartContainer.d.ts +0 -9
  150. package/components/ChartContainer/ChartContainer.js.map +0 -1
  151. package/components/ChartContainer/context.js +0 -6
  152. package/components/ChartContainer/context.js.map +0 -1
  153. package/components/ChartContainer/intl/en-US.json.js +0 -14
  154. package/components/ChartContainer/intl/en-US.json.js.map +0 -1
  155. package/components/ChartContainer/intl/fr-FR.json.js +0 -14
  156. package/components/ChartContainer/intl/fr-FR.json.js.map +0 -1
  157. package/components/ChartContainer/intl/index.js +0 -10
  158. package/components/ChartContainer/intl/index.js.map +0 -1
  159. package/components/ChartContainer/styles.js +0 -76
  160. package/components/ChartContainer/styles.js.map +0 -1
  161. package/components/DataPoint/DataPoint.d.ts +0 -6
  162. package/components/DataPoint/DataPoint.js.map +0 -1
  163. package/components/DataPoint/styles.js +0 -10
  164. package/components/DataPoint/styles.js.map +0 -1
  165. package/components/Dot/Dot.d.ts +0 -6
  166. package/components/Dot/Dot.js.map +0 -1
  167. package/components/Dot/styles.js +0 -49
  168. package/components/Dot/styles.js.map +0 -1
  169. package/components/Dot/types.js +0 -14
  170. package/components/Dot/types.js.map +0 -1
  171. package/components/Legend/Legend.d.ts +0 -6
  172. package/components/Legend/Legend.js.map +0 -1
  173. package/components/Legend/styles.js +0 -15
  174. package/components/Legend/styles.js.map +0 -1
  175. package/components/LegendItem/LegendItem.js.map +0 -1
  176. package/components/LegendItem/styles.js +0 -63
  177. package/components/LegendItem/styles.js.map +0 -1
  178. package/components/Line/Line.d.ts +0 -6
  179. package/components/Line/Line.js.map +0 -1
  180. package/components/Line/styles.d.ts +0 -9
  181. package/components/Line/styles.js +0 -9
  182. package/components/Line/styles.js.map +0 -1
  183. package/components/LineChart/EmptyLineChart.js +0 -58
  184. package/components/LineChart/EmptyLineChart.js.map +0 -1
  185. package/components/LineChart/LineChart.d.ts +0 -6
  186. package/components/LineChart/LineChart.js +0 -96
  187. package/components/LineChart/LineChart.js.map +0 -1
  188. package/components/LineChart/LoadingLineChart.js +0 -18
  189. package/components/LineChart/LoadingLineChart.js.map +0 -1
  190. package/components/LineChart/RenderedLineChart.js.map +0 -1
  191. package/components/LineChart/intl/en-US.json.js +0 -17
  192. package/components/LineChart/intl/en-US.json.js.map +0 -1
  193. package/components/LineChart/intl/fr-FR.json.js +0 -17
  194. package/components/LineChart/intl/fr-FR.json.js.map +0 -1
  195. package/components/LineChart/intl/index.js +0 -10
  196. package/components/LineChart/intl/index.js.map +0 -1
  197. package/components/LineChart/styles.d.ts +0 -17
  198. package/components/LineChart/styles.js +0 -53
  199. package/components/LineChart/styles.js.map +0 -1
  200. package/components/LineChart/types.js +0 -17
  201. package/components/LineChart/types.js.map +0 -1
  202. package/components/LineChart/utils.js +0 -67
  203. package/components/LineChart/utils.js.map +0 -1
  204. package/components/PieChart/EmptyPieChart.js +0 -85
  205. package/components/PieChart/EmptyPieChart.js.map +0 -1
  206. package/components/PieChart/LoadingPieChart.js +0 -18
  207. package/components/PieChart/LoadingPieChart.js.map +0 -1
  208. package/components/PieChart/PieChart.d.ts +0 -6
  209. package/components/PieChart/PieChart.js +0 -98
  210. package/components/PieChart/PieChart.js.map +0 -1
  211. package/components/PieChart/RenderedPieChart.js +0 -198
  212. package/components/PieChart/RenderedPieChart.js.map +0 -1
  213. package/components/PieChart/intl/en-US.json.js +0 -9
  214. package/components/PieChart/intl/en-US.json.js.map +0 -1
  215. package/components/PieChart/intl/fr-FR.json.js +0 -9
  216. package/components/PieChart/intl/fr-FR.json.js.map +0 -1
  217. package/components/PieChart/intl/index.js +0 -10
  218. package/components/PieChart/intl/index.js.map +0 -1
  219. package/components/PieChart/styles.d.ts +0 -24
  220. package/components/PieChart/styles.js +0 -168
  221. package/components/PieChart/styles.js.map +0 -1
  222. package/components/PieChart/types.js +0 -27
  223. package/components/PieChart/types.js.map +0 -1
  224. package/components/PieChart/utils.js +0 -37
  225. package/components/PieChart/utils.js.map +0 -1
  226. package/components/ScatterPlot/EmptyScatterPlot.js +0 -58
  227. package/components/ScatterPlot/EmptyScatterPlot.js.map +0 -1
  228. package/components/ScatterPlot/LoadingScatterPlot.js +0 -18
  229. package/components/ScatterPlot/LoadingScatterPlot.js.map +0 -1
  230. package/components/ScatterPlot/RenderedScatterPlot.js +0 -352
  231. package/components/ScatterPlot/RenderedScatterPlot.js.map +0 -1
  232. package/components/ScatterPlot/ScatterPlot.d.ts +0 -6
  233. package/components/ScatterPlot/ScatterPlot.js +0 -105
  234. package/components/ScatterPlot/ScatterPlot.js.map +0 -1
  235. package/components/ScatterPlot/intl/en-US.json.js +0 -12
  236. package/components/ScatterPlot/intl/en-US.json.js.map +0 -1
  237. package/components/ScatterPlot/intl/fr-FR.json.js +0 -17
  238. package/components/ScatterPlot/intl/fr-FR.json.js.map +0 -1
  239. package/components/ScatterPlot/intl/index.js +0 -10
  240. package/components/ScatterPlot/intl/index.js.map +0 -1
  241. package/components/ScatterPlot/styles.d.ts +0 -17
  242. package/components/ScatterPlot/styles.js +0 -53
  243. package/components/ScatterPlot/styles.js.map +0 -1
  244. package/components/ScatterPlot/types.js +0 -24
  245. package/components/ScatterPlot/types.js.map +0 -1
  246. package/components/ScatterPlot/utils.js +0 -70
  247. package/components/ScatterPlot/utils.js.map +0 -1
  248. package/config.js +0 -15
  249. package/config.js.map +0 -1
  250. package/design-system/src/react-aria/react-aria/i18n/useMessageFormatter.d.ts +0 -5
  251. package/hooks/useBrush.d.ts +0 -17
  252. package/hooks/useBrush.js +0 -48
  253. package/hooks/useBrush.js.map +0 -1
  254. package/hooks/useColor.d.ts +0 -18
  255. package/hooks/useColor.js +0 -20
  256. package/hooks/useColor.js.map +0 -1
  257. package/hooks/useFormatCategoricalData.d.ts +0 -26
  258. package/hooks/useZoom.d.ts +0 -26
  259. package/hooks/useZoom.js +0 -39
  260. package/hooks/useZoom.js.map +0 -1
  261. package/index.d.ts +0 -51
  262. package/scheme.d.ts +0 -32
  263. package/scheme.js.map +0 -1
  264. package/types/legend.d.ts +0 -30
  265. package/types/legend.js.map +0 -1
  266. package/types/scale.d.ts +0 -48
  267. package/types/size.d.ts +0 -20
  268. package/types/size.js +0 -8
  269. package/types/size.js.map +0 -1
  270. package/types/theme.d.ts +0 -23
  271. package/types/theme.js +0 -13
  272. package/types/theme.js.map +0 -1
  273. package/utils/index.d.ts +0 -11
  274. package/utils/index.js.map +0 -1
  275. /package/{_virtual → _internal}/_rollupPluginBabelHelpers.js.map +0 -0
@@ -89,5 +89,5 @@ function _toPropertyKey(arg) {
89
89
  return typeof key === "symbol" ? key : String(key);
90
90
  }
91
91
 
92
- export { _defineProperty as defineProperty, _extends as extends, _objectSpread2 as objectSpread2, _objectWithoutProperties as objectWithoutProperties, _objectWithoutPropertiesLoose as objectWithoutPropertiesLoose, _toPrimitive as toPrimitive, _toPropertyKey as toPropertyKey };
92
+ export { _objectWithoutProperties as _, _extends as a, _objectSpread2 as b };
93
93
  //# sourceMappingURL=_rollupPluginBabelHelpers.js.map
@@ -0,0 +1,13 @@
1
+ import { L as Lt } from '../index2.js';
2
+
3
+ const config = (() => ({
4
+ config: {
5
+ duration: 700,
6
+ easing: Lt.easeInOutQuad
7
+ },
8
+ reset: true,
9
+ immediate: false
10
+ }))();
11
+
12
+ export { config as c };
13
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sources":["../../src/config.ts"],"sourcesContent":["import { easings } from '@react-spring/web';\n\nexport const config = (() => ({\n config: {\n duration: 700,\n easing: easings.easeInOutQuad,\n },\n reset: true,\n immediate: false,\n}))();\n"],"names":["config","duration","easing","easings","easeInOutQuad","reset","immediate"],"mappings":";;AAEaA,MAAAA,MAAM,GAAG,CAAC,OAAO;AAC5BA,EAAAA,MAAM,EAAE;AACNC,IAAAA,QAAQ,EAAE,GAAG;IACbC,MAAM,EAAEC,EAAO,CAACC,aAAAA;GACjB;AACDC,EAAAA,KAAK,EAAE,IAAI;AACXC,EAAAA,SAAS,EAAE,KAAA;AACb,CAAC,CAAC;;;;"}
@@ -69,4 +69,4 @@ type LegendItemDatum = {
69
69
  data: Statistic;
70
70
  };
71
71
 
72
- export { ArcDatum, BarDatum, CategoricalOrLinearDim, CategoryData, CategoryDatum, CategoryDim, CoordinatesCategoryData, CoordinatesCategoryDatum, CoordinatesCategoryDim, Datum, DotDatum, EmptyDatum, JSONArray, JSONObject, JSONValue, LegendItemDatum, LinePointDatum, LinearData, LinearDatum, LinearDim, Statistic, Statistics, TwoCategoryData, TwoCategoryDatum, TwoCategoryDim };
72
+ export { ArcDatum as A, BarDatum as B, CategoryData as C, Datum as D, EmptyDatum as E, JSONArray as J, LinearDim as L, Statistic as S, TwoCategoryDim as T, JSONObject as a, JSONValue as b, CategoryDim as c, CategoricalOrLinearDim as d, CoordinatesCategoryDim as e, CategoryDatum as f, LinearDatum as g, TwoCategoryDatum as h, CoordinatesCategoryDatum as i, LinearData as j, TwoCategoryData as k, CoordinatesCategoryData as l, DotDatum as m, LinePointDatum as n, Statistics as o, LegendItemDatum as p };
@@ -17,5 +17,5 @@ const LegendVariant = {
17
17
  };
18
18
  const LabelVariant = LegendVariant;
19
19
 
20
- export { LabelVariant, LegendVariant, TooltipVariant };
21
- //# sourceMappingURL=legend.js.map
20
+ export { LegendVariant as L, TooltipVariant as T, LabelVariant as a };
21
+ //# sourceMappingURL=legend2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legend2.js","sources":["../../src/types/legend.ts"],"sourcesContent":["import { ValueOf } from '@redsift/design-system';\n\n/** TOOLTIP */\n\nexport const TooltipVariant = {\n none: 'none',\n label: 'label',\n value: 'value',\n percent: 'percent',\n custom: 'custom',\n};\nexport type TooltipVariant = ValueOf<typeof TooltipVariant>;\n\n/** LEGEND */\nexport const LegendVariant = {\n none: 'none',\n label: 'label',\n value: 'value',\n percent: 'percent',\n custom: 'custom',\n} as const;\nexport const LabelVariant = LegendVariant;\nexport type LegendVariant = ValueOf<typeof LegendVariant>;\nexport type LabelVariant = LegendVariant;\n"],"names":["TooltipVariant","none","label","value","percent","custom","LegendVariant","LabelVariant"],"mappings":"AAEA;;AAEO,MAAMA,cAAc,GAAG;AAC5BC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,MAAM,EAAE,QAAA;AACV,EAAC;AAGD;AACO,MAAMC,aAAa,GAAG;AAC3BL,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,MAAM,EAAE,QAAA;AACV,EAAU;AACH,MAAME,YAAY,GAAGD;;;;"}
@@ -1,6 +1,7 @@
1
1
  import { ComponentProps } from 'react';
2
2
  import { ValueOf, Theme } from '@redsift/design-system';
3
- import { AnyScale, NumericValue, StringValue, ScaleValue, TicksSpec } from '../../types/scale.js';
3
+ import { CountableTimeInterval } from 'd3';
4
+ import { ScaleLinear as ScaleLinear$1, ScaleLogarithmic, ScaleSymLog, ScalePoint as ScalePoint$1, ScaleBand as ScaleBand$1, ScaleTime as ScaleTime$1 } from 'd3-scale';
4
5
 
5
6
  /**
6
7
  * Component variant.
@@ -86,4 +87,48 @@ type StyledAxisProps = Omit<AxisProps, 'areXLabelsRotated' | 'size' | 'scale'> &
86
87
  $color?: string;
87
88
  };
88
89
 
89
- export { AxisPosition, AxisProps, AxisVariant, StyledAxisProps };
90
+ type Coordinates = {
91
+ x: number;
92
+ y: number;
93
+ };
94
+ type NumericValue = {
95
+ valueOf(): number;
96
+ };
97
+ type StringValue = {
98
+ toString(): string;
99
+ };
100
+ type ScaleValue = NumericValue | StringValue | Date;
101
+ interface ScaleLinear<Output> extends ScaleLinear$1<number, Output, never> {
102
+ type: 'linear';
103
+ stacked: boolean;
104
+ }
105
+ interface ScaleLog extends ScaleLogarithmic<number, number> {
106
+ type: 'log';
107
+ }
108
+ interface ScaleSymlog extends ScaleSymLog<number, number> {
109
+ type: 'symlog';
110
+ }
111
+ interface ScalePoint<Input extends StringValue> extends ScalePoint$1<Input> {
112
+ type: 'point';
113
+ }
114
+ interface ScaleBand<Input extends StringValue> extends ScaleBand$1<Input> {
115
+ type: 'band';
116
+ }
117
+ interface ScaleTime<Input> extends ScaleTime$1<Input, number> {
118
+ type: 'time';
119
+ useUTC: boolean;
120
+ }
121
+ interface ScaleTypeToScale<Input, Output> {
122
+ linear: Input extends NumericValue ? ScaleLinear<Output> : never;
123
+ log: Input extends NumericValue ? ScaleLog : never;
124
+ symlog: Input extends NumericValue ? ScaleSymlog : never;
125
+ point: Input extends StringValue ? ScalePoint<Input> : never;
126
+ band: Input extends StringValue ? ScaleBand<Input> : never;
127
+ time: Input extends StringValue | Date ? ScaleTime<Input> : never;
128
+ }
129
+ type Scale<Input, Output> = ScaleTypeToScale<Input, Output>[keyof ScaleTypeToScale<Input, Output>];
130
+ type AnyScale = Scale<any, any>;
131
+ type ScaleWithBandwidth = ScaleBand<any> | ScalePoint<any>;
132
+ type TicksSpec = number | string | ScaleValue[] | CountableTimeInterval;
133
+
134
+ export { AnyScale as A, Coordinates as C, NumericValue as N, StringValue as S, TicksSpec as T, ScaleValue as a, ScaleLinear as b, ScaleLog as c, ScaleSymlog as d, ScalePoint as e, ScaleBand as f, ScaleTime as g, ScaleTypeToScale as h, Scale as i, ScaleWithBandwidth as j, AxisVariant as k, AxisPosition as l, AxisProps as m, StyledAxisProps as n };
@@ -43,5 +43,5 @@ const getColorScale = _ref => {
43
43
  return d3colors;
44
44
  };
45
45
 
46
- export { empty, getColorScale, monochrome, scheme, successDangerScheme };
46
+ export { successDangerScheme as a, empty as e, getColorScale as g, monochrome as m, scheme as s };
47
47
  //# sourceMappingURL=scheme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scheme.js","sources":["../../src/scheme.ts"],"sourcesContent":["import { scaleOrdinal as d3scaleOrdinal, ScaleOrdinal as d3ScaleOrdinal } from 'd3';\nimport { ChartTheme } from './types';\n\nimport {\n RedsiftColorPresentationAquaDark,\n RedsiftColorPresentationAquaDarker,\n RedsiftColorPresentationAquaDarkerer,\n RedsiftColorPresentationAquaDefault,\n RedsiftColorPresentationAquaLight,\n RedsiftColorPresentationAquaLighter,\n RedsiftColorPresentationAquaLighterer,\n RedsiftColorPresentationBlueDark,\n RedsiftColorPresentationBlueDarker,\n RedsiftColorPresentationBlueDarkerer,\n RedsiftColorPresentationBlueDefault,\n RedsiftColorPresentationBlueLight,\n RedsiftColorPresentationBlueLighter,\n RedsiftColorPresentationBlueLighterer,\n RedsiftColorPresentationBrownDark,\n RedsiftColorPresentationBrownDarker,\n RedsiftColorPresentationBrownDarkerer,\n RedsiftColorPresentationBrownDefault,\n RedsiftColorPresentationBrownLight,\n RedsiftColorPresentationBrownLighter,\n RedsiftColorPresentationBrownLighterer,\n RedsiftColorPresentationGreenDark,\n RedsiftColorPresentationGreenDarker,\n RedsiftColorPresentationGreenDarkerer,\n RedsiftColorPresentationGreenDefault,\n RedsiftColorPresentationGreenLight,\n RedsiftColorPresentationGreenLighter,\n RedsiftColorPresentationGreenLighterer,\n RedsiftColorPresentationGreyDark,\n RedsiftColorPresentationGreyDarker,\n RedsiftColorPresentationGreyDarkerer,\n RedsiftColorPresentationGreyDefault,\n RedsiftColorPresentationGreyLight,\n RedsiftColorPresentationGreyLighter,\n RedsiftColorPresentationGreyLighterer,\n RedsiftColorPresentationOrangeDark,\n RedsiftColorPresentationOrangeDarker,\n RedsiftColorPresentationOrangeDarkerer,\n RedsiftColorPresentationOrangeDefault,\n RedsiftColorPresentationOrangeLight,\n RedsiftColorPresentationOrangeLighter,\n RedsiftColorPresentationOrangeLighterer,\n RedsiftColorPresentationPinkDark,\n RedsiftColorPresentationPinkDarker,\n RedsiftColorPresentationPinkDarkerer,\n RedsiftColorPresentationPinkDefault,\n RedsiftColorPresentationPinkLight,\n RedsiftColorPresentationPinkLighter,\n RedsiftColorPresentationPinkLighterer,\n RedsiftColorPresentationPurpleDark,\n RedsiftColorPresentationPurpleDarker,\n RedsiftColorPresentationPurpleDarkerer,\n RedsiftColorPresentationPurpleDefault,\n RedsiftColorPresentationPurpleLight,\n RedsiftColorPresentationPurpleLighter,\n RedsiftColorPresentationPurpleLighterer,\n RedsiftColorPresentationRedDark,\n RedsiftColorPresentationRedDarker,\n RedsiftColorPresentationRedDarkerer,\n RedsiftColorPresentationRedDefault,\n RedsiftColorPresentationRedLight,\n RedsiftColorPresentationRedLighter,\n RedsiftColorPresentationRedLighterer,\n RedsiftColorPresentationYellowDark,\n RedsiftColorPresentationYellowDarker,\n RedsiftColorPresentationYellowDarkerer,\n RedsiftColorPresentationYellowDefault,\n RedsiftColorPresentationYellowLight,\n RedsiftColorPresentationYellowLighter,\n RedsiftColorPresentationYellowLighterer,\n Theme,\n} from '@redsift/design-system';\n\nexport const monochrome = RedsiftColorPresentationBlueDefault;\nexport const empty = RedsiftColorPresentationGreyDark;\n\nexport const scheme = {\n default: [\n RedsiftColorPresentationBlueDefault,\n RedsiftColorPresentationAquaDefault,\n RedsiftColorPresentationPinkDefault,\n RedsiftColorPresentationGreyDefault,\n RedsiftColorPresentationYellowDefault,\n RedsiftColorPresentationPurpleDefault,\n RedsiftColorPresentationGreenDefault,\n RedsiftColorPresentationBrownDefault,\n RedsiftColorPresentationRedDefault,\n RedsiftColorPresentationOrangeDefault,\n ],\n dark: [\n RedsiftColorPresentationGreenDark,\n RedsiftColorPresentationPinkDark,\n RedsiftColorPresentationAquaDark,\n RedsiftColorPresentationBrownDark,\n RedsiftColorPresentationRedDark,\n RedsiftColorPresentationYellowDark,\n RedsiftColorPresentationPurpleDark,\n RedsiftColorPresentationOrangeDark,\n RedsiftColorPresentationBlueDark,\n RedsiftColorPresentationGreyDark,\n ],\n darker: [\n RedsiftColorPresentationGreenDarker,\n RedsiftColorPresentationPinkDarker,\n RedsiftColorPresentationAquaDarker,\n RedsiftColorPresentationBrownDarker,\n RedsiftColorPresentationRedDarker,\n RedsiftColorPresentationYellowDarker,\n RedsiftColorPresentationPurpleDarker,\n RedsiftColorPresentationOrangeDarker,\n RedsiftColorPresentationBlueDarker,\n RedsiftColorPresentationGreyDarker,\n ],\n darkerer: [\n RedsiftColorPresentationGreenDarkerer,\n RedsiftColorPresentationPinkDarkerer,\n RedsiftColorPresentationAquaDarkerer,\n RedsiftColorPresentationBrownDarkerer,\n RedsiftColorPresentationRedDarkerer,\n RedsiftColorPresentationYellowDarkerer,\n RedsiftColorPresentationPurpleDarkerer,\n RedsiftColorPresentationOrangeDarkerer,\n RedsiftColorPresentationBlueDarkerer,\n RedsiftColorPresentationGreyDarkerer,\n ],\n light: [\n RedsiftColorPresentationGreenLight,\n RedsiftColorPresentationPinkLight,\n RedsiftColorPresentationAquaLight,\n RedsiftColorPresentationBrownLight,\n RedsiftColorPresentationRedLight,\n RedsiftColorPresentationYellowLight,\n RedsiftColorPresentationPurpleLight,\n RedsiftColorPresentationOrangeLight,\n RedsiftColorPresentationBlueLight,\n RedsiftColorPresentationGreyLight,\n ],\n lighter: [\n RedsiftColorPresentationGreenLighter,\n RedsiftColorPresentationPinkLighter,\n RedsiftColorPresentationAquaLighter,\n RedsiftColorPresentationBrownLighter,\n RedsiftColorPresentationRedLighter,\n RedsiftColorPresentationYellowLighter,\n RedsiftColorPresentationPurpleLighter,\n RedsiftColorPresentationOrangeLighter,\n RedsiftColorPresentationBlueLighter,\n RedsiftColorPresentationGreyLighter,\n ],\n lighterer: [\n RedsiftColorPresentationGreenLighterer,\n RedsiftColorPresentationPinkLighterer,\n RedsiftColorPresentationAquaLighterer,\n RedsiftColorPresentationBrownLighterer,\n RedsiftColorPresentationRedLighterer,\n RedsiftColorPresentationYellowLighterer,\n RedsiftColorPresentationPurpleLighterer,\n RedsiftColorPresentationOrangeLighterer,\n RedsiftColorPresentationBlueLighterer,\n RedsiftColorPresentationGreyLighterer,\n ],\n monochrome: [monochrome],\n empty: [empty],\n};\n\nexport const successDangerScheme = {\n success: RedsiftColorPresentationGreenDefault,\n warning: RedsiftColorPresentationOrangeDefault,\n danger: RedsiftColorPresentationRedDefault,\n neutralLight: RedsiftColorPresentationGreyDefault,\n neutralDark: RedsiftColorPresentationGreyDarkerer,\n};\n\nexport const getColorScale = ({\n colorTheme,\n domain,\n isEmpty,\n theme,\n}: {\n colorTheme: ChartTheme;\n domain?: string[];\n isEmpty?: boolean;\n theme: Theme;\n}): d3ScaleOrdinal<string, string> => {\n let d3colors = d3scaleOrdinal(scheme.default);\n\n if (isEmpty) {\n d3colors = d3scaleOrdinal(scheme.empty);\n } else if (typeof colorTheme === 'string') {\n d3colors = d3scaleOrdinal().domain(domain!).range(scheme[colorTheme]).unknown(monochrome) as d3ScaleOrdinal<\n string,\n string\n >;\n } else if (typeof colorTheme === 'object') {\n if (\n Object.keys(colorTheme).includes('success') ||\n Object.keys(colorTheme).includes('danger') ||\n Object.keys(colorTheme).includes('warning')\n ) {\n d3colors = d3scaleOrdinal()\n .domain([\n ...(colorTheme.success ? [colorTheme.success] : []),\n ...(colorTheme.warning ? [colorTheme.warning] : []),\n ...(colorTheme.danger ? [colorTheme.danger] : []),\n ...(colorTheme.neutral ? [colorTheme.neutral] : []),\n ])\n .range([\n ...(colorTheme.success ? [successDangerScheme.success] : []),\n ...(colorTheme.warning ? [successDangerScheme.warning] : []),\n ...(colorTheme.danger ? [successDangerScheme.danger] : []),\n ...(colorTheme.neutral\n ? [theme === Theme.dark ? successDangerScheme.neutralDark : successDangerScheme.neutralLight]\n : []),\n ])\n .unknown(monochrome) as d3ScaleOrdinal<string, string>;\n } else {\n d3colors = d3scaleOrdinal()\n .domain(Object.keys(colorTheme))\n .range(Object.values(colorTheme))\n .unknown(monochrome) as d3ScaleOrdinal<string, string>;\n }\n }\n\n return d3colors;\n};\n"],"names":["monochrome","RedsiftColorPresentationBlueDefault","empty","RedsiftColorPresentationGreyDark","scheme","default","RedsiftColorPresentationAquaDefault","RedsiftColorPresentationPinkDefault","RedsiftColorPresentationGreyDefault","RedsiftColorPresentationYellowDefault","RedsiftColorPresentationPurpleDefault","RedsiftColorPresentationGreenDefault","RedsiftColorPresentationBrownDefault","RedsiftColorPresentationRedDefault","RedsiftColorPresentationOrangeDefault","dark","RedsiftColorPresentationGreenDark","RedsiftColorPresentationPinkDark","RedsiftColorPresentationAquaDark","RedsiftColorPresentationBrownDark","RedsiftColorPresentationRedDark","RedsiftColorPresentationYellowDark","RedsiftColorPresentationPurpleDark","RedsiftColorPresentationOrangeDark","RedsiftColorPresentationBlueDark","darker","RedsiftColorPresentationGreenDarker","RedsiftColorPresentationPinkDarker","RedsiftColorPresentationAquaDarker","RedsiftColorPresentationBrownDarker","RedsiftColorPresentationRedDarker","RedsiftColorPresentationYellowDarker","RedsiftColorPresentationPurpleDarker","RedsiftColorPresentationOrangeDarker","RedsiftColorPresentationBlueDarker","RedsiftColorPresentationGreyDarker","darkerer","RedsiftColorPresentationGreenDarkerer","RedsiftColorPresentationPinkDarkerer","RedsiftColorPresentationAquaDarkerer","RedsiftColorPresentationBrownDarkerer","RedsiftColorPresentationRedDarkerer","RedsiftColorPresentationYellowDarkerer","RedsiftColorPresentationPurpleDarkerer","RedsiftColorPresentationOrangeDarkerer","RedsiftColorPresentationBlueDarkerer","RedsiftColorPresentationGreyDarkerer","light","RedsiftColorPresentationGreenLight","RedsiftColorPresentationPinkLight","RedsiftColorPresentationAquaLight","RedsiftColorPresentationBrownLight","RedsiftColorPresentationRedLight","RedsiftColorPresentationYellowLight","RedsiftColorPresentationPurpleLight","RedsiftColorPresentationOrangeLight","RedsiftColorPresentationBlueLight","RedsiftColorPresentationGreyLight","lighter","RedsiftColorPresentationGreenLighter","RedsiftColorPresentationPinkLighter","RedsiftColorPresentationAquaLighter","RedsiftColorPresentationBrownLighter","RedsiftColorPresentationRedLighter","RedsiftColorPresentationYellowLighter","RedsiftColorPresentationPurpleLighter","RedsiftColorPresentationOrangeLighter","RedsiftColorPresentationBlueLighter","RedsiftColorPresentationGreyLighter","lighterer","RedsiftColorPresentationGreenLighterer","RedsiftColorPresentationPinkLighterer","RedsiftColorPresentationAquaLighterer","RedsiftColorPresentationBrownLighterer","RedsiftColorPresentationRedLighterer","RedsiftColorPresentationYellowLighterer","RedsiftColorPresentationPurpleLighterer","RedsiftColorPresentationOrangeLighterer","RedsiftColorPresentationBlueLighterer","RedsiftColorPresentationGreyLighterer","successDangerScheme","success","warning","danger","neutralLight","neutralDark","getColorScale","_ref","colorTheme","domain","isEmpty","theme","d3colors","d3scaleOrdinal","range","unknown","Object","keys","includes","neutral","Theme","values"],"mappings":"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"}
@@ -1,8 +1,10 @@
1
- import * as styled_components from 'styled-components';
2
- import { ArcProps } from './types.js';
3
1
  import * as _redsift_design_system from '@redsift/design-system';
4
- import { Theme } from '@redsift/design-system';
5
- import { DataPointProps } from '../DataPoint/types.js';
2
+ import { Comp, Theme } from '@redsift/design-system';
3
+ import { A as ArcProps } from './types.js';
4
+ import * as styled_components from 'styled-components';
5
+ import { D as DataPointProps } from './types4.js';
6
+
7
+ declare const Arc: Comp<ArcProps, SVGGElement>;
6
8
 
7
9
  /**
8
10
  * Component style.
@@ -14,4 +16,4 @@ declare const StyledArc: styled_components.StyledComponent<_redsift_design_syste
14
16
  $theme: Theme;
15
17
  }, never>;
16
18
 
17
- export { StyledArc };
19
+ export { Arc as A, StyledArc as S };
@@ -1,14 +1,16 @@
1
- import { Line } from 'd3';
1
+ import { Comp } from '@redsift/design-system';
2
+ import * as styled_components from 'styled-components';
3
+ import { Line as Line$1 } from 'd3';
2
4
  import { ComponentProps } from 'react';
3
- import { DotProps } from '../Dot/types.js';
4
- import { LinePointDatum } from '../../types/data.js';
5
+ import { a as DotProps } from './types5.js';
6
+ import { n as LinePointDatum } from './data.js';
5
7
 
6
8
  /**
7
9
  * Component props.
8
10
  */
9
11
  interface LineProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'>, Pick<DotProps, 'id' | 'isSelected' | 'role'> {
10
12
  /** Line generator used to determine the path of the line. */
11
- createLine: Line<LinePointDatum>;
13
+ createLine: Line$1<LinePointDatum>;
12
14
  /** Points used to compute the line path. */
13
15
  data: LinePointDatum[];
14
16
  /** Disable animations. */
@@ -18,4 +20,11 @@ interface LineProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'>, Pick<
18
20
  }
19
21
  type StyledLineProps = Omit<LineProps, 'createLine' | 'data'>;
20
22
 
21
- export { LineProps, StyledLineProps };
23
+ declare const Line: Comp<LineProps, SVGGElement>;
24
+
25
+ /**
26
+ * Component style.
27
+ */
28
+ declare const StyledLine: styled_components.StyledComponent<"g", any, StyledLineProps, never>;
29
+
30
+ export { Line as L, StyledLineProps as S, LineProps as a, StyledLine as b };
@@ -1,15 +1,14 @@
1
- import { ValueOf, Theme } from '@redsift/design-system';
1
+ import * as _redsift_design_system from '@redsift/design-system';
2
+ import { ValueOf, Theme, Comp } from '@redsift/design-system';
3
+ import * as styled_components from 'styled-components';
4
+ import { C as ChartContainerProps } from './types3.js';
2
5
  import { ReactNode, ReactElement, MutableRefObject } from 'react';
3
- import { SortingMethod } from '../../utils/index.js';
4
- import { ChartDimensions, MarginProps, ChartSize } from '../../types/size.js';
5
- import { ChartContainerProps } from '../ChartContainer/types.js';
6
- import { ChartAxesProps } from '../../types/axis.js';
7
- import { TwoCategoryData, DotDatum, Statistics } from '../../types/data.js';
8
- import { DotProps } from '../Dot/types.js';
9
- import { AnchorProps } from '../DataPoint/types.js';
10
- import { LegendProps } from '../Legend/types.js';
11
- import { ChartTheme } from '../../types/theme.js';
12
- import { TooltipVariant } from '../../types/legend.js';
6
+ import { a as DotProps } from './types5.js';
7
+ import { L as LegendProps } from './types6.js';
8
+ import { a as ChartDimensions, M as MarginProps, b as ChartSize, S as SortingMethod, C as ChartTheme } from '../index2.js';
9
+ import { A as AnchorProps, T as TooltipVariant } from './types4.js';
10
+ import { C as ChartAxesProps } from './axis2.js';
11
+ import { k as TwoCategoryData, m as DotDatum, o as Statistics } from './data.js';
13
12
 
14
13
  /**
15
14
  * Component's labels variant.
@@ -87,4 +86,16 @@ interface LineChartProps extends ChartContainerProps, ChartAxesProps {
87
86
  }
88
87
  type StyledLineChartProps = LineChartProps & {};
89
88
 
90
- export { LineChartDimensions, LineChartLegendVariant, LineChartProps, StyledLineChartProps };
89
+ declare const LineChart: Comp<LineChartProps, HTMLDivElement>;
90
+
91
+ /**
92
+ * Component style.
93
+ */
94
+ declare const StyledLineChart: styled_components.StyledComponent<_redsift_design_system.Comp<ChartContainerProps, HTMLDivElement>, any, LineChartProps, never>;
95
+ declare const StyledLineChartEmptyText: styled_components.StyledComponent<"div", any, {
96
+ $maxWidth: number;
97
+ $textSize: number;
98
+ $theme: Theme;
99
+ }, never>;
100
+
101
+ export { LineChart as L, StyledLineChartProps as S, LineChartLegendVariant as a, LineChartDimensions as b, LineChartProps as c, StyledLineChart as d, StyledLineChartEmptyText as e };
@@ -1,15 +1,14 @@
1
+ import * as _redsift_design_system from '@redsift/design-system';
2
+ import { ValueOf, Theme, Comp } from '@redsift/design-system';
3
+ import * as styled_components from 'styled-components';
1
4
  import { ReactNode, ReactElement, ComponentProps } from 'react';
2
5
  import { PieArcDatum } from 'd3-shape';
3
- import { ValueOf, Theme } from '@redsift/design-system';
4
- import { SortingMethod } from '../../utils/index.js';
5
- import { ArcProps } from '../Arc/types.js';
6
- import { ChartDimensions, ChartSize } from '../../types/size.js';
7
- import { ChartContainerProps } from '../ChartContainer/types.js';
8
- import { CategoryData, ArcDatum, Statistics, CategoryDatum } from '../../types/data.js';
9
- import { AnchorProps } from '../DataPoint/types.js';
10
- import { LegendProps } from '../Legend/types.js';
11
- import { ChartTheme } from '../../types/theme.js';
12
- import { TooltipVariant } from '../../types/legend.js';
6
+ import { A as ArcProps } from './types.js';
7
+ import { C as ChartContainerProps } from './types3.js';
8
+ import { L as LegendProps } from './types6.js';
9
+ import { a as ChartDimensions, b as ChartSize, S as SortingMethod, C as ChartTheme } from '../index2.js';
10
+ import { A as AnchorProps, T as TooltipVariant } from './types4.js';
11
+ import { C as CategoryData, A as ArcDatum, o as Statistics, f as CategoryDatum } from './data.js';
13
12
 
14
13
  /**
15
14
  * Component variant.
@@ -112,4 +111,23 @@ interface PieChartProps extends ChartContainerProps {
112
111
  }
113
112
  type StyledPieChartProps = PieChartProps & {};
114
113
 
115
- export { PieChartDimensions, PieChartLegendVariant, PieChartProps, PieChartVariant, StyledPieChartProps };
114
+ declare const PieChart: Comp<PieChartProps, HTMLDivElement>;
115
+
116
+ /**
117
+ * Component style.
118
+ */
119
+ declare const StyledPieChart: styled_components.StyledComponent<_redsift_design_system.Comp<ChartContainerProps, HTMLDivElement>, any, PieChartProps, never>;
120
+ declare const StyledPieChartCenterText: styled_components.StyledComponent<"div", any, {
121
+ $maxWidth: number;
122
+ $textSize: number;
123
+ $smallTextSize: number;
124
+ $theme: Theme;
125
+ }, never>;
126
+ declare const StyledPieChartEmptyText: styled_components.StyledComponent<"div", any, {
127
+ $maxWidth: number;
128
+ $textSize: number;
129
+ $isDonut: boolean;
130
+ $theme: Theme;
131
+ }, never>;
132
+
133
+ export { PieChart as P, StyledPieChartProps as S, PieChartVariant as a, PieChartLegendVariant as b, PieChartDimensions as c, PieChartProps as d, StyledPieChart as e, StyledPieChartCenterText as f, StyledPieChartEmptyText as g };
@@ -1,16 +1,15 @@
1
- import { ValueOf, Theme } from '@redsift/design-system';
1
+ import * as _redsift_design_system from '@redsift/design-system';
2
+ import { ValueOf, Theme, Comp } from '@redsift/design-system';
3
+ import * as styled_components from 'styled-components';
4
+ import { C as ChartContainerProps } from './types3.js';
2
5
  import { ReactNode, ReactElement, MutableRefObject } from 'react';
6
+ import { a as DotProps } from './types5.js';
3
7
  import { ScaleLinear } from 'd3';
4
- import { SortingMethod } from '../../utils/index.js';
5
- import { CoordinatesCategoryData, DotDatum, Statistics } from '../../types/data.js';
6
- import { ChartDimensions, MarginProps, ChartSize } from '../../types/size.js';
7
- import { ChartContainerProps } from '../ChartContainer/types.js';
8
- import { ChartAxesProps } from '../../types/axis.js';
9
- import { AnchorProps } from '../DataPoint/types.js';
10
- import { DotProps } from '../Dot/types.js';
11
- import { LegendProps } from '../Legend/types.js';
12
- import { ChartTheme } from '../../types/theme.js';
13
- import { TooltipVariant } from '../../types/legend.js';
8
+ import { L as LegendProps } from './types6.js';
9
+ import { a as ChartDimensions, M as MarginProps, b as ChartSize, S as SortingMethod, C as ChartTheme } from '../index2.js';
10
+ import { A as AnchorProps, T as TooltipVariant } from './types4.js';
11
+ import { l as CoordinatesCategoryData, m as DotDatum, o as Statistics } from './data.js';
12
+ import { C as ChartAxesProps } from './axis2.js';
14
13
 
15
14
  /**
16
15
  * Component variant.
@@ -106,4 +105,16 @@ interface ScatterPlotProps extends ChartContainerProps, ChartAxesProps {
106
105
  }
107
106
  type StyledScatterPlotProps = ScatterPlotProps & {};
108
107
 
109
- export { ScatterPlotDimensions, ScatterPlotLegendVariant, ScatterPlotProps, ScatterPlotVariant, StyledScatterPlotProps };
108
+ declare const ScatterPlot: Comp<ScatterPlotProps, HTMLDivElement>;
109
+
110
+ /**
111
+ * Component style.
112
+ */
113
+ declare const StyledScatterPlot: styled_components.StyledComponent<_redsift_design_system.Comp<ChartContainerProps, HTMLDivElement>, any, ScatterPlotProps, never>;
114
+ declare const StyledScatterPlotEmptyText: styled_components.StyledComponent<"div", any, {
115
+ $maxWidth: number;
116
+ $textSize: number;
117
+ $theme: Theme;
118
+ }, never>;
119
+
120
+ export { ScatterPlot as S, ScatterPlotVariant as a, ScatterPlotLegendVariant as b, ScatterPlotDimensions as c, ScatterPlotProps as d, StyledScatterPlotProps as e, StyledScatterPlot as f, StyledScatterPlotEmptyText as g };
@@ -1,5 +1,7 @@
1
+ import { Comp } from '@redsift/design-system';
2
+ import * as styled_components from 'styled-components';
1
3
  import { ComponentProps } from 'react';
2
- import { ArcProps } from '../Arc/types.js';
4
+ import { A as ArcProps } from './types.js';
3
5
 
4
6
  /**
5
7
  * Component props.
@@ -14,4 +16,11 @@ interface ArcsProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'>, Pick<
14
16
  }
15
17
  type StyledArcsProps = Omit<ArcsProps, 'arcs'> & {};
16
18
 
17
- export { ArcsProps, StyledArcsProps };
19
+ declare const Arcs: Comp<ArcsProps, SVGGElement>;
20
+
21
+ /**
22
+ * Component style.
23
+ */
24
+ declare const StyledArcs: styled_components.StyledComponent<"g", any, Omit<ArcsProps, "arcs">, never>;
25
+
26
+ export { Arcs as A, StyledArcsProps as S, ArcsProps as a, StyledArcs as b };
@@ -1,7 +1,10 @@
1
+ import { Comp, Theme } from '@redsift/design-system';
2
+ import { l as AxisPosition, m as AxisProps } from './scale.js';
1
3
  import * as styled_components from 'styled-components';
2
- import { AxisProps } from './types.js';
3
4
  import * as _react_spring_web from '@react-spring/web';
4
- import { Theme } from '@redsift/design-system';
5
+
6
+ declare const getAxisType: (position: AxisPosition) => "x" | "y";
7
+ declare const Axis: Comp<AxisProps, SVGGElement>;
5
8
 
6
9
  /**
7
10
  * Component style.
@@ -11,4 +14,4 @@ declare const StyledAxis: styled_components.StyledComponent<_react_spring_web.An
11
14
  $color?: string | undefined;
12
15
  }, never>;
13
16
 
14
- export { StyledAxis };
17
+ export { Axis as A, StyledAxis as S, getAxisType as g };
@@ -1,8 +1,10 @@
1
- import * as styled_components from 'styled-components';
2
- import { BarProps } from './types.js';
3
1
  import * as _redsift_design_system from '@redsift/design-system';
4
- import { Theme } from '@redsift/design-system';
5
- import { DataPointProps } from '../DataPoint/types.js';
2
+ import { Comp, Theme } from '@redsift/design-system';
3
+ import { b as BarProps } from './types2.js';
4
+ import * as styled_components from 'styled-components';
5
+ import { D as DataPointProps } from './types4.js';
6
+
7
+ declare const Bar: Comp<BarProps, SVGGElement>;
6
8
 
7
9
  /**
8
10
  * Component style.
@@ -13,4 +15,4 @@ declare const StyledBar: styled_components.StyledComponent<_redsift_design_syste
13
15
  $theme: Theme;
14
16
  }, never>;
15
17
 
16
- export { StyledBar };
18
+ export { Bar as B, StyledBar as S };
@@ -1,17 +1,21 @@
1
- import { ComponentProps, ReactNode, ReactElement } from 'react';
1
+ import { C as ChartContainerProps } from './types3.js';
2
+ import { L as LegendItemProps } from './types7.js';
3
+ import { L as LegendProps } from './types6.js';
4
+ import { m as AxisProps } from './scale.js';
5
+ import React$1, { ComponentProps, ReactNode, ReactElement } from 'react';
6
+ import * as _redsift_design_system from '@redsift/design-system';
7
+ import { ValueOf, Theme, Comp } from '@redsift/design-system';
8
+ import { C as CategoryData, j as LinearData, k as TwoCategoryData, B as BarDatum, o as Statistics, L as LinearDim } from './data.js';
9
+ import * as styled_components from 'styled-components';
2
10
  import { ScaleOrdinal, ScaleLinear, ScaleTime, ScalePoint } from 'd3';
3
- import { SortingMethod } from '../../utils/index.js';
4
- import { ValueOf, Theme } from '@redsift/design-system';
5
- import { FormatMessage } from '../../design-system/src/react-aria/react-aria/i18n/useMessageFormatter.js';
6
- import { ChartDimensions, MarginProps, ChartSize } from '../../types/size.js';
7
- import { ChartContainerProps } from '../ChartContainer/types.js';
8
- import { ChartAxesProps } from '../../types/axis.js';
9
- import { BarProps, BarDirection, BarOrientation } from '../Bar/types.js';
10
- import { CategoryData, LinearData, TwoCategoryData, BarDatum, Statistics, LinearDim } from '../../types/data.js';
11
- import { AnchorProps } from '../DataPoint/types.js';
12
- import { LegendProps } from '../Legend/types.js';
13
- import { ChartTheme } from '../../types/theme.js';
14
- import { TooltipVariant } from '../../types/legend.js';
11
+ import { b as BarProps, a as BarDirection, B as BarOrientation } from './types2.js';
12
+ import { a as ChartDimensions, C as ChartTheme, M as MarginProps, b as ChartSize, S as SortingMethod } from '../index2.js';
13
+ import { A as AnchorProps, T as TooltipVariant } from './types4.js';
14
+ import { C as ChartAxesProps } from './axis2.js';
15
+
16
+ type FormatMessage = (key: string, variables?: {
17
+ [key: string]: any;
18
+ }) => string;
15
19
 
16
20
  /**
17
21
  * Component's labels variant.
@@ -174,4 +178,35 @@ interface BarChartBarsProps extends Omit<ComponentProps<'g'>, 'onClick' | 'role'
174
178
  }
175
179
  type StyledBarChartBarsProps = Omit<BarChartBarsProps, 'category'> & {};
176
180
 
177
- export { BarChartBarsProps, BarChartDimensions, BarChartLegendVariant, BarChartProps, BarChartSectionProps, BarChartState, ComputedBarProps, RenderedLinearBarChartProps, StyledBarChartBarsProps, StyledBarChartProps, StyledBarChartSectionProps, XScaleType };
181
+ declare const BaseBarChart: Comp<BarChartProps, HTMLDivElement>;
182
+ declare const BarChart: Comp<BarChartProps, HTMLDivElement> & {
183
+ Section: Comp<BarChartSectionProps, SVGGElement>;
184
+ Bars: Comp<BarChartBarsProps, SVGGElement>;
185
+ Axis: Comp<AxisProps, SVGGElement>;
186
+ GroupedTooltip: React$1.FC<{
187
+ dateFormatter: (date: Date) => string;
188
+ categories: string[];
189
+ categoryDecorator?: ((category: string) => string) | undefined;
190
+ categoryColor: (category: string) => string;
191
+ datum: BarDatum;
192
+ groupedData: ComputedBarProps[] | undefined;
193
+ }>;
194
+ Legend: Comp<LegendProps, HTMLUListElement>;
195
+ LegendItem: Comp<LegendItemProps, HTMLLIElement>;
196
+ Title: Comp<Pick<ChartContainerProps, "onReset"> & React$1.ClassAttributes<HTMLDivElement> & React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
197
+ Description: Comp<React$1.DetailedHTMLProps<React$1.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, HTMLDivElement>;
198
+ };
199
+
200
+ /**
201
+ * Component style.
202
+ */
203
+ declare const StyledBarChart: styled_components.StyledComponent<_redsift_design_system.Comp<ChartContainerProps, HTMLDivElement>, any, BarChartProps, never>;
204
+ declare const StyledBarChartSection: styled_components.StyledComponent<"g", any, StyledBarChartSectionProps, never>;
205
+ declare const StyledBarChartBars: styled_components.StyledComponent<"g", any, Omit<BarChartBarsProps, "category">, never>;
206
+ declare const StyledBarChartEmptyText: styled_components.StyledComponent<"div", any, {
207
+ $maxWidth: number;
208
+ $textSize: number;
209
+ $theme: Theme;
210
+ }, never>;
211
+
212
+ export { BaseBarChart as B, ComputedBarProps as C, RenderedLinearBarChartProps as R, StyledBarChartProps as S, XScaleType as X, BarChart as a, BarChartLegendVariant as b, BarChartDimensions as c, BarChartProps as d, BarChartState as e, BarChartSectionProps as f, StyledBarChartSectionProps as g, BarChartBarsProps as h, StyledBarChartBarsProps as i, StyledBarChart as j, StyledBarChartSection as k, StyledBarChartBars as l, StyledBarChartEmptyText as m };
@@ -1,7 +1,12 @@
1
+ import { ComponentProps } from 'react';
1
2
  import * as _redsift_design_system from '@redsift/design-system';
2
- import { Theme } from '@redsift/design-system';
3
+ import { Comp, Theme } from '@redsift/design-system';
4
+ import { C as ChartContainerProps, S as StyledChartContainerProps } from './types3.js';
3
5
  import * as styled_components from 'styled-components';
4
- import { ChartContainerProps, StyledChartContainerProps } from './types.js';
6
+
7
+ declare const ChartContainer: Comp<ChartContainerProps, HTMLDivElement>;
8
+ declare const ChartContainerTitle: Comp<Pick<ChartContainerProps, 'onReset'> & ComponentProps<'div'>, HTMLDivElement>;
9
+ declare const ChartContainerDescription: Comp<ComponentProps<'div'>, HTMLDivElement>;
5
10
 
6
11
  /**
7
12
  * Component style.
@@ -14,4 +19,4 @@ declare const StyledChartContainerTitle: styled_components.StyledComponent<_reds
14
19
  }, never>;
15
20
  declare const StyledChartContainerCaption: styled_components.StyledComponent<"p", any, Omit<StyledChartContainerProps, "onReset">, never>;
16
21
 
17
- export { StyledChartContainer, StyledChartContainerCaption, StyledChartContainerTitle };
22
+ export { ChartContainer as C, StyledChartContainer as S, ChartContainerTitle as a, ChartContainerDescription as b, StyledChartContainerTitle as c, StyledChartContainerCaption as d };
@@ -1,7 +1,10 @@
1
+ import { Comp } from '@redsift/design-system';
2
+ import { D as DataPointProps } from './types4.js';
1
3
  import * as styled_components from 'styled-components';
2
- import { DataPointProps } from './types.js';
3
4
  import * as _react_spring_web from '@react-spring/web';
4
5
 
6
+ declare const DataPoint: Comp<DataPointProps<any>, SVGGElement>;
7
+
5
8
  /**
6
9
  * Component style.
7
10
  */
@@ -9,4 +12,4 @@ declare const StyledDataPoint: styled_components.StyledComponent<_react_spring_w
9
12
  $clickable: boolean;
10
13
  }, never>;
11
14
 
12
- export { StyledDataPoint };
15
+ export { DataPoint as D, StyledDataPoint as S };
@@ -1,7 +1,10 @@
1
- import * as styled_components from 'styled-components';
2
- import { DotProps, DotVariant } from './types.js';
3
1
  import * as _redsift_design_system from '@redsift/design-system';
4
- import { DataPointProps } from '../DataPoint/types.js';
2
+ import { Comp } from '@redsift/design-system';
3
+ import { a as DotProps, D as DotVariant } from './types5.js';
4
+ import * as styled_components from 'styled-components';
5
+ import { D as DataPointProps } from './types4.js';
6
+
7
+ declare const Dot: Comp<DotProps, SVGGElement>;
5
8
 
6
9
  /**
7
10
  * Component style.
@@ -13,4 +16,4 @@ declare const StyledDot: styled_components.StyledComponent<_redsift_design_syste
13
16
  $theme: _redsift_design_system.Theme;
14
17
  }, never>;
15
18
 
16
- export { StyledDot };
19
+ export { Dot as D, StyledDot as S };
@@ -1,5 +1,8 @@
1
+ import { Comp } from '@redsift/design-system';
2
+ import { L as LegendProps } from './types6.js';
1
3
  import * as styled_components from 'styled-components';
2
- import { LegendProps } from './types.js';
4
+
5
+ declare const Legend: Comp<LegendProps, HTMLUListElement>;
3
6
 
4
7
  /**
5
8
  * Component style.
@@ -8,4 +11,4 @@ declare const StyledLegend: styled_components.StyledComponent<"ul", any, Omit<Le
8
11
  $width?: string | number | undefined;
9
12
  }, never>;
10
13
 
11
- export { StyledLegend };
14
+ export { Legend as L, StyledLegend as S };
@@ -1,3 +1,21 @@
1
+ import { useMemo } from 'react';
2
+ import { g as getColorScale } from './scheme.js';
3
+
4
+ const useColor = _ref => {
5
+ let {
6
+ data,
7
+ colorTheme,
8
+ category,
9
+ theme
10
+ } = _ref;
11
+ const colorScale = useMemo(() => getColorScale({
12
+ colorTheme,
13
+ domain: data.map(d => typeof category === 'string' ? d[category] : category(d)),
14
+ theme
15
+ }), [colorTheme]);
16
+ return colorScale;
17
+ };
18
+
1
19
  const getSortingMethod = sortingMethod => {
2
20
  if (sortingMethod === 'asc-key') {
3
21
  return (a, b) => a.key === b.key ? a.value > b.value ? -1 : 1 : a.key < b.key ? -1 : 1;
@@ -40,5 +58,22 @@ const mergeLegends = (arr1, arr2) => {
40
58
  });
41
59
  };
42
60
 
43
- export { getSortingMethod, isValidDate, mergeLegends };
44
- //# sourceMappingURL=index.js.map
61
+ const ChartSize = {
62
+ small: 'small',
63
+ medium: 'medium',
64
+ large: 'large'
65
+ };
66
+
67
+ const ColorTheme = {
68
+ default: 'default',
69
+ dark: 'dark',
70
+ darker: 'darker',
71
+ darkerer: 'darkerer',
72
+ light: 'light',
73
+ lighter: 'lighter',
74
+ lighterer: 'lighterer',
75
+ monochrome: 'monochrome'
76
+ };
77
+
78
+ export { ChartSize as C, ColorTheme as a, getSortingMethod as g, isValidDate as i, mergeLegends as m, useColor as u };
79
+ //# sourceMappingURL=theme.js.map