@coinbase/cds-mobile-visualization 3.4.0-beta.24 → 3.4.0-beta.26

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 (49) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dts/chart/Path.d.ts +2 -1
  3. package/dts/chart/Path.d.ts.map +1 -1
  4. package/dts/chart/PeriodSelector.d.ts +11 -1
  5. package/dts/chart/PeriodSelector.d.ts.map +1 -1
  6. package/dts/chart/bar/Bar.d.ts +18 -54
  7. package/dts/chart/bar/Bar.d.ts.map +1 -1
  8. package/dts/chart/bar/BarChart.d.ts +2 -2
  9. package/dts/chart/bar/BarPlot.d.ts.map +1 -1
  10. package/dts/chart/bar/BarStack.d.ts +4 -4
  11. package/dts/chart/bar/BarStack.d.ts.map +1 -1
  12. package/dts/chart/bar/DefaultBar.d.ts.map +1 -1
  13. package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -1
  14. package/dts/chart/point/Point.d.ts +2 -1
  15. package/dts/chart/point/Point.d.ts.map +1 -1
  16. package/dts/chart/scrubber/Scrubber.d.ts +4 -2
  17. package/dts/chart/scrubber/Scrubber.d.ts.map +1 -1
  18. package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -1
  19. package/dts/chart/utils/bar.d.ts +155 -0
  20. package/dts/chart/utils/bar.d.ts.map +1 -1
  21. package/dts/chart/utils/chart.d.ts +2 -1
  22. package/dts/chart/utils/chart.d.ts.map +1 -1
  23. package/dts/chart/utils/path.d.ts.map +1 -1
  24. package/dts/sparkline/Sparkline.d.ts +2 -1
  25. package/dts/sparkline/Sparkline.d.ts.map +1 -1
  26. package/dts/sparkline/SparklineArea.d.ts +2 -1
  27. package/dts/sparkline/SparklineArea.d.ts.map +1 -1
  28. package/dts/sparkline/SparklineGradient.d.ts +2 -1
  29. package/dts/sparkline/SparklineGradient.d.ts.map +1 -1
  30. package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts +2 -1
  31. package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts.map +1 -1
  32. package/esm/chart/bar/Bar.js +8 -14
  33. package/esm/chart/bar/BarChart.js +7 -7
  34. package/esm/chart/bar/BarPlot.js +37 -46
  35. package/esm/chart/bar/BarStack.js +71 -604
  36. package/esm/chart/bar/DefaultBar.js +11 -18
  37. package/esm/chart/bar/DefaultBarStack.js +12 -21
  38. package/esm/chart/bar/__stories__/BarChart.stories.js +104 -6
  39. package/esm/chart/line/__stories__/LineChart.stories.js +1 -0
  40. package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +9 -5
  41. package/esm/chart/utils/bar.js +775 -0
  42. package/esm/chart/utils/chart.js +2 -1
  43. package/esm/chart/utils/path.js +5 -12
  44. package/esm/sparkline/Sparkline.js +2 -1
  45. package/esm/sparkline/SparklineArea.js +2 -1
  46. package/esm/sparkline/SparklineGradient.js +2 -1
  47. package/esm/sparkline/sparkline-interactive/SparklineInteractive.js +2 -1
  48. package/esm/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.js +2 -0
  49. package/package.json +5 -5
@@ -240,7 +240,8 @@ export const defaultHorizontalLayoutChartInset = {
240
240
  };
241
241
 
242
242
  /**
243
- * @deprecated Use `defaultVerticalLayoutChartInset` for vertical layout charts or
243
+ * @deprecated Use `defaultVerticalLayoutChartInset` for vertical layout charts or. This will be removed in a future major release.
244
+ * @deprecationExpectedRemoval v4
244
245
  * `defaultHorizontalLayoutChartInset` for horizontal layout charts.
245
246
  */
246
247
  export const defaultChartInset = defaultVerticalLayoutChartInset;
@@ -236,20 +236,13 @@ export const getBarPath = function (x, y, width, height, radius, roundTop, round
236
236
  if (layout === void 0) {
237
237
  layout = 'vertical';
238
238
  }
239
- const barsGrowVertically = layout !== 'horizontal';
239
+ const isVerticalLayout = layout === 'vertical';
240
240
  const roundBothSides = roundTop && roundBottom;
241
241
  const r = Math.min(radius, width / 2, roundBothSides ? height / 2 : height);
242
-
243
- // In vertical layout (bars grow up/down):
244
- // - roundTop rounds the top face (min Y)
245
- // - roundBottom rounds the bottom face (max Y)
246
- // In horizontal layout (bars grow left/right):
247
- // - roundTop rounds the right face (max X)
248
- // - roundBottom rounds the left face (min X)
249
- const rTL = barsGrowVertically ? roundTop ? r : 0 : roundBottom ? r : 0;
250
- const rTR = barsGrowVertically ? roundTop ? r : 0 : roundTop ? r : 0;
251
- const rBR = barsGrowVertically ? roundBottom ? r : 0 : roundTop ? r : 0;
252
- const rBL = barsGrowVertically ? roundBottom ? r : 0 : roundBottom ? r : 0;
242
+ const rTL = isVerticalLayout ? roundTop ? r : 0 : roundBottom ? r : 0;
243
+ const rTR = isVerticalLayout ? roundTop ? r : 0 : roundTop ? r : 0;
244
+ const rBR = isVerticalLayout ? roundBottom ? r : 0 : roundTop ? r : 0;
245
+ const rBL = isVerticalLayout ? roundBottom ? r : 0 : roundBottom ? r : 0;
253
246
 
254
247
  // Build path with selective rounding
255
248
  let path = "M " + (x + rTL) + " " + y;
@@ -12,7 +12,8 @@ import { generateSparklineAreaWithId } from './generateSparklineWithId';
12
12
  import { SparklineAreaPattern } from './SparklineAreaPattern';
13
13
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
14
14
  /**
15
- * @deprecated Use LineChart instead.
15
+ * @deprecated Use LineChart instead. This will be removed in a future major release.
16
+ * @deprecationExpectedRemoval v4
16
17
  */
17
18
  export const Sparkline = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
18
19
  let {
@@ -2,7 +2,8 @@ import React, { forwardRef, memo } from 'react';
2
2
  import { Path } from 'react-native-svg';
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
4
  /**
5
- * @deprecated Use AreaChart instead.
5
+ * @deprecated Use AreaChart instead. This will be removed in a future major release.
6
+ * @deprecationExpectedRemoval v4
6
7
  */
7
8
  export const SparklineArea = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
8
9
  let {
@@ -11,7 +11,8 @@ import { generateSparklineAreaWithId } from './generateSparklineWithId';
11
11
  import { SparklineAreaPattern } from './SparklineAreaPattern';
12
12
 
13
13
  /**
14
- * @deprecated Use LineChart instead.
14
+ * @deprecated Use LineChart instead. This will be removed in a future major release.
15
+ * @deprecationExpectedRemoval v4
15
16
  */
16
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
18
  export const SparklineGradient = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) => {
@@ -302,6 +302,7 @@ function SparklineInteractiveWithGeneric(_ref4) {
302
302
  }
303
303
 
304
304
  /**
305
- * @deprecated Use LineChart instead.
305
+ * @deprecated Use LineChart instead. This will be removed in a future major release.
306
+ * @deprecationExpectedRemoval v4
306
307
  */
307
308
  export const SparklineInteractive = /*#__PURE__*/memo(SparklineInteractiveWithGeneric);
@@ -453,11 +453,13 @@ const SparklineInteractiveHeaderScreen = () => {
453
453
  gap: 1,
454
454
  children: [/*#__PURE__*/_jsx(IconButton, {
455
455
  active: true,
456
+ accessibilityLabel: "Star",
456
457
  feedback: "heavy",
457
458
  name: "star",
458
459
  onPress: handlePress,
459
460
  variant: "secondary"
460
461
  }), /*#__PURE__*/_jsx(IconButton, {
462
+ accessibilityLabel: "Share",
461
463
  feedback: "heavy",
462
464
  name: "share",
463
465
  onPress: handlePress,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-mobile-visualization",
3
- "version": "3.4.0-beta.24",
3
+ "version": "3.4.0-beta.26",
4
4
  "description": "Coinbase Design System - Mobile Visualization Native",
5
5
  "repository": {
6
6
  "type": "git",
@@ -36,9 +36,9 @@
36
36
  "CHANGELOG"
37
37
  ],
38
38
  "peerDependencies": {
39
- "@coinbase/cds-common": "^8.52.2",
39
+ "@coinbase/cds-common": "^8.62.0",
40
40
  "@coinbase/cds-lottie-files": "^3.3.4",
41
- "@coinbase/cds-mobile": "^8.52.2",
41
+ "@coinbase/cds-mobile": "^8.62.0",
42
42
  "@coinbase/cds-utils": "^2.3.5",
43
43
  "@shopify/react-native-skia": "^1.12.4 || ^2.0.0",
44
44
  "react": "^18.3.1",
@@ -57,9 +57,9 @@
57
57
  "@babel/preset-env": "^7.28.0",
58
58
  "@babel/preset-react": "^7.27.1",
59
59
  "@babel/preset-typescript": "^7.27.1",
60
- "@coinbase/cds-common": "^8.52.2",
60
+ "@coinbase/cds-common": "^8.62.0",
61
61
  "@coinbase/cds-lottie-files": "^3.3.4",
62
- "@coinbase/cds-mobile": "^8.52.2",
62
+ "@coinbase/cds-mobile": "^8.62.0",
63
63
  "@coinbase/cds-utils": "^2.3.5",
64
64
  "@shopify/react-native-skia": "1.12.4",
65
65
  "@types/react": "^18.3.12",