@redsift/charts 11.5.0 → 11.6.0-muiv5-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (223) hide show
  1. package/_virtual/_rollupPluginBabelHelpers.js +93 -0
  2. package/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
  3. package/components/Arc/Arc.d.ts +6 -0
  4. package/components/Arc/Arc.js +74 -0
  5. package/components/Arc/Arc.js.map +1 -0
  6. package/components/Arc/styles.d.ts +17 -0
  7. package/components/Arc/styles.js +49 -0
  8. package/components/Arc/styles.js.map +1 -0
  9. package/components/Arc/types.d.ts +20 -0
  10. package/components/Arcs/Arcs.d.ts +6 -0
  11. package/components/Arcs/Arcs.js +90 -0
  12. package/components/Arcs/Arcs.js.map +1 -0
  13. package/components/Arcs/styles.d.ts +9 -0
  14. package/components/Arcs/styles.js +9 -0
  15. package/components/Arcs/styles.js.map +1 -0
  16. package/components/Arcs/types.d.ts +17 -0
  17. package/components/Axis/Axis.d.ts +7 -0
  18. package/components/Axis/Axis.js +211 -0
  19. package/components/Axis/Axis.js.map +1 -0
  20. package/components/Axis/computeTicks.js +117 -0
  21. package/components/Axis/computeTicks.js.map +1 -0
  22. package/components/Axis/styles.d.ts +14 -0
  23. package/components/Axis/styles.js +51 -0
  24. package/components/Axis/styles.js.map +1 -0
  25. package/components/Axis/types.d.ts +89 -0
  26. package/components/Axis/types.js +24 -0
  27. package/components/Axis/types.js.map +1 -0
  28. package/components/Bar/Bar.d.ts +6 -0
  29. package/components/Bar/Bar.js +95 -0
  30. package/components/Bar/Bar.js.map +1 -0
  31. package/components/Bar/styles.d.ts +16 -0
  32. package/components/Bar/styles.js +66 -0
  33. package/components/Bar/styles.js.map +1 -0
  34. package/components/Bar/types.d.ts +46 -0
  35. package/components/Bar/types.js +18 -0
  36. package/components/Bar/types.js.map +1 -0
  37. package/components/BarChart/BarChart.d.ts +29 -0
  38. package/components/BarChart/BarChart.js +141 -0
  39. package/components/BarChart/BarChart.js.map +1 -0
  40. package/components/BarChart/BarChartBars.js +168 -0
  41. package/components/BarChart/BarChartBars.js.map +1 -0
  42. package/components/BarChart/BarChartSection.js +139 -0
  43. package/components/BarChart/BarChartSection.js.map +1 -0
  44. package/components/BarChart/EmptyBarChart.js +57 -0
  45. package/components/BarChart/EmptyBarChart.js.map +1 -0
  46. package/components/BarChart/LoadingBarChart.js +18 -0
  47. package/components/BarChart/LoadingBarChart.js.map +1 -0
  48. package/components/BarChart/RenderedLinearBarChart.js +549 -0
  49. package/components/BarChart/RenderedLinearBarChart.js.map +1 -0
  50. package/components/BarChart/RenderedOrdinalBarChart.js +236 -0
  51. package/components/BarChart/RenderedOrdinalBarChart.js.map +1 -0
  52. package/components/BarChart/context.js +13 -0
  53. package/components/BarChart/context.js.map +1 -0
  54. package/components/BarChart/intl/en-US.json.js +17 -0
  55. package/components/BarChart/intl/en-US.json.js.map +1 -0
  56. package/components/BarChart/intl/fr-FR.json.js +17 -0
  57. package/components/BarChart/intl/fr-FR.json.js.map +1 -0
  58. package/components/BarChart/intl/index.js +10 -0
  59. package/components/BarChart/intl/index.js.map +1 -0
  60. package/components/BarChart/styles.d.ts +19 -0
  61. package/components/BarChart/styles.js +71 -0
  62. package/components/BarChart/styles.js.map +1 -0
  63. package/components/BarChart/types.d.ts +177 -0
  64. package/components/BarChart/types.js +17 -0
  65. package/components/BarChart/types.js.map +1 -0
  66. package/components/BarChart/utils.js +69 -0
  67. package/components/BarChart/utils.js.map +1 -0
  68. package/components/ChartContainer/ChartContainer.d.ts +9 -0
  69. package/components/ChartContainer/ChartContainer.js +167 -0
  70. package/components/ChartContainer/ChartContainer.js.map +1 -0
  71. package/components/ChartContainer/context.js +6 -0
  72. package/components/ChartContainer/context.js.map +1 -0
  73. package/components/ChartContainer/intl/en-US.json.js +14 -0
  74. package/components/ChartContainer/intl/en-US.json.js.map +1 -0
  75. package/components/ChartContainer/intl/fr-FR.json.js +14 -0
  76. package/components/ChartContainer/intl/fr-FR.json.js.map +1 -0
  77. package/components/ChartContainer/intl/index.js +10 -0
  78. package/components/ChartContainer/intl/index.js.map +1 -0
  79. package/components/ChartContainer/styles.d.ts +17 -0
  80. package/components/ChartContainer/styles.js +76 -0
  81. package/components/ChartContainer/styles.js.map +1 -0
  82. package/components/ChartContainer/types.d.ts +48 -0
  83. package/components/DataPoint/DataPoint.d.ts +6 -0
  84. package/components/DataPoint/DataPoint.js +104 -0
  85. package/components/DataPoint/DataPoint.js.map +1 -0
  86. package/components/DataPoint/styles.d.ts +12 -0
  87. package/components/DataPoint/styles.js +10 -0
  88. package/components/DataPoint/styles.js.map +1 -0
  89. package/components/DataPoint/types.d.ts +60 -0
  90. package/components/Dot/Dot.d.ts +6 -0
  91. package/components/Dot/Dot.js +55 -0
  92. package/components/Dot/Dot.js.map +1 -0
  93. package/components/Dot/styles.d.ts +16 -0
  94. package/components/Dot/styles.js +49 -0
  95. package/components/Dot/styles.js.map +1 -0
  96. package/components/Dot/types.d.ts +30 -0
  97. package/components/Dot/types.js +14 -0
  98. package/components/Dot/types.js.map +1 -0
  99. package/components/Legend/Legend.d.ts +6 -0
  100. package/components/Legend/Legend.js +73 -0
  101. package/components/Legend/Legend.js.map +1 -0
  102. package/components/Legend/styles.d.ts +11 -0
  103. package/components/Legend/styles.js +15 -0
  104. package/components/Legend/styles.js.map +1 -0
  105. package/components/Legend/types.d.ts +44 -0
  106. package/components/LegendItem/LegendItem.js +96 -0
  107. package/components/LegendItem/LegendItem.js.map +1 -0
  108. package/components/LegendItem/styles.js +63 -0
  109. package/components/LegendItem/styles.js.map +1 -0
  110. package/components/LegendItem/types.d.ts +20 -0
  111. package/components/Line/Line.d.ts +6 -0
  112. package/components/Line/Line.js +55 -0
  113. package/components/Line/Line.js.map +1 -0
  114. package/components/Line/styles.d.ts +9 -0
  115. package/components/Line/styles.js +9 -0
  116. package/components/Line/styles.js.map +1 -0
  117. package/components/Line/types.d.ts +21 -0
  118. package/components/LineChart/EmptyLineChart.js +58 -0
  119. package/components/LineChart/EmptyLineChart.js.map +1 -0
  120. package/components/LineChart/LineChart.d.ts +6 -0
  121. package/components/LineChart/LineChart.js +96 -0
  122. package/components/LineChart/LineChart.js.map +1 -0
  123. package/components/LineChart/LoadingLineChart.js +18 -0
  124. package/components/LineChart/LoadingLineChart.js.map +1 -0
  125. package/components/LineChart/RenderedLineChart.js +372 -0
  126. package/components/LineChart/RenderedLineChart.js.map +1 -0
  127. package/components/LineChart/intl/en-US.json.js +17 -0
  128. package/components/LineChart/intl/en-US.json.js.map +1 -0
  129. package/components/LineChart/intl/fr-FR.json.js +17 -0
  130. package/components/LineChart/intl/fr-FR.json.js.map +1 -0
  131. package/components/LineChart/intl/index.js +10 -0
  132. package/components/LineChart/intl/index.js.map +1 -0
  133. package/components/LineChart/styles.d.ts +17 -0
  134. package/components/LineChart/styles.js +53 -0
  135. package/components/LineChart/styles.js.map +1 -0
  136. package/components/LineChart/types.d.ts +90 -0
  137. package/components/LineChart/types.js +17 -0
  138. package/components/LineChart/types.js.map +1 -0
  139. package/components/LineChart/utils.js +67 -0
  140. package/components/LineChart/utils.js.map +1 -0
  141. package/components/PieChart/EmptyPieChart.js +85 -0
  142. package/components/PieChart/EmptyPieChart.js.map +1 -0
  143. package/components/PieChart/LoadingPieChart.js +18 -0
  144. package/components/PieChart/LoadingPieChart.js.map +1 -0
  145. package/components/PieChart/PieChart.d.ts +6 -0
  146. package/components/PieChart/PieChart.js +98 -0
  147. package/components/PieChart/PieChart.js.map +1 -0
  148. package/components/PieChart/RenderedPieChart.js +198 -0
  149. package/components/PieChart/RenderedPieChart.js.map +1 -0
  150. package/components/PieChart/intl/en-US.json.js +9 -0
  151. package/components/PieChart/intl/en-US.json.js.map +1 -0
  152. package/components/PieChart/intl/fr-FR.json.js +9 -0
  153. package/components/PieChart/intl/fr-FR.json.js.map +1 -0
  154. package/components/PieChart/intl/index.js +10 -0
  155. package/components/PieChart/intl/index.js.map +1 -0
  156. package/components/PieChart/styles.d.ts +24 -0
  157. package/components/PieChart/styles.js +168 -0
  158. package/components/PieChart/styles.js.map +1 -0
  159. package/components/PieChart/types.d.ts +115 -0
  160. package/components/PieChart/types.js +27 -0
  161. package/components/PieChart/types.js.map +1 -0
  162. package/components/PieChart/utils.js +37 -0
  163. package/components/PieChart/utils.js.map +1 -0
  164. package/components/ScatterPlot/EmptyScatterPlot.js +58 -0
  165. package/components/ScatterPlot/EmptyScatterPlot.js.map +1 -0
  166. package/components/ScatterPlot/LoadingScatterPlot.js +18 -0
  167. package/components/ScatterPlot/LoadingScatterPlot.js.map +1 -0
  168. package/components/ScatterPlot/RenderedScatterPlot.js +352 -0
  169. package/components/ScatterPlot/RenderedScatterPlot.js.map +1 -0
  170. package/components/ScatterPlot/ScatterPlot.d.ts +6 -0
  171. package/components/ScatterPlot/ScatterPlot.js +105 -0
  172. package/components/ScatterPlot/ScatterPlot.js.map +1 -0
  173. package/components/ScatterPlot/intl/en-US.json.js +12 -0
  174. package/components/ScatterPlot/intl/en-US.json.js.map +1 -0
  175. package/components/ScatterPlot/intl/fr-FR.json.js +17 -0
  176. package/components/ScatterPlot/intl/fr-FR.json.js.map +1 -0
  177. package/components/ScatterPlot/intl/index.js +10 -0
  178. package/components/ScatterPlot/intl/index.js.map +1 -0
  179. package/components/ScatterPlot/styles.d.ts +17 -0
  180. package/components/ScatterPlot/styles.js +53 -0
  181. package/components/ScatterPlot/styles.js.map +1 -0
  182. package/components/ScatterPlot/types.d.ts +109 -0
  183. package/components/ScatterPlot/types.js +24 -0
  184. package/components/ScatterPlot/types.js.map +1 -0
  185. package/components/ScatterPlot/utils.js +70 -0
  186. package/components/ScatterPlot/utils.js.map +1 -0
  187. package/config.js +15 -0
  188. package/config.js.map +1 -0
  189. package/design-system/src/react-aria/react-aria/i18n/useMessageFormatter.d.ts +5 -0
  190. package/hooks/useBrush.d.ts +17 -0
  191. package/hooks/useBrush.js +48 -0
  192. package/hooks/useBrush.js.map +1 -0
  193. package/hooks/useColor.d.ts +18 -0
  194. package/hooks/useColor.js +20 -0
  195. package/hooks/useColor.js.map +1 -0
  196. package/hooks/useFormatCategoricalData.d.ts +26 -0
  197. package/hooks/useFormatCategoricalData.js +57 -0
  198. package/hooks/useFormatCategoricalData.js.map +1 -0
  199. package/hooks/useZoom.d.ts +26 -0
  200. package/hooks/useZoom.js +39 -0
  201. package/hooks/useZoom.js.map +1 -0
  202. package/index.d.ts +51 -1277
  203. package/index.js +42 -5118
  204. package/index.js.map +1 -1
  205. package/package.json +4 -4
  206. package/scheme.d.ts +32 -0
  207. package/scheme.js +47 -0
  208. package/scheme.js.map +1 -0
  209. package/types/axis.d.ts +48 -0
  210. package/types/data.d.ts +72 -0
  211. package/types/legend.d.ts +30 -0
  212. package/types/legend.js +21 -0
  213. package/types/legend.js.map +1 -0
  214. package/types/scale.d.ts +48 -0
  215. package/types/size.d.ts +20 -0
  216. package/types/size.js +8 -0
  217. package/types/size.js.map +1 -0
  218. package/types/theme.d.ts +23 -0
  219. package/types/theme.js +13 -0
  220. package/types/theme.js.map +1 -0
  221. package/utils/index.d.ts +11 -0
  222. package/utils/index.js +44 -0
  223. package/utils/index.js.map +1 -0
package/package.json CHANGED
@@ -30,7 +30,7 @@
30
30
  "test": "yarn test:unit && yarn test:storybook"
31
31
  },
32
32
  "types": "types.d.ts",
33
- "version": "11.5.0",
33
+ "version": "11.6.0-muiv5-alpha.0",
34
34
  "dependencies": {
35
35
  "@emotion/react": "^11.10.4",
36
36
  "@emotion/styled": "^11.10.4",
@@ -88,11 +88,11 @@
88
88
  "ts-jest": "^28.0.3"
89
89
  },
90
90
  "peerDependencies": {
91
- "@redsift/design-system": "^11.5.0-0",
92
- "@redsift/popovers": "^11.5.0-0",
91
+ "@redsift/design-system": "^11.6.0-0",
92
+ "@redsift/popovers": "^11.6.0-0",
93
93
  "react": ">=17",
94
94
  "react-dom": ">=17",
95
95
  "styled-components": "^5.3.5"
96
96
  },
97
- "gitHead": "00c9f15eeac63e69b783d0b9f6b5703265694381"
97
+ "gitHead": "479124ec4716c2bc55894b4fd7477e9c7814afee"
98
98
  }
package/scheme.d.ts ADDED
@@ -0,0 +1,32 @@
1
+ import { ScaleOrdinal } from 'd3';
2
+ import { Theme } from '@redsift/design-system';
3
+ import { ChartTheme } from './types/theme.js';
4
+
5
+ declare const monochrome = "#73C5EB";
6
+ declare const empty = "#BFBFBF";
7
+ declare const scheme: {
8
+ default: string[];
9
+ dark: string[];
10
+ darker: string[];
11
+ darkerer: string[];
12
+ light: string[];
13
+ lighter: string[];
14
+ lighterer: string[];
15
+ monochrome: string[];
16
+ empty: string[];
17
+ };
18
+ declare const successDangerScheme: {
19
+ success: string;
20
+ warning: string;
21
+ danger: string;
22
+ neutralLight: string;
23
+ neutralDark: string;
24
+ };
25
+ declare const getColorScale: ({ colorTheme, domain, isEmpty, theme, }: {
26
+ colorTheme: ChartTheme;
27
+ domain?: string[] | undefined;
28
+ isEmpty?: boolean | undefined;
29
+ theme: Theme;
30
+ }) => ScaleOrdinal<string, string>;
31
+
32
+ export { empty, getColorScale, monochrome, scheme, successDangerScheme };
package/scheme.js ADDED
@@ -0,0 +1,47 @@
1
+ import { scaleOrdinal } from 'd3';
2
+ import { RedsiftColorPresentationBlueDefault, RedsiftColorPresentationGreyDark, RedsiftColorPresentationAquaDefault, RedsiftColorPresentationPinkDefault, RedsiftColorPresentationGreyDefault, RedsiftColorPresentationYellowDefault, RedsiftColorPresentationPurpleDefault, RedsiftColorPresentationGreenDefault, RedsiftColorPresentationBrownDefault, RedsiftColorPresentationRedDefault, RedsiftColorPresentationOrangeDefault, RedsiftColorPresentationGreenDark, RedsiftColorPresentationPinkDark, RedsiftColorPresentationAquaDark, RedsiftColorPresentationBrownDark, RedsiftColorPresentationRedDark, RedsiftColorPresentationYellowDark, RedsiftColorPresentationPurpleDark, RedsiftColorPresentationOrangeDark, RedsiftColorPresentationBlueDark, RedsiftColorPresentationGreenDarker, RedsiftColorPresentationPinkDarker, RedsiftColorPresentationAquaDarker, RedsiftColorPresentationBrownDarker, RedsiftColorPresentationRedDarker, RedsiftColorPresentationYellowDarker, RedsiftColorPresentationPurpleDarker, RedsiftColorPresentationOrangeDarker, RedsiftColorPresentationBlueDarker, RedsiftColorPresentationGreyDarker, RedsiftColorPresentationGreenDarkerer, RedsiftColorPresentationPinkDarkerer, RedsiftColorPresentationAquaDarkerer, RedsiftColorPresentationBrownDarkerer, RedsiftColorPresentationRedDarkerer, RedsiftColorPresentationYellowDarkerer, RedsiftColorPresentationPurpleDarkerer, RedsiftColorPresentationOrangeDarkerer, RedsiftColorPresentationBlueDarkerer, RedsiftColorPresentationGreyDarkerer, RedsiftColorPresentationGreenLight, RedsiftColorPresentationPinkLight, RedsiftColorPresentationAquaLight, RedsiftColorPresentationBrownLight, RedsiftColorPresentationRedLight, RedsiftColorPresentationYellowLight, RedsiftColorPresentationPurpleLight, RedsiftColorPresentationOrangeLight, RedsiftColorPresentationBlueLight, RedsiftColorPresentationGreyLight, RedsiftColorPresentationGreenLighter, RedsiftColorPresentationPinkLighter, RedsiftColorPresentationAquaLighter, RedsiftColorPresentationBrownLighter, RedsiftColorPresentationRedLighter, RedsiftColorPresentationYellowLighter, RedsiftColorPresentationPurpleLighter, RedsiftColorPresentationOrangeLighter, RedsiftColorPresentationBlueLighter, RedsiftColorPresentationGreyLighter, RedsiftColorPresentationGreenLighterer, RedsiftColorPresentationPinkLighterer, RedsiftColorPresentationAquaLighterer, RedsiftColorPresentationBrownLighterer, RedsiftColorPresentationRedLighterer, RedsiftColorPresentationYellowLighterer, RedsiftColorPresentationPurpleLighterer, RedsiftColorPresentationOrangeLighterer, RedsiftColorPresentationBlueLighterer, RedsiftColorPresentationGreyLighterer, Theme } from '@redsift/design-system';
3
+
4
+ const monochrome = RedsiftColorPresentationBlueDefault;
5
+ const empty = RedsiftColorPresentationGreyDark;
6
+ const scheme = {
7
+ default: [RedsiftColorPresentationBlueDefault, RedsiftColorPresentationAquaDefault, RedsiftColorPresentationPinkDefault, RedsiftColorPresentationGreyDefault, RedsiftColorPresentationYellowDefault, RedsiftColorPresentationPurpleDefault, RedsiftColorPresentationGreenDefault, RedsiftColorPresentationBrownDefault, RedsiftColorPresentationRedDefault, RedsiftColorPresentationOrangeDefault],
8
+ dark: [RedsiftColorPresentationGreenDark, RedsiftColorPresentationPinkDark, RedsiftColorPresentationAquaDark, RedsiftColorPresentationBrownDark, RedsiftColorPresentationRedDark, RedsiftColorPresentationYellowDark, RedsiftColorPresentationPurpleDark, RedsiftColorPresentationOrangeDark, RedsiftColorPresentationBlueDark, RedsiftColorPresentationGreyDark],
9
+ darker: [RedsiftColorPresentationGreenDarker, RedsiftColorPresentationPinkDarker, RedsiftColorPresentationAquaDarker, RedsiftColorPresentationBrownDarker, RedsiftColorPresentationRedDarker, RedsiftColorPresentationYellowDarker, RedsiftColorPresentationPurpleDarker, RedsiftColorPresentationOrangeDarker, RedsiftColorPresentationBlueDarker, RedsiftColorPresentationGreyDarker],
10
+ darkerer: [RedsiftColorPresentationGreenDarkerer, RedsiftColorPresentationPinkDarkerer, RedsiftColorPresentationAquaDarkerer, RedsiftColorPresentationBrownDarkerer, RedsiftColorPresentationRedDarkerer, RedsiftColorPresentationYellowDarkerer, RedsiftColorPresentationPurpleDarkerer, RedsiftColorPresentationOrangeDarkerer, RedsiftColorPresentationBlueDarkerer, RedsiftColorPresentationGreyDarkerer],
11
+ light: [RedsiftColorPresentationGreenLight, RedsiftColorPresentationPinkLight, RedsiftColorPresentationAquaLight, RedsiftColorPresentationBrownLight, RedsiftColorPresentationRedLight, RedsiftColorPresentationYellowLight, RedsiftColorPresentationPurpleLight, RedsiftColorPresentationOrangeLight, RedsiftColorPresentationBlueLight, RedsiftColorPresentationGreyLight],
12
+ lighter: [RedsiftColorPresentationGreenLighter, RedsiftColorPresentationPinkLighter, RedsiftColorPresentationAquaLighter, RedsiftColorPresentationBrownLighter, RedsiftColorPresentationRedLighter, RedsiftColorPresentationYellowLighter, RedsiftColorPresentationPurpleLighter, RedsiftColorPresentationOrangeLighter, RedsiftColorPresentationBlueLighter, RedsiftColorPresentationGreyLighter],
13
+ lighterer: [RedsiftColorPresentationGreenLighterer, RedsiftColorPresentationPinkLighterer, RedsiftColorPresentationAquaLighterer, RedsiftColorPresentationBrownLighterer, RedsiftColorPresentationRedLighterer, RedsiftColorPresentationYellowLighterer, RedsiftColorPresentationPurpleLighterer, RedsiftColorPresentationOrangeLighterer, RedsiftColorPresentationBlueLighterer, RedsiftColorPresentationGreyLighterer],
14
+ monochrome: [monochrome],
15
+ empty: [empty]
16
+ };
17
+ const successDangerScheme = {
18
+ success: RedsiftColorPresentationGreenDefault,
19
+ warning: RedsiftColorPresentationOrangeDefault,
20
+ danger: RedsiftColorPresentationRedDefault,
21
+ neutralLight: RedsiftColorPresentationGreyDefault,
22
+ neutralDark: RedsiftColorPresentationGreyDarkerer
23
+ };
24
+ const getColorScale = _ref => {
25
+ let {
26
+ colorTheme,
27
+ domain,
28
+ isEmpty,
29
+ theme
30
+ } = _ref;
31
+ let d3colors = scaleOrdinal(scheme.default);
32
+ if (isEmpty) {
33
+ d3colors = scaleOrdinal(scheme.empty);
34
+ } else if (typeof colorTheme === 'string') {
35
+ d3colors = scaleOrdinal().domain(domain).range(scheme[colorTheme]).unknown(monochrome);
36
+ } else if (typeof colorTheme === 'object') {
37
+ if (Object.keys(colorTheme).includes('success') || Object.keys(colorTheme).includes('danger') || Object.keys(colorTheme).includes('warning')) {
38
+ d3colors = scaleOrdinal().domain([...(colorTheme.success ? [colorTheme.success] : []), ...(colorTheme.warning ? [colorTheme.warning] : []), ...(colorTheme.danger ? [colorTheme.danger] : []), ...(colorTheme.neutral ? [colorTheme.neutral] : [])]).range([...(colorTheme.success ? [successDangerScheme.success] : []), ...(colorTheme.warning ? [successDangerScheme.warning] : []), ...(colorTheme.danger ? [successDangerScheme.danger] : []), ...(colorTheme.neutral ? [theme === Theme.dark ? successDangerScheme.neutralDark : successDangerScheme.neutralLight] : [])]).unknown(monochrome);
39
+ } else {
40
+ d3colors = scaleOrdinal().domain(Object.keys(colorTheme)).range(Object.values(colorTheme)).unknown(monochrome);
41
+ }
42
+ }
43
+ return d3colors;
44
+ };
45
+
46
+ export { empty, getColorScale, monochrome, scheme, successDangerScheme };
47
+ //# sourceMappingURL=scheme.js.map
package/scheme.js.map ADDED
@@ -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":";;;AA6EO,MAAMA,UAAU,GAAGC,oCAAmC;AACtD,MAAMC,KAAK,GAAGC,iCAAgC;AAE9C,MAAMC,MAAM,GAAG;EACpBC,OAAO,EAAE,CACPJ,mCAAmC,EACnCK,mCAAmC,EACnCC,mCAAmC,EACnCC,mCAAmC,EACnCC,qCAAqC,EACrCC,qCAAqC,EACrCC,oCAAoC,EACpCC,oCAAoC,EACpCC,kCAAkC,EAClCC,qCAAqC,CACtC;EACDC,IAAI,EAAE,CACJC,iCAAiC,EACjCC,gCAAgC,EAChCC,gCAAgC,EAChCC,iCAAiC,EACjCC,+BAA+B,EAC/BC,kCAAkC,EAClCC,kCAAkC,EAClCC,kCAAkC,EAClCC,gCAAgC,EAChCrB,gCAAgC,CACjC;EACDsB,MAAM,EAAE,CACNC,mCAAmC,EACnCC,kCAAkC,EAClCC,kCAAkC,EAClCC,mCAAmC,EACnCC,iCAAiC,EACjCC,oCAAoC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C,EAC5D,IAAIO,UAAU,CAACN,OAAO,GAAG,CAACF,mBAAmB,CAACE,OAAO,CAAC,GAAG,EAAE,CAAC,EAC5D,IAAIM,UAAU,CAACL,MAAM,GAAG,CAACH,mBAAmB,CAACG,MAAM,CAAC,GAAG,EAAE,CAAC,EAC1D,IAAIK,UAAU,CAACW,OAAO,GAClB,CAACR,KAAK,KAAKS,KAAK,CAACrF,IAAI,GAAGiE,mBAAmB,CAACK,WAAW,GAAGL,mBAAmB,CAACI,YAAY,CAAC,GAC3F,EAAE,CAAC,CACR,CAAC,CACDW,OAAO,CAAC/F,UAAU,CAAmC,CAAA;AAC1D,KAAC,MAAM;AACL4F,MAAAA,QAAQ,GAAGC,YAAc,EAAE,CACxBJ,MAAM,CAACO,MAAM,CAACC,IAAI,CAACT,UAAU,CAAC,CAAC,CAC/BM,KAAK,CAACE,MAAM,CAACK,MAAM,CAACb,UAAU,CAAC,CAAC,CAChCO,OAAO,CAAC/F,UAAU,CAAmC,CAAA;AAC1D,KAAA;AACF,GAAA;AAEA,EAAA,OAAO4F,QAAQ,CAAA;AACjB;;;;"}
@@ -0,0 +1,48 @@
1
+ import { AxisVariant, AxisProps } from '../components/Axis/types.js';
2
+
3
+ type ChartAxesProps = {
4
+ /** String to Date. */
5
+ dateParser?: (value: string) => Date;
6
+ /** X axis variant. */
7
+ xAxisVariant?: AxisVariant;
8
+ /** X axis placement. */
9
+ xAxisPlacement?: 'bottom' | 'top' | 'both';
10
+ /** X axis tick format. */
11
+ xAxisTickFormat?: AxisProps['tickFormat'];
12
+ /** X axis tick values. */
13
+ xAxisTickPadding?: AxisProps['tickPadding'];
14
+ /** X axis tick values. */
15
+ xAxisTickRotation?: AxisProps['tickRotation'];
16
+ /** X axis tick values. */
17
+ xAxisTickSize?: AxisProps['tickSize'];
18
+ /** X axis tick values. */
19
+ xAxisTickValues?: AxisProps['tickValues'];
20
+ /** X axis min value. */
21
+ xAxisMinValue?: number | string;
22
+ /** X axis min value. */
23
+ xAxisMaxValue?: number | string;
24
+ /** Y axis tick remodelling. */
25
+ xAxisTickRemodelling?: (tickValues: any[]) => any[];
26
+ /** Y axis variant. */
27
+ yAxisVariant?: AxisVariant;
28
+ /** Y axis placement. */
29
+ yAxisPlacement?: 'right' | 'left' | 'both';
30
+ /** Y axis tick format. */
31
+ yAxisTickFormat?: AxisProps['tickFormat'];
32
+ /** Y axis tick values. */
33
+ yAxisTickPadding?: AxisProps['tickPadding'];
34
+ /** Y axis tick values. */
35
+ yAxisTickRotation?: AxisProps['tickRotation'];
36
+ /** Y axis tick values. */
37
+ yAxisTickSize?: AxisProps['tickSize'];
38
+ /** Y axis tick values. */
39
+ yAxisTickValues?: AxisProps['tickValues'];
40
+ /** Y axis min value. */
41
+ yAxisMinValue?: number | string;
42
+ /** Y axis min value. */
43
+ yAxisMaxValue?: number | string;
44
+ /** Y axis tick remodelling. */
45
+ yAxisTickRemodelling?: (tickValues: any[]) => any[];
46
+ };
47
+
48
+ export { ChartAxesProps };
@@ -0,0 +1,72 @@
1
+ import { PieArcDatum } from 'd3-shape';
2
+
3
+ type JSONValue = string | number | boolean | Date | {
4
+ [x: string]: JSONValue;
5
+ } | Array<JSONValue> | undefined | null;
6
+ type JSONObject = {
7
+ [x: string]: JSONValue;
8
+ };
9
+ type JSONArray = Array<JSONObject>;
10
+ type Datum<T> = {
11
+ key: T;
12
+ value: number;
13
+ percent?: number;
14
+ cumulativeValue?: number;
15
+ };
16
+ type EmptyDatum<T> = {
17
+ key: T;
18
+ value?: number | null;
19
+ percent?: number;
20
+ };
21
+ type CategoryDim = string;
22
+ type LinearDim = number | Date | string;
23
+ type CategoricalOrLinearDim = CategoryDim | LinearDim;
24
+ type TwoCategoryDim = [CategoricalOrLinearDim, CategoryDim | undefined | null];
25
+ type CoordinatesCategoryDim = [number, number, CategoryDim | undefined | null];
26
+ type CategoryDatum = Datum<CategoryDim>;
27
+ type LinearDatum = Datum<LinearDim>;
28
+ type TwoCategoryDatum = EmptyDatum<TwoCategoryDim>;
29
+ type CoordinatesCategoryDatum = Datum<CoordinatesCategoryDim>;
30
+ type CategoryData = CategoryDatum[];
31
+ type LinearData = LinearDatum[];
32
+ type TwoCategoryData = TwoCategoryDatum[];
33
+ type CoordinatesCategoryData = CoordinatesCategoryDatum[];
34
+ type ArcDatum = PieArcDatum<CategoryDatum>;
35
+ type BarDatum = {
36
+ data: CategoryDatum | LinearDatum | Datum<TwoCategoryDim>;
37
+ height?: number;
38
+ width?: number;
39
+ category?: string | null;
40
+ };
41
+ type DotDatum = {
42
+ data: EmptyDatum<CoordinatesCategoryDim | TwoCategoryDim>;
43
+ x: string | number | Date;
44
+ y?: number | null;
45
+ r: number;
46
+ category?: string | null;
47
+ };
48
+ type LinePointDatum = {
49
+ x?: number | string | Date;
50
+ y?: number;
51
+ category?: string | null;
52
+ };
53
+ type Statistic = {
54
+ key: string;
55
+ value: number;
56
+ percent?: number;
57
+ min?: number;
58
+ max?: number;
59
+ values?: number[];
60
+ first?: number;
61
+ last?: number;
62
+ trending?: {
63
+ overall?: number;
64
+ latest?: number;
65
+ };
66
+ };
67
+ type Statistics = Statistic[];
68
+ type LegendItemDatum = {
69
+ data: Statistic;
70
+ };
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 };
@@ -0,0 +1,30 @@
1
+ import { ValueOf } from '@redsift/design-system';
2
+
3
+ /** TOOLTIP */
4
+ declare const TooltipVariant: {
5
+ none: string;
6
+ label: string;
7
+ value: string;
8
+ percent: string;
9
+ custom: string;
10
+ };
11
+ type TooltipVariant = ValueOf<typeof TooltipVariant>;
12
+ /** LEGEND */
13
+ declare const LegendVariant: {
14
+ readonly none: "none";
15
+ readonly label: "label";
16
+ readonly value: "value";
17
+ readonly percent: "percent";
18
+ readonly custom: "custom";
19
+ };
20
+ type LegendVariant = ValueOf<typeof LegendVariant>;
21
+ declare const LabelVariant: {
22
+ readonly none: "none";
23
+ readonly label: "label";
24
+ readonly value: "value";
25
+ readonly percent: "percent";
26
+ readonly custom: "custom";
27
+ };
28
+ type LabelVariant = LegendVariant;
29
+
30
+ export { LabelVariant, LegendVariant, TooltipVariant };
@@ -0,0 +1,21 @@
1
+ /** TOOLTIP */
2
+
3
+ const TooltipVariant = {
4
+ none: 'none',
5
+ label: 'label',
6
+ value: 'value',
7
+ percent: 'percent',
8
+ custom: 'custom'
9
+ };
10
+ /** LEGEND */
11
+ const LegendVariant = {
12
+ none: 'none',
13
+ label: 'label',
14
+ value: 'value',
15
+ percent: 'percent',
16
+ custom: 'custom'
17
+ };
18
+ const LabelVariant = LegendVariant;
19
+
20
+ export { LabelVariant, LegendVariant, TooltipVariant };
21
+ //# sourceMappingURL=legend.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"legend.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;;;;"}
@@ -0,0 +1,48 @@
1
+ import { CountableTimeInterval } from 'd3';
2
+ import { ScaleLinear as ScaleLinear$1, ScaleLogarithmic, ScaleSymLog, ScalePoint as ScalePoint$1, ScaleBand as ScaleBand$1, ScaleTime as ScaleTime$1 } from 'd3-scale';
3
+
4
+ type Coordinates = {
5
+ x: number;
6
+ y: number;
7
+ };
8
+ type NumericValue = {
9
+ valueOf(): number;
10
+ };
11
+ type StringValue = {
12
+ toString(): string;
13
+ };
14
+ type ScaleValue = NumericValue | StringValue | Date;
15
+ interface ScaleLinear<Output> extends ScaleLinear$1<number, Output, never> {
16
+ type: 'linear';
17
+ stacked: boolean;
18
+ }
19
+ interface ScaleLog extends ScaleLogarithmic<number, number> {
20
+ type: 'log';
21
+ }
22
+ interface ScaleSymlog extends ScaleSymLog<number, number> {
23
+ type: 'symlog';
24
+ }
25
+ interface ScalePoint<Input extends StringValue> extends ScalePoint$1<Input> {
26
+ type: 'point';
27
+ }
28
+ interface ScaleBand<Input extends StringValue> extends ScaleBand$1<Input> {
29
+ type: 'band';
30
+ }
31
+ interface ScaleTime<Input> extends ScaleTime$1<Input, number> {
32
+ type: 'time';
33
+ useUTC: boolean;
34
+ }
35
+ interface ScaleTypeToScale<Input, Output> {
36
+ linear: Input extends NumericValue ? ScaleLinear<Output> : never;
37
+ log: Input extends NumericValue ? ScaleLog : never;
38
+ symlog: Input extends NumericValue ? ScaleSymlog : never;
39
+ point: Input extends StringValue ? ScalePoint<Input> : never;
40
+ band: Input extends StringValue ? ScaleBand<Input> : never;
41
+ time: Input extends StringValue | Date ? ScaleTime<Input> : never;
42
+ }
43
+ type Scale<Input, Output> = ScaleTypeToScale<Input, Output>[keyof ScaleTypeToScale<Input, Output>];
44
+ type AnyScale = Scale<any, any>;
45
+ type ScaleWithBandwidth = ScaleBand<any> | ScalePoint<any>;
46
+ type TicksSpec = number | string | ScaleValue[] | CountableTimeInterval;
47
+
48
+ export { AnyScale, Coordinates, NumericValue, Scale, ScaleBand, ScaleLinear, ScaleLog, ScalePoint, ScaleSymlog, ScaleTime, ScaleTypeToScale, ScaleValue, ScaleWithBandwidth, StringValue, TicksSpec };
@@ -0,0 +1,20 @@
1
+ import { ValueOf } from '@redsift/design-system';
2
+
3
+ type ChartDimensions = {
4
+ width: number;
5
+ height: number;
6
+ };
7
+ declare const ChartSize: {
8
+ readonly small: "small";
9
+ readonly medium: "medium";
10
+ readonly large: "large";
11
+ };
12
+ type ChartSize = ValueOf<typeof ChartSize>;
13
+ type MarginProps = {
14
+ top?: number;
15
+ right?: number;
16
+ bottom?: number;
17
+ left?: number;
18
+ };
19
+
20
+ export { ChartDimensions, ChartSize, MarginProps };
package/types/size.js ADDED
@@ -0,0 +1,8 @@
1
+ const ChartSize = {
2
+ small: 'small',
3
+ medium: 'medium',
4
+ large: 'large'
5
+ };
6
+
7
+ export { ChartSize };
8
+ //# sourceMappingURL=size.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"size.js","sources":["../../src/types/size.ts"],"sourcesContent":["import { ValueOf } from '@redsift/design-system';\n\nexport type ChartDimensions = {\n width: number;\n height: number;\n};\n\nexport const ChartSize = {\n small: 'small',\n medium: 'medium',\n large: 'large',\n} as const;\nexport type ChartSize = ValueOf<typeof ChartSize>;\n\nexport type MarginProps = {\n top?: number;\n right?: number;\n bottom?: number;\n left?: number;\n};\n"],"names":["ChartSize","small","medium","large"],"mappings":"AAOO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,KAAK,EAAE,OAAA;AACT;;;;"}
@@ -0,0 +1,23 @@
1
+ import { ValueOf } from '@redsift/design-system';
2
+
3
+ declare const ColorTheme: {
4
+ readonly default: "default";
5
+ readonly dark: "dark";
6
+ readonly darker: "darker";
7
+ readonly darkerer: "darkerer";
8
+ readonly light: "light";
9
+ readonly lighter: "lighter";
10
+ readonly lighterer: "lighterer";
11
+ readonly monochrome: "monochrome";
12
+ };
13
+ type ColorTheme = ValueOf<typeof ColorTheme>;
14
+ type SuccessDangerColorTheme = {
15
+ success: string;
16
+ warning: string;
17
+ danger: string;
18
+ neutral?: string;
19
+ };
20
+ type CustomColorTheme = Record<string, string>;
21
+ type ChartTheme = ColorTheme | SuccessDangerColorTheme | CustomColorTheme;
22
+
23
+ export { ChartTheme, ColorTheme, CustomColorTheme, SuccessDangerColorTheme };
package/types/theme.js ADDED
@@ -0,0 +1,13 @@
1
+ const ColorTheme = {
2
+ default: 'default',
3
+ dark: 'dark',
4
+ darker: 'darker',
5
+ darkerer: 'darkerer',
6
+ light: 'light',
7
+ lighter: 'lighter',
8
+ lighterer: 'lighterer',
9
+ monochrome: 'monochrome'
10
+ };
11
+
12
+ export { ColorTheme };
13
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sources":["../../src/types/theme.ts"],"sourcesContent":["import { ValueOf } from '@redsift/design-system';\n\nexport const ColorTheme = {\n default: 'default',\n dark: 'dark',\n darker: 'darker',\n darkerer: 'darkerer',\n light: 'light',\n lighter: 'lighter',\n lighterer: 'lighterer',\n monochrome: 'monochrome',\n} as const;\nexport type ColorTheme = ValueOf<typeof ColorTheme>;\n\nexport type SuccessDangerColorTheme = {\n success: string;\n warning: string;\n danger: string;\n neutral?: string;\n};\n\nexport type CustomColorTheme = Record<string, string>;\n\nexport type ChartTheme =\n | ColorTheme\n | SuccessDangerColorTheme\n | CustomColorTheme;\n"],"names":["ColorTheme","default","dark","darker","darkerer","light","lighter","lighterer","monochrome"],"mappings":"AAEO,MAAMA,UAAU,GAAG;AACxBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,QAAQ,EAAE,UAAU;AACpBC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,SAAS,EAAE,WAAW;AACtBC,EAAAA,UAAU,EAAE,YAAA;AACd;;;;"}
@@ -0,0 +1,11 @@
1
+ import { CategoryDatum, Statistics } from '../types/data.js';
2
+
3
+ type SortingMethod = 'none' | 'asc-key' | 'desc-key' | 'asc-value' | 'desc-value' | string[] | ((a: CategoryDatum, b: CategoryDatum) => 1 | -1);
4
+ declare const getSortingMethod: (sortingMethod: SortingMethod) => (a: CategoryDatum, b: CategoryDatum) => 1 | -1;
5
+ declare const isValidDate: (value: string) => boolean;
6
+ declare const mergeLegends: (arr1: Statistics, arr2: Statistics) => {
7
+ key: any;
8
+ value: any;
9
+ }[];
10
+
11
+ export { SortingMethod, getSortingMethod, isValidDate, mergeLegends };
package/utils/index.js ADDED
@@ -0,0 +1,44 @@
1
+ const getSortingMethod = sortingMethod => {
2
+ if (sortingMethod === 'asc-key') {
3
+ return (a, b) => a.key === b.key ? a.value > b.value ? -1 : 1 : a.key < b.key ? -1 : 1;
4
+ } else if (sortingMethod === 'desc-key') {
5
+ return (a, b) => a.key === b.key ? a.value > b.value ? 1 : -1 : a.key < b.key ? 1 : -1;
6
+ } else if (sortingMethod === 'asc-value') {
7
+ return (a, b) => a.value === b.value ? a.key > b.key ? -1 : 1 : a.value < b.value ? -1 : 1;
8
+ } else if (sortingMethod === 'desc-value') {
9
+ return (a, b) => a.value === b.value ? a.key > b.key ? 1 : -1 : a.value < b.value ? 1 : -1;
10
+ } else if (typeof sortingMethod === 'function') {
11
+ return sortingMethod;
12
+ } else if (Array.isArray(sortingMethod)) {
13
+ return (a, b) => {
14
+ if (sortingMethod.indexOf(a.key) === -1) {
15
+ return 1;
16
+ }
17
+ if (sortingMethod.indexOf(b.key) === -1) {
18
+ return -1;
19
+ }
20
+ return sortingMethod.indexOf(a.key) === sortingMethod.indexOf(b.key) ? a.key > b.key ? 1 : -1 : sortingMethod.indexOf(a.key) < sortingMethod.indexOf(b.key) ? -1 : 1;
21
+ };
22
+ }
23
+ return () => 1;
24
+ };
25
+ const isValidDate = value => {
26
+ const date = new Date(value);
27
+ return !isNaN(date.getTime()) && date.toISOString().startsWith(value);
28
+ };
29
+ const mergeLegends = (arr1, arr2) => {
30
+ const map = new Map();
31
+ [...arr1, ...arr2].forEach(item => {
32
+ map.set(item.key, item.value);
33
+ });
34
+ return Array.from(map, _ref => {
35
+ let [key, value] = _ref;
36
+ return {
37
+ key,
38
+ value
39
+ };
40
+ });
41
+ };
42
+
43
+ export { getSortingMethod, isValidDate, mergeLegends };
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../src/utils/index.ts"],"sourcesContent":["import { CategoryDatum, Statistics } from '../types';\n\nexport type SortingMethod =\n | 'none'\n | 'asc-key'\n | 'desc-key'\n | 'asc-value'\n | 'desc-value'\n | string[]\n | ((a: CategoryDatum, b: CategoryDatum) => 1 | -1);\n\nexport const getSortingMethod: (sortingMethod: SortingMethod) => (a: CategoryDatum, b: CategoryDatum) => 1 | -1 = (\n sortingMethod\n) => {\n if (sortingMethod === 'asc-key') {\n return (a: CategoryDatum, b: CategoryDatum) =>\n a.key === b.key ? (a.value > b.value ? -1 : 1) : a.key < b.key ? -1 : 1;\n } else if (sortingMethod === 'desc-key') {\n return (a: CategoryDatum, b: CategoryDatum) =>\n a.key === b.key ? (a.value > b.value ? 1 : -1) : a.key < b.key ? 1 : -1;\n } else if (sortingMethod === 'asc-value') {\n return (a: CategoryDatum, b: CategoryDatum) =>\n a.value === b.value ? (a.key > b.key ? -1 : 1) : a.value < b.value ? -1 : 1;\n } else if (sortingMethod === 'desc-value') {\n return (a: CategoryDatum, b: CategoryDatum) =>\n a.value === b.value ? (a.key > b.key ? 1 : -1) : a.value < b.value ? 1 : -1;\n } else if (typeof sortingMethod === 'function') {\n return sortingMethod;\n } else if (Array.isArray(sortingMethod)) {\n return (a: CategoryDatum, b: CategoryDatum) => {\n if (sortingMethod.indexOf(a.key) === -1) {\n return 1;\n }\n if (sortingMethod.indexOf(b.key) === -1) {\n return -1;\n }\n\n return sortingMethod.indexOf(a.key) === sortingMethod.indexOf(b.key)\n ? a.key > b.key\n ? 1\n : -1\n : sortingMethod.indexOf(a.key) < sortingMethod.indexOf(b.key)\n ? -1\n : 1;\n };\n }\n return () => 1;\n};\n\nexport const isValidDate = (value: string) => {\n const date = new Date(value);\n return !isNaN(date.getTime()) && date.toISOString().startsWith(value);\n};\n\nexport const mergeLegends = (arr1: Statistics, arr2: Statistics) => {\n const map = new Map();\n\n [...arr1, ...arr2].forEach((item) => {\n map.set(item.key, item.value);\n });\n\n return Array.from(map, ([key, value]) => ({ key, value }));\n};\n"],"names":["getSortingMethod","sortingMethod","a","b","key","value","Array","isArray","indexOf","isValidDate","date","Date","isNaN","getTime","toISOString","startsWith","mergeLegends","arr1","arr2","map","Map","forEach","item","set","from","_ref"],"mappings":"AAWaA,MAAAA,gBAAkG,GAC7GC,aAAa,IACV;EACH,IAAIA,aAAa,KAAK,SAAS,EAAE;AAC/B,IAAA,OAAO,CAACC,CAAgB,EAAEC,CAAgB,KACxCD,CAAC,CAACE,GAAG,KAAKD,CAAC,CAACC,GAAG,GAAIF,CAAC,CAACG,KAAK,GAAGF,CAAC,CAACE,KAAK,GAAG,CAAC,CAAC,GAAG,CAAC,GAAIH,CAAC,CAACE,GAAG,GAAGD,CAAC,CAACC,GAAG,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;AAC3E,GAAC,MAAM,IAAIH,aAAa,KAAK,UAAU,EAAE;AACvC,IAAA,OAAO,CAACC,CAAgB,EAAEC,CAAgB,KACxCD,CAAC,CA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