@coinbase/cds-mcp-server 8.28.1 → 8.29.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 (82) 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/Button.txt +173 -30
  6. package/mcp-docs/mobile/components/Carousel.txt +24 -24
  7. package/mcp-docs/mobile/components/Combobox.txt +187 -0
  8. package/mcp-docs/mobile/components/ContainedAssetCard.txt +4 -4
  9. package/mcp-docs/mobile/components/ContentCard.txt +29 -27
  10. package/mcp-docs/mobile/components/ContentCardBody.txt +4 -4
  11. package/mcp-docs/mobile/components/ContentCardHeader.txt +2 -2
  12. package/mcp-docs/mobile/components/FloatingAssetCard.txt +6 -6
  13. package/mcp-docs/mobile/components/IconButton.txt +126 -51
  14. package/mcp-docs/mobile/components/LineChart.txt +3 -2
  15. package/mcp-docs/mobile/components/MultiContentModule.txt +6 -6
  16. package/mcp-docs/mobile/components/Numpad.txt +2 -2
  17. package/mcp-docs/mobile/components/PageHeader.txt +3 -1
  18. package/mcp-docs/mobile/components/PeriodSelector.txt +4 -4
  19. package/mcp-docs/mobile/components/Pressable.txt +6 -2
  20. package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +4 -4
  21. package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +2 -2
  22. package/mcp-docs/mobile/components/ProgressCircle.txt +5 -1
  23. package/mcp-docs/mobile/components/SelectChip.txt +2 -0
  24. package/mcp-docs/mobile/components/SelectChipAlpha.txt +1 -1
  25. package/mcp-docs/mobile/components/SlideButton.txt +2 -2
  26. package/mcp-docs/mobile/components/Sparkline.txt +3 -1
  27. package/mcp-docs/mobile/components/SparklineGradient.txt +3 -1
  28. package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +3 -1
  29. package/mcp-docs/mobile/components/TabbedChips.txt +3 -1
  30. package/mcp-docs/mobile/components/Tag.txt +19 -9
  31. package/mcp-docs/mobile/components/TextInput.txt +9 -3
  32. package/mcp-docs/mobile/components/Tray.txt +2 -0
  33. package/mcp-docs/mobile/components/UpsellCard.txt +16 -16
  34. package/mcp-docs/mobile/hooks/useDimensions.txt +4 -4
  35. package/mcp-docs/mobile/hooks/useMergeRefs.txt +4 -4
  36. package/mcp-docs/mobile/hooks/usePreviousValue.txt +5 -5
  37. package/mcp-docs/mobile/hooks/useRefMap.txt +6 -6
  38. package/mcp-docs/mobile/routes.txt +1 -0
  39. package/mcp-docs/web/components/Accordion.txt +3 -1
  40. package/mcp-docs/web/components/Alert.txt +3 -1
  41. package/mcp-docs/web/components/Banner.txt +14 -14
  42. package/mcp-docs/web/components/Button.txt +188 -34
  43. package/mcp-docs/web/components/Carousel.txt +71 -65
  44. package/mcp-docs/web/components/Combobox.txt +176 -0
  45. package/mcp-docs/web/components/ContainedAssetCard.txt +4 -4
  46. package/mcp-docs/web/components/ContentCard.txt +29 -27
  47. package/mcp-docs/web/components/ContentCardBody.txt +4 -4
  48. package/mcp-docs/web/components/ContentCardHeader.txt +2 -2
  49. package/mcp-docs/web/components/FloatingAssetCard.txt +6 -6
  50. package/mcp-docs/web/components/FullscreenModal.txt +12 -4
  51. package/mcp-docs/web/components/GridColumn.txt +12 -4
  52. package/mcp-docs/web/components/IconButton.txt +164 -189
  53. package/mcp-docs/web/components/LineChart.txt +3 -2
  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/SelectChipAlpha.txt +1 -1
  60. package/mcp-docs/web/components/Sidebar.txt +2 -2
  61. package/mcp-docs/web/components/Sparkline.txt +3 -1
  62. package/mcp-docs/web/components/SparklineGradient.txt +3 -1
  63. package/mcp-docs/web/components/SparklineInteractiveHeader.txt +3 -1
  64. package/mcp-docs/web/components/TabbedChips.txt +3 -1
  65. package/mcp-docs/web/components/TableBody.txt +2 -2
  66. package/mcp-docs/web/components/TableCaption.txt +2 -2
  67. package/mcp-docs/web/components/TableCell.txt +6 -6
  68. package/mcp-docs/web/components/Tag.txt +19 -9
  69. package/mcp-docs/web/components/TextInput.txt +9 -3
  70. package/mcp-docs/web/components/Tray.txt +2 -1
  71. package/mcp-docs/web/components/UpsellCard.txt +16 -16
  72. package/mcp-docs/web/hooks/useDimensions.txt +4 -4
  73. package/mcp-docs/web/hooks/useHasMounted.txt +7 -3
  74. package/mcp-docs/web/hooks/useIsoEffect.txt +1 -1
  75. package/mcp-docs/web/hooks/useMergeRefs.txt +4 -4
  76. package/mcp-docs/web/hooks/useOverlayContentContext.txt +8 -8
  77. package/mcp-docs/web/hooks/usePreviousValue.txt +5 -5
  78. package/mcp-docs/web/hooks/useRefMap.txt +6 -6
  79. package/mcp-docs/web/hooks/useScrollBlocker.txt +1 -1
  80. package/mcp-docs/web/hooks/useTheme.txt +3 -3
  81. package/mcp-docs/web/routes.txt +1 -0
  82. package/package.json +1 -1
@@ -26,10 +26,10 @@ The global warning banner is used to communicate important alerts or warnings to
26
26
  primaryAction={<Link to="https://www.coinbase.com">Primary</Link>}
27
27
  secondaryAction={<Link to="https://www.coinbase.com">Secondary</Link>}
28
28
  >
29
- <TextLabel2 as="p">
29
+ <Text as="p" font="label2">
30
30
  Your funds are safe. We’re looking into it and expect our usual service to return soon.
31
31
  <Link to="https://www.coinbase.com">Learn more</Link>
32
- </TextLabel2>
32
+ </Text>
33
33
  </Banner>
34
34
  ```
35
35
 
@@ -47,10 +47,10 @@ The In-line Error Banner is used to display specific error messages directly ben
47
47
  primaryAction={<Link to="https://www.coinbase.com">Primary</Link>}
48
48
  secondaryAction={<Link to="https://www.coinbase.com">Secondary</Link>}
49
49
  >
50
- <TextLabel2 as="p">
50
+ <Text as="p" font="label2">
51
51
  Your funds are safe. We’re looking into it and expect our usual service to return soon.
52
52
  <Link to="https://www.coinbase.com">Learn more</Link>
53
- </TextLabel2>
53
+ </Text>
54
54
  </Banner>
55
55
  ```
56
56
 
@@ -66,10 +66,10 @@ The Contextual Promotional Banner is used to highlight special offers, promotion
66
66
  title="Some features are temporarily unavailable"
67
67
  variant="promotional"
68
68
  >
69
- <TextLabel2 as="p">
69
+ <Text as="p" font="label2">
70
70
  Your funds are safe. We’re looking into it and expect our usual service to return soon.
71
71
  <Link to="https://www.coinbase.com">Learn more</Link>
72
- </TextLabel2>
72
+ </Text>
73
73
  </Banner>
74
74
  ```
75
75
 
@@ -88,10 +88,10 @@ The in-line Informational Banner is used to provide users with additional inform
88
88
  primaryAction={<Link to="https://www.coinbase.com">Primary</Link>}
89
89
  secondaryAction={<Link to="https://www.coinbase.com">Secondary</Link>}
90
90
  >
91
- <TextLabel2 as="p">
91
+ <Text as="p" font="label2">
92
92
  Your funds are safe. We’re looking into it and expect our usual service to return soon.
93
93
  <Link to="https://www.coinbase.com">Learn more</Link>
94
- </TextLabel2>
94
+ </Text>
95
95
  </Banner>
96
96
  <Banner
97
97
  startIcon="warning"
@@ -100,9 +100,9 @@ The in-line Informational Banner is used to provide users with additional inform
100
100
  title="Some features are temporarily unavailable"
101
101
  variant="warning"
102
102
  >
103
- <TextLabel2 as="p">
103
+ <Text as="p" font="label2">
104
104
  <Link to="https://www.coinbase.com">Retry</Link>
105
- </TextLabel2>
105
+ </Text>
106
106
  </Banner>
107
107
  </VStack>
108
108
  ```
@@ -121,9 +121,9 @@ You can customize `borderRadius` to soften contextual and in-line banners.
121
121
  title="Rounded contextual banner"
122
122
  variant="informational"
123
123
  >
124
- <TextLabel2 as="p">
124
+ <Text as="p" font="label2">
125
125
  Rounded corners help align with softer surface treatments within a page section.
126
- </TextLabel2>
126
+ </Text>
127
127
  </Banner>
128
128
  <Banner
129
129
  borderRadius={400}
@@ -135,9 +135,9 @@ You can customize `borderRadius` to soften contextual and in-line banners.
135
135
  title="Rounded inline banner"
136
136
  variant="promotional"
137
137
  >
138
- <TextLabel2 as="p">
138
+ <Text as="p" font="label2">
139
139
  You can incrementally increase the radius to match surrounding cards or panels.
140
- </TextLabel2>
140
+ </Text>
141
141
  </Banner>
142
142
  </VStack>
143
143
  ```
@@ -10,82 +10,236 @@ import { Button } from '@coinbase/cds-web/buttons/Button'
10
10
 
11
11
  ## Examples
12
12
 
13
- ### Primary Button
13
+ Buttons allow users to take actions and make choices with a single tap. They communicate what action will occur when the user interacts with them.
14
14
 
15
- Use primary buttons for high emphasis actions. These buttons have the most visual impact and should be reserved for the most important, final actions that complete a flow, like Save, Join now, or Confirm. Try to use one per screen. Multiple primary buttons make it confusing for the user to understand what action they should take.
15
+ ### Basics
16
+
17
+ The only required prop is `children`, which is the button's label. Buttons default to the `primary` variant.
16
18
 
17
19
  ```jsx live
18
- <Button onClick={console.log} variant="primary">
19
- Primary
20
- </Button>
20
+ <Button onClick={console.log}>Get started</Button>
21
21
  ```
22
22
 
23
- ### Secondary Button
23
+ ### Variants
24
+
25
+ Use variants to communicate the importance and intent of an action.
24
26
 
25
- These buttons have a medium level of emphasis that should be used for non-critical actions. Secondary buttons can be used on pages without restrictions and works well for multiple actions of equal weight. They can be used in conjunction with a Primary Button or independently.
27
+ - **Primary** High emphasis for main actions like "Save" or "Confirm". Limit to one per screen.
28
+ - **Secondary** — Medium emphasis for multiple actions of equal weight.
29
+ - **Tertiary** — High contrast with inverted background.
30
+ - **Negative** — Destructive actions that can't be undone. Use sparingly.
26
31
 
27
32
  ```jsx live
28
- <Button onClick={console.log} variant="secondary">
29
- Secondary
30
- </Button>
33
+ <HStack gap={2} flexWrap="wrap">
34
+ <Button onClick={console.log} variant="primary">
35
+ Primary
36
+ </Button>
37
+ <Button onClick={console.log} variant="secondary">
38
+ Secondary
39
+ </Button>
40
+ <Button onClick={console.log} variant="tertiary">
41
+ Tertiary
42
+ </Button>
43
+ <Button onClick={console.log} variant="negative">
44
+ Negative
45
+ </Button>
46
+ </HStack>
31
47
  ```
32
48
 
33
- ### Tertiary Button
49
+ #### Transparent
34
50
 
35
- These buttons provide high contrast with the background through the use of the themable inverted background color.
51
+ Use transparent buttons for supplementary actions with lower prominence. The container is only visible on interaction. Works with any variant.
36
52
 
37
53
  ```jsx live
38
- <Button onClick={console.log} variant="tertiary">
39
- Tertiary
40
- </Button>
54
+ <HStack gap={2} flexWrap="wrap">
55
+ <Button onClick={console.log} transparent>
56
+ Primary
57
+ </Button>
58
+ <Button onClick={console.log} variant="secondary" transparent>
59
+ Secondary
60
+ </Button>
61
+ <Button onClick={console.log} variant="tertiary" transparent>
62
+ Tertiary
63
+ </Button>
64
+ <Button onClick={console.log} variant="negative" transparent>
65
+ Negative
66
+ </Button>
67
+ </HStack>
41
68
  ```
42
69
 
43
- ### Negative Button
70
+ ### States
71
+
72
+ #### Loading
44
73
 
45
- Negative buttons should be used sparingly for destructive actions that will result in data loss, can’t be undone, or will have significant consequences. They commonly appear in confirmation dialogs as the final confirmation before deleting.
74
+ Use the `loading` prop to indicate an action is in progress. The button becomes non-interactive and displays a spinner while preserving its width.
46
75
 
47
76
  ```jsx live
48
- <Button onClick={console.log} variant="negative">
49
- Negative
50
- </Button>
77
+ function LoadingExample() {
78
+ const [isLoading, setIsLoading] = useState(false);
79
+
80
+ const handleClick = () => {
81
+ setIsLoading(true);
82
+ setTimeout(() => setIsLoading(false), 2000);
83
+ };
84
+
85
+ return (
86
+ <HStack gap={2} flexWrap="wrap">
87
+ <Button onClick={handleClick} loading={isLoading}>
88
+ Save changes
89
+ </Button>
90
+ <Button onClick={handleClick} variant="secondary" loading={isLoading}>
91
+ Submit
92
+ </Button>
93
+ </HStack>
94
+ );
95
+ }
51
96
  ```
52
97
 
53
- ### Transparent Button
98
+ #### Disabled
54
99
 
55
- Transparent buttons are used for less important actions that are supplementary. These buttons have lower prominence since its container is not visible until the button is interacted with. Transparent buttons are frequently used on Cards and can be placed on a variety of backgrounds.
100
+ Use the `disabled` prop to prevent interaction and indicate the action is unavailable.
56
101
 
57
102
  ```jsx live
58
- <HStack gap={2}>
59
- <Button onClick={console.log} transparent>
103
+ <HStack gap={2} flexWrap="wrap">
104
+ <Button disabled onClick={console.log}>
60
105
  Primary
61
106
  </Button>
62
- <Button onClick={console.log} variant="secondary" transparent>
63
- Secondary
64
- </Button>
65
- <Button onClick={console.log} variant="tertiary" transparent>
107
+ <Button disabled onClick={console.log} variant="secondary">
66
108
  Secondary
67
109
  </Button>
68
- <Button onClick={console.log} variant="negative" transparent>
110
+ <Button disabled onClick={console.log} variant="negative">
69
111
  Negative
70
112
  </Button>
71
113
  </HStack>
72
114
  ```
73
115
 
74
- ### Buttons with end icon
116
+ ### Sizing
117
+
118
+ #### Compact
119
+
120
+ Use `compact` for smaller buttons with reduced padding. Useful in dense UIs or alongside other compact elements.
121
+
122
+ ```jsx live
123
+ <HStack gap={2} flexWrap="wrap" alignItems="center">
124
+ <Button onClick={console.log} compact>
125
+ Compact
126
+ </Button>
127
+ <Button onClick={console.log}>Default</Button>
128
+ </HStack>
129
+ ```
130
+
131
+ #### Block
75
132
 
76
- You can add an icon after the label of a button.
133
+ Use `block` to make the button expand to fill its container width.
77
134
 
78
135
  ```jsx live
79
- <HStack gap={2}>
80
- <Button onClick={console.log} endIcon="add" endIconActive variant="secondary" compact>
81
- Select file
136
+ <VStack gap={2}>
137
+ <Button onClick={console.log} block>
138
+ Full width button
139
+ </Button>
140
+ <Button onClick={console.log} variant="secondary" block>
141
+ Another full width
82
142
  </Button>
143
+ </VStack>
144
+ ```
145
+
146
+ ### Icons
147
+
148
+ #### End Icon
149
+
150
+ Add an icon after the label to provide additional context or indicate direction.
151
+
152
+ ```jsx live
153
+ <HStack gap={2} flexWrap="wrap">
83
154
  <Button onClick={console.log} endIcon="forwardArrow" variant="secondary" compact>
84
155
  See more
85
156
  </Button>
157
+ <Button onClick={console.log} endIcon="externalLink" variant="secondary" compact>
158
+ Open link
159
+ </Button>
160
+ </HStack>
161
+ ```
162
+
163
+ #### Start Icon
164
+
165
+ Add an icon before the label to reinforce the action.
166
+
167
+ ```jsx live
168
+ <HStack gap={2} flexWrap="wrap">
169
+ <Button onClick={console.log} startIcon="add" startIconActive variant="secondary" compact>
170
+ Add item
171
+ </Button>
172
+ <Button onClick={console.log} startIcon="download" variant="secondary" compact>
173
+ Download
174
+ </Button>
86
175
  </HStack>
87
176
  ```
88
177
 
178
+ #### Full Width with Icons
179
+
180
+ When using `block` with icons, the content automatically spreads across the button width.
181
+
182
+ ```jsx live
183
+ <Button onClick={console.log} startIcon="wallet" endIcon="forwardArrow" variant="secondary" block>
184
+ Connect wallet
185
+ </Button>
186
+ ```
187
+
188
+ ### Accessibility
189
+
190
+ Buttons automatically use their `children` as the accessible label. For buttons with only icons or ambiguous labels, provide an `accessibilityLabel`.
191
+
192
+ ```jsx
193
+ <Button onClick={handleClose} accessibilityLabel="Close dialog">
194
+ ×
195
+ </Button>
196
+ ```
197
+
198
+ ### Composed Examples
199
+
200
+ #### Confirmation Dialog
201
+
202
+ A common pattern using primary and secondary buttons together.
203
+
204
+ ```jsx live
205
+ <HStack gap={2} flexWrap="wrap" justifyContent="flex-end">
206
+ <Button onClick={console.log} variant="secondary" transparent>
207
+ Cancel
208
+ </Button>
209
+ <Button onClick={console.log}>Confirm</Button>
210
+ </HStack>
211
+ ```
212
+
213
+ #### Destructive Confirmation
214
+
215
+ Use negative buttons with a secondary cancel option for destructive actions.
216
+
217
+ ```jsx live
218
+ <HStack gap={2} flexWrap="wrap" justifyContent="flex-end">
219
+ <Button onClick={console.log} variant="secondary" transparent>
220
+ Cancel
221
+ </Button>
222
+ <Button onClick={console.log} variant="negative">
223
+ Delete
224
+ </Button>
225
+ </HStack>
226
+ ```
227
+
228
+ #### Form Actions
229
+
230
+ A full-width primary action with a compact secondary option.
231
+
232
+ ```jsx live
233
+ <VStack gap={2}>
234
+ <Button onClick={console.log} block>
235
+ Create account
236
+ </Button>
237
+ <Button onClick={console.log} variant="secondary" transparent block>
238
+ Already have an account? Sign in
239
+ </Button>
240
+ </VStack>
241
+ ```
242
+
89
243
  ## Props
90
244
 
91
245
  | Prop | Type | Required | Default | Description |