@coinbase/cds-mobile 9.6.11 → 9.7.1
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/numpad/Numpad.d.ts +3 -0
- package/dts/numpad/Numpad.d.ts.map +1 -1
- package/dts/overlays/modal/Modal.d.ts.map +1 -1
- package/dts/overlays/overlay/Overlay.d.ts +1 -1
- package/dts/overlays/overlay/Overlay.d.ts.map +1 -1
- package/esm/numpad/Numpad.js +12 -5
- package/esm/numpad/__stories__/Numpad.stories.js +2 -2
- package/esm/overlays/modal/Modal.js +7 -1
- package/esm/overlays/overlay/Overlay.js +8 -1
- package/package.json +2 -2
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
|
+
## 9.7.1 (7/22/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🐞 Fixes
|
|
14
|
+
|
|
15
|
+
- Prevent Overlay/Modal scrim collapsing to 0x0 under Fabric. [[#804](https://github.com/coinbase/cds/pull/804)]
|
|
16
|
+
|
|
17
|
+
## 9.7.0 (7/22/2026 PST)
|
|
18
|
+
|
|
19
|
+
#### 🚀 Updates
|
|
20
|
+
|
|
21
|
+
- Add hideSeparator prop to numpad. [[#799](https://github.com/coinbase/cds/pull/799)]
|
|
22
|
+
|
|
11
23
|
## 9.6.11 (7/22/2026 PST)
|
|
12
24
|
|
|
13
25
|
#### 🐞 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,KAAK,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAK1E,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,KAAK,kBAAkB,EAAa,MAAM,qBAAqB,CAAC;AAGzE,eAAO,MAAM,SAAS,cAAc,CAAC;AACrC,eAAO,MAAM,MAAM,WAAW,CAAC;AAE/B,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC;AAC7C,MAAM,MAAM,UAAU,GAAG,OAAO,MAAM,CAAC;AAEvC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,aAAa,GAAG,UAAU,CAAC;AAE9D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,WAAW,CAAC;IACnB,OAAO,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IACtC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2BA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,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/overlays/modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+E,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/overlays/modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+E,MAAM,OAAO,CAAC;AAQpG,OAAO,KAAK,EAAE,UAAU,IAAI,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGrF,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4CAA4C,CAAC;AAKlG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAG1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKjD,KAAK,wBAAwB,GAAG;IAAE,UAAU,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAE3D;;;GAGG;AACH,KAAK,gBAAgB,GAAG,IAAI,CAC1B,QAAQ,EACN,YAAY,GACZ,OAAO,GACP,aAAa,GACb,aAAa,GACb,cAAc,GACd,qBAAqB,GACrB,sBAAsB,GACtB,wBAAwB,GACxB,yBAAyB,GACzB,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,gBAAgB,GAChB,UAAU,GACV,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,aAAa,GACb,oBAAoB,GACpB,kBAAkB,GAClB,WAAW,GACX,SAAS,GACT,UAAU,GACV,UAAU,GACV,YAAY,GACZ,eAAe,GACf,cAAc,GACd,YAAY,GACZ,UAAU,GACV,WAAW,GACX,UAAU,GACV,WAAW,CACd,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,WAAW,GACtC,iBAAiB,GACjB,gBAAgB,GAChB,IAAI,CAAC,YAAY,EAAE,UAAU,GAAG,SAAS,GAAG,gBAAgB,GAAG,eAAe,CAAC,GAAG;IAChF,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,EAAE,wBAAwB,KAAK,KAAK,CAAC,SAAS,CAAC,CAAC;IACpF;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB;;SAEK;IACL,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC;IAC7B,yDAAyD;IACzD,MAAM,CAAC,EAAE;QACP,iCAAiC;QACjC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC7B,mDAAmD;QACnD,QAAQ,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KACjC,CAAC;CACH,CAAC;AAEJ,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAEvE,MAAM,MAAM,UAAU,GAAG,cAAc,CAAC;AAMxC,eAAO,MAAM,KAAK,iDAIb,UAAU,GAAG;IACd,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;CACpC,6CAyJF,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import { type Animated } from 'react-native';
|
|
3
3
|
import type { BoxBaseProps } from '../../layout/Box';
|
|
4
4
|
import type { VStackProps } from '../../layout/VStack';
|
|
5
5
|
export type OverlayBaseProps = Omit<BoxBaseProps, 'opacity'> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../src/overlays/overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Overlay.d.ts","sourceRoot":"","sources":["../../../src/overlays/overlay/Overlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAC;AACpC,OAAO,EAAE,KAAK,QAAQ,EAAuB,MAAM,cAAc,CAAC;AAQlE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAOvD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,GAAG;IAC7D,gIAAgI;IAChI,OAAO,EAAE,QAAQ,CAAC,KAAK,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAE3E,eAAO,MAAM,OAAO,qCAAiB,YAAY,6CAyB/C,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
|
})]
|
|
@@ -3,7 +3,7 @@ const _excluded = ["ref"],
|
|
|
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, useEffect, useImperativeHandle, useMemo, useState } from 'react';
|
|
6
|
-
import { Modal as RNModal, Platform, StatusBar, StyleSheet } from 'react-native';
|
|
6
|
+
import { Modal as RNModal, Platform, StatusBar, StyleSheet, useWindowDimensions } from 'react-native';
|
|
7
7
|
import { SafeAreaView } from 'react-native-safe-area-context';
|
|
8
8
|
import { usePreviousValue } from '@coinbase/cds-common/hooks/usePreviousValue';
|
|
9
9
|
import { ModalContext } from '@coinbase/cds-common/overlays/ModalContext';
|
|
@@ -76,6 +76,10 @@ export const Modal = /*#__PURE__*/memo(_ref => {
|
|
|
76
76
|
}, animateIn, animateOut] = useModalAnimation();
|
|
77
77
|
const [internalVisible, setInternalVisible] = useState(visible);
|
|
78
78
|
const prevVisible = usePreviousValue(visible);
|
|
79
|
+
const {
|
|
80
|
+
width,
|
|
81
|
+
height
|
|
82
|
+
} = useWindowDimensions();
|
|
79
83
|
const handleClose = useCallback(() => {
|
|
80
84
|
animateOut.start(_ref2 => {
|
|
81
85
|
let {
|
|
@@ -141,6 +145,7 @@ export const Modal = /*#__PURE__*/memo(_ref => {
|
|
|
141
145
|
borderedVertical: borderedVertical,
|
|
142
146
|
color: color,
|
|
143
147
|
elevation: elevation,
|
|
148
|
+
height: height,
|
|
144
149
|
maxHeight: maxHeight,
|
|
145
150
|
maxWidth: maxWidth,
|
|
146
151
|
minHeight: minHeight,
|
|
@@ -159,6 +164,7 @@ export const Modal = /*#__PURE__*/memo(_ref => {
|
|
|
159
164
|
}],
|
|
160
165
|
opacity
|
|
161
166
|
}, customStyles == null ? void 0 : customStyles.modal],
|
|
167
|
+
width: width,
|
|
162
168
|
children: /*#__PURE__*/_jsx(SafeAreaView, {
|
|
163
169
|
style: [styles.safeAreaContainer, customStyles == null ? void 0 : customStyles.safeArea],
|
|
164
170
|
children: /*#__PURE__*/_jsx(ModalContext.Provider, {
|
|
@@ -2,6 +2,7 @@ const _excluded = ["opacity", "style"];
|
|
|
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, { memo } from 'react';
|
|
5
|
+
import { useWindowDimensions } from 'react-native';
|
|
5
6
|
import { OverlayContentContext } from '@coinbase/cds-common/overlays/OverlayContentContext';
|
|
6
7
|
import { useComponentConfig } from '../../hooks/useComponentConfig';
|
|
7
8
|
import { useTheme } from '../../hooks/useTheme';
|
|
@@ -19,17 +20,23 @@ export const Overlay = /*#__PURE__*/memo(_props => {
|
|
|
19
20
|
} = mergedProps,
|
|
20
21
|
props = _objectWithoutPropertiesLoose(mergedProps, _excluded);
|
|
21
22
|
const theme = useTheme();
|
|
23
|
+
const {
|
|
24
|
+
width,
|
|
25
|
+
height
|
|
26
|
+
} = useWindowDimensions();
|
|
22
27
|
return /*#__PURE__*/_jsx(OverlayContentContext.Provider, {
|
|
23
28
|
value: overlayContentContextValue,
|
|
24
29
|
children: /*#__PURE__*/_jsx(VStack, _extends({
|
|
25
30
|
animated: true,
|
|
26
31
|
renderToHardwareTextureAndroid: true,
|
|
27
32
|
background: "bgOverlay",
|
|
33
|
+
height: height,
|
|
28
34
|
opacity: opacity,
|
|
29
35
|
pin: "all",
|
|
30
36
|
style: [theme.activeColorScheme === 'dark' ? {
|
|
31
37
|
backgroundColor: "rgba(" + (theme == null || (_theme$darkSpectrum = theme.darkSpectrum) == null ? void 0 : _theme$darkSpectrum.gray0) + ", 0.5)"
|
|
32
|
-
} : undefined, style]
|
|
38
|
+
} : undefined, style],
|
|
39
|
+
width: width
|
|
33
40
|
}, props))
|
|
34
41
|
});
|
|
35
42
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-mobile",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.1",
|
|
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.1",
|
|
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",
|