@coinbase/cds-mobile 8.22.1 → 8.23.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,16 @@ All notable changes to this project will be documented in this file.
8
8
 
9
9
  <!-- template-start -->
10
10
 
11
+ ## 8.23.0 ((12/1/2025, 06:33 AM PST))
12
+
13
+ This is an artificial version bump with no new change.
14
+
15
+ ## 8.22.2 (11/26/2025 PST)
16
+
17
+ #### 🐞 Fixes
18
+
19
+ - Wrap Select labels instead of truncating them. [[#179](https://github.com/coinbase/cds/pull/179)]
20
+
11
21
  ## 8.22.1 (11/24/2025 PST)
12
22
 
13
23
  #### 🐞 Fixes
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultSelectControl.d.ts","sourceRoot":"","sources":["../../../src/alpha/select/DefaultSelectControl.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAc3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAiB7E,KAAK,6BAA6B,GAAG,CACnC,IAAI,SAAS,UAAU,EACvB,iBAAiB,SAAS,MAAM,GAAG,MAAM,EAEzC,KAAK,EAAE,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAE,KACvF,KAAK,CAAC,YAAY,CAAC;AAExB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;wBA+IlC,CAAA;wBAMA,CAAP;wBAGY,CAAC;wBAGR,CAAA;6BAMM,CAAX;sBACuC,CAAC;;qDAgGxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAoC,6BAA6B,CAAC"}
1
+ {"version":3,"file":"DefaultSelectControl.d.ts","sourceRoot":"","sources":["../../../src/alpha/select/DefaultSelectControl.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAc3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAiB7E,KAAK,6BAA6B,GAAG,CACnC,IAAI,SAAS,UAAU,EACvB,iBAAiB,SAAS,MAAM,GAAG,MAAM,EAEzC,KAAK,EAAE,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAA;CAAE,KACvF,KAAK,CAAC,YAAY,CAAC;AAExB,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;wBA6I9B,CAAH;wBAMD,CAAC;wBAIc,CAAC;wBAIhB,CAAP;6BAI2B,CAAC;sBAIV,CAAC;;qDAiGnB,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAoC,6BAA6B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"DefaultSelectOption.d.ts","sourceRoot":"","sources":["../../../src/alpha/select/DefaultSelectOption.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAOzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAkG9D,eAAO,MAAM,mBAAmB,EAAqD,CACnF,IAAI,SAAS,UAAU,GAAG,QAAQ,EAClC,iBAAiB,SAAS,MAAM,GAAG,MAAM,EAEzC,KAAK,EAAE,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,KAC1E,KAAK,CAAC,YAAY,CAAC"}
1
+ {"version":3,"file":"DefaultSelectOption.d.ts","sourceRoot":"","sources":["../../../src/alpha/select/DefaultSelectOption.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAOzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AA4F9D,eAAO,MAAM,mBAAmB,EAAqD,CACnF,IAAI,SAAS,UAAU,GAAG,QAAQ,EAClC,iBAAiB,SAAS,MAAM,GAAG,MAAM,EAEzC,KAAK,EAAE,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;CAAE,KAC1E,KAAK,CAAC,YAAY,CAAC"}
@@ -75,6 +75,8 @@ export const DefaultSelectControlComponent = /*#__PURE__*/memo(/*#__PURE__*/forw
75
75
  children: /*#__PURE__*/_jsx(InputLabel, {
76
76
  alignSelf: labelVariant === 'inside' ? 'flex-start' : undefined,
77
77
  color: "fg",
78
+ ellipsizeMode: "tail",
79
+ numberOfLines: 2,
78
80
  paddingX: labelVariant === 'inside' ? 2 : 0,
79
81
  paddingY: shouldShowCompactLabel || labelVariant === 'inside' ? 0 : 0.5,
80
82
  children: label
@@ -151,12 +153,12 @@ export const DefaultSelectControlComponent = /*#__PURE__*/memo(/*#__PURE__*/forw
151
153
  children: startNode
152
154
  }), shouldShowCompactLabel ? /*#__PURE__*/_jsx(HStack, {
153
155
  alignItems: "center",
154
- maxWidth: "40%",
155
156
  paddingEnd: 1,
157
+ width: "40%",
156
158
  children: labelNode
157
159
  }) : null, /*#__PURE__*/_jsx(VStack, {
158
160
  justifyContent: "center",
159
- maxWidth: startNode ? '70%' : '85%',
161
+ maxWidth: shouldShowCompactLabel ? '45%' : startNode ? '70%' : '85%',
160
162
  style: styles == null ? void 0 : styles.controlValueNode,
161
163
  children: valueNode
162
164
  })]
@@ -17,7 +17,6 @@ const DefaultSelectOptionComponent = (_ref, ref) => {
17
17
  indeterminate,
18
18
  compact,
19
19
  description,
20
- multiline,
21
20
  style,
22
21
  styles,
23
22
  type,
@@ -26,20 +25,20 @@ const DefaultSelectOptionComponent = (_ref, ref) => {
26
25
  } = _ref,
27
26
  props = _objectWithoutPropertiesLoose(_ref, _excluded);
28
27
  const labelNode = useMemo(() => typeof label === 'string' ? /*#__PURE__*/_jsx(Text, {
29
- ellipsize: description ? 'tail' : multiline ? undefined : 'tail',
28
+ ellipsize: "tail",
30
29
  font: "headline",
31
- numberOfLines: description ? 1 : multiline ? undefined : 2,
30
+ numberOfLines: 2,
32
31
  style: styles == null ? void 0 : styles.optionLabel,
33
32
  children: label
34
- }) : label, [label, description, multiline, styles == null ? void 0 : styles.optionLabel]);
33
+ }) : label, [label, styles == null ? void 0 : styles.optionLabel]);
35
34
  const descriptionNode = useMemo(() => typeof description === 'string' ? /*#__PURE__*/_jsx(Text, {
36
35
  color: "fgMuted",
37
- ellipsize: multiline ? undefined : 'tail',
36
+ ellipsize: "tail",
38
37
  font: "body",
39
- numberOfLines: multiline ? undefined : description && label ? 1 : 2,
38
+ numberOfLines: 2,
40
39
  style: styles == null ? void 0 : styles.optionDescription,
41
40
  children: description
42
- }) : description, [description, multiline, label, styles == null ? void 0 : styles.optionDescription]);
41
+ }) : description, [description, styles == null ? void 0 : styles.optionDescription]);
43
42
  const handlePress = useCallback(() => onPress == null ? void 0 : onPress(value), [onPress, value]);
44
43
  const multiSelectCheckedAccessibilityState = useMemo(() => {
45
44
  if (selected) return true;
@@ -59,7 +58,6 @@ const DefaultSelectOptionComponent = (_ref, ref) => {
59
58
  background: background,
60
59
  borderRadius: 0,
61
60
  disabled: disabled,
62
- maxHeight: multiline ? undefined : compact ? 56 : 64,
63
61
  minHeight: compact ? 40 : 56,
64
62
  onPress: handlePress,
65
63
  priority: "end",
@@ -994,24 +994,38 @@ const VeryLongLabelsExample = () => {
994
994
  label: 'Remove selection'
995
995
  }, {
996
996
  value: '1',
997
- label: 'This is an extremely long option label that should test how the component handles very long text content'
997
+ label: 'This is an extremely long option label that should test how the component handles very long text content',
998
+ description: 'This is an extremely long option description that should test how the component handles very long text content'
998
999
  }, {
999
1000
  value: '2',
1000
- label: 'Another super long option label with even more text to see how it wraps or truncates in the UI'
1001
+ label: 'Another super long option label with even more text to see how it wraps or truncates in the UI',
1002
+ description: 'Another super long option description with even more text to see how it wraps or truncates in the UI'
1001
1003
  }, {
1002
1004
  value: '3',
1003
- label: 'Short'
1005
+ label: 'Short',
1006
+ description: 'Short description'
1004
1007
  }, {
1005
1008
  value: '4',
1006
- label: 'A moderately long label that is somewhere between short and extremely long'
1009
+ label: 'A moderately long label that is somewhere between short and extremely long',
1010
+ description: 'A moderately long description that is somewhere between short and extremely long'
1007
1011
  }];
1008
1012
  const [value, setValue] = useState('1');
1009
- return /*#__PURE__*/_jsx(Select, {
1010
- label: "Single select - very long option labels",
1011
- onChange: setValue,
1012
- options: longOptions,
1013
- placeholder: "Empty value",
1014
- value: value
1013
+ return /*#__PURE__*/_jsxs(VStack, {
1014
+ gap: 2,
1015
+ children: [/*#__PURE__*/_jsx(Select, {
1016
+ label: "Single select - very long option labels",
1017
+ onChange: setValue,
1018
+ options: longOptions,
1019
+ placeholder: "Empty value",
1020
+ value: value
1021
+ }), /*#__PURE__*/_jsx(Select, {
1022
+ compact: true,
1023
+ label: "Single select - very long option labels - compact",
1024
+ onChange: setValue,
1025
+ options: longOptions,
1026
+ placeholder: "Empty value",
1027
+ value: value
1028
+ })]
1015
1029
  });
1016
1030
  };
1017
1031
  const LongPlaceholder = () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-mobile",
3
- "version": "8.22.1",
3
+ "version": "8.23.0",
4
4
  "description": "Coinbase Design System - Mobile",
5
5
  "repository": {
6
6
  "type": "git",
@@ -154,7 +154,7 @@
154
154
  "react-native-svg": "^14.1.0"
155
155
  },
156
156
  "dependencies": {
157
- "@coinbase/cds-common": "^8.22.1",
157
+ "@coinbase/cds-common": "^8.23.0",
158
158
  "@coinbase/cds-icons": "^5.7.0",
159
159
  "@coinbase/cds-illustrations": "^4.28.0",
160
160
  "@coinbase/cds-lottie-files": "^3.3.3",