@coinbase/cds-mobile 9.6.11 → 9.7.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
|
+
## 9.7.0 (7/22/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🚀 Updates
|
|
14
|
+
|
|
15
|
+
- Add hideSeparator prop to numpad. [[#799](https://github.com/coinbase/cds/pull/799)]
|
|
16
|
+
|
|
11
17
|
## 9.6.11 (7/22/2026 PST)
|
|
12
18
|
|
|
13
19
|
#### 🐞 Fixes
|
package/dts/numpad/Numpad.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export type NumpadButtonProps = {
|
|
|
14
14
|
onPress: (value: NumpadValue) => void;
|
|
15
15
|
onLongPress?: (value: NumpadValue) => void;
|
|
16
16
|
separator?: string;
|
|
17
|
+
hideSeparator?: boolean;
|
|
17
18
|
disabled?: boolean;
|
|
18
19
|
separatorAccessibilityLabel?: string;
|
|
19
20
|
deleteAccessibilityLabel?: string;
|
|
@@ -21,6 +22,8 @@ export type NumpadButtonProps = {
|
|
|
21
22
|
};
|
|
22
23
|
export type NumpadBaseProps = BoxBaseProps & {
|
|
23
24
|
separator?: string;
|
|
25
|
+
/** When `true`, hides the separator key and removes it from the accessibility tree. */
|
|
26
|
+
hideSeparator?: boolean;
|
|
24
27
|
disabled?: boolean;
|
|
25
28
|
accessory?: React.ReactNode;
|
|
26
29
|
action?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Numpad.d.ts","sourceRoot":"","sources":["../../src/numpad/Numpad.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqC,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAc,IAAI,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,KA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OAAO,CAAC;IACnB,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uFAAuF;IACvF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC,wBAAwB,CAAC,EAAE,MAAM,CAAC;CACnC,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,eAAe,GACvC,WAAW,GAAG;IACZ,OAAO,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C;;;OAGG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B,GAAG,WAAW,GACf,WAAW,CAAC;AAuBd,eAAO,MAAM,MAAM,+DAId,WAAW,GAAG;IACf,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;CACvB,6CA6EF,CAAC"}
|
package/esm/numpad/Numpad.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const _excluded = ["ref"],
|
|
2
|
-
_excluded2 = ["separator", "disabled", "onPress", "onLongPress", "accessory", "action", "deleteAccessibilityLabel", "separatorAccessibilityLabel", "testID", "background", "flexGrow", "flexShrink", "gap", "feedback"];
|
|
2
|
+
_excluded2 = ["separator", "hideSeparator", "disabled", "onPress", "onLongPress", "accessory", "action", "deleteAccessibilityLabel", "separatorAccessibilityLabel", "testID", "background", "flexGrow", "flexShrink", "gap", "feedback"];
|
|
3
3
|
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); }
|
|
4
4
|
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; }
|
|
5
5
|
import React, { memo, useCallback, useMemo } from 'react';
|
|
@@ -36,6 +36,7 @@ export const Numpad = /*#__PURE__*/memo(_ref => {
|
|
|
36
36
|
const mergedProps = useComponentConfig('Numpad', _props);
|
|
37
37
|
const {
|
|
38
38
|
separator = '.',
|
|
39
|
+
hideSeparator = false,
|
|
39
40
|
disabled,
|
|
40
41
|
onPress,
|
|
41
42
|
onLongPress,
|
|
@@ -63,6 +64,7 @@ export const Numpad = /*#__PURE__*/memo(_ref => {
|
|
|
63
64
|
deleteAccessibilityLabel: deleteAccessibilityLabel,
|
|
64
65
|
disabled: disabled,
|
|
65
66
|
feedback: feedback,
|
|
67
|
+
hideSeparator: hideSeparator,
|
|
66
68
|
onLongPress: onLongPress,
|
|
67
69
|
onPress: onPress,
|
|
68
70
|
separator: separator,
|
|
@@ -71,7 +73,7 @@ export const Numpad = /*#__PURE__*/memo(_ref => {
|
|
|
71
73
|
}, "value_" + value))
|
|
72
74
|
}, "num_pad_item_" + i);
|
|
73
75
|
});
|
|
74
|
-
}, [deleteAccessibilityLabel, disabled, feedback, onLongPress, onPress, separator, separatorAccessibilityLabel]);
|
|
76
|
+
}, [deleteAccessibilityLabel, disabled, feedback, hideSeparator, onLongPress, onPress, separator, separatorAccessibilityLabel]);
|
|
75
77
|
return /*#__PURE__*/_jsxs(VStack, _extends({
|
|
76
78
|
ref: forwardedRef,
|
|
77
79
|
background: background,
|
|
@@ -94,6 +96,7 @@ const NumpadButton = /*#__PURE__*/memo(function NumpadButton(_ref2) {
|
|
|
94
96
|
onPress,
|
|
95
97
|
onLongPress,
|
|
96
98
|
separator = '.',
|
|
99
|
+
hideSeparator = false,
|
|
97
100
|
disabled,
|
|
98
101
|
separatorAccessibilityLabel,
|
|
99
102
|
deleteAccessibilityLabel,
|
|
@@ -127,16 +130,19 @@ const NumpadButton = /*#__PURE__*/memo(function NumpadButton(_ref2) {
|
|
|
127
130
|
if (value === 'SEPARATOR') return 'numpad-separator';
|
|
128
131
|
return "numpad-" + value;
|
|
129
132
|
}, [value]);
|
|
133
|
+
const isSeparatorHidden = value === 'SEPARATOR' && (hideSeparator || separator === '');
|
|
130
134
|
const pressableStyles = useMemo(() => _extends({}, styles.button, {
|
|
131
|
-
opacity:
|
|
132
|
-
pointerEvents:
|
|
133
|
-
}), [
|
|
135
|
+
opacity: isSeparatorHidden ? 0 : undefined,
|
|
136
|
+
pointerEvents: isSeparatorHidden ? 'none' : undefined
|
|
137
|
+
}), [isSeparatorHidden]);
|
|
134
138
|
return /*#__PURE__*/_jsx(Pressable, {
|
|
139
|
+
accessibilityElementsHidden: isSeparatorHidden,
|
|
135
140
|
accessibilityLabel: accessibilityLabel,
|
|
136
141
|
accessibilityRole: "button",
|
|
137
142
|
accessibilityState: {
|
|
138
143
|
disabled
|
|
139
144
|
},
|
|
145
|
+
accessible: isSeparatorHidden ? false : undefined,
|
|
140
146
|
background: "transparent",
|
|
141
147
|
blendStyles: {
|
|
142
148
|
pressedBackground: theme.color.bg,
|
|
@@ -146,6 +152,7 @@ const NumpadButton = /*#__PURE__*/memo(function NumpadButton(_ref2) {
|
|
|
146
152
|
debounceTime: 100,
|
|
147
153
|
disabled: disabled,
|
|
148
154
|
feedback: feedback,
|
|
155
|
+
importantForAccessibility: isSeparatorHidden ? 'no-hide-descendants' : undefined,
|
|
149
156
|
onLongPress: handleLongPress,
|
|
150
157
|
onPress: handleOnPress,
|
|
151
158
|
style: pressableStyles,
|
|
@@ -210,9 +210,9 @@ const NumpadExample2 = () => {
|
|
|
210
210
|
paddingBottom: safeBottomPadding
|
|
211
211
|
},
|
|
212
212
|
children: /*#__PURE__*/_jsx(Numpad, {
|
|
213
|
+
hideSeparator: true,
|
|
213
214
|
onLongPress: onLongPress,
|
|
214
|
-
onPress: onPress
|
|
215
|
-
separator: ""
|
|
215
|
+
onPress: onPress
|
|
216
216
|
})
|
|
217
217
|
})]
|
|
218
218
|
})]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-mobile",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.0",
|
|
4
4
|
"description": "Coinbase Design System - Mobile",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"react-native-worklets": "0.5.2"
|
|
219
219
|
},
|
|
220
220
|
"dependencies": {
|
|
221
|
-
"@coinbase/cds-common": "^9.
|
|
221
|
+
"@coinbase/cds-common": "^9.7.0",
|
|
222
222
|
"@coinbase/cds-icons": "^5.21.0",
|
|
223
223
|
"@coinbase/cds-illustrations": "^4.44.0",
|
|
224
224
|
"@coinbase/cds-lottie-files": "^3.3.4",
|