@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,22 +4,10 @@ Displays elevated product icons.
|
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
7
|
-
```
|
|
8
|
-
import { Pictogram } from '@coinbase/cds-web/
|
|
7
|
+
```tsx
|
|
8
|
+
import { Pictogram } from '@coinbase/cds-web/illustrations/Pictogram'
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## Props
|
|
12
|
-
|
|
13
|
-
| Prop | Type | Required | Default | Description |
|
|
14
|
-
| --- | --- | --- | --- | --- |
|
|
15
|
-
| `name` | `key \| done \| cardSuccess \| warning \| error \| add \| browser \| calculator \| calendar \| checkmark \| clock \| coinbaseOneLogo \| derivativesProduct \| email \| gasFees \| identityCard \| instantUnstakingClock \| laptop \| learningRewardsProduct \| lock \| passport \| paypal \| phone \| planet \| safe \| securityKey \| settings \| shield \| support \| taxes \| trading \| verifiedPools \| wallet \| 2fa \| accountsNavigation \| accreditedInvestor \| addCard \| addPayment \| addPhone \| addressBook \| addToWatchlist \| addWallet \| advancedTradingDesktop \| advancedTradingNavigation \| advancedTradingRebates \| agent \| alerts \| alertsCoinbaseOne \| analyticsNavigation \| apartOfDropsNft \| applyForHigherLimits \| apyInterest \| assetEncryption \| assetHubNavigation \| assetManagement \| assetManagementNavigation \| assetMeasurements \| assetMovement \| authenticationApp \| authenticator \| authenticatorAlt \| authenticatorProgress \| avatarAa \| avatarAb \| avatarAc \| avatarAd \| avatarAe \| avatarAf \| avatarAg \| avatarAh \| avatarAi \| avatarAj \| avatarBa \| avatarBb \| avatarBc \| avatarBd \| avatarBe \| avatarBf \| avatarBg \| avatarBh \| avatarBi \| avatarBj \| avatarCa \| avatarCb \| avatarCc \| avatarCd \| avatarCe \| avatarCf \| avatarCg \| avatarCh \| avatarCi \| avatarCj \| avatarDa \| avatarDb \| avatarDc \| avatarDd \| avatarDe \| avatarDf \| avatarDg \| avatarDh \| avatarDi \| avatarDj \| avatarEa \| avatarEb \| avatarEc \| avatarEd \| avatarEe \| avatarEf \| avatarEg \| avatarEh \| avatarEi \| avatarEj \| avatarFa \| avatarFb \| avatarFc \| avatarFd \| avatarFe \| avatarFf \| avatarFg \| avatarFh \| avatarFi \| avatarFj \| avatarGa \| avatarGb \| avatarGc \| avatarGd \| avatarGe \| avatarGf \| avatarGg \| avatarGh \| avatarGi \| avatarGj \| avatarHa \| avatarHb \| avatarHc \| avatarHd \| avatarHe \| avatarHf \| avatarHg \| avatarHh \| avatarHi \| avatarHj \| avatarIa \| avatarIb \| avatarIc \| avatarId \| avatarIe \| avatarIf \| avatarIg \| avatarIh \| avatarIi \| avatarIj \| avatarJa \| avatarJb \| avatarJc \| avatarJd \| avatarJe \| avatarJf \| avatarJg \| avatarJh \| avatarJi \| avatarJj \| barChart \| baseChartSmall \| baseCheckSmall \| baseCoinCryptoSmall \| baseCoinNetworkSmall \| baseCoinStack \| baseConnectApps \| baseConnectSmall \| baseDecentralizationSmall \| baseDiamondSmall \| baseDiamondTrophy \| baseEmptySmall \| baseErrorButterflySmall \| baseErrorSmall \| baseLoadingSmall \| baseLocationSmall \| baseLogo \| baseLogoNavigation \| baseMessaging \| baseMintNftSmall \| baseNetworkSmall \| baseNftSmall \| basePaycoinSmall \| basePeopleSmall \| basePiechartSmall \| baseSecuritySmall \| baseSendSmall \| baseSignin \| baseTargetSmall \| bitcoin \| bitcoinPizza \| bitcoinRewards \| bitcoinWhitePaper \| blockchainConnection \| bonusFivePercent \| bonusTwoPercent \| borrowCoins \| borrowingLending \| borrowNavigation \| browserMultiPlatform \| browserTransaction \| bundle \| businessProduct \| calendarCaution \| candleSticksGraph \| cardBlocked \| cardDeclined \| cardNavigation \| cb1BankTransfers \| chart \| chat \| cloudNavigation \| coinbaseLogoAdvancedBrand \| coinbaseLogoNavigation \| coinbaseOneAuthenticator \| coinbaseOneChat \| coinbaseOneEarn \| coinbaseOneEarnCoins \| coinbaseOneEarnCoinsLogo \| coinbaseOneFiat \| coinbaseOneProductIcon \| coinbaseOneProductInvestWeekly \| coinbaseOneRefreshed \| coinbaseOneShield \| coinbaseOneTrade \| coinbaseOneTrusted \| coinbaseOneUnlimitedRewards \| coinbaseUnlockOffers \| coinbaseWalletApp \| coinFocus \| coinShare \| coldStorageCheck \| collectionOfAssets \| commerceCheckout \| commerceInvoice \| commerceNavigation \| completeQuiz \| complianceNavigation \| congratulations \| connectNavigation \| contactInfo \| controlWalletStorage \| creative \| creditCard \| crypto101 \| cryptoCard \| cryptoFolder \| custodialJourney \| custodyNavigation \| dataMarketplaceNavigation \| decentralizationEverything \| decentralizedExchange \| decentralizedIdentity \| decentralizedWeb3 \| defiEarnMoment \| delegate \| delegateNavigation \| derivativesNavigation \| developerPlatformNavigation \| developerSDKNavigation \| directDepositNavigation \| dollarShowcase \| driversLicense \| driversLicenseWheel \| earnCoins \| earnGraph \| earnNavigation \| easyToUse \| economyGlobal \| emailAndMessages \| enableVoting \| envelope \| ethereumFocus \| ethRewards \| ethStaking \| ethStakingChart \| ethStakingRewards \| ethToken \| exchangeNavigation \| explore \| fast \| faucetNavigation \| feesRestriction \| fiat \| finance \| findYourSelection \| formDownload \| futures \| futuresCoinbaseOne \| gem \| genericCountryIDCard \| getStarted \| giftbox \| globalConnections \| globalPayments \| globalTransactions \| googleAuthenticator \| governance \| hardwareWallet \| helpCenterNavigation \| higherLimits \| holdingCoin \| idBlock \| idError \| idVerification \| increaseLimits \| institutionalNavigation \| institutions \| internationalExchangeNavigation \| internet \| investGraph \| laptopCharts \| laptopVideo \| layerNetworks \| leadGraph \| learn \| learningRewardsNavigation \| lightbulbLearn \| lightningNetworkSend \| linkYourAccount \| listingFees \| locationUsa \| lowFees \| manageWeb3SignersAcct \| miningCoins \| mintedNft \| mobileCharts \| mobileError \| mobileNotifcation \| mobileSuccess \| mobileWarning \| moneyEarn \| moneySwift \| monitoringPerformance \| moreThanBitcoin \| multiAccountsAndCards \| multiPlatform \| multipleAssets \| musicAndSounds \| myNumberCard \| newUserChecklistBuyCrypto \| newUserChecklistCompleteAccount \| newUserChecklistVerifyId \| nftAvatar \| nftLibrary \| nftNavigation \| noAnnualFee \| noNftFound \| notificationHubAnalysis \| notificationHubNews \| notificationHubPortfolio \| notificationHubSocial \| notifications \| noVisibility \| noWiFi \| orders \| outage \| partialCoins \| participateNavigation \| passwordWalletLocked \| payNavigation \| peerToPeer \| pieChart \| pizza \| pluginBrowser \| positiveReviews \| predictionMarkets \| premiumInvestor \| priceTracking \| primeMobileApp \| primeNavigation \| privateClientNavigation \| proNavigation \| protectionPlan \| queryTransactNavigation \| receipt \| recurringPurchases \| restaking \| reviewAndAdd \| rewardsNavigation \| riskStaking \| rosettaNavigation \| securedAssets \| security \| securityCoinShield \| seedPhrase \| selectAddNft \| selfCustodyWallet \| selfServe \| sellSendAnytime \| sendPaymentToOthers \| settled \| sideChainSide \| signInNavigation \| smsAuthenticate \| sparkleCoinbaseOne \| ssnCard \| stableCoinMetaphor \| stacking \| stakingGraph \| standWithCryptoLogoNavigation \| startToday \| strongInfo \| strongWarning \| successPhone \| supportChat \| takeQuiz \| target \| taxBeta \| taxCenterNavigation \| taxesArrangement \| taxSeason \| timingCheck \| tokenBaskets \| tokenSales \| transferSend \| transistor \| trendingAssets \| trusted \| tryAgainLater \| twoBonus \| typeScript \| ubiKey \| usaProduct \| usdcEarn \| usdcInterest \| usdcLoan \| usdcLogo \| usdcRewards \| usdcRewardsRibbon \| usdcToken \| venturesNavigation \| videoCalendar \| videoContent \| waiting \| waitingForConsensus \| walletAsServiceNavigation \| walletDeposit \| walletError \| walletExchange \| walletLinkNavigation \| walletLogoNavigation \| walletNavigation \| walletPassword \| walletSuccess \| walletWarning \| winBTC \| worldwide \| wrapEth` | Yes | `-` | Name of illustration as defined in Figma |
|
|
16
|
-
| `alt` | `string` | No | `"" will identify the image as decorative` | Alt tag to apply to the img |
|
|
17
|
-
| `dimension` | `48x48 \| 64x64` | No | `-` | HeroSquare Default: 240x240 SpotSquare Default: 96x96 Pictogram Default: 48x48 SpotRectangle Default: 240x120 |
|
|
18
|
-
| `fallback` | `ReactElement<any, string \| JSXElementConstructor<any>> \| null` | No | `null` | Fallback element to render if unable to find an illustration with the matching name |
|
|
19
|
-
| `scaleMultiplier` | `number` | No | `-` | Multiply the width & height while maintaining aspect ratio |
|
|
20
|
-
| `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
|
|
21
|
-
|
|
22
|
-
|
|
23
11
|
## Examples
|
|
24
12
|
|
|
25
13
|
### Basic example
|
|
@@ -46,4 +34,15 @@ If `dimension` and `scaleMultiplier` are both provided the component will scale
|
|
|
46
34
|
<Pictogram name="shield" dimension="48x48" scaleMultiplier={2.5} />
|
|
47
35
|
```
|
|
48
36
|
|
|
37
|
+
## Props
|
|
38
|
+
|
|
39
|
+
| Prop | Type | Required | Default | Description |
|
|
40
|
+
| --- | --- | --- | --- | --- |
|
|
41
|
+
| `name` | `key \| done \| cardSuccess \| warning \| error \| add \| browser \| calculator \| calendar \| checkmark \| clock \| coinbaseOneLogo \| derivativesProduct \| email \| gasFees \| identityCard \| instantUnstakingClock \| laptop \| learningRewardsProduct \| lock \| passport \| paypal \| phone \| planet \| safe \| securityKey \| settings \| shield \| support \| taxes \| tokenSales \| trading \| verifiedPools \| wallet \| 2fa \| accountsNavigation \| accreditedInvestor \| addCard \| addPayment \| addPhone \| addressBook \| addToWatchlist \| addWallet \| advancedTradingDesktop \| advancedTradingNavigation \| advancedTradingRebates \| agent \| alerts \| alertsCoinbaseOne \| analyticsNavigation \| apartOfDropsNft \| applyForHigherLimits \| apyInterest \| assetEncryption \| assetHubNavigation \| assetManagement \| assetManagementNavigation \| assetMeasurements \| assetMovement \| authenticationApp \| authenticator \| authenticatorAlt \| authenticatorProgress \| avatarAa \| avatarAb \| avatarAc \| avatarAd \| avatarAe \| avatarAf \| avatarAg \| avatarAh \| avatarAi \| avatarAj \| avatarBa \| avatarBb \| avatarBc \| avatarBd \| avatarBe \| avatarBf \| avatarBg \| avatarBh \| avatarBi \| avatarBj \| avatarCa \| avatarCb \| avatarCc \| avatarCd \| avatarCe \| avatarCf \| avatarCg \| avatarCh \| avatarCi \| avatarCj \| avatarDa \| avatarDb \| avatarDc \| avatarDd \| avatarDe \| avatarDf \| avatarDg \| avatarDh \| avatarDi \| avatarDj \| avatarEa \| avatarEb \| avatarEc \| avatarEd \| avatarEe \| avatarEf \| avatarEg \| avatarEh \| avatarEi \| avatarEj \| avatarFa \| avatarFb \| avatarFc \| avatarFd \| avatarFe \| avatarFf \| avatarFg \| avatarFh \| avatarFi \| avatarFj \| avatarGa \| avatarGb \| avatarGc \| avatarGd \| avatarGe \| avatarGf \| avatarGg \| avatarGh \| avatarGi \| avatarGj \| avatarHa \| avatarHb \| avatarHc \| avatarHd \| avatarHe \| avatarHf \| avatarHg \| avatarHh \| avatarHi \| avatarHj \| avatarIa \| avatarIb \| avatarIc \| avatarId \| avatarIe \| avatarIf \| avatarIg \| avatarIh \| avatarIi \| avatarIj \| avatarJa \| avatarJb \| avatarJc \| avatarJd \| avatarJe \| avatarJf \| avatarJg \| avatarJh \| avatarJi \| avatarJj \| barChart \| baseChartSmall \| baseCheckSmall \| baseCoinCryptoSmall \| baseCoinNetworkSmall \| baseCoinStack \| baseConnectApps \| baseConnectSmall \| baseDecentralizationSmall \| baseDiamondSmall \| baseDiamondTrophy \| baseEmptySmall \| baseErrorButterflySmall \| baseErrorSmall \| baseLoadingSmall \| baseLocationSmall \| baseLogo \| baseLogoNavigation \| baseMessaging \| baseMintNftSmall \| baseNetworkSmall \| baseNftSmall \| basePaycoinSmall \| basePeopleSmall \| basePiechartSmall \| baseSecuritySmall \| baseSendSmall \| baseSignin \| baseTargetSmall \| bitcoin \| bitcoinPizza \| bitcoinRewards \| bitcoinWhitePaper \| blockchainConnection \| bonusFivePercent \| bonusTwoPercent \| borrowCoins \| borrowingLending \| borrowNavigation \| browserMultiPlatform \| browserTransaction \| bundle \| businessProduct \| calendarCaution \| candleSticksGraph \| cardBlocked \| cardDeclined \| cardNavigation \| cb1BankTransfers \| chart \| chat \| cloudNavigation \| coinbaseLogoAdvancedBrand \| coinbaseLogoNavigation \| coinbaseOneAuthenticator \| coinbaseOneChat \| coinbaseOneEarn \| coinbaseOneEarnCoins \| coinbaseOneEarnCoinsLogo \| coinbaseOneFiat \| coinbaseOneProductIcon \| coinbaseOneProductInvestWeekly \| coinbaseOneRefreshed \| coinbaseOneShield \| coinbaseOneTrade \| coinbaseOneTrusted \| coinbaseOneUnlimitedRewards \| coinbaseUnlockOffers \| coinbaseWalletApp \| coinFocus \| coinShare \| coldStorageCheck \| collectionOfAssets \| commerceCheckout \| commerceInvoice \| commerceNavigation \| completeQuiz \| complianceNavigation \| congratulations \| connectNavigation \| contactInfo \| controlWalletStorage \| creative \| creditCard \| crypto101 \| cryptoCard \| cryptoFolder \| custodialJourney \| custodyNavigation \| dataMarketplaceNavigation \| decentralizationEverything \| decentralizedExchange \| decentralizedIdentity \| decentralizedWeb3 \| defiEarnMoment \| delegate \| delegateNavigation \| derivativesNavigation \| developerPlatformNavigation \| developerSDKNavigation \| directDepositNavigation \| dollarShowcase \| driversLicense \| driversLicenseWheel \| earnCoins \| earnGraph \| earnNavigation \| easyToUse \| economyGlobal \| emailAndMessages \| enableVoting \| envelope \| ethereumFocus \| ethRewards \| ethStaking \| ethStakingChart \| ethStakingRewards \| ethToken \| exchangeNavigation \| explore \| fast \| faucetNavigation \| feesRestriction \| fiat \| finance \| findYourSelection \| formDownload \| futures \| futuresCoinbaseOne \| gem \| genericCountryIDCard \| getStarted \| giftbox \| globalConnections \| globalPayments \| globalTransactions \| googleAuthenticator \| governance \| hardwareWallet \| helpCenterNavigation \| higherLimits \| holdingCoin \| idBlock \| idError \| idVerification \| increaseLimits \| institutionalNavigation \| institutions \| internationalExchangeNavigation \| internet \| investGraph \| laptopCharts \| laptopVideo \| layerNetworks \| leadGraph \| learn \| learningRewardsNavigation \| lightbulbLearn \| lightningNetworkSend \| linkYourAccount \| listingFees \| locationUsa \| lowFees \| manageWeb3SignersAcct \| miningCoins \| mintedNft \| mobileCharts \| mobileError \| mobileNotifcation \| mobileSuccess \| mobileWarning \| moneyEarn \| moneySwift \| monitoringPerformance \| moreThanBitcoin \| multiAccountsAndCards \| multiPlatform \| multipleAssets \| musicAndSounds \| myNumberCard \| newUserChecklistBuyCrypto \| newUserChecklistCompleteAccount \| newUserChecklistVerifyId \| nftAvatar \| nftLibrary \| nftNavigation \| noAnnualFee \| noNftFound \| notificationHubAnalysis \| notificationHubNews \| notificationHubPortfolio \| notificationHubSocial \| notifications \| noVisibility \| noWiFi \| orders \| outage \| partialCoins \| participateNavigation \| passwordWalletLocked \| payNavigation \| peerToPeer \| pieChart \| pizza \| pluginBrowser \| positiveReviews \| predictionMarkets \| premiumInvestor \| priceTracking \| primeMobileApp \| primeNavigation \| privateClientNavigation \| proNavigation \| protectionPlan \| queryTransactNavigation \| receipt \| recurringPurchases \| restaking \| reviewAndAdd \| rewardsNavigation \| riskStaking \| rosettaNavigation \| securedAssets \| security \| securityCoinShield \| seedPhrase \| selectAddNft \| selfCustodyWallet \| selfServe \| sellSendAnytime \| sendPaymentToOthers \| settled \| sideChainSide \| signInNavigation \| smsAuthenticate \| sparkleCoinbaseOne \| ssnCard \| stableCoinMetaphor \| stacking \| stakingGraph \| standWithCryptoLogoNavigation \| startToday \| strongInfo \| strongWarning \| successPhone \| supportChat \| takeQuiz \| target \| taxBeta \| taxCenterNavigation \| taxesArrangement \| taxSeason \| timingCheck \| tokenBaskets \| transferSend \| transistor \| trendingAssets \| trusted \| tryAgainLater \| twoBonus \| typeScript \| ubiKey \| usaProduct \| usdcEarn \| usdcInterest \| usdcLoan \| usdcLogo \| usdcRewards \| usdcRewardsRibbon \| usdcToken \| venturesNavigation \| videoCalendar \| videoContent \| waiting \| waitingForConsensus \| walletAsServiceNavigation \| walletDeposit \| walletError \| walletExchange \| walletLinkNavigation \| walletLogoNavigation \| walletNavigation \| walletPassword \| walletSuccess \| walletWarning \| winBTC \| worldwide \| wrapEth` | Yes | `-` | Name of illustration as defined in Figma |
|
|
42
|
+
| `alt` | `string` | No | `"" will identify the image as decorative` | Alt tag to apply to the img |
|
|
43
|
+
| `dimension` | `48x48 \| 64x64` | No | `-` | HeroSquare Default: 240x240 SpotSquare Default: 96x96 Pictogram Default: 48x48 SpotRectangle Default: 240x120 |
|
|
44
|
+
| `fallback` | `ReactElement<any, string \| JSXElementConstructor<any>> \| null` | No | `null` | Fallback element to render if unable to find an illustration with the matching name |
|
|
45
|
+
| `scaleMultiplier` | `number` | No | `-` | Multiply the width & height while maintaining aspect ratio |
|
|
46
|
+
| `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
|
|
47
|
+
|
|
49
48
|
|
|
@@ -4,10 +4,178 @@ Visual markers that highlight specific data values on a chart. Points can be cus
|
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
7
|
-
```
|
|
7
|
+
```tsx
|
|
8
8
|
import { Point } from '@coinbase/cds-web-visualization'
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Basic Example
|
|
14
|
+
|
|
15
|
+
Points are visual markers that highlight specific data values on a chart. They can be used to emphasize important data points, show discrete values, or provide interactive elements.
|
|
16
|
+
|
|
17
|
+
```jsx live
|
|
18
|
+
<LineChart
|
|
19
|
+
enableScrubbing
|
|
20
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
21
|
+
series={[
|
|
22
|
+
{
|
|
23
|
+
id: 'prices',
|
|
24
|
+
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
|
|
25
|
+
},
|
|
26
|
+
]}
|
|
27
|
+
curve="monotone"
|
|
28
|
+
showYAxis
|
|
29
|
+
showArea
|
|
30
|
+
yAxis={{
|
|
31
|
+
showGrid: true,
|
|
32
|
+
}}
|
|
33
|
+
renderPoints={() => true}
|
|
34
|
+
>
|
|
35
|
+
<Scrubber />
|
|
36
|
+
</LineChart>
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Conditional Points
|
|
40
|
+
|
|
41
|
+
You can conditionally render points to highlight specific values in your data, such as maximum/minimum values or outliers.
|
|
42
|
+
|
|
43
|
+
```jsx live
|
|
44
|
+
function AssetPriceWithMinMax() {
|
|
45
|
+
const data = sparklineInteractiveData.hour.map((d) => d.value);
|
|
46
|
+
|
|
47
|
+
const minPrice = Math.min(...data);
|
|
48
|
+
const maxPrice = Math.max(...data);
|
|
49
|
+
|
|
50
|
+
const formatPrice = useCallback((price: number) => {
|
|
51
|
+
return new Intl.NumberFormat('en-US', {
|
|
52
|
+
style: 'currency',
|
|
53
|
+
currency: 'USD',
|
|
54
|
+
}).format(price);
|
|
55
|
+
}, []);
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<LineChart
|
|
59
|
+
series={[
|
|
60
|
+
{
|
|
61
|
+
id: 'btc',
|
|
62
|
+
data: data,
|
|
63
|
+
color: assets.btc.color,
|
|
64
|
+
},
|
|
65
|
+
]}
|
|
66
|
+
showArea
|
|
67
|
+
areaType="dotted"
|
|
68
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
69
|
+
style={{ outlineColor: assets.btc.color }}
|
|
70
|
+
renderPoints={({ dataX, dataY }) => {
|
|
71
|
+
const isMin = dataY === minPrice;
|
|
72
|
+
const isMax = dataY === maxPrice;
|
|
73
|
+
|
|
74
|
+
if (isMin) {
|
|
75
|
+
return { label: formatPrice(dataY), labelProps: { dy: 6, verticalAlignment: 'top' } };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (isMax) {
|
|
79
|
+
return { label: formatPrice(dataY), labelProps: { dy: -6, verticalAlignment: 'bottom' } };
|
|
80
|
+
}
|
|
81
|
+
}}
|
|
82
|
+
/>
|
|
83
|
+
);
|
|
84
|
+
};
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Interactive Points
|
|
88
|
+
|
|
89
|
+
Points can be made interactive by adding click handlers, allowing users to explore data in more detail.
|
|
90
|
+
|
|
91
|
+
```jsx live
|
|
92
|
+
<LineChart
|
|
93
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
94
|
+
series={[
|
|
95
|
+
{
|
|
96
|
+
id: 'sales',
|
|
97
|
+
data: [120, 132, 101, 134, 90, 230, 210, 120, 180, 190, 210, 176],
|
|
98
|
+
},
|
|
99
|
+
]}
|
|
100
|
+
curve="monotone"
|
|
101
|
+
showYAxis
|
|
102
|
+
showArea
|
|
103
|
+
yAxis={{
|
|
104
|
+
showGrid: true,
|
|
105
|
+
label: 'Sales (units)',
|
|
106
|
+
}}
|
|
107
|
+
renderPoints={({ dataX, dataY }) => {
|
|
108
|
+
const months = [
|
|
109
|
+
'Jan',
|
|
110
|
+
'Feb',
|
|
111
|
+
'Mar',
|
|
112
|
+
'Apr',
|
|
113
|
+
'May',
|
|
114
|
+
'Jun',
|
|
115
|
+
'Jul',
|
|
116
|
+
'Aug',
|
|
117
|
+
'Sep',
|
|
118
|
+
'Oct',
|
|
119
|
+
'Nov',
|
|
120
|
+
'Dec',
|
|
121
|
+
];
|
|
122
|
+
return {
|
|
123
|
+
radius: 4,
|
|
124
|
+
onClick: () => alert(`${months[dataX]}: ${dataY} units sold`),
|
|
125
|
+
accessibilityLabel: `${months[dataX]} sales: ${dataY} units`,
|
|
126
|
+
};
|
|
127
|
+
}}
|
|
128
|
+
/>
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Customization
|
|
132
|
+
|
|
133
|
+
Points support extensive customization through various properties including colors, sizes, animations, and labels.
|
|
134
|
+
|
|
135
|
+
```jsx live
|
|
136
|
+
<LineChart
|
|
137
|
+
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
138
|
+
series={[
|
|
139
|
+
{
|
|
140
|
+
id: 'performance',
|
|
141
|
+
data: [65, 70, 72, 85, 88, 92, 78, 82, 90, 95, 91, 94],
|
|
142
|
+
},
|
|
143
|
+
]}
|
|
144
|
+
curve="monotone"
|
|
145
|
+
showYAxis
|
|
146
|
+
showArea
|
|
147
|
+
yAxis={{
|
|
148
|
+
showGrid: true,
|
|
149
|
+
label: 'Performance Score',
|
|
150
|
+
}}
|
|
151
|
+
renderPoints={({ dataX, dataY }) => {
|
|
152
|
+
const isHighPerformance = dataY >= 90;
|
|
153
|
+
const isLowPerformance = dataY < 75;
|
|
154
|
+
|
|
155
|
+
return {
|
|
156
|
+
fill: isHighPerformance
|
|
157
|
+
? 'var(--color-bgPositive)'
|
|
158
|
+
: isLowPerformance
|
|
159
|
+
? 'var(--color-bgNegative)'
|
|
160
|
+
: 'var(--color-fgPrimary)',
|
|
161
|
+
radius: isHighPerformance ? 6 : 4,
|
|
162
|
+
strokeWidth: 2,
|
|
163
|
+
stroke: 'var(--color-bg)',
|
|
164
|
+
label: isHighPerformance || isLowPerformance ? `${dataY}%` : undefined,
|
|
165
|
+
labelProps: {
|
|
166
|
+
verticalAlignment: isHighPerformance ? 'bottom' : 'top',
|
|
167
|
+
dy: isHighPerformance ? -10 : 10,
|
|
168
|
+
color: isHighPerformance
|
|
169
|
+
? 'var(--color-fgPositive)'
|
|
170
|
+
: isLowPerformance
|
|
171
|
+
? 'var(--color-fgNegative)'
|
|
172
|
+
: undefined,
|
|
173
|
+
},
|
|
174
|
+
};
|
|
175
|
+
}}
|
|
176
|
+
/>
|
|
177
|
+
```
|
|
178
|
+
|
|
11
179
|
## Props
|
|
12
180
|
|
|
13
181
|
| Prop | Type | Required | Default | Description |
|
|
@@ -290,172 +458,3 @@ import { Point } from '@coinbase/cds-web-visualization'
|
|
|
290
458
|
| `zoomAndPan` | `string` | No | `-` | - |
|
|
291
459
|
|
|
292
460
|
|
|
293
|
-
## Examples
|
|
294
|
-
|
|
295
|
-
### Basic Example
|
|
296
|
-
|
|
297
|
-
Points are visual markers that highlight specific data values on a chart. They can be used to emphasize important data points, show discrete values, or provide interactive elements.
|
|
298
|
-
|
|
299
|
-
```jsx live
|
|
300
|
-
<LineChart
|
|
301
|
-
enableScrubbing
|
|
302
|
-
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
303
|
-
series={[
|
|
304
|
-
{
|
|
305
|
-
id: 'prices',
|
|
306
|
-
data: [10, 22, 29, 45, 98, 45, 22, 52, 21, 4, 68, 20, 21, 58],
|
|
307
|
-
},
|
|
308
|
-
]}
|
|
309
|
-
curve="monotone"
|
|
310
|
-
showYAxis
|
|
311
|
-
showArea
|
|
312
|
-
yAxis={{
|
|
313
|
-
showGrid: true,
|
|
314
|
-
}}
|
|
315
|
-
renderPoints={() => true}
|
|
316
|
-
>
|
|
317
|
-
<Scrubber />
|
|
318
|
-
</LineChart>
|
|
319
|
-
```
|
|
320
|
-
|
|
321
|
-
### Conditional Points
|
|
322
|
-
|
|
323
|
-
You can conditionally render points to highlight specific values in your data, such as maximum/minimum values or outliers.
|
|
324
|
-
|
|
325
|
-
```jsx live
|
|
326
|
-
function AssetPriceWithMinMax() {
|
|
327
|
-
const data = sparklineInteractiveData.hour.map((d) => d.value);
|
|
328
|
-
|
|
329
|
-
const minPrice = Math.min(...data);
|
|
330
|
-
const maxPrice = Math.max(...data);
|
|
331
|
-
|
|
332
|
-
const formatPrice = useCallback((price: number) => {
|
|
333
|
-
return new Intl.NumberFormat('en-US', {
|
|
334
|
-
style: 'currency',
|
|
335
|
-
currency: 'USD',
|
|
336
|
-
}).format(price);
|
|
337
|
-
}, []);
|
|
338
|
-
|
|
339
|
-
return (
|
|
340
|
-
<LineChart
|
|
341
|
-
series={[
|
|
342
|
-
{
|
|
343
|
-
id: 'btc',
|
|
344
|
-
data: data,
|
|
345
|
-
color: assets.btc.color,
|
|
346
|
-
},
|
|
347
|
-
]}
|
|
348
|
-
showArea
|
|
349
|
-
areaType="dotted"
|
|
350
|
-
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
351
|
-
style={{ outlineColor: assets.btc.color }}
|
|
352
|
-
renderPoints={({ dataX, dataY }) => {
|
|
353
|
-
const isMin = dataY === minPrice;
|
|
354
|
-
const isMax = dataY === maxPrice;
|
|
355
|
-
|
|
356
|
-
if (isMin) {
|
|
357
|
-
return { label: formatPrice(dataY), labelProps: { dy: 6, verticalAlignment: 'top' } };
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
if (isMax) {
|
|
361
|
-
return { label: formatPrice(dataY), labelProps: { dy: -6, verticalAlignment: 'bottom' } };
|
|
362
|
-
}
|
|
363
|
-
}}
|
|
364
|
-
/>
|
|
365
|
-
);
|
|
366
|
-
};
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
### Interactive Points
|
|
370
|
-
|
|
371
|
-
Points can be made interactive by adding click handlers, allowing users to explore data in more detail.
|
|
372
|
-
|
|
373
|
-
```jsx live
|
|
374
|
-
<LineChart
|
|
375
|
-
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
376
|
-
series={[
|
|
377
|
-
{
|
|
378
|
-
id: 'sales',
|
|
379
|
-
data: [120, 132, 101, 134, 90, 230, 210, 120, 180, 190, 210, 176],
|
|
380
|
-
},
|
|
381
|
-
]}
|
|
382
|
-
curve="monotone"
|
|
383
|
-
showYAxis
|
|
384
|
-
showArea
|
|
385
|
-
yAxis={{
|
|
386
|
-
showGrid: true,
|
|
387
|
-
label: 'Sales (units)',
|
|
388
|
-
}}
|
|
389
|
-
renderPoints={({ dataX, dataY }) => {
|
|
390
|
-
const months = [
|
|
391
|
-
'Jan',
|
|
392
|
-
'Feb',
|
|
393
|
-
'Mar',
|
|
394
|
-
'Apr',
|
|
395
|
-
'May',
|
|
396
|
-
'Jun',
|
|
397
|
-
'Jul',
|
|
398
|
-
'Aug',
|
|
399
|
-
'Sep',
|
|
400
|
-
'Oct',
|
|
401
|
-
'Nov',
|
|
402
|
-
'Dec',
|
|
403
|
-
];
|
|
404
|
-
return {
|
|
405
|
-
radius: 4,
|
|
406
|
-
onClick: () => alert(`${months[dataX]}: ${dataY} units sold`),
|
|
407
|
-
accessibilityLabel: `${months[dataX]} sales: ${dataY} units`,
|
|
408
|
-
};
|
|
409
|
-
}}
|
|
410
|
-
/>
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
### Customization
|
|
414
|
-
|
|
415
|
-
Points support extensive customization through various properties including colors, sizes, animations, and labels.
|
|
416
|
-
|
|
417
|
-
```jsx live
|
|
418
|
-
<LineChart
|
|
419
|
-
height={{ base: 150, tablet: 200, desktop: 250 }}
|
|
420
|
-
series={[
|
|
421
|
-
{
|
|
422
|
-
id: 'performance',
|
|
423
|
-
data: [65, 70, 72, 85, 88, 92, 78, 82, 90, 95, 91, 94],
|
|
424
|
-
},
|
|
425
|
-
]}
|
|
426
|
-
curve="monotone"
|
|
427
|
-
showYAxis
|
|
428
|
-
showArea
|
|
429
|
-
yAxis={{
|
|
430
|
-
showGrid: true,
|
|
431
|
-
label: 'Performance Score',
|
|
432
|
-
}}
|
|
433
|
-
renderPoints={({ dataX, dataY }) => {
|
|
434
|
-
const isHighPerformance = dataY >= 90;
|
|
435
|
-
const isLowPerformance = dataY < 75;
|
|
436
|
-
|
|
437
|
-
return {
|
|
438
|
-
fill: isHighPerformance
|
|
439
|
-
? 'var(--color-bgPositive)'
|
|
440
|
-
: isLowPerformance
|
|
441
|
-
? 'var(--color-bgNegative)'
|
|
442
|
-
: 'var(--color-fgPrimary)',
|
|
443
|
-
radius: isHighPerformance ? 6 : 4,
|
|
444
|
-
strokeWidth: 2,
|
|
445
|
-
stroke: 'var(--color-bg)',
|
|
446
|
-
label: isHighPerformance || isLowPerformance ? `${dataY}%` : undefined,
|
|
447
|
-
labelProps: {
|
|
448
|
-
verticalAlignment: isHighPerformance ? 'bottom' : 'top',
|
|
449
|
-
dy: isHighPerformance ? -10 : 10,
|
|
450
|
-
color: isHighPerformance
|
|
451
|
-
? 'var(--color-fgPositive)'
|
|
452
|
-
: isLowPerformance
|
|
453
|
-
? 'var(--color-fgNegative)'
|
|
454
|
-
: undefined,
|
|
455
|
-
},
|
|
456
|
-
};
|
|
457
|
-
}}
|
|
458
|
-
/>
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
|
|
@@ -4,16 +4,10 @@ A component that manages the rendering of portals for overlay components.
|
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
7
|
-
```
|
|
7
|
+
```tsx
|
|
8
8
|
import { PortalProvider } from '@coinbase/cds-web/overlays/PortalProvider'
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## Props
|
|
12
|
-
|
|
13
|
-
| Prop | Type | Required | Default | Description |
|
|
14
|
-
| --- | --- | --- | --- | --- |
|
|
15
|
-
|
|
16
|
-
|
|
17
11
|
## Examples
|
|
18
12
|
|
|
19
13
|
### Basic usage
|
|
@@ -74,4 +68,9 @@ function Example() {
|
|
|
74
68
|
}
|
|
75
69
|
```
|
|
76
70
|
|
|
71
|
+
## Props
|
|
72
|
+
|
|
73
|
+
| Prop | Type | Required | Default | Description |
|
|
74
|
+
| --- | --- | --- | --- | --- |
|
|
75
|
+
|
|
77
76
|
|
|
@@ -4,10 +4,82 @@ Extends the Interactable component to add accessibility support for press intera
|
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
7
|
-
```
|
|
7
|
+
```tsx
|
|
8
8
|
import { Pressable } from '@coinbase/cds-web/system/Pressable'
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## Examples
|
|
12
|
+
|
|
13
|
+
### Basic Pressable
|
|
14
|
+
|
|
15
|
+
Pressables support an `onClick` prop for handling click/press interactions. When being pressed, the element will scale down to mimic a real-world button press. If this functionality is not desired, pass the `noScaleOnPress` prop.
|
|
16
|
+
|
|
17
|
+
```jsx live
|
|
18
|
+
<Pressable
|
|
19
|
+
onClick={console.log}
|
|
20
|
+
as="button"
|
|
21
|
+
background="bgAlternate"
|
|
22
|
+
borderColor="lineHeavy"
|
|
23
|
+
borderWidth={100}
|
|
24
|
+
borderRadius={300}
|
|
25
|
+
>
|
|
26
|
+
<Box as="span" padding={2}>
|
|
27
|
+
<Text font="headline" as="span">
|
|
28
|
+
Click me...
|
|
29
|
+
</Text>
|
|
30
|
+
</Box>
|
|
31
|
+
</Pressable>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Pressable with Transparent Background
|
|
35
|
+
|
|
36
|
+
```jsx live
|
|
37
|
+
<Pressable
|
|
38
|
+
onClick={console.log}
|
|
39
|
+
as="button"
|
|
40
|
+
background="transparent"
|
|
41
|
+
borderColor="lineHeavy"
|
|
42
|
+
borderWidth={100}
|
|
43
|
+
borderRadius={300}
|
|
44
|
+
>
|
|
45
|
+
<Box as="span" padding={2}>
|
|
46
|
+
<Text font="headline" as="span">
|
|
47
|
+
Click me...
|
|
48
|
+
</Text>
|
|
49
|
+
</Box>
|
|
50
|
+
</Pressable>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Block Pressable
|
|
54
|
+
|
|
55
|
+
Pressables expand to 100% width when the `block` prop is passed.
|
|
56
|
+
|
|
57
|
+
```jsx live
|
|
58
|
+
<Pressable
|
|
59
|
+
block
|
|
60
|
+
as="button"
|
|
61
|
+
onClick={console.log}
|
|
62
|
+
background="bgAlternate"
|
|
63
|
+
borderColor="lineHeavy"
|
|
64
|
+
borderWidth={100}
|
|
65
|
+
borderRadius={300}
|
|
66
|
+
>
|
|
67
|
+
<Box as="span" padding={2}>
|
|
68
|
+
<Text font="headline" as="span">
|
|
69
|
+
Click me...
|
|
70
|
+
</Text>
|
|
71
|
+
</Box>
|
|
72
|
+
</Pressable>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### A11y
|
|
76
|
+
|
|
77
|
+
On mobile, all [AccessibilityProps](https://reactnative.dev/docs/accessibility#accessibility-properties) can be passed, with `accessibilityComponentType` and `accessibilityTraits` defaulting to `button`, and `accessibilityState` being set based on loading/disabled props.
|
|
78
|
+
|
|
79
|
+
On web, all [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) can be passed, with `aria-busy` being set based on loading/disabled props.
|
|
80
|
+
|
|
81
|
+
> The `as` prop allows any component to be used, but be sure you are using semantically correct elements! For example, no clickable divs.
|
|
82
|
+
|
|
11
83
|
## Props
|
|
12
84
|
|
|
13
85
|
| Prop | Type | Required | Default | Description |
|
|
@@ -119,76 +191,3 @@ import { Pressable } from '@coinbase/cds-web/system/Pressable'
|
|
|
119
191
|
| `zIndex` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
|
|
120
192
|
|
|
121
193
|
|
|
122
|
-
## Examples
|
|
123
|
-
|
|
124
|
-
### Basic Pressable
|
|
125
|
-
|
|
126
|
-
Pressables support an `onClick` prop for handling click/press interactions. When being pressed, the element will scale down to mimic a real-world button press. If this functionality is not desired, pass the `noScaleOnPress` prop.
|
|
127
|
-
|
|
128
|
-
```jsx live
|
|
129
|
-
<Pressable
|
|
130
|
-
onClick={console.log}
|
|
131
|
-
as="button"
|
|
132
|
-
background="bgAlternate"
|
|
133
|
-
borderColor="lineHeavy"
|
|
134
|
-
borderWidth={100}
|
|
135
|
-
borderRadius={300}
|
|
136
|
-
>
|
|
137
|
-
<Box as="span" padding={2}>
|
|
138
|
-
<Text font="headline" as="span">
|
|
139
|
-
Click me...
|
|
140
|
-
</Text>
|
|
141
|
-
</Box>
|
|
142
|
-
</Pressable>
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
### Pressable with Transparent Background
|
|
146
|
-
|
|
147
|
-
```jsx live
|
|
148
|
-
<Pressable
|
|
149
|
-
onClick={console.log}
|
|
150
|
-
as="button"
|
|
151
|
-
background="transparent"
|
|
152
|
-
borderColor="lineHeavy"
|
|
153
|
-
borderWidth={100}
|
|
154
|
-
borderRadius={300}
|
|
155
|
-
>
|
|
156
|
-
<Box as="span" padding={2}>
|
|
157
|
-
<Text font="headline" as="span">
|
|
158
|
-
Click me...
|
|
159
|
-
</Text>
|
|
160
|
-
</Box>
|
|
161
|
-
</Pressable>
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### Block Pressable
|
|
165
|
-
|
|
166
|
-
Pressables expand to 100% width when the `block` prop is passed.
|
|
167
|
-
|
|
168
|
-
```jsx live
|
|
169
|
-
<Pressable
|
|
170
|
-
block
|
|
171
|
-
as="button"
|
|
172
|
-
onClick={console.log}
|
|
173
|
-
background="bgAlternate"
|
|
174
|
-
borderColor="lineHeavy"
|
|
175
|
-
borderWidth={100}
|
|
176
|
-
borderRadius={300}
|
|
177
|
-
>
|
|
178
|
-
<Box as="span" padding={2}>
|
|
179
|
-
<Text font="headline" as="span">
|
|
180
|
-
Click me...
|
|
181
|
-
</Text>
|
|
182
|
-
</Box>
|
|
183
|
-
</Pressable>
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### A11y
|
|
187
|
-
|
|
188
|
-
On mobile, all [AccessibilityProps](https://reactnative.dev/docs/accessibility#accessibility-properties) can be passed, with `accessibilityComponentType` and `accessibilityTraits` defaulting to `button`, and `accessibilityState` being set based on loading/disabled props.
|
|
189
|
-
|
|
190
|
-
On web, all [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) can be passed, with `aria-busy` being set based on loading/disabled props.
|
|
191
|
-
|
|
192
|
-
> The `as` prop allows any component to be used, but be sure you are using semantically correct elements! For example, no clickable divs.
|
|
193
|
-
|
|
194
|
-
|
|
@@ -4,30 +4,10 @@ A visual indicator of completion progress.
|
|
|
4
4
|
|
|
5
5
|
## Import
|
|
6
6
|
|
|
7
|
-
```
|
|
7
|
+
```tsx
|
|
8
8
|
import { ProgressBar } from '@coinbase/cds-web/visualizations/ProgressBar'
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
## Props
|
|
12
|
-
|
|
13
|
-
| Prop | Type | Required | Default | Description |
|
|
14
|
-
| --- | --- | --- | --- | --- |
|
|
15
|
-
| `progress` | `number` | Yes | `-` | Number between 0-1 representing the progress percentage |
|
|
16
|
-
| `className` | `string` | No | `-` | Custom class name for the progress bar root. |
|
|
17
|
-
| `classNames` | `{ root?: string; progress?: string \| undefined; } \| undefined` | No | `-` | Custom class names for the progress bar. |
|
|
18
|
-
| `color` | `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 | `primary` | Custom progress color. |
|
|
19
|
-
| `disableAnimateOnMount` | `boolean` | No | `false` | Disable animation on component mount |
|
|
20
|
-
| `disabled` | `boolean` | No | `false` | Toggle used to show a disabled progress visualization |
|
|
21
|
-
| `key` | `Key \| null` | No | `-` | - |
|
|
22
|
-
| `onAnimationEnd` | `(() => void)` | No | `-` | Callback fired when the progress animation ends. |
|
|
23
|
-
| `onAnimationStart` | `(() => void)` | No | `-` | Callback fired when the progress animation starts. |
|
|
24
|
-
| `ref` | `RefObject<HTMLDivElement> \| ((instance: HTMLDivElement \| null) => void) \| null` | No | `-` | - |
|
|
25
|
-
| `style` | `CSSProperties` | No | `-` | Custom styles for the progress bar root. |
|
|
26
|
-
| `styles` | `{ root?: CSSProperties; progress?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for the progress bar. |
|
|
27
|
-
| `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
|
|
28
|
-
| `weight` | `normal \| heavy \| thin \| semiheavy` | No | `normal` | Toggle used to change thickness of progress visualization |
|
|
29
|
-
|
|
30
|
-
|
|
31
11
|
## Examples
|
|
32
12
|
|
|
33
13
|
#### Default
|
|
@@ -161,4 +141,23 @@ function Example() {
|
|
|
161
141
|
}
|
|
162
142
|
```
|
|
163
143
|
|
|
144
|
+
## Props
|
|
145
|
+
|
|
146
|
+
| Prop | Type | Required | Default | Description |
|
|
147
|
+
| --- | --- | --- | --- | --- |
|
|
148
|
+
| `progress` | `number` | Yes | `-` | Number between 0-1 representing the progress percentage |
|
|
149
|
+
| `className` | `string` | No | `-` | Custom class name for the progress bar root. |
|
|
150
|
+
| `classNames` | `{ root?: string; progress?: string \| undefined; } \| undefined` | No | `-` | Custom class names for the progress bar. |
|
|
151
|
+
| `color` | `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 | `primary` | Custom progress color. |
|
|
152
|
+
| `disableAnimateOnMount` | `boolean` | No | `false` | Disable animation on component mount |
|
|
153
|
+
| `disabled` | `boolean` | No | `false` | Toggle used to show a disabled progress visualization |
|
|
154
|
+
| `key` | `Key \| null` | No | `-` | - |
|
|
155
|
+
| `onAnimationEnd` | `(() => void)` | No | `-` | Callback fired when the progress animation ends. |
|
|
156
|
+
| `onAnimationStart` | `(() => void)` | No | `-` | Callback fired when the progress animation starts. |
|
|
157
|
+
| `ref` | `RefObject<HTMLDivElement> \| ((instance: HTMLDivElement \| null) => void) \| null` | No | `-` | - |
|
|
158
|
+
| `style` | `CSSProperties` | No | `-` | Custom styles for the progress bar root. |
|
|
159
|
+
| `styles` | `{ root?: CSSProperties; progress?: CSSProperties \| undefined; } \| undefined` | No | `-` | Custom styles for the progress bar. |
|
|
160
|
+
| `testID` | `string` | No | `-` | Used to locate this element in unit and end-to-end tests. Under the hood, testID translates to data-testid on Web. On Mobile, testID stays the same - testID |
|
|
161
|
+
| `weight` | `normal \| heavy \| thin \| semiheavy` | No | `normal` | Toggle used to change thickness of progress visualization |
|
|
162
|
+
|
|
164
163
|
|