@coinbase/cds-web-visualization 3.3.0 → 3.4.0-beta.2
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.
- package/CHANGELOG.md +30 -0
- package/dts/chart/CartesianChart.d.ts +36 -0
- package/dts/chart/CartesianChart.d.ts.map +1 -0
- package/dts/chart/ChartProvider.d.ts +6 -0
- package/dts/chart/ChartProvider.d.ts.map +1 -0
- package/dts/chart/Path.d.ts +34 -0
- package/dts/chart/Path.d.ts.map +1 -0
- package/dts/chart/PeriodSelector.d.ts +61 -0
- package/dts/chart/PeriodSelector.d.ts.map +1 -0
- package/dts/chart/Point.d.ts +153 -0
- package/dts/chart/Point.d.ts.map +1 -0
- package/dts/chart/area/Area.d.ts +48 -0
- package/dts/chart/area/Area.d.ts.map +1 -0
- package/dts/chart/area/AreaChart.d.ts +52 -0
- package/dts/chart/area/AreaChart.d.ts.map +1 -0
- package/dts/chart/area/DottedArea.d.ts +68 -0
- package/dts/chart/area/DottedArea.d.ts.map +1 -0
- package/dts/chart/area/GradientArea.d.ts +30 -0
- package/dts/chart/area/GradientArea.d.ts.map +1 -0
- package/dts/chart/area/SolidArea.d.ts +8 -0
- package/dts/chart/area/SolidArea.d.ts.map +1 -0
- package/dts/chart/area/index.d.ts +6 -0
- package/dts/chart/area/index.d.ts.map +1 -0
- package/dts/chart/axis/Axis.d.ts +208 -0
- package/dts/chart/axis/Axis.d.ts.map +1 -0
- package/dts/chart/axis/XAxis.d.ts +16 -0
- package/dts/chart/axis/XAxis.d.ts.map +1 -0
- package/dts/chart/axis/YAxis.d.ts +21 -0
- package/dts/chart/axis/YAxis.d.ts.map +1 -0
- package/dts/chart/axis/index.d.ts +4 -0
- package/dts/chart/axis/index.d.ts.map +1 -0
- package/dts/chart/bar/Bar.d.ts +91 -0
- package/dts/chart/bar/Bar.d.ts.map +1 -0
- package/dts/chart/bar/BarChart.d.ts +53 -0
- package/dts/chart/bar/BarChart.d.ts.map +1 -0
- package/dts/chart/bar/BarPlot.d.ts +29 -0
- package/dts/chart/bar/BarPlot.d.ts.map +1 -0
- package/dts/chart/bar/BarStack.d.ts +111 -0
- package/dts/chart/bar/BarStack.d.ts.map +1 -0
- package/dts/chart/bar/BarStackGroup.d.ts +35 -0
- package/dts/chart/bar/BarStackGroup.d.ts.map +1 -0
- package/dts/chart/bar/DefaultBar.d.ts +17 -0
- package/dts/chart/bar/DefaultBar.d.ts.map +1 -0
- package/dts/chart/bar/DefaultBarStack.d.ts +16 -0
- package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -0
- package/dts/chart/bar/index.d.ts +8 -0
- package/dts/chart/bar/index.d.ts.map +1 -0
- package/dts/chart/index.d.ts +13 -0
- package/dts/chart/index.d.ts.map +1 -0
- package/dts/chart/line/DottedLine.d.ts +14 -0
- package/dts/chart/line/DottedLine.d.ts.map +1 -0
- package/dts/chart/line/GradientLine.d.ts +42 -0
- package/dts/chart/line/GradientLine.d.ts.map +1 -0
- package/dts/chart/line/Line.d.ts +80 -0
- package/dts/chart/line/Line.d.ts.map +1 -0
- package/dts/chart/line/LineChart.d.ts +59 -0
- package/dts/chart/line/LineChart.d.ts.map +1 -0
- package/dts/chart/line/ReferenceLine.d.ts +131 -0
- package/dts/chart/line/ReferenceLine.d.ts.map +1 -0
- package/dts/chart/line/SolidLine.d.ts +14 -0
- package/dts/chart/line/SolidLine.d.ts.map +1 -0
- package/dts/chart/line/index.d.ts +7 -0
- package/dts/chart/line/index.d.ts.map +1 -0
- package/dts/chart/scrubber/Scrubber.d.ts +149 -0
- package/dts/chart/scrubber/Scrubber.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberBeacon.d.ts +93 -0
- package/dts/chart/scrubber/ScrubberBeacon.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberBeaconLabel.d.ts +7 -0
- package/dts/chart/scrubber/ScrubberBeaconLabel.d.ts.map +1 -0
- package/dts/chart/scrubber/ScrubberProvider.d.ts +17 -0
- package/dts/chart/scrubber/ScrubberProvider.d.ts.map +1 -0
- package/dts/chart/scrubber/index.d.ts +2 -0
- package/dts/chart/scrubber/index.d.ts.map +1 -0
- package/dts/chart/text/ChartText.d.ts +114 -0
- package/dts/chart/text/ChartText.d.ts.map +1 -0
- package/dts/chart/text/SmartChartTextGroup.d.ts +55 -0
- package/dts/chart/text/SmartChartTextGroup.d.ts.map +1 -0
- package/dts/chart/text/index.d.ts +3 -0
- package/dts/chart/text/index.d.ts.map +1 -0
- package/dts/chart/utils/axis.d.ts +342 -0
- package/dts/chart/utils/axis.d.ts.map +1 -0
- package/dts/chart/utils/bar.d.ts +20 -0
- package/dts/chart/utils/bar.d.ts.map +1 -0
- package/dts/chart/utils/chart.d.ts +97 -0
- package/dts/chart/utils/chart.d.ts.map +1 -0
- package/dts/chart/utils/context.d.ts +95 -0
- package/dts/chart/utils/context.d.ts.map +1 -0
- package/dts/chart/utils/index.d.ts +8 -0
- package/dts/chart/utils/index.d.ts.map +1 -0
- package/dts/chart/utils/path.d.ts +107 -0
- package/dts/chart/utils/path.d.ts.map +1 -0
- package/dts/chart/utils/point.d.ts +75 -0
- package/dts/chart/utils/point.d.ts.map +1 -0
- package/dts/chart/utils/scale.d.ts +43 -0
- package/dts/chart/utils/scale.d.ts.map +1 -0
- package/dts/index.d.ts +2 -1
- package/dts/index.d.ts.map +1 -1
- package/dts/sparkline/Counter.d.ts +7 -2
- package/dts/sparkline/Sparkline.d.ts +61 -16
- package/dts/sparkline/Sparkline.d.ts.map +1 -1
- package/dts/sparkline/SparklineArea.d.ts +12 -4
- package/dts/sparkline/SparklineArea.d.ts.map +1 -1
- package/dts/sparkline/SparklineAreaPattern.d.ts +12 -4
- package/dts/sparkline/SparklineAreaPattern.d.ts.map +1 -1
- package/dts/sparkline/SparklineGradient.d.ts +21 -10
- package/dts/sparkline/SparklineGradient.d.ts.map +1 -1
- package/dts/sparkline/SparklinePath.d.ts +8 -6
- package/dts/sparkline/__figma__/Sparkline.figma.d.ts +1 -1
- package/dts/sparkline/generateSparklineWithId.d.ts +8 -2
- package/dts/sparkline/generateSparklineWithId.d.ts.map +1 -1
- package/dts/sparkline/index.d.ts +1 -1
- package/dts/sparkline/sparkline-interactive/InnerSparklineInteractiveProvider.d.ts +9 -5
- package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts +168 -118
- package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts.map +1 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts +22 -9
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts.map +1 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.d.ts +4 -2
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveHoverPrice.d.ts +4 -2
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.d.ts +5 -3
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.d.ts +11 -6
- package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts +21 -7
- package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts.map +1 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractivePeriodSelector.d.ts +21 -16
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveProvider.d.ts +17 -12
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveScrubHandler.d.ts +23 -10
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveScrubProvider.d.ts +12 -12
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveTimeseriesPaths.d.ts +22 -14
- package/dts/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts +1 -1
- package/dts/sparkline/sparkline-interactive/fade.d.ts +1 -1
- package/dts/sparkline/sparkline-interactive/useSparklineInteractiveConstants.d.ts +11 -11
- package/dts/sparkline/sparkline-interactive-header/SparklineInteractiveHeader.d.ts +101 -93
- package/dts/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts +1 -1
- package/esm/chart/CartesianChart.css +1 -0
- package/esm/chart/CartesianChart.js +258 -0
- package/esm/chart/ChartProvider.js +10 -0
- package/esm/chart/Path.js +89 -0
- package/esm/chart/PeriodSelector.css +1 -0
- package/esm/chart/PeriodSelector.js +126 -0
- package/esm/chart/Point.css +2 -0
- package/esm/chart/Point.js +171 -0
- package/esm/chart/area/Area.js +85 -0
- package/esm/chart/area/AreaChart.js +164 -0
- package/esm/chart/area/DottedArea.js +141 -0
- package/esm/chart/area/GradientArea.js +111 -0
- package/esm/chart/area/SolidArea.js +29 -0
- package/esm/chart/area/index.js +7 -0
- package/esm/chart/axis/Axis.js +46 -0
- package/esm/chart/axis/XAxis.css +2 -0
- package/esm/chart/axis/XAxis.js +195 -0
- package/esm/chart/axis/YAxis.css +2 -0
- package/esm/chart/axis/YAxis.js +183 -0
- package/esm/chart/axis/index.js +5 -0
- package/esm/chart/bar/Bar.js +59 -0
- package/esm/chart/bar/BarChart.js +147 -0
- package/esm/chart/bar/BarPlot.js +96 -0
- package/esm/chart/bar/BarStack.js +519 -0
- package/esm/chart/bar/BarStackGroup.js +96 -0
- package/esm/chart/bar/DefaultBar.js +64 -0
- package/esm/chart/bar/DefaultBarStack.js +60 -0
- package/esm/chart/bar/index.js +9 -0
- package/esm/chart/index.js +14 -0
- package/esm/chart/line/DottedLine.js +38 -0
- package/esm/chart/line/GradientLine.js +58 -0
- package/esm/chart/line/Line.js +159 -0
- package/esm/chart/line/LineChart.js +120 -0
- package/esm/chart/line/ReferenceLine.js +142 -0
- package/esm/chart/line/SolidLine.js +34 -0
- package/esm/chart/line/index.js +8 -0
- package/esm/chart/scrubber/Scrubber.js +483 -0
- package/esm/chart/scrubber/ScrubberBeacon.js +195 -0
- package/esm/chart/scrubber/ScrubberBeaconLabel.js +33 -0
- package/esm/chart/scrubber/ScrubberProvider.js +228 -0
- package/esm/chart/scrubber/index.js +2 -0
- package/esm/chart/text/ChartText.js +236 -0
- package/esm/chart/text/SmartChartTextGroup.js +226 -0
- package/esm/chart/text/index.js +4 -0
- package/esm/chart/utils/axis.js +593 -0
- package/esm/chart/utils/bar.js +24 -0
- package/esm/chart/utils/chart.js +229 -0
- package/esm/chart/utils/context.js +15 -0
- package/esm/chart/utils/index.js +9 -0
- package/esm/chart/utils/path.js +204 -0
- package/esm/chart/utils/point.js +118 -0
- package/esm/chart/utils/scale.js +48 -0
- package/esm/index.js +4 -1
- package/esm/sparkline/Sparkline.js +129 -15
- package/esm/sparkline/SparklineArea.js +7 -2
- package/esm/sparkline/SparklineAreaPattern.js +4 -2
- package/esm/sparkline/SparklineGradient.js +16 -58
- package/esm/sparkline/generateSparklineWithId.js +3 -2
- package/esm/sparkline/sparkline-interactive/SparklineInteractive.js +5 -1
- package/esm/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.js +5 -2
- package/esm/sparkline/sparkline-interactive/SparklineInteractivePaths.js +4 -0
- package/package.json +15 -11
- package/dts/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.d.ts +0 -374
- package/dts/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractive.test.d.ts +0 -2
- package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractive.test.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePeriodSelector.test.d.ts +0 -2
- package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePeriodSelector.test.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.d.ts +0 -87
- package/dts/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive-header/__tests__/SparklineInteractiveHeader.test.d.ts +0 -2
- package/dts/sparkline/sparkline-interactive-header/__tests__/SparklineInteractiveHeader.test.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparklineGradient.d.ts","sourceRoot":"","sources":["../../src/sparkline/SparklineGradient.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"SparklineGradient.d.ts","sourceRoot":"","sources":["../../src/sparkline/SparklineGradient.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAIhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;2CAoB7B,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type SparklinePathRef = SVGPathElement | null;
|
|
3
3
|
export type SparklinePathBaseProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
/** The svg string path that is generate via useSparklinePath */
|
|
5
|
+
path?: string;
|
|
6
|
+
/** Color of the stroke for the path. */
|
|
7
|
+
stroke: string;
|
|
8
8
|
};
|
|
9
|
-
export declare const SparklinePath: React.MemoExoticComponent<
|
|
10
|
-
|
|
9
|
+
export declare const SparklinePath: React.MemoExoticComponent<
|
|
10
|
+
React.ForwardRefExoticComponent<SparklinePathBaseProps & React.RefAttributes<SparklinePathRef>>
|
|
11
|
+
>;
|
|
12
|
+
//# sourceMappingURL=SparklinePath.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export {};
|
|
2
|
-
//# sourceMappingURL=Sparkline.figma.d.ts.map
|
|
2
|
+
//# sourceMappingURL=Sparkline.figma.d.ts.map
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { ElementChildren } from '@coinbase/cds-common/types';
|
|
3
3
|
import type { SparklineAreaBaseProps } from './SparklineArea';
|
|
4
|
-
export declare function generateSparklineAreaWithId(
|
|
5
|
-
|
|
4
|
+
export declare function generateSparklineAreaWithId(
|
|
5
|
+
id: string,
|
|
6
|
+
children: ElementChildren<SparklineAreaBaseProps>,
|
|
7
|
+
maskId?: string,
|
|
8
|
+
):
|
|
9
|
+
| React.ReactElement<SparklineAreaBaseProps, string | React.JSXElementConstructor<any>>
|
|
10
|
+
| undefined;
|
|
11
|
+
//# sourceMappingURL=generateSparklineWithId.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generateSparklineWithId.d.ts","sourceRoot":"","sources":["../../src/sparkline/generateSparklineWithId.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE9D,wBAAgB,2BAA2B,CACzC,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,eAAe,CAAC,sBAAsB,CAAC,
|
|
1
|
+
{"version":3,"file":"generateSparklineWithId.d.ts","sourceRoot":"","sources":["../../src/sparkline/generateSparklineWithId.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAElE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAE9D,wBAAgB,2BAA2B,CACzC,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,eAAe,CAAC,sBAAsB,CAAC,EACjD,MAAM,CAAC,EAAE,MAAM,qGAQhB"}
|
package/dts/sparkline/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ export * from './sparkline-interactive/SparklineInteractive';
|
|
|
3
3
|
export * from './sparkline-interactive-header/SparklineInteractiveHeader';
|
|
4
4
|
export * from './SparklineArea';
|
|
5
5
|
export * from './SparklineGradient';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type InnerSparklineInteractiveProviderProps = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
width: number;
|
|
4
|
+
height: number;
|
|
5
|
+
children: React.ReactNode;
|
|
6
6
|
};
|
|
7
|
-
export declare const InnerSparklineInteractiveProvider: ({
|
|
7
|
+
export declare const InnerSparklineInteractiveProvider: ({
|
|
8
|
+
width,
|
|
9
|
+
height,
|
|
10
|
+
children,
|
|
11
|
+
}: InnerSparklineInteractiveProviderProps) => import('react/jsx-runtime').JSX.Element;
|
|
8
12
|
export {};
|
|
9
|
-
//# sourceMappingURL=InnerSparklineInteractiveProvider.d.ts.map
|
|
13
|
+
//# sourceMappingURL=InnerSparklineInteractiveProvider.d.ts.map
|
|
@@ -1,110 +1,125 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ThemeVars } from '@coinbase/cds-common/core/theme';
|
|
3
|
-
import type {
|
|
3
|
+
import type {
|
|
4
|
+
ChartData,
|
|
5
|
+
ChartFormatDate,
|
|
6
|
+
ChartScrubParams,
|
|
7
|
+
ChartTimeseries,
|
|
8
|
+
Placement,
|
|
9
|
+
} from '@coinbase/cds-common/types';
|
|
4
10
|
export * from '@coinbase/cds-common/types/Chart';
|
|
5
|
-
export type SparklineInteractiveDefaultFallback = Pick<
|
|
11
|
+
export type SparklineInteractiveDefaultFallback = Pick<
|
|
12
|
+
SparklineInteractiveBaseProps<string>,
|
|
13
|
+
'fallbackType' | 'compact'
|
|
14
|
+
>;
|
|
6
15
|
export type SparklineInteractiveBaseProps<Period extends string> = {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Chart data bucketed by Period. Period is a string key
|
|
18
|
+
*/
|
|
19
|
+
data?: Record<Period, ChartData>;
|
|
20
|
+
/**
|
|
21
|
+
* A list of periods that the chart will use. label is what is shown in the bottom of the chart and the value is the key.
|
|
22
|
+
*/
|
|
23
|
+
periods: {
|
|
24
|
+
label: string;
|
|
25
|
+
value: Period;
|
|
26
|
+
}[];
|
|
27
|
+
/**
|
|
28
|
+
* default period value that the chart will use
|
|
29
|
+
*/
|
|
30
|
+
defaultPeriod: Period;
|
|
31
|
+
/**
|
|
32
|
+
* Callback when the user selects a new period.
|
|
33
|
+
*/
|
|
34
|
+
onPeriodChanged?: (period: Period) => void;
|
|
35
|
+
/**
|
|
36
|
+
* Callback when the user starts scrubbing
|
|
37
|
+
*/
|
|
38
|
+
onScrubStart?: () => void;
|
|
39
|
+
/**
|
|
40
|
+
* Callback when a user finishes scrubbing
|
|
41
|
+
*/
|
|
42
|
+
onScrubEnd?: () => void;
|
|
43
|
+
/**
|
|
44
|
+
* Callback used when the user is scrubbing. This will be called for every data point change.
|
|
45
|
+
*/
|
|
46
|
+
onScrub?: (params: ChartScrubParams<Period>) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Disables the scrub user interaction from the chart
|
|
49
|
+
*
|
|
50
|
+
* @default false
|
|
51
|
+
*/
|
|
52
|
+
disableScrubbing?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* function used to format the date that is shown in the bottom of the chart as the user scrubs
|
|
55
|
+
*/
|
|
56
|
+
formatDate: ChartFormatDate<Period>;
|
|
57
|
+
/**
|
|
58
|
+
* Color of the line*
|
|
59
|
+
*/
|
|
60
|
+
strokeColor: string;
|
|
61
|
+
/**
|
|
62
|
+
* Fallback shown in the chart when data is not available. This is usually a loading state.
|
|
63
|
+
*/
|
|
64
|
+
fallback?: React.ReactNode;
|
|
65
|
+
/**
|
|
66
|
+
* If you use the default fallback then this specifies if the fallback line is decreasing or increasing
|
|
67
|
+
*/
|
|
68
|
+
fallbackType?: 'positive' | 'negative';
|
|
69
|
+
/**
|
|
70
|
+
* Show the chart in compact height
|
|
71
|
+
*
|
|
72
|
+
* @default false
|
|
73
|
+
*/
|
|
74
|
+
compact?: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Hides the period selector at the bottom of the chart
|
|
77
|
+
*
|
|
78
|
+
* @default false
|
|
79
|
+
*/
|
|
80
|
+
hidePeriodSelector?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Adds an area fill to the Sparkline
|
|
83
|
+
*
|
|
84
|
+
* @default true
|
|
85
|
+
*/
|
|
86
|
+
fill?: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Type of fill to use for the area
|
|
89
|
+
* @default 'gradient'
|
|
90
|
+
*/
|
|
91
|
+
fillType?: 'dotted' | 'gradient';
|
|
92
|
+
/**
|
|
79
93
|
Formats the date above the chart as you scrub. Omit this if you don't want to show the date as the user scrubs
|
|
80
94
|
*/
|
|
81
|
-
|
|
82
|
-
|
|
95
|
+
formatHoverDate?: (date: Date, period: Period) => string;
|
|
96
|
+
/**
|
|
83
97
|
Formats the price above the chart as you scrub. Omit this if you don't want to show the price as the user scrubs
|
|
84
98
|
*/
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
99
|
+
formatHoverPrice?: (price: number) => string;
|
|
100
|
+
/**
|
|
101
|
+
* Adds a header node above the chart. It will be placed next to the period selector on web.
|
|
102
|
+
*/
|
|
103
|
+
headerNode?: React.ReactNode;
|
|
104
|
+
/**
|
|
105
|
+
* Optional data to show on hover/scrub instead of the original sparkline. This allows multiple timeseries lines.
|
|
106
|
+
*
|
|
107
|
+
* Period => timeseries list
|
|
108
|
+
*/
|
|
109
|
+
hoverData?: Record<Period, ChartTimeseries[]>;
|
|
110
|
+
/**
|
|
111
|
+
* Optional gutter to add to the Period selector. This is useful if you choose to use the full screen width for the chart
|
|
112
|
+
*/
|
|
113
|
+
timePeriodGutter?: ThemeVars.Space;
|
|
114
|
+
/**
|
|
115
|
+
* Optional placement prop that position the period selector component above or below the chart
|
|
116
|
+
*/
|
|
117
|
+
periodSelectorPlacement?: Extract<Placement, 'above' | 'below'>;
|
|
118
|
+
/** Scales the sparkline to show more or less variance. Use a number less than 1 for less variance and a number greater than 1 for more variance. If you use a number greater than 1 it may clip the boundaries of the sparkline. */
|
|
119
|
+
yAxisScalingFactor?: number;
|
|
106
120
|
};
|
|
107
|
-
export type SparklineInteractiveProps<Period extends string> =
|
|
121
|
+
export type SparklineInteractiveProps<Period extends string> =
|
|
122
|
+
SparklineInteractiveBaseProps<Period> & {
|
|
108
123
|
/**
|
|
109
124
|
* Custom class name for the root element.
|
|
110
125
|
*/
|
|
@@ -113,14 +128,14 @@ export type SparklineInteractiveProps<Period extends string> = SparklineInteract
|
|
|
113
128
|
* Custom class names for the component.
|
|
114
129
|
*/
|
|
115
130
|
classNames?: {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
131
|
+
/**
|
|
132
|
+
* Custom class name for the header node.
|
|
133
|
+
*/
|
|
134
|
+
header?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Custom class name for the root element.
|
|
137
|
+
*/
|
|
138
|
+
root?: string;
|
|
124
139
|
};
|
|
125
140
|
/**
|
|
126
141
|
* Custom styles for the root element.
|
|
@@ -130,20 +145,55 @@ export type SparklineInteractiveProps<Period extends string> = SparklineInteract
|
|
|
130
145
|
* Custom styles for the component.
|
|
131
146
|
*/
|
|
132
147
|
styles?: {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
148
|
+
/**
|
|
149
|
+
* Custom style for the header node.
|
|
150
|
+
*/
|
|
151
|
+
header?: React.CSSProperties;
|
|
152
|
+
/**
|
|
153
|
+
* Custom style for the root element.
|
|
154
|
+
*/
|
|
155
|
+
root?: React.CSSProperties;
|
|
141
156
|
};
|
|
142
157
|
/** Test ID for the header */
|
|
143
158
|
headerTestID?: string;
|
|
144
|
-
};
|
|
145
|
-
declare function SparklineInteractiveContentWithGeneric<Period extends string>({
|
|
159
|
+
};
|
|
160
|
+
declare function SparklineInteractiveContentWithGeneric<Period extends string>({
|
|
161
|
+
data,
|
|
162
|
+
periods,
|
|
163
|
+
defaultPeriod,
|
|
164
|
+
onPeriodChanged,
|
|
165
|
+
strokeColor,
|
|
166
|
+
onScrub,
|
|
167
|
+
onScrubStart,
|
|
168
|
+
onScrubEnd,
|
|
169
|
+
formatDate,
|
|
170
|
+
fallback,
|
|
171
|
+
hidePeriodSelector,
|
|
172
|
+
disableScrubbing,
|
|
173
|
+
fill,
|
|
174
|
+
fillType,
|
|
175
|
+
yAxisScalingFactor,
|
|
176
|
+
compact,
|
|
177
|
+
formatHoverDate,
|
|
178
|
+
formatHoverPrice,
|
|
179
|
+
headerNode,
|
|
180
|
+
fallbackType,
|
|
181
|
+
timePeriodGutter,
|
|
182
|
+
hoverData,
|
|
183
|
+
periodSelectorPlacement,
|
|
184
|
+
className,
|
|
185
|
+
classNames,
|
|
186
|
+
style,
|
|
187
|
+
styles,
|
|
188
|
+
headerTestID,
|
|
189
|
+
}: SparklineInteractiveProps<Period>): import('react/jsx-runtime').JSX.Element;
|
|
146
190
|
export declare const SparklineInteractiveContent: typeof SparklineInteractiveContentWithGeneric;
|
|
147
|
-
declare function SparklineInteractiveWithGeneric<Period extends string>({
|
|
191
|
+
declare function SparklineInteractiveWithGeneric<Period extends string>({
|
|
192
|
+
compact,
|
|
193
|
+
...props
|
|
194
|
+
}: SparklineInteractiveProps<Period>): import('react/jsx-runtime').JSX.Element;
|
|
195
|
+
/**
|
|
196
|
+
* @deprecated Use LineChart instead.
|
|
197
|
+
*/
|
|
148
198
|
export declare const SparklineInteractive: typeof SparklineInteractiveWithGeneric;
|
|
149
|
-
//# sourceMappingURL=SparklineInteractive.d.ts.map
|
|
199
|
+
//# sourceMappingURL=SparklineInteractive.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparklineInteractive.d.ts","sourceRoot":"","sources":["../../../src/sparkline/sparkline-interactive/SparklineInteractive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,SAAS,EACV,MAAM,4BAA4B,CAAC;AAkCpC,cAAc,kCAAkC,CAAC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B,EACxB,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,YAAyB,EACzB,gBAAgB,EAChB,SAAS,EACT,uBAAiC,EACjC,SAAS,EACT,UAAU,EACV,KAAK,EACL,MAAM,EACN,YAAY,GACb,EAAE,yBAAyB,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"SparklineInteractive.d.ts","sourceRoot":"","sources":["../../../src/sparkline/sparkline-interactive/SparklineInteractive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAC/E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,KAAK,EACV,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,SAAS,EACV,MAAM,4BAA4B,CAAC;AAkCpC,cAAc,kCAAkC,CAAC;AAEjD,MAAM,MAAM,mCAAmC,GAAG,IAAI,CACpD,6BAA6B,CAAC,MAAM,CAAC,EACrC,cAAc,GAAG,SAAS,CAC3B,CAAC;AAYF,MAAM,MAAM,6BAA6B,CAAC,MAAM,SAAS,MAAM,IAAI;IACjE;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACjC;;OAEG;IACH,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC5C;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3C;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;IACrD;;;;OAIG;I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AAC,EAAE,MAAM,CAAC;QAChB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,MAAM,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC7B;;WAEG;QACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC5B,CAAC;IACF,6BAA6B;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEJ,iBAAS,sCAAsC,CAAC,MAAM,SAAS,MAAM,EAAE,EACrE,IAAI,EACJ,OAAO,EACP,aAAa,EACb,eAAe,EACf,WAAW,EACX,OAAc,EACd,YAAmB,EACnB,UAAiB,EACjB,UAAU,EACV,QAAe,EACf,kBAA0B,EAC1B,gBAAwB,EACxB,IAAW,EACX,QAAqB,EACrB,kBAAwB,EACxB,OAAO,EACP,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,YAAyB,EACzB,gBAAgB,EAChB,SAAS,EACT,uBAAiC,EACjC,SAAS,EACT,UAAU,EACV,KAAK,EACL,MAAM,EACN,YAAY,GACb,EAAE,yBAAyB,CAAC,MAAM,CAAC,2CAgNnC;AAGD,eAAO,MAAM,2BAA2B,EAEnC,OAAO,sCAAsC,CAAC;AAEnD,iBAAS,+BAA+B,CAAC,MAAM,SAAS,MAAM,EAAE,EAC9D,OAAO,EACP,GAAG,KAAK,EACT,EAAE,yBAAyB,CAAC,MAAM,CAAC,2CAyBnC;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAE5B,OAAO,+BAA+B,CAAC"}
|
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import 'd3-transition';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { type SparklineFillType } from '../Sparkline';
|
|
3
4
|
export type SparklineInteractiveAnimatedPathProps = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
d: string;
|
|
6
|
+
color: string;
|
|
7
|
+
area?: string;
|
|
8
|
+
selectedPeriod: string;
|
|
9
|
+
fillType?: SparklineFillType;
|
|
10
|
+
yAxisScalingFactor?: number;
|
|
11
|
+
initialPath?: string;
|
|
12
|
+
initialArea?: string;
|
|
11
13
|
};
|
|
12
|
-
export declare const SparklineInteractiveAnimatedPath: React.MemoExoticComponent<
|
|
13
|
-
|
|
14
|
+
export declare const SparklineInteractiveAnimatedPath: React.MemoExoticComponent<
|
|
15
|
+
({
|
|
16
|
+
d,
|
|
17
|
+
color,
|
|
18
|
+
selectedPeriod,
|
|
19
|
+
area,
|
|
20
|
+
fillType,
|
|
21
|
+
yAxisScalingFactor,
|
|
22
|
+
initialPath,
|
|
23
|
+
initialArea,
|
|
24
|
+
}: SparklineInteractiveAnimatedPathProps) => import('react/jsx-runtime').JSX.Element
|
|
25
|
+
>;
|
|
26
|
+
//# sourceMappingURL=SparklineInteractiveAnimatedPath.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparklineInteractiveAnimatedPath.d.ts","sourceRoot":"","sources":["../../../src/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAwD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SparklineInteractiveAnimatedPath.d.ts","sourceRoot":"","sources":["../../../src/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAEvB,OAAO,KAAwD,MAAM,OAAO,CAAC;AAM7E,OAAO,EAAa,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAQjE,MAAM,MAAM,qCAAqC,GAAG;IAClD,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,eAAO,MAAM,gCAAgC,0HAUxC,qCAAqC,6CAiHzC,CAAC"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const SparklineInteractiveHoverDate: React.MemoExoticComponent<
|
|
3
|
-
|
|
2
|
+
export declare const SparklineInteractiveHoverDate: React.MemoExoticComponent<
|
|
3
|
+
() => import('react/jsx-runtime').JSX.Element
|
|
4
|
+
>;
|
|
5
|
+
//# sourceMappingURL=SparklineInteractiveHoverDate.d.ts.map
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const SparklineInteractiveHoverPrice: React.MemoExoticComponent<
|
|
3
|
-
|
|
2
|
+
export declare const SparklineInteractiveHoverPrice: React.MemoExoticComponent<
|
|
3
|
+
() => import('react/jsx-runtime').JSX.Element
|
|
4
|
+
>;
|
|
5
|
+
//# sourceMappingURL=SparklineInteractiveHoverPrice.d.ts.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type SparklineInteractiveLineVerticalProps = {
|
|
3
|
-
|
|
3
|
+
color: string;
|
|
4
4
|
};
|
|
5
|
-
export declare const SparklineInteractiveLineVertical: React.MemoExoticComponent<
|
|
6
|
-
|
|
5
|
+
export declare const SparklineInteractiveLineVertical: React.MemoExoticComponent<
|
|
6
|
+
({ color }: SparklineInteractiveLineVerticalProps) => import('react/jsx-runtime').JSX.Element
|
|
7
|
+
>;
|
|
8
|
+
//# sourceMappingURL=SparklineInteractiveLineVertical.d.ts.map
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import type { ThemeVars } from '@coinbase/cds-common/core/theme';
|
|
2
2
|
import type { ChartFormatDate, ChartGetMarker } from './SparklineInteractive';
|
|
3
3
|
export type SparklineInteractiveMarkerDatesProps<Period extends string> = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
getMarker: ChartGetMarker;
|
|
5
|
+
formatDate: ChartFormatDate<Period>;
|
|
6
|
+
selectedPeriod: Period;
|
|
7
|
+
timePeriodGutter?: ThemeVars.Space;
|
|
8
8
|
};
|
|
9
|
-
declare function SparklineInteractiveMarkerDatesWithGeneric<Period extends string>({
|
|
9
|
+
declare function SparklineInteractiveMarkerDatesWithGeneric<Period extends string>({
|
|
10
|
+
formatDate,
|
|
11
|
+
selectedPeriod,
|
|
12
|
+
getMarker,
|
|
13
|
+
timePeriodGutter,
|
|
14
|
+
}: SparklineInteractiveMarkerDatesProps<Period>): import('react/jsx-runtime').JSX.Element;
|
|
10
15
|
export declare const SparklineInteractiveMarkerDates: typeof SparklineInteractiveMarkerDatesWithGeneric;
|
|
11
16
|
export {};
|
|
12
|
-
//# sourceMappingURL=SparklineInteractiveMarkerDates.d.ts.map
|
|
17
|
+
//# sourceMappingURL=SparklineInteractiveMarkerDates.d.ts.map
|
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
import type { SparklineInteractiveBaseProps } from './SparklineInteractive';
|
|
2
|
-
export type SparklineInteractivePathsProps<Period extends string> = Pick<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
export type SparklineInteractivePathsProps<Period extends string> = Pick<
|
|
3
|
+
SparklineInteractiveBaseProps<Period>,
|
|
4
|
+
'fill' | 'fillType' | 'yAxisScalingFactor' | 'strokeColor' | 'hoverData' | 'compact'
|
|
5
|
+
> & {
|
|
6
|
+
showHoverData: boolean;
|
|
7
|
+
path: string;
|
|
8
|
+
area: string;
|
|
9
|
+
selectedPeriod: Period;
|
|
7
10
|
};
|
|
8
|
-
declare function SparklineInteractivePathsWithGeneric<Period extends string>({
|
|
11
|
+
declare function SparklineInteractivePathsWithGeneric<Period extends string>({
|
|
12
|
+
showHoverData,
|
|
13
|
+
fill,
|
|
14
|
+
fillType,
|
|
15
|
+
path,
|
|
16
|
+
area,
|
|
17
|
+
selectedPeriod,
|
|
18
|
+
yAxisScalingFactor,
|
|
19
|
+
strokeColor,
|
|
20
|
+
hoverData,
|
|
21
|
+
compact,
|
|
22
|
+
}: SparklineInteractivePathsProps<Period>): import('react/jsx-runtime').JSX.Element;
|
|
9
23
|
export declare const SparklineInteractivePaths: typeof SparklineInteractivePathsWithGeneric;
|
|
10
24
|
export {};
|
|
11
|
-
//# sourceMappingURL=SparklineInteractivePaths.d.ts.map
|
|
25
|
+
//# sourceMappingURL=SparklineInteractivePaths.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparklineInteractivePaths.d.ts","sourceRoot":"","sources":["../../../src/sparkline/sparkline-interactive/SparklineInteractivePaths.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAQ5E,MAAM,MAAM,8BAA8B,CAAC,MAAM,SAAS,MAAM,IAAI,IAAI,CACtE,6BAA6B,CAAC,MAAM,CAAC,EACrC,MAAM,GAAG,oBAAoB,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"SparklineInteractivePaths.d.ts","sourceRoot":"","sources":["../../../src/sparkline/sparkline-interactive/SparklineInteractivePaths.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC;AAQ5E,MAAM,MAAM,8BAA8B,CAAC,MAAM,SAAS,MAAM,IAAI,IAAI,CACtE,6BAA6B,CAAC,MAAM,CAAC,EACrC,MAAM,GAAG,UAAU,GAAG,oBAAoB,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,CACrF,GAAG;IACF,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,iBAAS,oCAAoC,CAAC,MAAM,SAAS,MAAM,EAAE,EACnE,aAAa,EACb,IAAI,EACJ,QAAqB,EACrB,IAAI,EACJ,IAAI,EACJ,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,OAAO,GACR,EAAE,8BAA8B,CAAC,MAAM,CAAC,2CA2CxC;AAED,eAAO,MAAM,yBAAyB,EAEjC,OAAO,oCAAoC,CAAC"}
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
export type SparklineInteractivePeriodSelectorProps<Period extends string> = {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
2
|
+
selectedPeriod: Period;
|
|
3
|
+
setSelectedPeriod: (period: Period) => void;
|
|
4
|
+
periods: {
|
|
5
|
+
label: string;
|
|
6
|
+
value: Period;
|
|
7
|
+
}[];
|
|
8
|
+
color: string;
|
|
9
9
|
};
|
|
10
10
|
export type SparklineInteractivePeriodProps<Period extends string> = {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
period: {
|
|
12
|
+
label: string;
|
|
13
|
+
value: Period;
|
|
14
|
+
};
|
|
15
|
+
selectedPeriod: Period;
|
|
16
|
+
setSelectedPeriod: SparklineInteractivePeriodSelectorProps<Period>['setSelectedPeriod'];
|
|
17
|
+
color: string;
|
|
18
18
|
};
|
|
19
|
-
export declare const SparklineInteractivePeriodSelector: <Period extends string>({
|
|
20
|
-
|
|
19
|
+
export declare const SparklineInteractivePeriodSelector: <Period extends string>({
|
|
20
|
+
selectedPeriod,
|
|
21
|
+
setSelectedPeriod,
|
|
22
|
+
periods,
|
|
23
|
+
color,
|
|
24
|
+
}: SparklineInteractivePeriodSelectorProps<Period>) => import('react/jsx-runtime').JSX.Element;
|
|
25
|
+
//# sourceMappingURL=SparklineInteractivePeriodSelector.d.ts.map
|
|
@@ -1,20 +1,25 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { Dispatch, SetStateAction } from 'react';
|
|
3
3
|
type SparklineInteractiveProviderProps = {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
compact?: boolean;
|
|
6
6
|
};
|
|
7
7
|
type SparklineInteractiveContextInterface = {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
isFallbackVisible: boolean;
|
|
9
|
+
compact: boolean;
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
showFallback: () => void;
|
|
13
|
+
hideFallback: () => void;
|
|
14
|
+
setWidth: Dispatch<SetStateAction<number>>;
|
|
15
|
+
setHeight: Dispatch<SetStateAction<number>>;
|
|
16
16
|
};
|
|
17
|
-
export declare const SparklineInteractiveProvider: React.MemoExoticComponent<
|
|
17
|
+
export declare const SparklineInteractiveProvider: React.MemoExoticComponent<
|
|
18
|
+
({
|
|
19
|
+
children,
|
|
20
|
+
compact,
|
|
21
|
+
}: SparklineInteractiveProviderProps) => import('react/jsx-runtime').JSX.Element
|
|
22
|
+
>;
|
|
18
23
|
export declare function useSparklineInteractiveContext(): SparklineInteractiveContextInterface;
|
|
19
24
|
export {};
|
|
20
|
-
//# sourceMappingURL=SparklineInteractiveProvider.d.ts.map
|
|
25
|
+
//# sourceMappingURL=SparklineInteractiveProvider.d.ts.map
|