@coinbase/cds-mobile 8.70.0 → 8.71.0

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
+ ## 8.71.0 (5/12/2026 PST)
12
+
13
+ #### 🚀 Updates
14
+
15
+ - Add icon glyph and progress circle styles to IconButton. [[#606](https://github.com/coinbase/cds/pull/606)]
16
+
11
17
  ## 8.70.0 (5/8/2026 PST)
12
18
 
13
19
  #### 🚀 Updates
@@ -1,4 +1,4 @@
1
- import { type View } from 'react-native';
1
+ import { type StyleProp, type TextStyle, type View, type ViewStyle } from 'react-native';
2
2
  import type {
3
3
  IconButtonVariant,
4
4
  IconName,
@@ -27,6 +27,15 @@ export type IconButtonBaseProps = SharedProps &
27
27
  * @default primary
28
28
  */
29
29
  variant?: IconButtonVariant;
30
+ /** Custom styles for individual elements of the IconButton component */
31
+ styles?: {
32
+ /** Root Pressable element */
33
+ root?: StyleProp<ViewStyle>;
34
+ /** Inner icon glyph Text element */
35
+ icon?: StyleProp<TextStyle>;
36
+ /** Loading progress circle element */
37
+ progressCircle?: StyleProp<ViewStyle>;
38
+ };
30
39
  };
31
40
  export type IconButtonProps = IconButtonBaseProps;
32
41
  export declare const IconButton: import('react').MemoExoticComponent<
@@ -51,6 +60,15 @@ export declare const IconButton: import('react').MemoExoticComponent<
51
60
  * @default primary
52
61
  */
53
62
  variant?: IconButtonVariant;
63
+ /** Custom styles for individual elements of the IconButton component */
64
+ styles?: {
65
+ /** Root Pressable element */
66
+ root?: StyleProp<ViewStyle>;
67
+ /** Inner icon glyph Text element */
68
+ icon?: StyleProp<TextStyle>;
69
+ /** Loading progress circle element */
70
+ progressCircle?: StyleProp<ViewStyle>;
71
+ };
54
72
  } & import('react').RefAttributes<View>
55
73
  >
56
74
  >;
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/buttons/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAAmC,KAAK,IAAI,EAAkB,MAAM,cAAc,CAAC;AAG1F,OAAO,KAAK,EACV,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAOpC,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGzE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,mBAAmB,GAAG,WAAW,GAC3C,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,GACpC,IAAI,CACF,eAAe,EACf,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,oBAAoB,CACpF,GAAG;IACF,6CAA6C;IAC7C,IAAI,EAAE,QAAQ,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,iCAAiC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC;CAC7B,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAElD,eAAO,MAAM,UAAU;IAlBnB,6CAA6C;UACvC,QAAQ;IACd;;;OAGG;eACQ,QAAQ;IACnB,iCAAiC;aACxB,OAAO;IAChB;;;OAGG;cACO,iBAAiB;yCAqG9B,CAAC"}
1
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/buttons/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EACV,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAOpC,OAAO,EAAa,KA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oticComponent<
22
22
  iconSize?: import('@coinbase/cds-common').IconSize;
23
23
  active?: boolean;
24
24
  variant?: IconButtonVariant;
25
+ styles?: {
26
+ root?: import('react-native').StyleProp<import('react-native').ViewStyle>;
27
+ icon?: import('react-native').StyleProp<import('react-native').TextStyle>;
28
+ progressCircle?: import('react-native').StyleProp<import('react-native').ViewStyle>;
29
+ };
25
30
  } & {
26
31
  /**
27
32
  * If set to true, when parent input is focused, the icon will match the color of the focus state
@@ -1 +1 @@
1
- {"version":3,"file":"InputIconButton.d.ts","sourceRoot":"","sources":["../../src/controls/InputIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAElF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAKzE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAOvE,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG;IACnD;;;SAGK;IACL,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;IAP1B;;;SAGK;+BACsB,OAAO;+BA+BnC,CAAC"}
1
+ {"version":3,"file":"InputIconButton.d.ts","sourceRoot":"","sources":["../../src/controls/InputIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAElF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAKzE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAOvE,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG;IACnD;;;SAGK;IACL,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;YA6BzB,CAAC;YAA6E,CAAC;sBAAyF,CAAC;;;IApC1K;;;SAGK;+BACsB,OAAO;+BA+BnC,CAAC"}
@@ -1,4 +1,4 @@
1
- const _excluded = ["name", "active", "variant", "transparent", "compact", "background", "color", "borderColor", "iconSize", "borderWidth", "borderRadius", "height", "width", "feedback", "flush", "loading", "progressCircleSize", "style", "accessibilityHint", "accessibilityLabel"];
1
+ const _excluded = ["name", "active", "variant", "transparent", "compact", "background", "color", "borderColor", "iconSize", "borderWidth", "borderRadius", "height", "width", "feedback", "flush", "loading", "progressCircleSize", "style", "styles", "accessibilityHint", "accessibilityLabel"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
4
4
  import { forwardRef, memo, useCallback, useMemo } from 'react';
@@ -33,6 +33,7 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
33
33
  loading,
34
34
  progressCircleSize,
35
35
  style,
36
+ styles,
36
37
  accessibilityHint,
37
38
  accessibilityLabel
38
39
  } = mergedProps,
@@ -58,7 +59,7 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
58
59
  flexDirection: 'column',
59
60
  justifyContent: 'center'
60
61
  }), [height, width]);
61
- const pressableStyle = useCallback(state => [sizingStyle, typeof style === 'function' ? style(state) : style], [sizingStyle, style]);
62
+ const pressableStyle = useCallback(state => [sizingStyle, typeof style === 'function' ? style(state) : style, styles == null ? void 0 : styles.root], [sizingStyle, style, styles == null ? void 0 : styles.root]);
62
63
  return /*#__PURE__*/_jsx(Pressable, _extends({
63
64
  ref: ref,
64
65
  accessibilityHint: accessibilityHint,
@@ -83,6 +84,7 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
83
84
  indeterminate: true,
84
85
  color: colorValue,
85
86
  size: progressCircleSize != null ? progressCircleSize : iconSizeValue,
87
+ style: styles == null ? void 0 : styles.progressCircle,
86
88
  testID: props.testID ? props.testID + "-progress-circle" : undefined,
87
89
  weight: "thin"
88
90
  })
@@ -94,7 +96,10 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
94
96
  color: colorValue,
95
97
  name: name,
96
98
  size: iconSize,
97
- style: sizingStyle
99
+ style: sizingStyle,
100
+ styles: {
101
+ icon: styles == null ? void 0 : styles.icon
102
+ }
98
103
  })
99
104
  }));
100
105
  }));
@@ -182,6 +182,71 @@ const IconButtonScreen = () => {
182
182
  })]
183
183
  })
184
184
  })
185
+ }), /*#__PURE__*/_jsx(Example, {
186
+ inline: true,
187
+ title: "Icon Glyph Styles",
188
+ children: /*#__PURE__*/_jsxs(VStack, {
189
+ gap: 2,
190
+ children: [/*#__PURE__*/_jsxs(Box, {
191
+ alignItems: "center",
192
+ flexDirection: "row",
193
+ gap: 2,
194
+ children: [/*#__PURE__*/_jsx(IconButton, {
195
+ accessibilityLabel: "Custom color via styles.icon",
196
+ name: iconName,
197
+ styles: {
198
+ icon: {
199
+ color: 'dodgerblue'
200
+ }
201
+ }
202
+ }), /*#__PURE__*/_jsx(Text, {
203
+ font: "body",
204
+ children: "Custom color via styles.icon"
205
+ })]
206
+ }), /*#__PURE__*/_jsxs(Box, {
207
+ alignItems: "center",
208
+ flexDirection: "row",
209
+ gap: 2,
210
+ children: [/*#__PURE__*/_jsx(IconButton, {
211
+ accessibilityLabel: "Rotated icon via styles.icon",
212
+ name: iconName,
213
+ styles: {
214
+ icon: {
215
+ transform: [{
216
+ rotate: '45deg'
217
+ }]
218
+ }
219
+ }
220
+ }), /*#__PURE__*/_jsx(Text, {
221
+ font: "body",
222
+ children: "Rotated icon via styles.icon"
223
+ })]
224
+ })]
225
+ })
226
+ }), /*#__PURE__*/_jsx(Example, {
227
+ inline: true,
228
+ title: "Progress Circle Styles",
229
+ children: /*#__PURE__*/_jsx(VStack, {
230
+ gap: 2,
231
+ children: /*#__PURE__*/_jsxs(Box, {
232
+ alignItems: "center",
233
+ flexDirection: "row",
234
+ gap: 2,
235
+ children: [/*#__PURE__*/_jsx(IconButton, {
236
+ loading: true,
237
+ accessibilityLabel: "Reduced opacity progress circle",
238
+ name: iconName,
239
+ styles: {
240
+ progressCircle: {
241
+ opacity: 0.3
242
+ }
243
+ }
244
+ }), /*#__PURE__*/_jsx(Text, {
245
+ font: "body",
246
+ children: "Reduced opacity"
247
+ })]
248
+ })
249
+ })
185
250
  }), /*#__PURE__*/_jsx(Example, {
186
251
  inline: true,
187
252
  title: "Loading",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-mobile",
3
- "version": "8.70.0",
3
+ "version": "8.71.0",
4
4
  "description": "Coinbase Design System - Mobile",
5
5
  "repository": {
6
6
  "type": "git",
@@ -196,7 +196,7 @@
196
196
  "react-native-svg": "^14.1.0"
197
197
  },
198
198
  "dependencies": {
199
- "@coinbase/cds-common": "^8.70.0",
199
+ "@coinbase/cds-common": "^8.71.0",
200
200
  "@coinbase/cds-icons": "^5.16.0",
201
201
  "@coinbase/cds-illustrations": "^4.38.0",
202
202
  "@coinbase/cds-lottie-files": "^3.3.4",