@coinbase/cds-mobile 8.23.0 → 8.25.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,18 @@ All notable changes to this project will be documented in this file.
8
8
 
9
9
  <!-- template-start -->
10
10
 
11
+ ## 8.25.0 (12/1/2025 PST)
12
+
13
+ #### 🚀 Updates
14
+
15
+ - Add emphasis prop to Tag. [[#197](https://github.com/coinbase/cds/pull/197)]
16
+
17
+ ## 8.24.0 (12/1/2025 PST)
18
+
19
+ #### 🚀 Updates
20
+
21
+ - Support labelNode in TextInput. [[#198](https://github.com/coinbase/cds/pull/198)]
22
+
11
23
  ## 8.23.0 ((12/1/2025, 06:33 AM PST))
12
24
 
13
25
  This is an artificial version bump with no new change.
@@ -51,6 +51,11 @@ export type TextInputBaseProps = SharedProps &
51
51
  * @default 'error'
52
52
  */
53
53
  helperTextErrorIconAccessibilityLabel?: string;
54
+ /**
55
+ * React node to render label. Takes precedence over `label`.
56
+ * @note if both labelNode and label are provided, label will still be used as accessibility label for the input if no accessibilityLabel is provided.
57
+ */
58
+ labelNode?: React.ReactNode;
54
59
  };
55
60
  export type TextInputProps = TextInputBaseProps &
56
61
  Omit<RNTextInputProps, 'value' | 'onChange' | 'onChangeText' | 'textAlign'> & {
@@ -118,6 +123,11 @@ export declare const TextInput: React.MemoExoticComponent<
118
123
  * @default 'error'
119
124
  */
120
125
  helperTextErrorIconAccessibilityLabel?: string;
126
+ /**
127
+ * React node to render label. Takes precedence over `label`.
128
+ * @note if both labelNode and label are provided, label will still be used as accessibility label for the input if no accessibilityLabel is provided.
129
+ */
130
+ labelNode?: React.ReactNode;
121
131
  } & Omit<RNTextInputProps, 'value' | 'textAlign' | 'onChange' | 'onChangeText'> & {
122
132
  value?: RNTextInputProps['value'];
123
133
  onChange?: RNTextInputProps['onChange'];
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.d.ts","sourceRoot":"","s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,CAAC,cAAc,CAAC,CAAC;IAChD;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,GAAG,OAAO,CAAC;IACpD;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAWJ,eAAO,MAAM,SAAS;IAjElB;;;OAGG;YACK,cAAc,CAAC,OAAO,CAAC;IAC/B;;OAEG;aACM,MAAM;IACf,uHAAuH;YAC/G,KAAK,CAAC,SAAS;IACvB,mHAAmH;UAC7G,KAAK,CAAC,SAAS;IACrB;;OAEG;gBACS;QACV,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB;IACD;;;OAGG;4CACqC,MAAM;IAC9C;;;OAGG;gBACS,KAAK,CAAC,SAAS;;YAKnB,gBAAgB,CAAC,OAAO,CAAC;eACtB,gBAAgB,CAAC,UAAU,CAAC;mBACxB,gBAAgB,CAAC,cAAc,CAAC;IAC/C;;;OAGG;gBACS,cAAc;IAC1B;;;OAGG;gBACS,gBAAgB,CAAC,WAAW,CAAC,GAAG,OAAO;IACnD;;;OAGG;eACQ,OAAO;sCA8OrB,CAAC"}
package/dts/tag/Tag.d.ts CHANGED
@@ -5,6 +5,7 @@ import type {
5
5
  SharedAccessibilityProps,
6
6
  SharedProps,
7
7
  TagColorScheme,
8
+ TagEmphasis,
8
9
  TagIntent,
9
10
  } from '@coinbase/cds-common/types';
10
11
  import { type BoxProps } from '../layout';
@@ -17,6 +18,11 @@ export type TagBaseProps = SharedProps &
17
18
  * @default informational
18
19
  */
19
20
  intent?: TagIntent;
21
+ /**
22
+ * Specify the emphasis of the Tag.
23
+ * @default 'low' when informational intent, 'high' when promotional intent
24
+ */
25
+ emphasis?: TagEmphasis;
20
26
  /**
21
27
  * Specify the colorScheme of the Tag
22
28
  * @default blue
@@ -42,6 +48,11 @@ export declare const Tag: React.MemoExoticComponent<
42
48
  * @default informational
43
49
  */
44
50
  intent?: TagIntent;
51
+ /**
52
+ * Specify the emphasis of the Tag.
53
+ * @default 'low' when informational intent, 'high' when promotional intent
54
+ */
55
+ emphasis?: TagEmphasis;
45
56
  /**
46
57
  * Specify the colorScheme of the Tag
47
58
  * @default blue
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.d.ts","sourceRoot":"","sources":["../../src/tag/Tag.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAChD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAOjE,OAAO,KAAK,EACV,wBAAwB,EACxB,WAAW,EACX,cAAc,EACd,SAAS,EACV,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,WAAW,CAAC;AAG/C,MAAM,MAAM,YAAY,GAAG,WAAW,GACpC,wBAAwB,GAAG;IACzB,yCAAyC;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,sCAAsC;IACtC,UAAU,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC;IACrC,gCAAgC;IAChC,KAAK,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC;IAChC,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,QAAQ,CAAC,UAAU,CAAC,CAAC;CACjC,CAAC;AAEJ,MAAM,MAAM,QAAQ,GAAG,YAAY,GACjC,IAAI,CAAC,QAAQ,EAAE,OAAO,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,CAAC,CAAC;AAEnE,eAAO,MAAM,GAAG;IAvBZ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AM,GAAG;IA5BZ,yCAAyC;cAC/B,KAAK,CAAC,SAAS;IACzB;;;OAGG;aACM,SAAS;IAClB;;;OAGG;eACQ,WAAW;IACtB;;;OAGG;kBACW,cAAc;IAC5B,sCAAsC;iBACzB,SAAS,CAAC,aAAa;IACpC,gCAAgC;YACxB,SAAS,CAAC,aAAa;IAC/B,0EAA0E;eAC/D,QAAQ,CAAC,UAAU,CAAC;kGAqDlC,CAAC"}
@@ -1,4 +1,4 @@
1
- const _excluded = ["label", "helperText", "variant", "testID", "testIDMap", "start", "end", "width", "disabled", "align", "compact", "suffix", "accessibilityLabel", "borderRadius", "enableColorSurge", "helperTextErrorIconAccessibilityLabel", "bordered", "labelVariant"];
1
+ const _excluded = ["label", "helperText", "variant", "testID", "testIDMap", "start", "end", "width", "disabled", "align", "compact", "suffix", "accessibilityLabel", "borderRadius", "enableColorSurge", "helperTextErrorIconAccessibilityLabel", "bordered", "labelVariant", "labelNode"];
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, { cloneElement, forwardRef, isValidElement, memo, useCallback, useMemo, useRef, useState } from 'react';
@@ -45,7 +45,8 @@ export const TextInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =
45
45
  enableColorSurge = false,
46
46
  helperTextErrorIconAccessibilityLabel = 'error',
47
47
  bordered = true,
48
- labelVariant = 'outside'
48
+ labelVariant = 'outside',
49
+ labelNode
49
50
  } = _ref,
50
51
  editableInputProps = _objectWithoutPropertiesLoose(_ref, _excluded);
51
52
  const theme = useTheme();
@@ -155,7 +156,7 @@ export const TextInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =
155
156
  disabled: disabled,
156
157
  testID: testID
157
158
  }, editableInputAddonProps)),
158
- labelNode: !compact && !!label && /*#__PURE__*/_jsx(Pressable, {
159
+ labelNode: !compact && (labelNode ? labelNode : !!label && /*#__PURE__*/_jsx(Pressable, {
159
160
  accessibilityRole: "button",
160
161
  disabled: disabled,
161
162
  onPress: handleNodePress,
@@ -169,7 +170,7 @@ export const TextInput = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, ref) =
169
170
  testID: (_testIDMap$label = testIDMap == null ? void 0 : testIDMap.label) != null ? _testIDMap$label : '',
170
171
  children: label
171
172
  }))
172
- }),
173
+ })),
173
174
  labelVariant: labelVariant,
174
175
  startNode: (compact && !!label || !!start) && /*#__PURE__*/_jsx(Box, {
175
176
  alignItems: "center",
@@ -8,9 +8,11 @@ import { Icon } from '../../icons';
8
8
  import { Box } from '../../layout/Box';
9
9
  import { HStack } from '../../layout/HStack';
10
10
  import { VStack } from '../../layout/VStack';
11
+ import { Tooltip } from '../../overlays/tooltip/Tooltip';
11
12
  import { Text } from '../../typography/Text';
12
13
  import { InputIcon } from '../InputIcon';
13
14
  import { InputIconButton } from '../InputIconButton';
15
+ import { InputLabel } from '../InputLabel';
14
16
  import { TextInput } from '../TextInput';
15
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
18
  const MockTextInput = _ref => {
@@ -537,6 +539,28 @@ const InputScreen = () => {
537
539
  placeholder: "Enter your favorite color",
538
540
  variant: "negative"
539
541
  })
542
+ }), /*#__PURE__*/_jsx(Example, {
543
+ inline: true,
544
+ title: "TextInput with labelNode",
545
+ children: /*#__PURE__*/_jsx(MockTextInput, {
546
+ label: "Display name",
547
+ labelNode: /*#__PURE__*/_jsxs(HStack, {
548
+ alignItems: "center",
549
+ gap: 1,
550
+ children: [/*#__PURE__*/_jsx(InputLabel, {
551
+ children: "Display name"
552
+ }), /*#__PURE__*/_jsx(Tooltip, {
553
+ content: "This will be visible to other users.",
554
+ children: /*#__PURE__*/_jsx(Icon, {
555
+ active: true,
556
+ color: "fg",
557
+ name: "info",
558
+ size: "xs"
559
+ })
560
+ })]
561
+ }),
562
+ placeholder: "Satoshi Nakamoto"
563
+ })
540
564
  })]
541
565
  });
542
566
  };
@@ -1,9 +1,12 @@
1
1
  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); }
2
2
  import React, { useState } from 'react';
3
3
  import { LocaleProvider } from '@coinbase/cds-common/system/LocaleProvider';
4
+ import { InputLabel } from '../../controls/InputLabel';
4
5
  import { Example, ExampleScreen } from '../../examples/ExampleScreen';
5
6
  import { Icon } from '../../icons';
7
+ import { HStack } from '../../layout';
6
8
  import { Group } from '../../layout/Group';
9
+ import { Tooltip } from '../../overlays';
7
10
  import { ThemeProvider } from '../../system/ThemeProvider';
8
11
  import { defaultTheme } from '../../themes/defaultTheme';
9
12
  import { DateInput } from '../DateInput';
@@ -43,6 +46,22 @@ export const Examples = () => {
43
46
  minDate: oneDayAgo
44
47
  })), /*#__PURE__*/_jsx(DateInput, _extends({}, sharedProps, props, {
45
48
  separator: "-"
49
+ })), /*#__PURE__*/_jsx(DateInput, _extends({}, sharedProps, props, {
50
+ label: "Date of birth",
51
+ labelNode: /*#__PURE__*/_jsxs(HStack, {
52
+ alignItems: "center",
53
+ gap: 1,
54
+ children: [/*#__PURE__*/_jsx(InputLabel, {
55
+ children: "Date of birth"
56
+ }), /*#__PURE__*/_jsx(Tooltip, {
57
+ content: "This will be visible to other users.",
58
+ children: /*#__PURE__*/_jsx(Icon, {
59
+ color: "fgMuted",
60
+ name: "info",
61
+ size: "xs"
62
+ })
63
+ })]
64
+ })
46
65
  })), /*#__PURE__*/_jsx(DateInput, _extends({}, sharedProps, props, {
47
66
  end: /*#__PURE__*/_jsx(Icon, {
48
67
  active: true,
@@ -1,8 +1,11 @@
1
1
  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); }
2
2
  import { useState } from 'react';
3
+ import { InputLabel } from '../../controls/InputLabel';
3
4
  import { TextInput } from '../../controls/TextInput';
4
5
  import { Example, ExampleScreen } from '../../examples/ExampleScreen';
6
+ import { Icon } from '../../icons';
5
7
  import { HStack } from '../../layout';
8
+ import { Tooltip } from '../../overlays/tooltip/Tooltip';
6
9
  import { DatePicker } from '../DatePicker';
7
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
11
  const today = new Date(new Date(2024, 7, 18).setHours(0, 0, 0, 0));
@@ -76,6 +79,26 @@ export const FullExample = () => {
76
79
  width: "auto"
77
80
  })]
78
81
  })
82
+ }), /*#__PURE__*/_jsx(Example, {
83
+ title: "DatePicker with labelNode",
84
+ children: /*#__PURE__*/_jsx(ExampleDatePicker, {
85
+ calendarIconButtonAccessibilityLabel: "Birthdate calendar",
86
+ label: "Birthdate",
87
+ labelNode: /*#__PURE__*/_jsxs(HStack, {
88
+ alignItems: "center",
89
+ gap: 1,
90
+ children: [/*#__PURE__*/_jsx(InputLabel, {
91
+ children: "Birthdate"
92
+ }), /*#__PURE__*/_jsx(Tooltip, {
93
+ content: "This will be visible to other users.",
94
+ children: /*#__PURE__*/_jsx(Icon, {
95
+ color: "fgMuted",
96
+ name: "info",
97
+ size: "xs"
98
+ })
99
+ })]
100
+ })
101
+ })
79
102
  }), /*#__PURE__*/_jsx(Example, {
80
103
  title: "DatePicker fit-content width",
81
104
  children: /*#__PURE__*/_jsxs(HStack, {
package/esm/tag/Tag.js CHANGED
@@ -1,8 +1,8 @@
1
- const _excluded = ["children", "intent", "colorScheme", "background", "color", "alignItems", "justifyContent", "testID"];
1
+ const _excluded = ["children", "intent", "emphasis", "colorScheme", "background", "color", "alignItems", "justifyContent", "testID"];
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, { forwardRef, memo } from 'react';
5
- import { tagBorderRadiusMap, tagColorMap, tagFontMap, tagHorizontalSpacing } from '@coinbase/cds-common/tokens/tags';
5
+ import { tagBorderRadiusMap, tagEmphasisColorMap, tagFontMap, tagHorizontalSpacing } from '@coinbase/cds-common/tokens/tags';
6
6
  import { useTheme } from '../hooks/useTheme';
7
7
  import { Box } from '../layout';
8
8
  import { Text } from '../typography/Text';
@@ -11,6 +11,7 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forwardedRef
11
11
  let {
12
12
  children,
13
13
  intent = 'informational',
14
+ emphasis = intent === 'informational' ? 'low' : 'high',
14
15
  colorScheme = 'blue',
15
16
  background: customBackground,
16
17
  color: customColor,
@@ -23,7 +24,7 @@ export const Tag = /*#__PURE__*/memo(/*#__PURE__*/forwardRef((_ref, forwardedRef
23
24
  const {
24
25
  background,
25
26
  foreground
26
- } = tagColorMap[intent][colorScheme];
27
+ } = tagEmphasisColorMap[emphasis][colorScheme];
27
28
  const backgroundColor = "rgb(" + theme.spectrum[customBackground != null ? customBackground : background] + ")";
28
29
  const color = "rgb(" + theme.spectrum[customColor != null ? customColor : foreground] + ")";
29
30
  return /*#__PURE__*/_jsx(Box, _extends({
@@ -12,6 +12,10 @@ figma.connect(Tag, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-
12
12
  intent: 'informational'
13
13
  },
14
14
  props: {
15
+ emphasis: figma.enum('emphasis', {
16
+ high: 'high',
17
+ low: 'low'
18
+ }),
15
19
  colorScheme: figma.enum('colorScheme', {
16
20
  green: 'green',
17
21
  purple: 'purple',
@@ -47,6 +51,10 @@ figma.connect(Tag, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-
47
51
  intent: 'promotional'
48
52
  },
49
53
  props: {
54
+ emphasis: figma.enum('emphasis', {
55
+ high: 'high',
56
+ low: 'low'
57
+ }),
50
58
  colorScheme: figma.enum('colorScheme', {
51
59
  green: 'green',
52
60
  purple: 'purple',
@@ -6,6 +6,7 @@ import { Tag } from '../Tag';
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  const tagProps = {
8
8
  intent: ['informational', 'promotional'],
9
+ emphasis: ['high', 'low'],
9
10
  colorScheme: ['green', 'purple', 'blue', 'yellow', 'red', 'gray']
10
11
  };
11
12
  const tagMap = tagProps.intent.map(intent => {
@@ -20,7 +21,25 @@ const tagStories = {
20
21
  children: 'Default tag',
21
22
  colorScheme: 'blue'
22
23
  }],
23
- all: tagMap,
24
+ all: [...tagProps.colorScheme.map(scheme => ({
25
+ intent: 'informational',
26
+ emphasis: 'high',
27
+ colorScheme: scheme,
28
+ children: startCase(scheme) + " (High Informational)"
29
+ })), ...tagProps.colorScheme.map(scheme => ({
30
+ intent: 'promotional',
31
+ colorScheme: scheme,
32
+ children: startCase(scheme) + " (High)"
33
+ })), ...tagProps.colorScheme.map(scheme => ({
34
+ intent: 'informational',
35
+ colorScheme: scheme,
36
+ children: startCase(scheme) + " (Low)"
37
+ })), ...tagProps.colorScheme.map(scheme => ({
38
+ intent: 'promotional',
39
+ emphasis: 'low',
40
+ colorScheme: scheme,
41
+ children: startCase(scheme) + " (Low Promotional)"
42
+ }))],
24
43
  wildcard: [{
25
44
  children: 'Atlanta',
26
45
  background: 'blue100',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coinbase/cds-mobile",
3
- "version": "8.23.0",
3
+ "version": "8.25.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.23.0",
157
+ "@coinbase/cds-common": "^8.25.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",