@coinbase/cds-web 8.49.2 → 8.50.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.50.0 (3/6/2026 PST)
12
+
13
+ #### 🚀 Updates
14
+
15
+ - Feat: iconSize customization for IconButton. [[#474](https://github.com/coinbase/cds/pull/474)]
16
+
11
17
  ## 8.49.2 (3/6/2026 PST)
12
18
 
13
19
  #### 🐞 Fixes
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { IconButtonVariant, IconName } from '@coinbase/cds-common/types';
2
+ import type { IconButtonVariant, IconName, IconSize } from '@coinbase/cds-common/types';
3
3
  import type { Polymorphic } from '../core/polymorphism';
4
4
  import { type PressableBaseProps } from '../system/Pressable';
5
5
  import { type ButtonBaseProps } from './Button';
@@ -10,6 +10,11 @@ export type IconButtonBaseProps = Polymorphic.ExtendableProps<
10
10
  Pick<ButtonBaseProps, 'disabled' | 'transparent' | 'compact' | 'flush'> & {
11
11
  /** Name of the icon, as defined in Figma. */
12
12
  name: IconName;
13
+ /**
14
+ * Size for the icon rendered inside the button.
15
+ * @default compact ? 's' : 'm'
16
+ */
17
+ iconSize?: IconSize;
13
18
  /** Whether the icon is active */
14
19
  active?: boolean;
15
20
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/buttons/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAG9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAKxD,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAEzE,OAAO,EAAE,KA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,wBAAwB,WAAW,CAAC;AAEjD,MAAM,MAAM,wBAAwB,GAAG,OAAO,wBAAwB,CAAC;AAEvE,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,eAAe,CAC3D,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,EACpC,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC,GAAG;IACxE,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,CACF,CAAC;AAEF,MAAM,MAAM,eAAe,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,IAAI,WAAW,CAAC,KAAK,CACpF,WAAW,EACX,mBAAmB,CACpB,CAAC;AAEF,KAAK,mBAAmB,GAAG,CAAC,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,wBAAwB,EAC3F,KAAK,EAAE,eAAe,CAAC,WAAW,CAAC,KAChC,WAAW,CAAC,WAAW,CAAC,GAC3B,WAAW,CAAC,UAAU,CAAC;AAgBzB,eAAO,MAAM,UAAU,EAAE,mBA+FxB,CAAC"}
@@ -1,4 +1,4 @@
1
- const _excluded = ["as", "variant", "transparent", "compact", "background", "color", "borderColor", "borderRadius", "borderWidth", "alignItems", "justifyContent", "height", "width", "className", "name", "active", "flush", "loading", "accessibilityLabel", "accessibilityHint"];
1
+ const _excluded = ["as", "variant", "transparent", "compact", "background", "color", "borderColor", "borderRadius", "borderWidth", "alignItems", "justifyContent", "height", "width", "className", "name", "iconSize", "active", "flush", "loading", "accessibilityLabel", "accessibilityHint"];
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
@@ -39,6 +39,7 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref)
39
39
  width = compact ? 40 : 56,
40
40
  className,
41
41
  name,
42
+ iconSize = compact ? 's' : 'm',
42
43
  active,
43
44
  flush,
44
45
  loading,
@@ -48,7 +49,6 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref)
48
49
  props = _objectWithoutProperties(_ref, _excluded);
49
50
  const Component = as !== null && as !== void 0 ? as : iconButtonDefaultElement;
50
51
  const theme = useTheme();
51
- const iconSize = compact ? 's' : 'm';
52
52
  const iconSizeValue = theme.iconSize[iconSize];
53
53
  const spinnerSizeStyles = useMemo(() => ({
54
54
  width: iconSizeValue,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-web",
3
- "version": "8.49.2",
3
+ "version": "8.50.0",
4
4
  "description": "Coinbase Design System - Web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -207,7 +207,7 @@
207
207
  "react-dom": "^18.3.1"
208
208
  },
209
209
  "dependencies": {
210
- "@coinbase/cds-common": "^8.49.2",
210
+ "@coinbase/cds-common": "^8.50.0",
211
211
  "@coinbase/cds-icons": "^5.12.0",
212
212
  "@coinbase/cds-illustrations": "^4.32.0",
213
213
  "@coinbase/cds-lottie-files": "^3.3.4",