@coinbase/cds-mcp-server 8.17.2 → 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.
Files changed (284) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/mcp-docs/mobile/components/Accordion.txt +188 -0
  3. package/mcp-docs/mobile/components/AccordionItem.txt +29 -0
  4. package/mcp-docs/mobile/components/Alert.txt +155 -0
  5. package/mcp-docs/mobile/components/AreaChart.txt +265 -0
  6. package/mcp-docs/mobile/components/Avatar.txt +195 -0
  7. package/mcp-docs/mobile/components/AvatarButton.txt +225 -0
  8. package/mcp-docs/mobile/components/Banner.txt +221 -0
  9. package/mcp-docs/mobile/components/BarChart.txt +815 -0
  10. package/mcp-docs/mobile/components/Box.txt +173 -0
  11. package/mcp-docs/mobile/components/BrowserBar.txt +146 -0
  12. package/mcp-docs/mobile/components/Button.txt +198 -0
  13. package/mcp-docs/mobile/components/ButtonGroup.txt +79 -0
  14. package/mcp-docs/mobile/components/Carousel.txt +1083 -0
  15. package/mcp-docs/mobile/components/CartesianChart.txt +825 -0
  16. package/mcp-docs/mobile/components/CellMedia.txt +70 -0
  17. package/mcp-docs/mobile/components/Checkbox.txt +245 -0
  18. package/mcp-docs/mobile/components/CheckboxCell.txt +201 -0
  19. package/mcp-docs/mobile/components/CheckboxGroup.txt +284 -0
  20. package/mcp-docs/mobile/components/Chip.txt +194 -0
  21. package/mcp-docs/mobile/components/Coachmark.txt +157 -0
  22. package/mcp-docs/mobile/components/Collapsible.txt +104 -0
  23. package/mcp-docs/mobile/components/ContainedAssetCard.txt +134 -0
  24. package/mcp-docs/mobile/components/ContentCard.txt +365 -0
  25. package/mcp-docs/mobile/components/ContentCardBody.txt +135 -0
  26. package/mcp-docs/mobile/components/ContentCardFooter.txt +127 -0
  27. package/mcp-docs/mobile/components/ContentCardHeader.txt +145 -0
  28. package/mcp-docs/mobile/components/ContentCell.txt +226 -0
  29. package/mcp-docs/mobile/components/ControlGroup.txt +443 -0
  30. package/mcp-docs/mobile/components/DatePicker.txt +496 -0
  31. package/mcp-docs/mobile/components/Divider.txt +138 -0
  32. package/mcp-docs/mobile/components/DotCount.txt +145 -0
  33. package/mcp-docs/mobile/components/DotStatusColor.txt +58 -0
  34. package/mcp-docs/mobile/components/DotSymbol.txt +134 -0
  35. package/mcp-docs/mobile/components/Fallback.txt +157 -0
  36. package/mcp-docs/mobile/components/FloatingAssetCard.txt +155 -0
  37. package/mcp-docs/mobile/components/HStack.txt +234 -0
  38. package/mcp-docs/mobile/components/HeroSquare.txt +47 -0
  39. package/mcp-docs/mobile/components/Icon.txt +51 -0
  40. package/mcp-docs/mobile/components/IconButton.txt +268 -0
  41. package/mcp-docs/mobile/components/InputChip.txt +187 -0
  42. package/mcp-docs/mobile/components/Interactable.txt +186 -0
  43. package/mcp-docs/mobile/components/LineChart.txt +1324 -0
  44. package/mcp-docs/mobile/components/Link.txt +291 -0
  45. package/mcp-docs/mobile/components/ListCell.txt +412 -0
  46. package/mcp-docs/mobile/components/LogoMark.txt +84 -0
  47. package/mcp-docs/mobile/components/LogoWordMark.txt +93 -0
  48. package/mcp-docs/mobile/components/Lottie.txt +138 -0
  49. package/mcp-docs/mobile/components/LottieStatusAnimation.txt +46 -0
  50. package/mcp-docs/mobile/components/Modal.txt +83 -0
  51. package/mcp-docs/mobile/components/ModalBody.txt +33 -0
  52. package/mcp-docs/mobile/components/ModalFooter.txt +24 -0
  53. package/mcp-docs/mobile/components/ModalHeader.txt +27 -0
  54. package/mcp-docs/mobile/components/MultiContentModule.txt +379 -0
  55. package/mcp-docs/mobile/components/NavigationTitle.txt +131 -0
  56. package/mcp-docs/mobile/components/NavigationTitleSelect.txt +141 -0
  57. package/mcp-docs/mobile/components/NudgeCard.txt +89 -0
  58. package/mcp-docs/mobile/components/Numpad.txt +340 -0
  59. package/mcp-docs/mobile/components/Overlay.txt +151 -0
  60. package/mcp-docs/mobile/components/PageFooter.txt +160 -0
  61. package/mcp-docs/mobile/components/PageHeader.txt +185 -0
  62. package/mcp-docs/mobile/components/PeriodSelector.txt +407 -0
  63. package/mcp-docs/mobile/components/Pictogram.txt +47 -0
  64. package/mcp-docs/mobile/components/Point.txt +204 -0
  65. package/mcp-docs/mobile/components/PortalProvider.txt +78 -0
  66. package/mcp-docs/mobile/components/Pressable.txt +210 -0
  67. package/mcp-docs/mobile/components/ProgressBar.txt +129 -0
  68. package/mcp-docs/mobile/components/ProgressBarWithFixedLabels.txt +160 -0
  69. package/mcp-docs/mobile/components/ProgressBarWithFloatLabel.txt +137 -0
  70. package/mcp-docs/mobile/components/ProgressCircle.txt +236 -0
  71. package/mcp-docs/mobile/components/Radio.txt +241 -0
  72. package/mcp-docs/mobile/components/RadioCell.txt +201 -0
  73. package/mcp-docs/mobile/components/RadioGroup.txt +281 -0
  74. package/mcp-docs/mobile/components/ReferenceLine.txt +152 -0
  75. package/mcp-docs/mobile/components/RemoteImage.txt +105 -0
  76. package/mcp-docs/mobile/components/RemoteImageGroup.txt +60 -0
  77. package/mcp-docs/mobile/components/RollingNumber.txt +788 -0
  78. package/mcp-docs/mobile/components/Scrubber.txt +203 -0
  79. package/mcp-docs/mobile/components/SearchInput.txt +191 -0
  80. package/mcp-docs/mobile/components/SectionHeader.txt +204 -0
  81. package/mcp-docs/mobile/components/SegmentedTabs.txt +315 -0
  82. package/mcp-docs/mobile/components/Select.txt +211 -0
  83. package/mcp-docs/mobile/components/SelectChip.txt +323 -0
  84. package/mcp-docs/mobile/components/SelectOption.txt +84 -0
  85. package/mcp-docs/mobile/components/SlideButton.txt +330 -0
  86. package/mcp-docs/mobile/components/Spacer.txt +83 -0
  87. package/mcp-docs/mobile/components/Sparkline.txt +122 -0
  88. package/mcp-docs/mobile/components/SparklineGradient.txt +106 -0
  89. package/mcp-docs/mobile/components/SparklineInteractive.txt +156 -0
  90. package/mcp-docs/mobile/components/SparklineInteractiveHeader.txt +72 -0
  91. package/mcp-docs/mobile/components/Spinner.txt +48 -0
  92. package/mcp-docs/mobile/components/SpotIcon.txt +47 -0
  93. package/mcp-docs/mobile/components/SpotRectangle.txt +47 -0
  94. package/mcp-docs/mobile/components/SpotSquare.txt +47 -0
  95. package/mcp-docs/mobile/components/Stepper.txt +527 -0
  96. package/mcp-docs/mobile/components/SubBrandLogoMark.txt +125 -0
  97. package/mcp-docs/mobile/components/SubBrandLogoWordMark.txt +125 -0
  98. package/mcp-docs/mobile/components/Switch.txt +97 -0
  99. package/mcp-docs/mobile/components/TabIndicator.txt +48 -0
  100. package/mcp-docs/mobile/components/TabLabel.txt +153 -0
  101. package/mcp-docs/mobile/components/TabNavigation.txt +146 -0
  102. package/mcp-docs/mobile/components/TabbedChips.txt +142 -0
  103. package/mcp-docs/mobile/components/Tabs.txt +190 -0
  104. package/mcp-docs/mobile/components/Tag.txt +300 -0
  105. package/mcp-docs/mobile/components/Text.txt +211 -0
  106. package/mcp-docs/mobile/components/TextInput.txt +717 -0
  107. package/mcp-docs/mobile/components/ThemeProvider.txt +132 -0
  108. package/mcp-docs/mobile/components/Toast.txt +196 -0
  109. package/mcp-docs/mobile/components/Tooltip.txt +59 -0
  110. package/mcp-docs/mobile/components/TopNavBar.txt +161 -0
  111. package/mcp-docs/mobile/components/Tour.txt +158 -0
  112. package/mcp-docs/mobile/components/Tray.txt +252 -0
  113. package/mcp-docs/mobile/components/UpsellCard.txt +321 -0
  114. package/mcp-docs/mobile/components/VStack.txt +222 -0
  115. package/mcp-docs/mobile/components/XAxis.txt +621 -0
  116. package/mcp-docs/mobile/components/YAxis.txt +567 -0
  117. package/mcp-docs/mobile/getting-started/ai-overview.txt +108 -0
  118. package/mcp-docs/mobile/getting-started/installation.txt +57 -0
  119. package/mcp-docs/mobile/getting-started/introduction.txt +102 -0
  120. package/mcp-docs/mobile/getting-started/playground.txt +28 -0
  121. package/mcp-docs/mobile/getting-started/styling.txt +84 -0
  122. package/mcp-docs/mobile/getting-started/theming.txt +286 -0
  123. package/mcp-docs/mobile/hooks/useDimensions.txt +72 -0
  124. package/mcp-docs/mobile/hooks/useEventHandler.txt +120 -0
  125. package/mcp-docs/mobile/hooks/useMergeRefs.txt +116 -0
  126. package/mcp-docs/mobile/hooks/useOverlayContentContext.txt +280 -0
  127. package/mcp-docs/mobile/hooks/usePreviousValue.txt +74 -0
  128. package/mcp-docs/mobile/hooks/useRefMap.txt +178 -0
  129. package/mcp-docs/mobile/hooks/useTheme.txt +321 -0
  130. package/mcp-docs/mobile/routes.txt +139 -0
  131. package/mcp-docs/web/components/Accordion.txt +189 -0
  132. package/mcp-docs/web/components/AccordionItem.txt +31 -0
  133. package/mcp-docs/web/components/Alert.txt +164 -0
  134. package/mcp-docs/web/components/AreaChart.txt +510 -0
  135. package/mcp-docs/web/components/Avatar.txt +211 -0
  136. package/mcp-docs/web/components/AvatarButton.txt +240 -0
  137. package/mcp-docs/web/components/Banner.txt +226 -0
  138. package/mcp-docs/web/components/BarChart.txt +1267 -0
  139. package/mcp-docs/web/components/Box.txt +175 -0
  140. package/mcp-docs/web/components/Button.txt +212 -0
  141. package/mcp-docs/web/components/ButtonGroup.txt +79 -0
  142. package/mcp-docs/web/components/Calendar.txt +181 -0
  143. package/mcp-docs/web/components/Carousel.txt +1575 -0
  144. package/mcp-docs/web/components/CartesianChart.txt +1044 -0
  145. package/mcp-docs/web/components/CellMedia.txt +56 -0
  146. package/mcp-docs/web/components/Checkbox.txt +188 -0
  147. package/mcp-docs/web/components/CheckboxCell.txt +202 -0
  148. package/mcp-docs/web/components/CheckboxGroup.txt +219 -0
  149. package/mcp-docs/web/components/Chip.txt +196 -0
  150. package/mcp-docs/web/components/Coachmark.txt +188 -0
  151. package/mcp-docs/web/components/Collapsible.txt +119 -0
  152. package/mcp-docs/web/components/ContainedAssetCard.txt +232 -0
  153. package/mcp-docs/web/components/ContentCard.txt +367 -0
  154. package/mcp-docs/web/components/ContentCardBody.txt +137 -0
  155. package/mcp-docs/web/components/ContentCardFooter.txt +129 -0
  156. package/mcp-docs/web/components/ContentCardHeader.txt +147 -0
  157. package/mcp-docs/web/components/ContentCell.txt +219 -0
  158. package/mcp-docs/web/components/ControlGroup.txt +436 -0
  159. package/mcp-docs/web/components/DatePicker.txt +505 -0
  160. package/mcp-docs/web/components/Divider.txt +143 -0
  161. package/mcp-docs/web/components/DotCount.txt +149 -0
  162. package/mcp-docs/web/components/DotStatusColor.txt +58 -0
  163. package/mcp-docs/web/components/DotSymbol.txt +137 -0
  164. package/mcp-docs/web/components/Dropdown.txt +119 -0
  165. package/mcp-docs/web/components/Fallback.txt +163 -0
  166. package/mcp-docs/web/components/FloatingAssetCard.txt +250 -0
  167. package/mcp-docs/web/components/FullscreenAlert.txt +69 -0
  168. package/mcp-docs/web/components/FullscreenModal.txt +145 -0
  169. package/mcp-docs/web/components/FullscreenModalLayout.txt +187 -0
  170. package/mcp-docs/web/components/Grid.txt +236 -0
  171. package/mcp-docs/web/components/GridColumn.txt +209 -0
  172. package/mcp-docs/web/components/HStack.txt +236 -0
  173. package/mcp-docs/web/components/HeroSquare.txt +48 -0
  174. package/mcp-docs/web/components/Icon.txt +145 -0
  175. package/mcp-docs/web/components/IconButton.txt +390 -0
  176. package/mcp-docs/web/components/InputChip.txt +187 -0
  177. package/mcp-docs/web/components/Interactable.txt +193 -0
  178. package/mcp-docs/web/components/LineChart.txt +1576 -0
  179. package/mcp-docs/web/components/Link.txt +243 -0
  180. package/mcp-docs/web/components/ListCell.txt +418 -0
  181. package/mcp-docs/web/components/LogoMark.txt +84 -0
  182. package/mcp-docs/web/components/LogoWordMark.txt +93 -0
  183. package/mcp-docs/web/components/Lottie.txt +157 -0
  184. package/mcp-docs/web/components/LottieStatusAnimation.txt +57 -0
  185. package/mcp-docs/web/components/MediaQueryProvider.txt +108 -0
  186. package/mcp-docs/web/components/Modal.txt +196 -0
  187. package/mcp-docs/web/components/ModalBody.txt +117 -0
  188. package/mcp-docs/web/components/ModalFooter.txt +119 -0
  189. package/mcp-docs/web/components/ModalHeader.txt +123 -0
  190. package/mcp-docs/web/components/MultiContentModule.txt +381 -0
  191. package/mcp-docs/web/components/NavigationBar.txt +102 -0
  192. package/mcp-docs/web/components/NavigationTitle.txt +25 -0
  193. package/mcp-docs/web/components/NavigationTitleSelect.txt +45 -0
  194. package/mcp-docs/web/components/NudgeCard.txt +181 -0
  195. package/mcp-docs/web/components/Overlay.txt +171 -0
  196. package/mcp-docs/web/components/PageFooter.txt +184 -0
  197. package/mcp-docs/web/components/PageHeader.txt +243 -0
  198. package/mcp-docs/web/components/Pagination.txt +499 -0
  199. package/mcp-docs/web/components/PeriodSelector.txt +703 -0
  200. package/mcp-docs/web/components/Pictogram.txt +48 -0
  201. package/mcp-docs/web/components/Point.txt +460 -0
  202. package/mcp-docs/web/components/PortalProvider.txt +76 -0
  203. package/mcp-docs/web/components/Pressable.txt +193 -0
  204. package/mcp-docs/web/components/ProgressBar.txt +163 -0
  205. package/mcp-docs/web/components/ProgressBarWithFixedLabels.txt +212 -0
  206. package/mcp-docs/web/components/ProgressBarWithFloatLabel.txt +181 -0
  207. package/mcp-docs/web/components/ProgressCircle.txt +443 -0
  208. package/mcp-docs/web/components/Radio.txt +219 -0
  209. package/mcp-docs/web/components/RadioCell.txt +215 -0
  210. package/mcp-docs/web/components/RadioGroup.txt +288 -0
  211. package/mcp-docs/web/components/ReferenceLine.txt +451 -0
  212. package/mcp-docs/web/components/RemoteImage.txt +165 -0
  213. package/mcp-docs/web/components/RemoteImageGroup.txt +86 -0
  214. package/mcp-docs/web/components/RollingNumber.txt +1021 -0
  215. package/mcp-docs/web/components/Scrubber.txt +231 -0
  216. package/mcp-docs/web/components/SearchInput.txt +117 -0
  217. package/mcp-docs/web/components/SectionHeader.txt +217 -0
  218. package/mcp-docs/web/components/SegmentedTabs.txt +324 -0
  219. package/mcp-docs/web/components/Select.txt +224 -0
  220. package/mcp-docs/web/components/SelectChip.txt +314 -0
  221. package/mcp-docs/web/components/SelectOption.txt +165 -0
  222. package/mcp-docs/web/components/Sidebar.txt +349 -0
  223. package/mcp-docs/web/components/SidebarItem.txt +131 -0
  224. package/mcp-docs/web/components/SidebarMoreMenu.txt +30 -0
  225. package/mcp-docs/web/components/Spacer.txt +173 -0
  226. package/mcp-docs/web/components/Sparkline.txt +122 -0
  227. package/mcp-docs/web/components/SparklineGradient.txt +106 -0
  228. package/mcp-docs/web/components/SparklineInteractive.txt +153 -0
  229. package/mcp-docs/web/components/SparklineInteractiveHeader.txt +76 -0
  230. package/mcp-docs/web/components/Spinner.txt +128 -0
  231. package/mcp-docs/web/components/SpotIcon.txt +48 -0
  232. package/mcp-docs/web/components/SpotRectangle.txt +48 -0
  233. package/mcp-docs/web/components/SpotSquare.txt +48 -0
  234. package/mcp-docs/web/components/Stepper.txt +682 -0
  235. package/mcp-docs/web/components/SubBrandLogoMark.txt +125 -0
  236. package/mcp-docs/web/components/SubBrandLogoWordMark.txt +125 -0
  237. package/mcp-docs/web/components/Switch.txt +85 -0
  238. package/mcp-docs/web/components/TabIndicator.txt +48 -0
  239. package/mcp-docs/web/components/TabLabel.txt +158 -0
  240. package/mcp-docs/web/components/TabNavigation.txt +159 -0
  241. package/mcp-docs/web/components/TabbedChips.txt +155 -0
  242. package/mcp-docs/web/components/Table.txt +367 -0
  243. package/mcp-docs/web/components/TableBody.txt +83 -0
  244. package/mcp-docs/web/components/TableCaption.txt +102 -0
  245. package/mcp-docs/web/components/TableCell.txt +165 -0
  246. package/mcp-docs/web/components/TableCellFallback.txt +97 -0
  247. package/mcp-docs/web/components/TableFooter.txt +83 -0
  248. package/mcp-docs/web/components/TableHeader.txt +100 -0
  249. package/mcp-docs/web/components/TableRow.txt +140 -0
  250. package/mcp-docs/web/components/Tabs.txt +212 -0
  251. package/mcp-docs/web/components/Tag.txt +304 -0
  252. package/mcp-docs/web/components/Text.txt +232 -0
  253. package/mcp-docs/web/components/TextInput.txt +652 -0
  254. package/mcp-docs/web/components/ThemeProvider.txt +199 -0
  255. package/mcp-docs/web/components/TileButton.txt +158 -0
  256. package/mcp-docs/web/components/Toast.txt +203 -0
  257. package/mcp-docs/web/components/Tooltip.txt +89 -0
  258. package/mcp-docs/web/components/Tour.txt +179 -0
  259. package/mcp-docs/web/components/Tray.txt +288 -0
  260. package/mcp-docs/web/components/UpsellCard.txt +319 -0
  261. package/mcp-docs/web/components/VStack.txt +224 -0
  262. package/mcp-docs/web/components/XAxis.txt +619 -0
  263. package/mcp-docs/web/components/YAxis.txt +548 -0
  264. package/mcp-docs/web/getting-started/ai-overview.txt +108 -0
  265. package/mcp-docs/web/getting-started/installation.txt +103 -0
  266. package/mcp-docs/web/getting-started/introduction.txt +102 -0
  267. package/mcp-docs/web/getting-started/playground.txt +28 -0
  268. package/mcp-docs/web/getting-started/styling.txt +161 -0
  269. package/mcp-docs/web/getting-started/templates.txt +121 -0
  270. package/mcp-docs/web/getting-started/theming.txt +426 -0
  271. package/mcp-docs/web/hooks/useBreakpoints.txt +61 -0
  272. package/mcp-docs/web/hooks/useDimensions.txt +114 -0
  273. package/mcp-docs/web/hooks/useEventHandler.txt +120 -0
  274. package/mcp-docs/web/hooks/useHasMounted.txt +75 -0
  275. package/mcp-docs/web/hooks/useIsoEffect.txt +58 -0
  276. package/mcp-docs/web/hooks/useMediaQuery.txt +114 -0
  277. package/mcp-docs/web/hooks/useMergeRefs.txt +116 -0
  278. package/mcp-docs/web/hooks/useOverlayContentContext.txt +279 -0
  279. package/mcp-docs/web/hooks/usePreviousValue.txt +74 -0
  280. package/mcp-docs/web/hooks/useRefMap.txt +178 -0
  281. package/mcp-docs/web/hooks/useScrollBlocker.txt +82 -0
  282. package/mcp-docs/web/hooks/useTheme.txt +364 -0
  283. package/mcp-docs/web/routes.txt +163 -0
  284. package/package.json +1 -1
@@ -0,0 +1,250 @@
1
+ # FloatingAssetCard
2
+
3
+ A card component for displaying and managing asset holdings.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { FloatingAssetCard } from '@coinbase/cds-web/cards/FloatingAssetCard'
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ ### Default
14
+
15
+ Most common composition for displaying individual assets like NFTs or dApps.
16
+
17
+ ```jsx live
18
+ function Example() {
19
+ function NoopFn() {
20
+ console.log('pressed');
21
+ }
22
+ const cards = [
23
+ {
24
+ title: 'Balancing the Air',
25
+ description: '0.5 ETH',
26
+ subtitle: 'Amber V’s Artwork',
27
+ onClick: NoopFn,
28
+ media: (
29
+ <RemoteImage
30
+ source="/img/nft.png"
31
+ height={'100%'}
32
+ style={{ objectFit: 'cover', cursor: 'pointer' }}
33
+ width="100%"
34
+ />
35
+ ),
36
+ },
37
+ ];
38
+ return (
39
+ <VStack minHeight={300} padding={2} alignItems="center" justifyContent="center" gap={1}>
40
+ {cards.map((card) => (
41
+ <FloatingAssetCard {...card} />
42
+ ))}
43
+ </VStack>
44
+ );
45
+ }
46
+ ```
47
+
48
+ ### Descriptions as trends
49
+
50
+ Trends help users make decisions about whether or not to invest in an asset.
51
+
52
+ ```jsx live
53
+ function Example() {
54
+ function NoopFn() {
55
+ console.log('pressed');
56
+ }
57
+ const cards = [
58
+ {
59
+ title: '#7560',
60
+ description: (
61
+ <TextLabel2 as="p" color="fgPositive" numberOfLines={2}>
62
+ &#x2197;6.37%
63
+ </TextLabel2>
64
+ ),
65
+ subtitle: 'Bored Ape',
66
+ onClick: NoopFn,
67
+ media: (
68
+ <RemoteImage
69
+ source="/img/nft_boredape2.png"
70
+ height={'100%'}
71
+ style={{ objectFit: 'cover', cursor: 'pointer' }}
72
+ width="100%"
73
+ />
74
+ ),
75
+ },
76
+ {
77
+ title: '#2015',
78
+ description: (
79
+ <TextLabel2 as="p" color="fgNegative" numberOfLines={2}>
80
+ &#x2198;6.37%
81
+ </TextLabel2>
82
+ ),
83
+ subtitle: 'Pudgy Penguins',
84
+ onClick: NoopFn,
85
+ media: (
86
+ <RemoteImage
87
+ source="/img/nft_penguin.png"
88
+ height={'100%'}
89
+ style={{ objectFit: 'cover', cursor: 'pointer' }}
90
+ width="100%"
91
+ />
92
+ ),
93
+ },
94
+ ];
95
+ return (
96
+ <HStack minHeight={300} padding={2} alignItems="center" justifyContent="center" gap={2}>
97
+ {cards.map((card) => (
98
+ <FloatingAssetCard {...card} />
99
+ ))}
100
+ </HStack>
101
+ );
102
+ }
103
+ ```
104
+
105
+ ### Description as ratings
106
+
107
+ Use this example for visual assets with ratings.
108
+
109
+ ```jsx live
110
+ function Example() {
111
+ function NoopFn() {
112
+ console.log('pressed');
113
+ }
114
+ const cards = [
115
+ {
116
+ title: 'Parallel',
117
+ description: (
118
+ <TextLabel2 as="p" color="fgMuted" numberOfLines={2}>
119
+ &#9733;4.5
120
+ </TextLabel2>
121
+ ),
122
+ onClick: NoopFn,
123
+ media: (
124
+ <RemoteImage
125
+ source="/img/collection.png"
126
+ height={'100%'}
127
+ style={{ objectFit: 'cover', cursor: 'pointer' }}
128
+ width="100%"
129
+ />
130
+ ),
131
+ },
132
+ ];
133
+ return (
134
+ <HStack minHeight={300} padding={2} alignItems="center" justifyContent="center" gap={2}>
135
+ {cards.map((card) => (
136
+ <FloatingAssetCard {...card} />
137
+ ))}
138
+ </HStack>
139
+ );
140
+ }
141
+ ```
142
+
143
+ ## Props
144
+
145
+ | Prop | Type | Required | Default | Description |
146
+ | --- | --- | --- | --- | --- |
147
+ | `media` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | Yes | `-` | Remote Image or other node with media content. |
148
+ | `title` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | Yes | `-` | Text or ReactNode to be displayed in TextHeadline |
149
+ | `alignContent` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| baseline \| first baseline \| last baseline \| space-between \| space-around \| space-evenly>` | No | `-` | - |
150
+ | `alignItems` | `ResponsiveProp<center \| normal \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
151
+ | `alignSelf` | `ResponsiveProp<center \| normal \| auto \| start \| end \| flex-start \| flex-end \| self-start \| self-end \| stretch \| baseline \| first baseline \| last baseline>` | No | `-` | - |
152
+ | `as` | `div` | No | `-` | - |
153
+ | `aspectRatio` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
154
+ | `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 | `-` | - |
155
+ | `borderBottomLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
156
+ | `borderBottomRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
157
+ | `borderBottomWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
158
+ | `borderColor` | `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 | `-` | - |
159
+ | `borderEndWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
160
+ | `borderRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
161
+ | `borderStartWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
162
+ | `borderTopLeftRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
163
+ | `borderTopRightRadius` | `0 \| 100 \| 200 \| 300 \| 400 \| 500 \| 600 \| 700 \| 800 \| 900 \| 1000` | No | `-` | - |
164
+ | `borderTopWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
165
+ | `borderWidth` | `0 \| 100 \| 200 \| 300 \| 400 \| 500` | No | `-` | - |
166
+ | `bordered` | `boolean` | No | `-` | Add a border around all sides of the box. |
167
+ | `borderedBottom` | `boolean` | No | `-` | Add a border to the bottom side of the box. |
168
+ | `borderedEnd` | `boolean` | No | `-` | Add a border to the trailing side of the box. |
169
+ | `borderedHorizontal` | `boolean` | No | `-` | Add a border to the leading and trailing sides of the box. |
170
+ | `borderedStart` | `boolean` | No | `-` | Add a border to the leading side of the box. |
171
+ | `borderedTop` | `boolean` | No | `-` | Add a border to the top side of the box. |
172
+ | `borderedVertical` | `boolean` | No | `-` | Add a border to the top and bottom sides of the box. |
173
+ | `bottom` | `ResponsiveProp<Bottom<string \| number>>` | No | `-` | - |
174
+ | `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 | `-` | - |
175
+ | `columnGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
176
+ | `dangerouslySetBackground` | `string` | No | `-` | - |
177
+ | `description` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Content to be displayed below the title |
178
+ | `display` | `ResponsiveProp<grid \| revert \| none \| block \| inline \| inline-block \| flex \| inline-flex \| inline-grid \| contents \| flow-root \| list-item>` | No | `-` | - |
179
+ | `elevation` | `0 \| 1 \| 2` | No | `-` | - |
180
+ | `flexBasis` | `ResponsiveProp<FlexBasis<string \| number>>` | No | `-` | - |
181
+ | `flexDirection` | `ResponsiveProp<column \| row \| row-reverse \| column-reverse>` | No | `-` | - |
182
+ | `flexGrow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
183
+ | `flexShrink` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
184
+ | `flexWrap` | `ResponsiveProp<nowrap \| wrap \| wrap-reverse>` | No | `-` | - |
185
+ | `font` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
186
+ | `fontFamily` | `ResponsiveProp<FontFamily \| inherit>` | No | `-` | - |
187
+ | `fontSize` | `ResponsiveProp<FontSize \| inherit>` | No | `-` | - |
188
+ | `fontWeight` | `ResponsiveProp<FontWeight \| inherit>` | No | `-` | - |
189
+ | `gap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
190
+ | `grid` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
191
+ | `gridArea` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
192
+ | `gridAutoColumns` | `ResponsiveProp<GridAutoColumns<string \| number>>` | No | `-` | - |
193
+ | `gridAutoFlow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| row \| column \| dense` | No | `-` | - |
194
+ | `gridAutoRows` | `ResponsiveProp<GridAutoRows<string \| number>>` | No | `-` | - |
195
+ | `gridColumn` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
196
+ | `gridColumnEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
197
+ | `gridColumnStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
198
+ | `gridRow` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
199
+ | `gridRowEnd` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
200
+ | `gridRowStart` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
201
+ | `gridTemplate` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
202
+ | `gridTemplateAreas` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
203
+ | `gridTemplateColumns` | `ResponsiveProp<GridTemplateColumns<string \| number>>` | No | `-` | - |
204
+ | `gridTemplateRows` | `ResponsiveProp<GridTemplateRows<string \| number>>` | No | `-` | - |
205
+ | `height` | `ResponsiveProp<Height<string \| number>>` | No | `-` | - |
206
+ | `justifyContent` | `ResponsiveProp<left \| right \| center \| normal \| start \| end \| flex-start \| flex-end \| stretch \| space-between \| space-around \| space-evenly>` | No | `-` | - |
207
+ | `key` | `Key \| null` | No | `-` | - |
208
+ | `left` | `ResponsiveProp<Left<string \| number>>` | No | `-` | - |
209
+ | `lineHeight` | `ResponsiveProp<LineHeight \| inherit>` | No | `-` | - |
210
+ | `margin` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
211
+ | `marginBottom` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
212
+ | `marginEnd` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
213
+ | `marginStart` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
214
+ | `marginTop` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
215
+ | `marginX` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
216
+ | `marginY` | `ResponsiveProp<0 \| -5 \| -10 \| -0.25 \| -0.5 \| -0.75 \| -1 \| -1.5 \| -2 \| -3 \| -4 \| -6 \| -7 \| -8 \| -9>` | No | `-` | - |
217
+ | `maxHeight` | `ResponsiveProp<MaxHeight<string \| number>>` | No | `-` | - |
218
+ | `maxWidth` | `ResponsiveProp<MaxWidth<string \| number>>` | No | `-` | - |
219
+ | `minHeight` | `ResponsiveProp<MinHeight<string \| number>>` | No | `-` | - |
220
+ | `minWidth` | `ResponsiveProp<MinWidth<string \| number>>` | No | `-` | - |
221
+ | `onChange` | `FormEventHandler<HTMLDivElement>` | No | `-` | - |
222
+ | `opacity` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset` | No | `-` | - |
223
+ | `overflow` | `ResponsiveProp<hidden \| auto \| visible \| clip \| scroll>` | No | `-` | - |
224
+ | `padding` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
225
+ | `paddingBottom` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
226
+ | `paddingEnd` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
227
+ | `paddingStart` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
228
+ | `paddingTop` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
229
+ | `paddingX` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
230
+ | `paddingY` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
231
+ | `pin` | `top \| bottom \| left \| right \| all` | No | `-` | Direction in which to absolutely pin the box. |
232
+ | `position` | `ResponsiveProp<fixed \| static \| relative \| absolute \| sticky>` | No | `-` | - |
233
+ | `ref` | `RefObject<HTMLDivElement> \| ((instance: HTMLDivElement \| null) => void) \| null` | No | `-` | - |
234
+ | `right` | `ResponsiveProp<Right<string \| number>>` | No | `-` | - |
235
+ | `rowGap` | `0 \| 5 \| 10 \| 0.25 \| 0.5 \| 0.75 \| 1 \| 1.5 \| 2 \| 3 \| 4 \| 6 \| 7 \| 8 \| 9` | No | `-` | - |
236
+ | `size` | `s \| l` | No | `'s'` | Variant for card size. Can be small or large. |
237
+ | `style` | `CSSProperties` | No | `-` | - |
238
+ | `subtitle` | `null \| string \| number \| false \| true \| ReactElement<any, string \| JSXElementConstructor<any>> \| Iterable<ReactNode> \| ReactPortal` | No | `-` | Text or ReactNode to be displayed above Title |
239
+ | `testID` | `string` | No | `floating-asset-card` | 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 |
240
+ | `textAlign` | `ResponsiveProp<center \| start \| end \| justify>` | No | `-` | - |
241
+ | `textDecoration` | `ResponsiveProp<none \| underline \| overline \| line-through \| underline overline \| underline double>` | No | `-` | - |
242
+ | `textTransform` | `ResponsiveProp<capitalize \| lowercase \| none \| uppercase>` | No | `-` | - |
243
+ | `top` | `ResponsiveProp<Top<string \| number>>` | No | `-` | - |
244
+ | `transform` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| none` | No | `-` | - |
245
+ | `userSelect` | `ResponsiveProp<text \| none \| auto \| all>` | No | `-` | - |
246
+ | `visibility` | `ResponsiveProp<hidden \| visible>` | No | `-` | - |
247
+ | `width` | `ResponsiveProp<Width<string \| number>>` | No | `size === 'l' ? floatingAssetCardLargeWidth : floatingAssetCardSmallDimension` | - |
248
+ | `zIndex` | `-moz-initial \| inherit \| initial \| revert \| revert-layer \| unset \| auto` | No | `-` | - |
249
+
250
+
@@ -0,0 +1,69 @@
1
+ # FullscreenAlert
2
+
3
+ A fullscreen alert component for displaying important messages that require user attention.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { FullscreenAlert } from '@coinbase/cds-web/overlays/alert/FullscreenAlert'
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ `FullscreenAlert` is built on top of `FullscreenModal` with an API that is similar to `Alert`.
14
+
15
+ :::tip Accessibility tip (Web only)
16
+
17
+ Alerts require an accessibility label, which we set to `title` by default. However, if there's other text that gives the user better context to the alert, then you can pass an element id to `accessibilityLabelledBy`. Alternatively, you may directly provide a contextual label to `accessibilityLabel`.
18
+
19
+ :::
20
+
21
+ ### Basic example
22
+
23
+ ```jsx live
24
+ function DefaultAlert() {
25
+ const [visible, setVisible] = useState(false);
26
+
27
+ const handleOpen = () => setVisible(true);
28
+ const handleClose = () => setVisible(false);
29
+
30
+ return (
31
+ <PortalProvider>
32
+ <Button onClick={handleOpen}>Open Alert</Button>
33
+ <FullscreenAlert
34
+ visible={visible}
35
+ onRequestClose={handleClose}
36
+ title="Connection trouble"
37
+ body="We're unable to connect to our card partner. Apologies for the inconvenience. Please try again later today or tomorrow."
38
+ heroSquare="errorApp500"
39
+ preferredActionLabel="Try again"
40
+ onPreferredActionPress={handleClose}
41
+ dismissActionLabel="Cancel"
42
+ onDismissActionPress={handleClose}
43
+ closeAccessibilityLabel="Close"
44
+ />
45
+ </PortalProvider>
46
+ );
47
+ }
48
+ ```
49
+
50
+ ## Props
51
+
52
+ | Prop | Type | Required | Default | Description |
53
+ | --- | --- | --- | --- | --- |
54
+ | `body` | `string` | Yes | `-` | Alert body/description |
55
+ | `onRequestClose` | `() => void` | Yes | `-` | Callback function fired when modal is closed. |
56
+ | `preferredActionLabel` | `string` | Yes | `-` | Label of the main call to action button |
57
+ | `title` | `string` | Yes | `-` | Alert title |
58
+ | `visible` | `boolean` | Yes | `false false` | Controls visibility of the Modal |
59
+ | `accessibilityLabelledBy` | `string` | No | `-` | On web, maps to aria-labelledby and lists the id(s) of the element(s) that label the element on which the attribute is set. On mobile (Android only), a reference to another element nativeID used to build complex forms. |
60
+ | `closeAccessibilityLabel` | `string` | No | `-` | Sets an accessible label for the close button. On web, maps to aria-label and defines a string value that labels an interactive element. On mobile, VoiceOver will read this string when a user selects the associated element. |
61
+ | `disablePortal` | `boolean` | No | `-` | Disable React portal integration |
62
+ | `dismissActionLabel` | `string` | No | `-` | Label of the dismiss button |
63
+ | `heroSquare` | `margin \| success \| pending \| airdrop \| blockchain \| camera \| cloud \| coinbaseOneLogo \| earn \| instantUnstakingClock \| options \| refresh \| rocket \| securityShield \| smartContract \| staking \| borrowCoins \| coinbaseOneEarn \| ethStakingRewards \| fiat \| futures \| globalTransactions \| governance \| lightningNetworkSend \| outage \| startToday \| walletWarning \| phoneNumber \| exchange \| accessToAdvancedCharts \| accountUnderReview \| add2Fa \| addBankAccount \| addCreditCard \| addMoreCrypto \| addPhoneNumber \| advancedTrading \| advancedTradingChartsIndicatorsCandles \| advancedTradingUi \| alienDonutSystemError \| anonymous \| appTrackingTransparency \| artFrameEmptyState \| automaticPayments \| backedByUsDollar \| baseChartLarge \| baseCheck \| baseCoinCryptoLarge \| baseCoinNetworkLarge \| baseConnectLarge \| baseCreatorCoin \| baseCreatorCoinEmpty \| baseDecentralizationLarge \| basedInUsa \| baseEmptyLarge \| baseErrorButterfly \| baseErrorLarge \| baseLoadingLarge \| baseLocationLarge \| baseMintNftLarge \| baseNetworkLarge \| baseNftLarge \| basePaycoinLarge \| basePeopleLarge \| basePiechartLarge \| baseRewardsCalmLarge \| baseSecurityLarge \| baseSendLarge \| baseSocial \| baseTargetLarge \| bigBtc \| bigError \| bigWarning \| bitcoinAndOtherCrypto \| bitcoinGlobe \| borrow \| borrowWallet \| brdGift \| bridge \| browseDecentralizedApps \| browserExtension \| buy \| buyFirstCrypto \| cardAndPhone \| cardBoosted \| cardError \| cardErrorCB1 \| cardReloadFunds \| cashExcitement \| catHoldingWalletEmptyState \| catLostSystemError \| cbada \| cbbtc \| cbdoge \| cbltc \| cbxrp \| chickenFishSystemError \| claimCryptoUsername \| cloudBacking \| coinbaseCard \| coinbaseCardIssue \| coinbaseCardLock \| coinbaseCardPocket \| coinbaseCardSpend \| coinbaseCardSpendCrypto \| coinbaseFees \| coinbaseIsDown \| coinbaseIsDownMobile \| coinbaseOneAirdrop \| coinbaseOneCardWarning \| coinbaseOneDiscountedAmount \| coinbaseOneDocWarning \| coinbaseOneInsufficientWallet \| coinbaseOnePercentOff \| coinbaseOnePhoneLightning \| coinbaseOneProtectedCrypto \| coinbaseOneRewards \| coinbaseOneSavingFunds \| coinbaseOneTokenRewards \| coinbaseOneUSDCBig \| coinbaseOneUSDCIncentives \| coinbaseOneWaitlist \| coinbaseOneWalletWarning \| coinbaseOneWelcome \| coinbaseOneZeroPortal \| coinbaseOneZeroPromotion \| coinbaseRedesigned \| coinbaseWalletToTrade \| coinCheckmark \| coinFifty \| coinsInWallet \| collectableNfts \| collectingNfts \| commerceAccounting \| commerceInvoices \| communication \| completeAQuiz \| congratulationsOnEarningCrypto \| connectPeople \| contactsListWarning \| crossBorderPayments \| cryptoAndMore \| cryptoApps \| cryptoAppsWallet \| cryptoAssets \| cryptoEconomy \| cryptoForBeginners \| cryptoPortfolio \| cryptoWallet \| currencyPairs \| dappsArts \| dappsFinance \| dappsGaming \| dappsGeneral \| dappsL2Support \| dappsMusic \| decentralization \| decentralizedWebWeb3 \| defiDecentralizedBorrowingLending \| defiDecentralizedTradingExchange \| defiEarn \| defiEnrollBoost \| defiHow \| defiRisk \| desktopAuthorized \| desktopUnknown \| developer \| diamondHands \| didDecentralizedIdentity \| digitalCollectibles \| digitalGold \| directDepositPhone \| discardAssets \| docError \| documentCertified \| documentSuccess \| downloadCoinbaseWallet \| earnCryptoCard \| earnCryptoInterest \| earnGlobe \| earnGrowth \| earnIdVerification \| earnInterest \| earnMore \| earnNuxHome \| earnSuccess \| earnToLearn \| emailNotification \| emptyCollection \| emptyStateCheckBackLater \| emptyStateNft404Page \| emptyStateNftSoldOut \| enableBiometrics \| encryptedEverything \| engagement \| ensProfilePic \| error400 \| errorApp500 \| errorMoblie \| errorRefresh \| errorRefreshWeb \| errorWeb \| errorWeb400 \| errorWeb404 \| errorWeb404Mobile \| errorWeb500 \| estimatedAmount \| ethereumToWallet \| ethStakingUpsell \| exchangeEmptyState \| exploreDecentralizedApps \| faceMatchReal \| feeScale \| fileYourCryptoTaxes \| fileYourCryptoTaxesCheck \| focusLimitOrders \| freeBtc \| gainsAndLosses \| gamer \| gasFeesNetworkFees \| generative \| getStartedInMinutes \| governanceMallet \| graphChartTrading \| hardwareWallets \| hiddenCollection \| holdCrypto \| holdingCrypto \| iceCreamMeltingSystemError \| idAngles \| idBack \| idCard \| idFront \| idIssue \| idVerificationSecure \| indexer \| innovation \| insufficientBalance \| insuranceProtection \| invest \| invite \| japanVerifyId \| keyGeneration \| layeredNetworks \| layerOne \| layerThree \| layerTwo \| ledgerAccess \| ledgerPlugin \| lend \| leverage \| lightningNetwork \| lightningNetworkInvoice \| lightningNetworkTransfer \| limitOrders \| linkingYourWalletToYourCoinbaseAccount \| liquidationBufferGreen \| liquidationBufferRed \| liquidationBufferRedClose \| liquidationBufferYellow \| lowCost \| marginWarning \| mic \| mining \| minting \| moneyDecentralized \| multicoinSupport \| multiPlatformMobileAppBrowserExtension \| multipleAccountsWalletsForOneUser \| multiplePortfolios \| myNameIsSatoshi \| namePortfolio \| networkWarning \| noFees \| noFeesMotion \| noLongAddresses \| notificationsAlt \| notificationsAndUpdates \| offChain \| oilAndGold \| onChain \| onTheList \| openEmail \| optInPushNotificationsEmail \| oracle \| orderBooks \| p2pGifting \| p2pPayments \| paperHands \| payUpFront \| performance \| phoneUnknown \| platform \| polling \| portfolioPerformance \| poweredByEthereum \| powerOfCrypto \| predictionsMarkets \| primeDeFi \| primeEarn \| primeStaking \| private \| privateKey \| processing \| protocol \| public \| quest \| quickAndSimple \| quickBuy \| ratingsAndReviews \| readyToTrade \| realToUSDC \| receivedCard \| receiveGift \| recommendInvest \| recurringReward \| referralsAvatars \| referralsBitcoin \| referralsCoinbaseOne \| referralsGenericCoin \| referralsWalletPhones \| remittances \| requestSent \| restrictedCountry \| retailUSDCRewards \| reviewInfo \| rotatingRewards \| routingAccount \| scalable \| secureAndTrusted \| secureGlobalTransactions \| secureStorage \| selectCorrectCrypto \| selectReward \| selfCustody \| selfCustodyCrypto \| semiCustodial \| sendCryptoFaster \| sendToUsername \| serverCatSystemError \| settlement \| shareOnSocialMedia \| sidechain \| slippageTolerance \| spacedOutSystemError \| squidEmptyState \| stablecoin \| stableValue \| stakingMissedReturns \| stakingMissedReturnsUsdc \| stayInControlSelfHostedWalletsStorage \| stopLimitOrder \| stopLimitOrderDown \| storage \| stressTestedColdStorage \| supportAndMore \| sustainable \| switchAdvancedToSimpleTrading \| taxesDetails \| tools \| tradeGeneral \| tradeHistory \| tradeImmediately \| transactionLimit \| trendingHotAssets \| twoIdVerify \| unlockKey \| usdtToUSDC \| verifyBankTransactions \| verifyCardTransactions \| verifyEmail \| verifyIdDetails \| verifyInfo \| videoRequest \| videoReview \| videoUpload \| vipBadge \| vote \| walletAsset \| walletConfirmation \| walletFlyEmptyState \| walletLoading \| walletNotifications \| walletSecurity \| walletUi \| watchVideos \| web3ActivityError \| web3ActivitySigned \| web3MobileSetupStart \| web3MobileSetupSuccess \| webRAT \| whyNotBoth \| yourContacts` | No | `-` | Name of the illustration that is rendered in the alert |
64
+ | `onDismissActionPress` | `(() => void)` | No | `-` | Callback function fired when the dismiss button is pressed |
65
+ | `onPreferredActionPress` | `(() => void)` | No | `-` | Callback function fired when the main call to action button is pressed |
66
+ | `preferredActionVariant` | `primary \| negative` | No | `primary` | Variant of the main call to action button |
67
+ | `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 |
68
+
69
+
@@ -0,0 +1,145 @@
1
+ # FullscreenModal
2
+
3
+ FullscreenModal is a component that displays content in a full-screen overlay, typically used for immersive experiences or complex interactions.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { FullscreenModal } from '@coinbase/cds-web/overlays/modal/FullscreenModal'
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ Please refer to the [Modal](/components/overlay/Modal) docs for more info on setup and usage.
14
+
15
+ :::tip Accessibility tip
16
+
17
+ **Trigger Focus**
18
+
19
+ A `ref` to the trigger that opens the modal, along with an `onDidClose` method to reset focus on the trigger when the modal closes, needs to be wired up for accessibility (see code example below).
20
+
21
+ <br />
22
+
23
+ **Labels**
24
+
25
+ Modals also require an accessibility label, which we set to `title` by default. However, if you don't want to provide a `title` or there's other text that gives the user better context to the modal, then you can pass an element id to `accessibilityLabelledBy`. Alternatively, you may directly provide a contextual label to `accessibilityLabel`.
26
+
27
+ :::
28
+
29
+ ### Basic example
30
+
31
+ ```jsx live
32
+ function DefaultModal() {
33
+ const [visible, setVisible] = useState(false);
34
+ const triggerRef = useRef(null);
35
+
36
+ const toggleOn = useCallback(() => setVisible(true), []);
37
+ const toggleOff = useCallback(() => setVisible(false), []);
38
+
39
+ const handleClose = useCallback(() => {
40
+ console.log('modal closing');
41
+ toggleOff();
42
+ }, [toggleOff]);
43
+
44
+ const handleDidClose = useCallback(() => {
45
+ if (triggerRef.current) {
46
+ triggerRef.current.focus();
47
+ }
48
+ }, []);
49
+
50
+ const onClickConsole = () => void console.log;
51
+
52
+ const SelectComponent = () => {
53
+ const [value, setValue] = useState();
54
+ const options = ['Option 1', 'Option 2', 'Option 3', 'Option 4', 'Option 5', 'Option 6'];
55
+
56
+ return (
57
+ <Select value={value} placeholder="Choose something..." onChange={setValue}>
58
+ {options.map((option) => (
59
+ <SelectOption value={option} key={option} title={option} description="Description" />
60
+ ))}
61
+ </Select>
62
+ );
63
+ };
64
+
65
+ const primaryContent = (
66
+ <VStack>
67
+ <TextTitle1 as="h1">Fullscreen Modal</TextTitle1>
68
+ <TextBody as="p">This is a test Fullscreen Modal with components composition.</TextBody>
69
+ <ListCell
70
+ title="Bitcoin"
71
+ description="BTC"
72
+ detail="$45,123"
73
+ subdetail="+4.55%"
74
+ variant="positive"
75
+ />
76
+ <SelectComponent />
77
+ <HStack paddingY={3} gap={3}>
78
+ <Button onClick={handleClose}>Yes</Button>
79
+ <Button onClick={handleClose} variant="secondary">
80
+ No
81
+ </Button>
82
+ </HStack>
83
+ </VStack>
84
+ );
85
+
86
+ const secondaryContent = (
87
+ <VStack borderRadius={300} elevation={1}>
88
+ <Accordion defaultActiveKey="2">
89
+ <AccordionItem itemKey="1" title="Accordion #1" subtitle="subtitle1">
90
+ <TextBody as="p">{loremIpsum}</TextBody>
91
+ </AccordionItem>
92
+ <AccordionItem itemKey="2" title="Accordion #2" subtitle="subtitle2">
93
+ <TextBody as="p">{loremIpsum}</TextBody>
94
+ </AccordionItem>
95
+ </Accordion>
96
+ </VStack>
97
+ );
98
+
99
+ return (
100
+ <PortalProvider>
101
+ <Button onClick={toggleOn} ref={triggerRef}>
102
+ Open Modal
103
+ </Button>
104
+ <FullscreenModal
105
+ visible={visible}
106
+ onRequestClose={handleClose}
107
+ onDidClose={handleDidClose}
108
+ primaryContent={primaryContent}
109
+ secondaryContent={secondaryContent}
110
+ title="Modal title"
111
+ closeAccessibilityLabel="Close"
112
+ />
113
+ </PortalProvider>
114
+ );
115
+ }
116
+ ```
117
+
118
+ ## Props
119
+
120
+ | Prop | Type | Required | Default | Description |
121
+ | --- | --- | --- | --- | --- |
122
+ | `onRequestClose` | `() => void` | Yes | `-` | Callback function fired when modal is closed. |
123
+ | `primaryContent` | `ReactElement` | Yes | `-` | Primary content element. Primary content is where the core of the task or information should live. |
124
+ | `visible` | `boolean` | Yes | `false false` | Controls visibility of the Modal |
125
+ | `accessibilityLabelledBy` | `string` | No | `-` | On web, maps to aria-labelledby and lists the id(s) of the element(s) that label the element on which the attribute is set. On mobile (Android only), a reference to another element nativeID used to build complex forms. |
126
+ | `closeAccessibilityLabel` | `string` | No | `-` | Sets an accessible label for the close button. On web, maps to aria-label and defines a string value that labels an interactive element. On mobile, VoiceOver will read this string when a user selects the associated element. |
127
+ | `contentContainerClassName` | `string` | No | `-` | Class applied to the content container element |
128
+ | `contentStyle` | `CSSProperties` | No | `-` | Apply styles to content. |
129
+ | `disableFocusTrap` | `boolean` | No | `false` | Set disableFocusTrap to disable keyboard listeners responsible for focus trap behavior This can be useful for scenarios like Yubikey 2fa Disables the focus trap to allow normal keyboard navigation. |
130
+ | `disablePortal` | `boolean` | No | `-` | Disable React portal integration |
131
+ | `focusTabIndexElements` | `boolean` | No | `false false` | Allow any element with tabIndex attribute to be focusable in FocusTrap, rather than only focusing specific interactive element types like button. This can be useful when having long content in a Modal. If true, the focus trap will include all elements with tabIndex values in the list of focusable elements. |
132
+ | `hideDivider` | `boolean` | No | `false` | Hide header bottom divider |
133
+ | `logo` | `ReactElement` | No | `-` | The logo to display |
134
+ | `onDidClose` | `((() => void) & (() => void))` | No | `-` | Callback fired after the component is closed. |
135
+ | `primaryContentClassName` | `string` | No | `-` | Class applied to the primary content element |
136
+ | `restoreFocusOnUnmount` | `boolean` | No | `true` | If true, the focus trap will restore focus to the previously focused element when it unmounts. WARNING: If you disable this, you need to ensure that focus is restored properly so it doesnt end up on the body |
137
+ | `role` | `dialog \| alertdialog` | No | `-` | WAI-ARIA Roles |
138
+ | `secondaryContent` | `ReactElement` | No | `-` | Secondary content element. Secondary content is supplemental information. |
139
+ | `secondaryContentClassName` | `string` | No | `-` | Class applied to the secondary content element |
140
+ | `shouldCloseOnEscPress` | `boolean` | No | `true` | If pressing the esc key should close the modal |
141
+ | `showSecondaryContentDivider` | `boolean` | No | `false` | Show divider between primary and secondary content |
142
+ | `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 |
143
+ | `title` | `string` | No | `-` | Title displayed in the Fullscreen Modal header. |
144
+
145
+
@@ -0,0 +1,187 @@
1
+ # FullscreenModalLayout
2
+
3
+ Provides the layout structure, overlay, focus trapping, and animations for fullscreen modals. Intended for internal use within Modal component variants.
4
+
5
+ ## Import
6
+
7
+ ```tsx
8
+ import { FullscreenModalLayout } from '@coinbase/cds-web/overlays/modal/FullscreenModalLayout'
9
+ ```
10
+
11
+ ## Examples
12
+
13
+ import {
14
+ Box,
15
+ Text,
16
+ PortalProvider,
17
+ Button,
18
+ FullscreenModalLayout,
19
+ VStack,
20
+ HStack,
21
+ LogoMark,
22
+ IconButton,
23
+ } from '@coinbase/cds-web';
24
+ import { loremIpsum } from '@coinbase/cds-common/internal/data/loremIpsum';
25
+ import React, { useCallback, useRef, useState } from 'react';
26
+
27
+ ### Basic usage
28
+
29
+ This component is primarily used internally by the `Modal` component to provide the animated layout for fullscreen modals. It wraps your modal content and manages the overlay, animations, and focus trapping.
30
+
31
+ ```tsx live
32
+ function Example() {
33
+ const [visible, setVisible] = useState(false);
34
+ const triggerRef = useRef(null);
35
+
36
+ const toggleOn = useCallback(() => setVisible(true), []);
37
+ const toggleOff = useCallback(() => setVisible(false), []);
38
+
39
+ const headerContent = (
40
+ <HStack borderedBottom alignItems="center" paddingX={4} paddingY={2}>
41
+ <Box paddingEnd={3} width={80}>
42
+ <LogoMark size={32} />
43
+ </Box>
44
+ <Box flexGrow={1}>
45
+ <Text as="h1" display="block" font="title1">
46
+ Modal
47
+ </Text>
48
+ </Box>
49
+ <Box>
50
+ <IconButton transparent aria-label="Close modal" name="close" onClick={toggleOff} />
51
+ </Box>
52
+ </HStack>
53
+ );
54
+
55
+ const mainContent = (
56
+ <VStack flexGrow={1} overflow="auto" padding={4}>
57
+ <Text as="p" display="block" font="body">
58
+ {loremIpsum}
59
+ </Text>
60
+ </VStack>
61
+ );
62
+
63
+ return (
64
+ <PortalProvider>
65
+ <Button onClick={toggleOn} ref={triggerRef}>
66
+ Open Fullscreen Modal
67
+ </Button>
68
+ {visible && (
69
+ <FullscreenModalLayout
70
+ visible={visible}
71
+ onRequestClose={toggleOff}
72
+ accessibilityLabel="Example Fullscreen Modal"
73
+ >
74
+ <VStack background="bg" height="100%" width="100%">
75
+ {headerContent}
76
+ {mainContent}
77
+ </VStack>
78
+ </FullscreenModalLayout>
79
+ )}
80
+ </PortalProvider>
81
+ );
82
+ }
83
+ ```
84
+
85
+ ### Example composing content
86
+
87
+ This example showcases how `FullscreenModalLayout` can be used to structure content across multiple distinct areas. It demonstrates the arrangement of a custom header, a top panel, a central area with left, center, and right panels, and a bottom panel.
88
+
89
+ ```tsx live
90
+ function AllPanelsExample() {
91
+ const [visible, setVisible] = useState(false);
92
+ const triggerRef = useRef(null);
93
+
94
+ const toggleOn = useCallback(() => setVisible(true), []);
95
+ const toggleOff = useCallback(() => setVisible(false), []);
96
+
97
+ const headerContent = (
98
+ <HStack borderedBottom alignItems="center" paddingX={4} paddingY={2}>
99
+ <Box paddingEnd={3} width={80}>
100
+ <LogoMark size={32} />
101
+ </Box>
102
+ <Box flexGrow={1}>
103
+ <Text as="h1" display="block" font="title1">
104
+ Modal - All Panels
105
+ </Text>
106
+ </Box>
107
+ <Box>
108
+ <IconButton transparent aria-label="Close modal" name="close" onClick={toggleOff} />
109
+ </Box>
110
+ </HStack>
111
+ );
112
+
113
+ const mainModalContent = (
114
+ <VStack flexGrow={1} overflow="hidden">
115
+ <VStack background="bgAlternate" padding={2}>
116
+ <Text as="p" color="fg" display="block" font="body">
117
+ Top Panel (e.g., Breadcrumbs, Progress)
118
+ </Text>
119
+ </VStack>
120
+ <HStack flexGrow={1} overflow="hidden">
121
+ <VStack background="bgAlternate" height="100%" overflow="auto" padding={4} width={360}>
122
+ <Text as="p" display="block" font="body">
123
+ Left Panel
124
+ </Text>
125
+ </VStack>
126
+ <VStack flexGrow={1} overflow="auto" padding={4}>
127
+ <Text as="p" display="block" font="body">
128
+ Center Panel
129
+ <br />
130
+ {loremIpsum}
131
+ </Text>
132
+ </VStack>
133
+ <VStack background="bgAlternate" height="100%" overflow="auto" padding={4} width={360}>
134
+ <Text as="p" display="block" font="body">
135
+ Right Panel
136
+ </Text>
137
+ </VStack>
138
+ </HStack>
139
+ <HStack borderedTop background="bgAlternate" padding={2}>
140
+ <Text as="p" display="block" font="body">
141
+ Bottom Panel (e.g., Footer, Actions)
142
+ </Text>
143
+ </HStack>
144
+ </VStack>
145
+ );
146
+
147
+ return (
148
+ <PortalProvider>
149
+ <Button ref={triggerRef} onClick={toggleOn}>
150
+ Open Modal (All Panels)
151
+ </Button>
152
+ {visible && (
153
+ <FullscreenModalLayout
154
+ onRequestClose={toggleOff}
155
+ visible={visible}
156
+ accessibilityLabel="All Panels Fullscreen Modal"
157
+ >
158
+ <VStack background="bg" height="100%" width="100%">
159
+ {headerContent}
160
+ {mainModalContent}
161
+ </VStack>
162
+ </FullscreenModalLayout>
163
+ )}
164
+ </PortalProvider>
165
+ );
166
+ }
167
+ ```
168
+
169
+ ## Props
170
+
171
+ | Prop | Type | Required | Default | Description |
172
+ | --- | --- | --- | --- | --- |
173
+ | `onRequestClose` | `() => void` | Yes | `-` | Callback function fired when modal is closed. |
174
+ | `visible` | `boolean` | Yes | `false false` | Controls visibility of the Modal |
175
+ | `accessibilityLabelledBy` | `string` | No | `-` | On web, maps to aria-labelledby and lists the id(s) of the element(s) that label the element on which the attribute is set. On mobile (Android only), a reference to another element nativeID used to build complex forms. |
176
+ | `disableFocusTrap` | `boolean` | No | `false` | Set disableFocusTrap to disable keyboard listeners responsible for focus trap behavior This can be useful for scenarios like Yubikey 2fa Disables the focus trap to allow normal keyboard navigation. |
177
+ | `disablePortal` | `boolean` | No | `-` | Disable React portal integration |
178
+ | `focusTabIndexElements` | `boolean` | No | `false false` | Allow any element with tabIndex attribute to be focusable in FocusTrap, rather than only focusing specific interactive element types like button. This can be useful when having long content in a Modal. If true, the focus trap will include all elements with tabIndex values in the list of focusable elements. |
179
+ | `key` | `Key \| null` | No | `-` | - |
180
+ | `onDidClose` | `((() => void) & (() => void))` | No | `-` | Callback fired after the component is closed. |
181
+ | `ref` | `RefObject<HTMLDivElement> \| ((instance: HTMLDivElement \| null) => void) \| null` | No | `-` | - |
182
+ | `restoreFocusOnUnmount` | `boolean` | No | `true` | If true, the focus trap will restore focus to the previously focused element when it unmounts. WARNING: If you disable this, you need to ensure that focus is restored properly so it doesnt end up on the body |
183
+ | `role` | `dialog \| alertdialog` | No | `-` | WAI-ARIA Roles |
184
+ | `shouldCloseOnEscPress` | `boolean` | No | `true` | If pressing the esc key should close the modal |
185
+ | `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 |
186
+
187
+