@coinbase/cds-mobile 9.17.0 → 9.17.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 +6 -0
- package/dts/alpha/select/DefaultSelectControl.d.ts.map +1 -1
- package/dts/controls/InputStack.d.ts +6 -0
- package/dts/controls/InputStack.d.ts.map +1 -1
- package/esm/alpha/select/DefaultSelectControl.js +15 -16
- package/esm/controls/InputStack.js +35 -22
- package/package.json +2 -2
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.17.1 (8/17/2026 PST)
|
|
12
|
+
|
|
13
|
+
#### 🐞 Fixes
|
|
14
|
+
|
|
15
|
+
- Fix: restore Select field press target after chrome padding adjustments in tshirt size work.
|
|
16
|
+
|
|
11
17
|
## 9.17.0 (8/14/2026 PST)
|
|
12
18
|
|
|
13
19
|
#### 🚀 Updates
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultSelectControl.d.ts","sourceRoot":"","sources":["../../../src/alpha/select/DefaultSelectControl.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"DefaultSelectControl.d.ts","sourceRoot":"","sources":["../../../src/alpha/select/DefaultSelectControl.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,gBAAgB,EAAkB,MAAM,cAAc,CAAC;AAehF,OAAO,KAAK,EAAE,kBAAkB,EAA4B,UAAU,EAAE,MAAM,UAAU,CAAC;AAuBzF,KAAK,6BAA6B,GAAG,CACnC,IAAI,SAAS,UAAU,EACvB,iBAAiB,SAAS,MAAM,GAAG,MAAM,EAEzC,KAAK,EAAE,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAAG;IACnD,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC;CAC9D,KACE,KAAK,CAAC,YAAY,CAAC;AAExB,eAAO,MAAM,6BAA6B,wCACvC,IAAI,SAAS,UAAU,EAAE,iBAAiB,SAAS,MAAM,4fAuCvD,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAAG;IAC/C,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC;CAC9D,8CAwbF,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAoC,6BAA6B,CAAC"}
|
|
@@ -76,6 +76,12 @@ export type InputStackBaseProps = SharedProps & {
|
|
|
76
76
|
* @default 'bg'
|
|
77
77
|
*/
|
|
78
78
|
inputBackground?: ThemeVars.Color;
|
|
79
|
+
/**
|
|
80
|
+
* Press handler for the bordered field chrome only (not the label or helper).
|
|
81
|
+
* Use for trigger-style controls so padding on the field remains tappable.
|
|
82
|
+
* Do not use for text fields — the native input must stay the focus target.
|
|
83
|
+
*/
|
|
84
|
+
onFieldPress?: () => void;
|
|
79
85
|
};
|
|
80
86
|
export type InputStackProps = Omit<BoxProps, 'width' | 'height' | 'borderRadius'> &
|
|
81
87
|
InputStackBaseProps & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputStack.d.ts","sourceRoot":"","sources":["../../src/controls/InputStack.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAoB,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAGjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wCAAwC,CAAC;AAK1E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() { 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 { memo, useCallback, useMemo } from 'react';
|
|
5
|
-
import {
|
|
5
|
+
import { TouchableOpacity } from 'react-native';
|
|
6
6
|
import { useInputVariant } from '@coinbase/cds-common/hooks/useInputVariant';
|
|
7
7
|
import { InputChip } from '../../chips/InputChip';
|
|
8
8
|
import { HelperText } from '../../controls/HelperText';
|
|
@@ -266,6 +266,7 @@ export const DefaultSelectControlComponent = /*#__PURE__*/memo(_ref => {
|
|
|
266
266
|
disabled: disabled,
|
|
267
267
|
onBlur: onBlur != null ? onBlur : undefined,
|
|
268
268
|
onFocus: onFocus != null ? onFocus : undefined,
|
|
269
|
+
activeOpacity: 1,
|
|
269
270
|
onPress: handleToggleOpen,
|
|
270
271
|
style: [{
|
|
271
272
|
flexGrow: 1
|
|
@@ -315,21 +316,17 @@ export const DefaultSelectControlComponent = /*#__PURE__*/memo(_ref => {
|
|
|
315
316
|
})
|
|
316
317
|
})
|
|
317
318
|
}), [ref, accessibilityHint, computedControlAccessibilityLabel, disabled, onBlur, onFocus, styles == null ? void 0 : styles.controlInputNode, styles == null ? void 0 : styles.controlStartNode, styles == null ? void 0 : styles.controlValueNode, startNode, insideHorizontalLabel, insideVerticalLabel, inlineLabelNode, valueAlignment, valueNode, contentNode, handleToggleOpen]);
|
|
318
|
-
const endNode = useMemo(() => /*#__PURE__*/_jsx(
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
children: customEndNode ? customEndNode : /*#__PURE__*/_jsx(AnimatedCaret, {
|
|
328
|
-
color: "fg",
|
|
329
|
-
rotate: open ? 0 : 180
|
|
330
|
-
})
|
|
319
|
+
const endNode = useMemo(() => /*#__PURE__*/_jsx(HStack, {
|
|
320
|
+
alignItems: "center",
|
|
321
|
+
alignSelf: "stretch",
|
|
322
|
+
flexShrink: 0,
|
|
323
|
+
paddingStart: 2,
|
|
324
|
+
style: styles == null ? void 0 : styles.controlEndNode,
|
|
325
|
+
children: customEndNode ? customEndNode : /*#__PURE__*/_jsx(AnimatedCaret, {
|
|
326
|
+
color: "fg",
|
|
327
|
+
rotate: open ? 0 : 180
|
|
331
328
|
})
|
|
332
|
-
}), [styles == null ? void 0 : styles.controlEndNode,
|
|
329
|
+
}), [styles == null ? void 0 : styles.controlEndNode, customEndNode, open]);
|
|
333
330
|
const inputStackStyles = useMemo(() => {
|
|
334
331
|
let verticalSpace;
|
|
335
332
|
if (insideVerticalLabel) {
|
|
@@ -370,6 +367,8 @@ export const DefaultSelectControlComponent = /*#__PURE__*/memo(_ref => {
|
|
|
370
367
|
input: inputStackStyles
|
|
371
368
|
},
|
|
372
369
|
variant: variant
|
|
373
|
-
}, props
|
|
370
|
+
}, props, {
|
|
371
|
+
onFieldPress: handleToggleOpen
|
|
372
|
+
}));
|
|
374
373
|
});
|
|
375
374
|
export const DefaultSelectControl = DefaultSelectControlComponent;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const _excluded = ["width", "prependNode", "endNode", "appendNode", "startNode", "disabled", "inputNode", "helperTextNode", "borderStyle", "variant", "labelNode", "testID", "borderRadius", "borderFocusedStyle", "focused", "enableColorSurge", "labelVariant", "inputBackground", "borderWidth", "focusedBorderWidth", "styles", "style"];
|
|
1
|
+
const _excluded = ["width", "prependNode", "endNode", "appendNode", "startNode", "disabled", "inputNode", "helperTextNode", "borderStyle", "variant", "labelNode", "testID", "borderRadius", "borderFocusedStyle", "focused", "enableColorSurge", "labelVariant", "inputBackground", "borderWidth", "focusedBorderWidth", "onFieldPress", "styles", "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, useMemo } from 'react';
|
|
@@ -11,7 +11,8 @@ import { useTheme } from '../hooks/useTheme';
|
|
|
11
11
|
import { HStack } from '../layout/HStack';
|
|
12
12
|
import { VStack } from '../layout/VStack';
|
|
13
13
|
import { ColorSurge } from '../motion/ColorSurge';
|
|
14
|
-
import {
|
|
14
|
+
import { Pressable } from '../system/Pressable';
|
|
15
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
16
|
const variantColorMap = {
|
|
16
17
|
primary: 'fgPrimary',
|
|
17
18
|
positive: 'fgPositive',
|
|
@@ -44,6 +45,7 @@ export const InputStack = /*#__PURE__*/memo(function InputStack(_props) {
|
|
|
44
45
|
inputBackground = 'bg',
|
|
45
46
|
borderWidth = 100,
|
|
46
47
|
focusedBorderWidth = borderWidth,
|
|
48
|
+
onFieldPress,
|
|
47
49
|
styles,
|
|
48
50
|
style
|
|
49
51
|
} = mergedProps,
|
|
@@ -99,6 +101,26 @@ export const InputStack = /*#__PURE__*/memo(function InputStack(_props) {
|
|
|
99
101
|
const rootStyles = useMemo(() => [style, styles == null ? void 0 : styles.root], [style, styles == null ? void 0 : styles.root]);
|
|
100
102
|
const inputContainerStyles = useMemo(() => [staticStyles.inputAreaContainerStyle, styles == null ? void 0 : styles.inputContainer], [styles == null ? void 0 : styles.inputContainer]);
|
|
101
103
|
const combinedInputAreaStyles = useMemo(() => [inputAreaStyles, styles == null ? void 0 : styles.input], [inputAreaStyles, styles == null ? void 0 : styles.input]);
|
|
104
|
+
const inputArea = /*#__PURE__*/_jsxs(Animated.View, {
|
|
105
|
+
onLayout: onInputAreaLayout,
|
|
106
|
+
style: combinedInputAreaStyles,
|
|
107
|
+
testID: testID && testID + "-input-area",
|
|
108
|
+
children: [focused && enableColorSurge && /*#__PURE__*/_jsx(ColorSurge, {
|
|
109
|
+
background: variant ? variantColorMap[variant] : undefined
|
|
110
|
+
}), !!startNode && /*#__PURE__*/_jsx(_Fragment, {
|
|
111
|
+
children: startNode
|
|
112
|
+
}), !!labelNode && labelVariant === 'inside' ?
|
|
113
|
+
/*#__PURE__*/
|
|
114
|
+
// A stacked inside label tightens its top/bottom spacing so the label + input still
|
|
115
|
+
// fit the same natural field height an outside label produces.
|
|
116
|
+
_jsxs(VStack, {
|
|
117
|
+
flexGrow: 1,
|
|
118
|
+
paddingY: 0.75,
|
|
119
|
+
children: [labelNode, inputNode]
|
|
120
|
+
}) : inputNode, !!endNode && /*#__PURE__*/_jsx(_Fragment, {
|
|
121
|
+
children: endNode
|
|
122
|
+
})]
|
|
123
|
+
});
|
|
102
124
|
return /*#__PURE__*/_jsxs(VStack, _extends({
|
|
103
125
|
gap: inputStackGap,
|
|
104
126
|
opacity: disabled ? accessibleOpacityDisabled : 1,
|
|
@@ -115,26 +137,17 @@ export const InputStack = /*#__PURE__*/memo(function InputStack(_props) {
|
|
|
115
137
|
style: inputContainerStyles,
|
|
116
138
|
children: [focused && /*#__PURE__*/_jsx(Animated.View, {
|
|
117
139
|
style: borderFocusedStyles
|
|
118
|
-
}), /*#__PURE__*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
// fit the same natural field height an outside label produces.
|
|
130
|
-
_jsxs(VStack, {
|
|
131
|
-
flexGrow: 1,
|
|
132
|
-
paddingY: 0.75,
|
|
133
|
-
children: [labelNode, inputNode]
|
|
134
|
-
}) : inputNode, !!endNode && /*#__PURE__*/_jsx(_Fragment, {
|
|
135
|
-
children: endNode
|
|
136
|
-
})]
|
|
137
|
-
})]
|
|
140
|
+
}), onFieldPress ? /*#__PURE__*/_jsx(Pressable, {
|
|
141
|
+
noScaleOnPress: true,
|
|
142
|
+
accessible: false,
|
|
143
|
+
background: "transparent",
|
|
144
|
+
borderColor: "transparent",
|
|
145
|
+
borderWidth: 0,
|
|
146
|
+
disabled: disabled,
|
|
147
|
+
flexGrow: 1,
|
|
148
|
+
onPress: onFieldPress,
|
|
149
|
+
children: inputArea
|
|
150
|
+
}) : inputArea]
|
|
138
151
|
}), !!appendNode && /*#__PURE__*/_jsx(_Fragment, {
|
|
139
152
|
children: appendNode
|
|
140
153
|
})]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cds-mobile",
|
|
3
|
-
"version": "9.17.
|
|
3
|
+
"version": "9.17.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.17.
|
|
221
|
+
"@coinbase/cds-common": "^9.17.1",
|
|
222
222
|
"@coinbase/cds-icons": "^5.21.0",
|
|
223
223
|
"@coinbase/cds-illustrations": "^4.48.0",
|
|
224
224
|
"@coinbase/cds-lottie-files": "^3.3.4",
|