@coinbase/cds-mobile 9.19.0 → 9.21.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/controls/Select.d.ts.map +1 -1
- package/dts/overlays/modal/Modal.d.ts.map +1 -1
- package/esm/alpha/select/DefaultSelectControl.js +2 -2
- package/esm/controls/InputLabel.js +2 -2
- package/esm/controls/Select.js +2 -0
- package/esm/controls/TextInput.js +2 -2
- package/esm/overlays/modal/Modal.js +18 -6
- 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.21.0 (8/21/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🚀 Updates
|
|
14
|
+
|
|
15
|
+
- Fix: apply root safe-area insets inside mobile Modal. [[#846](https://github.com/coinbase/cds/pull/846)]
|
|
16
|
+
|
|
17
|
+
## 9.20.0 (8/20/2026 PST)
|
|
18
|
+
|
|
19
|
+
#### 🚀 Updates
|
|
20
|
+
|
|
21
|
+
- Feat: update default label style for input components: TextInput, Select, Combobox, DateInput, etc. Font: label1 -=> label2; color: fg => fgMuted.
|
|
22
|
+
|
|
11
23
|
## 9.19.0 (8/20/2026 PST)
|
|
12
24
|
|
|
13
25
|
#### 🚀 Updates
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/controls/Select.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkE,MAAM,OAAO,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAMxD,OAAO,KAAK,EAAgB,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qDAAqD,CAAC;AACpG,OAAO,KAAK,EAAE,WAAW,EA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AEK;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,6CAyKF,CAAC"}
|
|
@@ -65,8 +65,8 @@ export const DefaultSelectControlComponent = /*#__PURE__*/memo(_ref => {
|
|
|
65
65
|
size,
|
|
66
66
|
align = 'start',
|
|
67
67
|
font = 'body',
|
|
68
|
-
labelColor = '
|
|
69
|
-
labelFont = '
|
|
68
|
+
labelColor = 'fgMuted',
|
|
69
|
+
labelFont = 'label2',
|
|
70
70
|
bordered = true,
|
|
71
71
|
borderWidth = bordered ? 100 : 0,
|
|
72
72
|
focusedBorderWidth = bordered ? undefined : 200,
|
|
@@ -6,8 +6,8 @@ import { Text } from '../typography/Text';
|
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export const InputLabel = /*#__PURE__*/memo(function InputLabel(_ref) {
|
|
8
8
|
let {
|
|
9
|
-
color = '
|
|
10
|
-
font = '
|
|
9
|
+
color = 'fgMuted',
|
|
10
|
+
font = 'label2'
|
|
11
11
|
} = _ref,
|
|
12
12
|
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
13
13
|
return /*#__PURE__*/_jsx(Text, _extends({
|
package/esm/controls/Select.js
CHANGED
|
@@ -172,6 +172,7 @@ export const Select = /*#__PURE__*/memo(_ref => {
|
|
|
172
172
|
}),
|
|
173
173
|
labelNode: !compact && Boolean(label) && /*#__PURE__*/_jsx(InputLabel, {
|
|
174
174
|
color: labelTextColor,
|
|
175
|
+
font: "label1",
|
|
175
176
|
paddingStart: labelVariant === 'outside' || startNode ? 0 : getSpacingStart,
|
|
176
177
|
paddingY: labelVariant === 'inside' ? 0 : 0.5,
|
|
177
178
|
children: label
|
|
@@ -186,6 +187,7 @@ export const Select = /*#__PURE__*/memo(_ref => {
|
|
|
186
187
|
noWrap: true,
|
|
187
188
|
color: labelTextColor,
|
|
188
189
|
disabled: disabled,
|
|
190
|
+
font: "label1",
|
|
189
191
|
children: label
|
|
190
192
|
})
|
|
191
193
|
}), !!startNode && /*#__PURE__*/_jsx(HStack, {
|
|
@@ -37,8 +37,8 @@ export const TextInput = /*#__PURE__*/memo(_ref => {
|
|
|
37
37
|
const mergedProps = useComponentConfig('TextInput', _props);
|
|
38
38
|
const {
|
|
39
39
|
label,
|
|
40
|
-
labelFont = '
|
|
41
|
-
labelColor = '
|
|
40
|
+
labelFont = 'label2',
|
|
41
|
+
labelColor = 'fgMuted',
|
|
42
42
|
helperText = '',
|
|
43
43
|
variant = 'foregroundMuted',
|
|
44
44
|
testID,
|
|
@@ -3,8 +3,8 @@ 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, useWindowDimensions } from 'react-native';
|
|
7
|
-
import {
|
|
6
|
+
import { Modal as RNModal, Platform, StatusBar, StyleSheet, useWindowDimensions, View } from 'react-native';
|
|
7
|
+
import { useSafeAreaInsets } 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';
|
|
10
10
|
import { OverlayContentContext } from '@coinbase/cds-common/overlays/OverlayContentContext';
|
|
@@ -80,6 +80,19 @@ export const Modal = /*#__PURE__*/memo(_ref => {
|
|
|
80
80
|
width,
|
|
81
81
|
height
|
|
82
82
|
} = useWindowDimensions();
|
|
83
|
+
// RN Modal is a separate native surface; SafeAreaView often reports 0 insets.
|
|
84
|
+
// useSafeAreaInsets() reads the root provider (device insets).
|
|
85
|
+
const insets = useSafeAreaInsets();
|
|
86
|
+
const safeAreaStyle = useMemo(() => {
|
|
87
|
+
var _StatusBar$currentHei;
|
|
88
|
+
const androidStatusBarHeight = Platform.OS === 'android' ? (_StatusBar$currentHei = StatusBar.currentHeight) != null ? _StatusBar$currentHei : 0 : 0;
|
|
89
|
+
return [styles.safeAreaContainer, {
|
|
90
|
+
paddingTop: Math.max(insets.top, androidStatusBarHeight),
|
|
91
|
+
paddingBottom: insets.bottom,
|
|
92
|
+
paddingLeft: insets.left,
|
|
93
|
+
paddingRight: insets.right
|
|
94
|
+
}, customStyles == null ? void 0 : customStyles.safeArea];
|
|
95
|
+
}, [customStyles == null ? void 0 : customStyles.safeArea, insets.bottom, insets.left, insets.right, insets.top]);
|
|
83
96
|
const handleClose = useCallback(() => {
|
|
84
97
|
animateOut.start(_ref2 => {
|
|
85
98
|
let {
|
|
@@ -165,8 +178,8 @@ export const Modal = /*#__PURE__*/memo(_ref => {
|
|
|
165
178
|
opacity
|
|
166
179
|
}, customStyles == null ? void 0 : customStyles.modal],
|
|
167
180
|
width: width,
|
|
168
|
-
children: /*#__PURE__*/_jsx(
|
|
169
|
-
style:
|
|
181
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
182
|
+
style: safeAreaStyle,
|
|
170
183
|
children: /*#__PURE__*/_jsx(ModalContext.Provider, {
|
|
171
184
|
value: modalData,
|
|
172
185
|
children: typeof children === 'function' ? children(renderChildrenProps) : children
|
|
@@ -178,7 +191,6 @@ export const Modal = /*#__PURE__*/memo(_ref => {
|
|
|
178
191
|
});
|
|
179
192
|
const styles = StyleSheet.create({
|
|
180
193
|
safeAreaContainer: {
|
|
181
|
-
flex: 1
|
|
182
|
-
paddingTop: Platform.OS === 'android' ? StatusBar.currentHeight : 0
|
|
194
|
+
flex: 1
|
|
183
195
|
}
|
|
184
196
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-mobile",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.21.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.21.0",
|
|
222
222
|
"@coinbase/cds-icons": "^5.22.0",
|
|
223
223
|
"@coinbase/cds-illustrations": "^4.48.0",
|
|
224
224
|
"@coinbase/cds-lottie-files": "^3.3.4",
|