@coinbase/cds-web-visualization 3.3.0 → 3.4.0-beta.1

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 (204) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dts/chart/CartesianChart.d.ts +36 -0
  3. package/dts/chart/CartesianChart.d.ts.map +1 -0
  4. package/dts/chart/ChartProvider.d.ts +6 -0
  5. package/dts/chart/ChartProvider.d.ts.map +1 -0
  6. package/dts/chart/Path.d.ts +34 -0
  7. package/dts/chart/Path.d.ts.map +1 -0
  8. package/dts/chart/PeriodSelector.d.ts +61 -0
  9. package/dts/chart/PeriodSelector.d.ts.map +1 -0
  10. package/dts/chart/Point.d.ts +153 -0
  11. package/dts/chart/Point.d.ts.map +1 -0
  12. package/dts/chart/area/Area.d.ts +48 -0
  13. package/dts/chart/area/Area.d.ts.map +1 -0
  14. package/dts/chart/area/AreaChart.d.ts +52 -0
  15. package/dts/chart/area/AreaChart.d.ts.map +1 -0
  16. package/dts/chart/area/DottedArea.d.ts +68 -0
  17. package/dts/chart/area/DottedArea.d.ts.map +1 -0
  18. package/dts/chart/area/GradientArea.d.ts +30 -0
  19. package/dts/chart/area/GradientArea.d.ts.map +1 -0
  20. package/dts/chart/area/SolidArea.d.ts +8 -0
  21. package/dts/chart/area/SolidArea.d.ts.map +1 -0
  22. package/dts/chart/area/index.d.ts +6 -0
  23. package/dts/chart/area/index.d.ts.map +1 -0
  24. package/dts/chart/axis/Axis.d.ts +208 -0
  25. package/dts/chart/axis/Axis.d.ts.map +1 -0
  26. package/dts/chart/axis/XAxis.d.ts +16 -0
  27. package/dts/chart/axis/XAxis.d.ts.map +1 -0
  28. package/dts/chart/axis/YAxis.d.ts +21 -0
  29. package/dts/chart/axis/YAxis.d.ts.map +1 -0
  30. package/dts/chart/axis/index.d.ts +4 -0
  31. package/dts/chart/axis/index.d.ts.map +1 -0
  32. package/dts/chart/bar/Bar.d.ts +91 -0
  33. package/dts/chart/bar/Bar.d.ts.map +1 -0
  34. package/dts/chart/bar/BarChart.d.ts +53 -0
  35. package/dts/chart/bar/BarChart.d.ts.map +1 -0
  36. package/dts/chart/bar/BarPlot.d.ts +29 -0
  37. package/dts/chart/bar/BarPlot.d.ts.map +1 -0
  38. package/dts/chart/bar/BarStack.d.ts +111 -0
  39. package/dts/chart/bar/BarStack.d.ts.map +1 -0
  40. package/dts/chart/bar/BarStackGroup.d.ts +35 -0
  41. package/dts/chart/bar/BarStackGroup.d.ts.map +1 -0
  42. package/dts/chart/bar/DefaultBar.d.ts +17 -0
  43. package/dts/chart/bar/DefaultBar.d.ts.map +1 -0
  44. package/dts/chart/bar/DefaultBarStack.d.ts +16 -0
  45. package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -0
  46. package/dts/chart/bar/index.d.ts +8 -0
  47. package/dts/chart/bar/index.d.ts.map +1 -0
  48. package/dts/chart/index.d.ts +13 -0
  49. package/dts/chart/index.d.ts.map +1 -0
  50. package/dts/chart/line/DottedLine.d.ts +14 -0
  51. package/dts/chart/line/DottedLine.d.ts.map +1 -0
  52. package/dts/chart/line/GradientLine.d.ts +42 -0
  53. package/dts/chart/line/GradientLine.d.ts.map +1 -0
  54. package/dts/chart/line/Line.d.ts +80 -0
  55. package/dts/chart/line/Line.d.ts.map +1 -0
  56. package/dts/chart/line/LineChart.d.ts +59 -0
  57. package/dts/chart/line/LineChart.d.ts.map +1 -0
  58. package/dts/chart/line/ReferenceLine.d.ts +131 -0
  59. package/dts/chart/line/ReferenceLine.d.ts.map +1 -0
  60. package/dts/chart/line/SolidLine.d.ts +14 -0
  61. package/dts/chart/line/SolidLine.d.ts.map +1 -0
  62. package/dts/chart/line/index.d.ts +7 -0
  63. package/dts/chart/line/index.d.ts.map +1 -0
  64. package/dts/chart/scrubber/Scrubber.d.ts +149 -0
  65. package/dts/chart/scrubber/Scrubber.d.ts.map +1 -0
  66. package/dts/chart/scrubber/ScrubberBeacon.d.ts +93 -0
  67. package/dts/chart/scrubber/ScrubberBeacon.d.ts.map +1 -0
  68. package/dts/chart/scrubber/ScrubberBeaconLabel.d.ts +7 -0
  69. package/dts/chart/scrubber/ScrubberBeaconLabel.d.ts.map +1 -0
  70. package/dts/chart/scrubber/ScrubberProvider.d.ts +17 -0
  71. package/dts/chart/scrubber/ScrubberProvider.d.ts.map +1 -0
  72. package/dts/chart/scrubber/index.d.ts +2 -0
  73. package/dts/chart/scrubber/index.d.ts.map +1 -0
  74. package/dts/chart/text/ChartText.d.ts +114 -0
  75. package/dts/chart/text/ChartText.d.ts.map +1 -0
  76. package/dts/chart/text/SmartChartTextGroup.d.ts +55 -0
  77. package/dts/chart/text/SmartChartTextGroup.d.ts.map +1 -0
  78. package/dts/chart/text/index.d.ts +3 -0
  79. package/dts/chart/text/index.d.ts.map +1 -0
  80. package/dts/chart/utils/axis.d.ts +342 -0
  81. package/dts/chart/utils/axis.d.ts.map +1 -0
  82. package/dts/chart/utils/bar.d.ts +20 -0
  83. package/dts/chart/utils/bar.d.ts.map +1 -0
  84. package/dts/chart/utils/chart.d.ts +97 -0
  85. package/dts/chart/utils/chart.d.ts.map +1 -0
  86. package/dts/chart/utils/context.d.ts +95 -0
  87. package/dts/chart/utils/context.d.ts.map +1 -0
  88. package/dts/chart/utils/index.d.ts +8 -0
  89. package/dts/chart/utils/index.d.ts.map +1 -0
  90. package/dts/chart/utils/path.d.ts +107 -0
  91. package/dts/chart/utils/path.d.ts.map +1 -0
  92. package/dts/chart/utils/point.d.ts +75 -0
  93. package/dts/chart/utils/point.d.ts.map +1 -0
  94. package/dts/chart/utils/scale.d.ts +43 -0
  95. package/dts/chart/utils/scale.d.ts.map +1 -0
  96. package/dts/index.d.ts +2 -1
  97. package/dts/index.d.ts.map +1 -1
  98. package/dts/sparkline/Counter.d.ts +7 -2
  99. package/dts/sparkline/Sparkline.d.ts +61 -16
  100. package/dts/sparkline/Sparkline.d.ts.map +1 -1
  101. package/dts/sparkline/SparklineArea.d.ts +12 -4
  102. package/dts/sparkline/SparklineArea.d.ts.map +1 -1
  103. package/dts/sparkline/SparklineAreaPattern.d.ts +12 -4
  104. package/dts/sparkline/SparklineAreaPattern.d.ts.map +1 -1
  105. package/dts/sparkline/SparklineGradient.d.ts +21 -10
  106. package/dts/sparkline/SparklineGradient.d.ts.map +1 -1
  107. package/dts/sparkline/SparklinePath.d.ts +8 -6
  108. package/dts/sparkline/__figma__/Sparkline.figma.d.ts +1 -1
  109. package/dts/sparkline/generateSparklineWithId.d.ts +8 -2
  110. package/dts/sparkline/generateSparklineWithId.d.ts.map +1 -1
  111. package/dts/sparkline/index.d.ts +1 -1
  112. package/dts/sparkline/sparkline-interactive/InnerSparklineInteractiveProvider.d.ts +9 -5
  113. package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts +168 -118
  114. package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts.map +1 -1
  115. package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts +22 -9
  116. package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts.map +1 -1
  117. package/dts/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.d.ts +4 -2
  118. package/dts/sparkline/sparkline-interactive/SparklineInteractiveHoverPrice.d.ts +4 -2
  119. package/dts/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.d.ts +5 -3
  120. package/dts/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.d.ts +11 -6
  121. package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts +21 -7
  122. package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts.map +1 -1
  123. package/dts/sparkline/sparkline-interactive/SparklineInteractivePeriodSelector.d.ts +21 -16
  124. package/dts/sparkline/sparkline-interactive/SparklineInteractiveProvider.d.ts +17 -12
  125. package/dts/sparkline/sparkline-interactive/SparklineInteractiveScrubHandler.d.ts +23 -10
  126. package/dts/sparkline/sparkline-interactive/SparklineInteractiveScrubProvider.d.ts +12 -12
  127. package/dts/sparkline/sparkline-interactive/SparklineInteractiveTimeseriesPaths.d.ts +22 -14
  128. package/dts/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts +1 -1
  129. package/dts/sparkline/sparkline-interactive/fade.d.ts +1 -1
  130. package/dts/sparkline/sparkline-interactive/useSparklineInteractiveConstants.d.ts +11 -11
  131. package/dts/sparkline/sparkline-interactive-header/SparklineInteractiveHeader.d.ts +101 -93
  132. package/dts/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts +1 -1
  133. package/esm/chart/CartesianChart.css +1 -0
  134. package/esm/chart/CartesianChart.js +258 -0
  135. package/esm/chart/ChartProvider.js +10 -0
  136. package/esm/chart/Path.js +89 -0
  137. package/esm/chart/PeriodSelector.css +1 -0
  138. package/esm/chart/PeriodSelector.js +126 -0
  139. package/esm/chart/Point.css +2 -0
  140. package/esm/chart/Point.js +171 -0
  141. package/esm/chart/area/Area.js +85 -0
  142. package/esm/chart/area/AreaChart.js +164 -0
  143. package/esm/chart/area/DottedArea.js +141 -0
  144. package/esm/chart/area/GradientArea.js +111 -0
  145. package/esm/chart/area/SolidArea.js +29 -0
  146. package/esm/chart/area/index.js +7 -0
  147. package/esm/chart/axis/Axis.js +46 -0
  148. package/esm/chart/axis/XAxis.css +2 -0
  149. package/esm/chart/axis/XAxis.js +195 -0
  150. package/esm/chart/axis/YAxis.css +2 -0
  151. package/esm/chart/axis/YAxis.js +183 -0
  152. package/esm/chart/axis/index.js +5 -0
  153. package/esm/chart/bar/Bar.js +59 -0
  154. package/esm/chart/bar/BarChart.js +147 -0
  155. package/esm/chart/bar/BarPlot.js +96 -0
  156. package/esm/chart/bar/BarStack.js +519 -0
  157. package/esm/chart/bar/BarStackGroup.js +96 -0
  158. package/esm/chart/bar/DefaultBar.js +64 -0
  159. package/esm/chart/bar/DefaultBarStack.js +60 -0
  160. package/esm/chart/bar/index.js +9 -0
  161. package/esm/chart/index.js +14 -0
  162. package/esm/chart/line/DottedLine.js +38 -0
  163. package/esm/chart/line/GradientLine.js +58 -0
  164. package/esm/chart/line/Line.js +159 -0
  165. package/esm/chart/line/LineChart.js +120 -0
  166. package/esm/chart/line/ReferenceLine.js +142 -0
  167. package/esm/chart/line/SolidLine.js +34 -0
  168. package/esm/chart/line/index.js +8 -0
  169. package/esm/chart/scrubber/Scrubber.js +483 -0
  170. package/esm/chart/scrubber/ScrubberBeacon.js +195 -0
  171. package/esm/chart/scrubber/ScrubberBeaconLabel.js +33 -0
  172. package/esm/chart/scrubber/ScrubberProvider.js +228 -0
  173. package/esm/chart/scrubber/index.js +2 -0
  174. package/esm/chart/text/ChartText.js +236 -0
  175. package/esm/chart/text/SmartChartTextGroup.js +226 -0
  176. package/esm/chart/text/index.js +4 -0
  177. package/esm/chart/utils/axis.js +593 -0
  178. package/esm/chart/utils/bar.js +24 -0
  179. package/esm/chart/utils/chart.js +229 -0
  180. package/esm/chart/utils/context.js +15 -0
  181. package/esm/chart/utils/index.js +9 -0
  182. package/esm/chart/utils/path.js +204 -0
  183. package/esm/chart/utils/point.js +118 -0
  184. package/esm/chart/utils/scale.js +48 -0
  185. package/esm/index.js +4 -1
  186. package/esm/sparkline/Sparkline.js +129 -15
  187. package/esm/sparkline/SparklineArea.js +7 -2
  188. package/esm/sparkline/SparklineAreaPattern.js +4 -2
  189. package/esm/sparkline/SparklineGradient.js +16 -58
  190. package/esm/sparkline/generateSparklineWithId.js +3 -2
  191. package/esm/sparkline/sparkline-interactive/SparklineInteractive.js +5 -1
  192. package/esm/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.js +5 -2
  193. package/esm/sparkline/sparkline-interactive/SparklineInteractivePaths.js +4 -0
  194. package/package.json +15 -11
  195. package/dts/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.d.ts +0 -374
  196. package/dts/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.d.ts.map +0 -1
  197. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractive.test.d.ts +0 -2
  198. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractive.test.d.ts.map +0 -1
  199. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePeriodSelector.test.d.ts +0 -2
  200. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePeriodSelector.test.d.ts.map +0 -1
  201. package/dts/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.d.ts +0 -87
  202. package/dts/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.d.ts.map +0 -1
  203. package/dts/sparkline/sparkline-interactive-header/__tests__/SparklineInteractiveHeader.test.d.ts +0 -2
  204. package/dts/sparkline/sparkline-interactive-header/__tests__/SparklineInteractiveHeader.test.d.ts.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,26 @@
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.4.0-beta.1 (10/3/2025 PST)
12
+
13
+ #### 🚀 Updates
14
+
15
+ - Introduces new data visualization components: CartesianChart, LineChart, BarChart, etc,
16
+ - Deprecates Sparkline components.
17
+
18
+ ## 3.3.1 (10/1/2025 PST)
19
+
20
+ #### 🐞 Fixes
21
+
22
+ - Update links for new repo. [[#42](https://github.com/coinbase/cds/pull/42)]
23
+
24
+ ## 3.3.0 (9/18/2025 PST)
25
+
26
+ - Prepare for open source release.
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ import { type BoxBaseProps, type BoxProps } from '@coinbase/cds-web/layout';
3
+ import { type ScrubberProviderProps } from './scrubber/ScrubberProvider';
4
+ import { type AxisConfigProps, type ChartInset, type Series } from './utils';
5
+ export type CartesianChartBaseProps = BoxBaseProps &
6
+ Pick<ScrubberProviderProps, 'enableScrubbing' | 'onScrubberPositionChange'> & {
7
+ /**
8
+ * Configuration objects that define how to visualize the data.
9
+ * Each series contains its own data array.
10
+ */
11
+ series?: Array<Series>;
12
+ /**
13
+ * Whether to animate the chart.
14
+ * @default true
15
+ */
16
+ animate?: boolean;
17
+ /**
18
+ * Configuration for x-axis.
19
+ */
20
+ xAxis?: Partial<Omit<AxisConfigProps, 'id'>>;
21
+ /**
22
+ * Configuration for y-axis(es). First defined axis becomes default.
23
+ */
24
+ yAxis?: Partial<Omit<AxisConfigProps, 'data'>> | Partial<Omit<AxisConfigProps, 'data'>>[];
25
+ /**
26
+ * Inset around the entire chart (outside the axes).
27
+ */
28
+ inset?: number | Partial<ChartInset>;
29
+ };
30
+ export type CartesianChartProps = BoxProps<'svg'> & CartesianChartBaseProps;
31
+ export declare const CartesianChart: React.MemoExoticComponent<
32
+ React.ForwardRefExoticComponent<
33
+ Omit<CartesianChartProps, 'ref'> & React.RefAttributes<SVGSVGElement>
34
+ >
35
+ >;
36
+ //# sourceMappingURL=CartesianChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../src/chart/CartesianChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyD,MAAM,OAAO,CAAC;AAI9E,OAAO,EAAO,KAAK,YAAY,EAAE,KAAK,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAGjF,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAE3F,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,UAAU,EAUf,KAAK,MAAM,EAEZ,MAAM,SAAS,CAAC;AAYjB,MAAM,MAAM,uBAAuB,GAAG,YAAY,GAChD,IAAI,CAAC,qBAAqB,EAAE,iBAAiB,GAAG,0BAA0B,CAAC,GAAG;IAC5E;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,EAAE,CAAC;IAC1F;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACtC,CAAC;AAEJ,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,uBAAuB,CAAC;AAE5E,eAAO,MAAM,cAAc,mIAqS1B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import type { CartesianChartContextValue } from './utils/context';
2
+ export declare const useCartesianChartContext: () => CartesianChartContextValue;
3
+ export declare const CartesianChartProvider: import('react').Provider<
4
+ CartesianChartContextValue | undefined
5
+ >;
6
+ //# sourceMappingURL=ChartProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartProvider.d.ts","sourceRoot":"","sources":["../../src/chart/ChartProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAIlE,eAAO,MAAM,wBAAwB,QAAO,0BAQ3C,CAAC;AAEF,eAAO,MAAM,sBAAsB,kEAAiC,CAAC"}
@@ -0,0 +1,34 @@
1
+ import 'd3-transition';
2
+ import type { SVGProps } from 'react';
3
+ import type { Rect, SharedProps } from '@coinbase/cds-common/types';
4
+ export type PathProps = SharedProps &
5
+ Omit<
6
+ SVGProps<SVGPathElement>,
7
+ | 'onAnimationStart'
8
+ | 'onAnimationEnd'
9
+ | 'onAnimationIteration'
10
+ | 'onAnimationStartCapture'
11
+ | 'onAnimationEndCapture'
12
+ | 'onAnimationIterationCapture'
13
+ | 'onDrag'
14
+ | 'onDragEnd'
15
+ | 'onDragStart'
16
+ | 'onDragCapture'
17
+ | 'onDragEndCapture'
18
+ | 'onDragStartCapture'
19
+ > & {
20
+ /**
21
+ * Whether to animate this path. Overrides the animate prop on the Chart component.
22
+ */
23
+ animate?: boolean;
24
+ /**
25
+ * Custom clip path rect. If provided, this overrides the default chart rect for clipping.
26
+ */
27
+ clipRect?: Rect;
28
+ /**
29
+ * The offset to add to the clip rect boundaries.
30
+ */
31
+ clipOffset?: number;
32
+ };
33
+ export declare const Path: import('react').NamedExoticComponent<PathProps>;
34
+ //# sourceMappingURL=Path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Path.d.ts","sourceRoot":"","sources":["../../src/chart/Path.tsx"],"names":[],"mappings":"AAAA,OAAO,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAOpE,MAAM,MAAM,SAAS,GAAG,WAAW,GACjC,IAAI,CACF,QAAQ,CAAC,cAAc,CAAC,EACtB,kBAAkB,GAClB,gBAAgB,GAChB,sBAAsB,GACtB,yBAAyB,GACzB,uBAAuB,GACvB,6BAA6B,GAC7B,QAAQ,GACR,WAAW,GACX,aAAa,GACb,eAAe,GACf,kBAAkB,GAClB,oBAAoB,CACvB,GAAG;IACF;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEJ,eAAO,MAAM,IAAI,iDAuEhB,CAAC"}
@@ -0,0 +1,61 @@
1
+ import React from 'react';
2
+ import type { Polymorphic } from '@coinbase/cds-web/core/polymorphism';
3
+ import { type SegmentedTabsProps, type TabsActiveIndicatorProps } from '@coinbase/cds-web/tabs';
4
+ import { type TextBaseProps } from '@coinbase/cds-web/typography';
5
+ export declare const PeriodSelectorActiveIndicator: React.MemoExoticComponent<
6
+ ({
7
+ activeTabRect,
8
+ background,
9
+ position,
10
+ borderRadius,
11
+ style,
12
+ }: TabsActiveIndicatorProps) => import('react/jsx-runtime').JSX.Element | null
13
+ >;
14
+ export declare const liveTabLabelDefaultElement = 'span';
15
+ export type LiveTabLabelDefaultElement = typeof liveTabLabelDefaultElement;
16
+ export type LiveTabLabelBaseProps = TextBaseProps & {
17
+ /**
18
+ * The label to display.
19
+ * @default 'LIVE'
20
+ */
21
+ label?: string;
22
+ /**
23
+ * Whether to hide the dot.
24
+ */
25
+ hideDot?: boolean;
26
+ /**
27
+ * Whether to disable the pulse animation.
28
+ */
29
+ disablePulse?: boolean;
30
+ };
31
+ export type LiveTabLabelProps<AsComponent extends React.ElementType> = Polymorphic.Props<
32
+ AsComponent,
33
+ LiveTabLabelBaseProps
34
+ >;
35
+ type LiveTabLabelComponent = (<AsComponent extends React.ElementType = LiveTabLabelDefaultElement>(
36
+ props: LiveTabLabelProps<AsComponent>,
37
+ ) => Polymorphic.ReactReturn) &
38
+ Polymorphic.ReactNamed;
39
+ export declare const LiveTabLabel: LiveTabLabelComponent;
40
+ export type PeriodSelectorProps = SegmentedTabsProps;
41
+ /**
42
+ * PeriodSelector is a specialized version of SegmentedTabs optimized for chart period selection.
43
+ * It provides transparent background, primary wash active state, and full-width layout by default.
44
+ */
45
+ export declare const PeriodSelector: React.MemoExoticComponent<
46
+ React.ForwardRefExoticComponent<
47
+ Partial<
48
+ Pick<
49
+ import('@coinbase/cds-web/tabs').TabsProps<string>,
50
+ 'TabComponent' | 'TabsActiveIndicatorComponent'
51
+ >
52
+ > &
53
+ Omit<
54
+ import('@coinbase/cds-web/tabs').TabsProps<string>,
55
+ 'TabComponent' | 'TabsActiveIndicatorComponent'
56
+ > &
57
+ React.RefAttributes<HTMLElement>
58
+ >
59
+ >;
60
+ export {};
61
+ //# sourceMappingURL=PeriodSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PeriodSelector.d.ts","sourceRoot":"","sources":["../../src/chart/PeriodSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAEvE,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,wBAAwB,EAE9B,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAaxE,eAAO,MAAM,6BAA6B,4FAOrC,wBAAwB,oDAwB5B,CAAC;AAEF,eAAO,MAAM,0BAA0B,SAAS,CAAC;AAEjD,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAC;AAE3E,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,iBAAiB,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,IAAI,WAAW,CAAC,KAAK,CACtF,WAAW,EACX,qBAAqB,CACtB,CAAC;AAYF,KAAK,qBAAqB,GAAG,CAAC,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,0BAA0B,EAC/F,KAAK,EAAE,iBAAiB,CAAC,WAAW,CAAC,KAClC,WAAW,CAAC,WAAW,CAAC,GAC3B,WAAW,CAAC,UAAU,CAAC;AAEzB,eAAO,MAAM,YAAY,EAAE,qBA+C1B,CAAC;AASF,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,cAAc,+TA0B1B,CAAC"}
@@ -0,0 +1,153 @@
1
+ import React from 'react';
2
+ import type { SVGProps } from 'react';
3
+ import type { SharedProps } from '@coinbase/cds-common/types';
4
+ import type { ChartTextChildren } from './text/ChartText';
5
+ import { type ChartTextProps } from './text';
6
+ /**
7
+ * Parameters passed to renderPoints callback function.
8
+ */
9
+ export type RenderPointsParams = {
10
+ /**
11
+ * X coordinate in SVG pixel space.
12
+ */
13
+ x: number;
14
+ /**
15
+ * Y coordinate in SVG pixel space.
16
+ */
17
+ y: number;
18
+ /**
19
+ * X coordinate in data space (usually same as index).
20
+ */
21
+ dataX: number;
22
+ /**
23
+ * Y coordinate in data space (same as value).
24
+ */
25
+ dataY: number;
26
+ };
27
+ /**
28
+ * Shared configuration for point appearance and behavior.
29
+ * Used by line-associated points rendered via Line/LineChart components.
30
+ */
31
+ export type PointConfig = {
32
+ /**
33
+ * The fill color of the point.
34
+ */
35
+ fill?: string;
36
+ /**
37
+ * Optional Y-axis id to specify which axis to plot along.
38
+ * Defaults to the first y-axis
39
+ */
40
+ yAxisId?: string;
41
+ /**
42
+ * Radius of the point.
43
+ * @default 4
44
+ */
45
+ radius?: number;
46
+ /**
47
+ * Opacity of the point.
48
+ */
49
+ opacity?: number;
50
+ /**
51
+ * Handler for when the point is clicked.
52
+ */
53
+ onClick?: (
54
+ event: React.MouseEvent,
55
+ point: {
56
+ x: number;
57
+ y: number;
58
+ dataX: number;
59
+ dataY: number;
60
+ },
61
+ ) => void;
62
+ /**
63
+ * Handler for when the scrubber enters this point.
64
+ */
65
+ onScrubberEnter?: (point: { x: number; y: number }) => void;
66
+ /**
67
+ * Color of the outer stroke around the point.
68
+ * @default 'var(--color-bg)'
69
+ */
70
+ stroke?: string;
71
+ /**
72
+ * Outer stroke width of the point.
73
+ * Set to 0 to remove the stroke.
74
+ * @default 2
75
+ */
76
+ strokeWidth?: number;
77
+ /**
78
+ * Custom class name for the point.
79
+ */
80
+ className?: string;
81
+ /**
82
+ * Custom styles for the point.
83
+ */
84
+ style?: React.CSSProperties;
85
+ /**
86
+ * Accessibility label for screen readers to describe the point.
87
+ * If not provided, a default label will be generated using the data coordinates.
88
+ */
89
+ accessibilityLabel?: string;
90
+ /**
91
+ * Simple text label to display at the point position.
92
+ * If provided, a ChartText will be automatically rendered.
93
+ */
94
+ label?: ChartTextChildren;
95
+ /**
96
+ * Configuration for the automatically rendered label.
97
+ * Only used when `label` prop is provided.
98
+ */
99
+ labelProps?: Omit<ChartTextProps, 'x' | 'y' | 'children'>;
100
+ };
101
+ export type PointProps = SharedProps &
102
+ PointConfig &
103
+ Omit<SVGProps<SVGCircleElement>, 'onClick'> & {
104
+ /**
105
+ * X coordinate in data space (not pixel coordinates).
106
+ */
107
+ dataX: number;
108
+ /**
109
+ * Y coordinate in data space (not pixel coordinates).
110
+ */
111
+ dataY: number;
112
+ /**
113
+ * Coordinates in SVG pixel space.
114
+ * Overrides dataX and dataY for pixel coordinate calculation.
115
+ */
116
+ pixelCoordinates?: {
117
+ x: number;
118
+ y: number;
119
+ };
120
+ /**
121
+ * Override the chart's animation setting for this specific point.
122
+ * When undefined, uses the chart context's animation setting.
123
+ */
124
+ animate?: boolean;
125
+ /**
126
+ * Custom class names for the component.
127
+ */
128
+ classNames?: {
129
+ /**
130
+ * Custom class name for the point container element.
131
+ */
132
+ container?: string;
133
+ /**
134
+ * Custom class name for the inner circle element.
135
+ */
136
+ point?: string;
137
+ };
138
+ /**
139
+ * Custom styles for the component.
140
+ */
141
+ styles?: {
142
+ /**
143
+ * Custom styles for the point container element.
144
+ */
145
+ container?: React.CSSProperties;
146
+ /**
147
+ * Custom styles for the inner circle element.
148
+ */
149
+ point?: React.CSSProperties;
150
+ };
151
+ };
152
+ export declare const Point: React.NamedExoticComponent<PointProps>;
153
+ //# sourceMappingURL=Point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../src/chart/Point.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmC,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAK9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,QAAQ,CAAC;AAqBxD;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,CACR,KAAK,EAAE,KAAK,CAAC,UAAU,EACvB,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,KAC1D,IAAI,CAAC;IACV;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC5D;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE,GAAG,GAAG,GAAG,GAAG,UAAU,CAAC,CAAC;CAC3D,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,WAAW,GAClC,WAAW,GACX,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC,GAAG;IAC5C;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,gBAAgB,CAAC,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC5C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE;QACX;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF;;OAEG;IACH,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAChC;;WAEG;QACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC7B,CAAC;CACH,CAAC;AAEJ,eAAO,MAAM,KAAK,wCAsKjB,CAAC"}
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import type { SVGProps } from 'react';
3
+ import { type ChartPathCurveType } from '../utils';
4
+ export type AreaComponentProps = {
5
+ d: SVGProps<SVGPathElement>['d'];
6
+ /**
7
+ * The color of the area.
8
+ * @default color of the series or 'var(--color-fgPrimary)'
9
+ */
10
+ fill?: string;
11
+ fillOpacity?: number;
12
+ stroke?: string;
13
+ strokeWidth?: number;
14
+ yAxisId?: string;
15
+ animate?: boolean;
16
+ /**
17
+ * Baseline value for the gradient.
18
+ * When set, overrides the default baseline.
19
+ */
20
+ baseline?: number;
21
+ };
22
+ export type AreaComponent = React.FC<AreaComponentProps>;
23
+ export type AreaProps = Pick<
24
+ AreaComponentProps,
25
+ 'fill' | 'fillOpacity' | 'stroke' | 'strokeWidth' | 'baseline'
26
+ > & {
27
+ /**
28
+ * The ID of the series to render. Will be used to find the data from the chart context.
29
+ */
30
+ seriesId: string;
31
+ /**
32
+ * The curve interpolation method to use for the line.
33
+ * @default 'linear'
34
+ */
35
+ curve?: ChartPathCurveType;
36
+ /**
37
+ * The type of area to render.
38
+ * @default 'solid'
39
+ */
40
+ type?: 'solid' | 'dotted' | 'gradient';
41
+ /**
42
+ * Component to render the area.
43
+ * Takes precedence over the type prop if provided.
44
+ */
45
+ AreaComponent?: AreaComponent;
46
+ };
47
+ export declare const Area: React.NamedExoticComponent<AreaProps>;
48
+ //# sourceMappingURL=Area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Area.d.ts","sourceRoot":"","sources":["../../../src/chart/area/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtC,OAAO,EAAE,KAAK,kBAAkB,EAAe,MAAM,UAAU,CAAC;AAMhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,GAAG,CAAC,CAAC;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC;AAEzD,MAAM,MAAM,SAAS,GAAG,IAAI,CAC1B,kBAAkB,EAClB,MAAM,GAAG,aAAa,GAAG,QAAQ,GAAG,aAAa,GAAG,UAAU,CAC/D,GAAG;IACF;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;IACvC;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,IAAI,uCAmFhB,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { type XAxisProps, type YAxisProps } from '../axis';
2
+ import { type CartesianChartProps } from '../CartesianChart';
3
+ import { type LineProps } from '../line/Line';
4
+ import { type AxisConfigProps, type Series } from '../utils';
5
+ import { type AreaProps } from './Area';
6
+ export type AreaSeries = Series &
7
+ Partial<Pick<AreaProps, 'AreaComponent' | 'curve' | 'fillOpacity' | 'type' | 'fill'>> &
8
+ Partial<Pick<LineProps, 'LineComponent' | 'strokeWidth' | 'stroke' | 'opacity'>>;
9
+ export type AreaChartProps = Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'series'> &
10
+ Pick<AreaProps, 'AreaComponent' | 'curve' | 'fillOpacity' | 'type'> &
11
+ Pick<LineProps, 'LineComponent' | 'strokeWidth'> & {
12
+ /**
13
+ * Configuration objects that define how to visualize the data.
14
+ * Each series supports Area and Line component props for individual customization.
15
+ */
16
+ series?: Array<AreaSeries>;
17
+ /**
18
+ * Whether to stack the areas on top of each other.
19
+ * When true, each series builds cumulative values on top of the previous series.
20
+ *
21
+ * **Note**: Only applies to series data containing singular numbers (e.g., `[10, 20, 30]`).
22
+ * Series with [baseline, value] tuples (e.g., `[[0, 10], [0, -5]]`) will be skipped during stacking
23
+ * and rendered as-is.
24
+ */
25
+ stacked?: boolean;
26
+ /**
27
+ * Whether to show the X axis.
28
+ */
29
+ showXAxis?: boolean;
30
+ /**
31
+ * Whether to show the Y axis.
32
+ */
33
+ showYAxis?: boolean;
34
+ /**
35
+ * Whether to show lines on top of the areas.
36
+ * Useful for stacked contexts to show the outline of each area.
37
+ */
38
+ showLines?: boolean;
39
+ /**
40
+ * The type of line to render.
41
+ * @default 'solid'
42
+ */
43
+ lineType?: 'solid' | 'dotted' | 'gradient';
44
+ xAxis?: Partial<AxisConfigProps> & XAxisProps;
45
+ yAxis?: Partial<AxisConfigProps> & YAxisProps;
46
+ };
47
+ export declare const AreaChart: import('react').MemoExoticComponent<
48
+ import('react').ForwardRefExoticComponent<
49
+ Omit<AreaChartProps, 'ref'> & import('react').RefAttributes<SVGSVGElement>
50
+ >
51
+ >;
52
+ //# sourceMappingURL=AreaChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AreaChart.d.ts","sourceRoot":"","sources":["../../../src/chart/area/AreaChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,UAAU,EAAS,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAAkB,KAAK,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7E,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EACL,KAAK,eAAe,EAIpB,KAAK,MAAM,EACZ,MAAM,UAAU,CAAC;AAElB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAE9C,MAAM,MAAM,UAAU,GAAG,MAAM,GAC7B,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,CAAC,CAAC,GACrF,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC,CAAC,CAAC;AAEnF,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC,GAClF,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,CAAC,GACnE,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,aAAa,CAAC,GAAG;IACjD;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;IAE3C,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;IAC9C,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;CAC/C,CAAC;AAEJ,eAAO,MAAM,SAAS,4JAuKrB,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { type PathProps } from '../Path';
2
+ import type { AreaComponentProps } from './Area';
3
+ export type DottedAreaProps = Omit<PathProps, 'd' | 'fill' | 'fillOpacity' | 'clipRect'> &
4
+ Omit<AreaComponentProps, 'clipRect'> & {
5
+ /**
6
+ * Size of the pattern unit (width and height).
7
+ * @default 4
8
+ */
9
+ patternSize?: number;
10
+ /**
11
+ * Size of the dots within the pattern.
12
+ * @default 1
13
+ */
14
+ dotSize?: number;
15
+ /**
16
+ * Opacity at the peak values (top/bottom of gradient).
17
+ * @default 0.3
18
+ */
19
+ peakOpacity?: number;
20
+ /**
21
+ * Opacity at the baseline (0 or edge closest to 0).
22
+ * @default 0
23
+ */
24
+ baselineOpacity?: number;
25
+ /**
26
+ * ID of the y-axis to use for gradient range.
27
+ * If not provided, defaults to the default y-axis.
28
+ */
29
+ yAxisId?: string;
30
+ className?: string;
31
+ style?: React.CSSProperties;
32
+ /**
33
+ * Custom class names for the component.
34
+ */
35
+ classNames?: {
36
+ /**
37
+ * Custom class name for the root element.
38
+ */
39
+ root?: string;
40
+ /**
41
+ * Custom class name for the pattern element.
42
+ */
43
+ pattern?: string;
44
+ /**
45
+ * Custom class name for the area path element.
46
+ */
47
+ path?: string;
48
+ };
49
+ /**
50
+ * Custom styles for the component.
51
+ */
52
+ styles?: {
53
+ /**
54
+ * Custom styles for the root element.
55
+ */
56
+ root?: React.CSSProperties;
57
+ /**
58
+ * Custom styles for the pattern element.
59
+ */
60
+ pattern?: React.CSSProperties;
61
+ /**
62
+ * Custom styles for the area path element.
63
+ */
64
+ path?: React.CSSProperties;
65
+ };
66
+ };
67
+ export declare const DottedArea: import('react').NamedExoticComponent<DottedAreaProps>;
68
+ //# sourceMappingURL=DottedArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DottedArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/DottedArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,GAAG,MAAM,GAAG,aAAa,GAAG,UAAU,CAAC,GACtF,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,GAAG;IACrC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,UAAU,CAAC,EAAE;QACX;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF;;OAEG;IACH,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC3B;;WAEG;QACH,OAAO,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC9B;;WAEG;QACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC5B,CAAC;CACH,CAAC;AAEJ,eAAO,MAAM,UAAU,uDA+HtB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { type PathProps } from '../Path';
2
+ import type { AreaComponentProps } from './Area';
3
+ export type GradientAreaProps = Omit<PathProps, 'd' | 'fill' | 'fillOpacity'> &
4
+ AreaComponentProps & {
5
+ /**
6
+ * The color at peak values (top/bottom of gradient).
7
+ * @default fill or 'var(--color-fgPrimary)'
8
+ */
9
+ peakColor?: string;
10
+ /**
11
+ * The color at the baseline (0 or edge closest to 0).
12
+ * @default peakColor or fill
13
+ */
14
+ baselineColor?: string;
15
+ /**
16
+ * Opacity at peak values.
17
+ * @default 0.3
18
+ */
19
+ peakOpacity?: number;
20
+ /**
21
+ * Opacity at the baseline.
22
+ * @default 0
23
+ */
24
+ baselineOpacity?: number;
25
+ };
26
+ /**
27
+ * A customizable gradient area component which uses Path.
28
+ */
29
+ export declare const GradientArea: import('react').NamedExoticComponent<GradientAreaProps>;
30
+ //# sourceMappingURL=GradientArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GradientArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/GradientArea.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,GAAG,MAAM,GAAG,aAAa,CAAC,GAC3E,kBAAkB,GAAG;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,YAAY,yDAsGxB,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { type PathProps } from '../Path';
2
+ import type { AreaComponentProps } from './Area';
3
+ export type SolidAreaProps = Omit<PathProps, 'd' | 'fill' | 'fillOpacity'> & AreaComponentProps;
4
+ /**
5
+ * A customizable solid area component which uses Path.
6
+ */
7
+ export declare const SolidArea: import('react').NamedExoticComponent<SolidAreaProps>;
8
+ //# sourceMappingURL=SolidArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SolidArea.d.ts","sourceRoot":"","sources":["../../../src/chart/area/SolidArea.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,SAAS,EAAE,GAAG,GAAG,MAAM,GAAG,aAAa,CAAC,GAAG,kBAAkB,CAAC;AAEhG;;GAEG;AACH,eAAO,MAAM,SAAS,sDAIrB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from './Area';
2
+ export * from './AreaChart';
3
+ export * from './DottedArea';
4
+ export * from './GradientArea';
5
+ export * from './SolidArea';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/area/index.ts"],"names":[],"mappings":"AACA,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC"}