@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.
- 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/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/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 +88 -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/TabbedChipsAlpha.txt +30 -0
- 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/Carousel.txt +71 -65
- package/mcp-docs/web/components/Chip.txt +1 -1
- 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/InputChip.txt +1 -1
- package/mcp-docs/web/components/LineChart.txt +3 -2
- package/mcp-docs/web/components/MediaChip.txt +1 -1
- 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/SelectChip.txt +1 -1
- package/mcp-docs/web/components/SelectChipAlpha.txt +87 -3
- 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/TabbedChipsAlpha.txt +35 -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
|
@@ -268,7 +268,7 @@ function SelectChipExample() {
|
|
|
268
268
|
| `marginX` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
269
269
|
| `marginY` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
270
270
|
| `maxHeight` | `((MaxHeight<string \| number> \| { base?: MaxHeight<string \| number>; phone?: MaxHeight<string \| number> \| undefined; tablet?: MaxHeight<string \| number> \| undefined; desktop?: MaxHeight<string \| number> \| undefined; }) & MaxHeight<string \| number>) \| undefined` | No | `300` | Can optionally pass a maxHeight. |
|
|
271
|
-
| `maxWidth` | `((
|
|
271
|
+
| `maxWidth` | `((MaxWidth<string \| number> \| { base?: MaxWidth<string \| number>; phone?: MaxWidth<string \| number> \| undefined; tablet?: MaxWidth<string \| number> \| undefined; desktop?: MaxWidth<string \| number> \| undefined; }) & MaxWidth<string \| number>) \| undefined` | No | `200` | If text content overflows, it will get truncated with an ellipsis. Maximum width of input as a percentage string or number converted to pixels. |
|
|
272
272
|
| `minHeight` | `ResponsiveProp<MinHeight<string \| number>>` | No | `-` | - |
|
|
273
273
|
| `minWidth` | `((MinWidth<string \| number> \| { base?: MinWidth<string \| number>; phone?: MinWidth<string \| number> \| undefined; tablet?: MinWidth<string \| number> \| undefined; desktop?: MinWidth<string \| number> \| undefined; }) & MinWidth<string \| number>) \| undefined` | No | `-` | Minimum width of input as a percentage string or number converted to pixels. |
|
|
274
274
|
| `numberOfLines` | `number` | No | `1` | How many lines the text in the chip will be broken into. |
|
|
@@ -273,6 +273,88 @@ function ExampleDescriptions() {
|
|
|
273
273
|
}
|
|
274
274
|
```
|
|
275
275
|
|
|
276
|
+
### With display value
|
|
277
|
+
|
|
278
|
+
Use the `displayValue` prop to override the displayed value and avoid truncation, especially in multi-select scenarios where multiple option labels might be too long to display.
|
|
279
|
+
|
|
280
|
+
```jsx live
|
|
281
|
+
function ExampleDisplayValue() {
|
|
282
|
+
const exampleOptions = [
|
|
283
|
+
{ value: '1', label: 'Option 1' },
|
|
284
|
+
{ value: '2', label: 'Option 2' },
|
|
285
|
+
{ value: '3', label: 'Option 3' },
|
|
286
|
+
{ value: '4', label: 'Option 4' },
|
|
287
|
+
{ value: '5', label: 'Option 5' },
|
|
288
|
+
];
|
|
289
|
+
const { value, onChange } = useMultiSelect({ initialValue: [] });
|
|
290
|
+
const displayValue =
|
|
291
|
+
Array.isArray(value) && value.length > 0
|
|
292
|
+
? `${value.length} ${value.length === 1 ? 'option' : 'options'} selected`
|
|
293
|
+
: undefined;
|
|
294
|
+
return (
|
|
295
|
+
<SelectChip
|
|
296
|
+
controlAccessibilityLabel="Select multiple values"
|
|
297
|
+
displayValue={displayValue}
|
|
298
|
+
onChange={onChange}
|
|
299
|
+
options={exampleOptions}
|
|
300
|
+
placeholder="Choose options"
|
|
301
|
+
type="multi"
|
|
302
|
+
value={value}
|
|
303
|
+
/>
|
|
304
|
+
);
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### With max width
|
|
309
|
+
|
|
310
|
+
```jsx live
|
|
311
|
+
function ExampleMaxWidth() {
|
|
312
|
+
const exampleOptions = [
|
|
313
|
+
{ value: '1', label: 'Very Long Option Name That Exceeds Default Width' },
|
|
314
|
+
{ value: '2', label: 'Another Extremely Long Option Label' },
|
|
315
|
+
{ value: '3', label: 'Short' },
|
|
316
|
+
{ value: '4', label: 'Medium Length Option' },
|
|
317
|
+
];
|
|
318
|
+
const [value, setValue] = useState(null);
|
|
319
|
+
return (
|
|
320
|
+
<VStack gap={2}>
|
|
321
|
+
<VStack gap={1}>
|
|
322
|
+
<Text>Default maxWidth (200px):</Text>
|
|
323
|
+
<SelectChip
|
|
324
|
+
accessibilityLabel="Select a value"
|
|
325
|
+
onChange={setValue}
|
|
326
|
+
options={exampleOptions}
|
|
327
|
+
placeholder="Choose an option"
|
|
328
|
+
value={value}
|
|
329
|
+
/>
|
|
330
|
+
</VStack>
|
|
331
|
+
<VStack gap={1}>
|
|
332
|
+
<Text>Custom maxWidth (150px):</Text>
|
|
333
|
+
<SelectChip
|
|
334
|
+
accessibilityLabel="Select a value"
|
|
335
|
+
maxWidth={150}
|
|
336
|
+
onChange={setValue}
|
|
337
|
+
options={exampleOptions}
|
|
338
|
+
placeholder="Choose an option"
|
|
339
|
+
value={value}
|
|
340
|
+
/>
|
|
341
|
+
</VStack>
|
|
342
|
+
<VStack gap={1}>
|
|
343
|
+
<Text>No maxWidth constraint:</Text>
|
|
344
|
+
<SelectChip
|
|
345
|
+
accessibilityLabel="Select a value"
|
|
346
|
+
maxWidth="100%"
|
|
347
|
+
onChange={setValue}
|
|
348
|
+
options={exampleOptions}
|
|
349
|
+
placeholder="Choose an option"
|
|
350
|
+
value={value}
|
|
351
|
+
/>
|
|
352
|
+
</VStack>
|
|
353
|
+
</VStack>
|
|
354
|
+
);
|
|
355
|
+
}
|
|
356
|
+
```
|
|
357
|
+
|
|
276
358
|
### Disabled
|
|
277
359
|
|
|
278
360
|
```jsx live
|
|
@@ -285,7 +367,7 @@ function ExampleDisabled() {
|
|
|
285
367
|
];
|
|
286
368
|
const [value, setValue] = useState('1');
|
|
287
369
|
return (
|
|
288
|
-
<
|
|
370
|
+
<VStack gap={2}>
|
|
289
371
|
<SelectChip
|
|
290
372
|
disabled
|
|
291
373
|
accessibilityLabel="Select a value"
|
|
@@ -302,7 +384,7 @@ function ExampleDisabled() {
|
|
|
302
384
|
placeholder="Choose an option"
|
|
303
385
|
value={value}
|
|
304
386
|
/>
|
|
305
|
-
</
|
|
387
|
+
</VStack>
|
|
306
388
|
);
|
|
307
389
|
}
|
|
308
390
|
```
|
|
@@ -329,6 +411,7 @@ function ExampleDisabled() {
|
|
|
329
411
|
| `defaultOpen` | `boolean` | No | `-` | Initial open state when component mounts (uncontrolled mode) |
|
|
330
412
|
| `disableClickOutsideClose` | `boolean` | No | `-` | Whether clicking outside the dropdown should close it |
|
|
331
413
|
| `disabled` | `boolean` | No | `false` | Toggles input interactability and opacity |
|
|
414
|
+
| `displayValue` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Override the displayed value in the chip control. Useful for avoiding truncation, especially in multi-select scenarios where multiple option labels might be too long to display. When provided, this value takes precedence over the default label generation. |
|
|
332
415
|
| `emptyOptionsLabel` | `string` | No | `-` | Label displayed when there are no options available |
|
|
333
416
|
| `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. |
|
|
334
417
|
| `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 |
|
|
@@ -337,6 +420,7 @@ function ExampleDisabled() {
|
|
|
337
420
|
| `invertColorScheme` | `boolean` | No | `false` | Invert the foreground and background colors to emphasize the Chip. Depending on your theme, it may be dangerous to use this prop in conjunction with transparentWhileInactive. |
|
|
338
421
|
| `label` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Label displayed above the control |
|
|
339
422
|
| `maxSelectedOptionsToShow` | `number` | No | `-` | Maximum number of selected options to show before truncating |
|
|
423
|
+
| `maxWidth` | `ResponsiveProp<MaxWidth<string \| number>>` | No | `200` | If text content overflows, it will get truncated with an ellipsis. |
|
|
340
424
|
| `media` | `ReactElement` | No | `-` | Media rendered at the start of the cell (icon, avatar, image, etc). |
|
|
341
425
|
| `numberOfLines` | `number` | No | `1` | How many lines the text in the chip will be broken into. |
|
|
342
426
|
| `open` | `boolean` | No | `-` | Controlled open state of the dropdown |
|
|
@@ -349,6 +433,6 @@ function ExampleDisabled() {
|
|
|
349
433
|
| `style` | `CSSProperties` | No | `-` | Inline styles for the root element |
|
|
350
434
|
| `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 |
|
|
351
435
|
| `testID` | `string` | No | `-` | Test ID for the root element |
|
|
352
|
-
| `type` | `
|
|
436
|
+
| `type` | `multi \| single` | No | `-` | Whether the select allows single or multiple selections |
|
|
353
437
|
|
|
354
438
|
|
|
@@ -57,9 +57,9 @@ function Example() {
|
|
|
57
57
|
testID="sidebar-item-primary"
|
|
58
58
|
>
|
|
59
59
|
<Icon name="documentation" />
|
|
60
|
-
<
|
|
60
|
+
<Text as="span" font="headline" color="foreground">
|
|
61
61
|
End item
|
|
62
|
-
</
|
|
62
|
+
</Text>
|
|
63
63
|
</HStack>
|
|
64
64
|
</Pressable>
|
|
65
65
|
);
|
|
@@ -76,7 +76,9 @@ function Example() {
|
|
|
76
76
|
const path = useSparklinePath({ ...dimensions, data: prices, yAxisScalingFactor });
|
|
77
77
|
return (
|
|
78
78
|
<VStack gap={2}>
|
|
79
|
-
<
|
|
79
|
+
<Text as="p" font="label1">
|
|
80
|
+
Scale {yAxisScalingFactor}
|
|
81
|
+
</Text>
|
|
80
82
|
<Sparkline {...dimensions} path={path} color="auto" yAxisScalingFactor={yAxisScalingFactor} />
|
|
81
83
|
</VStack>
|
|
82
84
|
);
|
|
@@ -55,7 +55,9 @@ function Example() {
|
|
|
55
55
|
const path = useSparklinePath({ ...dimensions, data: prices, yAxisScalingFactor });
|
|
56
56
|
return (
|
|
57
57
|
<VStack gap={2}>
|
|
58
|
-
<
|
|
58
|
+
<Text as="p" font="label1">
|
|
59
|
+
Scale {yAxisScalingFactor}
|
|
60
|
+
</Text>
|
|
59
61
|
<SparklineGradient
|
|
60
62
|
{...dimensions}
|
|
61
63
|
path={path}
|
|
@@ -55,7 +55,9 @@ The fill will be added by default
|
|
|
55
55
|
labelNode={
|
|
56
56
|
<HStack gap={1} alignItems="center">
|
|
57
57
|
<Icon active name="wallet" size="s" />
|
|
58
|
-
<
|
|
58
|
+
<Text as="span" font="title3">
|
|
59
|
+
CustomHeader
|
|
60
|
+
</Text>
|
|
59
61
|
</HStack>
|
|
60
62
|
}
|
|
61
63
|
/>
|
|
@@ -36,7 +36,9 @@ function TabbedChipsExample() {
|
|
|
36
36
|
return (
|
|
37
37
|
<VStack maxWidth={375} borderRadius={400} bordered paddingX={3} gap={2} paddingY={3}>
|
|
38
38
|
<VStack paddingTop={1}>
|
|
39
|
-
<
|
|
39
|
+
<Text as="p" font="title3">
|
|
40
|
+
Popular assets
|
|
41
|
+
</Text>
|
|
40
42
|
</VStack>
|
|
41
43
|
<SearchInput compact placeholder="Search by name" />
|
|
42
44
|
<OldTabbedChips value={value} onChange={setValue} tabs={tabs} />
|
|
@@ -27,7 +27,7 @@ function ExampleDefault() {
|
|
|
27
27
|
|
|
28
28
|
### Compact
|
|
29
29
|
|
|
30
|
-
```jsx
|
|
30
|
+
```jsx lived
|
|
31
31
|
function ExampleCompactNoStart() {
|
|
32
32
|
const tabs = [
|
|
33
33
|
{ id: 'all', label: 'All' },
|
|
@@ -57,6 +57,39 @@ function ExampleWithPaddles() {
|
|
|
57
57
|
}
|
|
58
58
|
```
|
|
59
59
|
|
|
60
|
+
### With autoScrollOffset
|
|
61
|
+
|
|
62
|
+
:::tip Auto-scroll offset
|
|
63
|
+
The `autoScrollOffset` prop controls the X position offset when auto-scrolling to the active tab. This prevents the active tab from being covered by the paddle on the left side. Try clicking tabs near the edges to see the difference.
|
|
64
|
+
:::
|
|
65
|
+
|
|
66
|
+
```jsx live
|
|
67
|
+
function ExampleAutoScrollOffset() {
|
|
68
|
+
const tabs = Array.from({ length: 25 }).map((_, i) => ({
|
|
69
|
+
id: `tab_${i + 1}`,
|
|
70
|
+
label: `Tab ${i + 1}`,
|
|
71
|
+
}));
|
|
72
|
+
const [activeTab, setActiveTab] = useState(tabs[0]);
|
|
73
|
+
return (
|
|
74
|
+
<VStack gap={2}>
|
|
75
|
+
<Text as="p" font="body">
|
|
76
|
+
Default offset (50px)
|
|
77
|
+
</Text>
|
|
78
|
+
<TabbedChips activeTab={activeTab} onChange={setActiveTab} tabs={tabs} />
|
|
79
|
+
<Text as="p" font="body">
|
|
80
|
+
Custom offset (100px)
|
|
81
|
+
</Text>
|
|
82
|
+
<TabbedChips
|
|
83
|
+
activeTab={activeTab}
|
|
84
|
+
onChange={setActiveTab}
|
|
85
|
+
tabs={tabs}
|
|
86
|
+
autoScrollOffset={100}
|
|
87
|
+
/>
|
|
88
|
+
</VStack>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
60
93
|
### With custom sized paddles
|
|
61
94
|
|
|
62
95
|
:::tip Paddle styling
|
|
@@ -187,6 +220,7 @@ render(<Example />);
|
|
|
187
220
|
| `tabs` | `TabbedChipProps<T>[]` | Yes | `-` | - |
|
|
188
221
|
| `TabComponent` | `FC<TabbedChipProps<T>>` | No | `-` | - |
|
|
189
222
|
| `TabsActiveIndicatorComponent` | `TabsActiveIndicatorComponent` | No | `-` | - |
|
|
223
|
+
| `autoScrollOffset` | `number` | No | `50` | X position offset when auto-scrolling to active tab (to avoid active tab being covered by the paddle on the left side, default: 50px) |
|
|
190
224
|
| `background` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - |
|
|
191
225
|
| `classNames` | `{ root?: string; scrollContainer?: string \| undefined; tabs?: string \| undefined; } \| undefined` | No | `-` | - |
|
|
192
226
|
| `compact` | `boolean` | No | `false` | Turn on to use a compact Chip component for each tab. |
|
|
@@ -40,9 +40,9 @@ import { TableBody } from '@coinbase/cds-web/tables/TableBody'
|
|
|
40
40
|
<TableRow>
|
|
41
41
|
<TableCell height={320} alignItems="center" justifyContent="center">
|
|
42
42
|
<Spinner size={4} color="primary" />
|
|
43
|
-
<
|
|
43
|
+
<Text as="p" font="headline" spacingTop={2} color="foregroundMuted">
|
|
44
44
|
Loading content...
|
|
45
|
-
</
|
|
45
|
+
</Text>
|
|
46
46
|
</TableCell>
|
|
47
47
|
</TableRow>
|
|
48
48
|
</TableBody>
|
|
@@ -36,9 +36,9 @@ import { TableCaption } from '@coinbase/cds-web/tables/TableCaption'
|
|
|
36
36
|
<Table bordered>
|
|
37
37
|
<TableCaption>
|
|
38
38
|
<VStack gap={1}>
|
|
39
|
-
<
|
|
39
|
+
<Text as="h2" font="title2" color="primary">
|
|
40
40
|
Project Team
|
|
41
|
-
</
|
|
41
|
+
</Text>
|
|
42
42
|
<Text as="p" color="foregroundMuted">
|
|
43
43
|
Updated as of March 2024
|
|
44
44
|
</Text>
|
|
@@ -18,9 +18,9 @@ import { TableCell } from '@coinbase/cds-web/tables/TableCell'
|
|
|
18
18
|
<TableRow backgroundColor="bgAlternate">
|
|
19
19
|
<TableCell title="First Header" />
|
|
20
20
|
<TableCell>
|
|
21
|
-
<
|
|
21
|
+
<Text as="p" font="headline" color="currentColor">
|
|
22
22
|
Second Header
|
|
23
|
-
</
|
|
23
|
+
</Text>
|
|
24
24
|
</TableCell>
|
|
25
25
|
<TableCell title="Third Header" />
|
|
26
26
|
</TableRow>
|
|
@@ -47,12 +47,12 @@ import { TableCell } from '@coinbase/cds-web/tables/TableCell'
|
|
|
47
47
|
subtitle="0.11882557"
|
|
48
48
|
/>
|
|
49
49
|
<TableCell>
|
|
50
|
-
<
|
|
50
|
+
<Text as="h2" font="headline" color="currentColor">
|
|
51
51
|
$2,221.01
|
|
52
|
-
</
|
|
53
|
-
<
|
|
52
|
+
</Text>
|
|
53
|
+
<Text as="p" font="label2" color="foregroundMuted">
|
|
54
54
|
0.1519581 BTC
|
|
55
|
-
</
|
|
55
|
+
</Text>
|
|
56
56
|
</TableCell>
|
|
57
57
|
</TableRow>
|
|
58
58
|
</TableBody>
|
|
@@ -110,10 +110,14 @@ You can control the visual prominence of the Tag using the `emphasis` prop. By d
|
|
|
110
110
|
<HStack justifyContent="space-between" gap="2" alignItems="center">
|
|
111
111
|
<VStack gap={0.5}>
|
|
112
112
|
<HStack gap={1}>
|
|
113
|
-
<
|
|
113
|
+
<Text as="p" font="headline">
|
|
114
|
+
Tax account status
|
|
115
|
+
</Text>
|
|
114
116
|
<Tag colorScheme="red">Not verified</Tag>
|
|
115
117
|
</HStack>
|
|
116
|
-
<
|
|
118
|
+
<Text as="p" font="body">
|
|
119
|
+
Verify your info for tax reporting purposes.
|
|
120
|
+
</Text>
|
|
117
121
|
</VStack>
|
|
118
122
|
<Button>Get started</Button>
|
|
119
123
|
</HStack>
|
|
@@ -125,9 +129,9 @@ You can control the visual prominence of the Tag using the `emphasis` prop. By d
|
|
|
125
129
|
function MarginExample() {
|
|
126
130
|
const renderStartLabelNum = useCallback((num, disabled) => {
|
|
127
131
|
return (
|
|
128
|
-
<
|
|
132
|
+
<Text disabled={disabled} as="span" font="title3">
|
|
129
133
|
${num.toLocaleString()} (10%)
|
|
130
|
-
</
|
|
134
|
+
</Text>
|
|
131
135
|
);
|
|
132
136
|
}, []);
|
|
133
137
|
|
|
@@ -149,12 +153,14 @@ function MarginExample() {
|
|
|
149
153
|
>
|
|
150
154
|
<VStack gap={0.5}>
|
|
151
155
|
<HStack gap={1}>
|
|
152
|
-
<
|
|
156
|
+
<Text as="p" font="headline">
|
|
157
|
+
Margin ratio
|
|
158
|
+
</Text>
|
|
153
159
|
<Tag colorScheme="green">Low</Tag>
|
|
154
160
|
</HStack>
|
|
155
|
-
<
|
|
161
|
+
<Text as="p" font="body">
|
|
156
162
|
The portion of your balance being held on margin is low. No action is required.
|
|
157
|
-
</
|
|
163
|
+
</Text>
|
|
158
164
|
</VStack>
|
|
159
165
|
<ProgressBarWithFixedLabels
|
|
160
166
|
startLabel={{ value: 400, render: renderStartLabelNum }}
|
|
@@ -176,10 +182,14 @@ function MarginExample() {
|
|
|
176
182
|
>
|
|
177
183
|
<VStack gap={0.5}>
|
|
178
184
|
<HStack gap={1}>
|
|
179
|
-
<
|
|
185
|
+
<Text as="p" font="headline">
|
|
186
|
+
Margin ratio
|
|
187
|
+
</Text>
|
|
180
188
|
<Tag colorScheme="red">high</Tag>
|
|
181
189
|
</HStack>
|
|
182
|
-
<
|
|
190
|
+
<Text as="p" font="body">
|
|
191
|
+
Margin usage is high. Deposit funds to avoid liquidation
|
|
192
|
+
</Text>
|
|
183
193
|
</VStack>
|
|
184
194
|
<ProgressBarWithFixedLabels
|
|
185
195
|
startLabel={{ value: 60000, render: renderStartLabelNum }}
|
|
@@ -126,7 +126,9 @@ with a TypeAhead component.
|
|
|
126
126
|
```jsx live
|
|
127
127
|
<VStack gap={3}>
|
|
128
128
|
<VStack>
|
|
129
|
-
<
|
|
129
|
+
<Text as="p" font="headline">
|
|
130
|
+
Default sentiment
|
|
131
|
+
</Text>
|
|
130
132
|
<TextInput
|
|
131
133
|
label="Campaign title"
|
|
132
134
|
placeholder="Title"
|
|
@@ -135,7 +137,9 @@ with a TypeAhead component.
|
|
|
135
137
|
</VStack>
|
|
136
138
|
|
|
137
139
|
<VStack>
|
|
138
|
-
<
|
|
140
|
+
<Text as="p" font="headline">
|
|
141
|
+
Positive sentiment
|
|
142
|
+
</Text>
|
|
139
143
|
<TextInput
|
|
140
144
|
label="Address"
|
|
141
145
|
helperText="Valid BTC address"
|
|
@@ -146,7 +150,9 @@ with a TypeAhead component.
|
|
|
146
150
|
</VStack>
|
|
147
151
|
|
|
148
152
|
<VStack>
|
|
149
|
-
<
|
|
153
|
+
<Text as="p" font="headline">
|
|
154
|
+
Negative Sentiment
|
|
155
|
+
</Text>
|
|
150
156
|
<TextInput
|
|
151
157
|
label="Address"
|
|
152
158
|
helperText="Invalid BTC address"
|
|
@@ -271,7 +271,8 @@ Note: The Tray component is an elevated container that is pinned to the bottom o
|
|
|
271
271
|
| `closeAccessibilityHint` | `string` | No | `-` | Sets an accessible hint or description for the close button. On web, maps to aria-describedby and lists the id(s) of the element(s) that describe the element on which the attribute is set. On mobile, a string that helps users understand what will happen when they perform an action on the accessibility element when that result is not clear from the accessibility label. |
|
|
272
272
|
| `closeAccessibilityLabel` | `string` | No | `-` | Sets an accessible label for the close button. On web, maps to aria-label and defines a string value that labels an interactive element. On mobile, VoiceOver will read this string when a user selects the associated element. |
|
|
273
273
|
| `focusTabIndexElements` | `boolean` | No | `false` | Allow any element with tabIndex attribute to be focusable in FocusTrap, rather than only focusing specific interactive element types like button. This can be useful when having long content in a Modal. |
|
|
274
|
-
| `footer` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` |
|
|
274
|
+
| `footer` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | ReactNode to render as the Drawer footer |
|
|
275
|
+
| `header` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | ReactNode to render as the Drawer header |
|
|
275
276
|
| `id` | `string` | No | `-` | HTML ID for the tray |
|
|
276
277
|
| `key` | `Key \| null` | No | `-` | - |
|
|
277
278
|
| `onBlur` | `(() => void)` | No | `-` | Callback fired when the overlay is pressed, or swipe to close |
|
|
@@ -98,14 +98,14 @@ function Example() {
|
|
|
98
98
|
<UpsellCard
|
|
99
99
|
{...card}
|
|
100
100
|
title={
|
|
101
|
-
<
|
|
101
|
+
<Text color="fgInverse" as="h3" font="headline">
|
|
102
102
|
{card.title}
|
|
103
|
-
</
|
|
103
|
+
</Text>
|
|
104
104
|
}
|
|
105
105
|
description={
|
|
106
|
-
<
|
|
106
|
+
<Text as="p" font="label2" numberOfLines={3} color="fgInverse">
|
|
107
107
|
{card.description}
|
|
108
|
-
</
|
|
108
|
+
</Text>
|
|
109
109
|
}
|
|
110
110
|
/>
|
|
111
111
|
);
|
|
@@ -160,14 +160,14 @@ function Example() {
|
|
|
160
160
|
<UpsellCard
|
|
161
161
|
{...card}
|
|
162
162
|
title={
|
|
163
|
-
<
|
|
163
|
+
<Text color="fgInverse" as="h3" font="headline">
|
|
164
164
|
{card.title}
|
|
165
|
-
</
|
|
165
|
+
</Text>
|
|
166
166
|
}
|
|
167
167
|
description={
|
|
168
|
-
<
|
|
168
|
+
<Text as="p" font="label2" numberOfLines={3} color="fgInverse">
|
|
169
169
|
{card.description}
|
|
170
|
-
</
|
|
170
|
+
</Text>
|
|
171
171
|
}
|
|
172
172
|
/>
|
|
173
173
|
);
|
|
@@ -222,14 +222,14 @@ function Example() {
|
|
|
222
222
|
<UpsellCard
|
|
223
223
|
{...card}
|
|
224
224
|
title={
|
|
225
|
-
<
|
|
225
|
+
<Text color="fgInverse" as="h3" font="headline">
|
|
226
226
|
{card.title}
|
|
227
|
-
</
|
|
227
|
+
</Text>
|
|
228
228
|
}
|
|
229
229
|
description={
|
|
230
|
-
<
|
|
230
|
+
<Text as="p" font="label2" numberOfLines={3} color="fgInverse">
|
|
231
231
|
{card.description}
|
|
232
|
-
</
|
|
232
|
+
</Text>
|
|
233
233
|
}
|
|
234
234
|
/>
|
|
235
235
|
);
|
|
@@ -284,14 +284,14 @@ function Example() {
|
|
|
284
284
|
<UpsellCard
|
|
285
285
|
{...card}
|
|
286
286
|
title={
|
|
287
|
-
<
|
|
287
|
+
<Text color="fgInverse" as="h3" font="headline">
|
|
288
288
|
{card.title}
|
|
289
|
-
</
|
|
289
|
+
</Text>
|
|
290
290
|
}
|
|
291
291
|
description={
|
|
292
|
-
<
|
|
292
|
+
<Text as="p" font="label2" numberOfLines={3} color="fgInverse">
|
|
293
293
|
{card.description}
|
|
294
|
-
</
|
|
294
|
+
</Text>
|
|
295
295
|
}
|
|
296
296
|
/>
|
|
297
297
|
);
|
|
@@ -79,9 +79,9 @@ function Example() {
|
|
|
79
79
|
|
|
80
80
|
return (
|
|
81
81
|
<Box ref={ref} padding={3} background="bgAlternate" borderRadius={300} width="100%">
|
|
82
|
-
<
|
|
82
|
+
<Text font="headline">
|
|
83
83
|
This box is {width}px wide and {height}px tall
|
|
84
|
-
</
|
|
84
|
+
</Text>
|
|
85
85
|
</Box>
|
|
86
86
|
);
|
|
87
87
|
}
|
|
@@ -104,8 +104,8 @@ function Example() {
|
|
|
104
104
|
return (
|
|
105
105
|
<Box ref={ref} padding={3} background="bgAlternate" borderRadius={300} width="100%">
|
|
106
106
|
<VStack gap={2}>
|
|
107
|
-
<
|
|
108
|
-
<
|
|
107
|
+
<Text font="headline">Width: {width}px</Text>
|
|
108
|
+
<Text font="headline">Current breakpoint: {currentBreakpoint || 'none'}</Text>
|
|
109
109
|
</VStack>
|
|
110
110
|
</Box>
|
|
111
111
|
);
|
|
@@ -41,7 +41,11 @@ const hasMounted = useHasMounted();
|
|
|
41
41
|
|
|
42
42
|
// in component render
|
|
43
43
|
{
|
|
44
|
-
hasMounted && isPhone &&
|
|
44
|
+
hasMounted && isPhone && (
|
|
45
|
+
<Text as="h3" font="headline">
|
|
46
|
+
Welcome {username}!
|
|
47
|
+
</Text>
|
|
48
|
+
);
|
|
45
49
|
}
|
|
46
50
|
```
|
|
47
51
|
|
|
@@ -51,7 +55,7 @@ const hasMounted = useHasMounted();
|
|
|
51
55
|
function Example() {
|
|
52
56
|
const hasMounted = useHasMounted();
|
|
53
57
|
|
|
54
|
-
return <
|
|
58
|
+
return <Text font="headline">Component has {hasMounted ? 'mounted' : 'not mounted'}</Text>;
|
|
55
59
|
}
|
|
56
60
|
```
|
|
57
61
|
|
|
@@ -69,7 +73,7 @@ function Example() {
|
|
|
69
73
|
}
|
|
70
74
|
}, [hasMounted]);
|
|
71
75
|
|
|
72
|
-
return <
|
|
76
|
+
return <Text font="headline">{hasMounted ? `Current time: ${currentTime}` : 'Loading...'}</Text>;
|
|
73
77
|
}
|
|
74
78
|
```
|
|
75
79
|
|
|
@@ -47,7 +47,7 @@ function Example() {
|
|
|
47
47
|
|
|
48
48
|
return (
|
|
49
49
|
<Box ref={refs} padding={3} background="bgAlternate" borderRadius={300}>
|
|
50
|
-
<
|
|
50
|
+
<Text font="body">This box uses a merged ref</Text>
|
|
51
51
|
</Box>
|
|
52
52
|
);
|
|
53
53
|
});
|
|
@@ -76,7 +76,7 @@ function Example() {
|
|
|
76
76
|
return (
|
|
77
77
|
<VStack gap={2}>
|
|
78
78
|
<Box ref={mergedRefs} padding={3} background="bgAlternate" borderRadius={300}>
|
|
79
|
-
<
|
|
79
|
+
<Text font="body">This element is referenced by three refs</Text>
|
|
80
80
|
</Box>
|
|
81
81
|
<Button onClick={checkRefs}>Check Refs</Button>
|
|
82
82
|
</VStack>
|
|
@@ -106,9 +106,9 @@ function Example() {
|
|
|
106
106
|
return (
|
|
107
107
|
<VStack gap={2}>
|
|
108
108
|
<Box ref={refs} padding={3} background="bgAlternate" borderRadius={300} width="100%">
|
|
109
|
-
<
|
|
109
|
+
<Text font="body">This box uses both function and object refs</Text>
|
|
110
110
|
</Box>
|
|
111
|
-
<
|
|
111
|
+
<Text font="body">Box width: {elementWidth}px</Text>
|
|
112
112
|
</VStack>
|
|
113
113
|
);
|
|
114
114
|
}
|