@coinbase/cds-web 8.21.0 → 8.21.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 +14 -0
- package/dts/alpha/select/DefaultSelectDropdown.d.ts.map +1 -1
- package/dts/cells/ListCell.d.ts +1 -1
- package/dts/media/Avatar.d.ts.map +1 -1
- package/esm/alpha/select/DefaultSelectDropdown.js +3 -1
- package/esm/media/Avatar.css +2 -1
- package/esm/media/Avatar.js +21 -17
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,20 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.21.2 (11/13/2025 PST)
|
|
12
|
+
|
|
13
|
+
#### 🐞 Fixes
|
|
14
|
+
|
|
15
|
+
- Uniform flex alignment for all Avatar variants. [[#162](https://github.com/coinbase/cds/pull/162)] [DX-4991]
|
|
16
|
+
|
|
17
|
+
## 8.21.1 (11/13/2025 PST)
|
|
18
|
+
|
|
19
|
+
#### 🐞 Fixes
|
|
20
|
+
|
|
21
|
+
- Fixed select alpha dropdown zIndex. [[#161](https://github.com/coinbase/cds/pull/161)]
|
|
22
|
+
- Corrected ListCell spacingVariant jsdoc. [[#161](https://github.com/coinbase/cds/pull/161)]
|
|
23
|
+
- Updated docs of FullscreenMoal and FullscreenModalLayout to show a more precise 3-column layout example. [[#161](https://github.com/coinbase/cds/pull/161)]
|
|
24
|
+
|
|
11
25
|
## 8.21.0 (11/12/2025 PST)
|
|
12
26
|
|
|
13
27
|
#### 🚀 Updates
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultSelectDropdown.d.ts","sourceRoot":"","sources":["../../../src/alpha/select/DefaultSelectDropdown.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DefaultSelectDropdown.d.ts","sourceRoot":"","sources":["../../../src/alpha/select/DefaultSelectDropdown.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAMhE,KAAK,yBAAyB,GAAG,CAC/B,IAAI,SAAS,UAAU,EACvB,iBAAiB,SAAS,MAAM,GAAG,MAAM,EAEzC,KAAK,EAAE,mBAAmB,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;CAAE,KACtF,KAAK,CAAC,YAAY,CAAC;AA6TxB,eAAO,MAAM,qBAAqB,EAAqC,yBAAyB,CAAC"}
|
package/dts/cells/ListCell.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export type ListCellBaseProps = Polymorphic.ExtendableProps<
|
|
|
31
31
|
*/
|
|
32
32
|
action?: React.ReactNode;
|
|
33
33
|
/**
|
|
34
|
-
* @deprecated Use `
|
|
34
|
+
* @deprecated Use `spacingVariant="compact"` instead. `compact` will be removed in a future major release.
|
|
35
35
|
*/
|
|
36
36
|
compact?: boolean;
|
|
37
37
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/media/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIhG,OAAO,EAAO,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAM3E,eAAO,MAAM,gBAAgB,4iDAC8gD,CAAC;
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/media/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,mBAAmB,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAIhG,OAAO,EAAO,KAAK,iBAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAC;AAM3E,eAAO,MAAM,gBAAgB,4iDAC8gD,CAAC;AA+F5iD,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG;IAC1C,iIAAiI;IACjI,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,+BAA+B;IAC/B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,kCAAkC;IAClC,WAAW,CAAC,EAAE,SAAS,CAAC,KAAK,CAAC;IAC9B;;;OAGG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC;IAClC,oGAAoG;IACpG,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,sHAAsH;IACtH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAExE,eAAO,MAAM,MAAM,0JAed,WAAW,6CAqHf,CAAC"}
|
|
@@ -8,6 +8,7 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
8
8
|
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; }
|
|
9
9
|
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; }
|
|
10
10
|
import { forwardRef, memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
11
|
+
import { zIndex } from '@coinbase/cds-common/tokens/zIndex';
|
|
11
12
|
import { AnimatePresence, m as motion } from 'framer-motion';
|
|
12
13
|
import { Button } from '../../buttons';
|
|
13
14
|
import { Checkbox } from '../../controls/Checkbox';
|
|
@@ -62,7 +63,8 @@ const DefaultSelectDropdownComponent = /*#__PURE__*/memo(/*#__PURE__*/forwardRef
|
|
|
62
63
|
const dropdownStyles = useMemo(() => {
|
|
63
64
|
var _controlRef$current;
|
|
64
65
|
return _objectSpread(_objectSpread({
|
|
65
|
-
width: containerWidth !== null ? containerWidth : (_controlRef$current = controlRef.current) === null || _controlRef$current === void 0 ? void 0 : _controlRef$current.getBoundingClientRect().width
|
|
66
|
+
width: containerWidth !== null ? containerWidth : (_controlRef$current = controlRef.current) === null || _controlRef$current === void 0 ? void 0 : _controlRef$current.getBoundingClientRect().width,
|
|
67
|
+
zIndex: zIndex.dropdown
|
|
66
68
|
}, style), styles === null || styles === void 0 ? void 0 : styles.root);
|
|
67
69
|
}, [styles === null || styles === void 0 ? void 0 : styles.root, containerWidth, controlRef, style]);
|
|
68
70
|
const optionStyles = useMemo(() => ({
|
package/esm/media/Avatar.css
CHANGED
|
@@ -2,4 +2,5 @@
|
|
|
2
2
|
.avatarCss-arpga7l{overflow:hidden;border:solid 1px var(--avatar-borderColor);}.avatarCss-arpga7l[data-bordered='true']{border-width:2px;}.avatarCss-arpga7l[data-selected='true']{box-shadow:0 0 0 2px currentColor;}.avatarCss-arpga7l[data-shape='hexagon']{border:none;box-shadow:none;-webkit-clip-path:url(#cds-hexagon-avatar-clipper);clip-path:url(#cds-hexagon-avatar-clipper);}
|
|
3
3
|
.circle-cfv7qmm{border-radius:100%;}
|
|
4
4
|
.square-s917yqm{border-radius:4px;}
|
|
5
|
-
.hexagon-hsci9wn{border-radius:0;}
|
|
5
|
+
.hexagon-hsci9wn{border-radius:0;}
|
|
6
|
+
.contentWrapperCss-ck6a13w{position:absolute;top:0;right:0;bottom:0;left:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-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;}}
|
package/esm/media/Avatar.js
CHANGED
|
@@ -21,6 +21,7 @@ const borderRadiusCss = {
|
|
|
21
21
|
square: "square-s917yqm",
|
|
22
22
|
hexagon: "hexagon-hsci9wn"
|
|
23
23
|
};
|
|
24
|
+
const contentWrapperCss = "contentWrapperCss-ck6a13w";
|
|
24
25
|
export const Avatar = /*#__PURE__*/memo(_ref => {
|
|
25
26
|
var _ref2, _style$width;
|
|
26
27
|
let {
|
|
@@ -75,6 +76,10 @@ export const Avatar = /*#__PURE__*/memo(_ref => {
|
|
|
75
76
|
});
|
|
76
77
|
}, [name, size, dangerouslySetSize]);
|
|
77
78
|
const shouldShowBorder = Boolean((src || !name) && borderColor);
|
|
79
|
+
const dimensionProps = useMemo(() => ({
|
|
80
|
+
width: computedSize,
|
|
81
|
+
height: computedSize
|
|
82
|
+
}), [computedSize]);
|
|
78
83
|
const avatarInlineStyles = useMemo(() => _objectSpread({
|
|
79
84
|
width: computedSize,
|
|
80
85
|
height: computedSize,
|
|
@@ -90,31 +95,30 @@ export const Avatar = /*#__PURE__*/memo(_ref => {
|
|
|
90
95
|
testID: "".concat(testID, "-wrapper")
|
|
91
96
|
}, props), {}, {
|
|
92
97
|
children: [/*#__PURE__*/_jsx(Box, {
|
|
93
|
-
alignItems: "center",
|
|
94
98
|
className: cx(avatarCss, borderRadiusCss[shape], className),
|
|
95
99
|
"data-bordered": shouldShowBorder,
|
|
96
100
|
"data-selected": selected,
|
|
97
101
|
"data-shape": shape,
|
|
98
102
|
flexGrow: 0,
|
|
99
103
|
flexShrink: 0,
|
|
100
|
-
|
|
104
|
+
position: "relative",
|
|
101
105
|
style: avatarInlineStyles,
|
|
102
106
|
testID: testID,
|
|
103
|
-
children:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
107
|
+
children: /*#__PURE__*/_jsx(Box, {
|
|
108
|
+
className: contentWrapperCss,
|
|
109
|
+
children: !!src || !name ? /*#__PURE__*/_jsx(RemoteImage, _objectSpread(_objectSpread({}, dimensionProps), {}, {
|
|
110
|
+
alt: alt,
|
|
111
|
+
shape: shape,
|
|
112
|
+
source: src || fallbackImageSrc
|
|
113
|
+
})) : /*#__PURE__*/_jsx(Box, _objectSpread(_objectSpread({}, dimensionProps), {}, {
|
|
114
|
+
alignItems: "center",
|
|
115
|
+
background: "currentColor",
|
|
116
|
+
className: borderRadiusCss[shape],
|
|
117
|
+
justifyContent: "center",
|
|
118
|
+
position: "relative",
|
|
119
|
+
testID: "".concat(testID, "-fallback"),
|
|
120
|
+
children: avatarText
|
|
121
|
+
}))
|
|
118
122
|
})
|
|
119
123
|
}), shape === 'hexagon' && selected && /*#__PURE__*/_jsx(HexagonBorder, {
|
|
120
124
|
offset: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-web",
|
|
3
|
-
"version": "8.21.
|
|
3
|
+
"version": "8.21.2",
|
|
4
4
|
"description": "Coinbase Design System - Web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -147,9 +147,9 @@
|
|
|
147
147
|
"react-dom": "^18.3.1"
|
|
148
148
|
},
|
|
149
149
|
"dependencies": {
|
|
150
|
-
"@coinbase/cds-common": "^8.21.
|
|
151
|
-
"@coinbase/cds-icons": "^5.
|
|
152
|
-
"@coinbase/cds-illustrations": "^4.
|
|
150
|
+
"@coinbase/cds-common": "^8.21.2",
|
|
151
|
+
"@coinbase/cds-icons": "^5.6.0",
|
|
152
|
+
"@coinbase/cds-illustrations": "^4.27.0",
|
|
153
153
|
"@coinbase/cds-lottie-files": "^3.3.3",
|
|
154
154
|
"@coinbase/cds-utils": "^2.3.4",
|
|
155
155
|
"@floating-ui/react-dom": "^2.1.1",
|