@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
|
@@ -58,9 +58,9 @@ function Example() {
|
|
|
58
58
|
{
|
|
59
59
|
title: '#7560',
|
|
60
60
|
description: (
|
|
61
|
-
<
|
|
61
|
+
<Text font="label2" color="fgPositive" numberOfLines={2}>
|
|
62
62
|
↗6.37%
|
|
63
|
-
</
|
|
63
|
+
</Text>
|
|
64
64
|
),
|
|
65
65
|
subtitle: 'Bored Ape',
|
|
66
66
|
onPress: NoopFn,
|
|
@@ -76,9 +76,9 @@ function Example() {
|
|
|
76
76
|
{
|
|
77
77
|
title: '#2015',
|
|
78
78
|
description: (
|
|
79
|
-
<
|
|
79
|
+
<Text font="label2" color="fgNegative" numberOfLines={2}>
|
|
80
80
|
↘6.37%
|
|
81
|
-
</
|
|
81
|
+
</Text>
|
|
82
82
|
),
|
|
83
83
|
subtitle: 'Pudgy Penguins',
|
|
84
84
|
onPress: NoopFn,
|
|
@@ -115,9 +115,9 @@ function Example() {
|
|
|
115
115
|
{
|
|
116
116
|
title: 'Parallel',
|
|
117
117
|
description: (
|
|
118
|
-
<
|
|
118
|
+
<Text font="label2" color="fgMuted" numberOfLines={2}>
|
|
119
119
|
★4.5
|
|
120
|
-
</
|
|
120
|
+
</Text>
|
|
121
121
|
),
|
|
122
122
|
onPress: NoopFn,
|
|
123
123
|
media: (
|
|
@@ -1314,13 +1314,14 @@ function AssetPriceWithDottedArea() {
|
|
|
1314
1314
|
<SegmentedTab
|
|
1315
1315
|
ref={ref}
|
|
1316
1316
|
label={
|
|
1317
|
-
<
|
|
1317
|
+
<Text
|
|
1318
|
+
font="label1"
|
|
1318
1319
|
style={{
|
|
1319
1320
|
color: isActive ? assets.btc.color : undefined,
|
|
1320
1321
|
}}
|
|
1321
1322
|
>
|
|
1322
1323
|
{label}
|
|
1323
|
-
</
|
|
1324
|
+
</Text>
|
|
1324
1325
|
}
|
|
1325
1326
|
{...props}
|
|
1326
1327
|
/>
|
|
@@ -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
|
-
<
|
|
218
|
+
<Text as="span" font="body" color="foregroundMuted">
|
|
219
219
|
OR
|
|
220
|
-
</
|
|
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
|
-
<
|
|
238
|
+
<Text as="span" font="label2" color="foregroundMuted" paddingTop={1}>
|
|
239
239
|
{name}
|
|
240
|
-
</
|
|
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
|
-
<
|
|
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
|
-
</
|
|
260
|
+
</Text>
|
|
261
261
|
}
|
|
262
262
|
accessibilityLabel="Login section"
|
|
263
263
|
pictogram={<LogoMark size={32} />}
|
|
@@ -154,7 +154,7 @@ const TransactionalNumpadExample = () => {
|
|
|
154
154
|
title="Invalid Input"
|
|
155
155
|
variant="warning"
|
|
156
156
|
>
|
|
157
|
-
<Text>Enter an amount greater than zero.</
|
|
157
|
+
<Text>Enter an amount greater than zero.</Text>
|
|
158
158
|
</Banner>
|
|
159
159
|
);
|
|
160
160
|
if (parseFloat(value) >= VALUE_MAX) {
|
|
@@ -167,7 +167,7 @@ const TransactionalNumpadExample = () => {
|
|
|
167
167
|
title="You've reached the maximum value"
|
|
168
168
|
variant="warning"
|
|
169
169
|
>
|
|
170
|
-
<Text>Max ${VALUE_MAX}</
|
|
170
|
+
<Text>Max ${VALUE_MAX}</Text>
|
|
171
171
|
</Banner>
|
|
172
172
|
);
|
|
173
173
|
}
|
|
@@ -79,7 +79,9 @@ function Example() {
|
|
|
79
79
|
title="Page Title"
|
|
80
80
|
/>
|
|
81
81
|
<Box padding={3}>
|
|
82
|
-
<
|
|
82
|
+
<Text font="body">
|
|
83
|
+
Content below with padding 3 to align visually with the header actions.
|
|
84
|
+
</Text>
|
|
83
85
|
</Box>
|
|
84
86
|
</>
|
|
85
87
|
);
|
|
@@ -174,9 +174,9 @@ function ColoredBTCExample() {
|
|
|
174
174
|
|
|
175
175
|
const wrappedLabel =
|
|
176
176
|
typeof label === 'string' ? (
|
|
177
|
-
<
|
|
177
|
+
<Text font="label1" dangerouslySetColor={isActive ? btcColor : theme.color.fg}>
|
|
178
178
|
{label}
|
|
179
|
-
</
|
|
179
|
+
</Text>
|
|
180
180
|
) : (
|
|
181
181
|
label
|
|
182
182
|
);
|
|
@@ -274,9 +274,9 @@ function ColoredExcludingLiveExample() {
|
|
|
274
274
|
|
|
275
275
|
const wrappedLabel =
|
|
276
276
|
typeof label === 'string' ? (
|
|
277
|
-
<
|
|
277
|
+
<Text font="label1" dangerouslySetColor={isActive ? btcColor : theme.color.fg}>
|
|
278
278
|
{label}
|
|
279
|
-
</
|
|
279
|
+
</Text>
|
|
280
280
|
) : (
|
|
281
281
|
label
|
|
282
282
|
);
|
|
@@ -23,7 +23,9 @@ Pressables support an `onPress` prop for handling click/press interactions. When
|
|
|
23
23
|
borderRadius={300}
|
|
24
24
|
>
|
|
25
25
|
<Box as="span" padding={2}>
|
|
26
|
-
<
|
|
26
|
+
<Text as="span" font="headline">
|
|
27
|
+
Click me...
|
|
28
|
+
</Text>
|
|
27
29
|
</Box>
|
|
28
30
|
</Pressable>
|
|
29
31
|
```
|
|
@@ -61,7 +63,9 @@ Pressables support an `onPress` prop for handling click/press interactions. When
|
|
|
61
63
|
borderRadius={300}
|
|
62
64
|
>
|
|
63
65
|
<Box as="span" padding={2}>
|
|
64
|
-
<
|
|
66
|
+
<Text as="span" font="headline">
|
|
67
|
+
Click me...
|
|
68
|
+
</Text>
|
|
65
69
|
</Box>
|
|
66
70
|
</Pressable>
|
|
67
71
|
```
|
|
@@ -63,17 +63,17 @@ function Example() {
|
|
|
63
63
|
|
|
64
64
|
const renderStartLabelNum = useCallback((num, disabled) => {
|
|
65
65
|
return (
|
|
66
|
-
<
|
|
66
|
+
<Text disabled={disabled} as="span" font="title3">
|
|
67
67
|
${num.toLocaleString()}
|
|
68
|
-
</
|
|
68
|
+
</Text>
|
|
69
69
|
);
|
|
70
70
|
}, []);
|
|
71
71
|
|
|
72
72
|
const renderEndLabelNum = useCallback((num, disabled) => {
|
|
73
73
|
return (
|
|
74
|
-
<
|
|
74
|
+
<Text disabled={disabled} as="span" font="label2" align="end" noWrap>
|
|
75
75
|
${num.toLocaleString()} left
|
|
76
|
-
</
|
|
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
|
-
<
|
|
59
|
+
<Text as="span" font="title3" disabled={disabled}>
|
|
60
60
|
${num.toLocaleString()}
|
|
61
|
-
</
|
|
61
|
+
</Text>
|
|
62
62
|
);
|
|
63
63
|
}, []);
|
|
64
64
|
|
|
@@ -165,7 +165,11 @@ The progress circle can be customized with styles.
|
|
|
165
165
|
stroke: 'transparent',
|
|
166
166
|
},
|
|
167
167
|
}}
|
|
168
|
-
contentNode={
|
|
168
|
+
contentNode={
|
|
169
|
+
<Text font="title1" color="fgPrimary">
|
|
170
|
+
40%
|
|
171
|
+
</Text>
|
|
172
|
+
}
|
|
169
173
|
weight="semiheavy"
|
|
170
174
|
/>
|
|
171
175
|
<ProgressCircle
|
|
@@ -233,9 +233,11 @@ function SelectChipExample() {
|
|
|
233
233
|
| `fontFamily` | `inherit \| FontFamily` | No | `-` | - |
|
|
234
234
|
| `fontSize` | `inherit \| FontSize` | No | `-` | - |
|
|
235
235
|
| `fontWeight` | `inherit \| FontWeight` | No | `-` | - |
|
|
236
|
+
| `footer` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | ReactNode to render as the Tray footer |
|
|
236
237
|
| `gap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
237
238
|
| `handleBarAccessibilityLabel` | `string` | No | `-` | Accessibility label for handlebar |
|
|
238
239
|
| `hardwareAccelerated` | `boolean` | No | `-` | Controls whether to force hardware acceleration for the underlying window. |
|
|
240
|
+
| `header` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | ReactNode to render as the Tray header |
|
|
239
241
|
| `height` | `string \| number` | No | `-` | - |
|
|
240
242
|
| `hideHandleBar` | `boolean` | No | `false` | The HandleBar by default only is used for a bottom pinned drawer. This removes it. |
|
|
241
243
|
| `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. |
|
|
@@ -289,6 +289,91 @@ function ExampleDescriptions() {
|
|
|
289
289
|
}
|
|
290
290
|
```
|
|
291
291
|
|
|
292
|
+
### With display value
|
|
293
|
+
|
|
294
|
+
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.
|
|
295
|
+
|
|
296
|
+
```tsx
|
|
297
|
+
function ExampleDisplayValue() {
|
|
298
|
+
const exampleOptions = [
|
|
299
|
+
{ value: '1', label: 'Option 1' },
|
|
300
|
+
{ value: '2', label: 'Option 2' },
|
|
301
|
+
{ value: '3', label: 'Option 3' },
|
|
302
|
+
{ value: '4', label: 'Option 4' },
|
|
303
|
+
{ value: '5', label: 'Option 5' },
|
|
304
|
+
];
|
|
305
|
+
const { value, onChange } = useMultiSelect({ initialValue: [] });
|
|
306
|
+
const displayValue =
|
|
307
|
+
Array.isArray(value) && value.length > 0
|
|
308
|
+
? `${value.length} ${value.length === 1 ? 'option' : 'options'} selected`
|
|
309
|
+
: undefined;
|
|
310
|
+
return (
|
|
311
|
+
<SelectChip
|
|
312
|
+
accessibilityLabel="Select multiple values"
|
|
313
|
+
displayValue={displayValue}
|
|
314
|
+
onChange={onChange}
|
|
315
|
+
options={exampleOptions}
|
|
316
|
+
placeholder="Choose options"
|
|
317
|
+
type="multi"
|
|
318
|
+
value={value}
|
|
319
|
+
/>
|
|
320
|
+
);
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### With max width
|
|
325
|
+
|
|
326
|
+
```tsx
|
|
327
|
+
function ExampleMaxWidth() {
|
|
328
|
+
const exampleOptions = [
|
|
329
|
+
{ value: '1', label: 'Very Long Option Name That Exceeds Default Width' },
|
|
330
|
+
{ value: '2', label: 'Another Extremely Long Option Label' },
|
|
331
|
+
{ value: '3', label: 'Short' },
|
|
332
|
+
{ value: '4', label: 'Medium Length Option' },
|
|
333
|
+
];
|
|
334
|
+
const [value, setValue] = useState<string | null>(null);
|
|
335
|
+
return (
|
|
336
|
+
<VStack gap={2}>
|
|
337
|
+
<VStack gap={1}>
|
|
338
|
+
<Text>Default maxWidth (200px):</Text>
|
|
339
|
+
<SelectChip
|
|
340
|
+
accessibilityLabel="Select a value"
|
|
341
|
+
label="Select a value"
|
|
342
|
+
onChange={setValue}
|
|
343
|
+
options={exampleOptions}
|
|
344
|
+
placeholder="Choose an option"
|
|
345
|
+
value={value}
|
|
346
|
+
/>
|
|
347
|
+
</VStack>
|
|
348
|
+
<VStack gap={1}>
|
|
349
|
+
<Text>Custom maxWidth (150px):</Text>
|
|
350
|
+
<SelectChip
|
|
351
|
+
accessibilityLabel="Select a value"
|
|
352
|
+
label="Select a value"
|
|
353
|
+
maxWidth={150}
|
|
354
|
+
onChange={setValue}
|
|
355
|
+
options={exampleOptions}
|
|
356
|
+
placeholder="Choose an option"
|
|
357
|
+
value={value}
|
|
358
|
+
/>
|
|
359
|
+
</VStack>
|
|
360
|
+
<VStack gap={1}>
|
|
361
|
+
<Text>No maxWidth constraint:</Text>
|
|
362
|
+
<SelectChip
|
|
363
|
+
accessibilityLabel="Select a value"
|
|
364
|
+
label="Select a value"
|
|
365
|
+
maxWidth="100%"
|
|
366
|
+
onChange={setValue}
|
|
367
|
+
options={exampleOptions}
|
|
368
|
+
placeholder="Choose an option"
|
|
369
|
+
value={value}
|
|
370
|
+
/>
|
|
371
|
+
</VStack>
|
|
372
|
+
</VStack>
|
|
373
|
+
);
|
|
374
|
+
}
|
|
375
|
+
```
|
|
376
|
+
|
|
292
377
|
### Disabled
|
|
293
378
|
|
|
294
379
|
```tsx
|
|
@@ -342,6 +427,7 @@ function ExampleDisabled() {
|
|
|
342
427
|
| `defaultOpen` | `boolean` | No | `-` | Initial open state when component mounts (uncontrolled mode) |
|
|
343
428
|
| `disableClickOutsideClose` | `boolean` | No | `-` | Whether clicking outside the dropdown should close it |
|
|
344
429
|
| `disabled` | `boolean` | No | `false` | Toggles input interactability and opacity |
|
|
430
|
+
| `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. |
|
|
345
431
|
| `emptyOptionsLabel` | `string` | No | `-` | Label displayed when there are no options available |
|
|
346
432
|
| `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. |
|
|
347
433
|
| `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 |
|
|
@@ -350,6 +436,7 @@ function ExampleDisabled() {
|
|
|
350
436
|
| `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. |
|
|
351
437
|
| `label` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Label displayed above the control |
|
|
352
438
|
| `maxSelectedOptionsToShow` | `number` | No | `-` | Maximum number of selected options to show before truncating |
|
|
439
|
+
| `maxWidth` | `string \| number` | No | `200` | If text content overflows, it will get truncated with an ellipsis. |
|
|
353
440
|
| `media` | `ReactElement` | No | `-` | Media rendered at the start of the cell (icon, avatar, image, etc). |
|
|
354
441
|
| `numberOfLines` | `number` | No | `1` | How many lines the text in the chip will be broken into. |
|
|
355
442
|
| `open` | `boolean` | No | `-` | Controlled open state of the dropdown |
|
|
@@ -362,6 +449,6 @@ function ExampleDisabled() {
|
|
|
362
449
|
| `style` | `null \| false \| ViewStyle \| RegisteredStyle<ViewStyle> \| RecursiveArray<ViewStyle \| Falsy \| RegisteredStyle<ViewStyle>>` | No | `-` | Inline styles for the root element |
|
|
363
450
|
| `styles` | `{ root?: StyleProp<ViewStyle>; control?: StyleProp<ViewStyle>; controlStartNode?: StyleProp<ViewStyle>; controlInputNode?: StyleProp<ViewStyle>; controlValueNode?: StyleProp<ViewStyle>; controlLabelNode?: StyleProp<ViewStyle>; controlHelperTextNode?: StyleProp<ViewStyle>; controlEndNode?: StyleProp<ViewStyle>; controlBlendStyles?: InteractableBlendStyles; dropdown?: StyleProp<ViewStyle>; option?: StyleProp<ViewStyle>; optionCell?: StyleProp<ViewStyle>; optionContent?: StyleProp<ViewStyle>; optionLabel?: StyleProp<ViewStyle>; optionDescription?: StyleProp<ViewStyle>; optionBlendStyles?: InteractableBlendStyles \| undefined; selectAllDivider?: StyleProp<ViewStyle>; emptyContentsContainer?: StyleProp<ViewStyle>; emptyContentsText?: StyleProp<ViewStyle>; optionGroup?: StyleProp<ViewStyle>; } \| undefined` | No | `-` | Custom styles for different parts of the select |
|
|
364
451
|
| `testID` | `string` | No | `-` | Test ID for the root element |
|
|
365
|
-
| `type` | `
|
|
452
|
+
| `type` | `multi \| single` | No | `-` | Whether the select allows single or multiple selections |
|
|
366
453
|
|
|
367
454
|
|
|
@@ -164,7 +164,7 @@ function Example() {
|
|
|
164
164
|
>
|
|
165
165
|
<HStack alignItems="center" height="100%" justifyContent="center" width="100%">
|
|
166
166
|
<HStack height="100%" pin="right" alignItems="center" padding={2}>
|
|
167
|
-
<
|
|
167
|
+
<Text font="label1">➡️</Text>
|
|
168
168
|
</HStack>
|
|
169
169
|
</HStack>
|
|
170
170
|
</Pressable>
|
|
@@ -182,7 +182,7 @@ function Example() {
|
|
|
182
182
|
justifyContent="center"
|
|
183
183
|
width="100%"
|
|
184
184
|
>
|
|
185
|
-
<
|
|
185
|
+
<Text font="headline">Slide me</Text>
|
|
186
186
|
</HStack>
|
|
187
187
|
);
|
|
188
188
|
|
|
@@ -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}
|
|
@@ -51,7 +51,9 @@ The fill will be added by default
|
|
|
51
51
|
labelNode={
|
|
52
52
|
<HStack gap={1} alignItems="center" paddingBottom={0}>
|
|
53
53
|
<Icon active name="wallet" size="s" />
|
|
54
|
-
<
|
|
54
|
+
<Text as="span" font="title3">
|
|
55
|
+
CustomHeader
|
|
56
|
+
</Text>
|
|
55
57
|
</HStack>
|
|
56
58
|
}
|
|
57
59
|
/>
|
|
@@ -36,7 +36,9 @@ function TabbedChipsExample() {
|
|
|
36
36
|
return (
|
|
37
37
|
<VStack maxWidth={375} borderRadius={400} bordered paddingX={2} gap={2} paddingY={2}>
|
|
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
|
<TabbedChips value={value} onChange={setValue} tabs={tabs} />
|
|
@@ -57,6 +57,35 @@ function ExampleManyTabs() {
|
|
|
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 overflow gradient on the left side. Try clicking tabs near the edges to see the difference.
|
|
64
|
+
:::
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
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>Default offset (30px)</Text>
|
|
76
|
+
<TabbedChips activeTab={activeTab} onChange={setActiveTab} tabs={tabs} />
|
|
77
|
+
<Text>Custom offset (60px)</Text>
|
|
78
|
+
<TabbedChips
|
|
79
|
+
activeTab={activeTab}
|
|
80
|
+
onChange={setActiveTab}
|
|
81
|
+
tabs={tabs}
|
|
82
|
+
autoScrollOffset={60}
|
|
83
|
+
/>
|
|
84
|
+
</VStack>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
60
89
|
### Long text tabs
|
|
61
90
|
|
|
62
91
|
```tsx
|
|
@@ -163,6 +192,7 @@ render(<Example />);
|
|
|
163
192
|
| `tabs` | `TabbedChipProps<T>[]` | Yes | `-` | - |
|
|
164
193
|
| `TabComponent` | `FC<TabbedChipProps<T>>` | No | `-` | - |
|
|
165
194
|
| `TabsActiveIndicatorComponent` | `TabsActiveIndicatorComponent` | No | `-` | - |
|
|
195
|
+
| `autoScrollOffset` | `number` | No | `30` | X position offset when auto-scrolling to active tab (to avoid active tab being covered by the overflow gradient on the left side, default: 30px) |
|
|
166
196
|
| `compact` | `boolean` | No | `false` | Turn on to use a compact Chip component for each tab. |
|
|
167
197
|
| `disabled` | `boolean` | No | `-` | Disable interactions on all the tabs. |
|
|
168
198
|
| `gap` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `1` | The spacing between Tabs |
|
|
@@ -52,10 +52,14 @@ You can control the visual prominence of the Tag using the `emphasis` prop. By d
|
|
|
52
52
|
<HStack justifyContent="space-between" gap="2" alignItems="center">
|
|
53
53
|
<VStack gap={0.5}>
|
|
54
54
|
<HStack gap={1}>
|
|
55
|
-
<
|
|
55
|
+
<Text as="p" font="headline">
|
|
56
|
+
Tax account status
|
|
57
|
+
</Text>
|
|
56
58
|
<Tag colorScheme="red">Not verified</Tag>
|
|
57
59
|
</HStack>
|
|
58
|
-
<
|
|
60
|
+
<Text as="p" font="body">
|
|
61
|
+
Verify your info for tax reporting purposes.
|
|
62
|
+
</Text>
|
|
59
63
|
</VStack>
|
|
60
64
|
<Button>Get started</Button>
|
|
61
65
|
</HStack>
|
|
@@ -67,9 +71,9 @@ You can control the visual prominence of the Tag using the `emphasis` prop. By d
|
|
|
67
71
|
function MarginExample() {
|
|
68
72
|
const renderStartLabelNum = useCallback((num, disabled) => {
|
|
69
73
|
return (
|
|
70
|
-
<
|
|
74
|
+
<Text disabled={disabled} as="span" font="title3">
|
|
71
75
|
${num.toLocaleString()} (10%)
|
|
72
|
-
</
|
|
76
|
+
</Text>
|
|
73
77
|
);
|
|
74
78
|
}, []);
|
|
75
79
|
|
|
@@ -91,12 +95,14 @@ function MarginExample() {
|
|
|
91
95
|
>
|
|
92
96
|
<VStack gap={0.5}>
|
|
93
97
|
<HStack gap={1}>
|
|
94
|
-
<
|
|
98
|
+
<Text as="p" font="headline">
|
|
99
|
+
Margin ratio
|
|
100
|
+
</Text>
|
|
95
101
|
<Tag colorScheme="green">Low</Tag>
|
|
96
102
|
</HStack>
|
|
97
|
-
<
|
|
103
|
+
<Text as="p" font="body">
|
|
98
104
|
The portion of your balance being held on margin is low. No action is required.
|
|
99
|
-
</
|
|
105
|
+
</Text>
|
|
100
106
|
</VStack>
|
|
101
107
|
<ProgressBarWithFixedLabels
|
|
102
108
|
startLabel={{ value: 400, render: renderStartLabelNum }}
|
|
@@ -118,10 +124,14 @@ function MarginExample() {
|
|
|
118
124
|
>
|
|
119
125
|
<VStack gap={0.5}>
|
|
120
126
|
<HStack gap={1}>
|
|
121
|
-
<
|
|
127
|
+
<Text as="p" font="headline">
|
|
128
|
+
Margin ratio
|
|
129
|
+
</Text>
|
|
122
130
|
<Tag colorScheme="red">high</Tag>
|
|
123
131
|
</HStack>
|
|
124
|
-
<
|
|
132
|
+
<Text as="p" font="body">
|
|
133
|
+
Margin usage is high. Deposit funds to avoid liquidation
|
|
134
|
+
</Text>
|
|
125
135
|
</VStack>
|
|
126
136
|
<ProgressBarWithFixedLabels
|
|
127
137
|
startLabel={{ value: 60000, render: renderStartLabelNum }}
|
|
@@ -126,7 +126,9 @@ with a TypeAhead component.
|
|
|
126
126
|
```jsx
|
|
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"
|
|
@@ -215,8 +215,10 @@ Note: The Tray component is built on top of the Drawer component and provides a
|
|
|
215
215
|
| `animated` | `boolean` | No | `-` | - |
|
|
216
216
|
| `animationType` | `none \| slide \| fade` | No | `-` | The animationType prop controls how the modal animates. - slide slides in from the bottom - fade fades into view - none appears without an animation |
|
|
217
217
|
| `disableCapturePanGestureToDismiss` | `boolean` | No | `false` | Prevents the Drawer from capturing pan gestures on children. Set to true when using a ScrollView as a child |
|
|
218
|
+
| `footer` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | ReactNode to render as the Tray footer |
|
|
218
219
|
| `handleBarAccessibilityLabel` | `string` | No | `-` | Accessibility label for handlebar |
|
|
219
220
|
| `hardwareAccelerated` | `boolean` | No | `-` | Controls whether to force hardware acceleration for the underlying window. |
|
|
221
|
+
| `header` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | ReactNode to render as the Tray header |
|
|
220
222
|
| `hideHandleBar` | `boolean` | No | `false` | The HandleBar by default only is used for a bottom pinned drawer. This removes it. |
|
|
221
223
|
| `key` | `Key \| null` | No | `-` | - |
|
|
222
224
|
| `onBlur` | `(() => void)` | No | `-` | Callback fired when the overlay is pressed, or swipe to close |
|
|
@@ -100,14 +100,14 @@ function Example() {
|
|
|
100
100
|
<UpsellCard
|
|
101
101
|
{...card}
|
|
102
102
|
title={
|
|
103
|
-
<
|
|
103
|
+
<Text color="fgInverse" as="h3" font="headline">
|
|
104
104
|
{card.title}
|
|
105
|
-
</
|
|
105
|
+
</Text>
|
|
106
106
|
}
|
|
107
107
|
description={
|
|
108
|
-
<
|
|
108
|
+
<Text as="p" font="label2" numberOfLines={3} color="fgInverse">
|
|
109
109
|
{card.description}
|
|
110
|
-
</
|
|
110
|
+
</Text>
|
|
111
111
|
}
|
|
112
112
|
/>
|
|
113
113
|
);
|
|
@@ -162,14 +162,14 @@ function Example() {
|
|
|
162
162
|
<UpsellCard
|
|
163
163
|
{...card}
|
|
164
164
|
title={
|
|
165
|
-
<
|
|
165
|
+
<Text color="fgInverse" as="h3" font="headline">
|
|
166
166
|
{card.title}
|
|
167
|
-
</
|
|
167
|
+
</Text>
|
|
168
168
|
}
|
|
169
169
|
description={
|
|
170
|
-
<
|
|
170
|
+
<Text as="p" font="label2" numberOfLines={3} color="fgInverse">
|
|
171
171
|
{card.description}
|
|
172
|
-
</
|
|
172
|
+
</Text>
|
|
173
173
|
}
|
|
174
174
|
/>
|
|
175
175
|
);
|
|
@@ -224,14 +224,14 @@ function Example() {
|
|
|
224
224
|
<UpsellCard
|
|
225
225
|
{...card}
|
|
226
226
|
title={
|
|
227
|
-
<
|
|
227
|
+
<Text color="fgInverse" as="h3" font="headline">
|
|
228
228
|
{card.title}
|
|
229
|
-
</
|
|
229
|
+
</Text>
|
|
230
230
|
}
|
|
231
231
|
description={
|
|
232
|
-
<
|
|
232
|
+
<Text as="p" font="label2" numberOfLines={3} color="fgInverse">
|
|
233
233
|
{card.description}
|
|
234
|
-
</
|
|
234
|
+
</Text>
|
|
235
235
|
}
|
|
236
236
|
/>
|
|
237
237
|
);
|
|
@@ -286,14 +286,14 @@ function Example() {
|
|
|
286
286
|
<UpsellCard
|
|
287
287
|
{...card}
|
|
288
288
|
title={
|
|
289
|
-
<
|
|
289
|
+
<Text color="fgInverse" as="h3" font="headline">
|
|
290
290
|
{card.title}
|
|
291
|
-
</
|
|
291
|
+
</Text>
|
|
292
292
|
}
|
|
293
293
|
description={
|
|
294
|
-
<
|
|
294
|
+
<Text as="p" font="label2" numberOfLines={3} color="fgInverse">
|
|
295
295
|
{card.description}
|
|
296
|
-
</
|
|
296
|
+
</Text>
|
|
297
297
|
}
|
|
298
298
|
/>
|
|
299
299
|
);
|