@coinbase/cds-web 9.0.1 → 9.1.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
+ ## 9.1.0 (5/26/2026 PST)
12
+
13
+ #### 🚀 Updates
14
+
15
+ - Feat: support DotCount theming. [[#723](https://github.com/coinbase/cds/pull/723)]
16
+
17
+ ## 9.0.2 (5/22/2026 PST)
18
+
19
+ #### 🐞 Fixes
20
+
21
+ - Fix: improve button text alignment by using flexbox. [[#720](https://github.com/coinbase/cds/pull/720)]
22
+
11
23
  ## 9.0.1 ((5/22/2026, 09:25 AM PST))
12
24
 
13
25
  This is an artificial version bump with no new change.
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/buttons/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EACV,aAAa,EACb,QAAQ,EACR,wBAAwB,EACxB,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAMxD,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAMzE;;GAEG;AACH,eAAO,MAAM,aAAa,MAAM,CAAC;AA8EjC,eAAO,MAAM,oBAAoB,WAAW,CAAC;AAE7C,MAAM,MAAM,oBAAoB,GAAG,OAAO,oBAAoB,CAAC;AAE/D,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,eAAe,CACvD,kBAAkB,EAClB,WAAW,GACT,IAAI,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,GAAG;IACrD;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,w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AC,SAAS,CAAC;IACtB,+CAA+C;IAC/C,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,qCAAqC;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;IACxB,kDAAkD;IAClD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CACJ,CAAC;AAEF,MAAM,MAAM,WAAW,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,oBAAoB,IAClF,WAAW,CAAC,KAAK,CAAC,WAAW,EAAE,eAAe,CAAC,CAAC;AAElD,KAAK,eAAe,GAAG,CAAC,CAAC,WAAW,SAAS,KAAK,CAAC,WAAW,GAAG,oBAAoB,EACnF,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,KAC5B,WAAW,CAAC,WAAW,CAAC,GAC3B,WAAW,CAAC,UAAU,CAAC;AAEzB,eAAO,MAAM,MAAM,EAAE,eA6JpB,CAAC"}
@@ -6,11 +6,13 @@ import type {
6
6
  SharedAccessibilityProps,
7
7
  SharedProps,
8
8
  } from '@coinbase/cds-common/types';
9
+ import { type BoxBaseProps } from '../layout/Box';
9
10
  export type DotCountBaseProps = SharedProps &
10
11
  Pick<
11
12
  SharedAccessibilityProps,
12
13
  'accessibilityLabel' | 'accessibilityLabelledBy' | 'accessibilityHint'
13
- > & {
14
+ > &
15
+ Omit<BoxBaseProps, 'children' | 'color' | 'background' | 'pin' | 'height'> & {
14
16
  /**
15
17
  * The number value to be shown in the dot. If count is <= 0, dot will not show up.
16
18
  * */
@@ -32,21 +34,16 @@ export type DotCountBaseProps = SharedProps &
32
34
  /** Indicates what shape Dot is overlapping */
33
35
  overlap?: DotOverlap;
34
36
  /**
35
- * An optional fixed height of the DotCount component.
36
- * Width grows based on content length.
37
+ * Fixed height of the DotCount badge container. Width grows based on content length.
37
38
  * @default 24
38
- * */
39
- height?: number;
40
- /**
41
- * An optional fixed width of the DotCount component.
42
- * By default, width grows based on content length.
43
- * @default auto
44
- * */
45
- width?: number;
39
+ */
40
+ height?: BoxBaseProps['height'];
46
41
  };
47
42
  export type DotCountProps = DotCountBaseProps & {
43
+ /** Class name for the root element */
48
44
  className?: string;
49
- style?: React.CSSProperties;
45
+ /** Color token for the count label */
46
+ color?: BoxBaseProps['color'];
50
47
  /** Custom class names for individual elements of the DotCount component */
51
48
  classNames?: {
52
49
  /** Root element */
@@ -1 +1 @@
1
- {"version":3,"file":"DotCount.d.ts","sourceRoot":"","sources":["../../src/dots/DotCount.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAS7C,OAAO,KAAK,EACV,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,wBAAwB,EACxB,WAAW,EACZ,MAAM,4BAA4B,CAAC;AAmCpC,MAAM,MAAM,iBAAiB,GAAG,WAAW,GACzC,IAAI,CACF,wBAAwB,EACxB,oBAAoB,GAAG,yBAAyB,GAAG,mBAAmB,CACvE,GAAG;IACF;;UAEM;IACN,KAAK,EAAE,MAAM,CAAC;IACd;;;UAGM;IACN,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;SAGK;IACL,OAAO,CAAC,EAAE,gBAAgB,CAAC;IAC3B,6CAA6C;IAC7C,GAAG,CAAC,EAAE,oBAAoB,CAAC;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB;;;;SAIK;IACL,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;SAIK;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;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,oBAAoB,CAAC;IAC3B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,8CAA8C;IAC9C,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;CACjC,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG;IAC9C,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAC;IAC9B,2EAA2E;IAC3E,UAAU,CAAC,EAAE;QACX,mBAAmB;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,wBAAwB;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,mBAAmB;QACnB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,sEAAsE;IACtE,MAAM,CAAC,EAAE;QACP,mBAAmB;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC3B,wBAAwB;QACxB,SAAS,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAChC,mBAAmB;QACnB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC5B,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,QAAQ,qCAAiB,aAAa,6CA6GjD,CAAC"}
@@ -6,5 +6,5 @@
6
6
  .iconCss-ixznik7{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}
7
7
  .unsetNoWrapCss-u148mgtl{white-space:unset;}
8
8
  .hiddenCss-h1pxicn8{visibility:hidden;}
9
- .middleNodeCss-m1avpq52{position:relative;}
9
+ .middleNodeCss-m1avpq52{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;}
10
10
  .flushCss-f69rtgb{min-width:unset;}}
@@ -1,4 +1,4 @@
1
- const _excluded = ["as", "variant", "loading", "progressCircleSize", "transparent", "block", "compact", "children", "start", "startIcon", "startIconActive", "end", "endIcon", "endIconActive", "flush", "noScaleOnPress", "numberOfLines", "font", "fontFamily", "fontSize", "fontWeight", "lineHeight", "background", "color", "className", "borderColor", "borderWidth", "borderRadius", "accessibilityLabel", "padding", "paddingX", "paddingY", "margin", "minWidth", "style"];
1
+ const _excluded = ["as", "variant", "loading", "progressCircleSize", "transparent", "block", "compact", "children", "start", "startIcon", "startIconActive", "end", "endIcon", "endIconActive", "flush", "noScaleOnPress", "numberOfLines", "font", "fontFamily", "fontSize", "fontWeight", "lineHeight", "background", "color", "className", "borderColor", "borderWidth", "borderRadius", "accessibilityLabel", "padding", "paddingX", "paddingY", "margin", "minWidth", "style", "textAlign"];
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; }
@@ -73,7 +73,8 @@ export const Button = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) =>
73
73
  paddingY = padding !== null && padding !== void 0 ? padding : compact ? 1 : 2,
74
74
  margin = 0,
75
75
  minWidth = 'auto',
76
- style
76
+ style,
77
+ textAlign = 'center'
77
78
  } = mergedProps,
78
79
  props = _objectWithoutProperties(mergedProps, _excluded);
79
80
  const theme = useTheme();
@@ -153,6 +154,7 @@ export const Button = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) =>
153
154
  fontWeight: fontWeight,
154
155
  lineHeight: lineHeight,
155
156
  numberOfLines: numberOfLines,
157
+ textAlign: textAlign,
156
158
  children: /*#__PURE__*/_jsx("span", {
157
159
  className: cx(loading && hiddenCss),
158
160
  children: children
@@ -1,2 +1 @@
1
- @layer cds{.baseCss-b1qqkfau{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;position:relative;}
2
- .dotCountContentCss-dqpqhs5{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;border-style:solid;border-width:var(--borderWidth-100);border-radius:var(--borderRadius-400);padding-inline-start:var(--space-0_75);padding-inline-end:var(--space-0_75);}}
1
+ @layer cds{.baseCss-b1qqkfau{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;position:relative;}}
@@ -1,4 +1,4 @@
1
- const _excluded = ["children", "pin", "variant", "count", "max", "height", "width", "testID", "accessibilityLabel", "overlap", "className", "classNames", "style", "styles"];
1
+ const _excluded = ["children", "pin", "variant", "count", "max", "height", "width", "testID", "accessibilityLabel", "overlap", "className", "classNames", "style", "styles", "alignItems", "justifyContent", "display", "paddingX", "borderWidth", "borderRadius", "borderColor", "font", "color", "fontFamily", "fontSize", "fontWeight", "lineHeight"];
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; }
@@ -14,13 +14,13 @@ import { m as motion } from 'framer-motion';
14
14
  import { NewAnimatePresence } from '../animation/NewAnimatePresence';
15
15
  import { cx } from '../cx';
16
16
  import { useComponentConfig } from '../hooks/useComponentConfig';
17
- import { useTheme } from '../hooks/useTheme';
17
+ import { Box } from '../layout/Box';
18
18
  import { useMotionProps } from '../motion/useMotionProps';
19
19
  import { Text } from '../typography/Text';
20
20
  import { getTransform } from './dotStyles';
21
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
+ const MotionBox = motion(Box);
22
23
  const baseCss = "baseCss-b1qqkfau";
23
- const dotCountContentCss = "dotCountContentCss-dqpqhs5";
24
24
  const variantColorMap = {
25
25
  negative: 'fgNegative'
26
26
  };
@@ -34,62 +34,78 @@ export const DotCount = /*#__PURE__*/memo(_props => {
34
34
  max,
35
35
  height = dotCountSize,
36
36
  width,
37
- testID,
37
+ testID = 'dot-count',
38
38
  accessibilityLabel,
39
39
  overlap,
40
40
  className,
41
41
  classNames,
42
42
  style,
43
- styles
43
+ styles,
44
+ alignItems = 'center',
45
+ justifyContent = 'center',
46
+ display = 'flex',
47
+ paddingX = 0.75,
48
+ borderWidth = 100,
49
+ borderRadius = 400,
50
+ borderColor = 'bgSecondary',
51
+ font = 'caption',
52
+ color = 'fgInverse',
53
+ fontFamily,
54
+ fontSize,
55
+ fontWeight,
56
+ lineHeight
44
57
  } = mergedProps,
45
58
  props = _objectWithoutProperties(mergedProps, _excluded);
46
- const {
47
- color
48
- } = useTheme();
49
59
  const pinStyles = getTransform(pin, overlap);
50
- const containerStyles = useMemo(() => {
51
- const variantColor = variantColorMap[variant];
52
- return _objectSpread(_objectSpread({
53
- height,
54
- minWidth: height,
55
- width,
56
- backgroundColor: color[variantColor],
57
- borderColor: color.bgSecondary
58
- }, pinStyles), styles === null || styles === void 0 ? void 0 : styles.container);
59
- }, [height, width, color, pinStyles, styles === null || styles === void 0 ? void 0 : styles.container, variant]);
60
+ const containerStyle = useMemo(() => _objectSpread(_objectSpread({}, pinStyles), styles === null || styles === void 0 ? void 0 : styles.container), [pinStyles, styles === null || styles === void 0 ? void 0 : styles.container]);
60
61
  const motionProps = useMotionProps({
61
62
  enterConfigs: [dotOpacityEnterConfig, dotScaleEnterConfig],
62
63
  exitConfigs: [dotOpacityExitConfig, dotScaleExitConfig],
63
64
  exit: 'exit'
64
65
  });
65
66
  const rootStyles = useMemo(() => _objectSpread(_objectSpread({}, style), styles === null || styles === void 0 ? void 0 : styles.root), [styles === null || styles === void 0 ? void 0 : styles.root, style]);
66
- return /*#__PURE__*/_jsxs("div", _objectSpread(_objectSpread({
67
+ const displayCount = useMemo(() => parseDotCountMaxOverflow(count, max), [count, max]);
68
+ return /*#__PURE__*/_jsxs("div", {
67
69
  "aria-label": accessibilityLabel,
68
70
  className: cx(baseCss, className, classNames === null || classNames === void 0 ? void 0 : classNames.root),
69
71
  "data-testid": testID,
70
- style: rootStyles
71
- }, props), {}, {
72
+ style: rootStyles,
72
73
  children: [children, /*#__PURE__*/_jsx(NewAnimatePresence, {
73
74
  children: count > 0 &&
74
75
  /*#__PURE__*/
75
76
  // TODO: Remove type assertion after upgrading framer-motion to v11+ for React 19 compatibility
76
- _jsx(motion.div, _objectSpread(_objectSpread({}, _objectSpread(_objectSpread({}, motionProps), {}, {
77
- className: cx(dotCountContentCss, classNames === null || classNames === void 0 ? void 0 : classNames.container),
77
+ _jsx(MotionBox, _objectSpread(_objectSpread({}, _objectSpread(_objectSpread({}, motionProps), {}, {
78
+ alignItems,
79
+ background: variantColorMap[variant],
80
+ borderColor,
81
+ borderRadius,
82
+ borderWidth,
83
+ className: classNames === null || classNames === void 0 ? void 0 : classNames.container,
78
84
  'data-testid': 'dotcount-container',
79
- style: containerStyles
80
- })), {}, {
85
+ display,
86
+ height,
87
+ justifyContent,
88
+ minWidth: height,
89
+ paddingX,
90
+ style: containerStyle,
91
+ width
92
+ }, props)), {}, {
81
93
  children: /*#__PURE__*/_jsx(Text, {
82
94
  as: "p",
83
95
  className: classNames === null || classNames === void 0 ? void 0 : classNames.text,
84
- color: "fgInverse",
96
+ color: color,
85
97
  display: "block",
86
- font: "caption",
98
+ font: font,
99
+ fontFamily: fontFamily,
100
+ fontSize: fontSize,
101
+ fontWeight: fontWeight,
102
+ lineHeight: lineHeight,
87
103
  style: styles === null || styles === void 0 ? void 0 : styles.text,
88
104
  textAlign: "center",
89
- children: parseDotCountMaxOverflow(count, max)
105
+ children: displayCount
90
106
  })
91
107
  }))
92
108
  })]
93
- }));
109
+ });
94
110
  });
95
111
  import "./DotCount.css";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-web",
3
- "version": "9.0.1",
3
+ "version": "9.1.0",
4
4
  "description": "Coinbase Design System - Web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -215,7 +215,7 @@
215
215
  "react-dom": "^18.0.0 || ~19.1.2"
216
216
  },
217
217
  "dependencies": {
218
- "@coinbase/cds-common": "^9.0.1",
218
+ "@coinbase/cds-common": "^9.1.0",
219
219
  "@coinbase/cds-icons": "^5.17.0",
220
220
  "@coinbase/cds-illustrations": "^4.40.1",
221
221
  "@coinbase/cds-lottie-files": "^3.3.4",