@coinbase/cds-mobile 8.70.0 → 8.72.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 +12 -0
- package/dts/buttons/IconButton.d.ts +19 -1
- package/dts/buttons/IconButton.d.ts.map +1 -1
- package/dts/controls/InputIconButton.d.ts +5 -0
- package/dts/controls/InputIconButton.d.ts.map +1 -1
- package/dts/tag/Tag.d.ts +5 -3
- package/dts/tag/Tag.d.ts.map +1 -1
- package/esm/buttons/IconButton.js +8 -3
- package/esm/buttons/__stories__/IconButton.stories.js +65 -0
- package/esm/system/__stories__/componentConfigStickerSheet/customComponentConfig.js +6 -0
- package/esm/tag/Tag.js +14 -4
- package/package.json +3 -3
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
|
+
## 8.72.0 (5/12/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🚀 Updates
|
|
14
|
+
|
|
15
|
+
- Feat: support key Tag props in component configs. [[#671](https://github.com/coinbase/cds/pull/671)]
|
|
16
|
+
|
|
17
|
+
## 8.71.0 (5/12/2026 PST)
|
|
18
|
+
|
|
19
|
+
#### 🚀 Updates
|
|
20
|
+
|
|
21
|
+
- Add icon glyph and progress circle styles to IconButton. [[#606](https://github.com/coinbase/cds/pull/606)]
|
|
22
|
+
|
|
11
23
|
## 8.70.0 (5/8/2026 PST)
|
|
12
24
|
|
|
13
25
|
#### 🚀 Updates
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type View } from 'react-native';
|
|
1
|
+
import { type StyleProp, type TextStyle, type View, type ViewStyle } from 'react-native';
|
|
2
2
|
import type {
|
|
3
3
|
IconButtonVariant,
|
|
4
4
|
IconName,
|
|
@@ -27,6 +27,15 @@ export type IconButtonBaseProps = SharedProps &
|
|
|
27
27
|
* @default primary
|
|
28
28
|
*/
|
|
29
29
|
variant?: IconButtonVariant;
|
|
30
|
+
/** Custom styles for individual elements of the IconButton component */
|
|
31
|
+
styles?: {
|
|
32
|
+
/** Root Pressable element */
|
|
33
|
+
root?: StyleProp<ViewStyle>;
|
|
34
|
+
/** Inner icon glyph Text element */
|
|
35
|
+
icon?: StyleProp<TextStyle>;
|
|
36
|
+
/** Loading progress circle element */
|
|
37
|
+
progressCircle?: StyleProp<ViewStyle>;
|
|
38
|
+
};
|
|
30
39
|
};
|
|
31
40
|
export type IconButtonProps = IconButtonBaseProps;
|
|
32
41
|
export declare const IconButton: import('react').MemoExoticComponent<
|
|
@@ -51,6 +60,15 @@ export declare const IconButton: import('react').MemoExoticComponent<
|
|
|
51
60
|
* @default primary
|
|
52
61
|
*/
|
|
53
62
|
variant?: IconButtonVariant;
|
|
63
|
+
/** Custom styles for individual elements of the IconButton component */
|
|
64
|
+
styles?: {
|
|
65
|
+
/** Root Pressable element */
|
|
66
|
+
root?: StyleProp<ViewStyle>;
|
|
67
|
+
/** Inner icon glyph Text element */
|
|
68
|
+
icon?: StyleProp<TextStyle>;
|
|
69
|
+
/** Loading progress circle element */
|
|
70
|
+
progressCircle?: StyleProp<ViewStyle>;
|
|
71
|
+
};
|
|
54
72
|
} & import('react').RefAttributes<View>
|
|
55
73
|
>
|
|
56
74
|
>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/buttons/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/buttons/IconButton.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,IAAI,EACT,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EACV,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,WAAW,EACZ,MAAM,4BAA4B,CAAC;A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 @@ export declare const InputIconButton: React.MemoExoticComponent<
|
|
|
22
22
|
iconSize?: import('@coinbase/cds-common').IconSize;
|
|
23
23
|
active?: boolean;
|
|
24
24
|
variant?: IconButtonVariant;
|
|
25
|
+
styles?: {
|
|
26
|
+
root?: import('react-native').StyleProp<import('react-native').ViewStyle>;
|
|
27
|
+
icon?: import('react-native').StyleProp<import('react-native').TextStyle>;
|
|
28
|
+
progressCircle?: import('react-native').StyleProp<import('react-native').ViewStyle>;
|
|
29
|
+
};
|
|
25
30
|
} & {
|
|
26
31
|
/**
|
|
27
32
|
* If set to true, when parent input is focused, the icon will match the color of the focus state
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputIconButton.d.ts","sourceRoot":"","sources":["../../src/controls/InputIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAElF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAKzE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAOvE,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG;IACnD;;;SAGK;IACL,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;
|
|
1
|
+
{"version":3,"file":"InputIconButton.d.ts","sourceRoot":"","sources":["../../src/controls/InputIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAElF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAKzE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,YAAY,EAAE,iBAAiB,CAOvE,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,eAAe,GAAG;IACnD;;;SAGK;IACL,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,eAAe;;;;;;YA6BzB,CAAC;YAA6E,CAAC;sBAAyF,CAAC;;;IApC1K;;;SAGK;+BACsB,OAAO;+BA+BnC,CAAC"}
|
package/dts/tag/Tag.d.ts
CHANGED
|
@@ -9,9 +9,10 @@ import type {
|
|
|
9
9
|
TagEmphasis,
|
|
10
10
|
TagIntent,
|
|
11
11
|
} from '@coinbase/cds-common/types';
|
|
12
|
-
import { type BoxProps } from '../layout';
|
|
12
|
+
import { type BoxBaseProps, type BoxProps } from '../layout/Box';
|
|
13
13
|
export type TagBaseProps = SharedProps &
|
|
14
|
-
SharedAccessibilityProps &
|
|
14
|
+
SharedAccessibilityProps &
|
|
15
|
+
Omit<BoxBaseProps, 'children' | 'color' | 'background'> & {
|
|
15
16
|
/** Children to render within the Tag. */
|
|
16
17
|
children: React.ReactNode;
|
|
17
18
|
/**
|
|
@@ -53,7 +54,8 @@ export type TagProps = TagBaseProps &
|
|
|
53
54
|
export declare const Tag: React.MemoExoticComponent<
|
|
54
55
|
React.ForwardRefExoticComponent<
|
|
55
56
|
SharedProps &
|
|
56
|
-
SharedAccessibilityProps &
|
|
57
|
+
SharedAccessibilityProps &
|
|
58
|
+
Omit<BoxBaseProps, 'children' | 'color' | 'background'> & {
|
|
57
59
|
/** Children to render within the Tag. */
|
|
58
60
|
children: React.ReactNode;
|
|
59
61
|
/**
|
package/dts/tag/Tag.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../src/tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AACh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IACzB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,8CAA8C;IAC9C,SAAS,CAAC,EAAE,QAAQ,CAAC;IACrB,uCAAuC;IACvC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uBAAuB;IACvB,GAAG,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,QAAQ,CAAC;IACnB,qCAAqC;IACrC,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEJ,MAAM,MAAM,QAAQ,GAAG,YAAY,GACjC,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;AAEnE,eAAO,MAAM,GAAG;IAxCZ,yCAAyC;cAC/B,KAAK,CAAC,SAAS;IACzB;;;OAGG;aACM,SAAS;IAClB;;;OAGG;eACQ,WAAW;IACtB;;;OAGG;kBACW,cAAc;IAC5B,sCAAsC;iBACzB,SAAS,CAAC,aAAa;IACpC,gCAAgC;YACxB,SAAS,CAAC,aAAa;IAC/B,0EAA0E;eAC/D,QAAQ,CAAC,UAAU,CAAC;IAC/B,yBAAyB;YACjB,KAAK,CAAC,SAAS;IACvB,8CAA8C;gBAClC,QAAQ;IACpB,uCAAuC;sBACrB,OAAO;IACzB,uBAAuB;UACjB,KAAK,CAAC,SAAS;IACrB,4CAA4C;cAClC,QAAQ;IAClB,qCAAqC;oBACrB,OAAO;kGAmF1B,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["name", "active", "variant", "transparent", "compact", "background", "color", "borderColor", "iconSize", "borderWidth", "borderRadius", "height", "width", "feedback", "flush", "loading", "progressCircleSize", "style", "accessibilityHint", "accessibilityLabel"];
|
|
1
|
+
const _excluded = ["name", "active", "variant", "transparent", "compact", "background", "color", "borderColor", "iconSize", "borderWidth", "borderRadius", "height", "width", "feedback", "flush", "loading", "progressCircleSize", "style", "styles", "accessibilityHint", "accessibilityLabel"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
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; }
|
|
4
4
|
import { forwardRef, memo, useCallback, useMemo } from 'react';
|
|
@@ -33,6 +33,7 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
|
|
|
33
33
|
loading,
|
|
34
34
|
progressCircleSize,
|
|
35
35
|
style,
|
|
36
|
+
styles,
|
|
36
37
|
accessibilityHint,
|
|
37
38
|
accessibilityLabel
|
|
38
39
|
} = mergedProps,
|
|
@@ -58,7 +59,7 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
|
|
|
58
59
|
flexDirection: 'column',
|
|
59
60
|
justifyContent: 'center'
|
|
60
61
|
}), [height, width]);
|
|
61
|
-
const pressableStyle = useCallback(state => [sizingStyle, typeof style === 'function' ? style(state) : style], [sizingStyle, style]);
|
|
62
|
+
const pressableStyle = useCallback(state => [sizingStyle, typeof style === 'function' ? style(state) : style, styles == null ? void 0 : styles.root], [sizingStyle, style, styles == null ? void 0 : styles.root]);
|
|
62
63
|
return /*#__PURE__*/_jsx(Pressable, _extends({
|
|
63
64
|
ref: ref,
|
|
64
65
|
accessibilityHint: accessibilityHint,
|
|
@@ -83,6 +84,7 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
|
|
|
83
84
|
indeterminate: true,
|
|
84
85
|
color: colorValue,
|
|
85
86
|
size: progressCircleSize != null ? progressCircleSize : iconSizeValue,
|
|
87
|
+
style: styles == null ? void 0 : styles.progressCircle,
|
|
86
88
|
testID: props.testID ? props.testID + "-progress-circle" : undefined,
|
|
87
89
|
weight: "thin"
|
|
88
90
|
})
|
|
@@ -94,7 +96,10 @@ export const IconButton = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, ref
|
|
|
94
96
|
color: colorValue,
|
|
95
97
|
name: name,
|
|
96
98
|
size: iconSize,
|
|
97
|
-
style: sizingStyle
|
|
99
|
+
style: sizingStyle,
|
|
100
|
+
styles: {
|
|
101
|
+
icon: styles == null ? void 0 : styles.icon
|
|
102
|
+
}
|
|
98
103
|
})
|
|
99
104
|
}));
|
|
100
105
|
}));
|
|
@@ -182,6 +182,71 @@ const IconButtonScreen = () => {
|
|
|
182
182
|
})]
|
|
183
183
|
})
|
|
184
184
|
})
|
|
185
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
186
|
+
inline: true,
|
|
187
|
+
title: "Icon Glyph Styles",
|
|
188
|
+
children: /*#__PURE__*/_jsxs(VStack, {
|
|
189
|
+
gap: 2,
|
|
190
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
|
191
|
+
alignItems: "center",
|
|
192
|
+
flexDirection: "row",
|
|
193
|
+
gap: 2,
|
|
194
|
+
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
195
|
+
accessibilityLabel: "Custom color via styles.icon",
|
|
196
|
+
name: iconName,
|
|
197
|
+
styles: {
|
|
198
|
+
icon: {
|
|
199
|
+
color: 'dodgerblue'
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
203
|
+
font: "body",
|
|
204
|
+
children: "Custom color via styles.icon"
|
|
205
|
+
})]
|
|
206
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
|
207
|
+
alignItems: "center",
|
|
208
|
+
flexDirection: "row",
|
|
209
|
+
gap: 2,
|
|
210
|
+
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
211
|
+
accessibilityLabel: "Rotated icon via styles.icon",
|
|
212
|
+
name: iconName,
|
|
213
|
+
styles: {
|
|
214
|
+
icon: {
|
|
215
|
+
transform: [{
|
|
216
|
+
rotate: '45deg'
|
|
217
|
+
}]
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
221
|
+
font: "body",
|
|
222
|
+
children: "Rotated icon via styles.icon"
|
|
223
|
+
})]
|
|
224
|
+
})]
|
|
225
|
+
})
|
|
226
|
+
}), /*#__PURE__*/_jsx(Example, {
|
|
227
|
+
inline: true,
|
|
228
|
+
title: "Progress Circle Styles",
|
|
229
|
+
children: /*#__PURE__*/_jsx(VStack, {
|
|
230
|
+
gap: 2,
|
|
231
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
232
|
+
alignItems: "center",
|
|
233
|
+
flexDirection: "row",
|
|
234
|
+
gap: 2,
|
|
235
|
+
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
236
|
+
loading: true,
|
|
237
|
+
accessibilityLabel: "Reduced opacity progress circle",
|
|
238
|
+
name: iconName,
|
|
239
|
+
styles: {
|
|
240
|
+
progressCircle: {
|
|
241
|
+
opacity: 0.3
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
245
|
+
font: "body",
|
|
246
|
+
children: "Reduced opacity"
|
|
247
|
+
})]
|
|
248
|
+
})
|
|
249
|
+
})
|
|
185
250
|
}), /*#__PURE__*/_jsx(Example, {
|
|
186
251
|
inline: true,
|
|
187
252
|
title: "Loading",
|
package/esm/tag/Tag.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["children", "intent", "emphasis", "colorScheme", "background", "color", "start", "startIcon", "startIconActive", "end", "endIcon", "endIconActive", "alignItems", "flexDirection", "gap", "justifyContent", "paddingY", "testID"];
|
|
1
|
+
const _excluded = ["children", "intent", "emphasis", "colorScheme", "background", "color", "start", "startIcon", "startIconActive", "end", "endIcon", "endIconActive", "alignItems", "flexDirection", "gap", "justifyContent", "paddingX", "paddingY", "font", "fontFamily", "fontSize", "fontWeight", "lineHeight", "testID"];
|
|
2
2
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
3
3
|
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; }
|
|
4
4
|
import React, { forwardRef, memo } from 'react';
|
|
@@ -6,7 +6,7 @@ import { tagBorderRadiusMap, tagEmphasisColorMap, tagFontMap, tagHorizontalSpaci
|
|
|
6
6
|
import { useComponentConfig } from '../hooks/useComponentConfig';
|
|
7
7
|
import { useTheme } from '../hooks/useTheme';
|
|
8
8
|
import { Icon } from '../icons/Icon';
|
|
9
|
-
import { Box } from '../layout';
|
|
9
|
+
import { Box } from '../layout/Box';
|
|
10
10
|
import { Text } from '../typography/Text';
|
|
11
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
12
|
export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedRef) => {
|
|
@@ -28,7 +28,13 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedR
|
|
|
28
28
|
flexDirection = 'row',
|
|
29
29
|
gap = 0.5,
|
|
30
30
|
justifyContent = 'center',
|
|
31
|
+
paddingX,
|
|
31
32
|
paddingY = 0.25,
|
|
33
|
+
font,
|
|
34
|
+
fontFamily,
|
|
35
|
+
fontSize,
|
|
36
|
+
fontWeight,
|
|
37
|
+
lineHeight,
|
|
32
38
|
testID = 'cds-tag'
|
|
33
39
|
} = mergedProps,
|
|
34
40
|
props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
|
|
@@ -48,7 +54,7 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedR
|
|
|
48
54
|
flexDirection: flexDirection,
|
|
49
55
|
gap: gap,
|
|
50
56
|
justifyContent: justifyContent,
|
|
51
|
-
paddingX: tagHorizontalSpacing[intent],
|
|
57
|
+
paddingX: paddingX != null ? paddingX : tagHorizontalSpacing[intent],
|
|
52
58
|
paddingY: paddingY,
|
|
53
59
|
testID: testID
|
|
54
60
|
}, props, {
|
|
@@ -59,7 +65,11 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_props, forwardedR
|
|
|
59
65
|
size: "xs"
|
|
60
66
|
}) : null, /*#__PURE__*/_jsx(Text, {
|
|
61
67
|
dangerouslySetColor: color,
|
|
62
|
-
font: tagFontMap[intent],
|
|
68
|
+
font: font != null ? font : tagFontMap[intent],
|
|
69
|
+
fontFamily: fontFamily,
|
|
70
|
+
fontSize: fontSize,
|
|
71
|
+
fontWeight: fontWeight,
|
|
72
|
+
lineHeight: lineHeight,
|
|
63
73
|
numberOfLines: 1,
|
|
64
74
|
testID: testID + "--text",
|
|
65
75
|
children: children
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-mobile",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.72.0",
|
|
4
4
|
"description": "Coinbase Design System - Mobile",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -196,9 +196,9 @@
|
|
|
196
196
|
"react-native-svg": "^14.1.0"
|
|
197
197
|
},
|
|
198
198
|
"dependencies": {
|
|
199
|
-
"@coinbase/cds-common": "^8.
|
|
199
|
+
"@coinbase/cds-common": "^8.72.0",
|
|
200
200
|
"@coinbase/cds-icons": "^5.16.0",
|
|
201
|
-
"@coinbase/cds-illustrations": "^4.
|
|
201
|
+
"@coinbase/cds-illustrations": "^4.39.0",
|
|
202
202
|
"@coinbase/cds-lottie-files": "^3.3.4",
|
|
203
203
|
"@coinbase/cds-utils": "^2.3.5",
|
|
204
204
|
"@floating-ui/react-native": "^0.10.5",
|