@coinbase/cds-mobile 9.7.0 → 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
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.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
|
+
|
|
11
17
|
## 9.7.0 (7/22/2026 PST)
|
|
12
18
|
|
|
13
19
|
#### 🚀 Updates
|
|
@@ -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,qBAAq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
|
|
@@ -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"}
|
|
@@ -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.7.
|
|
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.7.
|
|
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",
|