@coinbase/cds-mcp-server 8.51.0 → 8.52.1
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/AreaChart.txt +12 -222
- package/mcp-docs/mobile/components/Avatar.txt +1 -1
- package/mcp-docs/mobile/components/AvatarButton.txt +1 -1
- package/mcp-docs/mobile/components/Banner.txt +2 -2
- package/mcp-docs/mobile/components/BarChart.txt +222 -333
- package/mcp-docs/mobile/components/Box.txt +1 -1
- package/mcp-docs/mobile/components/BrowserBar.txt +1 -1
- package/mcp-docs/mobile/components/Button.txt +3 -3
- package/mcp-docs/mobile/components/Carousel.txt +1 -1
- package/mcp-docs/mobile/components/CartesianChart.txt +6 -3
- package/mcp-docs/mobile/components/CellMedia.txt +2 -2
- package/mcp-docs/mobile/components/CheckboxCell.txt +1 -1
- package/mcp-docs/mobile/components/Chip.txt +75 -30
- package/mcp-docs/mobile/components/Coachmark.txt +1 -1
- package/mcp-docs/mobile/components/ContentCard.txt +1 -1
- package/mcp-docs/mobile/components/ContentCardBody.txt +1 -1
- package/mcp-docs/mobile/components/ContentCardFooter.txt +1 -1
- package/mcp-docs/mobile/components/ContentCardHeader.txt +1 -1
- package/mcp-docs/mobile/components/ContentCell.txt +1 -1
- package/mcp-docs/mobile/components/ControlGroup.txt +1 -1
- package/mcp-docs/mobile/components/DataCard.txt +1 -1
- package/mcp-docs/mobile/components/DateInput.txt +1 -1
- package/mcp-docs/mobile/components/DatePicker.txt +1 -1
- package/mcp-docs/mobile/components/Divider.txt +1 -1
- package/mcp-docs/mobile/components/DotSymbol.txt +1 -1
- package/mcp-docs/mobile/components/Fallback.txt +62 -9
- package/mcp-docs/mobile/components/HStack.txt +1 -1
- package/mcp-docs/mobile/components/Icon.txt +1 -1
- package/mcp-docs/mobile/components/IconButton.txt +2 -2
- package/mcp-docs/mobile/components/InputChip.txt +1 -1
- package/mcp-docs/mobile/components/Interactable.txt +1 -1
- package/mcp-docs/mobile/components/LineChart.txt +54 -134
- package/mcp-docs/mobile/components/Link.txt +1 -1
- package/mcp-docs/mobile/components/ListCell.txt +1 -1
- package/mcp-docs/mobile/components/Lottie.txt +21 -5
- package/mcp-docs/mobile/components/LottieStatusAnimation.txt +3 -3
- package/mcp-docs/mobile/components/MediaCard.txt +1 -1
- package/mcp-docs/mobile/components/MediaChip.txt +1 -1
- package/mcp-docs/mobile/components/MessagingCard.txt +1 -1
- package/mcp-docs/mobile/components/MultiContentModule.txt +1 -1
- package/mcp-docs/mobile/components/NavigationTitle.txt +1 -1
- package/mcp-docs/mobile/components/NavigationTitleSelect.txt +1 -1
- package/mcp-docs/mobile/components/Numpad.txt +1 -1
- package/mcp-docs/mobile/components/Overlay.txt +1 -1
- package/mcp-docs/mobile/components/PageFooter.txt +1 -1
- package/mcp-docs/mobile/components/PageHeader.txt +1 -1
- package/mcp-docs/mobile/components/Point.txt +1 -0
- package/mcp-docs/mobile/components/Pressable.txt +1 -1
- package/mcp-docs/mobile/components/RadioCell.txt +1 -1
- package/mcp-docs/mobile/components/RemoteImage.txt +1 -1
- package/mcp-docs/mobile/components/RollingNumber.txt +1 -1
- package/mcp-docs/mobile/components/Scrubber.txt +144 -1
- package/mcp-docs/mobile/components/SearchInput.txt +1 -1
- package/mcp-docs/mobile/components/SegmentedTabs.txt +1 -1
- package/mcp-docs/mobile/components/SelectChip.txt +1 -1
- package/mcp-docs/mobile/components/SlideButton.txt +1 -1
- package/mcp-docs/mobile/components/Stepper.txt +1 -1
- package/mcp-docs/mobile/components/TabLabel.txt +1 -1
- package/mcp-docs/mobile/components/TabNavigation.txt +1 -1
- package/mcp-docs/mobile/components/TabbedChips.txt +1 -1
- package/mcp-docs/mobile/components/Tabs.txt +1 -1
- package/mcp-docs/mobile/components/Tag.txt +3 -3
- package/mcp-docs/mobile/components/Text.txt +1 -1
- package/mcp-docs/mobile/components/TextInput.txt +1 -1
- package/mcp-docs/mobile/components/Toast.txt +1 -1
- package/mcp-docs/mobile/components/VStack.txt +1 -1
- package/mcp-docs/mobile/components/XAxis.txt +54 -1
- package/mcp-docs/mobile/components/YAxis.txt +3 -1
- package/mcp-docs/mobile/routes.txt +1 -1
- package/mcp-docs/web/components/AreaChart.txt +26 -118
- package/mcp-docs/web/components/AvatarButton.txt +2 -2
- package/mcp-docs/web/components/Banner.txt +1 -1
- package/mcp-docs/web/components/BarChart.txt +228 -116
- package/mcp-docs/web/components/Box.txt +2 -2
- package/mcp-docs/web/components/Button.txt +4 -4
- package/mcp-docs/web/components/CartesianChart.txt +6 -3
- package/mcp-docs/web/components/CellMedia.txt +1 -1
- package/mcp-docs/web/components/Chip.txt +74 -29
- package/mcp-docs/web/components/ContentCard.txt +2 -2
- package/mcp-docs/web/components/ContentCardBody.txt +2 -2
- package/mcp-docs/web/components/ContentCardFooter.txt +2 -2
- package/mcp-docs/web/components/ContentCardHeader.txt +2 -2
- package/mcp-docs/web/components/ContentCell.txt +2 -2
- package/mcp-docs/web/components/DotSymbol.txt +1 -1
- package/mcp-docs/web/components/Fallback.txt +67 -10
- package/mcp-docs/web/components/FocusTrap.txt +2 -1
- package/mcp-docs/web/components/FullscreenModal.txt +2 -2
- package/mcp-docs/web/components/FullscreenModalLayout.txt +2 -2
- package/mcp-docs/web/components/Grid.txt +2 -2
- package/mcp-docs/web/components/GridColumn.txt +2 -2
- package/mcp-docs/web/components/HStack.txt +2 -2
- package/mcp-docs/web/components/Icon.txt +1 -1
- package/mcp-docs/web/components/IconButton.txt +3 -3
- package/mcp-docs/web/components/Interactable.txt +2 -2
- package/mcp-docs/web/components/LineChart.txt +42 -2
- package/mcp-docs/web/components/Link.txt +2 -2
- package/mcp-docs/web/components/ListCell.txt +2 -2
- package/mcp-docs/web/components/Lottie.txt +8 -2
- package/mcp-docs/web/components/LottieStatusAnimation.txt +2 -2
- package/mcp-docs/web/components/Modal.txt +67 -2
- package/mcp-docs/web/components/MultiContentModule.txt +2 -2
- package/mcp-docs/web/components/Point.txt +1 -0
- package/mcp-docs/web/components/Pressable.txt +2 -2
- package/mcp-docs/web/components/ReferenceLine.txt +1 -1
- package/mcp-docs/web/components/RollingNumber.txt +2 -2
- package/mcp-docs/web/components/Scrubber.txt +184 -1
- package/mcp-docs/web/components/SidebarItem.txt +1 -1
- package/mcp-docs/web/components/Spacer.txt +2 -2
- package/mcp-docs/web/components/TableCellFallback.txt +2 -2
- package/mcp-docs/web/components/Tag.txt +2 -2
- package/mcp-docs/web/components/Text.txt +2 -2
- package/mcp-docs/web/components/TileButton.txt +2 -2
- package/mcp-docs/web/components/Tray.txt +69 -2
- package/mcp-docs/web/components/VStack.txt +2 -2
- package/mcp-docs/web/components/XAxis.txt +55 -2
- package/mcp-docs/web/components/YAxis.txt +4 -2
- package/mcp-docs/web/routes.txt +1 -1
- package/package.json +1 -1
|
@@ -252,7 +252,7 @@ An icon button with a badge showing the notification count. Uses `DotCount` to d
|
|
|
252
252
|
|
|
253
253
|
| Prop | Type | Required | Default | Description |
|
|
254
254
|
| --- | --- | --- | --- | --- |
|
|
255
|
-
| `name` | `key \| search \| pin \| filter \| visible \| continuous \| auto \| loop \| warning \| error \| account \| activity \| add \| addPeople \| advancedMarketSelector \| advancedTradeProduct \| affiliates \| airdrop \| airdropAlt \| airdropCoins \| airdropParachute \| alien \| allTimeHigh \| allocation \| annotation \| api \| apiPlug \| apothecary \| appSwitcher \| apple \| appleLogo \|
|
|
255
|
+
| `name` | `key \| search \| pin \| filter \| visible \| continuous \| auto \| loop \| image \| menu \| list \| application \| document \| grid \| group \| warning \| error \| account \| activity \| add \| addPeople \| advancedMarketSelector \| advancedTradeProduct \| affiliates \| airdrop \| airdropAlt \| airdropCoins \| airdropParachute \| alien \| allTimeHigh \| allocation \| annotation \| api \| apiPlug \| apothecary \| appSwitcher \| apple \| appleLogo \| arrowDown \| arrowLeft \| arrowRight \| arrowUp \| arrowsHorizontal \| arrowsUpDown \| arrowsVertical \| artwork \| assetHubProduct \| assetManagementProduct \| astronautHelmet \| atSign \| atomScience \| autoCar \| avatar \| average \| backArrow \| ballot \| ballotbox \| bandage \| bank \| barChartSimple \| barChartWindow \| base \| baseApps \| baseFeed \| baseNotification \| baseQuickBuy \| baseSquare \| baseTransact \| baseVerification \| baseWallet \| baseball \| basketball \| beaker \| beginningArrow \| bell \| bellCheck \| bellPlus \| birthcertificate \| block \| blockchain \| blog \| book \| bookmark \| borrowProduct \| boxing \| bridging \| briefcase \| briefcaseAlt \| browser \| bug \| building \| calculator \| calendar \| calendarBlank \| calendarDates \| calendarEmpty \| calendarHeart \| calendarMoney \| calendarStar \| camera \| candlesticks \| car \| card \| caret \| caretDown \| caretLeft \| caretRight \| caretUp \| cash \| cashAustralianDollar \| cashBrazilianReal \| cashBrazillianReal \| cashCanadianDollar \| cashCoins \| cashEUR \| cashGBP \| cashIndonesianRupiah \| cashJPY \| cashPhilippinePeso \| cashPolishZloty \| cashRupee \| cashSingaporeDollar \| cashSwissFranc \| cashThaiBaht \| cashTurkishLira \| cashUSD \| cashUaeDirham \| cashVietnameseDong \| chainLink \| chartBar \| chartCandles \| chartLine \| chartPie \| chartPieCircle \| chartVolume \| chatBotAgent \| chatBubble \| chatRequests \| checkboxChecked \| checkboxEmpty \| checkmark \| chess \| circleCheckmark \| circleCross \| circulatingSupply \| city \| clipboard \| clock \| clockOutline \| close \| closeCaption \| clothing \| cloud \| cloudPartial \| cloudProduct \| cluster \| coinbase \| coinbaseCardProduct \| coinbaseOne \| coinbaseOneCard \| coinbaseOneLogo \| coinbaseRewards \| coinsCrypto \| collapse \| collectibles \| collection \| comment \| commentPlus \| commerceProduct \| compass \| complianceProduct \| compose \| computerChip \| concierge \| conciergeBell \| config \| convert \| copy \| corporation \| creatorCoin \| cricket \| cross \| crossTrade \| crypto \| cryptobasics \| crystalBall \| crystalBallInsight \| currencies \| custodyProduct \| dashboard \| dataMarketplaceProduct \| dataStack \| defi \| delegateProduct \| deposit \| derivatives \| derivativesProduct \| derivativesProductNew \| developerAPIProduct \| developerPlatformProduct \| dex \| diagonalDownArrow \| diagonalRightArrow \| diagonalUpArrow \| diamond \| diamondIncentives \| dinnerPlate \| directDeposit \| directDepositIcon \| disabledPhone \| discordLogo \| distribution \| documentation \| dot \| doubleChevronRight \| downArrow \| download \| drag \| drops \| earn \| earnProduct \| earnRewards \| earthquake \| educationBook \| educationPencil \| email \| endArrow \| entertainment \| ethereum \| eventContracts \| exchangeProduct \| exclamationMark \| expand \| expandAddress \| expandAll \| externalLink \| eye \| faceScan \| faces \| factory \| faucet \| fib \| filmStrip \| filterLineStack \| fingerprint \| flame \| folder \| folderArrow \| folderOpen \| followAdd \| following \| football \| fork \| forwardArrow \| fscsProtection \| gab \| games \| gaming \| gasFees \| gasFeesAlt \| gauge \| gaugeEmpty \| gaugeHigh \| gaugeHighLow \| gaugeHighMid \| gaugeLow \| gaugeLowHigh \| gaugeLowMid \| gaugeMedium \| gavel \| gear \| generalCharacter \| ghost \| gif \| giftBox \| giftCard \| gitHubLogo \| globe \| golf \| googleLogo \| greenEnergy \| hamburger \| hammer \| heart \| helpCenterProduct \| helpCenterQuestionMark \| hiddenEye \| hockey \| home \| horizontalLine \| hospital \| hospitalCross \| hurricane \| ideal \| identityCard \| info \| initiator \| instagramLogo \| instantUnstakingClock \| institute \| institutionalProduct \| interest \| invisible \| invoice \| keyboard \| laptop \| leadChart \| leadCoin \| learningRewardsProduct \| light \| lightbulb \| lightning \| lightningBolt \| lineChartCrypto \| location \| lock \| login \| logout \| magnifyingGlass \| marketCap \| medal \| megaphone \| metaverse \| microphone \| microphoneCordless \| microscope \| mint \| minus \| mma \| moneyCardCoin \| moon \| more \| moreVertical \| motorsport \| music \| musicArticles \| needle \| newsFeed \| newsletter \| nft \| nftBuy \| nftOffer \| nftProduct \| nftSale \| noRocket \| noWifi \| nodeProduct \| oil \| options \| orderBook \| orderHistory \| outline \| pFPS \| paperAirplane \| paperclip \| participate \| participateProduct \| passKey \| passport \| pause \| pay \| payProduct \| paymentCard \| payments \| payouts \| paypal \| pencil \| peopleGroup \| peopleStar \| percentage \| perpetualSwap \| phone \| pieChartData \| pieChartWithArrow \| pillBottle \| pillCapsule \| plane \| planet \| play \| playbutton \| plusMinus \| podiumStar \| politicsBuilding \| politicsCandidate \| politicsFlag \| politicsGavel \| politicsPodium \| politicsStar \| powerTool \| priceAlerts \| priceAlertsCheck \| primePoduct \| privateClientProduct \| proProduct \| profile \| protection \| pulse \| pyramid \| qrCode \| qrCodeAlt \| queryTransact \| questionMark \| quotation \| rain \| ratingsCheck \| ratingsChecks \| ratingsStar \| reCenter \| rectangle \| recurring \| refresh \| regulated \| regulatedFutures \| report \| rewardsProduct \| ribbon \| robot \| rocket \| rocketShip \| rollingSpot \| rosettaProduct \| rottenTomato \| royalty \| safe \| save \| savingsBank \| scanQrCode \| scienceAtom \| scienceBeaker \| scienceMoon \| securityKey \| securityShield \| seen \| sendReceive \| setPinCode \| settings \| share \| shield \| shieldOutline \| shoe \| shoppingCart \| signinProduct \| singleCoin \| singleNote \| singlecloud \| smartContract \| snow \| soccer \| socialChat \| socialReshare \| socialShare \| sofort \| sortDoubleArrow \| sortDown \| sortDownCenter \| sortUp \| sortUpCenter \| soundOff \| soundOn \| sparkle \| speaker \| speechBubble \| stableCoin \| stablecoinStack \| staggeredList \| stake \| staking \| star \| starAward \| starBubble \| starTrophy \| statusDot \| step0 \| step1 \| step2 \| step3 \| step4 \| step5 \| step6 \| step7 \| step8 \| step9 \| strategy \| sun \| support \| tag \| taxes \| taxesReceipt \| telephone \| tennis \| test \| thermometer \| thumbsDown \| thumbsDownOutline \| thumbsUp \| thumbsUpOutline \| tokenLaunchCoin \| tokenLaunchRocket \| tokenSales \| tornado \| trading \| transactions \| trashCan \| trophy \| trophyCup \| tshirt \| tv \| tvStand \| twitterLogo \| ultility \| umbrella \| undo \| unfollowPeople \| unknown \| unlock \| upArrow \| upload \| usdc \| venturesProduct \| verifiedBadge \| verifiedPools \| verticalLine \| virus \| waasProduct \| wallet \| walletLogo \| walletProduct \| webhooks \| wellness \| wifi \| wind \| wireTransfer \| withdraw \| wrapToken \| xLogo` | Yes | `-` | Name of the icon, as defined in Figma. |
|
|
256
256
|
| `about` | `string \| undefined` | No | `-` | - |
|
|
257
257
|
| `accessKey` | `string \| undefined` | No | `-` | - |
|
|
258
258
|
| `active` | `boolean` | No | `-` | Whether the icon is active |
|
|
@@ -271,7 +271,7 @@ An icon button with a badge showing the notification count. Uses `DotCount` to d
|
|
|
271
271
|
| `aria-colindextext` | `string \| undefined` | No | `-` | Defines a human readable text alternative of aria-colindex. |
|
|
272
272
|
| `aria-colspan` | `number \| undefined` | No | `-` | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. |
|
|
273
273
|
| `aria-controls` | `string \| undefined` | No | `-` | Identifies the element (or elements) whose contents or presence are controlled by the current element. |
|
|
274
|
-
| `aria-current` | `boolean \| time \|
|
|
274
|
+
| `aria-current` | `boolean \| time \| true \| false \| page \| step \| location \| date \| undefined` | No | `-` | Indicates the element that represents the current item within a container or set of related elements. |
|
|
275
275
|
| `aria-describedby` | `string \| undefined` | No | `-` | Identifies the element (or elements) that describes the object. |
|
|
276
276
|
| `aria-description` | `string \| undefined` | No | `-` | Defines a string value that describes or annotates the current element. |
|
|
277
277
|
| `aria-details` | `string \| undefined` | No | `-` | Identifies the element that provides a detailed, extended description for the object. |
|
|
@@ -397,7 +397,7 @@ An icon button with a badge showing the notification count. Uses `DotCount` to d
|
|
|
397
397
|
| `iconSize` | `xs \| s \| m \| l` | No | `compact ? 's' : 'm'` | Size for the icon rendered inside the button. |
|
|
398
398
|
| `id` | `string \| undefined` | No | `-` | - |
|
|
399
399
|
| `inlist` | `any` | No | `-` | - |
|
|
400
|
-
| `inputMode` | `search \| text \| none \|
|
|
400
|
+
| `inputMode` | `search \| text \| none \| tel \| url \| email \| numeric \| decimal \| undefined` | No | `-` | Hints at the type of data that might be entered by the user while editing the element or its contents |
|
|
401
401
|
| `is` | `string \| undefined` | No | `-` | Specify that a standard HTML element should behave like a defined custom built-in element |
|
|
402
402
|
| `itemID` | `string \| undefined` | No | `-` | - |
|
|
403
403
|
| `itemProp` | `string \| undefined` | No | `-` | - |
|
|
@@ -103,7 +103,7 @@ Since this component is low-level, it doesn't require much accessibility out of
|
|
|
103
103
|
| `aria-colindextext` | `string \| undefined` | No | `-` | Defines a human readable text alternative of aria-colindex. |
|
|
104
104
|
| `aria-colspan` | `number \| undefined` | No | `-` | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. |
|
|
105
105
|
| `aria-controls` | `string \| undefined` | No | `-` | Identifies the element (or elements) whose contents or presence are controlled by the current element. |
|
|
106
|
-
| `aria-current` | `boolean \| time \|
|
|
106
|
+
| `aria-current` | `boolean \| time \| true \| false \| page \| step \| location \| date \| undefined` | No | `-` | Indicates the element that represents the current item within a container or set of related elements. |
|
|
107
107
|
| `aria-describedby` | `string \| undefined` | No | `-` | Identifies the element (or elements) that describes the object. |
|
|
108
108
|
| `aria-description` | `string \| undefined` | No | `-` | Defines a string value that describes or annotates the current element. |
|
|
109
109
|
| `aria-details` | `string \| undefined` | No | `-` | Identifies the element that provides a detailed, extended description for the object. |
|
|
@@ -225,7 +225,7 @@ Since this component is low-level, it doesn't require much accessibility out of
|
|
|
225
225
|
| `hidden` | `boolean \| undefined` | No | `-` | - |
|
|
226
226
|
| `id` | `string \| undefined` | No | `-` | - |
|
|
227
227
|
| `inlist` | `any` | No | `-` | - |
|
|
228
|
-
| `inputMode` | `search \| text \| none \|
|
|
228
|
+
| `inputMode` | `search \| text \| none \| tel \| url \| email \| numeric \| decimal \| undefined` | No | `-` | Hints at the type of data that might be entered by the user while editing the element or its contents |
|
|
229
229
|
| `is` | `string \| undefined` | No | `-` | Specify that a standard HTML element should behave like a defined custom built-in element |
|
|
230
230
|
| `itemID` | `string \| undefined` | No | `-` | - |
|
|
231
231
|
| `itemProp` | `string \| undefined` | No | `-` | - |
|
|
@@ -29,6 +29,45 @@ The only prop required is `series`, which takes an array of series objects. Each
|
|
|
29
29
|
/>
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
+
### Layout
|
|
33
|
+
|
|
34
|
+
Lines can be rendered horizontally or vertically by setting the `layout` prop.
|
|
35
|
+
|
|
36
|
+
```jsx live
|
|
37
|
+
function HorizontalLine() {
|
|
38
|
+
const dataset = [
|
|
39
|
+
{ month: 'Jan', seoul: 21 },
|
|
40
|
+
{ month: 'Feb', seoul: 28 },
|
|
41
|
+
{ month: 'Mar', seoul: 41 },
|
|
42
|
+
{ month: 'Apr', seoul: 73 },
|
|
43
|
+
{ month: 'May', seoul: 99 },
|
|
44
|
+
{ month: 'June', seoul: 144 },
|
|
45
|
+
{ month: 'July', seoul: 319 },
|
|
46
|
+
{ month: 'Aug', seoul: 249 },
|
|
47
|
+
{ month: 'Sept', seoul: 131 },
|
|
48
|
+
{ month: 'Oct', seoul: 55 },
|
|
49
|
+
{ month: 'Nov', seoul: 48 },
|
|
50
|
+
{ month: 'Dec', seoul: 25 },
|
|
51
|
+
];
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<LineChart
|
|
55
|
+
height={400}
|
|
56
|
+
layout="horizontal"
|
|
57
|
+
series={[
|
|
58
|
+
{ id: 'seoul', data: dataset.map((d) => d.seoul), color: 'var(--color-accentBoldBlue)' },
|
|
59
|
+
]}
|
|
60
|
+
showXAxis
|
|
61
|
+
showYAxis
|
|
62
|
+
xAxis={{ label: 'rainfall (mm)' }}
|
|
63
|
+
yAxis={{
|
|
64
|
+
data: dataset.map((d) => d.month),
|
|
65
|
+
}}
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
32
71
|
LineChart also supports multiple lines, interaction, and axes.
|
|
33
72
|
Other props, such as `areaType` can be applied to the chart as a whole or per series.
|
|
34
73
|
|
|
@@ -1973,6 +2012,7 @@ function ForecastAssetPrice() {
|
|
|
1973
2012
|
| `inset` | `number \| Partial<ChartInset>` | No | `-` | Inset around the entire chart (outside the axes). |
|
|
1974
2013
|
| `justifyContent` | `ResponsiveProp<left \| right \| center \| normal \| start \| end \| flex-start \| flex-end \| space-between \| space-around \| space-evenly \| stretch>` | No | `-` | - |
|
|
1975
2014
|
| `key` | `Key \| null` | No | `-` | - |
|
|
2015
|
+
| `layout` | `horizontal \| vertical` | No | `'vertical'` | Chart layout - describes the direction bars/areas grow. - vertical (default): Bars grow vertically. X is category axis, Y is value axis. - horizontal: Bars grow horizontally. Y is category axis, X is value axis. |
|
|
1976
2016
|
| `left` | `ResponsiveProp<Left<string \| number>>` | No | `-` | - |
|
|
1977
2017
|
| `legend` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Whether to show the legend or a custom legend element. - true renders the default Legend component - A React element renders that element as the legend - false or omitted hides the legend |
|
|
1978
2018
|
| `legendAccessibilityLabel` | `string` | No | `'Legend'` | Accessibility label for the legend group. |
|
|
@@ -2027,8 +2067,8 @@ function ForecastAssetPrice() {
|
|
|
2027
2067
|
| `userSelect` | `ResponsiveProp<text \| none \| all \| auto>` | No | `-` | - |
|
|
2028
2068
|
| `visibility` | `ResponsiveProp<hidden \| visible>` | No | `-` | - |
|
|
2029
2069
|
| `width` | `ResponsiveProp<Width<string \| number>>` | No | `-` | - |
|
|
2030
|
-
| `xAxis` | `(Partial<
|
|
2031
|
-
| `yAxis` | `(Partial<
|
|
2070
|
+
| `xAxis` | `(Partial<CartesianAxisConfigProps> & SharedProps & { bandGridLinePlacement?: AxisBandPlacement; bandTickMarkPlacement?: AxisBandPlacement \| undefined; label?: string \| undefined; labelGap?: number \| undefined; minTickLabelGap?: number \| undefined; requestedTickCount?: number \| undefined; showGrid?: boolean \| undefined; showLine?: boolean \| undefined; showTickMarks?: boolean \| undefined; tickMarkSize?: number \| undefined; ticks?: number[] \| ((value: number) => boolean) \| undefined; tickMarkLabelGap?: number \| undefined; tickInterval?: number \| undefined; tickMinStep?: number \| undefined; tickMaxStep?: number \| undefined; } & { className?: string \| undefined; classNames?: { root?: string \| undefined; label?: string \| undefined; tickLabel?: string \| undefined; gridLine?: string \| undefined; line?: string \| undefined; tickMark?: string \| undefined; } \| undefined; style?: CSSProperties \| undefined; styles?: { root?: CSSProperties \| undefined; label?: CSSProperties \| undefined; tickLabel?: CSSProperties \| undefined; gridLine?: CSSProperties \| undefined; line?: CSSProperties \| undefined; tickMark?: CSSProperties \| undefined; } \| undefined; GridLineComponent?: LineComponent \| undefined; LineComponent?: LineComponent \| undefined; TickMarkLineComponent?: LineComponent \| undefined; tickLabelFormatter?: ((value: number) => ChartTextChildren) \| undefined; TickLabelComponent?: AxisTickLabelComponent \| undefined; } & { axisId?: string \| undefined; position?: top \| bottom \| undefined; height?: number \| undefined; }) \| undefined` | No | `-` | Configuration for x-axis. Accepts axis config and axis props. To show the axis, set showXAxis to true. |
|
|
2071
|
+
| `yAxis` | `(Partial<CartesianAxisConfigProps> & SharedProps & { bandGridLinePlacement?: AxisBandPlacement; bandTickMarkPlacement?: AxisBandPlacement \| undefined; label?: string \| undefined; labelGap?: number \| undefined; minTickLabelGap?: number \| undefined; requestedTickCount?: number \| undefined; showGrid?: boolean \| undefined; showLine?: boolean \| undefined; showTickMarks?: boolean \| undefined; tickMarkSize?: number \| undefined; ticks?: number[] \| ((value: number) => boolean) \| undefined; tickMarkLabelGap?: number \| undefined; tickInterval?: number \| undefined; tickMinStep?: number \| undefined; tickMaxStep?: number \| undefined; } & { className?: string \| undefined; classNames?: { root?: string \| undefined; label?: string \| undefined; tickLabel?: string \| undefined; gridLine?: string \| undefined; line?: string \| undefined; tickMark?: string \| undefined; } \| undefined; style?: CSSProperties \| undefined; styles?: { root?: CSSProperties \| undefined; label?: CSSProperties \| undefined; tickLabel?: CSSProperties \| undefined; gridLine?: CSSProperties \| undefined; line?: CSSProperties \| undefined; tickMark?: CSSProperties \| undefined; } \| undefined; GridLineComponent?: LineComponent \| undefined; LineComponent?: LineComponent \| undefined; TickMarkLineComponent?: LineComponent \| undefined; tickLabelFormatter?: ((value: number) => ChartTextChildren) \| undefined; TickLabelComponent?: AxisTickLabelComponent \| undefined; } & { axisId?: string \| undefined; position?: left \| right \| undefined; width?: number \| undefined; }) \| undefined` | No | `-` | Configuration for y-axis. Accepts axis config and axis props. To show the axis, set showYAxis to true. |
|
|
2032
2072
|
| `zIndex` | `inherit \| auto \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
2033
2073
|
|
|
2034
2074
|
|
|
@@ -235,7 +235,7 @@ Use the `underline` prop on inline links within body text to ensure they are dis
|
|
|
235
235
|
| `aria-colindextext` | `string \| undefined` | No | `-` | Defines a human readable text alternative of aria-colindex. |
|
|
236
236
|
| `aria-colspan` | `number \| undefined` | No | `-` | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. |
|
|
237
237
|
| `aria-controls` | `string \| undefined` | No | `-` | Identifies the element (or elements) whose contents or presence are controlled by the current element. |
|
|
238
|
-
| `aria-current` | `boolean \| time \|
|
|
238
|
+
| `aria-current` | `boolean \| time \| true \| false \| page \| step \| location \| date \| undefined` | No | `-` | Indicates the element that represents the current item within a container or set of related elements. |
|
|
239
239
|
| `aria-describedby` | `string \| undefined` | No | `-` | Identifies the element (or elements) that describes the object. |
|
|
240
240
|
| `aria-description` | `string \| undefined` | No | `-` | Defines a string value that describes or annotates the current element. |
|
|
241
241
|
| `aria-details` | `string \| undefined` | No | `-` | Identifies the element that provides a detailed, extended description for the object. |
|
|
@@ -355,7 +355,7 @@ Use the `underline` prop on inline links within body text to ensure they are dis
|
|
|
355
355
|
| `hrefLang` | `string \| undefined` | No | `-` | - |
|
|
356
356
|
| `id` | `string \| undefined` | No | `-` | - |
|
|
357
357
|
| `inlist` | `any` | No | `-` | - |
|
|
358
|
-
| `inputMode` | `search \| text \| none \|
|
|
358
|
+
| `inputMode` | `search \| text \| none \| tel \| url \| email \| numeric \| decimal \| undefined` | No | `-` | Hints at the type of data that might be entered by the user while editing the element or its contents |
|
|
359
359
|
| `is` | `string \| undefined` | No | `-` | Specify that a standard HTML element should behave like a defined custom built-in element |
|
|
360
360
|
| `itemID` | `string \| undefined` | No | `-` | - |
|
|
361
361
|
| `itemProp` | `string \| undefined` | No | `-` | - |
|
|
@@ -667,7 +667,7 @@ Mapping to `styles` / `classNames` keys:
|
|
|
667
667
|
| `aria-colindextext` | `string \| undefined` | No | `-` | Defines a human readable text alternative of aria-colindex. |
|
|
668
668
|
| `aria-colspan` | `number \| undefined` | No | `-` | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. |
|
|
669
669
|
| `aria-controls` | `string \| undefined` | No | `-` | Identifies the element (or elements) whose contents or presence are controlled by the current element. |
|
|
670
|
-
| `aria-current` | `boolean \| time \|
|
|
670
|
+
| `aria-current` | `boolean \| time \| true \| false \| page \| step \| location \| date \| undefined` | No | `-` | Indicates the element that represents the current item within a container or set of related elements. |
|
|
671
671
|
| `aria-describedby` | `string \| undefined` | No | `-` | Identifies the element (or elements) that describes the object. |
|
|
672
672
|
| `aria-description` | `string \| undefined` | No | `-` | Defines a string value that describes or annotates the current element. |
|
|
673
673
|
| `aria-details` | `string \| undefined` | No | `-` | Identifies the element that provides a detailed, extended description for the object. |
|
|
@@ -795,7 +795,7 @@ Mapping to `styles` / `classNames` keys:
|
|
|
795
795
|
| `id` | `string \| undefined` | No | `-` | - |
|
|
796
796
|
| `inlist` | `any` | No | `-` | - |
|
|
797
797
|
| `innerSpacing` | `CellSpacing` | No | `-` | The spacing to use on the inner content of Cell |
|
|
798
|
-
| `inputMode` | `search \| text \| none \|
|
|
798
|
+
| `inputMode` | `search \| text \| none \| tel \| url \| email \| numeric \| decimal \| undefined` | No | `-` | Hints at the type of data that might be entered by the user while editing the element or its contents |
|
|
799
799
|
| `intermediary` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | For internal use only. |
|
|
800
800
|
| `is` | `string \| undefined` | No | `-` | Specify that a standard HTML element should behave like a defined custom built-in element |
|
|
801
801
|
| `itemID` | `string \| undefined` | No | `-` | - |
|
|
@@ -56,10 +56,12 @@ function BasicExample() {
|
|
|
56
56
|
| Prop | Type | Required | Default | Description |
|
|
57
57
|
| --- | --- | --- | --- | --- |
|
|
58
58
|
| `source` | `LottieSource<string>` | Yes | `-` | The source of animation. Should be pulled from |
|
|
59
|
+
| `alignContent` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| baseline \| first baseline \| last baseline \| space-between \| space-around \| space-evenly>` | No | `-` | - |
|
|
59
60
|
| `alignItems` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
|
|
60
61
|
| `alignSelf` | `ResponsiveProp<center \| normal \| auto \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
|
|
62
|
+
| `as` | `div` | No | `-` | The underlying element or component the polymorphic component will render. Changing as also changes the inherited native props (e.g. href for as=a) and the expected ref type. |
|
|
61
63
|
| `aspectRatio` | `inherit \| auto \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
62
|
-
| `autoplay` | `boolean` | No |
|
|
64
|
+
| `autoplay` | `boolean` | No | `-` | A boolean flag indicating whether or not the animation should start automatically when mounted. This only affects the imperative API. |
|
|
63
65
|
| `background` | `currentColor \| fg \| fgMuted \| fgInverse \| fgPrimary \| fgWarning \| fgPositive \| fgNegative \| bg \| bgAlternate \| bgInverse \| bgOverlay \| bgElevation1 \| bgElevation2 \| bgPrimary \| bgPrimaryWash \| bgSecondary \| bgTertiary \| bgSecondaryWash \| bgNegative \| bgNegativeWash \| bgPositive \| bgPositiveWash \| bgWarning \| bgWarningWash \| bgLine \| bgLineHeavy \| bgLineInverse \| bgLinePrimary \| bgLinePrimarySubtle \| accentSubtleRed \| accentBoldRed \| accentSubtleGreen \| accentBoldGreen \| accentSubtleBlue \| accentBoldBlue \| accentSubtlePurple \| accentBoldPurple \| accentSubtleYellow \| accentBoldYellow \| accentSubtleGray \| accentBoldGray \| transparent` | No | `-` | - |
|
|
64
66
|
| `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
65
67
|
| `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
|
|
@@ -87,8 +89,10 @@ function BasicExample() {
|
|
|
87
89
|
| `elevation` | `0 \| 1 \| 2` | No | `-` | - |
|
|
88
90
|
| `filterSize` | `FilterSizeConfig` | No | `-` | In order to render drop shadows, the filter size needs to be set to increase the render surface of the element. You can set the x, y, width and height of filters manually. |
|
|
89
91
|
| `flexBasis` | `ResponsiveProp<FlexBasis<string \| number>>` | No | `-` | - |
|
|
92
|
+
| `flexDirection` | `ResponsiveProp<column \| row \| row-reverse \| column-reverse>` | No | `-` | - |
|
|
90
93
|
| `flexGrow` | `inherit \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
91
94
|
| `flexShrink` | `inherit \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
95
|
+
| `flexWrap` | `ResponsiveProp<nowrap \| wrap \| wrap-reverse>` | No | `-` | - |
|
|
92
96
|
| `font` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
|
|
93
97
|
| `fontFamily` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
|
|
94
98
|
| `fontSize` | `ResponsiveProp<FontSize \| inherit>` | No | `-` | - |
|
|
@@ -111,10 +115,11 @@ function BasicExample() {
|
|
|
111
115
|
| `gridTemplateRows` | `ResponsiveProp<GridTemplateRows<string \| number>>` | No | `-` | - |
|
|
112
116
|
| `handlers` | `LottieEventHandlersMap` | No | `-` | - |
|
|
113
117
|
| `height` | `ResponsiveProp<Height<string \| number>>` | No | `-` | - |
|
|
118
|
+
| `justifyContent` | `ResponsiveProp<left \| right \| center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| space-between \| space-around \| space-evenly>` | No | `-` | - |
|
|
114
119
|
| `key` | `Key \| null` | No | `-` | - |
|
|
115
120
|
| `left` | `ResponsiveProp<Left<string \| number>>` | No | `-` | - |
|
|
116
121
|
| `lineHeight` | `ResponsiveProp<LineHeight \| inherit>` | No | `-` | - |
|
|
117
|
-
| `loop` | `boolean` | No |
|
|
122
|
+
| `loop` | `boolean` | No | `-` | A boolean flag indicating whether or not the animation should loop. |
|
|
118
123
|
| `margin` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
119
124
|
| `marginBottom` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
120
125
|
| `marginEnd` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
|
|
@@ -127,6 +132,7 @@ function BasicExample() {
|
|
|
127
132
|
| `minHeight` | `ResponsiveProp<MinHeight<string \| number>>` | No | `-` | - |
|
|
128
133
|
| `minWidth` | `ResponsiveProp<MinWidth<string \| number>>` | No | `-` | - |
|
|
129
134
|
| `onAnimationFinish` | `(() => void)` | No | `-` | A callback function which will be called when animation is finished. Note that on mobile, this callback will be called only when loop is set to false. |
|
|
135
|
+
| `onChange` | `FormEventHandler<HTMLDivElement>` | No | `-` | - |
|
|
130
136
|
| `opacity` | `inherit \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
131
137
|
| `overflow` | `ResponsiveProp<hidden \| auto \| visible \| clip \| scroll>` | No | `-` | - |
|
|
132
138
|
| `padding` | `0 \| 1 \| 2 \| 0.25 \| 0.5 \| 0.75 \| 1.5 \| 3 \| 4 \| 5 \| 6 \| 7 \| 8 \| 9 \| 10` | No | `-` | - |
|
|
@@ -48,8 +48,8 @@ function Example() {
|
|
|
48
48
|
|
|
49
49
|
| Prop | Type | Required | Default | Description |
|
|
50
50
|
| --- | --- | --- | --- | --- |
|
|
51
|
-
| `height` | `string \| number` | Yes | `-` |
|
|
52
|
-
| `width` | `string \| number` | Yes | `-` |
|
|
51
|
+
| `height` | `string \| number` | Yes | `-` | - |
|
|
52
|
+
| `width` | `string \| number` | Yes | `-` | - |
|
|
53
53
|
| `onFinish` | `(() => void)` | No | `-` | - |
|
|
54
54
|
| `status` | `loading \| success \| cardSuccess \| failure \| pending` | No | `-` | - |
|
|
55
55
|
| `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 |
|
|
@@ -162,6 +162,70 @@ function ChainedModalsExample() {
|
|
|
162
162
|
}
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
+
### Scrollable Modal Content
|
|
166
|
+
|
|
167
|
+
If the Modal has content which is expected to overflow and doesn't have focusable elements, set the following props to ensure the scrollable content can be navigated using keyboard arrows:
|
|
168
|
+
|
|
169
|
+
- `focusTabIndexElements`: `true`
|
|
170
|
+
- `disableArrowKeyNavigation`: `true`
|
|
171
|
+
|
|
172
|
+
As well, assign a `tabIndex` greater than or equal to `0` to the ModalBody so that the overflow can be reached via keyboard.
|
|
173
|
+
|
|
174
|
+
```jsx live
|
|
175
|
+
function Example() {
|
|
176
|
+
const [visible, setVisible] = useState(false);
|
|
177
|
+
return (
|
|
178
|
+
<>
|
|
179
|
+
<Button onClick={() => setVisible(true)}>Open Modal</Button>
|
|
180
|
+
<Modal
|
|
181
|
+
focusTabIndexElements
|
|
182
|
+
disableArrowKeyNavigation
|
|
183
|
+
onRequestClose={() => setVisible(false)}
|
|
184
|
+
visible={visible}
|
|
185
|
+
>
|
|
186
|
+
<ModalHeader
|
|
187
|
+
backAccessibilityLabel="Back"
|
|
188
|
+
closeAccessibilityLabel="Close"
|
|
189
|
+
onBackButtonClick={() => setVisible(false)}
|
|
190
|
+
testID="Basic Modal Test ID"
|
|
191
|
+
title="Basic Modal"
|
|
192
|
+
/>
|
|
193
|
+
<ModalBody tabIndex={0} testID="modal-body">
|
|
194
|
+
<VStack>
|
|
195
|
+
<Text font="title1" paddingBottom={10}>
|
|
196
|
+
This tray has content which will overflow.
|
|
197
|
+
</Text>
|
|
198
|
+
<Text font="title1" paddingBottom={10}>
|
|
199
|
+
To enable keyboard scrolling, certain props have to be set.
|
|
200
|
+
</Text>
|
|
201
|
+
<Text font="title1" paddingBottom={10}>
|
|
202
|
+
Otherwise, the content won't be viewable to users who navigate using a keyboard.
|
|
203
|
+
</Text>
|
|
204
|
+
<Text font="title1" paddingBottom={10}>
|
|
205
|
+
It's important to account for this to ensure an accessible experience.
|
|
206
|
+
</Text>
|
|
207
|
+
<Text font="title1" paddingBottom={10}>
|
|
208
|
+
Here's some text that is in the overflow and needs to be scrolled to.
|
|
209
|
+
</Text>
|
|
210
|
+
<Text font="title1" paddingBottom={10}>
|
|
211
|
+
Here's some more text to help more easily showcase scrolling.
|
|
212
|
+
</Text>
|
|
213
|
+
</VStack>
|
|
214
|
+
</ModalBody>
|
|
215
|
+
<ModalFooter
|
|
216
|
+
primaryAction={<Button onClick={() => setVisible(false)}>Save</Button>}
|
|
217
|
+
secondaryAction={
|
|
218
|
+
<Button onClick={() => setVisible(false)} variant="secondary">
|
|
219
|
+
Cancel
|
|
220
|
+
</Button>
|
|
221
|
+
}
|
|
222
|
+
/>
|
|
223
|
+
</Modal>
|
|
224
|
+
</>
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
```
|
|
228
|
+
|
|
165
229
|
## Props
|
|
166
230
|
|
|
167
231
|
| Prop | Type | Required | Default | Description |
|
|
@@ -199,7 +263,8 @@ function ChainedModalsExample() {
|
|
|
199
263
|
| `dangerouslyDisableResponsiveness` | `boolean` | No | `false` | Disable responsiveness so it maintains the same UI across different viewports. |
|
|
200
264
|
| `dangerouslySetBackground` | `string` | No | `-` | - |
|
|
201
265
|
| `dangerouslySetPosition` | `static \| relative \| fixed \| absolute \| sticky` | No | `-` | Set the position for the modal dialogue |
|
|
202
|
-
| `
|
|
266
|
+
| `disableArrowKeyNavigation` | `boolean` | No | `false` | If true, the focus trap will not allow arrow key navigation. |
|
|
267
|
+
| `disableFocusTrap` | `boolean` | No | `-` | Disables the focus trap to allow normal keyboard navigation. |
|
|
203
268
|
| `disableOverlayPress` | `boolean` | No | `false` | Disable overlay click that closes the Modal |
|
|
204
269
|
| `disablePortal` | `boolean` | No | `-` | Disable React portal integration |
|
|
205
270
|
| `display` | `ResponsiveProp<grid \| revert \| none \| block \| inline \| inline-block \| flex \| inline-flex \| inline-grid \| contents \| flow-root \| list-item>` | No | `-` | - |
|
|
@@ -209,7 +274,7 @@ function ChainedModalsExample() {
|
|
|
209
274
|
| `flexGrow` | `inherit \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
210
275
|
| `flexShrink` | `inherit \| revert \| -moz-initial \| initial \| revert-layer \| unset` | No | `-` | - |
|
|
211
276
|
| `flexWrap` | `ResponsiveProp<nowrap \| wrap \| wrap-reverse>` | No | `-` | - |
|
|
212
|
-
| `focusTabIndexElements` | `boolean` | No | `false` |
|
|
277
|
+
| `focusTabIndexElements` | `boolean` | No | `false` | If true, the focus trap will include all elements with tabIndex values in the list of focusable elements. |
|
|
213
278
|
| `font` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
|
|
214
279
|
| `fontFamily` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
|
|
215
280
|
| `fontSize` | `ResponsiveProp<FontSize \| inherit>` | No | `-` | - |
|
|
@@ -294,7 +294,7 @@ function Example() {
|
|
|
294
294
|
| `aria-colindextext` | `string \| undefined` | No | `-` | Defines a human readable text alternative of aria-colindex. |
|
|
295
295
|
| `aria-colspan` | `number \| undefined` | No | `-` | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. |
|
|
296
296
|
| `aria-controls` | `string \| undefined` | No | `-` | Identifies the element (or elements) whose contents or presence are controlled by the current element. |
|
|
297
|
-
| `aria-current` | `boolean \| time \|
|
|
297
|
+
| `aria-current` | `boolean \| time \| true \| false \| page \| step \| location \| date \| undefined` | No | `-` | Indicates the element that represents the current item within a container or set of related elements. |
|
|
298
298
|
| `aria-describedby` | `string \| undefined` | No | `-` | Identifies the element (or elements) that describes the object. |
|
|
299
299
|
| `aria-description` | `string \| undefined` | No | `-` | Defines a string value that describes or annotates the current element. |
|
|
300
300
|
| `aria-details` | `string \| undefined` | No | `-` | Identifies the element that provides a detailed, extended description for the object. |
|
|
@@ -409,7 +409,7 @@ function Example() {
|
|
|
409
409
|
| `hidden` | `boolean \| undefined` | No | `-` | - |
|
|
410
410
|
| `id` | `string \| undefined` | No | `-` | - |
|
|
411
411
|
| `inlist` | `any` | No | `-` | - |
|
|
412
|
-
| `inputMode` | `search \| text \| none \|
|
|
412
|
+
| `inputMode` | `search \| text \| none \| tel \| url \| email \| numeric \| decimal \| undefined` | No | `-` | Hints at the type of data that might be entered by the user while editing the element or its contents |
|
|
413
413
|
| `is` | `string \| undefined` | No | `-` | Specify that a standard HTML element should behave like a defined custom built-in element |
|
|
414
414
|
| `itemID` | `string \| undefined` | No | `-` | - |
|
|
415
415
|
| `itemProp` | `string \| undefined` | No | `-` | - |
|
|
@@ -575,6 +575,7 @@ function ScatterplotWithCustomLabels() {
|
|
|
575
575
|
| `x` | `string \| number` | No | `-` | - |
|
|
576
576
|
| `x1` | `string \| number` | No | `-` | - |
|
|
577
577
|
| `x2` | `string \| number` | No | `-` | - |
|
|
578
|
+
| `xAxisId` | `string` | No | `first x-axis defined in chart props.` | Optional X-axis id to specify which axis to plot along. |
|
|
578
579
|
| `xChannelSelector` | `string` | No | `-` | - |
|
|
579
580
|
| `xHeight` | `string \| number` | No | `-` | - |
|
|
580
581
|
| `xlinkActuate` | `string` | No | `-` | - |
|
|
@@ -101,7 +101,7 @@ On web, all [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Acces
|
|
|
101
101
|
| `aria-colindextext` | `string \| undefined` | No | `-` | Defines a human readable text alternative of aria-colindex. |
|
|
102
102
|
| `aria-colspan` | `number \| undefined` | No | `-` | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. |
|
|
103
103
|
| `aria-controls` | `string \| undefined` | No | `-` | Identifies the element (or elements) whose contents or presence are controlled by the current element. |
|
|
104
|
-
| `aria-current` | `boolean \| time \|
|
|
104
|
+
| `aria-current` | `boolean \| time \| true \| false \| page \| step \| location \| date \| undefined` | No | `-` | Indicates the element that represents the current item within a container or set of related elements. |
|
|
105
105
|
| `aria-describedby` | `string \| undefined` | No | `-` | Identifies the element (or elements) that describes the object. |
|
|
106
106
|
| `aria-description` | `string \| undefined` | No | `-` | Defines a string value that describes or annotates the current element. |
|
|
107
107
|
| `aria-details` | `string \| undefined` | No | `-` | Identifies the element that provides a detailed, extended description for the object. |
|
|
@@ -224,7 +224,7 @@ On web, all [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Acces
|
|
|
224
224
|
| `hidden` | `boolean \| undefined` | No | `-` | - |
|
|
225
225
|
| `id` | `string \| undefined` | No | `-` | - |
|
|
226
226
|
| `inlist` | `any` | No | `-` | - |
|
|
227
|
-
| `inputMode` | `search \| text \| none \|
|
|
227
|
+
| `inputMode` | `search \| text \| none \| tel \| url \| email \| numeric \| decimal \| undefined` | No | `-` | Hints at the type of data that might be entered by the user while editing the element or its contents |
|
|
228
228
|
| `is` | `string \| undefined` | No | `-` | Specify that a standard HTML element should behave like a defined custom built-in element |
|
|
229
229
|
| `itemID` | `string \| undefined` | No | `-` | - |
|
|
230
230
|
| `itemProp` | `string \| undefined` | No | `-` | - |
|
|
@@ -645,7 +645,7 @@ function DraggablePriceTarget() {
|
|
|
645
645
|
| `beaconStroke` | `string` | No | `'var(--color-bg)'` | Stroke color of the scrubber beacon circle. |
|
|
646
646
|
| `beaconTransitions` | `{ enter?: Transition$1 \| null; update?: Transition$1 \| null \| undefined; pulse?: Transition$1 \| undefined; pulseRepeatDelay?: number \| undefined; } \| undefined` | No | `-` | Transition configuration for the scrubber beacon. |
|
|
647
647
|
| `classNames` | `{ overlay?: string; beacon?: string \| undefined; line?: string \| undefined; label?: string \| undefined; beaconLabel?: string \| undefined; } \| undefined` | No | `-` | Custom class names for individual elements of the Scrubber component |
|
|
648
|
-
| `hideBeaconLabels` | `boolean` | No |
|
|
648
|
+
| `hideBeaconLabels` | `boolean` | No | `true in horizontal layout, false in vertical layout.` | Hides the beacon labels while keeping the line label visible (if provided). |
|
|
649
649
|
| `hideLine` | `boolean` | No | `-` | Hides the scrubber line. |
|
|
650
650
|
| `hideOverlay` | `boolean` | No | `-` | Hides the overlay rect which obscures data beyond the scrubber position. |
|
|
651
651
|
| `idlePulse` | `boolean` | No | `-` | Pulse the beacons while at rest. |
|
|
@@ -1024,7 +1024,7 @@ ValueSection
|
|
|
1024
1024
|
| `aria-colindextext` | `string \| undefined` | No | `-` | Defines a human readable text alternative of aria-colindex. |
|
|
1025
1025
|
| `aria-colspan` | `number \| undefined` | No | `-` | Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. |
|
|
1026
1026
|
| `aria-controls` | `string \| undefined` | No | `-` | Identifies the element (or elements) whose contents or presence are controlled by the current element. |
|
|
1027
|
-
| `aria-current` | `boolean \| time \|
|
|
1027
|
+
| `aria-current` | `boolean \| time \| true \| false \| page \| step \| location \| date \| undefined` | No | `-` | Indicates the element that represents the current item within a container or set of related elements. |
|
|
1028
1028
|
| `aria-describedby` | `string \| undefined` | No | `-` | Identifies the element (or elements) that describes the object. |
|
|
1029
1029
|
| `aria-description` | `string \| undefined` | No | `-` | Defines a string value that describes or annotates the current element. |
|
|
1030
1030
|
| `aria-details` | `string \| undefined` | No | `-` | Identifies the element that provides a detailed, extended description for the object. |
|
|
@@ -1146,7 +1146,7 @@ ValueSection
|
|
|
1146
1146
|
| `hidden` | `boolean \| undefined` | No | `-` | - |
|
|
1147
1147
|
| `id` | `string \| undefined` | No | `-` | - |
|
|
1148
1148
|
| `inlist` | `any` | No | `-` | - |
|
|
1149
|
-
| `inputMode` | `search \| text \| none \|
|
|
1149
|
+
| `inputMode` | `search \| text \| none \| tel \| url \| email \| numeric \| decimal \| undefined` | No | `-` | Hints at the type of data that might be entered by the user while editing the element or its contents |
|
|
1150
1150
|
| `is` | `string \| undefined` | No | `-` | Specify that a standard HTML element should behave like a defined custom built-in element |
|
|
1151
1151
|
| `itemID` | `string \| undefined` | No | `-` | - |
|
|
1152
1152
|
| `itemProp` | `string \| undefined` | No | `-` | - |
|
|
@@ -87,6 +87,7 @@ All series will be scrubbed by default. You can set `seriesIds` to show only spe
|
|
|
87
87
|
|
|
88
88
|
Setting `label` on a series will display a label to the side of the scrubber beacon, and
|
|
89
89
|
setting `label` on Scrubber displays a label above the scrubber line.
|
|
90
|
+
In `layout="horizontal"`, beacon labels are intentionally hidden to avoid overlap with scrubber beacons.
|
|
90
91
|
|
|
91
92
|
```jsx live
|
|
92
93
|
<LineChart
|
|
@@ -724,6 +725,188 @@ function PercentageBeaconLabels() {
|
|
|
724
725
|
}
|
|
725
726
|
```
|
|
726
727
|
|
|
728
|
+
#### Multi Line Beacon Label
|
|
729
|
+
|
|
730
|
+
You can use a custom `BeaconLabelComponent` to render each beacon label as two lines (team name + percentage).
|
|
731
|
+
|
|
732
|
+
```jsx live
|
|
733
|
+
function MatchupBeaconLabels() {
|
|
734
|
+
const matchupBlueData = [
|
|
735
|
+
47, 50, 51, 52, 53, 53, 53, 53, 52, 51, 51, 52, 53, 55, 57, 58, 59, 61, 63, 65, 64, 64, 64, 64,
|
|
736
|
+
64, 63, 63, 63, 64, 66, 68, 70, 71, 72, 74, 76, 76, 75, 74, 73, 74, 75, 75, 78,
|
|
737
|
+
];
|
|
738
|
+
const matchupRedData = matchupBlueData.map((value) => 100 - value);
|
|
739
|
+
const matchupTeamLabels = {
|
|
740
|
+
blue: 'BLUE',
|
|
741
|
+
red: 'RED',
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
const TeamBeaconLabel = memo(
|
|
745
|
+
({
|
|
746
|
+
color = 'var(--color-fgPrimary)',
|
|
747
|
+
teamLabel,
|
|
748
|
+
percentageLabel,
|
|
749
|
+
transition,
|
|
750
|
+
x,
|
|
751
|
+
y,
|
|
752
|
+
dx,
|
|
753
|
+
horizontalAlignment,
|
|
754
|
+
onDimensionsChange,
|
|
755
|
+
...chartTextProps
|
|
756
|
+
}) => {
|
|
757
|
+
const teamLabelDimensionsRef = useRef(null);
|
|
758
|
+
const percentageLabelDimensionsRef = useRef(null);
|
|
759
|
+
|
|
760
|
+
const emitCombinedDimensions = useCallback(() => {
|
|
761
|
+
if (!onDimensionsChange) {
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
const teamRect = teamLabelDimensionsRef.current;
|
|
766
|
+
const percentageRect = percentageLabelDimensionsRef.current;
|
|
767
|
+
|
|
768
|
+
if (!teamRect || !percentageRect) {
|
|
769
|
+
return;
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
const minX = Math.min(teamRect.x, percentageRect.x);
|
|
773
|
+
const minY = Math.min(teamRect.y, percentageRect.y);
|
|
774
|
+
const maxX = Math.max(teamRect.x + teamRect.width, percentageRect.x + percentageRect.width);
|
|
775
|
+
const maxY = Math.max(
|
|
776
|
+
teamRect.y + teamRect.height,
|
|
777
|
+
percentageRect.y + percentageRect.height,
|
|
778
|
+
);
|
|
779
|
+
|
|
780
|
+
onDimensionsChange({
|
|
781
|
+
x: minX,
|
|
782
|
+
y: minY,
|
|
783
|
+
width: maxX - minX,
|
|
784
|
+
height: maxY - minY,
|
|
785
|
+
});
|
|
786
|
+
}, [onDimensionsChange]);
|
|
787
|
+
|
|
788
|
+
const handleTeamLabelDimensionsChange = useCallback(
|
|
789
|
+
(rect) => {
|
|
790
|
+
teamLabelDimensionsRef.current = rect;
|
|
791
|
+
emitCombinedDimensions();
|
|
792
|
+
},
|
|
793
|
+
[emitCombinedDimensions],
|
|
794
|
+
);
|
|
795
|
+
|
|
796
|
+
const handlePercentageLabelDimensionsChange = useCallback(
|
|
797
|
+
(rect) => {
|
|
798
|
+
percentageLabelDimensionsRef.current = rect;
|
|
799
|
+
emitCombinedDimensions();
|
|
800
|
+
},
|
|
801
|
+
[emitCombinedDimensions],
|
|
802
|
+
);
|
|
803
|
+
|
|
804
|
+
return (
|
|
805
|
+
<m.g animate={{ y }} initial={false} transition={transition}>
|
|
806
|
+
<ChartText
|
|
807
|
+
disableRepositioning
|
|
808
|
+
color={color}
|
|
809
|
+
dx={dx}
|
|
810
|
+
font="legal"
|
|
811
|
+
horizontalAlignment={horizontalAlignment}
|
|
812
|
+
onDimensionsChange={handleTeamLabelDimensionsChange}
|
|
813
|
+
verticalAlignment="bottom"
|
|
814
|
+
x={x}
|
|
815
|
+
y={transition ? 0 : y}
|
|
816
|
+
{...chartTextProps}
|
|
817
|
+
>
|
|
818
|
+
{teamLabel}
|
|
819
|
+
</ChartText>
|
|
820
|
+
<ChartText
|
|
821
|
+
disableRepositioning
|
|
822
|
+
color={color}
|
|
823
|
+
dx={dx}
|
|
824
|
+
font="title3"
|
|
825
|
+
horizontalAlignment={horizontalAlignment}
|
|
826
|
+
onDimensionsChange={handlePercentageLabelDimensionsChange}
|
|
827
|
+
verticalAlignment="top"
|
|
828
|
+
x={x}
|
|
829
|
+
y={transition ? 0 : y}
|
|
830
|
+
>
|
|
831
|
+
{percentageLabel}
|
|
832
|
+
</ChartText>
|
|
833
|
+
</m.g>
|
|
834
|
+
);
|
|
835
|
+
},
|
|
836
|
+
);
|
|
837
|
+
|
|
838
|
+
const MatchupScrubberBeaconLabel = memo(({ seriesId, color, ...props }) => {
|
|
839
|
+
const { getSeriesData, dataLength } = useCartesianChartContext();
|
|
840
|
+
const { scrubberPosition } = useScrubberContext();
|
|
841
|
+
|
|
842
|
+
const seriesData = useMemo(
|
|
843
|
+
() => getLineData(getSeriesData(seriesId)),
|
|
844
|
+
[getSeriesData, seriesId],
|
|
845
|
+
);
|
|
846
|
+
|
|
847
|
+
const dataIndex = useMemo(() => {
|
|
848
|
+
return scrubberPosition ?? Math.max(0, dataLength - 1);
|
|
849
|
+
}, [scrubberPosition, dataLength]);
|
|
850
|
+
|
|
851
|
+
const teamLabel = matchupTeamLabels[seriesId] ?? String(seriesId).toUpperCase();
|
|
852
|
+
|
|
853
|
+
const value = useMemo(() => {
|
|
854
|
+
if (seriesData === undefined) {
|
|
855
|
+
return null;
|
|
856
|
+
}
|
|
857
|
+
|
|
858
|
+
return seriesData[dataIndex];
|
|
859
|
+
}, [dataIndex, seriesData]);
|
|
860
|
+
|
|
861
|
+
return (
|
|
862
|
+
<TeamBeaconLabel
|
|
863
|
+
{...props}
|
|
864
|
+
color={color}
|
|
865
|
+
percentageLabel={`${value ?? 0}%`}
|
|
866
|
+
seriesId={seriesId}
|
|
867
|
+
teamLabel={teamLabel}
|
|
868
|
+
/>
|
|
869
|
+
);
|
|
870
|
+
});
|
|
871
|
+
|
|
872
|
+
return (
|
|
873
|
+
<LineChart
|
|
874
|
+
enableScrubbing
|
|
875
|
+
showArea
|
|
876
|
+
areaType="dotted"
|
|
877
|
+
height={250}
|
|
878
|
+
series={[
|
|
879
|
+
{
|
|
880
|
+
id: 'blue',
|
|
881
|
+
data: matchupBlueData,
|
|
882
|
+
color: 'rgb(var(--blue50))',
|
|
883
|
+
label: 'BLUE',
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
id: 'red',
|
|
887
|
+
data: matchupRedData,
|
|
888
|
+
color: 'rgb(var(--red50))',
|
|
889
|
+
label: 'RED',
|
|
890
|
+
},
|
|
891
|
+
]}
|
|
892
|
+
xAxis={{
|
|
893
|
+
range: ({ min, max }) => ({ min, max: max - 64 }),
|
|
894
|
+
}}
|
|
895
|
+
yAxis={{
|
|
896
|
+
domain: { min: 0, max: 100 },
|
|
897
|
+
}}
|
|
898
|
+
>
|
|
899
|
+
<Scrubber
|
|
900
|
+
idlePulse
|
|
901
|
+
BeaconLabelComponent={MatchupScrubberBeaconLabel}
|
|
902
|
+
beaconLabelHorizontalOffset={16}
|
|
903
|
+
beaconLabelPreferredSide="right"
|
|
904
|
+
/>
|
|
905
|
+
</LineChart>
|
|
906
|
+
);
|
|
907
|
+
}
|
|
908
|
+
```
|
|
909
|
+
|
|
727
910
|
## Props
|
|
728
911
|
|
|
729
912
|
| Prop | Type | Required | Default | Description |
|
|
@@ -740,7 +923,7 @@ function PercentageBeaconLabels() {
|
|
|
740
923
|
| `beaconStroke` | `string` | No | `'var(--color-bg)'` | Stroke color of the scrubber beacon circle. |
|
|
741
924
|
| `beaconTransitions` | `{ enter?: Transition$1 \| null; update?: Transition$1 \| null \| undefined; pulse?: Transition$1 \| undefined; pulseRepeatDelay?: number \| undefined; } \| undefined` | No | `-` | Transition configuration for the scrubber beacon. |
|
|
742
925
|
| `classNames` | `{ overlay?: string; beacon?: string \| undefined; line?: string \| undefined; label?: string \| undefined; beaconLabel?: string \| undefined; } \| undefined` | No | `-` | Custom class names for individual elements of the Scrubber component |
|
|
743
|
-
| `hideBeaconLabels` | `boolean` | No |
|
|
926
|
+
| `hideBeaconLabels` | `boolean` | No | `true in horizontal layout, false in vertical layout.` | Hides the beacon labels while keeping the line label visible (if provided). |
|
|
744
927
|
| `hideLine` | `boolean` | No | `-` | Hides the scrubber line. |
|
|
745
928
|
| `hideOverlay` | `boolean` | No | `-` | Hides the overlay rect which obscures data beyond the scrubber position. |
|
|
746
929
|
| `idlePulse` | `boolean` | No | `-` | Pulse the beacons while at rest. |
|