@coinbase/cds-mcp-server 8.50.0 → 8.51.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 +4 -0
- package/mcp-docs/web/components/Tooltip.txt +88 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,10 @@ All notable changes to this project will be documented in this file.
|
|
|
8
8
|
|
|
9
9
|
<!-- template-start -->
|
|
10
10
|
|
|
11
|
+
## 8.51.0 ((3/9/2026, 06:39 AM PST))
|
|
12
|
+
|
|
13
|
+
This is an artificial version bump with no new change.
|
|
14
|
+
|
|
11
15
|
## 8.50.0 ((3/6/2026, 09:36 AM PST))
|
|
12
16
|
|
|
13
17
|
This is an artificial version bump with no new change.
|
|
@@ -94,7 +94,7 @@ You can use tooltips within `TextInput` to provide more context.
|
|
|
94
94
|
<InputLabel htmlFor="tooltip-input-example">Display name</InputLabel>
|
|
95
95
|
{/* Add padding to ensure 24x24 tooltip tap target for a11y compliance */}
|
|
96
96
|
<Tooltip content="This will be visible to other users.">
|
|
97
|
-
<Icon active color="fg" name="info" padding={0.75} size="xs" tabIndex={0} />
|
|
97
|
+
<Icon active color="fg" name="info" padding={0.75} size="xs" tabIndex={0} role="button" />
|
|
98
98
|
</Tooltip>
|
|
99
99
|
</HStack>
|
|
100
100
|
}
|
|
@@ -124,6 +124,92 @@ function TooltipVisibilityDelay() {
|
|
|
124
124
|
}
|
|
125
125
|
```
|
|
126
126
|
|
|
127
|
+
### Accessibility (A11y)
|
|
128
|
+
|
|
129
|
+
When tooltip content is non-interactive (text only), focus stays on the trigger and the tooltip is rendered in a portal. When tooltip content has **interactive elements** (links, buttons), set **`hasInteractiveContent={true}`** so the tooltip stays in the document flow and keyboard users can tab into the content. This sets `disablePortal`, `disableAutoFocus`, and `disableFocusTrap` appropriately.
|
|
130
|
+
|
|
131
|
+
**Tooltip on an icon (or other non-button anchor):**
|
|
132
|
+
|
|
133
|
+
When using an Icon (or other non-`<button>` element) as the tooltip trigger, add **`role="button"`** and **`tabIndex={0}`** so screen readers (e.g. VoiceOver) can discover it with arrow keys and announce the tooltip. If the icon performs an action on click, use **IconButton** instead so the trigger is a real `<button>`.
|
|
134
|
+
|
|
135
|
+
**Example: tooltip on an icon (string content)**
|
|
136
|
+
|
|
137
|
+
```jsx live
|
|
138
|
+
function TooltipIconStringContent() {
|
|
139
|
+
return (
|
|
140
|
+
<HStack alignItems="center" gap={2}>
|
|
141
|
+
<Tooltip content="This will be visible to other users.">
|
|
142
|
+
<Icon active color="fg" name="info" role="button" tabIndex={0} />
|
|
143
|
+
</Tooltip>
|
|
144
|
+
<Text as="span" font="body" color="fgMuted">
|
|
145
|
+
Focus the icon to hear the tooltip announced.
|
|
146
|
+
</Text>
|
|
147
|
+
</HStack>
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
**Example: tooltip on an icon (React node content)**
|
|
153
|
+
|
|
154
|
+
```jsx live
|
|
155
|
+
function TooltipIconReactNodeContent() {
|
|
156
|
+
return (
|
|
157
|
+
<HStack alignItems="center" gap={2}>
|
|
158
|
+
<Tooltip
|
|
159
|
+
content={
|
|
160
|
+
<Text font="label2">
|
|
161
|
+
Styled <strong>description</strong> text.
|
|
162
|
+
</Text>
|
|
163
|
+
}
|
|
164
|
+
>
|
|
165
|
+
<Icon active color="fg" name="info" role="button" tabIndex={0} />
|
|
166
|
+
</Tooltip>
|
|
167
|
+
<Text as="span" font="body" color="fgMuted">
|
|
168
|
+
Focus the icon to hear the tooltip announced.
|
|
169
|
+
</Text>
|
|
170
|
+
</HStack>
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**When tooltip content is interactive (links, buttons):**
|
|
176
|
+
|
|
177
|
+
- Prefer **Modal** or another pattern for actionable content when possible. Tooltips are intended for short, non-interactive descriptions.
|
|
178
|
+
- If you must use interactive content inside a tooltip, set **`hasInteractiveContent={true}`** so the content stays in the document flow. The prop allows keyboard users to tab into the tooltip, through its content, and out to the next focusable element on the page. With the default portal, focus behavior can be inconsistent when moving between trigger and content.
|
|
179
|
+
|
|
180
|
+
**Example: tooltip with interactive content**
|
|
181
|
+
|
|
182
|
+
```jsx live
|
|
183
|
+
function TooltipWithInteractiveContent() {
|
|
184
|
+
return (
|
|
185
|
+
<Box position="relative" paddingY={5}>
|
|
186
|
+
<Text as="span" font="body" color="fgMuted">
|
|
187
|
+
Set your default display currency.{' '}
|
|
188
|
+
</Text>
|
|
189
|
+
<Tooltip
|
|
190
|
+
content={
|
|
191
|
+
<Text font="label2" color="fg">
|
|
192
|
+
Learn more at{' '}
|
|
193
|
+
<Text
|
|
194
|
+
as="a"
|
|
195
|
+
href="https://www.coinbase.com/settings"
|
|
196
|
+
target="_blank"
|
|
197
|
+
rel="noopener noreferrer"
|
|
198
|
+
>
|
|
199
|
+
Settings
|
|
200
|
+
</Text>
|
|
201
|
+
.
|
|
202
|
+
</Text>
|
|
203
|
+
}
|
|
204
|
+
hasInteractiveContent
|
|
205
|
+
>
|
|
206
|
+
<Icon active color="fg" name="info" paddingStart={1} role="button" tabIndex={0} />
|
|
207
|
+
</Tooltip>
|
|
208
|
+
</Box>
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
```
|
|
212
|
+
|
|
127
213
|
## Props
|
|
128
214
|
|
|
129
215
|
| Prop | Type | Required | Default | Description |
|
|
@@ -138,6 +224,7 @@ function TooltipVisibilityDelay() {
|
|
|
138
224
|
| `elevation` | `0 \| 1 \| 2` | No | `-` | Determines a components shadow styles. Parent should have overflow set to visible to ensure styles are not clipped. |
|
|
139
225
|
| `focusTabIndexElements` | `boolean` | No | `false` | If true, the focus trap will include all elements with tabIndex values in the list of focusable elements. |
|
|
140
226
|
| `gap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `1` | This value corresponds to how big the gap between the subject and the tooltip is. We do not encourage usage of this prop. But it is enabled for special cases as an escape hatch. |
|
|
227
|
+
| `hasInteractiveContent` | `boolean` | No | `-` | Whether the tooltip has interactive elements inside the content. |
|
|
141
228
|
| `invertColorScheme` | `boolean` | No | `true` | Invert the themes activeColorScheme for this component |
|
|
142
229
|
| `openDelay` | `number` | No | `-` | Delay (in ms) before showing the tooltip on pointer hover. Keyboard focus still opens immediately for accessibility. |
|
|
143
230
|
| `placement` | `top \| bottom \| left \| right` | No | `top` | Position of tooltip in relation to the subject. |
|