@blockscout/ui-toolkit 2.7.3 → 2.8.0-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 (86) hide show
  1. package/README.md +6 -6
  2. package/dist/chakra/checkbox.d.ts +2 -3
  3. package/dist/chakra/select.d.ts +8 -0
  4. package/dist/chakra/status.d.ts +5 -0
  5. package/dist/chakra/toaster.d.ts +2 -1
  6. package/dist/components/AdaptiveTabs/AdaptiveTabsList.d.ts +5 -1
  7. package/dist/components/charts/components/ChartContent.d.ts +10 -0
  8. package/dist/components/charts/components/ChartDialog.d.ts +11 -0
  9. package/dist/components/charts/components/ChartMenu.d.ts +15 -0
  10. package/dist/components/charts/components/ChartResetZoomButton.d.ts +5 -0
  11. package/dist/components/charts/components/ChartWidget.d.ts +12 -0
  12. package/dist/components/charts/components/index.d.ts +6 -0
  13. package/dist/components/charts/index.d.ts +3 -17
  14. package/dist/components/charts/line/LineChart.d.ts +14 -0
  15. package/dist/components/charts/line/LineChartContent.d.ts +6 -0
  16. package/dist/components/charts/line/LineChartModal.d.ts +13 -0
  17. package/dist/components/charts/line/LineChartWidget.d.ts +19 -0
  18. package/dist/components/charts/line/index.d.ts +17 -0
  19. package/dist/components/charts/{parts/ChartArea.d.ts → line/parts/LineChartArea.d.ts} +4 -4
  20. package/dist/components/charts/{parts/ChartAxis.d.ts → line/parts/LineChartAxis.d.ts} +2 -2
  21. package/dist/components/charts/line/parts/LineChartGridLine.d.ts +10 -0
  22. package/dist/components/charts/line/parts/LineChartLegend.d.ts +9 -0
  23. package/dist/components/charts/line/parts/LineChartLine.d.ts +11 -0
  24. package/dist/components/charts/line/parts/LineChartMenu.d.ts +13 -0
  25. package/dist/components/charts/line/parts/LineChartOverlay.d.ts +7 -0
  26. package/dist/components/charts/line/parts/LineChartSelectionX.d.ts +11 -0
  27. package/dist/components/charts/line/parts/LineChartTooltip.d.ts +16 -0
  28. package/dist/components/charts/{parts/tooltip/ChartTooltipPoint.d.ts → line/parts/tooltip/LineChartTooltipPoint.d.ts} +3 -3
  29. package/dist/components/charts/{parts/tooltip/ChartTooltipRow.d.ts → line/parts/tooltip/LineChartTooltipRow.d.ts} +3 -3
  30. package/dist/components/charts/{parts/tooltip/ChartTooltipTitle.d.ts → line/parts/tooltip/LineChartTooltipTitle.d.ts} +2 -2
  31. package/dist/components/charts/line/types.d.ts +51 -0
  32. package/dist/components/charts/line/utils/formatters.d.ts +2 -0
  33. package/dist/components/charts/line/utils/getDateLabel.d.ts +2 -0
  34. package/dist/components/charts/{utils/timeChartAxis.d.ts → line/utils/lineChartAxis.d.ts} +3 -3
  35. package/dist/components/charts/{utils/useChartBrushX.d.ts → line/utils/useLineChartBrushX.d.ts} +1 -1
  36. package/dist/components/charts/{utils/useTimeChartController.d.ts → line/utils/useLineChartController.d.ts} +7 -6
  37. package/dist/components/charts/{utils/useChartLegend.d.ts → line/utils/useLineChartLegend.d.ts} +1 -1
  38. package/dist/components/charts/{utils/useChartZoom.d.ts → line/utils/useLineChartZoom.d.ts} +1 -1
  39. package/dist/components/charts/sankey/SankeyChart.d.ts +2 -2
  40. package/dist/components/charts/sankey/SankeyChartContent.d.ts +8 -0
  41. package/dist/components/charts/sankey/SankeyChartModal.d.ts +7 -0
  42. package/dist/components/charts/sankey/SankeyChartWidget.d.ts +14 -0
  43. package/dist/components/charts/sankey/constants.d.ts +4 -4
  44. package/dist/components/charts/sankey/index.d.ts +2 -2
  45. package/dist/components/charts/sankey/parts/SankeyChartLink.d.ts +18 -0
  46. package/dist/components/charts/sankey/parts/SankeyChartMenu.d.ts +7 -0
  47. package/dist/components/charts/sankey/parts/SankeyChartNode.d.ts +9 -0
  48. package/dist/components/charts/sankey/types.d.ts +5 -5
  49. package/dist/components/charts/sankey/useSankeyController.d.ts +5 -5
  50. package/dist/components/charts/types.d.ts +9 -56
  51. package/dist/components/forms/fields/FormFieldSwitch.d.ts +2 -2
  52. package/dist/components/truncation/TruncatedText.d.ts +3 -2
  53. package/dist/components/truncation/TruncatedTextTooltip.d.ts +3 -2
  54. package/dist/hooks/useClipboard.d.ts +1 -3
  55. package/dist/hooks/useDisclosure.d.ts +5 -3
  56. package/dist/index.js +7649 -5358
  57. package/dist/package/src/index.d.ts +1 -0
  58. package/dist/theme/recipes/badge.recipe.d.ts +0 -1
  59. package/dist/theme/recipes/button.recipe.d.ts +8 -0
  60. package/dist/theme/recipes/code.recipe.d.ts +2 -100
  61. package/dist/theme/recipes/index.d.ts +32 -101
  62. package/dist/theme/recipes/status.recipe.d.ts +22 -0
  63. package/dist/utils/file.d.ts +1 -1
  64. package/package.json +3 -7
  65. package/dist/components/charts/Chart.d.ts +0 -13
  66. package/dist/components/charts/ChartFullscreenDialog.d.ts +0 -17
  67. package/dist/components/charts/ChartWidget.d.ts +0 -19
  68. package/dist/components/charts/ChartWidgetContent.d.ts +0 -17
  69. package/dist/components/charts/parts/ChartGridLine.d.ts +0 -10
  70. package/dist/components/charts/parts/ChartLegend.d.ts +0 -9
  71. package/dist/components/charts/parts/ChartLine.d.ts +0 -11
  72. package/dist/components/charts/parts/ChartMenu.d.ts +0 -19
  73. package/dist/components/charts/parts/ChartOverlay.d.ts +0 -7
  74. package/dist/components/charts/parts/ChartSelectionX.d.ts +0 -11
  75. package/dist/components/charts/parts/ChartTooltip.d.ts +0 -15
  76. package/dist/components/charts/sankey/parts/SankeyLink.d.ts +0 -18
  77. package/dist/components/charts/sankey/parts/SankeyNode.d.ts +0 -9
  78. package/dist/components/charts/utils/formatters.d.ts +0 -2
  79. package/dist/components/charts/utils/getDateLabel.d.ts +0 -2
  80. /package/dist/components/charts/{parts → components}/ChartWatermark.d.ts +0 -0
  81. /package/dist/components/charts/{parts/tooltip/ChartTooltipBackdrop.d.ts → line/parts/tooltip/LineChartTooltipBackdrop.d.ts} +0 -0
  82. /package/dist/components/charts/{parts/tooltip/ChartTooltipContent.d.ts → line/parts/tooltip/LineChartTooltipContent.d.ts} +0 -0
  83. /package/dist/components/charts/{parts/tooltip/ChartTooltipLine.d.ts → line/parts/tooltip/LineChartTooltipLine.d.ts} +0 -0
  84. /package/dist/components/charts/{parts → line/parts}/tooltip/pointerTracker.d.ts +0 -0
  85. /package/dist/components/charts/{parts → line/parts}/tooltip/utils.d.ts +0 -0
  86. /package/dist/components/charts/{utils → line/utils}/animations.d.ts +0 -0
@@ -28,6 +28,7 @@ export * from '../../chakra/rating';
28
28
  export * from '../../chakra/select';
29
29
  export * from '../../chakra/skeleton';
30
30
  export * from '../../chakra/slider';
31
+ export * from '../../chakra/status';
31
32
  export * from '../../chakra/switch';
32
33
  export * from '../../chakra/table';
33
34
  export * from '../../chakra/tabs';
@@ -96,7 +96,6 @@ export declare const recipe: import('@chakra-ui/react').RecipeDefinition<{
96
96
  sm: {
97
97
  textStyle: "xs";
98
98
  p: "1";
99
- h: "4.5";
100
99
  minH: "4.5";
101
100
  };
102
101
  md: {
@@ -301,6 +301,14 @@ export declare const recipe: import('@chakra-ui/react').RecipeDefinition<{
301
301
  _expanded: {
302
302
  color: "hover";
303
303
  };
304
+ _loading: {
305
+ opacity: number;
306
+ '& .chakra-spinner': {
307
+ borderColor: "selected.option.bg";
308
+ borderBottomColor: "spinner.track";
309
+ borderInlineStartColor: "spinner.track";
310
+ };
311
+ };
304
312
  };
305
313
  pagination: {
306
314
  borderWidth: "2px";
@@ -7,110 +7,12 @@ export declare const recipe: import('@chakra-ui/react').RecipeDefinition<{
7
7
  bg: "badge.gray.bg";
8
8
  color: "badge.gray.fg";
9
9
  };
10
- green: {
11
- bg: "badge.green.bg";
12
- color: "badge.green.fg";
13
- };
14
- red: {
15
- bg: "badge.red.bg";
16
- color: "badge.red.fg";
17
- };
18
- purple: {
19
- bg: "badge.purple.bg";
20
- color: "badge.purple.fg";
21
- };
22
- orange: {
23
- bg: "badge.orange.bg";
24
- color: "badge.orange.fg";
25
- };
26
- blue: {
27
- bg: "badge.blue.bg";
28
- color: "badge.blue.fg";
29
- };
30
- yellow: {
31
- bg: "badge.yellow.bg";
32
- color: "badge.yellow.fg";
33
- };
34
- teal: {
35
- bg: "badge.teal.bg";
36
- color: "badge.teal.fg";
37
- };
38
- cyan: {
39
- bg: "badge.cyan.bg";
40
- color: "badge.cyan.fg";
41
- };
42
- pink: {
43
- bg: "badge.pink.bg";
44
- color: "badge.pink.fg";
45
- };
46
- purple_alt: {
47
- bg: "badge.purple_alt.bg";
48
- color: "badge.purple_alt.fg";
49
- };
50
- blue_alt: {
51
- bg: "badge.blue_alt.bg";
52
- color: "badge.blue_alt.fg";
53
- };
54
- bright_gray: {
55
- bg: "badge.bright.gray.bg";
56
- color: "badge.bright.gray.fg";
57
- };
58
- bright_green: {
59
- bg: "badge.bright.green.bg";
60
- color: "badge.bright.green.fg";
61
- };
62
- bright_red: {
63
- bg: "badge.bright.red.bg";
64
- color: "badge.bright.red.fg";
65
- };
66
- bright_blue: {
67
- bg: "badge.bright.blue.bg";
68
- color: "badge.bright.blue.fg";
69
- };
70
- bright_yellow: {
71
- bg: "badge.bright.yellow.bg";
72
- color: "badge.bright.yellow.fg";
73
- };
74
- bright_teal: {
75
- bg: "badge.bright.teal.bg";
76
- color: "badge.bright.teal.fg";
77
- };
78
- bright_cyan: {
79
- bg: "badge.bright.cyan.bg";
80
- color: "badge.bright.cyan.fg";
81
- };
82
- bright_orange: {
83
- bg: "badge.bright.orange.bg";
84
- color: "badge.bright.orange.fg";
85
- };
86
- bright_purple: {
87
- bg: "badge.bright.purple.bg";
88
- color: "badge.bright.purple.fg";
89
- };
90
- bright_pink: {
91
- bg: "badge.bright.pink.bg";
92
- color: "badge.bright.pink.fg";
93
- };
94
10
  };
95
11
  size: {
96
12
  sm: {
97
13
  textStyle: "xs";
98
- p: "1";
99
- h: "4.5";
100
- minH: "4.5";
101
- };
102
- md: {
103
- textStyle: "sm";
104
- px: "1";
105
- py: "0.5";
106
- minH: "6";
107
- };
108
- lg: {
109
- textStyle: "sm";
110
- px: "2";
111
- py: "1";
112
- minH: "7";
113
- fontWeight: "600";
14
+ px: number;
15
+ py: number;
114
16
  };
115
17
  };
116
18
  }>;
@@ -97,7 +97,6 @@ export declare const recipes: {
97
97
  sm: {
98
98
  textStyle: "xs";
99
99
  p: "1";
100
- h: "4.5";
101
100
  minH: "4.5";
102
101
  };
103
102
  md: {
@@ -418,6 +417,14 @@ export declare const recipes: {
418
417
  _expanded: {
419
418
  color: "hover";
420
419
  };
420
+ _loading: {
421
+ opacity: number;
422
+ '& .chakra-spinner': {
423
+ borderColor: "selected.option.bg";
424
+ borderBottomColor: "spinner.track";
425
+ borderInlineStartColor: "spinner.track";
426
+ };
427
+ };
421
428
  };
422
429
  pagination: {
423
430
  borderWidth: "2px";
@@ -501,110 +508,12 @@ export declare const recipes: {
501
508
  bg: "badge.gray.bg";
502
509
  color: "badge.gray.fg";
503
510
  };
504
- green: {
505
- bg: "badge.green.bg";
506
- color: "badge.green.fg";
507
- };
508
- red: {
509
- bg: "badge.red.bg";
510
- color: "badge.red.fg";
511
- };
512
- purple: {
513
- bg: "badge.purple.bg";
514
- color: "badge.purple.fg";
515
- };
516
- orange: {
517
- bg: "badge.orange.bg";
518
- color: "badge.orange.fg";
519
- };
520
- blue: {
521
- bg: "badge.blue.bg";
522
- color: "badge.blue.fg";
523
- };
524
- yellow: {
525
- bg: "badge.yellow.bg";
526
- color: "badge.yellow.fg";
527
- };
528
- teal: {
529
- bg: "badge.teal.bg";
530
- color: "badge.teal.fg";
531
- };
532
- cyan: {
533
- bg: "badge.cyan.bg";
534
- color: "badge.cyan.fg";
535
- };
536
- pink: {
537
- bg: "badge.pink.bg";
538
- color: "badge.pink.fg";
539
- };
540
- purple_alt: {
541
- bg: "badge.purple_alt.bg";
542
- color: "badge.purple_alt.fg";
543
- };
544
- blue_alt: {
545
- bg: "badge.blue_alt.bg";
546
- color: "badge.blue_alt.fg";
547
- };
548
- bright_gray: {
549
- bg: "badge.bright.gray.bg";
550
- color: "badge.bright.gray.fg";
551
- };
552
- bright_green: {
553
- bg: "badge.bright.green.bg";
554
- color: "badge.bright.green.fg";
555
- };
556
- bright_red: {
557
- bg: "badge.bright.red.bg";
558
- color: "badge.bright.red.fg";
559
- };
560
- bright_blue: {
561
- bg: "badge.bright.blue.bg";
562
- color: "badge.bright.blue.fg";
563
- };
564
- bright_yellow: {
565
- bg: "badge.bright.yellow.bg";
566
- color: "badge.bright.yellow.fg";
567
- };
568
- bright_teal: {
569
- bg: "badge.bright.teal.bg";
570
- color: "badge.bright.teal.fg";
571
- };
572
- bright_cyan: {
573
- bg: "badge.bright.cyan.bg";
574
- color: "badge.bright.cyan.fg";
575
- };
576
- bright_orange: {
577
- bg: "badge.bright.orange.bg";
578
- color: "badge.bright.orange.fg";
579
- };
580
- bright_purple: {
581
- bg: "badge.bright.purple.bg";
582
- color: "badge.bright.purple.fg";
583
- };
584
- bright_pink: {
585
- bg: "badge.bright.pink.bg";
586
- color: "badge.bright.pink.fg";
587
- };
588
511
  };
589
512
  size: {
590
513
  sm: {
591
514
  textStyle: "xs";
592
- p: "1";
593
- h: "4.5";
594
- minH: "4.5";
595
- };
596
- md: {
597
- textStyle: "sm";
598
- px: "1";
599
- py: "0.5";
600
- minH: "6";
601
- };
602
- lg: {
603
- textStyle: "sm";
604
- px: "2";
605
- py: "1";
606
- minH: "7";
607
- fontWeight: "600";
515
+ px: number;
516
+ py: number;
608
517
  };
609
518
  };
610
519
  }>;
@@ -1995,6 +1904,28 @@ export declare const slotRecipes: {
1995
1904
  };
1996
1905
  };
1997
1906
  }>;
1907
+ status: import('@chakra-ui/react').SlotRecipeDefinition<"root" | "indicator", {
1908
+ size: {
1909
+ xs: {
1910
+ root: {
1911
+ boxSize: "6px";
1912
+ borderWidth: "1px";
1913
+ };
1914
+ };
1915
+ sm: {
1916
+ root: {
1917
+ boxSize: "8px";
1918
+ borderWidth: "1px";
1919
+ };
1920
+ };
1921
+ md: {
1922
+ root: {
1923
+ boxSize: "10px";
1924
+ borderWidth: "1px";
1925
+ };
1926
+ };
1927
+ };
1928
+ }>;
1998
1929
  switch: import('@chakra-ui/react').SlotRecipeDefinition<"label" | "root" | "indicator" | "control" | "thumb", {
1999
1930
  variant: {
2000
1931
  primary: {
@@ -0,0 +1,22 @@
1
+ export declare const recipe: import('@chakra-ui/react').SlotRecipeDefinition<"root" | "indicator", {
2
+ size: {
3
+ xs: {
4
+ root: {
5
+ boxSize: "6px";
6
+ borderWidth: "1px";
7
+ };
8
+ };
9
+ sm: {
10
+ root: {
11
+ boxSize: "8px";
12
+ borderWidth: "1px";
13
+ };
14
+ };
15
+ md: {
16
+ root: {
17
+ boxSize: "10px";
18
+ borderWidth: "1px";
19
+ };
20
+ };
21
+ };
22
+ }>;
@@ -1,2 +1,2 @@
1
1
  export declare function downloadBlob(blob: Blob, filename: string): void;
2
- export declare function saveAsCsv(headerRows: Array<string>, dataRows: Array<Array<string>>, filename: string): void;
2
+ export declare function saveAsCsv(data: Array<Array<string>>, filename: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blockscout/ui-toolkit",
3
- "version": "2.7.3",
3
+ "version": "2.8.0-alpha.0",
4
4
  "description": "A comprehensive collection of reusable Chakra UI components and theme system for Blockscout's projects",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -43,7 +43,7 @@
43
43
  "peerDependencies": {
44
44
  "@chakra-ui/react": ">=3.33.0",
45
45
  "@emotion/react": ">=11.14.0",
46
- "next": ">=15.2.3",
46
+ "next": ">=16.2.4",
47
47
  "next-themes": ">=0.4.4",
48
48
  "react": ">=18.3.1",
49
49
  "react-dom": ">=18.3.1",
@@ -56,7 +56,7 @@
56
56
  "@types/react-dom": "18.3.1",
57
57
  "@vitejs/plugin-react": "4.3.4",
58
58
  "typescript": "5.9.2",
59
- "vite": "6.4.1",
59
+ "vite": "6.4.2",
60
60
  "vite-plugin-dts": "4.5.4",
61
61
  "vite-plugin-svgr": "4.5.0",
62
62
  "vite-tsconfig-paths": "5.1.4"
@@ -66,9 +66,5 @@
66
66
  },
67
67
  "publishConfig": {
68
68
  "access": "public"
69
- },
70
- "resolutions": {
71
- "vite-plugin-dts/**/brace-expansion": "2.0.2",
72
- "vite-plugin-svgr/**/js-yaml": "4.1.1"
73
69
  }
74
70
  }
@@ -1,13 +0,0 @@
1
- import { default as React } from 'react';
2
- import { AxesConfigFn, ChartMargin, TimeChartData, Resolution } from './types';
3
- export interface ChartProps {
4
- charts: TimeChartData;
5
- zoomRange?: [Date, Date];
6
- onZoom: (range: [Date, Date]) => void;
7
- margin?: ChartMargin;
8
- noAnimation?: boolean;
9
- resolution?: Resolution;
10
- axesConfig?: AxesConfigFn;
11
- isEnlarged?: boolean;
12
- }
13
- export declare const Chart: React.MemoExoticComponent<({ isEnlarged, charts, onZoom, margin: marginProps, noAnimation, resolution, zoomRange, axesConfig: axesConfigProps, }: ChartProps) => React.JSX.Element>;
@@ -1,17 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Resolution, TimeChartData } from './types';
3
- export interface Props {
4
- open: boolean;
5
- onOpenChange: ({ open }: {
6
- open: boolean;
7
- }) => void;
8
- title: string;
9
- description?: string;
10
- charts: TimeChartData;
11
- resolution?: Resolution;
12
- zoomRange?: [Date, Date];
13
- handleZoom: (range: [Date, Date]) => void;
14
- handleZoomReset: () => void;
15
- }
16
- declare const FullscreenChartModal: ({ charts, open, onOpenChange, title, description, resolution, zoomRange, handleZoom, handleZoomReset, }: Props) => React.JSX.Element;
17
- export default FullscreenChartModal;
@@ -1,19 +0,0 @@
1
- import { FlexProps } from '@chakra-ui/react';
2
- import { default as React } from 'react';
3
- import { AxesConfigFn, TimeChartData } from './types';
4
- import { ChartMenuItemId } from './parts/ChartMenu';
5
- export interface ChartWidgetProps extends FlexProps {
6
- charts: TimeChartData;
7
- title: string;
8
- description?: string;
9
- isLoading: boolean;
10
- isError: boolean;
11
- emptyText?: string;
12
- noAnimation?: boolean;
13
- href?: string;
14
- chartUrl?: string;
15
- axesConfig?: AxesConfigFn;
16
- menuItemIds?: Array<ChartMenuItemId>;
17
- noWatermark?: boolean;
18
- }
19
- export declare const ChartWidget: React.MemoExoticComponent<({ charts, title, description, isLoading, isError, emptyText, noAnimation, href, chartUrl, axesConfig, menuItemIds, noWatermark, ...rest }: ChartWidgetProps) => React.JSX.Element>;
@@ -1,17 +0,0 @@
1
- import { default as React } from 'react';
2
- import { AxesConfigFn, Resolution, TimeChartData } from './types';
3
- export interface ChartWidgetContentProps {
4
- charts: TimeChartData;
5
- isLoading?: boolean;
6
- isError?: boolean;
7
- empty?: boolean;
8
- emptyText?: string;
9
- zoomRange?: [Date, Date];
10
- handleZoom: (range: [Date, Date]) => void;
11
- isEnlarged?: boolean;
12
- noAnimation?: boolean;
13
- resolution?: Resolution;
14
- axesConfig?: AxesConfigFn;
15
- noWatermark?: boolean;
16
- }
17
- export declare const ChartWidgetContent: React.MemoExoticComponent<({ charts, isLoading, isError, empty, emptyText, zoomRange, handleZoom, isEnlarged, noAnimation, resolution, axesConfig, noWatermark, }: ChartWidgetContentProps) => React.JSX.Element>;
@@ -1,10 +0,0 @@
1
- import { default as React } from 'react';
2
- import * as d3 from 'd3';
3
- export interface ChartGridLineProps extends Omit<React.SVGProps<SVGGElement>, 'scale'> {
4
- type: 'vertical' | 'horizontal';
5
- scale: d3.ScaleTime<number, number> | d3.ScaleLinear<number, number>;
6
- noAnimation?: boolean;
7
- size: number;
8
- ticks: number;
9
- }
10
- export declare const ChartGridLine: React.MemoExoticComponent<({ type, scale, ticks, size, noAnimation, ...props }: ChartGridLineProps) => React.JSX.Element>;
@@ -1,9 +0,0 @@
1
- import { BoxProps } from '@chakra-ui/react';
2
- import { default as React } from 'react';
3
- import { TimeChartData } from '../types';
4
- export interface ChartLegendProps extends BoxProps {
5
- data: TimeChartData;
6
- selectedIndexes?: Array<number>;
7
- onItemClick?: (index: number) => void;
8
- }
9
- export declare const ChartLegend: React.MemoExoticComponent<({ data, selectedIndexes, onItemClick, ...props }: ChartLegendProps) => React.JSX.Element>;
@@ -1,11 +0,0 @@
1
- import { default as React } from 'react';
2
- import { TimeChartItem } from '../types';
3
- import { AnimationType } from '../utils/animations';
4
- import * as d3 from 'd3';
5
- export interface ChartLineProps extends React.SVGProps<SVGPathElement> {
6
- xScale: d3.ScaleTime<number, number> | d3.ScaleLinear<number, number>;
7
- yScale: d3.ScaleTime<number, number> | d3.ScaleLinear<number, number>;
8
- data: Array<TimeChartItem>;
9
- animation: AnimationType;
10
- }
11
- export declare const ChartLine: React.MemoExoticComponent<({ xScale, yScale, data, animation, strokeDasharray, ...props }: ChartLineProps) => React.JSX.Element>;
@@ -1,19 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Resolution, TimeChartData } from '../types';
3
- export declare const CHART_MENU_ITEMS_IDS: ("share" | "fullscreen" | "save_png" | "save_csv")[];
4
- export type ChartMenuItemId = (typeof CHART_MENU_ITEMS_IDS)[number];
5
- export interface Props {
6
- itemIds?: Array<ChartMenuItemId>;
7
- charts: TimeChartData;
8
- title: string;
9
- description?: string;
10
- isLoading: boolean;
11
- chartRef: React.RefObject<HTMLDivElement | null>;
12
- chartUrl?: string;
13
- resolution?: Resolution;
14
- zoomRange?: [Date, Date];
15
- handleZoom: (range: [Date, Date]) => void;
16
- handleZoomReset: () => void;
17
- }
18
- declare const ChartMenu: ({ itemIds, charts, title, description, isLoading, chartRef, chartUrl, resolution, zoomRange, handleZoom, handleZoomReset, }: Props) => React.JSX.Element;
19
- export default ChartMenu;
@@ -1,7 +0,0 @@
1
- import { default as React } from 'react';
2
- export interface ChartOverlayProps {
3
- width: number;
4
- height: number;
5
- children: React.ReactNode;
6
- }
7
- export declare const ChartOverlay: React.ForwardRefExoticComponent<ChartOverlayProps & React.RefAttributes<SVGRectElement>>;
@@ -1,11 +0,0 @@
1
- import { default as React } from 'react';
2
- import { TimeChartData } from '../types';
3
- import * as d3 from 'd3';
4
- export interface ChartSelectionXProps {
5
- height: number;
6
- anchorEl?: SVGRectElement | null;
7
- scale: d3.ScaleTime<number, number>;
8
- data: TimeChartData;
9
- onSelect: (range: [Date, Date]) => void;
10
- }
11
- export declare const ChartSelectionX: React.MemoExoticComponent<({ anchorEl, height, scale, data, onSelect }: ChartSelectionXProps) => React.JSX.Element>;
@@ -1,15 +0,0 @@
1
- import { default as React } from 'react';
2
- import { Resolution, TimeChartData } from '../types';
3
- import * as d3 from 'd3';
4
- export interface ChartTooltipProps {
5
- width?: number;
6
- tooltipWidth?: number;
7
- height?: number;
8
- data: TimeChartData;
9
- xScale: d3.ScaleTime<number, number>;
10
- yScale: d3.ScaleLinear<number, number>;
11
- anchorEl: SVGRectElement | null;
12
- noAnimation?: boolean;
13
- resolution?: Resolution;
14
- }
15
- export declare const ChartTooltip: React.MemoExoticComponent<({ xScale, yScale, width, tooltipWidth, height, data, anchorEl, noAnimation, resolution, ...props }: ChartTooltipProps) => React.JSX.Element>;
@@ -1,18 +0,0 @@
1
- import { default as React } from 'react';
2
- import { SankeyLinkExtended } from '../types';
3
- export interface SankeyLinkProps {
4
- link: SankeyLinkExtended;
5
- /** Single color when gradient is not used */
6
- color?: string;
7
- /** When set with targetColor, link stroke is a gradient from source to target */
8
- sourceColor?: string;
9
- targetColor?: string;
10
- /** Unique suffix for gradient id (e.g. link index) when multiple links share same source/target */
11
- gradientIdSuffix?: string | number;
12
- opacity: number;
13
- hoverOpacity: number;
14
- pathGenerator: (link: SankeyLinkExtended, ...args: Array<any>) => string | null;
15
- onMouseEnter?: (link: SankeyLinkExtended, event: React.MouseEvent) => void;
16
- onMouseLeave?: () => void;
17
- }
18
- export declare const SankeyLink: React.MemoExoticComponent<({ link, color, sourceColor, targetColor, gradientIdSuffix, opacity, hoverOpacity, pathGenerator, onMouseEnter, onMouseLeave, }: SankeyLinkProps) => React.JSX.Element | null>;
@@ -1,9 +0,0 @@
1
- import { default as React } from 'react';
2
- import { SankeyNodeExtended } from '../types';
3
- export interface SankeyNodeProps {
4
- node: SankeyNodeExtended;
5
- color: string;
6
- onMouseEnter?: (node: SankeyNodeExtended, event: React.MouseEvent) => void;
7
- onMouseLeave?: () => void;
8
- }
9
- export declare const SankeyNode: React.MemoExoticComponent<({ node, color, onMouseEnter, onMouseLeave }: SankeyNodeProps) => React.JSX.Element | null>;
@@ -1,2 +0,0 @@
1
- import { TimeChartItem } from '../types';
2
- export declare const getIncompleteDataLineSource: (data: Array<TimeChartItem>) => Array<TimeChartItem>;
@@ -1,2 +0,0 @@
1
- import { Resolution } from '../types';
2
- export declare function getDateLabel(date: Date, dateTo?: Date, resolution?: Resolution): string;