@coinbase/cds-web 8.70.0 → 8.72.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,18 @@ All notable changes to this project will be documented in this file.
8
8
 
9
9
  <!-- template-start -->
10
10
 
11
+ ## 8.72.0 (5/12/2026 PST)
12
+
13
+ #### 🚀 Updates
14
+
15
+ - Feat: support key Tag props in component configs. [[#671](https://github.com/coinbase/cds/pull/671)]
16
+
17
+ ## 8.71.0 (5/12/2026 PST)
18
+
19
+ #### 🚀 Updates
20
+
21
+ - Add icon glyph and progress circle styles to IconButton. [[#606](https://github.com/coinbase/cds/pull/606)]
22
+
11
23
  ## 8.70.0 (5/8/2026 PST)
12
24
 
13
25
  #### 🚀 Updates
@@ -2,7 +2,20 @@ import React from 'react';
2
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
+ import type { StylesAndClassNames } from '../types';
5
6
  import { type ButtonBaseProps } from './Button';
7
+ /**
8
+ * Static class names for IconButton component parts.
9
+ * Use these selectors to target specific elements with CSS.
10
+ */
11
+ export declare const iconButtonClassNames: {
12
+ /** Root button element */
13
+ readonly root: 'cds-IconButton';
14
+ /** Inner icon glyph element */
15
+ readonly icon: 'cds-IconButton-icon';
16
+ /** Loading progress circle element */
17
+ readonly progressCircle: 'cds-IconButton-progressCircle';
18
+ };
6
19
  export declare const iconButtonDefaultElement = 'button';
7
20
  export type IconButtonDefaultElement = typeof iconButtonDefaultElement;
8
21
  export type IconButtonBaseProps = Polymorphic.ExtendableProps<
@@ -27,7 +40,8 @@ export type IconButtonBaseProps = Polymorphic.ExtendableProps<
27
40
  export type IconButtonProps<AsComponent extends React.ElementType> = Polymorphic.Props<
28
41
  AsComponent,
29
42
  IconButtonBaseProps
30
- >;
43
+ > &
44
+ StylesAndClassNames<typeof iconButtonClassNames>;
31
45
  type IconButtonComponent = (<AsComponent extends React.ElementType = IconButtonDefaultElement>(
32
46
  props: IconButtonProps<AsComponent>,
33
47
  ) => Polymorphic.ReactReturn) &
@@ -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,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAGxF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAKxD,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGzE,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,eAAO,MAAM,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,EA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AI,WAAW,CAAC,KAAK,CACpF,WAAW,EACX,mBAAmB,CACpB,GACC,mBAAmB,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAEnD,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,mBAuGxB,CAAC"}
package/dts/tag/Tag.d.ts CHANGED
@@ -8,10 +8,11 @@ import type {
8
8
  TagEmphasis,
9
9
  TagIntent,
10
10
  } from '@coinbase/cds-common/types';
11
- import { type BoxDefaultElement, type BoxProps } from '../layout/Box';
11
+ import { type BoxBaseProps, type BoxDefaultElement, type BoxProps } from '../layout/Box';
12
12
  export declare const tagStaticClassName = 'cds-tag';
13
13
  export type TagBaseProps = SharedProps &
14
- SharedAccessibilityProps & {
14
+ SharedAccessibilityProps &
15
+ Omit<BoxBaseProps, 'children' | 'color' | 'background'> & {
15
16
  /** Children to render within the Tag. */
16
17
  children: React.ReactNode;
17
18
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../src/tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAOjE,OAAO,KAAK,EACV,QAAQ,EACR,wBAAwB,EACxB,WAAW,EACX,cAAc,EACd,WAAW,EACX,SAAS,EACV,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EAAO,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAQ3E,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAE5C,MAAM,MAAM,YAAY,GAAG,WAAW,GACpC,wBAAwB,GAAG;IACzB,yCAAyC;IACzC,QAAQ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ded = ["as", "variant", "transparent", "compact", "background", "color", "borderColor", "borderRadius", "borderWidth", "alignItems", "justifyContent", "height", "width", "className", "name", "iconSize", "active", "flush", "loading", "progressCircleSize", "accessibilityLabel", "accessibilityHint"];
1
+ const _excluded = ["as", "variant", "transparent", "compact", "background", "color", "borderColor", "borderRadius", "borderWidth", "alignItems", "justifyContent", "height", "width", "className", "name", "iconSize", "active", "flush", "loading", "progressCircleSize", "accessibilityLabel", "accessibilityHint", "styles", "classNames"];
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; }
@@ -15,7 +15,18 @@ import { Icon } from '../icons/Icon';
15
15
  import { Pressable } from '../system/Pressable';
16
16
  import { ProgressCircle } from '../visualizations/ProgressCircle';
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
- const COMPONENT_STATIC_CLASSNAME = 'cds-IconButton';
18
+ /**
19
+ * Static class names for IconButton component parts.
20
+ * Use these selectors to target specific elements with CSS.
21
+ */
22
+ export const iconButtonClassNames = {
23
+ /** Root button element */
24
+ root: 'cds-IconButton',
25
+ /** Inner icon glyph element */
26
+ icon: 'cds-IconButton-icon',
27
+ /** Loading progress circle element */
28
+ progressCircle: 'cds-IconButton-progressCircle'
29
+ };
19
30
  export const iconButtonDefaultElement = 'button';
20
31
  const flushSpaceCss = "flushSpaceCss-f1po8mo6";
21
32
  const flushStartCss = "flushStartCss-fqg7x6g";
@@ -45,7 +56,9 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
45
56
  loading,
46
57
  progressCircleSize,
47
58
  accessibilityLabel,
48
- accessibilityHint
59
+ accessibilityHint,
60
+ styles,
61
+ classNames
49
62
  } = mergedProps,
50
63
  props = _objectWithoutProperties(mergedProps, _excluded);
51
64
  const Component = as !== null && as !== void 0 ? as : iconButtonDefaultElement;
@@ -66,7 +79,7 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
66
79
  borderColor: borderColorValue,
67
80
  borderRadius: borderRadius,
68
81
  borderWidth: borderWidth,
69
- className: cx(COMPONENT_STATIC_CLASSNAME, flush && flushSpaceCss, flush === 'start' && flushStartCss, flush === 'end' && flushEndCss, className),
82
+ className: cx(iconButtonClassNames.root, flush && flushSpaceCss, flush === 'start' && flushStartCss, flush === 'end' && flushEndCss, classNames === null || classNames === void 0 ? void 0 : classNames.root, className),
70
83
  color: colorValue,
71
84
  "data-compact": compact,
72
85
  "data-flush": flush,
@@ -81,15 +94,23 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
81
94
  children: loading ? /*#__PURE__*/_jsx(ProgressCircle, {
82
95
  indeterminate: true,
83
96
  accessibilityLabel: "Loading",
97
+ className: cx(iconButtonClassNames.progressCircle, classNames === null || classNames === void 0 ? void 0 : classNames.progressCircle),
84
98
  color: "currentColor",
85
99
  size: progressCircleSize !== null && progressCircleSize !== void 0 ? progressCircleSize : iconSizeValue,
100
+ style: styles === null || styles === void 0 ? void 0 : styles.progressCircle,
86
101
  testID: props.testID ? "".concat(props.testID, "-progress-circle") : undefined,
87
102
  weight: "thin"
88
103
  }) : /*#__PURE__*/_jsx(Icon, {
89
104
  active: active,
105
+ classNames: {
106
+ icon: cx(iconButtonClassNames.icon, classNames === null || classNames === void 0 ? void 0 : classNames.icon)
107
+ },
90
108
  color: "currentColor",
91
109
  name: name,
92
- size: iconSize
110
+ size: iconSize,
111
+ styles: {
112
+ icon: styles === null || styles === void 0 ? void 0 : styles.icon
113
+ }
93
114
  })
94
115
  }));
95
116
  }));
package/esm/tag/Tag.js CHANGED
@@ -1,4 +1,4 @@
1
- const _excluded = ["children", "intent", "emphasis", "colorScheme", "background", "color", "start", "startIcon", "startIconActive", "end", "endIcon", "endIconActive", "display", "alignItems", "gap", "justifyContent", "paddingY", "testID"];
1
+ const _excluded = ["children", "intent", "emphasis", "colorScheme", "background", "color", "start", "startIcon", "startIconActive", "end", "endIcon", "endIconActive", "display", "alignItems", "gap", "justifyContent", "paddingX", "paddingY", "font", "fontFamily", "fontSize", "fontWeight", "lineHeight", "testID"];
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; }
@@ -35,7 +35,13 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedR
35
35
  alignItems = 'center',
36
36
  gap = 0.5,
37
37
  justifyContent = 'center',
38
+ paddingX,
38
39
  paddingY = 0.25,
40
+ font,
41
+ fontFamily,
42
+ fontSize,
43
+ fontWeight,
44
+ lineHeight,
39
45
  testID = tagStaticClassName
40
46
  } = mergedProps,
41
47
  props = _objectWithoutProperties(mergedProps, _excluded);
@@ -58,7 +64,7 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedR
58
64
  display: display,
59
65
  gap: gap,
60
66
  justifyContent: justifyContent,
61
- paddingX: tagHorizontalSpacing[intent],
67
+ paddingX: paddingX !== null && paddingX !== void 0 ? paddingX : tagHorizontalSpacing[intent],
62
68
  paddingY: paddingY,
63
69
  style: boxStyles,
64
70
  testID: testID
@@ -77,7 +83,11 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedR
77
83
  }) : null, /*#__PURE__*/_jsx(Text, {
78
84
  color: "currentColor",
79
85
  display: "inline",
80
- font: tagFontMap[intent],
86
+ font: font !== null && font !== void 0 ? font : tagFontMap[intent],
87
+ fontFamily: fontFamily,
88
+ fontSize: fontSize,
89
+ fontWeight: fontWeight,
90
+ lineHeight: lineHeight,
81
91
  overflow: "truncate",
82
92
  testID: "".concat(testID, "--text"),
83
93
  children: children
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-web",
3
- "version": "8.70.0",
3
+ "version": "8.72.0",
4
4
  "description": "Coinbase Design System - Web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -207,9 +207,9 @@
207
207
  "react-dom": "^18.3.1"
208
208
  },
209
209
  "dependencies": {
210
- "@coinbase/cds-common": "^8.70.0",
210
+ "@coinbase/cds-common": "^8.72.0",
211
211
  "@coinbase/cds-icons": "^5.16.0",
212
- "@coinbase/cds-illustrations": "^4.38.0",
212
+ "@coinbase/cds-illustrations": "^4.39.0",
213
213
  "@coinbase/cds-lottie-files": "^3.3.4",
214
214
  "@coinbase/cds-utils": "^2.3.5",
215
215
  "@floating-ui/react-dom": "^2.1.1",