@coinbase/cds-mcp-server 8.17.3 → 8.17.4
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/mobile/components/Accordion.txt +11 -12
- package/mcp-docs/mobile/components/AccordionItem.txt +5 -6
- package/mcp-docs/mobile/components/Alert.txt +21 -22
- package/mcp-docs/mobile/components/AreaChart.txt +118 -119
- package/mcp-docs/mobile/components/Avatar.txt +82 -83
- package/mcp-docs/mobile/components/AvatarButton.txt +103 -104
- package/mcp-docs/mobile/components/Banner.txt +100 -101
- package/mcp-docs/mobile/components/BarChart.txt +120 -121
- package/mcp-docs/mobile/components/Box.txt +65 -66
- package/mcp-docs/mobile/components/BrowserBar.txt +38 -39
- package/mcp-docs/mobile/components/Button.txt +78 -79
- package/mcp-docs/mobile/components/ButtonGroup.txt +10 -11
- package/mcp-docs/mobile/components/Carousel.txt +103 -104
- package/mcp-docs/mobile/components/CartesianChart.txt +107 -108
- package/mcp-docs/mobile/components/CellMedia.txt +15 -16
- package/mcp-docs/mobile/components/Checkbox.txt +35 -36
- package/mcp-docs/mobile/components/CheckboxCell.txt +73 -74
- package/mcp-docs/mobile/components/CheckboxGroup.txt +24 -25
- package/mcp-docs/mobile/components/Chip.txt +67 -68
- package/mcp-docs/mobile/components/Coachmark.txt +42 -43
- package/mcp-docs/mobile/components/Collapsible.txt +15 -16
- package/mcp-docs/mobile/components/ContainedAssetCard.txt +16 -17
- package/mcp-docs/mobile/components/ContentCard.txt +99 -100
- package/mcp-docs/mobile/components/ContentCardBody.txt +23 -24
- package/mcp-docs/mobile/components/ContentCardFooter.txt +19 -20
- package/mcp-docs/mobile/components/ContentCardHeader.txt +33 -34
- package/mcp-docs/mobile/components/ContentCell.txt +102 -103
- package/mcp-docs/mobile/components/ControlGroup.txt +106 -107
- package/mcp-docs/mobile/components/DatePicker.txt +121 -122
- package/mcp-docs/mobile/components/Divider.txt +31 -32
- package/mcp-docs/mobile/components/DotCount.txt +15 -16
- package/mcp-docs/mobile/components/DotStatusColor.txt +12 -13
- package/mcp-docs/mobile/components/DotSymbol.txt +21 -22
- package/mcp-docs/mobile/components/Fallback.txt +49 -50
- package/mcp-docs/mobile/components/FloatingAssetCard.txt +13 -14
- package/mcp-docs/mobile/components/HStack.txt +99 -100
- package/mcp-docs/mobile/components/HeroSquare.txt +11 -12
- package/mcp-docs/mobile/components/Icon.txt +16 -17
- package/mcp-docs/mobile/components/IconButton.txt +104 -105
- package/mcp-docs/mobile/components/InputChip.txt +62 -63
- package/mcp-docs/mobile/components/Interactable.txt +72 -73
- package/mcp-docs/mobile/components/LineChart.txt +117 -118
- package/mcp-docs/mobile/components/Link.txt +113 -114
- package/mcp-docs/mobile/components/ListCell.txt +149 -128
- package/mcp-docs/mobile/components/LogoMark.txt +8 -9
- package/mcp-docs/mobile/components/LogoWordMark.txt +7 -8
- package/mcp-docs/mobile/components/Lottie.txt +39 -40
- package/mcp-docs/mobile/components/LottieStatusAnimation.txt +11 -12
- package/mcp-docs/mobile/components/Modal.txt +36 -37
- package/mcp-docs/mobile/components/ModalBody.txt +5 -6
- package/mcp-docs/mobile/components/ModalFooter.txt +5 -6
- package/mcp-docs/mobile/components/ModalHeader.txt +5 -6
- package/mcp-docs/mobile/components/MultiContentModule.txt +107 -108
- package/mcp-docs/mobile/components/NavigationTitle.txt +13 -14
- package/mcp-docs/mobile/components/NavigationTitleSelect.txt +20 -21
- package/mcp-docs/mobile/components/NudgeCard.txt +20 -21
- package/mcp-docs/mobile/components/Numpad.txt +108 -109
- package/mcp-docs/mobile/components/Overlay.txt +45 -46
- package/mcp-docs/mobile/components/PageFooter.txt +57 -58
- package/mcp-docs/mobile/components/PageHeader.txt +79 -80
- package/mcp-docs/mobile/components/PeriodSelector.txt +98 -99
- package/mcp-docs/mobile/components/Pictogram.txt +11 -12
- package/mcp-docs/mobile/components/Point.txt +21 -22
- package/mcp-docs/mobile/components/PortalProvider.txt +7 -8
- package/mcp-docs/mobile/components/Pressable.txt +67 -68
- package/mcp-docs/mobile/components/ProgressBar.txt +18 -19
- package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +13 -14
- package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +13 -14
- package/mcp-docs/mobile/components/ProgressCircle.txt +22 -23
- package/mcp-docs/mobile/components/Radio.txt +35 -36
- package/mcp-docs/mobile/components/RadioCell.txt +73 -74
- package/mcp-docs/mobile/components/RadioGroup.txt +35 -36
- package/mcp-docs/mobile/components/ReferenceLine.txt +15 -16
- package/mcp-docs/mobile/components/RemoteImage.txt +47 -48
- package/mcp-docs/mobile/components/RemoteImageGroup.txt +11 -12
- package/mcp-docs/mobile/components/RollingNumber.txt +130 -131
- package/mcp-docs/mobile/components/Scrubber.txt +19 -20
- package/mcp-docs/mobile/components/SearchInput.txt +77 -78
- package/mcp-docs/mobile/components/SectionHeader.txt +16 -17
- package/mcp-docs/mobile/components/SegmentedTabs.txt +105 -106
- package/mcp-docs/mobile/components/Select.txt +35 -36
- package/mcp-docs/mobile/components/SelectChip.txt +143 -144
- package/mcp-docs/mobile/components/SelectOption.txt +26 -27
- package/mcp-docs/mobile/components/SlideButton.txt +128 -129
- package/mcp-docs/mobile/components/Spacer.txt +27 -28
- package/mcp-docs/mobile/components/Sparkline.txt +18 -19
- package/mcp-docs/mobile/components/SparklineGradient.txt +18 -19
- package/mcp-docs/mobile/components/SparklineInteractive.txt +37 -38
- package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +12 -13
- package/mcp-docs/mobile/components/Spinner.txt +15 -16
- package/mcp-docs/mobile/components/SpotIcon.txt +11 -12
- package/mcp-docs/mobile/components/SpotRectangle.txt +11 -12
- package/mcp-docs/mobile/components/SpotSquare.txt +11 -12
- package/mcp-docs/mobile/components/Stepper.txt +113 -114
- package/mcp-docs/mobile/components/SubBrandLogoMark.txt +8 -9
- package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +8 -9
- package/mcp-docs/mobile/components/Switch.txt +35 -36
- package/mcp-docs/mobile/components/TabIndicator.txt +12 -13
- package/mcp-docs/mobile/components/TabLabel.txt +28 -29
- package/mcp-docs/mobile/components/TabNavigation.txt +41 -42
- package/mcp-docs/mobile/components/TabbedChips.txt +38 -39
- package/mcp-docs/mobile/components/Tabs.txt +76 -77
- package/mcp-docs/mobile/components/Tag.txt +102 -103
- package/mcp-docs/mobile/components/Text.txt +91 -92
- package/mcp-docs/mobile/components/TextInput.txt +107 -108
- package/mcp-docs/mobile/components/ThemeProvider.txt +8 -9
- package/mcp-docs/mobile/components/Toast.txt +82 -83
- package/mcp-docs/mobile/components/Tooltip.txt +20 -21
- package/mcp-docs/mobile/components/TopNavBar.txt +55 -56
- package/mcp-docs/mobile/components/Tour.txt +18 -19
- package/mcp-docs/mobile/components/Tray.txt +43 -44
- package/mcp-docs/mobile/components/UpsellCard.txt +16 -17
- package/mcp-docs/mobile/components/VStack.txt +99 -100
- package/mcp-docs/mobile/components/XAxis.txt +25 -26
- package/mcp-docs/mobile/components/YAxis.txt +26 -27
- package/mcp-docs/mobile/getting-started/{mcp-server.txt → ai-overview.txt} +51 -37
- package/mcp-docs/mobile/getting-started/installation.txt +57 -0
- package/mcp-docs/mobile/getting-started/introduction.txt +3 -0
- package/mcp-docs/mobile/getting-started/playground.txt +3 -0
- package/mcp-docs/mobile/getting-started/styling.txt +84 -0
- package/mcp-docs/mobile/getting-started/theming.txt +286 -0
- package/mcp-docs/mobile/hooks/useDimensions.txt +27 -2
- package/mcp-docs/mobile/hooks/useEventHandler.txt +120 -0
- package/mcp-docs/mobile/hooks/useMergeRefs.txt +116 -0
- package/mcp-docs/mobile/hooks/useOverlayContentContext.txt +67 -2
- package/mcp-docs/mobile/hooks/usePreviousValue.txt +74 -0
- package/mcp-docs/mobile/hooks/useRefMap.txt +178 -0
- package/mcp-docs/mobile/hooks/useTheme.txt +213 -2
- package/mcp-docs/mobile/routes.txt +8 -1
- package/mcp-docs/web/components/Accordion.txt +12 -13
- package/mcp-docs/web/components/AccordionItem.txt +5 -6
- package/mcp-docs/web/components/Alert.txt +24 -25
- package/mcp-docs/web/components/AreaChart.txt +137 -138
- package/mcp-docs/web/components/Avatar.txt +91 -92
- package/mcp-docs/web/components/AvatarButton.txt +113 -114
- package/mcp-docs/web/components/Banner.txt +101 -102
- package/mcp-docs/web/components/BarChart.txt +367 -368
- package/mcp-docs/web/components/Box.txt +65 -66
- package/mcp-docs/web/components/Button.txt +81 -82
- package/mcp-docs/web/components/ButtonGroup.txt +10 -11
- package/mcp-docs/web/components/Calendar.txt +56 -57
- package/mcp-docs/web/components/Carousel.txt +116 -117
- package/mcp-docs/web/components/CartesianChart.txt +357 -358
- package/mcp-docs/web/components/CellMedia.txt +14 -15
- package/mcp-docs/web/components/Checkbox.txt +22 -23
- package/mcp-docs/web/components/CheckboxCell.txt +70 -71
- package/mcp-docs/web/components/CheckboxGroup.txt +15 -16
- package/mcp-docs/web/components/Chip.txt +67 -68
- package/mcp-docs/web/components/Coachmark.txt +69 -70
- package/mcp-docs/web/components/Collapsible.txt +15 -16
- package/mcp-docs/web/components/ContainedAssetCard.txt +108 -109
- package/mcp-docs/web/components/ContentCard.txt +101 -102
- package/mcp-docs/web/components/ContentCardBody.txt +23 -24
- package/mcp-docs/web/components/ContentCardFooter.txt +19 -20
- package/mcp-docs/web/components/ContentCardHeader.txt +33 -34
- package/mcp-docs/web/components/ContentCell.txt +85 -86
- package/mcp-docs/web/components/ControlGroup.txt +108 -109
- package/mcp-docs/web/components/DatePicker.txt +59 -60
- package/mcp-docs/web/components/Divider.txt +31 -32
- package/mcp-docs/web/components/DotCount.txt +17 -18
- package/mcp-docs/web/components/DotStatusColor.txt +12 -13
- package/mcp-docs/web/components/DotSymbol.txt +24 -25
- package/mcp-docs/web/components/Dropdown.txt +31 -32
- package/mcp-docs/web/components/Fallback.txt +49 -50
- package/mcp-docs/web/components/FloatingAssetCard.txt +108 -109
- package/mcp-docs/web/components/FullscreenAlert.txt +20 -21
- package/mcp-docs/web/components/FullscreenModal.txt +28 -29
- package/mcp-docs/web/components/FullscreenModalLayout.txt +19 -20
- package/mcp-docs/web/components/Grid.txt +106 -107
- package/mcp-docs/web/components/GridColumn.txt +96 -97
- package/mcp-docs/web/components/HStack.txt +101 -102
- package/mcp-docs/web/components/HeroSquare.txt +12 -13
- package/mcp-docs/web/components/Icon.txt +27 -28
- package/mcp-docs/web/components/IconButton.txt +117 -118
- package/mcp-docs/web/components/InputChip.txt +62 -63
- package/mcp-docs/web/components/Interactable.txt +75 -76
- package/mcp-docs/web/components/LineChart.txt +366 -367
- package/mcp-docs/web/components/Link.txt +114 -115
- package/mcp-docs/web/components/ListCell.txt +157 -136
- package/mcp-docs/web/components/LogoMark.txt +8 -9
- package/mcp-docs/web/components/LogoWordMark.txt +7 -8
- package/mcp-docs/web/components/Lottie.txt +44 -45
- package/mcp-docs/web/components/LottieStatusAnimation.txt +11 -12
- package/mcp-docs/web/components/MediaQueryProvider.txt +7 -8
- package/mcp-docs/web/components/Modal.txt +69 -66
- package/mcp-docs/web/components/ModalBody.txt +5 -6
- package/mcp-docs/web/components/ModalFooter.txt +5 -6
- package/mcp-docs/web/components/ModalHeader.txt +5 -6
- package/mcp-docs/web/components/MultiContentModule.txt +109 -110
- package/mcp-docs/web/components/NavigationBar.txt +18 -19
- package/mcp-docs/web/components/NavigationTitle.txt +7 -8
- package/mcp-docs/web/components/NavigationTitleSelect.txt +9 -10
- package/mcp-docs/web/components/NudgeCard.txt +61 -62
- package/mcp-docs/web/components/Overlay.txt +57 -58
- package/mcp-docs/web/components/PageFooter.txt +77 -78
- package/mcp-docs/web/components/PageHeader.txt +107 -108
- package/mcp-docs/web/components/Pagination.txt +115 -116
- package/mcp-docs/web/components/PeriodSelector.txt +158 -159
- package/mcp-docs/web/components/Pictogram.txt +13 -14
- package/mcp-docs/web/components/Point.txt +169 -170
- package/mcp-docs/web/components/PortalProvider.txt +6 -7
- package/mcp-docs/web/components/Pressable.txt +73 -74
- package/mcp-docs/web/components/ProgressBar.txt +20 -21
- package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +15 -16
- package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +15 -16
- package/mcp-docs/web/components/ProgressCircle.txt +24 -25
- package/mcp-docs/web/components/Radio.txt +22 -23
- package/mcp-docs/web/components/RadioCell.txt +83 -84
- package/mcp-docs/web/components/RadioGroup.txt +22 -23
- package/mcp-docs/web/components/ReferenceLine.txt +22 -23
- package/mcp-docs/web/components/RemoteImage.txt +49 -50
- package/mcp-docs/web/components/RemoteImageGroup.txt +11 -12
- package/mcp-docs/web/components/RollingNumber.txt +131 -132
- package/mcp-docs/web/components/Scrubber.txt +22 -23
- package/mcp-docs/web/components/SearchInput.txt +29 -30
- package/mcp-docs/web/components/SectionHeader.txt +98 -99
- package/mcp-docs/web/components/SegmentedTabs.txt +109 -110
- package/mcp-docs/web/components/Select.txt +22 -23
- package/mcp-docs/web/components/SelectChip.txt +134 -135
- package/mcp-docs/web/components/SelectOption.txt +31 -32
- package/mcp-docs/web/components/Sidebar.txt +109 -110
- package/mcp-docs/web/components/SidebarItem.txt +6 -7
- package/mcp-docs/web/components/SidebarMoreMenu.txt +5 -6
- package/mcp-docs/web/components/Spacer.txt +57 -58
- package/mcp-docs/web/components/Sparkline.txt +18 -19
- package/mcp-docs/web/components/SparklineGradient.txt +18 -19
- package/mcp-docs/web/components/SparklineInteractive.txt +34 -35
- package/mcp-docs/web/components/SparklineInteractiveHeader.txt +12 -13
- package/mcp-docs/web/components/Spinner.txt +15 -16
- package/mcp-docs/web/components/SpotIcon.txt +12 -13
- package/mcp-docs/web/components/SpotRectangle.txt +12 -13
- package/mcp-docs/web/components/SpotSquare.txt +12 -13
- package/mcp-docs/web/components/Stepper.txt +119 -120
- package/mcp-docs/web/components/SubBrandLogoMark.txt +8 -9
- package/mcp-docs/web/components/SubBrandLogoWordMark.txt +8 -9
- package/mcp-docs/web/components/Switch.txt +23 -24
- package/mcp-docs/web/components/TabIndicator.txt +12 -13
- package/mcp-docs/web/components/TabLabel.txt +28 -29
- package/mcp-docs/web/components/TabNavigation.txt +41 -42
- package/mcp-docs/web/components/TabbedChips.txt +38 -39
- package/mcp-docs/web/components/Table.txt +17 -18
- package/mcp-docs/web/components/TableBody.txt +9 -10
- package/mcp-docs/web/components/TableCaption.txt +13 -14
- package/mcp-docs/web/components/TableCell.txt +21 -22
- package/mcp-docs/web/components/TableCellFallback.txt +16 -17
- package/mcp-docs/web/components/TableFooter.txt +9 -10
- package/mcp-docs/web/components/TableHeader.txt +10 -11
- package/mcp-docs/web/components/TableRow.txt +13 -14
- package/mcp-docs/web/components/Tabs.txt +94 -95
- package/mcp-docs/web/components/Tag.txt +106 -107
- package/mcp-docs/web/components/Text.txt +110 -111
- package/mcp-docs/web/components/TextInput.txt +32 -33
- package/mcp-docs/web/components/ThemeProvider.txt +27 -28
- package/mcp-docs/web/components/TileButton.txt +37 -38
- package/mcp-docs/web/components/Toast.txt +82 -83
- package/mcp-docs/web/components/Tooltip.txt +22 -23
- package/mcp-docs/web/components/Tour.txt +21 -22
- package/mcp-docs/web/components/Tray.txt +23 -24
- package/mcp-docs/web/components/UpsellCard.txt +16 -17
- package/mcp-docs/web/components/VStack.txt +101 -102
- package/mcp-docs/web/components/XAxis.txt +25 -26
- package/mcp-docs/web/components/YAxis.txt +26 -27
- package/mcp-docs/web/getting-started/{mcp-server.txt → ai-overview.txt} +51 -37
- package/mcp-docs/web/getting-started/installation.txt +103 -0
- package/mcp-docs/web/getting-started/introduction.txt +3 -0
- package/mcp-docs/web/getting-started/playground.txt +3 -0
- package/mcp-docs/web/getting-started/styling.txt +161 -0
- package/mcp-docs/web/getting-started/templates.txt +121 -0
- package/mcp-docs/web/getting-started/theming.txt +426 -0
- package/mcp-docs/web/hooks/useBreakpoints.txt +30 -2
- package/mcp-docs/web/hooks/useDimensions.txt +61 -2
- package/mcp-docs/web/hooks/useEventHandler.txt +120 -0
- package/mcp-docs/web/hooks/useHasMounted.txt +22 -2
- package/mcp-docs/web/hooks/useIsoEffect.txt +18 -2
- package/mcp-docs/web/hooks/useMediaQuery.txt +22 -2
- package/mcp-docs/web/hooks/useMergeRefs.txt +116 -0
- package/mcp-docs/web/hooks/useOverlayContentContext.txt +64 -2
- package/mcp-docs/web/hooks/usePreviousValue.txt +74 -0
- package/mcp-docs/web/hooks/useRefMap.txt +178 -0
- package/mcp-docs/web/hooks/useScrollBlocker.txt +21 -2
- package/mcp-docs/web/hooks/useTheme.txt +261 -2
- package/mcp-docs/web/routes.txt +9 -1
- package/package.json +1 -1
|
@@ -4,10 +4,146 @@ A chart component that displays data as filled areas beneath lines. Ideal for sh
|
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
7
|
-
```
|
|
7
|
+
```tsx
|
|
8
8
|
import { AreaChart } from '@coinbase/cds-web-visualization'
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
AreaChart is a cartesian chart variant that allows for easy visualization of stacked data.
|
|
14
|
+
|
|
15
|
+
### Basic Example
|
|
16
|
+
|
|
17
|
+
```jsx live
|
|
18
|
+
<AreaChart
|
|
19
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
20
|
+
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
21
|
+
series={[
|
|
22
|
+
{
|
|
23
|
+
id: 'prices',
|
|
24
|
+
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 2, 68, 20, 21, 58],
|
|
25
|
+
},
|
|
26
|
+
]}
|
|
27
|
+
type="gradient"
|
|
28
|
+
showLines
|
|
29
|
+
curve="monotone"
|
|
30
|
+
showYAxis
|
|
31
|
+
yAxis={{
|
|
32
|
+
showGrid: true,
|
|
33
|
+
width: 32,
|
|
34
|
+
}}
|
|
35
|
+
/>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Simple
|
|
39
|
+
|
|
40
|
+
```jsx live
|
|
41
|
+
<AreaChart
|
|
42
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
43
|
+
inset={0}
|
|
44
|
+
series={[
|
|
45
|
+
{
|
|
46
|
+
id: 'prices',
|
|
47
|
+
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 2, 68, 20, 21, 58],
|
|
48
|
+
},
|
|
49
|
+
]}
|
|
50
|
+
type="gradient"
|
|
51
|
+
showLines
|
|
52
|
+
curve="monotone"
|
|
53
|
+
/>
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Stacking
|
|
57
|
+
|
|
58
|
+
You can use the `stacked` prop to stack all areas on top of each other. You can also use the `stackId` prop on a series to create different stack groups. See [CartesianChart](/components/graphs/CartesianChart/#series-stacks) for more details.
|
|
59
|
+
|
|
60
|
+
```jsx live
|
|
61
|
+
<AreaChart
|
|
62
|
+
showLines
|
|
63
|
+
stacked
|
|
64
|
+
curve="natural"
|
|
65
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
66
|
+
inset={0}
|
|
67
|
+
series={[
|
|
68
|
+
{
|
|
69
|
+
id: 'currentRewards',
|
|
70
|
+
data: [
|
|
71
|
+
100, 150, 200, 280, 380, 500, 650, 820, 1020, 1250, 1510, 1800, 2120, 2470, 2850, 3260,
|
|
72
|
+
3700, 4170,
|
|
73
|
+
],
|
|
74
|
+
color: 'var(--color-fg)',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
id: 'potentialRewards',
|
|
78
|
+
data: [
|
|
79
|
+
150, 220, 300, 400, 520, 660, 820, 1000, 1200, 1420, 1660, 1920, 2200, 2500, 2820, 3160,
|
|
80
|
+
3520, 3900,
|
|
81
|
+
],
|
|
82
|
+
color: 'var(--color-fgPositive)',
|
|
83
|
+
LineComponent: DottedLine,
|
|
84
|
+
},
|
|
85
|
+
]}
|
|
86
|
+
AreaComponent={(props) => <DottedArea {...props} peakOpacity={0.4} baselineOpacity={0.4} />}
|
|
87
|
+
type="dotted"
|
|
88
|
+
/>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Negative Values
|
|
92
|
+
|
|
93
|
+
When an area chart contains negative values, the baseline automatically adjusts to zero instead of the bottom of the chart. The area fills from the data line to the zero baseline, properly showing both positive and negative regions.
|
|
94
|
+
|
|
95
|
+
```jsx live
|
|
96
|
+
<AreaChart
|
|
97
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
98
|
+
inset={0}
|
|
99
|
+
series={[
|
|
100
|
+
{
|
|
101
|
+
id: 'pageViews',
|
|
102
|
+
data: [24, 13, -98, 39, 48, 38, 43],
|
|
103
|
+
},
|
|
104
|
+
]}
|
|
105
|
+
AreaComponent={(props) => <SolidArea {...props} opacity={0.4} />}
|
|
106
|
+
showLines
|
|
107
|
+
showYAxis
|
|
108
|
+
yAxis={{
|
|
109
|
+
showGrid: true,
|
|
110
|
+
}}
|
|
111
|
+
/>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Area Styles
|
|
115
|
+
|
|
116
|
+
You can have different area styles for each series.
|
|
117
|
+
|
|
118
|
+
```jsx live
|
|
119
|
+
<AreaChart
|
|
120
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
121
|
+
inset={0}
|
|
122
|
+
series={[
|
|
123
|
+
{
|
|
124
|
+
id: 'visitors',
|
|
125
|
+
data: [450, 520, 480, 600, 750, 680, 590],
|
|
126
|
+
label: 'Weekly Visitors',
|
|
127
|
+
color: '#fb4d3d',
|
|
128
|
+
type: 'dotted',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
id: 'repeatVisitors',
|
|
132
|
+
data: [250, 200, 150, 140, 100, 80, 50],
|
|
133
|
+
label: 'Weekly Repeat Visitors',
|
|
134
|
+
color: '#16a34a',
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
id: 'signups',
|
|
138
|
+
data: [45, 62, 55, 250, 380, 400, 450],
|
|
139
|
+
label: 'Weekly Signups',
|
|
140
|
+
color: '#2563eb',
|
|
141
|
+
type: 'gradient',
|
|
142
|
+
},
|
|
143
|
+
]}
|
|
144
|
+
/>
|
|
145
|
+
```
|
|
146
|
+
|
|
11
147
|
## Props
|
|
12
148
|
|
|
13
149
|
| Prop | Type | Required | Default | Description |
|
|
@@ -372,140 +508,3 @@ import { AreaChart } from '@coinbase/cds-web-visualization'
|
|
|
372
508
|
| `zoomAndPan` | `string` | No | `-` | - |
|
|
373
509
|
|
|
374
510
|
|
|
375
|
-
## Examples
|
|
376
|
-
|
|
377
|
-
AreaChart is a cartesian chart variant that allows for easy visualization of stacked data.
|
|
378
|
-
|
|
379
|
-
### Basic Example
|
|
380
|
-
|
|
381
|
-
```jsx live
|
|
382
|
-
<AreaChart
|
|
383
|
-
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
384
|
-
inset={{ top: 8, bottom: 8, left: 0, right: 0 }}
|
|
385
|
-
series={[
|
|
386
|
-
{
|
|
387
|
-
id: 'prices',
|
|
388
|
-
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 2, 68, 20, 21, 58],
|
|
389
|
-
},
|
|
390
|
-
]}
|
|
391
|
-
type="gradient"
|
|
392
|
-
showLines
|
|
393
|
-
curve="monotone"
|
|
394
|
-
showYAxis
|
|
395
|
-
yAxis={{
|
|
396
|
-
showGrid: true,
|
|
397
|
-
width: 32,
|
|
398
|
-
}}
|
|
399
|
-
/>
|
|
400
|
-
```
|
|
401
|
-
|
|
402
|
-
### Simple
|
|
403
|
-
|
|
404
|
-
```jsx live
|
|
405
|
-
<AreaChart
|
|
406
|
-
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
407
|
-
inset={0}
|
|
408
|
-
series={[
|
|
409
|
-
{
|
|
410
|
-
id: 'prices',
|
|
411
|
-
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 2, 68, 20, 21, 58],
|
|
412
|
-
},
|
|
413
|
-
]}
|
|
414
|
-
type="gradient"
|
|
415
|
-
showLines
|
|
416
|
-
curve="monotone"
|
|
417
|
-
/>
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
### Stacking
|
|
421
|
-
|
|
422
|
-
You can use the `stacked` prop to stack all areas on top of each other. You can also use the `stackId` prop on a series to create different stack groups. See [CartesianChart](/components/graphs/CartesianChart/#series-stacks) for more details.
|
|
423
|
-
|
|
424
|
-
```jsx live
|
|
425
|
-
<AreaChart
|
|
426
|
-
showLines
|
|
427
|
-
stacked
|
|
428
|
-
curve="natural"
|
|
429
|
-
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
430
|
-
inset={0}
|
|
431
|
-
series={[
|
|
432
|
-
{
|
|
433
|
-
id: 'currentRewards',
|
|
434
|
-
data: [
|
|
435
|
-
100, 150, 200, 280, 380, 500, 650, 820, 1020, 1250, 1510, 1800, 2120, 2470, 2850, 3260,
|
|
436
|
-
3700, 4170,
|
|
437
|
-
],
|
|
438
|
-
color: 'var(--color-fg)',
|
|
439
|
-
},
|
|
440
|
-
{
|
|
441
|
-
id: 'potentialRewards',
|
|
442
|
-
data: [
|
|
443
|
-
150, 220, 300, 400, 520, 660, 820, 1000, 1200, 1420, 1660, 1920, 2200, 2500, 2820, 3160,
|
|
444
|
-
3520, 3900,
|
|
445
|
-
],
|
|
446
|
-
color: 'var(--color-fgPositive)',
|
|
447
|
-
LineComponent: DottedLine,
|
|
448
|
-
},
|
|
449
|
-
]}
|
|
450
|
-
AreaComponent={(props) => <DottedArea {...props} peakOpacity={0.4} baselineOpacity={0.4} />}
|
|
451
|
-
type="dotted"
|
|
452
|
-
/>
|
|
453
|
-
```
|
|
454
|
-
|
|
455
|
-
### Negative Values
|
|
456
|
-
|
|
457
|
-
When an area chart contains negative values, the baseline automatically adjusts to zero instead of the bottom of the chart. The area fills from the data line to the zero baseline, properly showing both positive and negative regions.
|
|
458
|
-
|
|
459
|
-
```jsx live
|
|
460
|
-
<AreaChart
|
|
461
|
-
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
462
|
-
inset={0}
|
|
463
|
-
series={[
|
|
464
|
-
{
|
|
465
|
-
id: 'pageViews',
|
|
466
|
-
data: [24, 13, -98, 39, 48, 38, 43],
|
|
467
|
-
},
|
|
468
|
-
]}
|
|
469
|
-
AreaComponent={(props) => <SolidArea {...props} opacity={0.4} />}
|
|
470
|
-
showLines
|
|
471
|
-
showYAxis
|
|
472
|
-
yAxis={{
|
|
473
|
-
showGrid: true,
|
|
474
|
-
}}
|
|
475
|
-
/>
|
|
476
|
-
```
|
|
477
|
-
|
|
478
|
-
### Area Styles
|
|
479
|
-
|
|
480
|
-
You can have different area styles for each series.
|
|
481
|
-
|
|
482
|
-
```jsx live
|
|
483
|
-
<AreaChart
|
|
484
|
-
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
485
|
-
inset={0}
|
|
486
|
-
series={[
|
|
487
|
-
{
|
|
488
|
-
id: 'visitors',
|
|
489
|
-
data: [450, 520, 480, 600, 750, 680, 590],
|
|
490
|
-
label: 'Weekly Visitors',
|
|
491
|
-
color: '#fb4d3d',
|
|
492
|
-
type: 'dotted',
|
|
493
|
-
},
|
|
494
|
-
{
|
|
495
|
-
id: 'repeatVisitors',
|
|
496
|
-
data: [250, 200, 150, 140, 100, 80, 50],
|
|
497
|
-
label: 'Weekly Repeat Visitors',
|
|
498
|
-
color: '#16a34a',
|
|
499
|
-
},
|
|
500
|
-
{
|
|
501
|
-
id: 'signups',
|
|
502
|
-
data: [45, 62, 55, 250, 380, 400, 450],
|
|
503
|
-
label: 'Weekly Signups',
|
|
504
|
-
color: '#2563eb',
|
|
505
|
-
type: 'gradient',
|
|
506
|
-
},
|
|
507
|
-
]}
|
|
508
|
-
/>
|
|
509
|
-
```
|
|
510
|
-
|
|
511
|
-
|
|
@@ -4,10 +4,100 @@ Avatar is a visual representation of a user, company, or entity.
|
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
7
|
-
```
|
|
7
|
+
```tsx
|
|
8
8
|
import { Avatar } from '@coinbase/cds-web/media/Avatar'
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Basic Example
|
|
14
|
+
|
|
15
|
+
```jsx live
|
|
16
|
+
<VStack gap={2}>
|
|
17
|
+
<HStack gap={2} alignItems="center">
|
|
18
|
+
<Avatar src={assets.btc.imageUrl} />
|
|
19
|
+
</HStack>
|
|
20
|
+
</VStack>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Sizes
|
|
24
|
+
|
|
25
|
+
Avatar comes in six different sizes. The default size is `l`.
|
|
26
|
+
|
|
27
|
+
```jsx live
|
|
28
|
+
<VStack gap={2}>
|
|
29
|
+
<HStack gap={2} alignItems="center">
|
|
30
|
+
<Avatar src={assets.btc.imageUrl} size="s" />
|
|
31
|
+
<Avatar src={assets.btc.imageUrl} size="m" />
|
|
32
|
+
<Avatar src={assets.btc.imageUrl} size="l" />
|
|
33
|
+
<Avatar src={assets.btc.imageUrl} size="xl" />
|
|
34
|
+
<Avatar src={assets.btc.imageUrl} size="xxl" />
|
|
35
|
+
<Avatar src={assets.btc.imageUrl} size="xxxl" />
|
|
36
|
+
</HStack>
|
|
37
|
+
</VStack>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Shapes
|
|
41
|
+
|
|
42
|
+
Avatar supports three different shapes: `circle`, `square`, and `hexagon`. The default shape is `circle`.
|
|
43
|
+
|
|
44
|
+
```jsx live
|
|
45
|
+
<HStack gap={2} alignItems="center">
|
|
46
|
+
<Avatar name="Alice" colorScheme="blue" size="xl" shape="circle" />
|
|
47
|
+
<Avatar name="Bob" colorScheme="purple" size="xl" shape="square" />
|
|
48
|
+
<Avatar name="Charlie" colorScheme="green" size="xl" shape="hexagon" />
|
|
49
|
+
</HStack>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Selected State
|
|
53
|
+
|
|
54
|
+
Avatars can show a selected state with a border indicator.
|
|
55
|
+
|
|
56
|
+
```jsx live
|
|
57
|
+
<HStack gap={2}>
|
|
58
|
+
<Avatar name="Alice" colorScheme="blue" size="xl" />
|
|
59
|
+
<Avatar name="Alice" colorScheme="blue" size="xl" selected />
|
|
60
|
+
<Avatar name="Bob" colorScheme="purple" size="xl" shape="square" />
|
|
61
|
+
<Avatar name="Bob" colorScheme="purple" size="xl" shape="square" selected />
|
|
62
|
+
</HStack>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Fallback Image
|
|
66
|
+
|
|
67
|
+
If you do not provide a src or if the provided src does not resolve, Avatar will surface a placeholder image.
|
|
68
|
+
|
|
69
|
+
```jsx live
|
|
70
|
+
<HStack gap={2} alignItems="center">
|
|
71
|
+
<Avatar />
|
|
72
|
+
<Avatar selected />
|
|
73
|
+
</HStack>
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Fallback with Colors
|
|
77
|
+
|
|
78
|
+
We've created a palette of identity colors using our CDS spectrum colors. When used as fallback, these colors will generate based on the provided name.
|
|
79
|
+
|
|
80
|
+
```jsx live
|
|
81
|
+
<VStack gap={2}>
|
|
82
|
+
<HStack gap={2} alignItems="center">
|
|
83
|
+
<Avatar name="Alice" colorScheme="blue" size="xl" />
|
|
84
|
+
<Avatar name="Bob" colorScheme="purple" size="xl" />
|
|
85
|
+
<Avatar name="Charlie" colorScheme="green" size="xl" />
|
|
86
|
+
<Avatar name="Diana" colorScheme="teal" size="xl" />
|
|
87
|
+
<Avatar name="Eve" colorScheme="pink" size="xl" />
|
|
88
|
+
<Avatar name="Frank" colorScheme="gray" size="xl" />
|
|
89
|
+
</HStack>
|
|
90
|
+
<HStack gap={2} alignItems="center">
|
|
91
|
+
<Avatar name="Alice" colorScheme="blue" size="xl" selected />
|
|
92
|
+
<Avatar name="Bob" colorScheme="purple" size="xl" selected />
|
|
93
|
+
<Avatar name="Charlie" colorScheme="green" size="xl" selected />
|
|
94
|
+
<Avatar name="Diana" colorScheme="teal" size="xl" selected />
|
|
95
|
+
<Avatar name="Eve" colorScheme="pink" size="xl" selected />
|
|
96
|
+
<Avatar name="Frank" colorScheme="gray" size="xl" selected />
|
|
97
|
+
</HStack>
|
|
98
|
+
</VStack>
|
|
99
|
+
```
|
|
100
|
+
|
|
11
101
|
## Props
|
|
12
102
|
|
|
13
103
|
| Prop | Type | Required | Default | Description |
|
|
@@ -119,94 +209,3 @@ import { Avatar } from '@coinbase/cds-web/media/Avatar'
|
|
|
119
209
|
| `zIndex` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
|
|
120
210
|
|
|
121
211
|
|
|
122
|
-
## Examples
|
|
123
|
-
|
|
124
|
-
### Basic Example
|
|
125
|
-
|
|
126
|
-
```jsx live
|
|
127
|
-
<VStack gap={2}>
|
|
128
|
-
<HStack gap={2} alignItems="center">
|
|
129
|
-
<Avatar src={assets.btc.imageUrl} />
|
|
130
|
-
</HStack>
|
|
131
|
-
</VStack>
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
### Sizes
|
|
135
|
-
|
|
136
|
-
Avatar comes in six different sizes. The default size is `l`.
|
|
137
|
-
|
|
138
|
-
```jsx live
|
|
139
|
-
<VStack gap={2}>
|
|
140
|
-
<HStack gap={2} alignItems="center">
|
|
141
|
-
<Avatar src={assets.btc.imageUrl} size="s" />
|
|
142
|
-
<Avatar src={assets.btc.imageUrl} size="m" />
|
|
143
|
-
<Avatar src={assets.btc.imageUrl} size="l" />
|
|
144
|
-
<Avatar src={assets.btc.imageUrl} size="xl" />
|
|
145
|
-
<Avatar src={assets.btc.imageUrl} size="xxl" />
|
|
146
|
-
<Avatar src={assets.btc.imageUrl} size="xxxl" />
|
|
147
|
-
</HStack>
|
|
148
|
-
</VStack>
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### Shapes
|
|
152
|
-
|
|
153
|
-
Avatar supports three different shapes: `circle`, `square`, and `hexagon`. The default shape is `circle`.
|
|
154
|
-
|
|
155
|
-
```jsx live
|
|
156
|
-
<HStack gap={2} alignItems="center">
|
|
157
|
-
<Avatar name="Alice" colorScheme="blue" size="xl" shape="circle" />
|
|
158
|
-
<Avatar name="Bob" colorScheme="purple" size="xl" shape="square" />
|
|
159
|
-
<Avatar name="Charlie" colorScheme="green" size="xl" shape="hexagon" />
|
|
160
|
-
</HStack>
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### Selected State
|
|
164
|
-
|
|
165
|
-
Avatars can show a selected state with a border indicator.
|
|
166
|
-
|
|
167
|
-
```jsx live
|
|
168
|
-
<HStack gap={2}>
|
|
169
|
-
<Avatar name="Alice" colorScheme="blue" size="xl" />
|
|
170
|
-
<Avatar name="Alice" colorScheme="blue" size="xl" selected />
|
|
171
|
-
<Avatar name="Bob" colorScheme="purple" size="xl" shape="square" />
|
|
172
|
-
<Avatar name="Bob" colorScheme="purple" size="xl" shape="square" selected />
|
|
173
|
-
</HStack>
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Fallback Image
|
|
177
|
-
|
|
178
|
-
If you do not provide a src or if the provided src does not resolve, Avatar will surface a placeholder image.
|
|
179
|
-
|
|
180
|
-
```jsx live
|
|
181
|
-
<HStack gap={2} alignItems="center">
|
|
182
|
-
<Avatar />
|
|
183
|
-
<Avatar selected />
|
|
184
|
-
</HStack>
|
|
185
|
-
```
|
|
186
|
-
|
|
187
|
-
### Fallback with Colors
|
|
188
|
-
|
|
189
|
-
We've created a palette of identity colors using our CDS spectrum colors. When used as fallback, these colors will generate based on the provided name.
|
|
190
|
-
|
|
191
|
-
```jsx live
|
|
192
|
-
<VStack gap={2}>
|
|
193
|
-
<HStack gap={2} alignItems="center">
|
|
194
|
-
<Avatar name="Alice" colorScheme="blue" size="xl" />
|
|
195
|
-
<Avatar name="Bob" colorScheme="purple" size="xl" />
|
|
196
|
-
<Avatar name="Charlie" colorScheme="green" size="xl" />
|
|
197
|
-
<Avatar name="Diana" colorScheme="teal" size="xl" />
|
|
198
|
-
<Avatar name="Eve" colorScheme="pink" size="xl" />
|
|
199
|
-
<Avatar name="Frank" colorScheme="gray" size="xl" />
|
|
200
|
-
</HStack>
|
|
201
|
-
<HStack gap={2} alignItems="center">
|
|
202
|
-
<Avatar name="Alice" colorScheme="blue" size="xl" selected />
|
|
203
|
-
<Avatar name="Bob" colorScheme="purple" size="xl" selected />
|
|
204
|
-
<Avatar name="Charlie" colorScheme="green" size="xl" selected />
|
|
205
|
-
<Avatar name="Diana" colorScheme="teal" size="xl" selected />
|
|
206
|
-
<Avatar name="Eve" colorScheme="pink" size="xl" selected />
|
|
207
|
-
<Avatar name="Frank" colorScheme="gray" size="xl" selected />
|
|
208
|
-
</HStack>
|
|
209
|
-
</VStack>
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
|