@alfalab/core-components-chart 3.3.3 → 3.4.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 (126) hide show
  1. package/Component.js +1 -1
  2. package/components/Dot/index.css +8 -8
  3. package/components/Dot/index.js +1 -1
  4. package/components/Legends/index.css +8 -8
  5. package/components/Legends/index.js +1 -1
  6. package/components/Tick/index.css +4 -4
  7. package/components/Tick/index.js +1 -1
  8. package/components/TooltipContent/index.css +7 -7
  9. package/components/TooltipContent/index.js +1 -1
  10. package/esm/Component.js +1 -1
  11. package/esm/components/Dot/index.css +8 -8
  12. package/esm/components/Dot/index.js +1 -1
  13. package/esm/components/Legends/index.css +8 -8
  14. package/esm/components/Legends/index.js +1 -1
  15. package/esm/components/Tick/index.css +4 -4
  16. package/esm/components/Tick/index.js +1 -1
  17. package/esm/components/TooltipContent/index.css +7 -7
  18. package/esm/components/TooltipContent/index.js +1 -1
  19. package/esm/index.css +5 -5
  20. package/index.css +5 -5
  21. package/modern/Component.js +1 -1
  22. package/modern/components/Dot/index.css +8 -8
  23. package/modern/components/Dot/index.js +1 -1
  24. package/modern/components/Legends/index.css +8 -8
  25. package/modern/components/Legends/index.js +1 -1
  26. package/modern/components/Tick/index.css +4 -4
  27. package/modern/components/Tick/index.js +1 -1
  28. package/modern/components/TooltipContent/index.css +7 -7
  29. package/modern/components/TooltipContent/index.js +1 -1
  30. package/modern/index.css +5 -5
  31. package/moderncssm/Component.d.ts +8 -0
  32. package/moderncssm/Component.js +251 -0
  33. package/moderncssm/components/CustomizedLabel.d.ts +4 -0
  34. package/moderncssm/components/CustomizedLabel.js +11 -0
  35. package/moderncssm/components/Dot/index.d.ts +5 -0
  36. package/moderncssm/components/Dot/index.js +43 -0
  37. package/moderncssm/components/Dot/index.module.css +22 -0
  38. package/moderncssm/components/Legends/index.d.ts +14 -0
  39. package/moderncssm/components/Legends/index.js +36 -0
  40. package/moderncssm/components/Legends/index.module.css +36 -0
  41. package/moderncssm/components/LinearGradient.d.ts +5 -0
  42. package/moderncssm/components/LinearGradient.js +5 -0
  43. package/moderncssm/components/RectBar.d.ts +3 -0
  44. package/moderncssm/components/RectBar.js +27 -0
  45. package/moderncssm/components/Tick/index.d.ts +5 -0
  46. package/moderncssm/components/Tick/index.js +16 -0
  47. package/moderncssm/components/Tick/index.module.css +18 -0
  48. package/moderncssm/components/TooltipContent/index.d.ts +11 -0
  49. package/moderncssm/components/TooltipContent/index.js +26 -0
  50. package/moderncssm/components/TooltipContent/index.module.css +51 -0
  51. package/moderncssm/hooks/usePathBar/index.d.ts +14 -0
  52. package/moderncssm/hooks/usePathBar/index.js +37 -0
  53. package/moderncssm/hooks/usePathBar/utils/getRadius.d.ts +2 -0
  54. package/moderncssm/hooks/usePathBar/utils/getRadius.js +6 -0
  55. package/moderncssm/hooks/useSettings/index.d.ts +19 -0
  56. package/moderncssm/hooks/useSettings/index.js +43 -0
  57. package/moderncssm/hooks/useSettings/utils/setComposedChartsMargin.d.ts +12 -0
  58. package/moderncssm/hooks/useSettings/utils/setComposedChartsMargin.js +12 -0
  59. package/moderncssm/hooks/useSettings/utils/setDatas.d.ts +5 -0
  60. package/moderncssm/hooks/useSettings/utils/setDatas.js +32 -0
  61. package/moderncssm/hooks/useSettings/utils/setGradientCharts.d.ts +3 -0
  62. package/moderncssm/hooks/useSettings/utils/setGradientCharts.js +35 -0
  63. package/moderncssm/hooks/useSettings/utils/setLegendMargin.d.ts +4 -0
  64. package/moderncssm/hooks/useSettings/utils/setLegendMargin.js +14 -0
  65. package/moderncssm/hooks/useSettings/utils/sortByIndex.d.ts +3 -0
  66. package/moderncssm/hooks/useSettings/utils/sortByIndex.js +8 -0
  67. package/moderncssm/icons/Circle.d.ts +8 -0
  68. package/moderncssm/icons/Circle.js +6 -0
  69. package/moderncssm/icons/CircleLine.d.ts +8 -0
  70. package/moderncssm/icons/CircleLine.js +7 -0
  71. package/moderncssm/icons/FilledCircle.d.ts +8 -0
  72. package/moderncssm/icons/FilledCircle.js +10 -0
  73. package/moderncssm/icons/Point.d.ts +8 -0
  74. package/moderncssm/icons/Point.js +7 -0
  75. package/moderncssm/icons/StrokeCircle.d.ts +8 -0
  76. package/moderncssm/icons/StrokeCircle.js +6 -0
  77. package/moderncssm/index.d.ts +2 -0
  78. package/moderncssm/index.js +1 -0
  79. package/moderncssm/index.module.css +19 -0
  80. package/moderncssm/types/brush.types.d.ts +41 -0
  81. package/moderncssm/types/brush.types.js +1 -0
  82. package/moderncssm/types/cartesianGrid.types.d.ts +23 -0
  83. package/moderncssm/types/cartesianGrid.types.js +1 -0
  84. package/moderncssm/types/chart.types.d.ts +61 -0
  85. package/moderncssm/types/chart.types.js +1 -0
  86. package/moderncssm/types/composedChart.types.d.ts +33 -0
  87. package/moderncssm/types/composedChart.types.js +1 -0
  88. package/moderncssm/types/index.d.ts +14 -0
  89. package/moderncssm/types/index.js +1 -0
  90. package/moderncssm/types/labelList.types.d.ts +5 -0
  91. package/moderncssm/types/labelList.types.js +1 -0
  92. package/moderncssm/types/legend.types.d.ts +30 -0
  93. package/moderncssm/types/legend.types.js +1 -0
  94. package/moderncssm/types/options.types.d.ts +59 -0
  95. package/moderncssm/types/options.types.js +1 -0
  96. package/moderncssm/types/payload.types.d.ts +29 -0
  97. package/moderncssm/types/payload.types.js +1 -0
  98. package/moderncssm/types/responsiveContainer.types.d.ts +10 -0
  99. package/moderncssm/types/responsiveContainer.types.js +1 -0
  100. package/moderncssm/types/seria.types.d.ts +72 -0
  101. package/moderncssm/types/seria.types.js +1 -0
  102. package/moderncssm/types/tooltip.types.d.ts +70 -0
  103. package/moderncssm/types/tooltip.types.js +1 -0
  104. package/moderncssm/types/utils/axis.types.d.ts +68 -0
  105. package/moderncssm/types/utils/axis.types.js +1 -0
  106. package/moderncssm/types/utils/coordinates.types.d.ts +11 -0
  107. package/moderncssm/types/utils/coordinates.types.js +1 -0
  108. package/moderncssm/types/utils/data.types.d.ts +17 -0
  109. package/moderncssm/types/utils/data.types.js +1 -0
  110. package/moderncssm/types/utils/dot.types.d.ts +73 -0
  111. package/moderncssm/types/utils/dot.types.js +1 -0
  112. package/moderncssm/types/utils/gradient.types.d.ts +29 -0
  113. package/moderncssm/types/utils/gradient.types.js +1 -0
  114. package/moderncssm/types/utils/index.d.ts +7 -0
  115. package/moderncssm/types/utils/index.js +1 -0
  116. package/moderncssm/types/utils/tick.types.d.ts +19 -0
  117. package/moderncssm/types/utils/tick.types.js +1 -0
  118. package/moderncssm/types/xAxis.types.d.ts +16 -0
  119. package/moderncssm/types/xAxis.types.js +1 -0
  120. package/moderncssm/types/yAxis.types.d.ts +8 -0
  121. package/moderncssm/types/yAxis.types.js +1 -0
  122. package/package.json +4 -4
  123. package/src/components/Legends/index.module.css +1 -1
  124. package/src/components/Tick/index.module.css +1 -1
  125. package/src/components/TooltipContent/index.module.css +1 -1
  126. package/src/index.module.css +1 -1
@@ -0,0 +1,73 @@
1
+ import { CoordinatesProps } from "./coordinates.types";
2
+ import { DataProps } from "./data.types";
3
+ interface DotSettingProps {
4
+ /**
5
+ * Значение media query.
6
+ */
7
+ media?: number;
8
+ /**
9
+ * Значение маштаба при ховере.
10
+ */
11
+ scale: number;
12
+ /**
13
+ * Начальный значения маштаба.
14
+ */
15
+ initScale: number;
16
+ /**
17
+ * Ширина точки.
18
+ */
19
+ width: number;
20
+ /**
21
+ * Высота точки.
22
+ */
23
+ height: number;
24
+ }
25
+ interface ActiveDotProps {
26
+ /**
27
+ * Индекс предыдущей точки.
28
+ */
29
+ prev: number | null;
30
+ /**
31
+ * Индекс активной точки.
32
+ */
33
+ active: number | null;
34
+ }
35
+ interface PointProps extends CoordinatesProps {
36
+ value: string | number;
37
+ payload: DataProps;
38
+ }
39
+ interface DotProps {
40
+ /**
41
+ * Индекс активной точки на графике.
42
+ */
43
+ activeDot: null | number;
44
+ /**
45
+ * Координата Х.
46
+ */
47
+ cx: number;
48
+ /**
49
+ * Координата У.
50
+ */
51
+ cy: number;
52
+ /**
53
+ * Ключ данных.
54
+ */
55
+ dataKey: string;
56
+ /**
57
+ * Параметры точки.
58
+ */
59
+ dotSettings?: DotSettingProps;
60
+ /**
61
+ * Индекс.
62
+ */
63
+ index: number;
64
+ /**
65
+ * Цвет линии.
66
+ */
67
+ stroke: string;
68
+ /**
69
+ * Значения по этим координатам.
70
+ */
71
+ value: number;
72
+ }
73
+ export { DotSettingProps, ActiveDotProps, PointProps, DotProps };
@@ -0,0 +1,29 @@
1
+ interface GradientProps {
2
+ /**
3
+ * Отступ.
4
+ */
5
+ offset: number;
6
+ /**
7
+ * Цвет.
8
+ */
9
+ stopColor: string;
10
+ /**
11
+ * Значение празрачности.
12
+ */
13
+ stopOpacity: number;
14
+ }
15
+ interface LinearGradientProps {
16
+ /**
17
+ * Индефикатор графика.
18
+ */
19
+ id: string;
20
+ /**
21
+ * Индефикатор градиента.
22
+ */
23
+ gid: string;
24
+ /**
25
+ * Массив настроек градинта.
26
+ */
27
+ points: GradientProps[];
28
+ }
29
+ export { GradientProps, LinearGradientProps };
@@ -0,0 +1,7 @@
1
+ export * from "./axis.types";
2
+ export * from "./coordinates.types";
3
+ export * from "./data.types";
4
+ export * from "./dot.types";
5
+ export * from "./gradient.types";
6
+ export * from "./tick.types";
7
+ export {};
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,19 @@
1
+ /// <reference types="react" />
2
+ import { XAxisProps } from "../xAxis.types";
3
+ interface TickProps {
4
+ payload: {
5
+ coordinate: number;
6
+ value: number;
7
+ };
8
+ /**
9
+ * Функция форматирования
10
+ */
11
+ tickFormatter: (value: number | string) => React.ReactText;
12
+ x: number;
13
+ y: number;
14
+ /**
15
+ * Настройки оси Х
16
+ */
17
+ xAxis: XAxisProps;
18
+ }
19
+ export { TickProps };
@@ -0,0 +1,16 @@
1
+ import { AxisProps } from "./utils/axis.types";
2
+ interface XAxisProps extends AxisProps {
3
+ /**
4
+ * Ключ данных, отображаемых на оси.
5
+ */
6
+ dataKey: string | number;
7
+ /**
8
+ * Ориентация оси
9
+ */
10
+ orientation?: 'top' | 'bottom';
11
+ /**
12
+ * Тип деления оси
13
+ */
14
+ tickType?: 'point';
15
+ }
16
+ export { XAxisProps };
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,8 @@
1
+ import { AxisProps } from "./utils/axis.types";
2
+ interface YAxisProps extends AxisProps {
3
+ /**
4
+ * Ориентация оси
5
+ */
6
+ orientation?: 'left' | 'right';
7
+ }
8
+ export { YAxisProps };
@@ -0,0 +1 @@
1
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-chart",
3
- "version": "3.3.3",
3
+ "version": "3.4.0",
4
4
  "description": "Chart component",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -11,7 +11,7 @@
11
11
  "directory": "dist"
12
12
  },
13
13
  "dependencies": {
14
- "@alfalab/core-components-typography": "^4.9.0",
14
+ "@alfalab/core-components-typography": "^4.10.0",
15
15
  "classnames": "^2.3.1",
16
16
  "recharts": "^2.1.2",
17
17
  "tslib": "^2.4.0"
@@ -22,6 +22,6 @@
22
22
  "peerDependencies": {
23
23
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
24
24
  },
25
- "themesVersion": "13.0.2",
26
- "varsVersion": "9.11.1"
25
+ "themesVersion": "13.1.0",
26
+ "varsVersion": "9.12.0"
27
27
  }
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-themes/src/default.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .legendContent {
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-themes/src/default.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .tickText {
4
4
  fill: var(--color-light-text-primary);
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-themes/src/default.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .tooltip {
4
4
  background-color: var(--color-light-base-bg-primary);
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-themes/src/default.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .coreChart {
4
4
  & :global(.recharts-line path) {