@coinbase/cds-mobile-visualization 3.4.0-beta.14 → 3.4.0-beta.15

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 CHANGED
@@ -8,6 +8,12 @@ All notable changes to this project will be documented in this file.
8
8
 
9
9
  <!-- template-start -->
10
10
 
11
+ ## 3.4.0-beta.15 (1/27/2026 PST)
12
+
13
+ #### 🐞 Fixes
14
+
15
+ - Fix padding on PeriodSelector. [[#330](https://github.com/coinbase/cds/pull/330)]
16
+
11
17
  ## 3.4.0-beta.14 (1/22/2026 PST)
12
18
 
13
19
  #### 🚀 Updates
@@ -24,7 +24,8 @@ export const PeriodSelectorActiveIndicator = _ref => {
24
24
  const {
25
25
  width,
26
26
  height,
27
- x
27
+ x,
28
+ y
28
29
  } = activeTabRect;
29
30
 
30
31
  // Get the target background color
@@ -38,6 +39,7 @@ export const PeriodSelectorActiveIndicator = _ref => {
38
39
  // Combined animated value for position, size, and color
39
40
  const newAnimatedValues = {
40
41
  x,
42
+ y,
41
43
  width,
42
44
  backgroundColor: targetColor
43
45
  };
@@ -51,6 +53,8 @@ export const PeriodSelectorActiveIndicator = _ref => {
51
53
  const animatedStyles = useAnimatedStyle(() => ({
52
54
  transform: [{
53
55
  translateX: animatedValues.value.x
56
+ }, {
57
+ translateY: animatedValues.value.y
54
58
  }],
55
59
  width: animatedValues.value.width,
56
60
  backgroundColor: animatedValues.value.backgroundColor
@@ -70,6 +70,27 @@ const MinWidthPeriodSelectorExample = () => {
70
70
  width: "fit-content"
71
71
  });
72
72
  };
73
+ const PaddedPeriodSelectorExample = () => {
74
+ const tabs = [{
75
+ id: '1W',
76
+ label: '1W'
77
+ }, {
78
+ id: '1M',
79
+ label: '1M'
80
+ }, {
81
+ id: 'YTD',
82
+ label: 'YTD'
83
+ }];
84
+ const [activeTab, setActiveTab] = useState(tabs[0]);
85
+ return /*#__PURE__*/_jsx(PeriodSelector, {
86
+ activeTab: activeTab,
87
+ gap: 2,
88
+ onChange: tab => setActiveTab(tab),
89
+ padding: 3,
90
+ tabs: tabs,
91
+ width: "fit-content"
92
+ });
93
+ };
73
94
  const LivePeriodSelectorExample = () => {
74
95
  const tabs = useMemo(() => [{
75
96
  id: '1H',
@@ -317,6 +338,9 @@ export default function All() {
317
338
  }), /*#__PURE__*/_jsx(Example, {
318
339
  title: "Colored Excluding Live",
319
340
  children: /*#__PURE__*/_jsx(ColoredExcludingLivePeriodSelectorExample, {})
341
+ }), /*#__PURE__*/_jsx(Example, {
342
+ title: "With Padding",
343
+ children: /*#__PURE__*/_jsx(PaddedPeriodSelectorExample, {})
320
344
  })]
321
345
  });
322
346
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-mobile-visualization",
3
- "version": "3.4.0-beta.14",
3
+ "version": "3.4.0-beta.15",
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.38.6",
39
+ "@coinbase/cds-common": "^8.39.1",
40
40
  "@coinbase/cds-lottie-files": "^3.3.4",
41
- "@coinbase/cds-mobile": "^8.38.6",
41
+ "@coinbase/cds-mobile": "^8.39.1",
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.38.6",
60
+ "@coinbase/cds-common": "^8.39.1",
61
61
  "@coinbase/cds-lottie-files": "^3.3.4",
62
- "@coinbase/cds-mobile": "^8.38.6",
62
+ "@coinbase/cds-mobile": "^8.39.1",
63
63
  "@coinbase/cds-utils": "^2.3.5",
64
64
  "@shopify/react-native-skia": "1.12.4",
65
65
  "@types/react": "^18.3.12",