@coinbase/cds-mcp-server 8.28.2 → 8.30.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.
Files changed (84) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/mcp-docs/mobile/components/Accordion.txt +3 -1
  3. package/mcp-docs/mobile/components/Alert.txt +3 -1
  4. package/mcp-docs/mobile/components/Banner.txt +14 -14
  5. package/mcp-docs/mobile/components/Carousel.txt +24 -24
  6. package/mcp-docs/mobile/components/Combobox.txt +187 -0
  7. package/mcp-docs/mobile/components/ContainedAssetCard.txt +4 -4
  8. package/mcp-docs/mobile/components/ContentCard.txt +29 -27
  9. package/mcp-docs/mobile/components/ContentCardBody.txt +4 -4
  10. package/mcp-docs/mobile/components/ContentCardHeader.txt +2 -2
  11. package/mcp-docs/mobile/components/FloatingAssetCard.txt +6 -6
  12. package/mcp-docs/mobile/components/LineChart.txt +3 -2
  13. package/mcp-docs/mobile/components/MultiContentModule.txt +6 -6
  14. package/mcp-docs/mobile/components/Numpad.txt +2 -2
  15. package/mcp-docs/mobile/components/PageHeader.txt +3 -1
  16. package/mcp-docs/mobile/components/PeriodSelector.txt +4 -4
  17. package/mcp-docs/mobile/components/Pressable.txt +6 -2
  18. package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +4 -4
  19. package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +2 -2
  20. package/mcp-docs/mobile/components/ProgressCircle.txt +5 -1
  21. package/mcp-docs/mobile/components/SelectChip.txt +2 -0
  22. package/mcp-docs/mobile/components/SelectChipAlpha.txt +88 -1
  23. package/mcp-docs/mobile/components/SlideButton.txt +2 -2
  24. package/mcp-docs/mobile/components/Sparkline.txt +3 -1
  25. package/mcp-docs/mobile/components/SparklineGradient.txt +3 -1
  26. package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +3 -1
  27. package/mcp-docs/mobile/components/TabbedChips.txt +3 -1
  28. package/mcp-docs/mobile/components/TabbedChipsAlpha.txt +30 -0
  29. package/mcp-docs/mobile/components/Tag.txt +19 -9
  30. package/mcp-docs/mobile/components/TextInput.txt +9 -3
  31. package/mcp-docs/mobile/components/Tray.txt +2 -0
  32. package/mcp-docs/mobile/components/UpsellCard.txt +16 -16
  33. package/mcp-docs/mobile/hooks/useDimensions.txt +4 -4
  34. package/mcp-docs/mobile/hooks/useMergeRefs.txt +4 -4
  35. package/mcp-docs/mobile/hooks/usePreviousValue.txt +5 -5
  36. package/mcp-docs/mobile/hooks/useRefMap.txt +6 -6
  37. package/mcp-docs/mobile/routes.txt +1 -0
  38. package/mcp-docs/web/components/Accordion.txt +3 -1
  39. package/mcp-docs/web/components/Alert.txt +3 -1
  40. package/mcp-docs/web/components/Banner.txt +14 -14
  41. package/mcp-docs/web/components/Carousel.txt +71 -65
  42. package/mcp-docs/web/components/Chip.txt +1 -1
  43. package/mcp-docs/web/components/Combobox.txt +176 -0
  44. package/mcp-docs/web/components/ContainedAssetCard.txt +4 -4
  45. package/mcp-docs/web/components/ContentCard.txt +29 -27
  46. package/mcp-docs/web/components/ContentCardBody.txt +4 -4
  47. package/mcp-docs/web/components/ContentCardHeader.txt +2 -2
  48. package/mcp-docs/web/components/FloatingAssetCard.txt +6 -6
  49. package/mcp-docs/web/components/FullscreenModal.txt +12 -4
  50. package/mcp-docs/web/components/GridColumn.txt +12 -4
  51. package/mcp-docs/web/components/InputChip.txt +1 -1
  52. package/mcp-docs/web/components/LineChart.txt +3 -2
  53. package/mcp-docs/web/components/MediaChip.txt +1 -1
  54. package/mcp-docs/web/components/MultiContentModule.txt +6 -6
  55. package/mcp-docs/web/components/PageHeader.txt +11 -9
  56. package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +4 -4
  57. package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +2 -2
  58. package/mcp-docs/web/components/ProgressCircle.txt +5 -1
  59. package/mcp-docs/web/components/SelectChip.txt +1 -1
  60. package/mcp-docs/web/components/SelectChipAlpha.txt +87 -3
  61. package/mcp-docs/web/components/Sidebar.txt +2 -2
  62. package/mcp-docs/web/components/Sparkline.txt +3 -1
  63. package/mcp-docs/web/components/SparklineGradient.txt +3 -1
  64. package/mcp-docs/web/components/SparklineInteractiveHeader.txt +3 -1
  65. package/mcp-docs/web/components/TabbedChips.txt +3 -1
  66. package/mcp-docs/web/components/TabbedChipsAlpha.txt +35 -1
  67. package/mcp-docs/web/components/TableBody.txt +2 -2
  68. package/mcp-docs/web/components/TableCaption.txt +2 -2
  69. package/mcp-docs/web/components/TableCell.txt +6 -6
  70. package/mcp-docs/web/components/Tag.txt +19 -9
  71. package/mcp-docs/web/components/TextInput.txt +9 -3
  72. package/mcp-docs/web/components/Tray.txt +2 -1
  73. package/mcp-docs/web/components/UpsellCard.txt +16 -16
  74. package/mcp-docs/web/hooks/useDimensions.txt +4 -4
  75. package/mcp-docs/web/hooks/useHasMounted.txt +7 -3
  76. package/mcp-docs/web/hooks/useIsoEffect.txt +1 -1
  77. package/mcp-docs/web/hooks/useMergeRefs.txt +4 -4
  78. package/mcp-docs/web/hooks/useOverlayContentContext.txt +8 -8
  79. package/mcp-docs/web/hooks/usePreviousValue.txt +5 -5
  80. package/mcp-docs/web/hooks/useRefMap.txt +6 -6
  81. package/mcp-docs/web/hooks/useScrollBlocker.txt +1 -1
  82. package/mcp-docs/web/hooks/useTheme.txt +3 -3
  83. package/mcp-docs/web/routes.txt +1 -0
  84. package/package.json +1 -1
@@ -0,0 +1,176 @@
1
+ # Combobox
2
+
3
+ A flexible combobox component for both single and multi-selection, built for web applications with comprehensive accessibility support.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { Combobox } from '@coinbase/cds-web/alpha/combobox'
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### A note on search logic
14
+
15
+ We use [fuse.js](https://www.fusejs.io/) to power the fuzzy search logic for Combobox. You can override this search logic with your own using the `filterFunction` prop.
16
+
17
+ ### Multi-Select
18
+
19
+ Basic multi-selection combobox with search.
20
+
21
+ ```jsx live
22
+ function MultiSelect() {
23
+ const fruitOptions: SelectOption[] = [
24
+ { value: 'apple', label: 'Apple' },
25
+ { value: 'banana', label: 'Banana' },
26
+ { value: 'cherry', label: 'Cherry' },
27
+ { value: 'date', label: 'Date' },
28
+ { value: 'elderberry', label: 'Elderberry' },
29
+ { value: 'fig', label: 'Fig' },
30
+ { value: 'grape', label: 'Grape' },
31
+ { value: 'honeydew', label: 'Honeydew' },
32
+ { value: 'kiwi', label: 'Kiwi' },
33
+ { value: 'lemon', label: 'Lemon' },
34
+ { value: 'mango', label: 'Mango' },
35
+ { value: 'orange', label: 'Orange' },
36
+ { value: 'papaya', label: 'Papaya' },
37
+ { value: 'raspberry', label: 'Raspberry' },
38
+ { value: 'strawberry', label: 'Strawberry' },
39
+ ];
40
+
41
+ const { value, onChange } = useMultiSelect({ initialValue: ['apple', 'banana'] });
42
+
43
+ return (
44
+ <Combobox
45
+ label="Select fruits"
46
+ onChange={onChange}
47
+ options={fruitOptions}
48
+ placeholder="Search and select fruits..."
49
+ type="multi"
50
+ value={value}
51
+ />
52
+ );
53
+ }
54
+ ```
55
+
56
+ ### Single Select
57
+
58
+ Standard single-selection combobox with an option to clear the current value.
59
+
60
+ ```jsx live
61
+ function SingleSelect() {
62
+ const singleSelectOptions = [
63
+ { value: null, label: 'Remove selection' },
64
+ { value: 'apple', label: 'Apple' },
65
+ { value: 'banana', label: 'Banana' },
66
+ { value: 'cherry', label: 'Cherry' },
67
+ { value: 'date', label: 'Date' },
68
+ ];
69
+
70
+ const [value, setValue] = useState('apple');
71
+
72
+ return (
73
+ <Combobox
74
+ label="Favorite fruit"
75
+ onChange={setValue}
76
+ options={singleSelectOptions}
77
+ placeholder="Search fruits..."
78
+ value={value}
79
+ />
80
+ );
81
+ }
82
+ ```
83
+
84
+ ### Helper Text
85
+
86
+ Communicate limits or guidance by pairing helper text with multi-select usage.
87
+
88
+ ```jsx live
89
+ function HelperText() {
90
+ const fruitOptions: SelectOption[] = [
91
+ { value: 'apple', label: 'Apple' },
92
+ { value: 'banana', label: 'Banana' },
93
+ { value: 'cherry', label: 'Cherry' },
94
+ { value: 'date', label: 'Date' },
95
+ { value: 'elderberry', label: 'Elderberry' },
96
+ { value: 'fig', label: 'Fig' },
97
+ { value: 'grape', label: 'Grape' },
98
+ { value: 'honeydew', label: 'Honeydew' },
99
+ { value: 'kiwi', label: 'Kiwi' },
100
+ { value: 'lemon', label: 'Lemon' },
101
+ { value: 'mango', label: 'Mango' },
102
+ { value: 'orange', label: 'Orange' },
103
+ { value: 'papaya', label: 'Papaya' },
104
+ { value: 'raspberry', label: 'Raspberry' },
105
+ { value: 'strawberry', label: 'Strawberry' },
106
+ ];
107
+
108
+ const { value, onChange } = useMultiSelect({ initialValue: ['apple', 'banana'] });
109
+
110
+ return (
111
+ <Combobox
112
+ helperText="Choose more than one fruit"
113
+ label="Select fruits"
114
+ onChange={onChange}
115
+ options={fruitOptions}
116
+ placeholder="Search and select fruits..."
117
+ type="multi"
118
+ value={value}
119
+ />
120
+ );
121
+ }
122
+ ```
123
+
124
+ ## Props
125
+
126
+ | Prop | Type | Required | Default | Description |
127
+ | --- | --- | --- | --- | --- |
128
+ | `onChange` | `(value: Type extends multi ? SelectOptionValue \| SelectOptionValue[] \| null : SelectOptionValue \| null) => void` | Yes | `-` | - |
129
+ | `options` | `SelectOptionList<Type, SelectOptionValue>` | Yes | `-` | Array of options to display in the select dropdown. Can be individual options or groups with label and options |
130
+ | `value` | `string \| SelectOptionValue[] \| null` | Yes | `-` | - |
131
+ | `ComboboxControlComponent` | `ComboboxControlComponent` | No | `-` | Custom ComboboxControlComponent to wrap SelectControlComponent. This component must be a stable reference |
132
+ | `SelectAllOptionComponent` | `SelectOptionComponent<Type, SelectOptionValue>` | No | `-` | Custom component to render the Select All option |
133
+ | `SelectControlComponent` | `SelectControlComponent<Type, SelectOptionValue>` | No | `-` | Custom component to render the select control |
134
+ | `SelectDropdownComponent` | `SelectDropdownComponent<Type, SelectOptionValue>` | No | `-` | Custom component to render the dropdown container |
135
+ | `SelectEmptyDropdownContentsComponent` | `SelectEmptyDropdownContentComponent` | No | `-` | Custom component to render when no options are available |
136
+ | `SelectOptionComponent` | `SelectOptionComponent<Type, SelectOptionValue>` | No | `-` | Custom component to render individual options |
137
+ | `SelectOptionGroupComponent` | `SelectOptionGroupComponent<Type, SelectOptionValue>` | No | `-` | Custom component to render group headers |
138
+ | `accessibilityRoles` | `{ dropdown?: AriaHasPopupType; option?: string \| undefined; } \| undefined` | No | `-` | Accessibility roles for dropdown and option elements |
139
+ | `accessory` | `ReactElement<CellAccessoryProps, string \| JSXElementConstructor<any>>` | No | `-` | Accessory element rendered at the end of the cell (e.g., chevron). |
140
+ | `className` | `string` | No | `-` | CSS class name for the root element |
141
+ | `classNames` | `{ root?: string; control?: string \| undefined; controlStartNode?: string \| undefined; controlInputNode?: string \| undefined; controlValueNode?: string \| undefined; controlLabelNode?: string \| undefined; controlHelperTextNode?: string \| undefined; controlEndNode?: string \| undefined; dropdown?: string \| undefined; option?: string \| undefined; optionCell?: string \| undefined; optionContent?: string \| undefined; optionLabel?: string \| undefined; optionDescription?: string \| undefined; selectAllDivider?: string \| undefined; emptyContentsContainer?: string \| undefined; emptyContentsText?: string \| undefined; optionGroup?: string \| undefined; } \| undefined` | No | `-` | Custom class names for different parts of the select |
142
+ | `clearAllLabel` | `string` | No | `-` | Label for the Clear All option in multi-select mode |
143
+ | `compact` | `boolean` | No | `-` | Whether to use compact styling for the select |
144
+ | `controlAccessibilityLabel` | `string` | No | `-` | Accessibility label for the control |
145
+ | `defaultOpen` | `boolean` | No | `-` | Initial open state when component mounts (uncontrolled mode) |
146
+ | `defaultSearchText` | `string` | No | `-` | Default search text value for uncontrolled mode |
147
+ | `disableClickOutsideClose` | `boolean` | No | `-` | Whether clicking outside the dropdown should close it |
148
+ | `disabled` | `boolean` | No | `false` | Toggles input interactability and opacity |
149
+ | `emptyOptionsLabel` | `string` | No | `-` | Label displayed when there are no options available |
150
+ | `end` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | End-aligned content (e.g., value, status). Replaces the deprecated detail prop. |
151
+ | `endNode` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds content to the end of the inner input. Refer to diagram for location of endNode in InputStack component |
152
+ | `filterFunction` | `((options: SelectOptionList<Type, SelectOptionValue>, searchText: string) => SelectOption<SelectOptionValue>[])` | No | `-` | Custom filter function for searching options |
153
+ | `helperText` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Helper text displayed below the select |
154
+ | `hiddenSelectedOptionsLabel` | `string` | No | `-` | Label to show for showcasing count of hidden selected options |
155
+ | `hideSearchInput` | `boolean` | No | `-` | Hide the search input |
156
+ | `hideSelectAll` | `boolean` | No | `-` | Whether to hide the Select All option in multi-select mode |
157
+ | `label` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Label displayed above the control |
158
+ | `labelVariant` | `inside \| outside` | No | `'outside'` | The variant of the label. Only used when compact is not true. |
159
+ | `maxSelectedOptionsToShow` | `number` | No | `-` | Maximum number of selected options to show before truncating |
160
+ | `media` | `ReactElement` | No | `-` | Media rendered at the start of the cell (icon, avatar, image, etc). |
161
+ | `onSearch` | `((searchText: string) => void)` | No | `-` | Search text change handler |
162
+ | `open` | `boolean` | No | `-` | Controlled open state of the dropdown |
163
+ | `placeholder` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Placeholder text displayed when no option is selected |
164
+ | `ref` | `null \| (instance: SelectRef \| null) => void \| RefObject<SelectRef>` | No | `-` | - |
165
+ | `removeSelectedOptionAccessibilityLabel` | `string` | No | `-` | Accessibility label for each chip in a multi-select |
166
+ | `searchText` | `string` | No | `-` | Controlled search text value |
167
+ | `selectAllLabel` | `string` | No | `-` | Label for the Select All option in multi-select mode |
168
+ | `setOpen` | `((open: boolean \| ((open: boolean) => boolean)) => void)` | No | `-` | Callback to update the open state |
169
+ | `startNode` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Adds content to the start of the inner input. Refer to diagram for location of startNode in InputStack component |
170
+ | `style` | `CSSProperties` | No | `-` | Inline styles for the root element |
171
+ | `styles` | `{ root?: CSSProperties; control?: CSSProperties \| undefined; controlStartNode?: CSSProperties \| undefined; controlInputNode?: CSSProperties \| undefined; controlValueNode?: CSSProperties \| undefined; controlLabelNode?: CSSProperties \| undefined; controlHelperTextNode?: CSSProperties \| undefined; controlEndNode?: CSSProperties \| undefined; controlBlendStyles?: InteractableBlendStyles \| undefined; dropdown?: CSSProperties \| undefined; option?: CSSProperties \| undefined; optionCell?: CSSProperties \| undefined; optionContent?: CSSProperties \| undefined; optionLabel?: CSSProperties \| undefined; optionDescription?: CSSProperties \| undefined; optionBlendStyles?: InteractableBlendStyles \| undefined; selectAllDivider?: CSSProperties \| undefined; emptyContentsContainer?: CSSProperties \| undefined; emptyContentsText?: CSSProperties \| undefined; optionGroup?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for different parts of the select |
172
+ | `testID` | `string` | No | `-` | Test ID for the root element |
173
+ | `type` | `multi \| single` | No | `-` | Whether the select allows single or multiple selections |
174
+ | `variant` | `primary \| secondary \| positive \| negative \| foregroundMuted \| foreground` | No | `foregroundMuted` | Determines the sentiment of the input. Because we allow startContent and endContent to be custom ReactNode, the content placed inside these slots will not change colors according to the variant. You will have to add that yourself |
175
+
176
+
@@ -23,9 +23,9 @@ function Example() {
23
23
  {
24
24
  title: '$4.15',
25
25
  description: (
26
- <TextLabel2 as="p" color="fgPositive" numberOfLines={2}>
26
+ <Text as="p" font="label2" color="fgPositive" numberOfLines={2}>
27
27
  &#x2197;73.37%
28
- </TextLabel2>
28
+ </Text>
29
29
  ),
30
30
  subtitle: 'ETH',
31
31
  onClick: NoopFn,
@@ -55,9 +55,9 @@ function Example() {
55
55
  {
56
56
  title: '$309.43',
57
57
  description: (
58
- <TextLabel2 as="p" color="fgPositive" numberOfLines={2}>
58
+ <Text as="p" font="label2" color="fgPositive" numberOfLines={2}>
59
59
  &#x2197;3.37%
60
- </TextLabel2>
60
+ </Text>
61
61
  ),
62
62
  subtitle: 'Bitcoin',
63
63
  onClick: NoopFn,
@@ -30,9 +30,9 @@ function Example() {
30
30
  }
31
31
  meta={
32
32
  <Box marginLeft={-1}>
33
- <TextLabel2 as="span" color="fgMuted" marginLeft={-1} numberOfLines={1}>
33
+ <Text as="span" font="label2" color="fgMuted" marginLeft={-1} numberOfLines={1}>
34
34
  ・News・5 hrs
35
- </TextLabel2>
35
+ </Text>
36
36
  </Box>
37
37
  }
38
38
  title="Description"
@@ -41,12 +41,12 @@ function Example() {
41
41
  body="Bitcoin Network Shatters Records With Hashrate Climbing to 464 EH/s"
42
42
  label={
43
43
  <HStack alignItems="flex-end" flexWrap="wrap" gap={0.5}>
44
- <TextLabel2 as="p" color="fgMuted" numberOfLines={1}>
44
+ <Text as="p" font="label2" color="fgMuted" numberOfLines={1}>
45
45
  BTC
46
- </TextLabel2>
47
- <TextLabel2 accessibilityLabel="Up 5.12%" as="p" color="fgPositive">
46
+ </Text>
47
+ <Text font="label2" accessibilityLabel="Up 5.12%" as="p" color="fgPositive">
48
48
  ↗ 5.12%
49
- </TextLabel2>
49
+ </Text>
50
50
  </HStack>
51
51
  }
52
52
  />
@@ -55,9 +55,9 @@ function Example() {
55
55
  <ContentCardHeader
56
56
  meta={
57
57
  <Box marginLeft={-1}>
58
- <TextLabel2 as="span" color="fgMuted" numberOfLines={1}>
58
+ <Text as="span" font="label2" color="fgMuted" numberOfLines={1}>
59
59
  ・News・5 hrs
60
- </TextLabel2>
60
+ </Text>
61
61
  </Box>
62
62
  }
63
63
  title="Brian Armstrong"
@@ -66,12 +66,12 @@ function Example() {
66
66
  body="Bitcoin Network Shatters Records With Hashrate Climbing to 464 EH/s"
67
67
  label={
68
68
  <HStack alignItems="flex-end" flexWrap="wrap" gap={0.5}>
69
- <TextLabel2 as="p" color="fgMuted" numberOfLines={1}>
69
+ <Text as="p" font="label2" color="fgMuted" numberOfLines={1}>
70
70
  BTC
71
- </TextLabel2>
72
- <TextLabel2 accessibilityLabel="Up 5.12%" as="p" color="fgPositive">
71
+ </Text>
72
+ <Text font="label2" accessibilityLabel="Up 5.12%" as="p" color="fgPositive">
73
73
  ↗ 5.12%
74
- </TextLabel2>
74
+ </Text>
75
75
  </HStack>
76
76
  }
77
77
  media={
@@ -130,18 +130,18 @@ function Example() {
130
130
  <ContentCard gap={3}>
131
131
  <ContentCardBody
132
132
  body={
133
- <TextBody as="p" paddingTop={0.5}>
133
+ <Text as="p" font="body" paddingTop={0.5}>
134
134
  Bitcoin Network Shatters Records With Hashrate Climbing to 464 EH/s
135
- </TextBody>
135
+ </Text>
136
136
  }
137
137
  label={
138
138
  <HStack alignItems="flex-end" flexWrap="wrap" gap={0.5}>
139
- <TextLabel2 as="p" color="fgMuted" numberOfLines={1}>
139
+ <Text as="p" font="label2" color="fgMuted" numberOfLines={1}>
140
140
  BTC
141
- </TextLabel2>
142
- <TextLabel2 accessibilityLabel="Up 5.12%" as="p" color="fgPositive">
141
+ </Text>
142
+ <Text font="label2" accessibilityLabel="Up 5.12%" as="p" color="fgPositive">
143
143
  ↗ 5.12%
144
- </TextLabel2>
144
+ </Text>
145
145
  </HStack>
146
146
  }
147
147
  media={
@@ -165,7 +165,9 @@ function Example() {
165
165
  <TextLegal as="span" color="fgMuted">
166
166
  Reward
167
167
  </TextLegal>
168
- <TextHeadline as="span">+$15 ACS</TextHeadline>
168
+ <Text as="span" font="headline">
169
+ +$15 ACS
170
+ </Text>
169
171
  </VStack>
170
172
  </HStack>
171
173
  <Button compact accessibilityLabel="Claim now" variant="secondary">
@@ -203,9 +205,9 @@ function Example() {
203
205
  }
204
206
  meta={
205
207
  <Box marginLeft={-1}>
206
- <TextLabel2 as="span" color="fgMuted" numberOfLines={1}>
208
+ <Text as="span" font="label2" color="fgMuted" numberOfLines={1}>
207
209
  @matdryhurst・7 mo
208
- </TextLabel2>
210
+ </Text>
209
211
  </Box>
210
212
  }
211
213
  title="Mat Dryhurst"
@@ -220,9 +222,9 @@ function Example() {
220
222
  avatar="/img/card/content_card_custom_avatar_1.png"
221
223
  meta={
222
224
  <Box marginLeft={-1}>
223
- <TextLabel2 as="span" color="fgMuted" numberOfLines={1}>
225
+ <Text as="span" font="label2" color="fgMuted" numberOfLines={1}>
224
226
  ・News・5 hrs
225
- </TextLabel2>
227
+ </Text>
226
228
  </Box>
227
229
  }
228
230
  title="Description"
@@ -240,12 +242,12 @@ function Example() {
240
242
  gap={1.5}
241
243
  label={
242
244
  <HStack alignItems="flex-end" flexWrap="wrap" gap={0.5}>
243
- <TextLabel2 as="p" color="fgMuted" numberOfLines={1}>
245
+ <Text as="p" font="label2" color="fgMuted" numberOfLines={1}>
244
246
  BTC
245
- </TextLabel2>
246
- <TextLabel2 accessibilityLabel="Up 5.12%" as="p" color="fgPositive">
247
+ </Text>
248
+ <Text font="label2" accessibilityLabel="Up 5.12%" as="p" color="fgPositive">
247
249
  ↗ 5.12%
248
- </TextLabel2>
250
+ </Text>
249
251
  </HStack>
250
252
  }
251
253
  paddingBottom={3}
@@ -18,12 +18,12 @@ import { ContentCardBody } from '@coinbase/cds-web/cards/ContentCard'
18
18
  body="Bitcoin Network Shatters Records With Hashrate Climbing to 464 EH/s"
19
19
  label={
20
20
  <HStack alignItems="flex-end" flexWrap="wrap" gap={0.5}>
21
- <TextLabel2 as="p" color="fgMuted" numberOfLines={1}>
21
+ <Text as="p" font="label2" color="fgMuted" numberOfLines={1}>
22
22
  BTC
23
- </TextLabel2>
24
- <TextLabel2 accessibilityLabel="Up 5.12%" as="p" color="fgPositive">
23
+ </Text>
24
+ <Text font="label2" accessibilityLabel="Up 5.12%" as="p" color="fgPositive">
25
25
  ↗ 5.12%
26
- </TextLabel2>
26
+ </Text>
27
27
  </HStack>
28
28
  }
29
29
  />
@@ -20,9 +20,9 @@ function Example() {
20
20
  avatar="/img/card/content_card_custom_avatar_1.png"
21
21
  meta={
22
22
  <Box marginLeft={-1}>
23
- <TextLabel2 as="span" color="fgMuted" numberOfLines={1}>
23
+ <Text as="span" font="label2" color="fgMuted" numberOfLines={1}>
24
24
  ・News・5 hrs
25
- </TextLabel2>
25
+ </Text>
26
26
  </Box>
27
27
  }
28
28
  title="Description"
@@ -58,9 +58,9 @@ function Example() {
58
58
  {
59
59
  title: '#7560',
60
60
  description: (
61
- <TextLabel2 as="p" color="fgPositive" numberOfLines={2}>
61
+ <Text as="p" font="label2" color="fgPositive" numberOfLines={2}>
62
62
  &#x2197;6.37%
63
- </TextLabel2>
63
+ </Text>
64
64
  ),
65
65
  subtitle: 'Bored Ape',
66
66
  onClick: NoopFn,
@@ -76,9 +76,9 @@ function Example() {
76
76
  {
77
77
  title: '#2015',
78
78
  description: (
79
- <TextLabel2 as="p" color="fgNegative" numberOfLines={2}>
79
+ <Text as="p" font="label2" color="fgNegative" numberOfLines={2}>
80
80
  &#x2198;6.37%
81
- </TextLabel2>
81
+ </Text>
82
82
  ),
83
83
  subtitle: 'Pudgy Penguins',
84
84
  onClick: NoopFn,
@@ -115,9 +115,9 @@ function Example() {
115
115
  {
116
116
  title: 'Parallel',
117
117
  description: (
118
- <TextLabel2 as="p" color="fgMuted" numberOfLines={2}>
118
+ <Text as="p" font="label2" color="fgMuted" numberOfLines={2}>
119
119
  &#9733;4.5
120
- </TextLabel2>
120
+ </Text>
121
121
  ),
122
122
  onClick: NoopFn,
123
123
  media: (
@@ -73,8 +73,12 @@ function DefaultModal() {
73
73
 
74
74
  const primaryContent = (
75
75
  <VStack>
76
- <TextTitle1 as="h1">Fullscreen Modal</TextTitle1>
77
- <TextBody as="p">This is a test Fullscreen Modal with components composition.</TextBody>
76
+ <Text as="h1" font="title1">
77
+ Fullscreen Modal
78
+ </Text>
79
+ <Text as="p" font="body">
80
+ This is a test Fullscreen Modal with components composition.
81
+ </Text>
78
82
  <ListCell
79
83
  title="Bitcoin"
80
84
  description="BTC"
@@ -96,10 +100,14 @@ function DefaultModal() {
96
100
  <VStack borderRadius={300} elevation={1}>
97
101
  <Accordion defaultActiveKey="2">
98
102
  <AccordionItem itemKey="1" title="Accordion #1" subtitle="subtitle1">
99
- <TextBody as="p">{loremIpsum}</TextBody>
103
+ <Text as="p" font="body">
104
+ {loremIpsum}
105
+ </Text>
100
106
  </AccordionItem>
101
107
  <AccordionItem itemKey="2" title="Accordion #2" subtitle="subtitle2">
102
- <TextBody as="p">{loremIpsum}</TextBody>
108
+ <Text as="p" font="body">
109
+ {loremIpsum}
110
+ </Text>
103
111
  </AccordionItem>
104
112
  </Accordion>
105
113
  </VStack>
@@ -64,13 +64,19 @@ function FullBleedExample() {
64
64
  return (
65
65
  <Grid gap={0.5} templateColumns="100px 1fr 100px">
66
66
  <Item background="bg">
67
- <TextBody as="p">Gutter</TextBody>
67
+ <Text as="p" font="body">
68
+ Gutter
69
+ </Text>
68
70
  </Item>
69
71
  <Item>
70
- <TextBody as="p">Body</TextBody>
72
+ <Text as="p" font="body">
73
+ Body
74
+ </Text>
71
75
  </Item>
72
76
  <Item background="bg">
73
- <TextBody as="p">Gutter</TextBody>
77
+ <Text as="p" font="body">
78
+ Gutter
79
+ </Text>
74
80
  </Item>
75
81
  <GridColumn
76
82
  // this is shorthand for first grid line to the last
@@ -81,7 +87,9 @@ function FullBleedExample() {
81
87
  background="bgAlternate"
82
88
  padding={2}
83
89
  >
84
- <TextBody as="p">Full Bleed</TextBody>
90
+ <Text as="p" font="body">
91
+ Full Bleed
92
+ </Text>
85
93
  </GridColumn>
86
94
  </Grid>
87
95
  );
@@ -153,7 +153,7 @@ function Example() {
153
153
  | `marginX` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
154
154
  | `marginY` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
155
155
  | `maxHeight` | `ResponsiveProp<MaxHeight<string \| number>>` | No | `-` | - |
156
- | `maxWidth` | `((MaxWidth<string \| number> \| { base?: MaxWidth<string \| number>; phone?: MaxWidth<string \| number> \| undefined; tablet?: MaxWidth<string \| number> \| undefined; desktop?: MaxWidth<string \| number> \| undefined; }) & DimensionValue) \| undefined` | No | `200` | If text content overflows, it will get truncated with an ellipsis. |
156
+ | `maxWidth` | `ResponsiveProp<MaxWidth<string \| number>>` | No | `200` | If text content overflows, it will get truncated with an ellipsis. |
157
157
  | `minHeight` | `ResponsiveProp<MinHeight<string \| number>>` | No | `-` | - |
158
158
  | `minWidth` | `ResponsiveProp<MinWidth<string \| number>>` | No | `-` | - |
159
159
  | `noScaleOnPress` | `boolean` | No | `-` | Dont scale element on press. |
@@ -1268,14 +1268,15 @@ function AssetPriceWithDottedArea() {
1268
1268
  <SegmentedTab
1269
1269
  ref={ref}
1270
1270
  label={
1271
- <TextLabel1
1271
+ <Text
1272
+ font="label1"
1272
1273
  style={{
1273
1274
  transition: 'color 0.2s ease',
1274
1275
  color: isActive ? assets.btc.color : undefined,
1275
1276
  }}
1276
1277
  >
1277
1278
  {label}
1278
- </TextLabel1>
1279
+ </Text>
1279
1280
  }
1280
1281
  {...props}
1281
1282
  />
@@ -234,7 +234,7 @@ You can override the automatic spacing with custom values if needed.
234
234
  | `marginX` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
235
235
  | `marginY` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
236
236
  | `maxHeight` | `ResponsiveProp<MaxHeight<string \| number>>` | No | `-` | - |
237
- | `maxWidth` | `((MaxWidth<string \| number> \| { base?: MaxWidth<string \| number>; phone?: MaxWidth<string \| number> \| undefined; tablet?: MaxWidth<string \| number> \| undefined; desktop?: MaxWidth<string \| number> \| undefined; }) & DimensionValue) \| undefined` | No | `200` | If text content overflows, it will get truncated with an ellipsis. |
237
+ | `maxWidth` | `ResponsiveProp<MaxWidth<string \| number>>` | No | `200` | If text content overflows, it will get truncated with an ellipsis. |
238
238
  | `minHeight` | `ResponsiveProp<MinHeight<string \| number>>` | No | `-` | - |
239
239
  | `minWidth` | `ResponsiveProp<MinWidth<string \| number>>` | No | `-` | - |
240
240
  | `noScaleOnPress` | `boolean` | No | `-` | Dont scale element on press. |
@@ -215,9 +215,9 @@ function Example() {
215
215
  <VStack>
216
216
  <HStack justifyContent="center" zIndex={1}>
217
217
  <Box background="background" paddingHorizontal={1.5}>
218
- <TextBody as="span" color="foregroundMuted">
218
+ <Text as="span" font="body" color="foregroundMuted">
219
219
  OR
220
- </TextBody>
220
+ </Text>
221
221
  </Box>
222
222
  </HStack>
223
223
  <Divider marginTop={-1.5} paddingBottom={1.5} />
@@ -235,9 +235,9 @@ function Example() {
235
235
  >
236
236
  <Box padding={2}>{icon}</Box>
237
237
  </Pressable>
238
- <TextLabel2 as="span" color="foregroundMuted" paddingTop={1}>
238
+ <Text as="span" font="label2" color="foregroundMuted" paddingTop={1}>
239
239
  {name}
240
- </TextLabel2>
240
+ </Text>
241
241
  </VStack>
242
242
  ))}
243
243
  </HStack>
@@ -251,13 +251,13 @@ function Example() {
251
251
  actionAccessibilityLabel="Continue"
252
252
  title="Sign in to Coinbase"
253
253
  description={
254
- <TextBody as="p" color="foregroundMuted">
254
+ <Text as="p" font="body" color="foregroundMuted">
255
255
  By signing in, you agree to our{' '}
256
256
  <Link to="https://www.google.com/" openInNewWindow underline={false}>
257
257
  Privacy Policy
258
258
  </Link>
259
259
  . Not your device? Use a private window.
260
- </TextBody>
260
+ </Text>
261
261
  }
262
262
  accessibilityLabel="Login section"
263
263
  pictogram={<LogoMark size={32} />}
@@ -85,17 +85,17 @@ function Example() {
85
85
  />
86
86
  <Box padding={3} background="bgPositiveWash">
87
87
  <VStack gap={3} background="bgPrimaryWash">
88
- <TextTitle2>Configure Your Trading Preferences</TextTitle2>
89
- <TextBody>
88
+ <Text font="title2">Configure Your Trading Preferences</Text>
89
+ <Text font="body">
90
90
  Customize your trading experience by adjusting the settings below. These preferences
91
91
  will apply to all your trading activities and can be modified at any time.
92
- </TextBody>
93
- <TextTitle4>Order Types</TextTitle4>
94
- <TextBody color="fgSecondary">
92
+ </Text>
93
+ <Text font="title4">Order Types</Text>
94
+ <Text font="body" color="fgSecondary">
95
95
  Choose your preferred default order types for buying and selling. Market orders execute
96
96
  immediately at current prices, while limit orders allow you to set specific price
97
97
  targets.
98
- </TextBody>
98
+ </Text>
99
99
  </VStack>
100
100
  </Box>
101
101
  </>
@@ -123,10 +123,12 @@ function Example() {
123
123
  paddingY={10}
124
124
  >
125
125
  <HeroSquare name="bigWarning" />
126
- <TextTitle1 as="h3">You need to X before you Y</TextTitle1>
127
- <TextBody align="center" as="sub">
126
+ <Text as="h3" font="title1">
127
+ You need to X before you Y
128
+ </Text>
129
+ <Text font="body" align="center" as="sub">
128
130
  You&apos;ll need to [add funds] before you can [complete this transaction]
129
- </TextBody>
131
+ </Text>
130
132
  </VStack>
131
133
  </Box>
132
134
  </VStack>
@@ -63,17 +63,17 @@ function Example() {
63
63
 
64
64
  const renderStartLabelNum = useCallback((num, disabled) => {
65
65
  return (
66
- <TextTitle3 disabled={disabled} as="span">
66
+ <Text disabled={disabled} as="span" font="title3">
67
67
  ${num.toLocaleString()}
68
- </TextTitle3>
68
+ </Text>
69
69
  );
70
70
  }, []);
71
71
 
72
72
  const renderEndLabelNum = useCallback((num, disabled) => {
73
73
  return (
74
- <TextLabel2 disabled={disabled} as="span" align="end" noWrap>
74
+ <Text disabled={disabled} as="span" font="label2" align="end" noWrap>
75
75
  ${num.toLocaleString()} left
76
- </TextLabel2>
76
+ </Text>
77
77
  );
78
78
  }, []);
79
79
 
@@ -56,9 +56,9 @@ function Example() {
56
56
 
57
57
  const renderLabelNum = useCallback((num, disabled) => {
58
58
  return (
59
- <TextTitle3 as="span" disabled={disabled}>
59
+ <Text as="span" font="title3" disabled={disabled}>
60
60
  ${num.toLocaleString()}
61
- </TextTitle3>
61
+ </Text>
62
62
  );
63
63
  }, []);
64
64
 
@@ -351,7 +351,11 @@ The progress circle can be customized with styles and class names.
351
351
  stroke: 'transparent',
352
352
  },
353
353
  }}
354
- contentNode={<TextTitle1 color="fgPrimary">40%</TextTitle1>}
354
+ contentNode={
355
+ <Text font="title1" color="fgPrimary">
356
+ 40%
357
+ </Text>
358
+ }
355
359
  weight="semiheavy"
356
360
  />
357
361
  <ProgressCircle