@coinbase/cds-web 8.70.0 → 8.71.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,12 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.71.0 (5/12/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🚀 Updates
|
|
14
|
+
|
|
15
|
+
- Add icon glyph and progress circle styles to IconButton. [[#606](https://github.com/coinbase/cds/pull/606)]
|
|
16
|
+
|
|
11
17
|
## 8.70.0 (5/8/2026 PST)
|
|
12
18
|
|
|
13
19
|
#### 🚀 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;
|
|
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;AACzE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAGpD,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,oBAAoB;IAC/B,0BAA0B;;IAE1B,+BAA+B;;IAE/B,sCAAsC;;CAE9B,CAAC;AAEX,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,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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
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"];
|
|
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
|
-
|
|
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(
|
|
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-web",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.71.0",
|
|
4
4
|
"description": "Coinbase Design System - Web",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
"react-dom": "^18.3.1"
|
|
208
208
|
},
|
|
209
209
|
"dependencies": {
|
|
210
|
-
"@coinbase/cds-common": "^8.
|
|
210
|
+
"@coinbase/cds-common": "^8.71.0",
|
|
211
211
|
"@coinbase/cds-icons": "^5.16.0",
|
|
212
212
|
"@coinbase/cds-illustrations": "^4.38.0",
|
|
213
213
|
"@coinbase/cds-lottie-files": "^3.3.4",
|