@coinbase/cds-web 9.26.1 → 9.26.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
@@ -1,3 +1,14 @@
1
+ ## 9.26.2 (2026-09-11)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - Fix: vertically align the helper-text error icon with the text in web and mobile inputs.
6
+ - Fix: dismiss the Android soft keyboard when the mobile `TextInput` unmounts while focused.
7
+
8
+ ### 🧱 Updated Dependencies
9
+
10
+ - Updated illustrations to 4.48.1
11
+
1
12
  ## 9.26.1 (2026-09-03)
2
13
 
3
14
  ### 🩹 Fixes
@@ -1 +1 @@
1
- {"version":3,"file":"HelperText.d.ts","sourceRoot":"","sources":["../../src/controls/HelperText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAMjE,OAAO,EAAQ,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEnF,MAAM,MAAM,eAAe,GAAG;IAC5B,+DAA+D;IAC/D,KAAK,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;IACxB,sDAAsD;IACtD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6CAA6C;IAC7C,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,iCAAiC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,MAAM,CAAC,EAAE;QACP,wBAAwB;QACxB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC3B,yBAAyB;QACzB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC5B,CAAC;IACF,6EAA6E;IAC7E,UAAU,CAAC,EAAE;QACX,wBAAwB;QACxB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,yBAAyB;QACzB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC;AAOlC,eAAO,MAAM,UAAU,6CAoDrB,CAAC"}
1
+ {"version":3,"file":"HelperText.d.ts","sourceRoot":"","sources":["../../src/controls/HelperText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAKjE,OAAO,EAAQ,KAAK,kBAAkB,EAAE,KAAK,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEnF,MAAM,MAAM,eAAe,GAAG;IAC5B,+DAA+D;IAC/D,KAAK,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;IACxB,sDAAsD;IACtD,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,6CAA6C;IAC7C,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,iCAAiC;IACjC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,+EAA+E;IAC/E,MAAM,CAAC,EAAE;QACP,wBAAwB;QACxB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAC3B,yBAAyB;QACzB,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;KAC5B,CAAC;IACF,6EAA6E;IAC7E,UAAU,CAAC,EAAE;QACX,wBAAwB;QACxB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,yBAAyB;QACzB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC;AAElC,eAAO,MAAM,UAAU,6CA8DrB,CAAC"}
@@ -1,4 +1,4 @@
1
- const _excluded = ["color", "id", "errorIconAccessibilityLabel", "errorIconTestID", "children", "dangerouslySetColor", "textAlign", "style", "styles", "className", "classNames"];
1
+ const _excluded = ["color", "errorIconAccessibilityLabel", "errorIconTestID", "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; }
@@ -6,60 +6,64 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
6
6
  function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
8
8
  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; }
9
- import React, { memo } from 'react';
9
+ import React, { memo, useMemo } from 'react';
10
10
  import { cx } from '../cx';
11
11
  import { Icon } from '../icons/Icon';
12
- import { Box } from '../layout/Box';
12
+ import { HStack } from '../layout/HStack';
13
13
  import { Text } from '../typography/Text';
14
14
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
- const iconCss = "iconCss-i1ej5caw";
16
15
  export const HelperText = /*#__PURE__*/memo(function HelperTex(_ref) {
17
16
  let {
18
17
  color,
19
- id,
20
18
  errorIconAccessibilityLabel,
21
19
  errorIconTestID,
22
- children,
23
- dangerouslySetColor,
24
- textAlign = 'start',
25
- style,
26
20
  styles,
27
- className,
28
21
  classNames
29
22
  } = _ref,
30
23
  props = _objectWithoutProperties(_ref, _excluded);
31
- const rootStyle = _objectSpread(_objectSpread({}, style), styles === null || styles === void 0 ? void 0 : styles.root);
24
+ const rootStyle = _objectSpread(_objectSpread({}, props.style), styles === null || styles === void 0 ? void 0 : styles.root);
32
25
  // TODO: when we actually remove dangerouslySetColor:
33
26
  // when migrating from dangerouslySetColor to style.color,
34
27
  // root style/className color will not automatically style the error icon like dangerouslySetColor.
35
28
  // Consumers must set both styles.root and styles.icon (or classNames equivalents).
36
29
  // We need to have a migrator handle this or document in future migration guide.
37
- const iconStyle = styles === null || styles === void 0 ? void 0 : styles.icon;
38
- return /*#__PURE__*/_jsxs(Text, _objectSpread(_objectSpread({
39
- className: cx(className, classNames === null || classNames === void 0 ? void 0 : classNames.root),
40
- color: color,
41
- dangerouslySetColor: dangerouslySetColor,
42
- display: "block",
43
- font: "label2",
44
- id: id,
45
- style: rootStyle,
46
- textAlign: textAlign
47
- }, props), {}, {
48
- children: [color === 'fgNegative' && /*#__PURE__*/_jsx(Box, {
49
- as: "span",
50
- className: iconCss,
51
- children: /*#__PURE__*/_jsx(Icon, {
30
+ const iconStyle = useMemo(() => _objectSpread({
31
+ // Sit on the first line of label2, matching nested-text alignment.
32
+ marginTop: 'calc((var(--lineHeight-label2) - var(--iconSize-xs)) / 2)'
33
+ }, styles === null || styles === void 0 ? void 0 : styles.icon), [styles === null || styles === void 0 ? void 0 : styles.icon]);
34
+ const justifyContent = props.textAlign === 'end' ? 'flex-end' : props.textAlign === 'center' ? 'center' : 'flex-start';
35
+ if (color === 'fgNegative') {
36
+ return /*#__PURE__*/_jsxs(HStack, {
37
+ alignItems: "flex-start",
38
+ gap: 0.5,
39
+ justifyContent: justifyContent,
40
+ children: [/*#__PURE__*/_jsx(Icon, {
52
41
  active: true,
53
42
  accessibilityLabel: errorIconAccessibilityLabel,
54
43
  className: classNames === null || classNames === void 0 ? void 0 : classNames.icon,
55
44
  color: "fgNegative",
56
- dangerouslySetColor: dangerouslySetColor,
45
+ dangerouslySetColor: props.dangerouslySetColor,
57
46
  name: "info",
58
47
  size: "xs",
59
48
  style: iconStyle,
60
49
  testID: errorIconTestID
61
- })
62
- }), children]
50
+ }), /*#__PURE__*/_jsx(Text, _objectSpread(_objectSpread({
51
+ color: color,
52
+ display: "block",
53
+ font: "label2"
54
+ }, props), {}, {
55
+ className: cx(props.className, classNames === null || classNames === void 0 ? void 0 : classNames.root),
56
+ flexShrink: 1,
57
+ style: rootStyle
58
+ }))]
59
+ });
60
+ }
61
+ return /*#__PURE__*/_jsx(Text, _objectSpread(_objectSpread({
62
+ color: color,
63
+ display: "block",
64
+ font: "label2"
65
+ }, props), {}, {
66
+ className: cx(props.className, classNames === null || classNames === void 0 ? void 0 : classNames.root),
67
+ style: rootStyle
63
68
  }));
64
- });
65
- import "./HelperText.css";
69
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-web",
3
- "version": "9.26.1",
3
+ "version": "9.26.2",
4
4
  "description": "Coinbase Design System - Web",
5
5
  "repository": {
6
6
  "type": "git",
@@ -227,9 +227,9 @@
227
227
  "react-dom": "^18.0.0 || ~19.1.2"
228
228
  },
229
229
  "dependencies": {
230
- "@coinbase/cds-common": "^9.26.1",
231
- "@coinbase/cds-icons": "^5.22.0",
232
- "@coinbase/cds-illustrations": "^4.48.0",
230
+ "@coinbase/cds-common": "^9.26.2",
231
+ "@coinbase/cds-icons": "^5.24.0",
232
+ "@coinbase/cds-illustrations": "^4.48.1",
233
233
  "@coinbase/cds-lottie-files": "^3.3.4",
234
234
  "@coinbase/cds-utils": "^2.3.5",
235
235
  "@floating-ui/react-dom": "^2.1.1",
@@ -1 +0,0 @@
1
- @layer cds{.iconCss-i1ej5caw{display:inline-block;padding-inline-end:var(--space-0_5);}}