@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.
- package/CHANGELOG.md +8 -0
- package/mcp-docs/mobile/components/Accordion.txt +3 -1
- package/mcp-docs/mobile/components/Alert.txt +3 -1
- package/mcp-docs/mobile/components/Banner.txt +14 -14
- package/mcp-docs/mobile/components/Button.txt +173 -30
- package/mcp-docs/mobile/components/Carousel.txt +24 -24
- package/mcp-docs/mobile/components/Combobox.txt +187 -0
- package/mcp-docs/mobile/components/ContainedAssetCard.txt +4 -4
- package/mcp-docs/mobile/components/ContentCard.txt +29 -27
- package/mcp-docs/mobile/components/ContentCardBody.txt +4 -4
- package/mcp-docs/mobile/components/ContentCardHeader.txt +2 -2
- package/mcp-docs/mobile/components/FloatingAssetCard.txt +6 -6
- package/mcp-docs/mobile/components/IconButton.txt +126 -51
- package/mcp-docs/mobile/components/LineChart.txt +3 -2
- package/mcp-docs/mobile/components/MultiContentModule.txt +6 -6
- package/mcp-docs/mobile/components/Numpad.txt +2 -2
- package/mcp-docs/mobile/components/PageHeader.txt +3 -1
- package/mcp-docs/mobile/components/PeriodSelector.txt +4 -4
- package/mcp-docs/mobile/components/Pressable.txt +6 -2
- package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +4 -4
- package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +2 -2
- package/mcp-docs/mobile/components/ProgressCircle.txt +5 -1
- package/mcp-docs/mobile/components/SelectChip.txt +2 -0
- package/mcp-docs/mobile/components/SelectChipAlpha.txt +1 -1
- package/mcp-docs/mobile/components/SlideButton.txt +2 -2
- package/mcp-docs/mobile/components/Sparkline.txt +3 -1
- package/mcp-docs/mobile/components/SparklineGradient.txt +3 -1
- package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +3 -1
- package/mcp-docs/mobile/components/TabbedChips.txt +3 -1
- package/mcp-docs/mobile/components/Tag.txt +19 -9
- package/mcp-docs/mobile/components/TextInput.txt +9 -3
- package/mcp-docs/mobile/components/Tray.txt +2 -0
- package/mcp-docs/mobile/components/UpsellCard.txt +16 -16
- package/mcp-docs/mobile/hooks/useDimensions.txt +4 -4
- package/mcp-docs/mobile/hooks/useMergeRefs.txt +4 -4
- package/mcp-docs/mobile/hooks/usePreviousValue.txt +5 -5
- package/mcp-docs/mobile/hooks/useRefMap.txt +6 -6
- package/mcp-docs/mobile/routes.txt +1 -0
- package/mcp-docs/web/components/Accordion.txt +3 -1
- package/mcp-docs/web/components/Alert.txt +3 -1
- package/mcp-docs/web/components/Banner.txt +14 -14
- package/mcp-docs/web/components/Button.txt +188 -34
- package/mcp-docs/web/components/Carousel.txt +71 -65
- package/mcp-docs/web/components/Combobox.txt +176 -0
- package/mcp-docs/web/components/ContainedAssetCard.txt +4 -4
- package/mcp-docs/web/components/ContentCard.txt +29 -27
- package/mcp-docs/web/components/ContentCardBody.txt +4 -4
- package/mcp-docs/web/components/ContentCardHeader.txt +2 -2
- package/mcp-docs/web/components/FloatingAssetCard.txt +6 -6
- package/mcp-docs/web/components/FullscreenModal.txt +12 -4
- package/mcp-docs/web/components/GridColumn.txt +12 -4
- package/mcp-docs/web/components/IconButton.txt +164 -189
- package/mcp-docs/web/components/LineChart.txt +3 -2
- package/mcp-docs/web/components/MultiContentModule.txt +6 -6
- package/mcp-docs/web/components/PageHeader.txt +11 -9
- package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +4 -4
- package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +2 -2
- package/mcp-docs/web/components/ProgressCircle.txt +5 -1
- package/mcp-docs/web/components/SelectChipAlpha.txt +1 -1
- package/mcp-docs/web/components/Sidebar.txt +2 -2
- package/mcp-docs/web/components/Sparkline.txt +3 -1
- package/mcp-docs/web/components/SparklineGradient.txt +3 -1
- package/mcp-docs/web/components/SparklineInteractiveHeader.txt +3 -1
- package/mcp-docs/web/components/TabbedChips.txt +3 -1
- package/mcp-docs/web/components/TableBody.txt +2 -2
- package/mcp-docs/web/components/TableCaption.txt +2 -2
- package/mcp-docs/web/components/TableCell.txt +6 -6
- package/mcp-docs/web/components/Tag.txt +19 -9
- package/mcp-docs/web/components/TextInput.txt +9 -3
- package/mcp-docs/web/components/Tray.txt +2 -1
- package/mcp-docs/web/components/UpsellCard.txt +16 -16
- package/mcp-docs/web/hooks/useDimensions.txt +4 -4
- package/mcp-docs/web/hooks/useHasMounted.txt +7 -3
- package/mcp-docs/web/hooks/useIsoEffect.txt +1 -1
- package/mcp-docs/web/hooks/useMergeRefs.txt +4 -4
- package/mcp-docs/web/hooks/useOverlayContentContext.txt +8 -8
- package/mcp-docs/web/hooks/usePreviousValue.txt +5 -5
- package/mcp-docs/web/hooks/useRefMap.txt +6 -6
- package/mcp-docs/web/hooks/useScrollBlocker.txt +1 -1
- package/mcp-docs/web/hooks/useTheme.txt +3 -3
- package/mcp-docs/web/routes.txt +1 -0
- 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
|
-
<
|
|
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
|
-
</
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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
|
-
<
|
|
103
|
+
<Text as="p" font="label2">
|
|
104
104
|
<Link to="https://www.coinbase.com">Retry</Link>
|
|
105
|
-
</
|
|
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
|
-
<
|
|
124
|
+
<Text as="p" font="label2">
|
|
125
125
|
Rounded corners help align with softer surface treatments within a page section.
|
|
126
|
-
</
|
|
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
|
-
<
|
|
138
|
+
<Text as="p" font="label2">
|
|
139
139
|
You can incrementally increase the radius to match surrounding cards or panels.
|
|
140
|
-
</
|
|
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
|
-
|
|
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
|
-
|
|
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}
|
|
19
|
-
Primary
|
|
20
|
-
</Button>
|
|
20
|
+
<Button onClick={console.log}>Get started</Button>
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
###
|
|
23
|
+
### Variants
|
|
24
|
+
|
|
25
|
+
Use variants to communicate the importance and intent of an action.
|
|
24
26
|
|
|
25
|
-
|
|
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
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
49
|
+
#### Transparent
|
|
34
50
|
|
|
35
|
-
|
|
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
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
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
|
-
###
|
|
70
|
+
### States
|
|
71
|
+
|
|
72
|
+
#### Loading
|
|
44
73
|
|
|
45
|
-
|
|
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
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
|
|
98
|
+
#### Disabled
|
|
54
99
|
|
|
55
|
-
|
|
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}
|
|
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"
|
|
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"
|
|
110
|
+
<Button disabled onClick={console.log} variant="negative">
|
|
69
111
|
Negative
|
|
70
112
|
</Button>
|
|
71
113
|
</HStack>
|
|
72
114
|
```
|
|
73
115
|
|
|
74
|
-
###
|
|
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
|
-
|
|
133
|
+
Use `block` to make the button expand to fill its container width.
|
|
77
134
|
|
|
78
135
|
```jsx live
|
|
79
|
-
<
|
|
80
|
-
<Button onClick={console.log}
|
|
81
|
-
|
|
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 |
|