@coinbase/cds-web-visualization 3.3.0 → 3.3.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.
Files changed (42) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/dts/index.d.ts +1 -1
  3. package/dts/sparkline/Counter.d.ts +7 -2
  4. package/dts/sparkline/Sparkline.d.ts +26 -16
  5. package/dts/sparkline/SparklineArea.d.ts +8 -4
  6. package/dts/sparkline/SparklineAreaPattern.d.ts +7 -4
  7. package/dts/sparkline/SparklineGradient.d.ts +16 -10
  8. package/dts/sparkline/SparklinePath.d.ts +8 -6
  9. package/dts/sparkline/__figma__/Sparkline.figma.d.ts +1 -1
  10. package/dts/sparkline/generateSparklineWithId.d.ts +7 -2
  11. package/dts/sparkline/index.d.ts +1 -1
  12. package/dts/sparkline/sparkline-interactive/InnerSparklineInteractiveProvider.d.ts +9 -5
  13. package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts +159 -118
  14. package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts +19 -9
  15. package/dts/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.d.ts +4 -2
  16. package/dts/sparkline/sparkline-interactive/SparklineInteractiveHoverPrice.d.ts +4 -2
  17. package/dts/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.d.ts +5 -3
  18. package/dts/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.d.ts +11 -6
  19. package/dts/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.d.ts.map +1 -1
  20. package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts +20 -7
  21. package/dts/sparkline/sparkline-interactive/SparklineInteractivePeriodSelector.d.ts +21 -16
  22. package/dts/sparkline/sparkline-interactive/SparklineInteractiveProvider.d.ts +17 -12
  23. package/dts/sparkline/sparkline-interactive/SparklineInteractiveScrubHandler.d.ts +23 -10
  24. package/dts/sparkline/sparkline-interactive/SparklineInteractiveScrubProvider.d.ts +12 -12
  25. package/dts/sparkline/sparkline-interactive/SparklineInteractiveTimeseriesPaths.d.ts +22 -14
  26. package/dts/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts +1 -1
  27. package/dts/sparkline/sparkline-interactive/fade.d.ts +1 -1
  28. package/dts/sparkline/sparkline-interactive/useSparklineInteractiveConstants.d.ts +11 -11
  29. package/dts/sparkline/sparkline-interactive-header/SparklineInteractiveHeader.d.ts +101 -93
  30. package/dts/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts +1 -1
  31. package/esm/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.js +8 -4
  32. package/package.json +11 -11
  33. package/dts/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.d.ts +0 -374
  34. package/dts/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.d.ts.map +0 -1
  35. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractive.test.d.ts +0 -2
  36. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractive.test.d.ts.map +0 -1
  37. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePeriodSelector.test.d.ts +0 -2
  38. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePeriodSelector.test.d.ts.map +0 -1
  39. package/dts/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.d.ts +0 -87
  40. package/dts/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.d.ts.map +0 -1
  41. package/dts/sparkline/sparkline-interactive-header/__tests__/SparklineInteractiveHeader.test.d.ts +0 -2
  42. package/dts/sparkline/sparkline-interactive-header/__tests__/SparklineInteractiveHeader.test.d.ts.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # @coinbase/cds-web-visualization
2
+
3
+ > [NPM registry](https://www.npmjs.com/package/@coinbase/cds-web-visualization)
4
+
5
+ All notable changes to this project will be documented in this file.
6
+
7
+ `@coinbase/cds-web-visualization` adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
+
9
+ <!-- template-start -->
10
+
11
+ ## 3.3.2 (10/1/2025 PST)
12
+
13
+ #### 🐞 Fixes
14
+
15
+ - Factor sparkline container offset in axis label calculations. [[#87](https://github.com/coinbase/cds/pull/87)]
16
+
17
+ ## 3.3.1 (10/1/2025 PST)
18
+
19
+ #### 🐞 Fixes
20
+
21
+ - Update links for new repo. [[#42](https://github.com/coinbase/cds/pull/42)]
22
+
23
+ ## 3.3.0 (9/18/2025 PST)
24
+
25
+ - Prepare for open source release.
package/dts/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  export * from './sparkline';
2
- //# sourceMappingURL=index.d.ts.map
2
+ //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,8 @@
1
1
  import type { CounterBaseProps } from '@coinbase/cds-web/visualizations/Counter';
2
- export declare const Counter: ({ startNum, endNum, renderNum, durationInMillis }: CounterBaseProps) => import("react/jsx-runtime").JSX.Element;
3
- //# sourceMappingURL=Counter.d.ts.map
2
+ export declare const Counter: ({
3
+ startNum,
4
+ endNum,
5
+ renderNum,
6
+ durationInMillis,
7
+ }: CounterBaseProps) => import('react/jsx-runtime').JSX.Element;
8
+ //# sourceMappingURL=Counter.d.ts.map
@@ -2,21 +2,31 @@ import React from 'react';
2
2
  import type { ElementChildren, SharedProps } from '@coinbase/cds-common/types';
3
3
  import type { SparklineAreaBaseProps } from './SparklineArea';
4
4
  export type SparklineBaseProps = SharedProps & {
5
- /** @danger Use this only if the background color beneath the Sparkline is a non-CDS color. It ensures an accessible contrast by returning either white or black when color is set to 'auto'. Accepts any valid color format (hex, RGB, RGBA). */
6
- background?: string;
7
- /** The color of the Sparkline graph's line. Accepts any raw color value (hex, rgba, hsl, etc) or 'auto'. Using 'auto' dynamically selects black or white for optimal accessibility. Does not work with CDS theme color names like 'fgPrimary' or CSS variables. */
8
- color: string;
9
- /** Height of the Sparkline */
10
- height: number;
11
- /** Svg path as string. CDS offers a `useSparklinePath` which is useful to generate this string. This is accessible via `import { useSparklinePath } from '@coinbase/cds-common/visualizations/useSparklinePath';`. Alternatively, you can use product tailored tooling to generate the SVG path. This component only requires a valid path string is provided. */
12
- path?: string;
13
- /** Width of the Sparkline */
14
- width: number;
15
- /** an optional SparklineArea that can be used to fill in the Sparkline */
16
- children?: ElementChildren<SparklineAreaBaseProps>;
17
- /** 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. */
18
- yAxisScalingFactor?: number;
5
+ /** @danger Use this only if the background color beneath the Sparkline is a non-CDS color. It ensures an accessible contrast by returning either white or black when color is set to 'auto'. Accepts any valid color format (hex, RGB, RGBA). */
6
+ background?: string;
7
+ /** The color of the Sparkline graph's line. Accepts any raw color value (hex, rgba, hsl, etc) or 'auto'. Using 'auto' dynamically selects black or white for optimal accessibility. Does not work with CDS theme color names like 'fgPrimary' or CSS variables. */
8
+ color: string;
9
+ /** Height of the Sparkline */
10
+ height: number;
11
+ /** Svg path as string. CDS offers a `useSparklinePath` which is useful to generate this string. This is accessible via `import { useSparklinePath } from '@coinbase/cds-common/visualizations/useSparklinePath';`. Alternatively, you can use product tailored tooling to generate the SVG path. This component only requires a valid path string is provided. */
12
+ path?: string;
13
+ /** Width of the Sparkline */
14
+ width: number;
15
+ /** an optional SparklineArea that can be used to fill in the Sparkline */
16
+ children?: ElementChildren<SparklineAreaBaseProps>;
17
+ /** 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. */
18
+ yAxisScalingFactor?: number;
19
19
  };
20
20
  export type SparklineProps = SparklineBaseProps;
21
- export declare const Sparkline: React.MemoExoticComponent<({ background, color, height, path, width, yAxisScalingFactor, children, }: SparklineBaseProps) => import("react/jsx-runtime").JSX.Element>;
22
- //# sourceMappingURL=Sparkline.d.ts.map
21
+ export declare const Sparkline: React.MemoExoticComponent<
22
+ ({
23
+ background,
24
+ color,
25
+ height,
26
+ path,
27
+ width,
28
+ yAxisScalingFactor,
29
+ children,
30
+ }: SparklineBaseProps) => import('react/jsx-runtime').JSX.Element
31
+ >;
32
+ //# sourceMappingURL=Sparkline.d.ts.map
@@ -1,7 +1,11 @@
1
1
  import React from 'react';
2
2
  export type SparklineAreaBaseProps = {
3
- area?: string;
4
- patternId?: string;
3
+ area?: string;
4
+ patternId?: string;
5
5
  };
6
- export declare const SparklineArea: React.MemoExoticComponent<React.ForwardRefExoticComponent<SparklineAreaBaseProps & React.RefAttributes<SVGPathElement | null>>>;
7
- //# sourceMappingURL=SparklineArea.d.ts.map
6
+ export declare const SparklineArea: React.MemoExoticComponent<
7
+ React.ForwardRefExoticComponent<
8
+ SparklineAreaBaseProps & React.RefAttributes<SVGPathElement | null>
9
+ >
10
+ >;
11
+ //# sourceMappingURL=SparklineArea.d.ts.map
@@ -1,6 +1,9 @@
1
1
  export type SparklineAreaPatternBaseProps = {
2
- color: string;
3
- id: string;
2
+ color: string;
3
+ id: string;
4
4
  };
5
- export declare const SparklineAreaPattern: ({ color, id }: SparklineAreaPatternBaseProps) => import("react/jsx-runtime").JSX.Element;
6
- //# sourceMappingURL=SparklineAreaPattern.d.ts.map
5
+ export declare const SparklineAreaPattern: ({
6
+ color,
7
+ id,
8
+ }: SparklineAreaPatternBaseProps) => import('react/jsx-runtime').JSX.Element;
9
+ //# sourceMappingURL=SparklineAreaPattern.d.ts.map
@@ -1,12 +1,18 @@
1
1
  import React from 'react';
2
2
  import type { SparklinePathRef } from './SparklinePath';
3
- export declare const SparklineGradient: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("@coinbase/cds-common").SharedProps & {
4
- background?: string;
5
- color: string;
6
- height: number;
7
- path?: string;
8
- width: number;
9
- children?: import("@coinbase/cds-common").ElementChildren<import("./SparklineArea").SparklineAreaBaseProps>;
10
- yAxisScalingFactor?: number;
11
- } & React.RefAttributes<SparklinePathRef>>>;
12
- //# sourceMappingURL=SparklineGradient.d.ts.map
3
+ export declare const SparklineGradient: React.MemoExoticComponent<
4
+ React.ForwardRefExoticComponent<
5
+ import('@coinbase/cds-common').SharedProps & {
6
+ background?: string;
7
+ color: string;
8
+ height: number;
9
+ path?: string;
10
+ width: number;
11
+ children?: import('@coinbase/cds-common').ElementChildren<
12
+ import('./SparklineArea').SparklineAreaBaseProps
13
+ >;
14
+ yAxisScalingFactor?: number;
15
+ } & React.RefAttributes<SparklinePathRef>
16
+ >
17
+ >;
18
+ //# sourceMappingURL=SparklineGradient.d.ts.map
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  export type SparklinePathRef = SVGPathElement | null;
3
3
  export type SparklinePathBaseProps = {
4
- /** The svg string path that is generate via useSparklinePath */
5
- path?: string;
6
- /** Color of the stroke for the path. */
7
- stroke: string;
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<React.ForwardRefExoticComponent<SparklinePathBaseProps & React.RefAttributes<SparklinePathRef>>>;
10
- //# sourceMappingURL=SparklinePath.d.ts.map
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,10 @@
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(id: string, children: ElementChildren<SparklineAreaBaseProps>): React.ReactElement<SparklineAreaBaseProps, string | React.JSXElementConstructor<any>> | undefined;
5
- //# sourceMappingURL=generateSparklineWithId.d.ts.map
4
+ export declare function generateSparklineAreaWithId(
5
+ id: string,
6
+ children: ElementChildren<SparklineAreaBaseProps>,
7
+ ):
8
+ | React.ReactElement<SparklineAreaBaseProps, string | React.JSXElementConstructor<any>>
9
+ | undefined;
10
+ //# sourceMappingURL=generateSparklineWithId.d.ts.map
@@ -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
- width: number;
4
- height: number;
5
- children: React.ReactNode;
3
+ width: number;
4
+ height: number;
5
+ children: React.ReactNode;
6
6
  };
7
- export declare const InnerSparklineInteractiveProvider: ({ width, height, children, }: InnerSparklineInteractiveProviderProps) => import("react/jsx-runtime").JSX.Element;
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,120 @@
1
1
  import React from 'react';
2
2
  import type { ThemeVars } from '@coinbase/cds-common/core/theme';
3
- import type { ChartData, ChartFormatDate, ChartScrubParams, ChartTimeseries, Placement } from '@coinbase/cds-common/types';
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<SparklineInteractiveBaseProps<string>, 'fallbackType' | 'compact'>;
11
+ export type SparklineInteractiveDefaultFallback = Pick<
12
+ SparklineInteractiveBaseProps<string>,
13
+ 'fallbackType' | 'compact'
14
+ >;
6
15
  export type SparklineInteractiveBaseProps<Period extends string> = {
7
- /**
8
- * Chart data bucketed by Period. Period is a string key
9
- */
10
- data?: Record<Period, ChartData>;
11
- /**
12
- * 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.
13
- */
14
- periods: {
15
- label: string;
16
- value: Period;
17
- }[];
18
- /**
19
- * default period value that the chart will use
20
- */
21
- defaultPeriod: Period;
22
- /**
23
- * Callback when the user selects a new period.
24
- */
25
- onPeriodChanged?: (period: Period) => void;
26
- /**
27
- * Callback when the user starts scrubbing
28
- */
29
- onScrubStart?: () => void;
30
- /**
31
- * Callback when a user finishes scrubbing
32
- */
33
- onScrubEnd?: () => void;
34
- /**
35
- * Callback used when the user is scrubbing. This will be called for every data point change.
36
- */
37
- onScrub?: (params: ChartScrubParams<Period>) => void;
38
- /**
39
- * Disables the scrub user interaction from the chart
40
- *
41
- * @default false
42
- */
43
- disableScrubbing?: boolean;
44
- /**
45
- * function used to format the date that is shown in the bottom of the chart as the user scrubs
46
- */
47
- formatDate: ChartFormatDate<Period>;
48
- /**
49
- * Color of the line*
50
- */
51
- strokeColor: string;
52
- /**
53
- * Fallback shown in the chart when data is not available. This is usually a loading state.
54
- */
55
- fallback?: React.ReactNode;
56
- /**
57
- * If you use the default fallback then this specifies if the fallback line is decreasing or increasing
58
- */
59
- fallbackType?: 'positive' | 'negative';
60
- /**
61
- * Show the chart in compact height
62
- *
63
- * @default false
64
- */
65
- compact?: boolean;
66
- /**
67
- * Hides the period selector at the bottom of the chart
68
- *
69
- * @default false
70
- */
71
- hidePeriodSelector?: boolean;
72
- /**
73
- * Adds an area fill to the Sparkline
74
- *
75
- * @default true
76
- */
77
- fill?: boolean;
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
+ /**
79
88
  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
89
  */
81
- formatHoverDate?: (date: Date, period: Period) => string;
82
- /**
90
+ formatHoverDate?: (date: Date, period: Period) => string;
91
+ /**
83
92
  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
93
  */
85
- formatHoverPrice?: (price: number) => string;
86
- /**
87
- * Adds a header node above the chart. It will be placed next to the period selector on web.
88
- */
89
- headerNode?: React.ReactNode;
90
- /**
91
- * Optional data to show on hover/scrub instead of the original sparkline. This allows multiple timeseries lines.
92
- *
93
- * Period => timeseries list
94
- */
95
- hoverData?: Record<Period, ChartTimeseries[]>;
96
- /**
97
- * Optional gutter to add to the Period selector. This is useful if you choose to use the full screen width for the chart
98
- */
99
- timePeriodGutter?: ThemeVars.Space;
100
- /**
101
- * Optional placement prop that position the period selector component above or below the chart
102
- */
103
- periodSelectorPlacement?: Extract<Placement, 'above' | 'below'>;
104
- /** 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. */
105
- yAxisScalingFactor?: number;
94
+ formatHoverPrice?: (price: number) => string;
95
+ /**
96
+ * Adds a header node above the chart. It will be placed next to the period selector on web.
97
+ */
98
+ headerNode?: React.ReactNode;
99
+ /**
100
+ * Optional data to show on hover/scrub instead of the original sparkline. This allows multiple timeseries lines.
101
+ *
102
+ * Period => timeseries list
103
+ */
104
+ hoverData?: Record<Period, ChartTimeseries[]>;
105
+ /**
106
+ * Optional gutter to add to the Period selector. This is useful if you choose to use the full screen width for the chart
107
+ */
108
+ timePeriodGutter?: ThemeVars.Space;
109
+ /**
110
+ * Optional placement prop that position the period selector component above or below the chart
111
+ */
112
+ periodSelectorPlacement?: Extract<Placement, 'above' | 'below'>;
113
+ /** 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. */
114
+ yAxisScalingFactor?: number;
106
115
  };
107
- export type SparklineInteractiveProps<Period extends string> = SparklineInteractiveBaseProps<Period> & {
116
+ export type SparklineInteractiveProps<Period extends string> =
117
+ SparklineInteractiveBaseProps<Period> & {
108
118
  /**
109
119
  * Custom class name for the root element.
110
120
  */
@@ -113,14 +123,14 @@ export type SparklineInteractiveProps<Period extends string> = SparklineInteract
113
123
  * Custom class names for the component.
114
124
  */
115
125
  classNames?: {
116
- /**
117
- * Custom class name for the header node.
118
- */
119
- header?: string;
120
- /**
121
- * Custom class name for the root element.
122
- */
123
- root?: string;
126
+ /**
127
+ * Custom class name for the header node.
128
+ */
129
+ header?: string;
130
+ /**
131
+ * Custom class name for the root element.
132
+ */
133
+ root?: string;
124
134
  };
125
135
  /**
126
136
  * Custom styles for the root element.
@@ -130,20 +140,51 @@ export type SparklineInteractiveProps<Period extends string> = SparklineInteract
130
140
  * Custom styles for the component.
131
141
  */
132
142
  styles?: {
133
- /**
134
- * Custom style for the header node.
135
- */
136
- header?: React.CSSProperties;
137
- /**
138
- * Custom style for the root element.
139
- */
140
- root?: React.CSSProperties;
143
+ /**
144
+ * Custom style for the header node.
145
+ */
146
+ header?: React.CSSProperties;
147
+ /**
148
+ * Custom style for the root element.
149
+ */
150
+ root?: React.CSSProperties;
141
151
  };
142
152
  /** Test ID for the header */
143
153
  headerTestID?: string;
144
- };
145
- declare function SparklineInteractiveContentWithGeneric<Period extends string>({ data, periods, defaultPeriod, onPeriodChanged, strokeColor, onScrub, onScrubStart, onScrubEnd, formatDate, fallback, hidePeriodSelector, disableScrubbing, fill, yAxisScalingFactor, compact, formatHoverDate, formatHoverPrice, headerNode, fallbackType, timePeriodGutter, hoverData, periodSelectorPlacement, className, classNames, style, styles, headerTestID, }: SparklineInteractiveProps<Period>): import("react/jsx-runtime").JSX.Element;
154
+ };
155
+ declare function SparklineInteractiveContentWithGeneric<Period extends string>({
156
+ data,
157
+ periods,
158
+ defaultPeriod,
159
+ onPeriodChanged,
160
+ strokeColor,
161
+ onScrub,
162
+ onScrubStart,
163
+ onScrubEnd,
164
+ formatDate,
165
+ fallback,
166
+ hidePeriodSelector,
167
+ disableScrubbing,
168
+ fill,
169
+ yAxisScalingFactor,
170
+ compact,
171
+ formatHoverDate,
172
+ formatHoverPrice,
173
+ headerNode,
174
+ fallbackType,
175
+ timePeriodGutter,
176
+ hoverData,
177
+ periodSelectorPlacement,
178
+ className,
179
+ classNames,
180
+ style,
181
+ styles,
182
+ headerTestID,
183
+ }: SparklineInteractiveProps<Period>): import('react/jsx-runtime').JSX.Element;
146
184
  export declare const SparklineInteractiveContent: typeof SparklineInteractiveContentWithGeneric;
147
- declare function SparklineInteractiveWithGeneric<Period extends string>({ compact, ...props }: SparklineInteractiveProps<Period>): import("react/jsx-runtime").JSX.Element;
185
+ declare function SparklineInteractiveWithGeneric<Period extends string>({
186
+ compact,
187
+ ...props
188
+ }: SparklineInteractiveProps<Period>): import('react/jsx-runtime').JSX.Element;
148
189
  export declare const SparklineInteractive: typeof SparklineInteractiveWithGeneric;
149
- //# sourceMappingURL=SparklineInteractive.d.ts.map
190
+ //# sourceMappingURL=SparklineInteractive.d.ts.map
@@ -1,13 +1,23 @@
1
1
  import 'd3-transition';
2
2
  import React from 'react';
3
3
  export type SparklineInteractiveAnimatedPathProps = {
4
- d: string;
5
- color: string;
6
- area?: string;
7
- selectedPeriod: string;
8
- yAxisScalingFactor?: number;
9
- initialPath?: string;
10
- initialArea?: string;
4
+ d: string;
5
+ color: string;
6
+ area?: string;
7
+ selectedPeriod: string;
8
+ yAxisScalingFactor?: number;
9
+ initialPath?: string;
10
+ initialArea?: string;
11
11
  };
12
- export declare const SparklineInteractiveAnimatedPath: React.MemoExoticComponent<({ d, color, selectedPeriod, area, yAxisScalingFactor, initialPath, initialArea, }: SparklineInteractiveAnimatedPathProps) => import("react/jsx-runtime").JSX.Element>;
13
- //# sourceMappingURL=SparklineInteractiveAnimatedPath.d.ts.map
12
+ export declare const SparklineInteractiveAnimatedPath: React.MemoExoticComponent<
13
+ ({
14
+ d,
15
+ color,
16
+ selectedPeriod,
17
+ area,
18
+ yAxisScalingFactor,
19
+ initialPath,
20
+ initialArea,
21
+ }: SparklineInteractiveAnimatedPathProps) => import('react/jsx-runtime').JSX.Element
22
+ >;
23
+ //# sourceMappingURL=SparklineInteractiveAnimatedPath.d.ts.map
@@ -1,3 +1,5 @@
1
1
  import React from 'react';
2
- export declare const SparklineInteractiveHoverDate: React.MemoExoticComponent<() => import("react/jsx-runtime").JSX.Element>;
3
- //# sourceMappingURL=SparklineInteractiveHoverDate.d.ts.map
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<() => import("react/jsx-runtime").JSX.Element>;
3
- //# sourceMappingURL=SparklineInteractiveHoverPrice.d.ts.map
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
- color: string;
3
+ color: string;
4
4
  };
5
- export declare const SparklineInteractiveLineVertical: React.MemoExoticComponent<({ color }: SparklineInteractiveLineVerticalProps) => import("react/jsx-runtime").JSX.Element>;
6
- //# sourceMappingURL=SparklineInteractiveLineVertical.d.ts.map
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
- getMarker: ChartGetMarker;
5
- formatDate: ChartFormatDate<Period>;
6
- selectedPeriod: Period;
7
- timePeriodGutter?: ThemeVars.Space;
4
+ getMarker: ChartGetMarker;
5
+ formatDate: ChartFormatDate<Period>;
6
+ selectedPeriod: Period;
7
+ timePeriodGutter?: ThemeVars.Space;
8
8
  };
9
- declare function SparklineInteractiveMarkerDatesWithGeneric<Period extends string>({ formatDate, selectedPeriod, getMarker, timePeriodGutter, }: SparklineInteractiveMarkerDatesProps<Period>): import("react/jsx-runtime").JSX.Element;
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 +1 @@
1
- {"version":3,"file":"SparklineInteractiveMarkerDates.d.ts","sourceRoot":"","sources":["../../../src/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AASjE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AA8C9E,MAAM,MAAM,oCAAoC,CAAC,MAAM,SAAS,MAAM,IAAI;IACxE,SAAS,EAAE,cAAc,CAAC;IAC1B,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;CACpC,CAAC;AAEF,iBAAS,0CAA0C,CAAC,MAAM,SAAS,MAAM,EAAE,EACzE,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAoB,GACrB,EAAE,oCAAoC,CAAC,MAAM,CAAC,2CAkC9C;AAED,eAAO,MAAM,+BAA+B,EAEvC,OAAO,0CAA0C,CAAC"}
1
+ {"version":3,"file":"SparklineInteractiveMarkerDates.d.ts","sourceRoot":"","sources":["../../../src/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AASjE,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAkD9E,MAAM,MAAM,oCAAoC,CAAC,MAAM,SAAS,MAAM,IAAI;IACxE,SAAS,EAAE,cAAc,CAAC;IAC1B,UAAU,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACpC,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;CACpC,CAAC;AAEF,iBAAS,0CAA0C,CAAC,MAAM,SAAS,MAAM,EAAE,EACzE,UAAU,EACV,cAAc,EACd,SAAS,EACT,gBAAoB,GACrB,EAAE,oCAAoC,CAAC,MAAM,CAAC,2CA0C9C;AAED,eAAO,MAAM,+BAA+B,EAEvC,OAAO,0CAA0C,CAAC"}