@coinbase/cds-web 9.4.0 → 9.4.2

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.4.2 (6/23/2026 PST)
12
+
13
+ #### 🐞 Fixes
14
+
15
+ - Fix: Button CSS was preventing height prop from working due to CSS specificity issue. [[#764](https://github.com/coinbase/cds/pull/764)]
16
+
17
+ ## 9.4.1 (6/15/2026 PST)
18
+
19
+ #### 🐞 Fixes
20
+
21
+ - Fix: Modal appearance props now apply to the modal card. [[#758](https://github.com/coinbase/cds/pull/758)]
22
+
11
23
  ## 9.4.0 (6/15/2026 PST)
12
24
 
13
25
  #### 🚀 Updates
@@ -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,EAAE,aAAa,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAG1E,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;AA+EjC,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,CA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AAO,CAAC;IAClB,4CAA4C;IAC5C,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,yBAAyB;IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,iDAAiD;IACjD,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,uCAAuC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB;IACvB,GAAG,CAAC,EAAE,KAAK,CAAC,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,eA+JpB,CAAC"}
@@ -23,7 +23,7 @@ export type FullscreenModalLayoutBaseProps = Pick<
23
23
  export type FullscreenModalLayoutProps = FullscreenModalLayoutBaseProps;
24
24
  export declare const FullscreenModalLayout: React.NamedExoticComponent<
25
25
  Pick<
26
- import('./Modal').ModalBaseProps,
26
+ ModalProps,
27
27
  | 'zIndex'
28
28
  | 'visible'
29
29
  | 'accessibilityLabel'
@@ -2,8 +2,19 @@ import React from 'react';
2
2
  import { type ModalContextValue } from '@coinbase/cds-common/overlays/ModalContext';
3
3
  import type { SharedProps } from '@coinbase/cds-common/types/SharedProps';
4
4
  import type { PositionStyles } from '../../styles/styleProps';
5
+ import type { StylesAndClassNames } from '../../types';
5
6
  import { type FocusTrapProps } from '../FocusTrap';
6
7
  import type { ModalWrapperProps } from './ModalWrapper';
8
+ /**
9
+ * Static class names for Modal component parts.
10
+ * Use these selectors to target specific elements with CSS.
11
+ */
12
+ export declare const modalClassNames: {
13
+ /** Full-viewport overlay/backdrop element that positions the modal within the viewport */
14
+ readonly overlay: 'cds-Modal';
15
+ /** Visible modal card element */
16
+ readonly modal: 'cds-Modal-modal';
17
+ };
7
18
  type ModalChildrenRenderProps = {
8
19
  closeModal: () => void;
9
20
  };
@@ -39,10 +50,10 @@ export type ModalBaseProps = SharedProps &
39
50
  */
40
51
  restoreFocusOnUnmount?: boolean;
41
52
  };
42
- export type ModalProps = ModalBaseProps;
53
+ export type ModalProps = ModalBaseProps & StylesAndClassNames<typeof modalClassNames>;
43
54
  export type ModalRefBaseProps = Pick<ModalBaseProps, 'onRequestClose'>;
44
55
  export declare const Modal: React.NamedExoticComponent<
45
- Omit<ModalBaseProps, 'ref'> & React.RefAttributes<ModalRefBaseProps>
56
+ Omit<ModalProps, 'ref'> & React.RefAttributes<ModalRefBaseProps>
46
57
  >;
47
58
  export {};
48
59
  //# sourceMappingURL=Modal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/overlays/modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsE,MAAM,OAAO,CAAC;AAO3F,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAMlG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAW1E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,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none;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;text-align:center;vertical-align:middle;-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;font-weight:600;position:relative;white-space:nowrap;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;overflow:visible;text-transform:none;}
1
+ @layer cds{.baseCss-b99zquh{-webkit-text-decoration:none;text-decoration:none;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;text-align:center;vertical-align:middle;-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;font-weight:600;position:relative;white-space:nowrap;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:0;overflow:visible;text-transform:none;}
2
2
  .blockCss-b9yox33{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:100%;max-width:100%;white-space:normal;}
3
3
  .spinnerContainerCss-s1bhvbb9{position:absolute;top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
4
4
  .startNodeCss-s2x7iw5{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;-webkit-flex-grow:1;-ms-flex-positive:1;flex-grow:1;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start;margin-inline-end:var(--space-1);}
@@ -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", "textAlign"];
1
+ const _excluded = ["as", "variant", "loading", "progressCircleSize", "transparent", "block", "compact", "children", "start", "startIcon", "startIconActive", "end", "endIcon", "endIconActive", "flush", "noScaleOnPress", "numberOfLines", "font", "fontFamily", "fontSize", "fontWeight", "height", "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; }
@@ -59,6 +59,7 @@ export const Button = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) =>
59
59
  fontFamily,
60
60
  fontSize,
61
61
  fontWeight,
62
+ height = 'fit-content',
62
63
  lineHeight,
63
64
  background,
64
65
  color,
@@ -113,6 +114,7 @@ export const Button = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) =>
113
114
  "data-flush": flush,
114
115
  "data-transparent": transparent,
115
116
  "data-variant": variant,
117
+ height: height,
116
118
  loading: loading,
117
119
  margin: margin,
118
120
  minWidth: minWidth,
@@ -1,4 +1,4 @@
1
- const _excluded = ["children", "visible", "onRequestClose", "disableOverlayPress", "disablePortal", "disableFocusTrap", "accessibilityLabelledBy", "accessibilityLabel", "focusTabIndexElements", "restoreFocusOnUnmount", "disableArrowKeyNavigation", "width", "dangerouslyDisableResponsiveness", "dangerouslySetPosition", "shouldCloseOnEscPress", "hideCloseButton", "hideDividers", "maxWidth"];
1
+ const _excluded = ["children", "visible", "onRequestClose", "disableOverlayPress", "disablePortal", "disableFocusTrap", "accessibilityLabelledBy", "accessibilityLabel", "focusTabIndexElements", "restoreFocusOnUnmount", "disableArrowKeyNavigation", "dangerouslyDisableResponsiveness", "dangerouslySetPosition", "shouldCloseOnEscPress", "hideCloseButton", "hideDividers", "className", "classNames", "style", "styles", "width", "maxWidth", "minWidth", "minHeight", "maxHeight", "background", "color", "borderRadius", "borderTopLeftRadius", "borderTopRightRadius", "borderBottomLeftRadius", "borderBottomRightRadius", "borderColor", "borderWidth", "borderTopWidth", "borderBottomWidth", "borderStartWidth", "borderEndWidth", "bordered", "borderedTop", "borderedBottom", "borderedStart", "borderedEnd", "borderedHorizontal", "borderedVertical", "elevation", "padding", "paddingX", "paddingY", "paddingTop", "paddingBottom", "paddingStart", "paddingEnd"];
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; }
@@ -34,6 +34,17 @@ const baseCss = "baseCss-bp3ahp7";
34
34
  const modalDialogResponsiveCss = "modalDialogResponsiveCss-msti16y";
35
35
  const modalResponsiveCss = "modalResponsiveCss-ml7szrb";
36
36
  const MotionBox = motion(Box);
37
+
38
+ /**
39
+ * Static class names for Modal component parts.
40
+ * Use these selectors to target specific elements with CSS.
41
+ */
42
+ export const modalClassNames = {
43
+ /** Full-viewport overlay/backdrop element that positions the modal within the viewport */
44
+ overlay: 'cds-Modal',
45
+ /** Visible modal card element */
46
+ modal: 'cds-Modal-modal'
47
+ };
37
48
  const overlayContentContextValue = {
38
49
  isModal: true
39
50
  };
@@ -51,13 +62,50 @@ export const Modal = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) =>
51
62
  focusTabIndexElements = false,
52
63
  restoreFocusOnUnmount = true,
53
64
  disableArrowKeyNavigation,
54
- width,
55
65
  dangerouslyDisableResponsiveness = false,
56
66
  dangerouslySetPosition,
57
67
  shouldCloseOnEscPress = true,
58
68
  hideCloseButton,
59
69
  hideDividers,
60
- maxWidth
70
+ className,
71
+ classNames,
72
+ style,
73
+ styles,
74
+ // Dialog card sizing
75
+ width,
76
+ maxWidth,
77
+ minWidth,
78
+ minHeight,
79
+ maxHeight,
80
+ // Dialog card appearance
81
+ background,
82
+ color,
83
+ borderRadius = 200,
84
+ borderTopLeftRadius,
85
+ borderTopRightRadius,
86
+ borderBottomLeftRadius,
87
+ borderBottomRightRadius,
88
+ borderColor,
89
+ borderWidth,
90
+ borderTopWidth,
91
+ borderBottomWidth,
92
+ borderStartWidth,
93
+ borderEndWidth,
94
+ bordered,
95
+ borderedTop,
96
+ borderedBottom,
97
+ borderedStart,
98
+ borderedEnd,
99
+ borderedHorizontal,
100
+ borderedVertical,
101
+ elevation = 2,
102
+ padding,
103
+ paddingX,
104
+ paddingY,
105
+ paddingTop,
106
+ paddingBottom,
107
+ paddingStart,
108
+ paddingEnd
61
109
  } = mergedProps,
62
110
  props = _objectWithoutProperties(mergedProps, _excluded);
63
111
  const defaultWidth = dangerouslyDisableResponsiveness ? modalMaxWidth : defaultWidthStyle;
@@ -96,20 +144,26 @@ export const Modal = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) =>
96
144
  const dialogStyles = useMemo(() => ({
97
145
  position: dangerouslySetPosition
98
146
  }), [dangerouslySetPosition]);
147
+ const overlayStyle = useMemo(() => style || styles !== null && styles !== void 0 && styles.overlay ? _objectSpread(_objectSpread({}, style), styles === null || styles === void 0 ? void 0 : styles.overlay) : undefined, [style, styles === null || styles === void 0 ? void 0 : styles.overlay]);
99
148
  return /*#__PURE__*/_jsx(OverlayContentContext.Provider, {
100
149
  value: overlayContentContextValue,
101
150
  children: /*#__PURE__*/_jsx(ModalWrapper, _objectSpread(_objectSpread({
102
151
  accessibilityLabel: label,
103
152
  accessibilityLabelledBy: labelledBy,
153
+ className: cx(modalClassNames.overlay, className, classNames === null || classNames === void 0 ? void 0 : classNames.overlay),
104
154
  dangerouslyDisableResponsiveness: dangerouslyDisableResponsiveness,
105
155
  disableOverlayPress: disableOverlayPress,
106
156
  disablePortal: disablePortal,
107
157
  onOverlayPress: handleClose,
158
+ style: overlayStyle,
108
159
  visible: visible
109
160
  }, props), {}, {
110
161
  children: /*#__PURE__*/_jsx(MotionBox, _objectSpread(_objectSpread({}, motionProps), {}, {
111
162
  className: cx(baseCss, !dangerouslyDisableResponsiveness && modalResponsiveCss),
163
+ maxHeight: maxHeight,
112
164
  maxWidth: maxWidth !== null && maxWidth !== void 0 ? maxWidth : defaultMaxWidth,
165
+ minHeight: minHeight,
166
+ minWidth: minWidth,
113
167
  style: dialogStyles,
114
168
  testID: "modal-dialog-motion",
115
169
  width: width !== null && width !== void 0 ? width : defaultWidth,
@@ -120,10 +174,37 @@ export const Modal = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref) =>
120
174
  onEscPress: shouldCloseOnEscPress ? handleClose : undefined,
121
175
  restoreFocusOnUnmount: restoreFocusOnUnmount,
122
176
  children: /*#__PURE__*/_jsx(VStack, {
123
- borderRadius: 200,
124
- className: cx(!dangerouslyDisableResponsiveness && modalDialogResponsiveCss),
125
- elevation: 2,
177
+ background: background,
178
+ borderBottomLeftRadius: borderBottomLeftRadius,
179
+ borderBottomRightRadius: borderBottomRightRadius,
180
+ borderBottomWidth: borderBottomWidth,
181
+ borderColor: borderColor,
182
+ borderEndWidth: borderEndWidth,
183
+ borderRadius: borderRadius,
184
+ borderStartWidth: borderStartWidth,
185
+ borderTopLeftRadius: borderTopLeftRadius,
186
+ borderTopRightRadius: borderTopRightRadius,
187
+ borderTopWidth: borderTopWidth,
188
+ borderWidth: borderWidth,
189
+ bordered: bordered,
190
+ borderedBottom: borderedBottom,
191
+ borderedEnd: borderedEnd,
192
+ borderedHorizontal: borderedHorizontal,
193
+ borderedStart: borderedStart,
194
+ borderedTop: borderedTop,
195
+ borderedVertical: borderedVertical,
196
+ className: cx(!dangerouslyDisableResponsiveness && modalDialogResponsiveCss, modalClassNames.modal, classNames === null || classNames === void 0 ? void 0 : classNames.modal),
197
+ color: color,
198
+ elevation: elevation,
126
199
  overflow: "hidden",
200
+ padding: padding,
201
+ paddingBottom: paddingBottom,
202
+ paddingEnd: paddingEnd,
203
+ paddingStart: paddingStart,
204
+ paddingTop: paddingTop,
205
+ paddingX: paddingX,
206
+ paddingY: paddingY,
207
+ style: styles === null || styles === void 0 ? void 0 : styles.modal,
127
208
  width: "100%",
128
209
  children: /*#__PURE__*/_jsx(ModalContext.Provider, {
129
210
  value: modalData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-web",
3
- "version": "9.4.0",
3
+ "version": "9.4.2",
4
4
  "description": "Coinbase Design System - Web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -219,9 +219,9 @@
219
219
  "react-dom": "^18.0.0 || ~19.1.2"
220
220
  },
221
221
  "dependencies": {
222
- "@coinbase/cds-common": "^9.4.0",
222
+ "@coinbase/cds-common": "^9.4.2",
223
223
  "@coinbase/cds-icons": "^5.19.0",
224
- "@coinbase/cds-illustrations": "^4.42.0",
224
+ "@coinbase/cds-illustrations": "^4.43.0",
225
225
  "@coinbase/cds-lottie-files": "^3.3.4",
226
226
  "@coinbase/cds-utils": "^2.3.5",
227
227
  "@floating-ui/react-dom": "^2.1.1",